@local-logic/sdks-app 1.7.2 → 2.1.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.0a642cb5.js +1 -0
- package/dist/assets/index-legacy.4e44eb64.js +1 -0
- package/dist/assets/index-legacy.7f6983e2.js +1 -0
- package/dist/assets/index-legacy.919f470f.js +1 -0
- package/dist/assets/index-legacy.95ccb44a.js +106 -0
- package/dist/assets/index-legacy.c9e59904.js +23 -0
- package/dist/assets/index-legacy.fc3fe26b.js +1 -0
- package/dist/assets/{index.10935833.js → index.1bb375cb.js} +13 -13
- package/dist/assets/index.621fb294.js +149 -0
- package/dist/assets/index.795111c8.js +1 -0
- package/dist/assets/index.7a7d9dc0.js +1 -0
- package/dist/assets/index.937af76a.js +247 -0
- package/dist/assets/index.9af49ac7.js +1318 -0
- package/dist/assets/index.f59985f7.js +35 -0
- package/dist/assets/polyfills-legacy.db2bc606.js +1 -0
- package/dist/assets/{useIsMobile-legacy.a1dad04e.js → useIsMobile-legacy.ed5dee46.js} +1 -1
- package/dist/assets/{useIsMobile.5dc7840d.js → useIsMobile.456ed35b.js} +1 -1
- package/dist/assets/useQuery-legacy.97f1ad62.js +1 -0
- package/dist/assets/useQuery.83f2b67b.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 +3 -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 +3 -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 +3 -3
- 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/sdks/DataExplorer/components/DataTable/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/index.js +65 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/styles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/styles.js +27 -0
- package/dist/types/sdks/DataExplorer/components/DataTable/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Export/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Export/index.js +7 -11
- package/dist/types/sdks/DataExplorer/components/Export/index.js.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Filters/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Filters/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Filters/index.js +51 -0
- package/dist/types/sdks/DataExplorer/components/Filters/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.js +12 -0
- package/dist/types/sdks/DataExplorer/components/Filters/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Section/index.d.ts +2 -4
- package/dist/types/sdks/DataExplorer/components/Section/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Section/index.js +6 -18
- package/dist/types/sdks/DataExplorer/components/Section/index.js.map +1 -1
- package/dist/types/sdks/DataExplorer/context.d.ts +4 -5
- package/dist/types/sdks/DataExplorer/context.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/context.js +4 -5
- 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 +10 -59
- package/dist/types/sdks/DataExplorer/index.js.map +1 -1
- package/dist/types/sdks/DataExplorer/styles.d.ts +3 -2
- package/dist/types/sdks/DataExplorer/styles.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/styles.js +17 -7
- package/dist/types/sdks/DataExplorer/styles.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/package.json +4 -3
- package/dist/assets/index-legacy.128bbb90.js +0 -106
- package/dist/assets/index-legacy.3a8c6aa8.js +0 -1
- package/dist/assets/index-legacy.46f64d17.js +0 -1
- package/dist/assets/index-legacy.60df4146.js +0 -1
- package/dist/assets/index-legacy.7c9f6b15.js +0 -1
- package/dist/assets/index-legacy.935e7346.js +0 -1
- package/dist/assets/index-legacy.93d69255.js +0 -1
- package/dist/assets/index.1df47f40.js +0 -28
- package/dist/assets/index.71eb35ea.js +0 -247
- package/dist/assets/index.97d3a920.js +0 -1374
- package/dist/assets/index.d464e7cf.js +0 -1
- package/dist/assets/index.e63e2d64.js +0 -1
- package/dist/assets/index.ed99fd65.js +0 -120
- package/dist/assets/keyFactory-legacy.782b8549.js +0 -1
- package/dist/assets/keyFactory.e1cd5707.js +0 -1
- package/dist/assets/polyfills-legacy.147ba02d.js +0 -1
- package/dist/assets/useQuery-legacy.6ce02414.js +0 -1
- package/dist/assets/useQuery.7c643982.js +0 -9
|
@@ -1 +0,0 @@
|
|
|
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.935e7346.js","./index-legacy.128bbb90.js","./useIsMobile-legacy.a1dad04e.js","./useQuery-legacy.6ce02414.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.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(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 +0,0 @@
|
|
|
1
|
-
!function(){function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function r(r){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?e(Object(n),!0).forEach((function(e){t(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}System.register([],(function(e,t){"use strict";return{execute:function(){e("translations",r(r(r({},{RADIUS:"Rayon",LIMIT:"Limite",EXPORT:"Exporter",SEARCH_MAP:"Recherchez..."}),{LOCATION:"Emplacement",SCORES:"Scores",POIS:"Points d'interêt",SCHOOLS:"Écoles",DEMOGRAPHICS:"Démographie",PROFILES:"Profils"}),{LOCATION_TEXT:"Spécifiez l'emplacement pour votre requête. Appuyez longtemps sur la carte pour bouger le curseur.",SCORES_TEXT:"Configurez les Scores Local Logic pour l'emplacement désiré.",POIS_TEXT:"Configurez les Points d'Interêt Local Logic pour l'emplacement désiré.",SCHOOLS_TEXT:"Configurez les Écoles Local Logic pour l'emplacement désiré.",DEMOGRAPHICS_TEXT:"Configurez les Démographiques Local Logic pour l'emplacement désiré.",PROFILES_TEXT:"Les Profils Locaux retournent des données qualitatives et localisées pour l'emplacement desiré."}))}}}))}();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){var t,e,n,r,i,o,s,a,u,c,l,f,h,p,d,g;function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */v=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(A){a=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new R(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return x()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=S(s,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(A){return{type:"throw",arg:A}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};a(d,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(d=y);var m=p.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,s,a){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==w(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function S(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,S(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return h.prototype=p,a(m,"constructor",p),a(p,"constructor",h),h.displayName=a(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(_.prototype),a(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(m),a(m,s,"Generator"),a(m,i,(function(){return this})),a(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,R.prototype={constructor:R,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(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function m(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(c){return void n(c)}a.done?e(u):Promise.resolve(u).then(r,i)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){m(o,r,i,s,a,"next",t)}function a(t){m(o,r,i,s,a,"throw",t)}s(void 0)}))}}function w(t){return w="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},w(t)}function _(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function S(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 E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||O(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 O(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function x(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.935e7346.js","./index-legacy.128bbb90.js","./useQuery-legacy.6ce02414.js","./keyFactory-legacy.782b8549.js"],(function(m,S){"use strict";var O,x,A,T,L,j,C,P,M,B,I,N,U,D,F,q,Y,z,V,W,G,J,H,$,X,Q,K,Z,tt,et,nt,rt,it,ot,st,at,ut,ct,lt,ft;return{setters:[function(t){O=t.g,x=t.c,A=t.l,T=t.f,L=t.S,j=t.b,C=t.s,P=t.p,M=t.i,B=t.j,I=t.m,N=t.N,U=t.P},function(t){D=t.R,F=t.u,q=t.r,Y=t.j,z=t.s,V=t._,W=t.k,G=t.e,J=t.o,H=t.a5,$=t.G,X=t.y,Q=t.n,K=t.d,Z=t.l,tt=t.U,et=t.V,nt=t.a6,rt=t.q,it=t.a7,ot=t.F,st=t.f,at=t.a8,ut=t.a9,ct=t.aa},function(t){lt=t.u},function(t){ft=t.d}],execute:function(){var S=D.createContext({}),ht=function(){return q.exports.useContext(S)},pt=function(t){var e,n,r=t.children,i=F().sdkState,o=R(q.exports.useReducer((function(t,e){return E(E({},t),e)}),{location:{lat:(null===(e=i.options)||void 0===e?void 0:e.lat)||43.661337,lng:(null===(n=i.options)||void 0===n?void 0:n.lng)||-79.401903},scores:{checked:!1,include:[]},pois:{checked:!1,include:[],radius:5e3,limit:15},schools:{checked:!1,radius:5e3,limit:15},demographics:{checked:!1,radius:2500},profiles:{checked:!1}}),2),s=o[0],a=o[1],u=q.exports.useMemo((function(){return{dataExplorerState:s,setDataExplorerState:a}}),[s,a]);return Y(S.Provider,{value:u,children:r})},dt=z.div(t||(t=_(["\n height: 100vh;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),V["--ll-color-background"]),gt=z(O)(e||(e=_(["\n overflow-y: auto;\n padding: ",";\n"])),V["--ll-spacing-medium"]),yt=W({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),vt=W({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),mt=z.div(n||(n=_(["\n display: flex;\n flex-direction: column;\n"]))),bt=z.div(r||(r=_(["\n height: 20px;\n width: 20px;\n border: 2px solid ",";\n color: ",";\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: ",";\n font-size: ",";\n"])),V["--ll-color-primary"],V["--ll-color-primary"],V["--ll-spacing-small"],V["--ll-font-size-p"]),wt=z(x)(i||(i=_(["\n all: unset;\n flex: 1;\n display: flex;\n align-items: center;\n font-family: ",";\n"])),V["--ll-font-family"]),_t=z.div(o||(o=_(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: "," 0;\n"])),V["--ll-spacing-x-small"]),St=z(A)(s||(s=_(["\n background-color: ",";\n position: relative;\n z-index: 1;\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"])),V["--ll-color-surface"],V["--ll-spacing-medium"],V["--ll-spacing-medium"],yt,vt),Et=z.div(a||(a=_(["\n padding: ",";\n"])),V["--ll-spacing-medium"]),kt=z.span(u||(u=_(["\n margin-left: ",";\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),V["--ll-spacing-x-small"],wt),Rt=z.div(c||(c=_(["\n display: flex;\n"]))),Ot=function(t){var e=t.title,n=t.description,r=t.children,i=t.value,o=t.number,s=ht(),a=s.dataExplorerState,u=s.setDataExplorerState;return Y(T,{value:i,children:G(mt,{children:[G(_t,{children:[G(wt,{children:[Y(bt,{children:o}),Y(J,{variant:"h6",noMargin:!0,weight:"--ll-font-weight-medium",children:e})]}),G(Rt,{children:["checked"in a[i]&&Y(H,{checked:a[i].checked,onCheckedChange:function(t){return u(k({},i,E(E({},a[i]),{},{checked:t})))}}),Y(wt,{children:Y(kt,{children:Y($,{SVGElement:L,fill:V["--ll-color-on-background-variant1"]})})})]})]}),Y(St,{children:G(Et,{children:[Y(J,{color:"--ll-color-on-background-variant1",children:n}),r]})})]})})},xt={exports:{}};!function(t,e){!function(t){var e;function n(){}function r(){r.init.call(this)}function i(t){return void 0===t._maxListeners?r.defaultMaxListeners:t._maxListeners}function o(t,e,n){if(e)t.call(n);else for(var r=t.length,i=g(t,r),o=0;o<r;++o)i[o].call(n)}function s(t,e,n,r){if(e)t.call(n,r);else for(var i=t.length,o=g(t,i),s=0;s<i;++s)o[s].call(n,r)}function a(t,e,n,r,i){if(e)t.call(n,r,i);else for(var o=t.length,s=g(t,o),a=0;a<o;++a)s[a].call(n,r,i)}function u(t,e,n,r,i,o){if(e)t.call(n,r,i,o);else for(var s=t.length,a=g(t,s),u=0;u<s;++u)a[u].call(n,r,i,o)}function c(t,e,n,r){if(e)t.apply(n,r);else for(var i=t.length,o=g(t,i),s=0;s<i;++s)o[s].apply(n,r)}function l(t,e,r,o){var s,a,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=t._events)?(a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),u=a[e]):(a=t._events=new n,t._eventsCount=0),u){if("function"==typeof u?u=a[e]=o?[r,u]:[u,r]:o?u.unshift(r):u.push(r),!u.warned&&(s=i(t))&&s>0&&u.length>s){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=u.length,f(c)}}else u=a[e]=r,++t._eventsCount;return t}function f(t){"function"==typeof console.warn?console.warn(t):console.log(t)}function h(t,e,n){var r=!1;function i(){t.removeListener(e,i),r||(r=!0,n.apply(t,arguments))}return i.listener=n,i}function p(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function d(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}function g(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}function y(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}n.prototype=Object.create(null),r.EventEmitter=r,r.usingDomains=!1,r.prototype.domain=void 0,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.init=function(){this.domain=null,r.usingDomains&&e.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new n,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(t){var e,n,r,i,l,f,h,p="error"===t;if(f=this._events)p=p&&null==f.error;else if(!p)return!1;if(h=this.domain,p){if(e=arguments[1],!h){if(e instanceof Error)throw e;var d=new Error('Uncaught, unspecified "error" event. ('+e+")");throw d.context=e,d}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=h,e.domainThrown=!1,h.emit("error",e),!1}if(!(n=f[t]))return!1;var g="function"==typeof n;switch(r=arguments.length){case 1:o(n,g,this);break;case 2:s(n,g,this,arguments[1]);break;case 3:a(n,g,this,arguments[1],arguments[2]);break;case 4:u(n,g,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),l=1;l<r;l++)i[l-1]=arguments[l];c(n,g,this,i)}return!0},r.prototype.addListener=function(t,e){return l(this,t,e,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(t,e){return l(this,t,e,!0)},r.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,h(this,t,e)),this},r.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,h(this,t,e)),this},r.prototype.removeListener=function(t,e){var r,i,o,s,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener&&r.listener===e)0==--this._eventsCount?this._events=new n:(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,s=r.length;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){a=r[s].listener,o=s;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new n,this;delete i[t]}else d(r,o);i.removeListener&&this.emit("removeListener",t,a||e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new n,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new n:delete r[t]),this;if(0===arguments.length){for(var i,o=Object.keys(r),s=0;s<o.length;++s)"removeListener"!==(i=o[s])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=new n,this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},r.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:y(e):[]},r.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var v=void 0!==X?X:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m=[],b=[],_="undefined"!=typeof Uint8Array?Uint8Array:Array,S=!1;function E(){S=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=t.length;e<n;++e)m[e]=t[e],b[t.charCodeAt(e)]=e;b["-".charCodeAt(0)]=62,b["_".charCodeAt(0)]=63}function k(t){var e,n,r,i,o,s;S||E();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new _(3*a/4-o),r=o>0?a-4:a;var u=0;for(e=0,n=0;e<r;e+=4,n+=3)i=b[t.charCodeAt(e)]<<18|b[t.charCodeAt(e+1)]<<12|b[t.charCodeAt(e+2)]<<6|b[t.charCodeAt(e+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=b[t.charCodeAt(e)]<<2|b[t.charCodeAt(e+1)]>>4,s[u++]=255&i):1===o&&(i=b[t.charCodeAt(e)]<<10|b[t.charCodeAt(e+1)]<<4|b[t.charCodeAt(e+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}function R(t){return m[t>>18&63]+m[t>>12&63]+m[t>>6&63]+m[63&t]}function O(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(R(r));return i.join("")}function x(t){var e;S||E();for(var n=t.length,r=n%3,i="",o=[],s=16383,a=0,u=n-r;a<u;a+=s)o.push(O(t,a,a+s>u?u:a+s));return 1===r?(e=t[n-1],i+=m[e>>2],i+=m[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=m[e>>10],i+=m[e>>4&63],i+=m[e<<2&63],i+="="),o.push(i),o.join("")}function A(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)}function T(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}var L={}.toString,j=Array.isArray||function(t){return"[object Array]"==L.call(t)},C=50;function P(){return B.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function M(t,e){if(P()<e)throw new RangeError("Invalid typed array length");return B.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=B.prototype:(null===t&&(t=new B(e)),t.length=e),t}function B(t,e,n){if(!(B.TYPED_ARRAY_SUPPORT||this instanceof B))return new B(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return D(this,t)}return I(this,t,e,n)}function I(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?Y(t,e,n,r):"string"==typeof e?F(t,e,n):z(t,e)}function N(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function U(t,e,n,r){return N(e),e<=0?M(t,e):void 0!==n?"string"==typeof r?M(t,e).fill(n,r):M(t,e).fill(n):M(t,e)}function D(t,e){if(N(e),t=M(t,e<0?0:0|W(e)),!B.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function F(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!B.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|J(e,n),i=(t=M(t,r)).write(e,n);return i!==r&&(t=t.slice(0,i)),t}function q(t,e){var n=e.length<0?0:0|W(e.length);t=M(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function Y(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),B.TYPED_ARRAY_SUPPORT?(t=e).__proto__=B.prototype:t=q(t,e),t}function z(t,e){if(G(e)){var n=0|W(e.length);return 0===(t=M(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||Tt(e.length)?M(t,0):q(t,e);if("Buffer"===e.type&&j(e.data))return q(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function W(t){if(t>=P())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P().toString(16)+" bytes");return 0|t}function G(t){return!(null==t||!t._isBuffer)}function J(t,e){if(G(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return kt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return xt(t).length;default:if(r)return kt(t).length;e=(""+e).toLowerCase(),r=!0}}function H(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return ft(this,e,n);case"utf8":case"utf-8":return st(this,e,n);case"ascii":return ct(this,e,n);case"latin1":case"binary":return lt(this,e,n);case"base64":return ot(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function $(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Q(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=B.from(e,r)),G(e))return 0===e.length?-1:K(t,e,n,r,i);if("number"==typeof e)return e&=255,B.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):K(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function K(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return-1}function Z(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function tt(t,e,n,r){return At(kt(e,t.length-n),t,n,r)}function et(t,e,n,r){return At(Rt(e),t,n,r)}function nt(t,e,n,r){return et(t,e,n,r)}function rt(t,e,n,r){return At(xt(e),t,n,r)}function it(t,e,n,r){return At(Ot(e,t.length-n),t,n,r)}function ot(t,e,n){return 0===e&&n===t.length?x(t):x(t.slice(e,n))}function st(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return ut(r)}B.TYPED_ARRAY_SUPPORT=void 0===v.TYPED_ARRAY_SUPPORT||v.TYPED_ARRAY_SUPPORT,B.poolSize=8192,B._augment=function(t){return t.__proto__=B.prototype,t},B.from=function(t,e,n){return I(null,t,e,n)},B.TYPED_ARRAY_SUPPORT&&(B.prototype.__proto__=Uint8Array.prototype,B.__proto__=Uint8Array),B.alloc=function(t,e,n){return U(null,t,e,n)},B.allocUnsafe=function(t){return D(null,t)},B.allocUnsafeSlow=function(t){return D(null,t)},B.isBuffer=Lt,B.compare=function(t,e){if(!G(t)||!G(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},B.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},B.concat=function(t,e){if(!j(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return B.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=B.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!G(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},B.byteLength=J,B.prototype._isBuffer=!0,B.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)$(this,e,e+1);return this},B.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)$(this,e,e+3),$(this,e+1,e+2);return this},B.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)$(this,e,e+7),$(this,e+1,e+6),$(this,e+2,e+5),$(this,e+3,e+4);return this},B.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?st(this,0,t):H.apply(this,arguments)},B.prototype.equals=function(t){if(!G(t))throw new TypeError("Argument must be a Buffer");return this===t||0===B.compare(this,t)},B.prototype.inspect=function(){var t="",e=C;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},B.prototype.compare=function(t,e,n,r,i){if(!G(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(r,i),c=t.slice(e,n),l=0;l<a;++l)if(u[l]!==c[l]){o=u[l],s=c[l];break}return o<s?-1:s<o?1:0},B.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},B.prototype.indexOf=function(t,e,n){return Q(this,t,e,n,!0)},B.prototype.lastIndexOf=function(t,e,n){return Q(this,t,e,n,!1)},B.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return Z(this,t,e,n);case"utf8":case"utf-8":return tt(this,t,e,n);case"ascii":return et(this,t,e,n);case"latin1":case"binary":return nt(this,t,e,n);case"base64":return rt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return it(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},B.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var at=4096;function ut(t){var e=t.length;if(e<=at)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=at));return n}function ct(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function lt(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function ft(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=Et(t[o]);return i}function ht(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function pt(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function dt(t,e,n,r,i,o){if(!G(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function gt(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function yt(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function vt(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function mt(t,e,n,r,i){return i||vt(t,e,n,4),T(t,e,n,r,23,4),n+4}function bt(t,e,n,r,i){return i||vt(t,e,n,8),T(t,e,n,r,52,8),n+8}B.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),B.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=B.prototype;else{var i=e-t;n=new B(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},B.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},B.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},B.prototype.readUInt8=function(t,e){return e||pt(t,1,this.length),this[t]},B.prototype.readUInt16LE=function(t,e){return e||pt(t,2,this.length),this[t]|this[t+1]<<8},B.prototype.readUInt16BE=function(t,e){return e||pt(t,2,this.length),this[t]<<8|this[t+1]},B.prototype.readUInt32LE=function(t,e){return e||pt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},B.prototype.readUInt32BE=function(t,e){return e||pt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},B.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},B.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},B.prototype.readInt8=function(t,e){return e||pt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},B.prototype.readInt16LE=function(t,e){e||pt(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},B.prototype.readInt16BE=function(t,e){e||pt(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},B.prototype.readInt32LE=function(t,e){return e||pt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},B.prototype.readInt32BE=function(t,e){return e||pt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},B.prototype.readFloatLE=function(t,e){return e||pt(t,4,this.length),A(this,t,!0,23,4)},B.prototype.readFloatBE=function(t,e){return e||pt(t,4,this.length),A(this,t,!1,23,4)},B.prototype.readDoubleLE=function(t,e){return e||pt(t,8,this.length),A(this,t,!0,52,8)},B.prototype.readDoubleBE=function(t,e){return e||pt(t,8,this.length),A(this,t,!1,52,8)},B.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||dt(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},B.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||dt(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},B.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,1,255,0),B.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},B.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):gt(this,t,e,!0),e+2},B.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):gt(this,t,e,!1),e+2},B.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,4294967295,0),B.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):yt(this,t,e,!0),e+4},B.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,4294967295,0),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yt(this,t,e,!1),e+4},B.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);dt(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},B.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);dt(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},B.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,1,127,-128),B.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},B.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):gt(this,t,e,!0),e+2},B.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):gt(this,t,e,!1),e+2},B.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,2147483647,-2147483648),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):yt(this,t,e,!0),e+4},B.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yt(this,t,e,!1),e+4},B.prototype.writeFloatLE=function(t,e,n){return mt(this,t,e,!0,n)},B.prototype.writeFloatBE=function(t,e,n){return mt(this,t,e,!1,n)},B.prototype.writeDoubleLE=function(t,e,n){return bt(this,t,e,!0,n)},B.prototype.writeDoubleBE=function(t,e,n){return bt(this,t,e,!1,n)},B.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!B.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},B.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!B.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=G(t)?t:kt(new B(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var wt=/[^+\/0-9A-Za-z-_]/g;function _t(t){if((t=St(t).replace(wt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function St(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Et(t){return t<16?"0"+t.toString(16):t.toString(16)}function kt(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Rt(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function Ot(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}function xt(t){return k(_t(t))}function At(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Tt(t){return t!=t}function Lt(t){return null!=t&&(!!t._isBuffer||jt(t)||Ct(t))}function jt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function Ct(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&jt(t.slice(0,0))}function Pt(){throw new Error("setTimeout has not been defined")}function Mt(){throw new Error("clearTimeout has not been defined")}var Bt=Pt,It=Mt;function Nt(t){if(Bt===setTimeout)return setTimeout(t,0);if((Bt===Pt||!Bt)&&setTimeout)return Bt=setTimeout,setTimeout(t,0);try{return Bt(t,0)}catch(e){try{return Bt.call(null,t,0)}catch(e){return Bt.call(this,t,0)}}}function Ut(t){if(It===clearTimeout)return clearTimeout(t);if((It===Mt||!It)&&clearTimeout)return It=clearTimeout,clearTimeout(t);try{return It(t)}catch(e){try{return It.call(null,t)}catch(e){return It.call(this,t)}}}"function"==typeof v.setTimeout&&(Bt=setTimeout),"function"==typeof v.clearTimeout&&(It=clearTimeout);var Dt,Ft=[],qt=!1,Yt=-1;function zt(){qt&&Dt&&(qt=!1,Dt.length?Ft=Dt.concat(Ft):Yt=-1,Ft.length&&Vt())}function Vt(){if(!qt){var t=Nt(zt);qt=!0;for(var e=Ft.length;e;){for(Dt=Ft,Ft=[];++Yt<e;)Dt&&Dt[Yt].run();Yt=-1,e=Ft.length}Dt=null,qt=!1,Ut(t)}}function Wt(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Ft.push(new Gt(t,e)),1!==Ft.length||qt||Nt(Vt)}function Gt(t,e){this.fun=t,this.array=e}Gt.prototype.run=function(){this.fun.apply(null,this.array)};var Jt=v.performance||{};Jt.now||Jt.mozNow||Jt.msNow||Jt.oNow||Jt.webkitNow;var Ht="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},$t=/%[sdj%]/g;function Xt(t){if(!ge(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(ee(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(t).replace($t,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(V){return"[Circular]"}default:return t}})),s=r[n];n<i;s=r[++n])pe(s)||!me(s)?o+=" "+s:o+=" "+ee(s);return o}function Qt(t,e){if(ye(v.process))return function(){return Qt(t,e).apply(this,arguments)};var n=!1;function r(){return n||(console.error(e),n=!0),t.apply(this,arguments)}return r}var Kt,Zt={};function te(t){if(ye(Kt)&&(Kt=""),t=t.toUpperCase(),!Zt[t])if(new RegExp("\\b"+t+"\\b","i").test(Kt)){var e=0;Zt[t]=function(){var n=Xt.apply(null,arguments);console.error("%s %d: %s",t,e,n)}}else Zt[t]=function(){};return Zt[t]}function ee(t,e){var n={seen:[],stylize:re};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),he(e)?n.showHidden=e:e&&Ee(n,e),ye(n.showHidden)&&(n.showHidden=!1),ye(n.depth)&&(n.depth=2),ye(n.colors)&&(n.colors=!1),ye(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ne),oe(n,t,n.depth)}function ne(t,e){var n=ee.styles[e];return n?"["+ee.colors[n][0]+"m"+t+"["+ee.colors[n][1]+"m":t}function re(t,e){return t}function ie(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}function oe(t,e,n){if(t.customInspect&&e&&_e(e.inspect)&&e.inspect!==ee&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return ge(r)||(r=oe(t,r,n)),r}var i=se(t,e);if(i)return i;var o=Object.keys(e),s=ie(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),we(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ae(e);if(0===o.length){if(_e(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(ve(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(be(e))return t.stylize(Date.prototype.toString.call(e),"date");if(we(e))return ae(e)}var u,c="",l=!1,f=["{","}"];return fe(e)&&(l=!0,f=["[","]"]),_e(e)&&(c=" [Function"+(e.name?": "+e.name:"")+"]"),ve(e)&&(c=" "+RegExp.prototype.toString.call(e)),be(e)&&(c=" "+Date.prototype.toUTCString.call(e)),we(e)&&(c=" "+ae(e)),0!==o.length||l&&0!=e.length?n<0?ve(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),u=l?ue(t,e,n,s,o):o.map((function(r){return ce(t,e,n,s,r,l)})),t.seen.pop(),le(u,c,f)):f[0]+c+f[1]}function se(t,e){if(ye(e))return t.stylize("undefined","undefined");if(ge(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return de(e)?t.stylize(""+e,"number"):he(e)?t.stylize(""+e,"boolean"):pe(e)?t.stylize("null","null"):void 0}function ae(t){return"["+Error.prototype.toString.call(t)+"]"}function ue(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)ke(e,String(s))?o.push(ce(t,e,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(ce(t,e,n,r,i,!0))})),o}function ce(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),ke(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=pe(n)?oe(t,u.value,null):oe(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),ye(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function le(t,e,n){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function fe(t){return Array.isArray(t)}function he(t){return"boolean"==typeof t}function pe(t){return null===t}function de(t){return"number"==typeof t}function ge(t){return"string"==typeof t}function ye(t){return void 0===t}function ve(t){return me(t)&&"[object RegExp]"===Se(t)}function me(t){return"object"===w(t)&&null!==t}function be(t){return me(t)&&"[object Date]"===Se(t)}function we(t){return me(t)&&("[object Error]"===Se(t)||t instanceof Error)}function _e(t){return"function"==typeof t}function Se(t){return Object.prototype.toString.call(t)}function Ee(t,e){if(!e||!me(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}function ke(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Re(){this.head=null,this.tail=null,this.length=0}ee.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ee.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Re.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},Re.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},Re.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},Re.prototype.clear=function(){this.head=this.tail=null,this.length=0},Re.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},Re.prototype.concat=function(t){if(0===this.length)return B.alloc(0);if(1===this.length)return this.head.data;for(var e=B.allocUnsafe(t>>>0),n=this.head,r=0;n;)n.data.copy(e,r),r+=n.data.length,n=n.next;return e};var Oe=B.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function xe(t){if(t&&!Oe(t))throw new Error("Unknown encoding: "+t)}function Ae(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),xe(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Le;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=je;break;default:return void(this.write=Te)}this.charBuffer=new B(6),this.charReceived=0,this.charLength=0}function Te(t){return t.toString(this.encoding)}function Le(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function je(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}Ae.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(t=t.slice(n,t.length),!((r=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r,i=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),i=(e+=t.toString(this.encoding,0,i)).length-1,(r=e.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},Ae.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},Ae.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e},Ie.ReadableState=Be;var Ce=te("stream");function Pe(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function Me(t,e){return t.listeners(e).length}function Be(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof Cn&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Re,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Ae(t.encoding),this.encoding=t.encoding)}function Ie(t){if(!(this instanceof Ie))return new Ie(t);this._readableState=new Be(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),r.call(this)}function Ne(t,e,n,r,i){var o=Ye(e,n);if(o)t.emit("error",o);else if(null===n)e.reading=!1,ze(t,e);else if(e.objectMode||n&&n.length>0)if(e.ended&&!i){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else{var u;!e.decoder||i||r||(n=e.decoder.write(n),u=!e.objectMode&&0===n.length),i||(e.reading=!1),u||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&Ve(t))),Ge(t,e)}else i||(e.reading=!1);return Ue(e)}function Ue(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}Ht(Ie,r),Ie.prototype.push=function(t,e){var n=this._readableState;return n.objectMode||"string"!=typeof t||(e=e||n.defaultEncoding)!==n.encoding&&(t=B.from(t,e),e=""),Ne(this,n,t,e,!1)},Ie.prototype.unshift=function(t){return Ne(this,this._readableState,t,"",!0)},Ie.prototype.isPaused=function(){return!1===this._readableState.flowing},Ie.prototype.setEncoding=function(t){return this._readableState.decoder=new Ae(t),this._readableState.encoding=t,this};var De=8388608;function Fe(t){return t>=De?t=De:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qe(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Fe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Ye(t,e){var n=null;return Lt(e)||"string"==typeof e||null==e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function ze(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,Ve(t)}}function Ve(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ce("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Wt(We,t):We(t))}function We(t){Ce("emit readable"),t.emit("readable"),Ke(t)}function Ge(t,e){e.readingMore||(e.readingMore=!0,Wt(Je,t,e))}function Je(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ce("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function He(t){return function(){var e=t._readableState;Ce("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Ke(t))}}function $e(t){Ce("readable nexttick read 0"),t.read(0)}function Xe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Wt(Qe,t,e))}function Qe(t,e){e.reading||(Ce("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Ke(t),e.flowing&&!e.reading&&t.read(0)}function Ke(t){var e=t._readableState;for(Ce("flow",e.flowing);e.flowing&&null!==t.read(););}function Ze(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=tn(t,e.buffer,e.decoder),n);var n}function tn(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?en(t,e):nn(t,e),r}function en(t,e){var n=e.head,r=1,i=n.data;for(t-=i.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0==(t-=s)){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}function nn(t,e){var n=B.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0==(t-=s)){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}function rn(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Wt(on,e,t))}function on(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function sn(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}function an(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function un(){}function cn(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function ln(t,e){Object.defineProperty(this,"buffer",{get:Qt((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof Cn&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===t.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){bn(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new xn(this)}function fn(t){if(!(this instanceof fn||this instanceof Cn))return new fn(t);this._writableState=new ln(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),r.call(this)}function hn(t,e){var n=new Error("write after end");t.emit("error",n),Wt(e,n)}function pn(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):B.isBuffer(n)||"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),Wt(r,o),i=!1),i}function dn(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=B.from(e,n)),e}function gn(t,e,n,r,i){n=dn(e,n,r),B.isBuffer(n)&&(r="buffer");var o=e.objectMode?1:n.length;e.length+=o;var s=e.length<e.highWaterMark;if(s||(e.needDrain=!0),e.writing||e.corked){var a=e.lastBufferedRequest;e.lastBufferedRequest=new cn(n,r,i),a?a.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else yn(t,e,!1,o,n,r,i);return s}function yn(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function vn(t,e,n,r,i){--e.pendingcb,n?Wt(i,r):i(r),t._writableState.errorEmitted=!0,t.emit("error",r)}function mn(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function bn(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(mn(n),e)vn(t,n,r,e,i);else{var o=En(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||Sn(t,n),r?Wt(wn,t,n,o,i):wn(t,n,o,i)}}function wn(t,e,n,r){n||_n(t,e),e.pendingcb--,r(),Rn(t,e)}function _n(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Sn(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0;n;)i[s]=n,n=n.next,s+=1;yn(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new xn(e)}else{for(;n;){var a=n.chunk,u=n.encoding,c=n.callback;if(yn(t,e,!1,e.objectMode?1:a.length,a,u,c),n=n.next,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=n,e.bufferProcessing=!1}function En(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function kn(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function Rn(t,e){var n=En(e);return n&&(0===e.pendingcb?(kn(t,e),e.finished=!0,t.emit("finish")):kn(t,e)),n}function On(t,e,n){e.ending=!0,Rn(t,e),n&&(e.finished?Wt(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function xn(t){var e=this;this.next=null,this.entry=null,this.finish=function(n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}Ie.prototype.read=function(t){Ce("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ce("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?rn(this):Ve(this),null;if(0===(t=qe(t,e))&&e.ended)return 0===e.length&&rn(this),null;var r,i=e.needReadable;return Ce("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&Ce("length less than watermark",i=!0),e.ended||e.reading?Ce("reading or ended",i=!1):i&&(Ce("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=qe(n,e))),null===(r=t>0?Ze(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&rn(this)),null!==r&&this.emit("data",r),r},Ie.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Ie.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,Ce("pipe count=%d opts=%j",r.pipesCount,e);var i=e&&!1===e.end?c:s;function o(t){Ce("onunpipe"),t===n&&c()}function s(){Ce("onend"),t.end()}r.endEmitted?Wt(i):n.once("end",i),t.on("unpipe",o);var a=He(n);t.on("drain",a);var u=!1;function c(){Ce("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",a),t.removeListener("error",h),t.removeListener("unpipe",o),n.removeListener("end",s),n.removeListener("end",c),n.removeListener("data",f),u=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||a()}var l=!1;function f(e){Ce("ondata"),l=!1,!1!==t.write(e)||l||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==an(r.pipes,t))&&!u&&(Ce("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function h(e){Ce("onerror",e),g(),t.removeListener("error",h),0===Me(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",d),g()}function d(){Ce("onfinish"),t.removeListener("close",p),g()}function g(){Ce("unpipe"),n.unpipe(t)}return n.on("data",f),Pe(t,"error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",n),r.flowing||(Ce("pipe resume"),n.resume()),t},Ie.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=an(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},Ie.prototype.on=function(t,e){var n=r.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Ve(this):Wt($e,this))}return n},Ie.prototype.addListener=Ie.prototype.on,Ie.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ce("resume"),t.flowing=!0,Xe(this,t)),this},Ie.prototype.pause=function(){return Ce("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(Ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Ie.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var i in t.on("end",(function(){if(Ce("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)})),t.on("data",(function(i){Ce("wrapped data"),e.decoder&&(i=e.decoder.write(i)),e.objectMode&&null==i||(e.objectMode||i&&i.length)&&(r.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));return sn(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){Ce("wrapped _read",e),n&&(n=!1,t.resume())},r},Ie._fromList=Ze,fn.WritableState=ln,Ht(fn,r),ln.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},fn.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},fn.prototype.write=function(t,e,n){var r=this._writableState,i=!1;return"function"==typeof e&&(n=e,e=null),B.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=un),r.ended?hn(this,n):pn(this,r,t,n)&&(r.pendingcb++,i=gn(this,r,t,e,n)),i},fn.prototype.cork=function(){this._writableState.corked++},fn.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||Sn(this,t))},fn.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},fn.prototype._write=function(t,e,n){n(new Error("not implemented"))},fn.prototype._writev=null,fn.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||On(this,r,n)},Ht(Cn,Ie);for(var An,Tn=Object.keys(fn.prototype),Ln=0;Ln<Tn.length;Ln++){var jn=Tn[Ln];Cn.prototype[jn]||(Cn.prototype[jn]=fn.prototype[jn])}function Cn(t){if(!(this instanceof Cn))return new Cn(t);Ie.call(this,t),fn.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Pn)}function Pn(){this.allowHalfOpen||this._writableState.ended||Wt(Mn,this)}function Mn(t){t.end()}function Bn(t){this.afterTransform=function(e,n){return In(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function In(t,e,n){var r=t._transformState;r.transforming=!1;var i=r.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&t.push(n),i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function Nn(t){if(!(this instanceof Nn))return new Nn(t);Cn.call(this,t),this._transformState=new Bn(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(t){Un(e,t)})):Un(e)}))}function Un(t,e){if(e)return t.emit("error",e);var n=t._writableState,r=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function Dn(t){if(!(this instanceof Dn))return new Dn(t);Nn.call(this,t)}function Fn(){r.call(this)}function qn(t){return qn="function"==typeof Symbol&&"symbol"===w(Symbol.iterator)?function(t){return w(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":w(t)},qn(t)}function Yn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vn(t,e,n){return e&&zn(t.prototype,e),n&&zn(t,n),t}function Wn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Wn(t,e,n[e])}))}return t}function Jn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$n(t,e)}function Hn(t){return Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hn(t)}function $n(t,e){return $n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$n(t,e)}function Xn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qn(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?Xn(t):e}function Kn(t){return er(t)||nr(t)||ir()}function Zn(t){return tr(t)||nr(t)||rr()}function tr(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function er(t){if(Array.isArray(t))return t}function nr(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function rr(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function ir(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function or(){if(void 0===An){var t=new ArrayBuffer(2),e=new Uint8Array(t),n=new Uint16Array(t);if(e[0]=1,e[1]=2,258===n[0])An="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");An="LE"}}return An}function sr(){return void 0!==v.location?v.location.hostname:""}function ar(){return[]}function ur(){return 0}function cr(){return Number.MAX_VALUE}function lr(){return Number.MAX_VALUE}function fr(){return[]}function hr(){return"Browser"}function pr(){return void 0!==v.navigator?v.navigator.appVersion:""}function dr(){}function gr(){}function yr(){return"/tmp"}Ht(Nn,Cn),Nn.prototype.push=function(t,e){return this._transformState.needTransform=!1,Cn.prototype.push.call(this,t,e)},Nn.prototype._transform=function(t,e,n){throw new Error("Not implemented")},Nn.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Nn.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Ht(Dn,Nn),Dn.prototype._transform=function(t,e,n){n(null,t)},Ht(Fn,r),Fn.Readable=Ie,Fn.Writable=fn,Fn.Duplex=Cn,Fn.Transform=Nn,Fn.PassThrough=Dn,Fn.Stream=Fn,Fn.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===r.listenerCount(this,"error"))throw t}function l(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",c),t.on("error",c),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t};var vr={EOL:"\n",tmpdir:yr,tmpDir:yr,networkInterfaces:dr,getNetworkInterfaces:gr,release:pr,type:hr,cpus:fr,totalmem:lr,freemem:cr,uptime:ur,loadavg:ar,hostname:sr,endianness:or},mr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==X?X:"undefined"!=typeof self?self:{},br="Expected a function",wr="__lodash_hash_undefined__",_r=1/0,Sr="[object Function]",Er="[object GeneratorFunction]",kr="[object Symbol]",Rr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/,xr=/^\./,Ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tr=/[\\^$.*+?()[\]{}|]/g,Lr=/\\(\\)?/g,jr=/^\[object .+?Constructor\]$/,Cr="object"==w(mr)&&mr&&mr.Object===Object&&mr,Pr="object"==("undefined"==typeof self?"undefined":w(self))&&self&&self.Object===Object&&self,Mr=Cr||Pr||Function("return this")();function Br(t,e){return null==t?void 0:t[e]}function Ir(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}var Nr,Ur=Array.prototype,Dr=Function.prototype,Fr=Object.prototype,qr=Mr["__core-js_shared__"],Yr=(Nr=/[^.]+$/.exec(qr&&qr.keys&&qr.keys.IE_PROTO||""))?"Symbol(src)_1."+Nr:"",zr=Dr.toString,Vr=Fr.hasOwnProperty,Wr=Fr.toString,Gr=RegExp("^"+zr.call(Vr).replace(Tr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jr=Mr.Symbol,Hr=Ur.splice,$r=Ei(Mr,"Map"),Xr=Ei(Object,"create"),Qr=Jr?Jr.prototype:void 0,Kr=Qr?Qr.toString:void 0;function Zr(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ti(){this.__data__=Xr?Xr(null):{}}function ei(t){return this.has(t)&&delete this.__data__[t]}function ni(t){var e=this.__data__;if(Xr){var n=e[t];return n===wr?void 0:n}return Vr.call(e,t)?e[t]:void 0}function ri(t){var e=this.__data__;return Xr?void 0!==e[t]:Vr.call(e,t)}function ii(t,e){return this.__data__[t]=Xr&&void 0===e?wr:e,this}function oi(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function si(){this.__data__=[]}function ai(t){var e=this.__data__,n=vi(e,t);return!(n<0||(n==e.length-1?e.pop():Hr.call(e,n,1),0))}function ui(t){var e=this.__data__,n=vi(e,t);return n<0?void 0:e[n][1]}function ci(t){return vi(this.__data__,t)>-1}function li(t,e){var n=this.__data__,r=vi(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function fi(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function hi(){this.__data__={hash:new Zr,map:new($r||oi),string:new Zr}}function pi(t){return Si(this,t).delete(t)}function di(t){return Si(this,t).get(t)}function gi(t){return Si(this,t).has(t)}function yi(t,e){return Si(this,t).set(t,e),this}function vi(t,e){for(var n=t.length;n--;)if(ji(t[n][0],e))return n;return-1}function mi(t,e){for(var n=0,r=(e=ki(e,t)?[e]:_i(e)).length;null!=t&&n<r;)t=t[Ai(e[n++])];return n&&n==r?t:void 0}function bi(t){return!(!Mi(t)||Oi(t))&&(Pi(t)||Ir(t)?Gr:jr).test(Ti(t))}function wi(t){if("string"==typeof t)return t;if(Ii(t))return Kr?Kr.call(t):"";var e=t+"";return"0"==e&&1/t==-_r?"-0":e}function _i(t){return Ci(t)?t:xi(t)}function Si(t,e){var n=t.__data__;return Ri(e)?n["string"==typeof e?"string":"hash"]:n.map}function Ei(t,e){var n=Br(t,e);return bi(n)?n:void 0}function ki(t,e){if(Ci(t))return!1;var n=w(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ii(t))||Or.test(t)||!Rr.test(t)||null!=e&&t in Object(e)}function Ri(t){var e=w(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Oi(t){return!!Yr&&Yr in t}Zr.prototype.clear=ti,Zr.prototype.delete=ei,Zr.prototype.get=ni,Zr.prototype.has=ri,Zr.prototype.set=ii,oi.prototype.clear=si,oi.prototype.delete=ai,oi.prototype.get=ui,oi.prototype.has=ci,oi.prototype.set=li,fi.prototype.clear=hi,fi.prototype.delete=pi,fi.prototype.get=di,fi.prototype.has=gi,fi.prototype.set=yi;var xi=Li((function(t){t=Ni(t);var e=[];return xr.test(t)&&e.push(""),t.replace(Ar,(function(t,n,r,i){e.push(r?i.replace(Lr,"$1"):n||t)})),e}));function Ai(t){if("string"==typeof t||Ii(t))return t;var e=t+"";return"0"==e&&1/t==-_r?"-0":e}function Ti(t){if(null!=t){try{return zr.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Li(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(br);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(Li.Cache||fi),n}function ji(t,e){return t===e||t!=t&&e!=e}Li.Cache=fi;var Ci=Array.isArray;function Pi(t){var e=Mi(t)?Wr.call(t):"";return e==Sr||e==Er}function Mi(t){var e=w(t);return!!t&&("object"==e||"function"==e)}function Bi(t){return!!t&&"object"==w(t)}function Ii(t){return"symbol"==w(t)||Bi(t)&&Wr.call(t)==kr}function Ni(t){return null==t?"":wi(t)}function Ui(t,e,n){var r=null==t?void 0:mi(t,e);return void 0===r?n:r}var Di=Ui;function Fi(t,e,n){return void 0===t[e]?n:t[e]}function qi(t,e,n){var r=Array.isArray(e)?e:e.split("."),i=Kn(r),o=i[0],s=i.slice(1);return Gn({},t,Wn({},o,r.length>1?qi(t[o]||{},s,n):n))}function Yi(t,e){var n=Array.isArray(e)?e:e.split("."),r=Kn(n),i=r[0],o=r.slice(1);return"object"!==qn(t[i])?t:1===n.length?Object.keys(t).filter((function(t){return t!==i})).reduce((function(e,n){return Object.assign(e,Wn({},n,t[n]))}),{}):Object.keys(t).reduce((function(e,n){return Gn({},e,Wn({},n,n!==i?t[n]:Yi(t[i],o)))}),{})}function zi(t,e){try{return t.push.apply(t,Zn(e)),t}catch(n){return t.concat(e)}}function Vi(t,e){var n=!0;return t.reduce((function(t,r){return null==r&&(r=""),n?(n=!1,"".concat(r)):"".concat(t).concat(e).concat(r)}),"")}var Wi={getProp:Fi,setProp:qi,unsetProp:Yi,fastJoin:Vi,flattenReducer:zi},Gi=Wi.getProp,Ji=Wi.fastJoin,Hi=Wi.flattenReducer,$i=function(){function t(e){Yn(this,t),this.opts=this.preprocessOpts(e)}return Vn(t,[{key:"preprocessOpts",value:function(t){var e=Object.assign({},t);return e.transforms=Array.isArray(e.transforms)?e.transforms:e.transforms?[e.transforms]:[],e.delimiter=e.delimiter||",",e.eol=e.eol||vr.EOL,e.quote="string"==typeof e.quote?e.quote:'"',e.escapedQuote="string"==typeof e.escapedQuote?e.escapedQuote:"".concat(e.quote).concat(e.quote),e.header=!1!==e.header,e.includeEmptyRows=e.includeEmptyRows||!1,e.withBOM=e.withBOM||!1,e}},{key:"preprocessFieldsInfo",value:function(t){var e=this;return t.map((function(t){if("string"==typeof t)return{label:t,value:t.includes(".")||t.includes("[")?function(n){return Di(n,t,e.opts.defaultValue)}:function(n){return Gi(n,t,e.opts.defaultValue)}};if("object"===qn(t)){var n="default"in t?t.default:e.opts.defaultValue;if("string"==typeof t.value)return{label:t.label||t.value,value:t.value.includes(".")||t.value.includes("[")?function(e){return Di(e,t.value,n)}:function(e){return Gi(e,t.value,n)}};if("function"==typeof t.value){var r=t.label||t.value.name||"",i={label:r,default:n};return{label:r,value:function(e){var r=t.value(e,i);return null==r?n:r}}}}throw new Error("Invalid field info option. "+JSON.stringify(t))}))}},{key:"getHeader",value:function(){var t=this;return Ji(this.opts.fields.map((function(e){return t.processValue(e.label)})),this.opts.delimiter)}},{key:"preprocessRow",value:function(t){return this.opts.transforms.reduce((function(t,e){return t.map((function(t){return e(t)})).reduce(Hi,[])}),[t])}},{key:"processRow",value:function(t){var e=this;if(t){var n=this.opts.fields.map((function(n){return e.processCell(t,n)}));if(this.opts.includeEmptyRows||!n.every((function(t){return void 0===t})))return Ji(n,this.opts.delimiter)}}},{key:"processCell",value:function(t,e){return this.processValue(e.value(t))}},{key:"processValue",value:function(t){if(null!=t){var e=qn(t);if("boolean"!==e&&"number"!==e&&"string"!==e){if(void 0===(t=JSON.stringify(t)))return;'"'===t[0]&&(t=t.replace(/^"(.+)"$/,"$1"))}return"string"==typeof t&&(this.opts.excelStrings?(t.includes(this.opts.quote)&&(t=t.replace(new RegExp(this.opts.quote,"g"),"".concat(this.opts.escapedQuote).concat(this.opts.escapedQuote))),t='"=""'.concat(t,'"""')):(t.includes(this.opts.quote)&&(t=t.replace(new RegExp(this.opts.quote,"g"),this.opts.escapedQuote)),t="".concat(this.opts.quote).concat(t).concat(this.opts.quote))),t}}}]),t}(),Xi=Wi.fastJoin,Qi=Wi.flattenReducer,Ki=function(t){function e(t){var n;return Yn(this,e),(n=Qn(this,Hn(e).call(this,t))).opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields)),n}return Jn(e,t),Vn(e,[{key:"parse",value:function(t){var e=this.preprocessData(t);this.opts.fields||(this.opts.fields=e.reduce((function(t,e){return Object.keys(e).forEach((function(e){t.includes(e)||t.push(e)})),t}),[]),this.opts.fields=this.preprocessFieldsInfo(this.opts.fields));var n=this.opts.header?this.getHeader():"",r=this.processData(e);return(this.opts.withBOM?"\ufeff":"")+n+(n&&r?this.opts.eol:"")+r}},{key:"preprocessData",value:function(t){var e=this,n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(0===n.length||"object"!==qn(n[0])))throw new Error('Data should not be empty or the "fields" option should be included');return 0===this.opts.transforms.length?n:n.map((function(t){return e.preprocessRow(t)})).reduce(Qi,[])}},{key:"processData",value:function(t){var e=this;return Xi(t.map((function(t){return e.processRow(t)})).filter((function(t){return t})),this.opts.eol)}}]),e}($i),Zi={},to=Zi.LEFT_BRACE=1,eo=Zi.RIGHT_BRACE=2,no=Zi.LEFT_BRACKET=3,ro=Zi.RIGHT_BRACKET=4,io=Zi.COLON=5,oo=Zi.COMMA=6,so=Zi.TRUE=7,ao=Zi.FALSE=8,uo=Zi.NULL=9,co=Zi.STRING=10,lo=Zi.NUMBER=11,fo=Zi.START=17,ho=Zi.STOP=18,po=Zi.TRUE1=33,go=Zi.TRUE2=34,yo=Zi.TRUE3=35,vo=Zi.FALSE1=49,mo=Zi.FALSE2=50,bo=Zi.FALSE3=51,wo=Zi.FALSE4=52,_o=Zi.NULL1=65,So=Zi.NULL2=66,Eo=Zi.NULL3=67,ko=Zi.NUMBER1=81,Ro=Zi.NUMBER3=83,Oo=Zi.STRING1=97,xo=Zi.STRING2=98,Ao=Zi.STRING3=99,To=Zi.STRING4=100,Lo=Zi.STRING5=101,jo=Zi.STRING6=102,Co=Zi.VALUE=113,Po=Zi.KEY=114,Mo=Zi.OBJECT=129,Bo=Zi.ARRAY=130,Io="\\".charCodeAt(0),No="/".charCodeAt(0),Uo="\b".charCodeAt(0),Do="\f".charCodeAt(0),Fo="\n".charCodeAt(0),qo="\r".charCodeAt(0),Yo="\t".charCodeAt(0),zo=65536;function Vo(){this.tState=fo,this.value=void 0,this.string=void 0,this.stringBuffer=B.alloc?B.alloc(zo):new B(zo),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=Co,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new B(2),3:new B(3),4:new B(4)},this.offset=-1}Vo.toknam=function(t){for(var e=Object.keys(Zi),n=0,r=e.length;n<r;n++){var i=e[n];if(Zi[i]===t)return i}return t&&"0x"+t.toString(16)};var Wo=Vo.prototype;Wo.onError=function(t){throw t},Wo.charError=function(t,e){this.tState=ho,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(t[e]))+" at position "+e+" in state "+Vo.toknam(this.tState)))},Wo.appendStringChar=function(t){this.stringBufferOffset>=zo&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t},Wo.appendStringBuf=function(t,e,n){var r=t.length;"number"==typeof e&&(r="number"==typeof n?n<0?t.length-e+n:n-e:t.length-e),r<0&&(r=0),this.stringBufferOffset+r>zo&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,n),this.stringBufferOffset+=r},Wo.write=function(t){var e;"string"==typeof t&&(t=new B(t));for(var n=0,r=t.length;n<r;n++)if(this.tState===fo){if(e=t[n],this.offset++,123===e)this.onToken(to,"{");else if(125===e)this.onToken(eo,"}");else if(91===e)this.onToken(no,"[");else if(93===e)this.onToken(ro,"]");else if(58===e)this.onToken(io,":");else if(44===e)this.onToken(oo,",");else if(116===e)this.tState=po;else if(102===e)this.tState=vo;else if(110===e)this.tState=_o;else if(34===e)this.string="",this.stringBufferOffset=0,this.tState=Oo;else if(45===e)this.string="-",this.tState=ko;else if(e>=48&&e<64)this.string=String.fromCharCode(e),this.tState=Ro;else if(32!==e&&9!==e&&10!==e&&13!==e)return this.charError(t,n)}else if(this.tState===Oo)if(e=t[n],this.bytes_remaining>0){for(var i=0;i<this.bytes_remaining;i++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+i]=t[i];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,n=n+i-1}else if(0===this.bytes_remaining&&e>=128){if(e<=193||e>244)return this.onError(new Error("Invalid UTF-8 character at position "+n+" in state "+Vo.toknam(this.tState)));if(e>=194&&e<=223&&(this.bytes_in_sequence=2),e>=224&&e<=239&&(this.bytes_in_sequence=3),e>=240&&e<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+n>t.length){for(var o=0;o<=t.length-1-n;o++)this.temp_buffs[this.bytes_in_sequence][o]=t[n+o];this.bytes_remaining=n+this.bytes_in_sequence-t.length,n=t.length-1}else this.appendStringBuf(t,n,n+this.bytes_in_sequence),n=n+this.bytes_in_sequence-1}else if(34===e)this.tState=fo,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(co,this.string),this.offset+=B.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===e)this.tState=xo;else{if(!(e>=32))return this.charError(t,n);this.appendStringChar(e)}else if(this.tState===xo)if(34===(e=t[n]))this.appendStringChar(e),this.tState=Oo;else if(92===e)this.appendStringChar(Io),this.tState=Oo;else if(47===e)this.appendStringChar(No),this.tState=Oo;else if(98===e)this.appendStringChar(Uo),this.tState=Oo;else if(102===e)this.appendStringChar(Do),this.tState=Oo;else if(110===e)this.appendStringChar(Fo),this.tState=Oo;else if(114===e)this.appendStringChar(qo),this.tState=Oo;else if(116===e)this.appendStringChar(Yo),this.tState=Oo;else{if(117!==e)return this.charError(t,n);this.unicode="",this.tState=Ao}else if(this.tState===Ao||this.tState===To||this.tState===Lo||this.tState===jo){if(!((e=t[n])>=48&&e<64||e>64&&e<=70||e>96&&e<=102))return this.charError(t,n);if(this.unicode+=String.fromCharCode(e),this.tState++===jo){var s=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&s>=56320&&s<57344?(this.appendStringBuf(new B(String.fromCharCode(this.highSurrogate,s))),this.highSurrogate=void 0):void 0===this.highSurrogate&&s>=55296&&s<56320?this.highSurrogate=s:(void 0!==this.highSurrogate&&(this.appendStringBuf(new B(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new B(String.fromCharCode(s)))),this.tState=Oo}}else if(this.tState===ko||this.tState===Ro)switch(e=t[n]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(e),this.tState=Ro;break;default:this.tState=fo;var a=Number(this.string);if(isNaN(a))return this.charError(t,n);this.string.match(/[0-9]+/)==this.string&&a.toString()!=this.string?this.onToken(co,this.string):this.onToken(lo,a),this.offset+=this.string.length-1,this.string=void 0,n--}else if(this.tState===po){if(114!==t[n])return this.charError(t,n);this.tState=go}else if(this.tState===go){if(117!==t[n])return this.charError(t,n);this.tState=yo}else if(this.tState===yo){if(101!==t[n])return this.charError(t,n);this.tState=fo,this.onToken(so,!0),this.offset+=3}else if(this.tState===vo){if(97!==t[n])return this.charError(t,n);this.tState=mo}else if(this.tState===mo){if(108!==t[n])return this.charError(t,n);this.tState=bo}else if(this.tState===bo){if(115!==t[n])return this.charError(t,n);this.tState=wo}else if(this.tState===wo){if(101!==t[n])return this.charError(t,n);this.tState=fo,this.onToken(ao,!1),this.offset+=4}else if(this.tState===_o){if(117!==t[n])return this.charError(t,n);this.tState=So}else if(this.tState===So){if(108!==t[n])return this.charError(t,n);this.tState=Eo}else if(this.tState===Eo){if(108!==t[n])return this.charError(t,n);this.tState=fo,this.onToken(uo,null),this.offset+=3}},Wo.onToken=function(t,e){},Wo.parseError=function(t,e){this.tState=ho,this.onError(new Error("Unexpected "+Vo.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+Vo.toknam(this.state)))},Wo.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Wo.pop=function(){var t=this.value,e=this.stack.pop();this.value=e.value,this.key=e.key,this.mode=e.mode,this.emit(t),this.mode||(this.state=Co)},Wo.emit=function(t){this.mode&&(this.state=oo),this.onValue(t)},Wo.onValue=function(t){},Wo.onToken=function(t,e){if(this.state===Co)if(t===co||t===lo||t===so||t===ao||t===uo)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===to)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Po,this.mode=Mo;else if(t===no)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Bo,this.state=Co;else if(t===eo){if(this.mode!==Mo)return this.parseError(t,e);this.pop()}else{if(t!==ro)return this.parseError(t,e);if(this.mode!==Bo)return this.parseError(t,e);this.pop()}else if(this.state===Po)if(t===co)this.key=e,this.state=io;else{if(t!==eo)return this.parseError(t,e);this.pop()}else if(this.state===io){if(t!==io)return this.parseError(t,e);this.state=Co}else{if(this.state!==oo)return this.parseError(t,e);if(t===oo)this.mode===Bo?(this.key++,this.state=Co):this.mode===Mo&&(this.state=Po);else{if(!(t===ro&&this.mode===Bo||t===eo&&this.mode===Mo))return this.parseError(t,e);this.pop()}}},Vo.C=Zi;var Go=Vo,Jo=function(t){function e(t,n){var r;return Yn(this,e),r=Qn(this,Hn(e).call(this,n)),Object.getOwnPropertyNames($i.prototype).forEach((function(t){return r[t]=$i.prototype[t]})),r.opts=r.preprocessOpts(t),r._data="",r._hasWritten=!1,r._readableState.objectMode?r.initObjectModeParse():r.opts.ndjson?r.initNDJSONParse():r.initJSONParser(),r.opts.withBOM&&r.push("\ufeff"),r.opts.fields&&(r.opts.fields=r.preprocessFieldsInfo(r.opts.fields),r.pushHeader()),r}return Jn(e,t),Vn(e,[{key:"initObjectModeParse",value:function(){var t=this;this.parser={write:function(e){t.pushLine(e)},getPendingData:function(){}}}},{key:"initNDJSONParse",value:function(){var t=this;this.parser={_data:"",write:function(e){this._data+=e.toString();var n=this._data.split("\n").map((function(t){return t.trim()})).filter((function(t){return""!==t})),r=!1;n.forEach((function(e,i){try{t.pushLine(JSON.parse(e))}catch(o){i===n.length-1?r=!0:(o.message="Invalid JSON (".concat(e,")"),t.emit("error",o))}})),this._data=r?this._data.slice(this._data.lastIndexOf("\n")):""},getPendingData:function(){return this._data}}}},{key:"initJSONParser",value:function(){var t=this;this.parser=new Go,this.parser.onValue=function(e){this.stack.length===this.depthToEmit&&t.pushLine(e)},this.parser._onToken=this.parser.onToken,this.parser.onToken=function(e,n){t.parser._onToken(e,n),0!==this.stack.length||t.opts.fields||this.mode===Go.C.ARRAY||this.mode===Go.C.OBJECT||this.onError(new Error('Data should not be empty or the "fields" option should be included')),1===this.stack.length&&(void 0===this.depthToEmit&&(this.depthToEmit=this.mode===Go.C.ARRAY?1:0),0!==this.depthToEmit&&1===this.stack.length&&(this.value=void 0))},this.parser.getPendingData=function(){return this.value},this.parser.onError=function(e){e.message.includes("Unexpected")&&(e.message="Invalid JSON (".concat(e.message,")")),t.emit("error",e)}}},{key:"_transform",value:function(t,e,n){this.parser.write(t),n()}},{key:"_flush",value:function(t){this.parser.getPendingData()&&t(new Error("Invalid data received from stdin",this.parser.getPendingData())),t()}},{key:"pushHeader",value:function(){if(this.opts.header){var t=this.getHeader();this.emit("header",t),this.push(t),this._hasWritten=!0}}},{key:"pushLine",value:function(t){var e=this,n=this.preprocessRow(t);this._hasWritten||(this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(Object.keys(n[0])),this.pushHeader()),n.forEach((function(t){var n=e.processRow(t,e.opts);void 0!==n&&(e.emit("line",n),e.push(e._hasWritten?e.opts.eol+n:n),e._hasWritten=!0)}))}}]),e}(Fn.Transform),Ho=Jo,$o=Fn.Transform,Xo=Wi.fastJoin,Qo=function(){function t(e,n){Yn(this,t),this.input=new $o(n),this.input._read=function(){},this.transform=new Ho(e,n),this.processor=this.input.pipe(this.transform)}return Vn(t,[{key:"fromInput",value:function(t){if(this._input)throw new Error("Async parser already has an input.");return this._input=t,this.input=this._input.pipe(this.processor),this}},{key:"throughTransform",value:function(t){if(this._output)throw new Error("Can't add transforms once an output has been added.");return this.processor=this.processor.pipe(t),this}},{key:"toOutput",value:function(t){if(this._output)throw new Error("Async parser already has an output.");return this._output=t,this.processor=this.processor.pipe(t),this}},{key:"promise",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise((function(n,r){if(e){var i=[];t.processor.on("data",(function(t){return i.push(t.toString())})).on("finish",(function(){return n(Xo(i,""))})).on("error",(function(t){return r(t)}))}else t.processor.on("finish",(function(){return n()})).on("error",(function(t){return r(t)}))}))}}]),t}(),Ko=Qo;function Zo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.objects,n=void 0===e||e,r=t.arrays,i=void 0!==r&&r,o=t.separator,s=void 0===o?".":o;function a(t,e,r){return Object.keys(t).forEach((function(o){var u=r?"".concat(r).concat(s).concat(o):o,c=t[o];n&&"object"===qn(c)&&null!==c&&!Array.isArray(c)&&"[object Function]"!==Object.prototype.toString.call(c.toJSON)&&Object.keys(c).length||i&&Array.isArray(c)?a(c,e,u):e[u]=c})),e}return function(t){return a(t,{})}}var ts=Zo,es=Wi.setProp,ns=Wi.unsetProp,rs=Wi.flattenReducer;function is(t,e){return Object.keys(t).reduce((function(n,r){var i=e?"".concat(e,".").concat(r):r,o=t[r];return"object"===qn(o)&&null!==o&&!Array.isArray(o)&&"[object Function]"!==Object.prototype.toString.call(o.toJSON)&&Object.keys(o).length?n=n.concat(is(o,i)):Array.isArray(o)&&(n.push(i),n=n.concat(o.map((function(t){return is(t,i)})).reduce(rs,[]).filter((function(t,e,n){return n.indexOf(t)!==e})))),n}),[])}function os(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.paths,n=void 0===e?void 0:e,r=t.blankOut,i=void 0!==r&&r;function o(t,e){return t.map((function(t){var n=Di(t,e);return Array.isArray(n)?n.length?n.map((function(n,r){return es(i&&r>0?{}:t,e,n)})):ns(t,e):t})).reduce(rs,[])}return n=Array.isArray(n)?n:n?[n]:void 0,function(t){return(n||is(t)).reduce(o,[t])}}var ss=os,as=Fn.Readable,us=Ki,cs=Ko,ls=Ho,fs=function(t,e){return new Ki(e).parse(t)},hs=function(t,e,n){try{t instanceof as||(n=Object.assign({},n,{objectMode:!0}));var r=new Ko(e,n),i=r.promise();return Array.isArray(t)?(t.forEach((function(t){return r.input.push(t)})),r.input.push(null)):t instanceof as?r.fromInput(t):(r.input.push(t),r.input.push(null)),i}catch(o){return Promise.reject(o)}},ps={flatten:ts,unwind:ss},ds={Parser:us,AsyncParser:cs,Transform:ls,parse:fs,parseAsync:hs,transforms:ps};t.AsyncParser=cs,t.Parser=us,t.Transform=ls,t.default=ds,t.parse=fs,t.parseAsync=hs,t.transforms=ps,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,xt.exports);var At=z.div(l||(l=_(["\n padding: ",";\n display: flex;\n background-color: ",";\n box-shadow: ",";\n justify-content: flex-end;\n border-top: 1px solid ",";\n"])),V["--ll-spacing-medium"],V["--ll-color-surface"],V["--ll-shadow-medium"],V["--ll-color-border"]),Tt=z.div(f||(f=_(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),V["--ll-spacing-medium"]),Lt={all:function(){return["profiles"]},list:function(t){return[].concat(y(Lt.all()),[t])}};var jt=function(){var t,e,n,r,i,o,s,a=ht().dataExplorerState,u=K().translations,c=(t={lat:a.location.lat,lng:a.location.lng,enabled:a.scores.checked,include:a.scores.include},e=t.lat,n=t.lng,r=t.include,i=t.enabled,o=Q().client,s={lat:e,lng:n,geographyLevels:["10","30"],locationScoresRounding:!1,include:r},lt(j.list(s),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getScores(s));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!s&&i})),l=c.data,f=c.isFetching,h=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.include,o=t.limit,s=t.radius,a=Q().client,u={lat:e,lng:n,limit:o,radius:s,include:i};return lt(P.list(u),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",a.getPois(u));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!u&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.pois.checked,include:a.pois.include,limit:a.pois.limit,radius:a.pois.radius}),p=h.data,d=h.isFetching,g=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.limit,o=t.radius,s=Q().client,a={lat:e,lng:n,limit:i,radius:o};return lt(C.list(a),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s.getSchools(a));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!a&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.schools.checked,limit:a.pois.limit,radius:a.pois.radius}),y=g.data,m=g.isFetching,w=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.radius,o=Q().client,s={lat:e,lng:n,radius:i};return lt(ft.list(s),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getDemographics(s));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!s&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.demographics.checked,radius:a.demographics.radius}),_=w.data,S=w.isFetching,k=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=Q().client,o={lat:e,lng:n};return lt(Lt.list(o),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.getProfiles(o));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!o&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.profiles.checked}),O=k.data,x=k.isFetching,A=q.exports.useMemo((function(){return E(E(E(E(E({},l&&a.scores.checked&&{scores:l}),p&&a.pois.checked&&{pois:p}),y&&a.schools.checked&&{schools:y}),_&&a.demographics.checked&&{demographics:_}),O&&a.profiles.checked&&{profiles:O})}),[p,l,y,O,_,a]),T=f||d||m||S||x,L=Object.keys(A).length;return G(At,{children:[T&&Y(Tt,{children:Y(Z,{})}),G(tt,{variant:"contained",onClick:function(t){t.preventDefault(),nt.downloadFile({data:JSON.stringify(A),fileName:"local-logic-data",fileType:"json"})},disabled:!Object.keys(A).length||T,children:[u.EXPORT," JSON"]}),Y(et,{spacing:"--ll-spacing-xx-small"}),G(tt,{variant:"contained",onClick:function(t){var e,n,r,i;t.preventDefault(),l&&(e=l.location,n="scores",r=Object.entries(e).map((function(t){var e=R(t,2);return E({score:e[0]},e[1])})),(i=xt.exports.parse(r))&&nt.downloadFile({data:i,fileName:n,fileType:"csv"})),function(){if(p){var t=Object.entries(p).map((function(t){var e=R(t,2),n=e[0];return e[1].map((function(t){return E({poi:n},t)}))})).flat(),e=xt.exports.parse(t);e&&nt.downloadFile({data:e,fileName:"pois",fileType:"csv"})}}(),function(){if(y){var t=Object.entries(y).map((function(t){var e=R(t,2),n=e[0];return e[1].map((function(t){return E({school:n},t)}))})).flat(),e=xt.exports.parse(t);e&&nt.downloadFile({data:e,fileName:"schools",fileType:"csv"})}}(),function(){if(_){var t=Object.entries(_).map((function(t){var e=R(t,2);return E({demographic:e[0]},e[1])})),e=xt.exports.parse(t);e&&nt.downloadFile({data:e,fileName:"demographics",fileType:"csv"})}}(),function(){if(O){var t=[O],e=xt.exports.parse(t,{fields:["id","intro","name","profiles.character","profiles.housing","profiles.services","profiles.transport"]});e&&nt.downloadFile({data:e,fileName:"profiles",fileType:"csv"})}}()},disabled:!L||T,children:[u.EXPORT," CSV (",L,")"]})]})},Ct=z.div(h||(h=_(["\n height: 400px;\n display: flex;\n border: 2px solid ",";\n position: relative;\n border-radius: ",";\n overflow: hidden;\n"])),V["--ll-color-on-background"],V["--ll-border-radius-small"]),Pt=z.div(p||(p=_(["\n position: absolute;\n color: ",";\n z-index: 1;\n padding: "," ",";\n font-family: ",';\n\n &:after {\n content: "";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n background-color: ',";\n opacity: 0.8;\n z-index: -1;\n }\n"])),V["--ll-color-on-background"],V["--ll-spacing-xx-small"],V["--ll-spacing-x-small"],V["--ll-font-family-mono"],V["--ll-color-background"]),Mt=function(){var t,e,n,r,i=q.exports.useRef(),o=R(q.exports.useState(!0),2),s=o[0],a=o[1],u=ht(),c=u.dataExplorerState,l=u.setDataExplorerState,f=F().sdkState,h=R(q.exports.useState(!1),2),p=h[0],d=h[1],g=q.exports.useRef(),y=q.exports.useRef(!1),v=K().translations,m="night"===(null==f||null===(t=f.globalOptions)||void 0===t||null===(e=t.appearance)||void 0===e?void 0:e.theme)?"basic-v2-dark":"600d69cb-288d-445e-9839-3dfe4d76b31a",b={position:"absolute",top:"0",left:"0",height:"100%",width:"100%"};return G("div",{children:[Y(M,{placeholder:v.SEARCH_MAP,renderListAbove:!1,onSearch:function(t){var e;l({location:{lat:t.latitude,lng:t.longitude}}),null==i||null===(e=i.current)||void 0===e||e.flyTo({center:[t.longitude,t.latitude],duration:2e3,essential:!0})}}),Y(et,{vertical:!0,spacing:"--ll-spacing-small"}),G(Ct,{children:[s&&Y(rt,{height:"400px",width:"100%"}),G(B,{ref:i,style:s?E({visibility:"hidden"},b):b,onLoad:function(){return a(!1)},mapLib:I,mapStyle:"https://api.maptiler.com/maps/".concat(m,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),initialViewState:{longitude:null===(n=f.options)||void 0===n?void 0:n.lng,latitude:null===(r=f.options)||void 0===r?void 0:r.lat,zoom:10},onMouseDown:function(t){g.current=setTimeout((function(){y.current||d(!0)}),1e3)},onMouseUp:function(t){p&&l({location:{lat:t.lngLat.lat,lng:t.lngLat.lng}}),clearTimeout(g.current),d(!1)},onDragStart:function(){y.current=!0},onDragEnd:function(){y.current=!1},children:[Y(Pt,{children:G(J,{noMargin:!0,family:"mono",children:["Lat:"," ",Math.round(1e5*c.location.lat)/1e5,", Lng:"," ",Math.round(1e5*c.location.lng)/1e5]})}),Y(N,{showCompass:!0,style:{marginTop:16,marginRight:16}}),Y(U,{marker:E({icon:"pin"},c.location)})]})]})]})},Bt=z.div(d||(d=_(["\n margin: 2px;\n display: inline-block;\n"]))),It=function(){var t=ht(),e=t.dataExplorerState,n=t.setDataExplorerState,r=Object.keys(it).filter((function(t){return Number.isNaN(Number(t))}));return Y(ot,{children:r.map((function(t){var r=e.scores.include.includes(t);return Y(Bt,{children:Y(st.Root,{options:{score:t,scoresData:void 0},children:Y(tt,{size:"small",variant:r?"contained":"outlined",onClick:function(){n(r?{scores:E(E({},e.scores),{},{include:e.scores.include.filter((function(e){return e!==t}))})}:{scores:E(E({},e.scores),{},{include:[].concat(y(e.scores.include),[t])})})},children:Y(st.Title,{options:{isRawText:!0}})})})},t)}))})},Nt=z.div(g||(g=_(["\n margin: 2px;\n display: inline-block;\n"]))),Ut=function(){var t=K().translations,e=ht(),n=e.dataExplorerState,r=e.setDataExplorerState,i=Object.keys(at).filter((function(t){return Number.isNaN(Number(t))}));return G(ot,{children:[i.map((function(t){var e=n.pois.include.includes(t);return Y(Nt,{children:Y(ut.Root,{options:{poi:t},children:Y(tt,{size:"small",variant:e?"contained":"outlined",onClick:function(){r(e?{pois:E(E({},n.pois),{},{include:n.pois.include.filter((function(e){return e!==t}))})}:{pois:E(E({},n.pois),{},{include:[].concat(y(n.pois.include),[t])})})},children:Y(ut.Title,{options:{isRawText:!0}})})})},t)})),Y(ct,{showValue:!0,label:"".concat(t.RADIUS," (m)"),min:100,max:25e3,step:100,value:[n.pois.radius],onValueChange:function(t){r({pois:E(E({},n.pois),{},{radius:t[0]})})}}),Y(ct,{showValue:!0,label:t.LIMIT,min:1,max:30,step:1,value:[n.pois.limit],onValueChange:function(t){r({pois:E(E({},n.pois),{},{limit:t[0]})})}})]})},Dt=function(){var t=K().translations,e=ht(),n=e.dataExplorerState,r=e.setDataExplorerState;return G(ot,{children:[Y(ct,{showValue:!0,label:"".concat(t.RADIUS," (m)"),min:100,max:25e3,step:100,value:[n.schools.radius],onValueChange:function(t){r({schools:E(E({},n.schools),{},{radius:t[0]})})}}),Y(ct,{showValue:!0,label:t.LIMIT,min:1,max:30,step:1,value:[n.schools.limit],onValueChange:function(t){r({schools:E(E({},n.schools),{},{limit:t[0]})})}})]})},Ft=function(){var t=K().translations,e=ht(),n=e.dataExplorerState,r=e.setDataExplorerState;return Y(ct,{showValue:!0,label:"".concat(t.RADIUS," (m)"),min:500,max:5e3,step:100,value:[n.demographics.radius],onValueChange:function(t){r({demographics:E(E({},n.demographics),{},{radius:t[0]})})}})};m("default",(function(){var t=K().translations,e=[{title:t.LOCATION,description:t.LOCATION_TEXT,value:"location",number:1,children:Y(Mt,{})},{title:t.SCORES,description:t.SCORES_TEXT,value:"scores",number:2,children:Y(It,{})},{title:t.POIS,description:t.POIS_TEXT,value:"pois",number:3,children:Y(Ut,{})},{title:t.SCHOOLS,description:t.SCHOOLS_TEXT,value:"schools",number:4,children:Y(Dt,{})},{title:t.DEMOGRAPHICS,description:t.DEMOGRAPHICS_TEXT,value:"demographics",number:5,children:Y(Ft,{})},{title:t.PROFILES,description:t.PROFILES_TEXT,value:"profiles",number:6}];return Y(pt,{children:G(dt,{children:[Y(gt,{type:"single",defaultValue:"location",collapsible:!0,children:e.map((function(t){return Y(Ot,{title:t.title,description:t.description,value:t.value,number:t.number,children:t.children},t.value)}))}),Y(et,{vertical:!0}),Y(jt,{})]})})}))}}}))}();
|
|
@@ -1 +0,0 @@
|
|
|
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,r,n,o,i,a;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={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(P){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=O(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}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 g=Object.getPrototypeOf,m=g&&g(g(E([])));m&&m!==r&&n.call(m,i)&&(y=m);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,r){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)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):r.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 n(){return new r((function(r,n){o(t,e,r,n)}))}return i=i?i.then(n,n):n()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(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 n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.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 j(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(j,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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=v,l(b,"constructor",v),l(v,"constructor",p),p.displayName=l(v,c,"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,c,"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,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,c,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},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)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}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 u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){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"===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 r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(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 v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.128bbb90.js","./useIsMobile-legacy.a1dad04e.js","./keyFactory-legacy.782b8549.js","./useQuery-legacy.6ce02414.js"],(function(t,c){"use strict";var f,d,v,y,g,m,b,w,x,O,j,S,L,E,_,P,C,k;return{setters:[function(t){f=t.R,d=t.r,v=t.ab,y=t.u,g=t.j,m=t.e,b=t.ac,w=t.s,x=t._,O=t.d,j=t.o,S=t.n,L=t.ad,E=t.l,_=t.p},function(t){P=t.u},function(t){C=t.d},function(t){k=t.u}],execute:function(){var c=f.createContext({}),A=function(){return d.exports.useContext(c)},M=function(t){var e,r,n=t.children,o=P(),i=p(d.exports.useState(v[0].value),2),a=i[0],u=i[1],l=y().sdkState,s=p(d.exports.useReducer((function(t,e){return h(h({},t),e)}),{location:{lat:(null===(e=l.options)||void 0===e?void 0:e.lat)||43.661337,lng:(null===(r=l.options)||void 0===r?void 0:r.lng)||-79.401903},demographics:{radius:2500}}),2),f=s[0],w=s[1],x=d.exports.useMemo((function(){return{demographicsState:f,setDemographicsState:w,activeCategory:a,setActiveCategory:u}}),[a,u,f,w]);return g(c.Provider,{value:x,children:m(b.Root,{options:{activeTab:a},onChange:function(t){u(t.data)},children:[g(o?b.Select:b.Tabs,{}),n]})})},T=w.div(e||(e=s(["\n height: 100vh;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),x["--ll-color-background"]),I=w.div(r||(r=s(["\n overflow-y: auto;\n padding: ",";\n"])),x["--ll-spacing-medium"]),G=function(){var t=O().translations;return g(j,{variant:"h3",weight:"--ll-font-weight-bold",children:t.DEMOGRAPHICS_TITLE})},D=w.div(n||(n=s(["\n margin: "," 0;\n"])),x["--ll-spacing-large"]);w.div(o||(o=s(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),x["--ll-spacing-x-small"],x["--ll-spacing-medium"],x["--ll-spacing-xx-small"],x["--ll-spacing-medium"]);var N=w.div(i||(i=s(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),x["--ll-spacing-medium"]);var F=function(){var t=A().demographicsState.income;return g(L.AvgIncomeCard,{options:{incomeTypes:(null==t?void 0:t.variables)||[]}})},R=function(){var t=A().demographicsState.population_age;return g(L.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)})))||[]}})},z=function(){var t=A().demographicsState.housing_tenancy;return g(L.OwnersRentersCard,{options:{datasets:(null==t?void 0:t.variables.map((function(t){return{label:t.label,data:Math.round(100*t.value)}})))||[]}})},H=function(){var t=A().demographicsState.household_composition,e=null==t?void 0:t.variables.map((function(t){return h(h({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0}));return g(L.HouseholdCompositionCard,{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})))||[]}})},Y=function(){var t=A().demographicsState.commute_mode,e=null==t?void 0:t.variables.map((function(t){return h(h({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0}));return g(L.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})))||[]}})},B=function(){var t=A().demographicsState.education_level;return g(L.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,e,r,n,o,i,a=A(),c=a.demographicsState,s=a.activeCategory,f=a.setDemographicsState,p=(t={lat:c.location.lat,lng:c.location.lng,radius:c.demographics.radius},e=t.lat,r=t.lng,n=t.radius,o=S().client,i={lat:e,lng:r,radius:n},k(C.list(i),l(u().mark((function t(){return u().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=p.data,y=p.isFetching;d.exports.useEffect((function(){!y&&v&&f(h({},v))}),[y]);return g(D,{children:g(b.Content,{options:{value:s},children:function(){if(y)return g(N,{children:g(E,{})});switch(s){case"income":return g(F,{});case"population":return g(R,{});case"housing":return g(z,{});case"household":return g(H,{});case"commute":return g(Y,{});case"education":return g(B,{});default:return m("div",{children:[s," tab"]})}}()})})},U=w.div(a||(a=s(["\n padding: ",";\n\n a {\n justify-content: end;\n }\n"])),x["--ll-spacing-small"]),$=function(){return g(U,{children:g(_.Root,{})})};t("default",(function(){return g(M,{children:g(T,{children:m(I,{children:[g(G,{}),g(Q,{}),g($,{})]})})})}))}}}))}();
|