@local-logic/sdks-app 1.7.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{index-legacy.9e6e31fb.js → index-legacy.5b5c89be.js} +1 -1
- package/dist/assets/{index-legacy.8a8cb342.js → index-legacy.6f7be327.js} +1 -1
- package/dist/assets/index-legacy.873d2f5f.js +1 -0
- package/dist/assets/{index-legacy.93d69255.js → index-legacy.8b48df8f.js} +1 -1
- package/dist/assets/index-legacy.a2e5122a.js +23 -0
- package/dist/assets/{index-legacy.46f64d17.js → index-legacy.b4a1ea09.js} +1 -1
- package/dist/assets/index-legacy.e333988e.js +106 -0
- package/dist/assets/index.1b34a15d.js +35 -0
- package/dist/assets/index.24661964.js +247 -0
- package/dist/assets/index.3039bacf.js +161 -0
- package/dist/assets/index.3eec99ca.js +1318 -0
- package/dist/assets/index.77b51154.js +1 -0
- package/dist/assets/index.aae000f4.js +1 -0
- package/dist/assets/{index.fb08bd56.js → index.d89a7cee.js} +1 -1
- package/dist/assets/polyfills-legacy.db2bc606.js +1 -0
- package/dist/assets/{useIsMobile-legacy.cb5792f6.js → useIsMobile-legacy.7fb572d8.js} +1 -1
- package/dist/assets/{useIsMobile.8a6bbdf7.js → useIsMobile.b5e8d9ad.js} +1 -1
- package/dist/assets/{useQuery-legacy.9e74d2d1.js → useQuery-legacy.7e93cb2c.js} +1 -1
- package/dist/assets/useQuery.19a6ca1c.js +9 -0
- package/dist/index.html +3 -3
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js +2 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js +2 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/types.d.ts +2 -2
- package/dist/types/context/languageProvider/data-explorer/types.d.ts.map +1 -1
- package/dist/types/context/languageProvider/index.d.ts +2 -2
- package/dist/types/context/languageProvider/index.d.ts.map +1 -1
- package/dist/types/features/calculateRoute/useCommute.js +2 -2
- package/dist/types/features/calculateRoute/useCommute.js.map +1 -1
- package/dist/types/features/reverse-geocodes/useReverseGeocodes.js +2 -2
- package/dist/types/features/reverse-geocodes/useReverseGeocodes.js.map +1 -1
- package/dist/types/main.d.ts +1 -1
- package/dist/types/main.d.ts.map +1 -1
- package/dist/types/main.js +2 -13
- package/dist/types/main.js.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.js +65 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.js +27 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/context.d.ts +3 -0
- package/dist/types/sdks/DataExplorer/context.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/context.js +3 -0
- package/dist/types/sdks/DataExplorer/context.js.map +1 -1
- package/dist/types/sdks/DataExplorer/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/index.js +8 -0
- package/dist/types/sdks/DataExplorer/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.js +2 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/styles.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.js +19 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Housing/index.js +10 -7
- package/dist/types/sdks/Demographics/components/Content/Housing/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.js +12 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.js +14 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/index.js +3 -0
- package/dist/types/sdks/Demographics/components/Content/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/styles.js +1 -1
- package/dist/types/sdks/Demographics/components/Content/styles.js.map +1 -1
- package/dist/types/sdks/Demographics/context.d.ts +3 -0
- package/dist/types/sdks/Demographics/context.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/context.js.map +1 -1
- package/dist/types/sdks/Demographics/styles.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/styles.js +0 -1
- package/dist/types/sdks/Demographics/styles.js.map +1 -1
- package/dist/types/utils/errorTracker/index.d.ts +23 -0
- package/dist/types/utils/errorTracker/index.d.ts.map +1 -0
- package/dist/types/utils/errorTracker/index.js +100 -0
- package/dist/types/utils/errorTracker/index.js.map +1 -0
- package/package.json +5 -4
- package/dist/assets/index-legacy.02b7ed30.js +0 -1
- package/dist/assets/index-legacy.0500abfa.js +0 -106
- package/dist/assets/index-legacy.4d0178fa.js +0 -1
- package/dist/assets/index.3e70a7fa.js +0 -28
- package/dist/assets/index.414e070d.js +0 -1374
- package/dist/assets/index.630bec89.js +0 -120
- package/dist/assets/index.693f2772.js +0 -247
- package/dist/assets/index.d464e7cf.js +0 -1
- package/dist/assets/index.e63e2d64.js +0 -1
- package/dist/assets/polyfills-legacy.147ba02d.js +0 -1
- package/dist/assets/useQuery.fe83c221.js +0 -9
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
!function(){var e,t,n,r,i,o,u,a,l,s,c,f,d,h,g,p,v,m,b,y;function w(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function S(e){var t=function(e,t){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===A(t)?t:String(t)}function C(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=F(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function R(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||F(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 _(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(O){a=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),u=new R(r||[]);return o._invoke=function(e,t,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 u=n.delegate;if(u){var a=w(u,n);if(a){if(a===c)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 l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,u),o}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var c={};function f(){}function d(){}function h(){}var g={};a(g,i,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(E([])));v&&v!==t&&n.call(v,i)&&(g=v);var m=h.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){a(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function r(i,o,u,a){var l=s(e[i],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==A(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,a)}),(function(e){r("throw",e,u,a)})):t.resolve(f).then((function(e){c.value=e,u(c)}),(function(e){return r("throw",e,u,a)}))}a(l.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function w(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,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function S(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 R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=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 o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return d.prototype=h,a(m,"constructor",h),a(h,"constructor",d),d.displayName=a(h,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a(e,u,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(y.prototype),a(y.prototype,o,(function(){return this})),e.AsyncIterator=y,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var u=new y(l(t,n,r,i),o);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},b(m),a(m,u,"Generator"),a(m,i,(function(){return this})),a(m,"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=E,R.prototype={constructor:R,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 u.type="throw",u.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(a&&l){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(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(u)},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),c},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),c}},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 i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function E(e,t,n,r,i,o,u){try{var a=e[o](u),l=a.value}catch(s){return void n(s)}a.done?t(l):Promise.resolve(l).then(r,i)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function u(e){E(o,r,i,u,a,"next",e)}function a(e){E(o,r,i,u,a,"throw",e)}u(void 0)}))}}function A(e){return A="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},A(e)}function O(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k(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 M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(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,i,o=[],u=!0,a=!1;try{for(n=n.call(e);!(u=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);u=!0);}catch(l){a=!0,i=l}finally{try{u||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||F(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 F(e,t){if(e){if("string"==typeof e)return I(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)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}System.register(["./index-legacy.5b5c89be.js","./index-legacy.e333988e.js","./useQuery-legacy.7e93cb2c.js","./keyFactory-legacy.782b8549.js"],(function(E,k){"use strict";var F,I,T,j,V,D,B,z,N,G,H,U,q,Y,W,J,$,X,K,Q,Z,ee,te,ne,re,ie,oe,ue,ae,le,se,ce,fe,de,he,ge,pe,ve,me,be;return{setters:[function(e){F=e.g,I=e.c,T=e.l,j=e.f,V=e.S,D=e.b,B=e.s,z=e.p,N=e.i,G=e.j,H=e.m,U=e.N,q=e.P},function(e){Y=e.R,W=e.u,J=e.r,$=e.j,X=e.s,K=e.C,Q=e.k,Z=e.e,ee=e.p,te=e.a5,ne=e.h,re=e.y,ie=e.G,oe=e.c,ue=e.l,ae=e.v,le=e.L,se=e.a6,ce=e.K,fe=e.a7,de=e.F,he=e.f,ge=e.a8,pe=e.a9,ve=e.aa},function(e){me=e.u},function(e){be=e.d}],execute:function(){var k=Y.createContext({}),ye=function(){return J.exports.useContext(k)},we=function(e){var t,n,r=e.children,i=W().sdkState,o=L(J.exports.useReducer((function(e,t){return M(M({},e),t)}),{location:{lat:(null===(t=i.options)||void 0===t?void 0:t.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},table:{empty:!0}}),2),u=o[0],a=o[1],l=J.exports.useMemo((function(){return{dataExplorerState:u,setDataExplorerState:a}}),[u,a]);return $(k.Provider,{value:l,children:r})},Se=X.div(e||(e=O(["\n height: 100vh;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),K["--ll-color-background"]),Ce=X(F)(t||(t=O(["\n overflow-y: auto;\n padding: ",";\n"])),K["--ll-spacing-medium"]),Re=Q({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),_e=Q({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),Ee=X.div(n||(n=O(["\n display: flex;\n flex-direction: column;\n"]))),xe=X.div(r||(r=O(["\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"])),K["--ll-color-primary"],K["--ll-color-primary"],K["--ll-spacing-small"],K["--ll-font-size-p"]),Ae=X(I)(i||(i=O(["\n all: unset;\n flex: 1;\n display: flex;\n align-items: center;\n font-family: ",";\n"])),K["--ll-font-family"]),Oe=X.div(o||(o=O(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: "," 0;\n"])),K["--ll-spacing-x-small"]),ke=X(T)(u||(u=O(["\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"])),K["--ll-color-surface"],K["--ll-spacing-medium"],K["--ll-spacing-medium"],Re,_e),Me=X.div(a||(a=O(["\n padding: ",";\n"])),K["--ll-spacing-medium"]),Pe=X.span(l||(l=O(["\n margin-left: ",";\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),K["--ll-spacing-x-small"],Ae),Le=X.div(s||(s=O(["\n display: flex;\n"]))),Fe=function(e){var t=e.title,n=e.description,r=e.children,i=e.value,o=e.number,u=ye(),a=u.dataExplorerState,l=u.setDataExplorerState;return $(j,{value:i,children:Z(Ee,{children:[Z(Oe,{children:[Z(Ae,{children:[$(xe,{children:o}),$(ee,{variant:"h6",noMargin:!0,weight:"--ll-font-weight-medium",children:t})]}),Z(Le,{children:["checked"in a[i]&&$(te,{checked:a[i].checked,onCheckedChange:function(e){return l(P({},i,M(M({},a[i]),{},{checked:e})))}}),$(Ae,{children:$(Pe,{children:$(ne,{SVGElement:V,fill:K["--ll-color-on-background-variant1"]})})})]})]}),$(ke,{children:Z(Me,{children:[$(ee,{color:"--ll-color-on-background-variant1",children:n}),r]})})]})})},Ie={exports:{}};!function(e,t){!function(e){var t;function n(){}function r(){r.init.call(this)}function i(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function o(e,t,n){if(t)e.call(n);else for(var r=e.length,i=p(e,r),o=0;o<r;++o)i[o].call(n)}function u(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=p(e,i),u=0;u<i;++u)o[u].call(n,r)}function a(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,u=p(e,o),a=0;a<o;++a)u[a].call(n,r,i)}function l(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var u=e.length,a=p(e,u),l=0;l<u;++l)a[l].call(n,r,i,o)}function s(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=p(e,i),u=0;u<i;++u)o[u].apply(n,r)}function c(e,t,r,o){var u,a,l;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),l=a[t]):(a=e._events=new n,e._eventsCount=0),l){if("function"==typeof l?l=a[t]=o?[r,l]:[l,r]:o?l.unshift(r):l.push(r),!l.warned&&(u=i(e))&&u>0&&l.length>u){l.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=l.length,f(s)}}else l=a[t]=r,++e._eventsCount;return e}function f(e){"function"==typeof console.warn?console.warn(e):console.log(e)}function d(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function h(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function g(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}function p(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function v(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}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&&t.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(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(e){var t,n,r,i,c,f,d,h="error"===e;if(f=this._events)h=h&&null==f.error;else if(!h)return!1;if(d=this.domain,h){if(t=arguments[1],!d){if(t instanceof Error)throw t;var g=new Error('Uncaught, unspecified "error" event. ('+t+")");throw g.context=t,g}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=d,t.domainThrown=!1,d.emit("error",t),!1}if(!(n=f[e]))return!1;var p="function"==typeof n;switch(r=arguments.length){case 1:o(n,p,this);break;case 2:u(n,p,this,arguments[1]);break;case 3:a(n,p,this,arguments[1],arguments[2]);break;case 4:l(n,p,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),c=1;c<r;c++)i[c-1]=arguments[c];s(n,p,this,i)}return!0},r.prototype.addListener=function(e,t){return c(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return c(this,e,t,!0)},r.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,d(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,d(this,e,t)),this},r.prototype.removeListener=function(e,t){var r,i,o,u,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new n:(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,u=r.length;u-- >0;)if(r[u]===t||r[u].listener&&r[u].listener===t){a=r[u].listener,o=u;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[e]}else g(r,o);i.removeListener&&this.emit("removeListener",e,a||t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new n,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new n:delete r[e]),this;if(0===arguments.length){for(var i,o=Object.keys(r),u=0;u<o.length;++u)"removeListener"!==(i=o[u])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=new n,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},r.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:v(t):[]},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},r.prototype.listenerCount=h,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var m=void 0!==re?re:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b=[],y=[],w="undefined"!=typeof Uint8Array?Uint8Array:Array,S=!1;function C(){S=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)b[t]=e[t],y[e.charCodeAt(t)]=t;y["-".charCodeAt(0)]=62,y["_".charCodeAt(0)]=63}function R(e){var t,n,r,i,o,u;S||C();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[a-2]?2:"="===e[a-1]?1:0,u=new w(3*a/4-o),r=o>0?a-4:a;var l=0;for(t=0,n=0;t<r;t+=4,n+=3)i=y[e.charCodeAt(t)]<<18|y[e.charCodeAt(t+1)]<<12|y[e.charCodeAt(t+2)]<<6|y[e.charCodeAt(t+3)],u[l++]=i>>16&255,u[l++]=i>>8&255,u[l++]=255&i;return 2===o?(i=y[e.charCodeAt(t)]<<2|y[e.charCodeAt(t+1)]>>4,u[l++]=255&i):1===o&&(i=y[e.charCodeAt(t)]<<10|y[e.charCodeAt(t+1)]<<4|y[e.charCodeAt(t+2)]>>2,u[l++]=i>>8&255,u[l++]=255&i),u}function _(e){return b[e>>18&63]+b[e>>12&63]+b[e>>6&63]+b[63&e]}function E(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(_(r));return i.join("")}function x(e){var t;S||C();for(var n=e.length,r=n%3,i="",o=[],u=16383,a=0,l=n-r;a<l;a+=u)o.push(E(e,a,a+u>l?l:a+u));return 1===r?(t=e[n-1],i+=b[t>>2],i+=b[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=b[t>>10],i+=b[t>>4&63],i+=b[t<<2&63],i+="="),o.push(i),o.join("")}function O(e,t,n,r,i){var o,u,a=8*i-r-1,l=(1<<a)-1,s=l>>1,c=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=d,c-=8);for(u=o&(1<<-c)-1,o>>=-c,c+=r;c>0;u=256*u+e[t+f],f+=d,c-=8);if(0===o)o=1-s;else{if(o===l)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,r),o-=s}return(h?-1:1)*u*Math.pow(2,o-r)}function k(e,t,n,r,i,o){var u,a,l,s=8*o-i-1,c=(1<<s)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,g=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-u))<1&&(u--,l*=2),(t+=u+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(u++,l/=2),u+f>=c?(a=0,u=c):u+f>=1?(a=(t*l-1)*Math.pow(2,i),u+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;e[n+h]=255&a,h+=g,a/=256,i-=8);for(u=u<<i|a,s+=i;s>0;e[n+h]=255&u,h+=g,u/=256,s-=8);e[n+h-g]|=128*p}var M={}.toString,P=Array.isArray||function(e){return"[object Array]"==M.call(e)},L=50;function F(){return T.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function I(e,t){if(F()<t)throw new RangeError("Invalid typed array length");return T.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=T.prototype:(null===e&&(e=new T(t)),e.length=t),e}function T(e,t,n){if(!(T.TYPED_ARRAY_SUPPORT||this instanceof T))return new T(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return B(this,e)}return j(this,e,t,n)}function j(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?G(e,t,n,r):"string"==typeof t?z(e,t,n):H(e,t)}function V(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function D(e,t,n,r){return V(t),t<=0?I(e,t):void 0!==n?"string"==typeof r?I(e,t).fill(n,r):I(e,t).fill(n):I(e,t)}function B(e,t){if(V(t),e=I(e,t<0?0:0|U(t)),!T.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function z(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!T.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Y(t,n),i=(e=I(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}function N(e,t){var n=t.length<0?0:0|U(t.length);e=I(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function G(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),T.TYPED_ARRAY_SUPPORT?(e=t).__proto__=T.prototype:e=N(e,t),e}function H(e,t){if(q(t)){var n=0|U(t.length);return 0===(e=I(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Oe(t.length)?I(e,0):N(e,t);if("Buffer"===t.type&&P(t.data))return N(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function U(e){if(e>=F())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+F().toString(16)+" bytes");return 0|e}function q(e){return!(null==e||!e._isBuffer)}function Y(e,t){if(q(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Re(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return xe(e).length;default:if(r)return Re(e).length;t=(""+t).toLowerCase(),r=!0}}function W(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ce(this,t,n);case"utf8":case"utf-8":return oe(this,t,n);case"ascii":return le(this,t,n);case"latin1":case"binary":return se(this,t,n);case"base64":return ie(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function J(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function $(e,t,n,r,i){if(0===e.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:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=T.from(t,r)),q(t))return 0===t.length?-1:X(e,t,n,r,i);if("number"==typeof t)return t&=255,T.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):X(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function X(e,t,n,r,i){var o,u=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;u=2,a/=2,l/=2,n/=2}function s(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}if(i){var c=-1;for(o=n;o<a;o++)if(s(e,o)===s(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*u}else-1!==c&&(o-=o-c),c=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var f=!0,d=0;d<l;d++)if(s(e,o+d)!==s(t,d)){f=!1;break}if(f)return o}return-1}function K(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(t.substr(2*u,2),16);if(isNaN(a))return u;e[n+u]=a}return u}function Q(e,t,n,r){return Ae(Re(t,e.length-n),e,n,r)}function Z(e,t,n,r){return Ae(_e(t),e,n,r)}function ee(e,t,n,r){return Z(e,t,n,r)}function te(e,t,n,r){return Ae(xe(t),e,n,r)}function ne(e,t,n,r){return Ae(Ee(t,e.length-n),e,n,r)}function ie(e,t,n){return 0===t&&n===e.length?x(e):x(e.slice(t,n))}function oe(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,u,a,l,s=e[i],c=null,f=s>239?4:s>223?3:s>191?2:1;if(i+f<=n)switch(f){case 1:s<128&&(c=s);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&s)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],u=e[i+2],128==(192&o)&&128==(192&u)&&(l=(15&s)<<12|(63&o)<<6|63&u)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],u=e[i+2],a=e[i+3],128==(192&o)&&128==(192&u)&&128==(192&a)&&(l=(15&s)<<18|(63&o)<<12|(63&u)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return ae(r)}T.TYPED_ARRAY_SUPPORT=void 0===m.TYPED_ARRAY_SUPPORT||m.TYPED_ARRAY_SUPPORT,T.poolSize=8192,T._augment=function(e){return e.__proto__=T.prototype,e},T.from=function(e,t,n){return j(null,e,t,n)},T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array),T.alloc=function(e,t,n){return D(null,e,t,n)},T.allocUnsafe=function(e){return B(null,e)},T.allocUnsafeSlow=function(e){return B(null,e)},T.isBuffer=ke,T.compare=function(e,t){if(!q(e)||!q(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},T.isEncoding=function(e){switch(String(e).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}},T.concat=function(e,t){if(!P(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return T.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=T.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!q(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},T.byteLength=Y,T.prototype._isBuffer=!0,T.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)J(this,t,t+1);return this},T.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)J(this,t,t+3),J(this,t+1,t+2);return this},T.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)J(this,t,t+7),J(this,t+1,t+6),J(this,t+2,t+5),J(this,t+3,t+4);return this},T.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?oe(this,0,e):W.apply(this,arguments)},T.prototype.equals=function(e){if(!q(e))throw new TypeError("Argument must be a Buffer");return this===e||0===T.compare(this,e)},T.prototype.inspect=function(){var e="",t=L;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},T.prototype.compare=function(e,t,n,r,i){if(!q(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),u=(n>>>=0)-(t>>>=0),a=Math.min(o,u),l=this.slice(r,i),s=e.slice(t,n),c=0;c<a;++c)if(l[c]!==s[c]){o=l[c],u=s[c];break}return o<u?-1:u<o?1:0},T.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},T.prototype.indexOf=function(e,t,n){return $(this,e,t,n,!0)},T.prototype.lastIndexOf=function(e,t,n){return $(this,e,t,n,!1)},T.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return K(this,e,t,n);case"utf8":case"utf-8":return Q(this,e,t,n);case"ascii":return Z(this,e,t,n);case"latin1":case"binary":return ee(this,e,t,n);case"base64":return te(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ue=4096;function ae(e){var t=e.length;if(t<=ue)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ue));return n}function le(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function se(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function ce(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=Ce(e[o]);return i}function fe(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function de(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function he(e,t,n,r,i,o){if(!q(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function ge(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function pe(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function ve(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function me(e,t,n,r,i){return i||ve(e,t,n,4),k(e,t,n,r,23,4),n+4}function be(e,t,n,r,i){return i||ve(e,t,n,8),k(e,t,n,r,52,8),n+8}T.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),T.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=T.prototype;else{var i=t-e;n=new T(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},T.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||de(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},T.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||de(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},T.prototype.readUInt8=function(e,t){return t||de(e,1,this.length),this[e]},T.prototype.readUInt16LE=function(e,t){return t||de(e,2,this.length),this[e]|this[e+1]<<8},T.prototype.readUInt16BE=function(e,t){return t||de(e,2,this.length),this[e]<<8|this[e+1]},T.prototype.readUInt32LE=function(e,t){return t||de(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},T.prototype.readUInt32BE=function(e,t){return t||de(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},T.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||de(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},T.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||de(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},T.prototype.readInt8=function(e,t){return t||de(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},T.prototype.readInt16LE=function(e,t){t||de(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},T.prototype.readInt16BE=function(e,t){t||de(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},T.prototype.readInt32LE=function(e,t){return t||de(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},T.prototype.readInt32BE=function(e,t){return t||de(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},T.prototype.readFloatLE=function(e,t){return t||de(e,4,this.length),O(this,e,!0,23,4)},T.prototype.readFloatBE=function(e,t){return t||de(e,4,this.length),O(this,e,!1,23,4)},T.prototype.readDoubleLE=function(e,t){return t||de(e,8,this.length),O(this,e,!0,52,8)},T.prototype.readDoubleBE=function(e,t){return t||de(e,8,this.length),O(this,e,!1,52,8)},T.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||he(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},T.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||he(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},T.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,1,255,0),T.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},T.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ge(this,e,t,!0),t+2},T.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ge(this,e,t,!1),t+2},T.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):pe(this,e,t,!0),t+4},T.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):pe(this,e,t,!1),t+4},T.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);he(this,e,t,n,i-1,-i)}var o=0,u=1,a=0;for(this[t]=255&e;++o<n&&(u*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},T.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);he(this,e,t,n,i-1,-i)}var o=n-1,u=1,a=0;for(this[t+o]=255&e;--o>=0&&(u*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},T.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,1,127,-128),T.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},T.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ge(this,e,t,!0),t+2},T.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ge(this,e,t,!1),t+2},T.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,4,2147483647,-2147483648),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):pe(this,e,t,!0),t+4},T.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||he(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):pe(this,e,t,!1),t+4},T.prototype.writeFloatLE=function(e,t,n){return me(this,e,t,!0,n)},T.prototype.writeFloatBE=function(e,t,n){return me(this,e,t,!1,n)},T.prototype.writeDoubleLE=function(e,t,n){return be(this,e,t,!0,n)},T.prototype.writeDoubleBE=function(e,t,n){return be(this,e,t,!1,n)},T.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<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),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!T.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},T.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!T.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var u=q(e)?e:Re(new T(e,r).toString()),a=u.length;for(o=0;o<n-t;++o)this[o+t]=u[o%a]}return this};var ye=/[^+\/0-9A-Za-z-_]/g;function we(e){if((e=Se(e).replace(ye,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Se(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Ce(e){return e<16?"0"+e.toString(16):e.toString(16)}function Re(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],u=0;u<r;++u){if((n=e.charCodeAt(u))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=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((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function _e(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Ee(e,t){for(var n,r,i,o=[],u=0;u<e.length&&!((t-=2)<0);++u)r=(n=e.charCodeAt(u))>>8,i=n%256,o.push(i),o.push(r);return o}function xe(e){return R(we(e))}function Ae(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Oe(e){return e!=e}function ke(e){return null!=e&&(!!e._isBuffer||Me(e)||Pe(e))}function Me(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Pe(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Me(e.slice(0,0))}function Le(){throw new Error("setTimeout has not been defined")}function Fe(){throw new Error("clearTimeout has not been defined")}var Ie=Le,Te=Fe;function je(e){if(Ie===setTimeout)return setTimeout(e,0);if((Ie===Le||!Ie)&&setTimeout)return Ie=setTimeout,setTimeout(e,0);try{return Ie(e,0)}catch(t){try{return Ie.call(null,e,0)}catch(t){return Ie.call(this,e,0)}}}function Ve(e){if(Te===clearTimeout)return clearTimeout(e);if((Te===Fe||!Te)&&clearTimeout)return Te=clearTimeout,clearTimeout(e);try{return Te(e)}catch(t){try{return Te.call(null,e)}catch(t){return Te.call(this,e)}}}"function"==typeof m.setTimeout&&(Ie=setTimeout),"function"==typeof m.clearTimeout&&(Te=clearTimeout);var De,Be=[],ze=!1,Ne=-1;function Ge(){ze&&De&&(ze=!1,De.length?Be=De.concat(Be):Ne=-1,Be.length&&He())}function He(){if(!ze){var e=je(Ge);ze=!0;for(var t=Be.length;t;){for(De=Be,Be=[];++Ne<t;)De&&De[Ne].run();Ne=-1,t=Be.length}De=null,ze=!1,Ve(e)}}function Ue(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Be.push(new qe(e,t)),1!==Be.length||ze||je(He)}function qe(e,t){this.fun=e,this.array=t}qe.prototype.run=function(){this.fun.apply(null,this.array)};var Ye=m.performance||{};Ye.now||Ye.mozNow||Ye.msNow||Ye.oNow||Ye.webkitNow;var We="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},Je=/%[sdj%]/g;function $e(e){if(!gt(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(et(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(Je,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),u=r[n];n<i;u=r[++n])dt(u)||!mt(u)?o+=" "+u:o+=" "+et(u);return o}function Xe(e,t){if(pt(m.process))return function(){return Xe(e,t).apply(this,arguments)};var n=!1;function r(){return n||(console.error(t),n=!0),e.apply(this,arguments)}return r}var Ke,Qe={};function Ze(e){if(pt(Ke)&&(Ke=""),e=e.toUpperCase(),!Qe[e])if(new RegExp("\\b"+e+"\\b","i").test(Ke)){var t=0;Qe[e]=function(){var n=$e.apply(null,arguments);console.error("%s %d: %s",e,t,n)}}else Qe[e]=function(){};return Qe[e]}function et(e,t){var n={seen:[],stylize:nt};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),ft(t)?n.showHidden=t:t&&Ct(n,t),pt(n.showHidden)&&(n.showHidden=!1),pt(n.depth)&&(n.depth=2),pt(n.colors)&&(n.colors=!1),pt(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=tt),it(n,e,n.depth)}function tt(e,t){var n=et.styles[t];return n?"["+et.colors[n][0]+"m"+e+"["+et.colors[n][1]+"m":e}function nt(e,t){return e}function rt(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}function it(e,t,n){if(e.customInspect&&t&&wt(t.inspect)&&t.inspect!==et&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return gt(r)||(r=it(e,r,n)),r}var i=ot(e,t);if(i)return i;var o=Object.keys(t),u=rt(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),yt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ut(t);if(0===o.length){if(wt(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(vt(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(bt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(yt(t))return ut(t)}var l,s="",c=!1,f=["{","}"];return ct(t)&&(c=!0,f=["[","]"]),wt(t)&&(s=" [Function"+(t.name?": "+t.name:"")+"]"),vt(t)&&(s=" "+RegExp.prototype.toString.call(t)),bt(t)&&(s=" "+Date.prototype.toUTCString.call(t)),yt(t)&&(s=" "+ut(t)),0!==o.length||c&&0!=t.length?n<0?vt(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),l=c?at(e,t,n,u,o):o.map((function(r){return lt(e,t,n,u,r,c)})),e.seen.pop(),st(l,s,f)):f[0]+s+f[1]}function ot(e,t){if(pt(t))return e.stylize("undefined","undefined");if(gt(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return ht(t)?e.stylize(""+t,"number"):ft(t)?e.stylize(""+t,"boolean"):dt(t)?e.stylize("null","null"):void 0}function ut(e){return"["+Error.prototype.toString.call(e)+"]"}function at(e,t,n,r,i){for(var o=[],u=0,a=t.length;u<a;++u)Rt(t,String(u))?o.push(lt(e,t,n,r,String(u),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(lt(e,t,n,r,i,!0))})),o}function lt(e,t,n,r,i,o){var u,a,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),Rt(r,i)||(u="["+i+"]"),a||(e.seen.indexOf(l.value)<0?(a=dt(n)?it(e,l.value,null):it(e,l.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),pt(u)){if(o&&i.match(/^\d+$/))return a;(u=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+a}function st(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function ct(e){return Array.isArray(e)}function ft(e){return"boolean"==typeof e}function dt(e){return null===e}function ht(e){return"number"==typeof e}function gt(e){return"string"==typeof e}function pt(e){return void 0===e}function vt(e){return mt(e)&&"[object RegExp]"===St(e)}function mt(e){return"object"===A(e)&&null!==e}function bt(e){return mt(e)&&"[object Date]"===St(e)}function yt(e){return mt(e)&&("[object Error]"===St(e)||e instanceof Error)}function wt(e){return"function"==typeof e}function St(e){return Object.prototype.toString.call(e)}function Ct(e,t){if(!t||!mt(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function Rt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _t(){this.head=null,this.tail=null,this.length=0}et.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]},et.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},_t.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},_t.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},_t.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},_t.prototype.clear=function(){this.head=this.tail=null,this.length=0},_t.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},_t.prototype.concat=function(e){if(0===this.length)return T.alloc(0);if(1===this.length)return this.head.data;for(var t=T.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var Et=T.isEncoding||function(e){switch(e&&e.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 xt(e){if(e&&!Et(e))throw new Error("Unknown encoding: "+e)}function At(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),xt(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=kt;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Mt;break;default:return void(this.write=Ot)}this.charBuffer=new T(6),this.charReceived=0,this.charLength=0}function Ot(e){return e.toString(this.encoding)}function kt(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Mt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}At.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},At.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},At.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t},Tt.ReadableState=It;var Pt=Ze("stream");function Lt(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function Ft(e,t){return e.listeners(t).length}function It(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Pn&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new _t,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=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new At(e.encoding),this.encoding=e.encoding)}function Tt(e){if(!(this instanceof Tt))return new Tt(e);this._readableState=new It(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),r.call(this)}function jt(e,t,n,r,i){var o=Nt(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,Gt(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var u=new Error("stream.push() after EOF");e.emit("error",u)}else if(t.endEmitted&&i){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var l;!t.decoder||i||r||(n=t.decoder.write(n),l=!t.objectMode&&0===n.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&Ht(e))),qt(e,t)}else i||(t.reading=!1);return Vt(t)}function Vt(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}We(Tt,r),Tt.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=T.from(e,t),t=""),jt(this,n,e,t,!1)},Tt.prototype.unshift=function(e){return jt(this,this._readableState,e,"",!0)},Tt.prototype.isPaused=function(){return!1===this._readableState.flowing},Tt.prototype.setEncoding=function(e){return this._readableState.decoder=new At(e),this._readableState.encoding=e,this};var Dt=8388608;function Bt(e){return e>=Dt?e=Dt:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function zt(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Bt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Nt(e,t){var n=null;return ke(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function Gt(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,Ht(e)}}function Ht(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Pt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ue(Ut,e):Ut(e))}function Ut(e){Pt("emit readable"),e.emit("readable"),Kt(e)}function qt(e,t){t.readingMore||(t.readingMore=!0,Ue(Yt,e,t))}function Yt(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Pt("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function Wt(e){return function(){var t=e._readableState;Pt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Kt(e))}}function Jt(e){Pt("readable nexttick read 0"),e.read(0)}function $t(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ue(Xt,e,t))}function Xt(e,t){t.reading||(Pt("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Kt(e),t.flowing&&!t.reading&&e.read(0)}function Kt(e){var t=e._readableState;for(Pt("flow",t.flowing);t.flowing&&null!==e.read(););}function Qt(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=Zt(e,t.buffer,t.decoder),n);var n}function Zt(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?en(e,t):tn(e,t),r}function en(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,u=e>o.length?o.length:e;if(u===o.length?i+=o:i+=o.slice(0,e),0==(e-=u)){u===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(u));break}++r}return t.length-=r,i}function tn(e,t){var n=T.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,u=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,u),0==(e-=u)){u===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(u));break}++i}return t.length-=i,n}function nn(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ue(rn,t,e))}function rn(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function on(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function un(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function an(){}function ln(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function sn(e,t){Object.defineProperty(this,"buffer",{get:Xe((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Pn&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.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===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){bn(t,e)},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 cn(e){if(!(this instanceof cn||this instanceof Pn))return new cn(e);this._writableState=new sn(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),r.call(this)}function fn(e,t){var n=new Error("write after end");e.emit("error",n),Ue(t,n)}function dn(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):T.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Ue(r,o),i=!1),i}function hn(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=T.from(t,n)),t}function gn(e,t,n,r,i){n=hn(t,n,r),T.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest=new ln(n,r,i),a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else pn(e,t,!1,o,n,r,i);return u}function pn(e,t,n,r,i,o,u){t.writelen=r,t.writecb=u,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function vn(e,t,n,r,i){--t.pendingcb,n?Ue(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function mn(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function bn(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(mn(n),t)vn(e,n,r,t,i);else{var o=Cn(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||Sn(e,n),r?Ue(yn,e,n,o,i):yn(e,n,o,i)}}function yn(e,t,n,r){n||wn(e,t),t.pendingcb--,r(),_n(e,t)}function wn(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Sn(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var u=0;n;)i[u]=n,n=n.next,u+=1;pn(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new xn(t)}else{for(;n;){var a=n.chunk,l=n.encoding,s=n.callback;if(pn(e,t,!1,t.objectMode?1:a.length,a,l,s),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Cn(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Rn(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function _n(e,t){var n=Cn(t);return n&&(0===t.pendingcb?(Rn(e,t),t.finished=!0,e.emit("finish")):Rn(e,t)),n}function En(e,t,n){t.ending=!0,_n(e,t),n&&(t.finished?Ue(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function xn(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}Tt.prototype.read=function(e){Pt("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Pt("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?nn(this):Ht(this),null;if(0===(e=zt(e,t))&&t.ended)return 0===t.length&&nn(this),null;var r,i=t.needReadable;return Pt("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&Pt("length less than watermark",i=!0),t.ended||t.reading?Pt("reading or ended",i=!1):i&&(Pt("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=zt(n,t))),null===(r=e>0?Qt(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&nn(this)),null!==r&&this.emit("data",r),r},Tt.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Tt.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,Pt("pipe count=%d opts=%j",r.pipesCount,t);var i=t&&!1===t.end?s:u;function o(e){Pt("onunpipe"),e===n&&s()}function u(){Pt("onend"),e.end()}r.endEmitted?Ue(i):n.once("end",i),e.on("unpipe",o);var a=Wt(n);e.on("drain",a);var l=!1;function s(){Pt("cleanup"),e.removeListener("close",h),e.removeListener("finish",g),e.removeListener("drain",a),e.removeListener("error",d),e.removeListener("unpipe",o),n.removeListener("end",u),n.removeListener("end",s),n.removeListener("data",f),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||a()}var c=!1;function f(t){Pt("ondata"),c=!1,!1!==e.write(t)||c||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==un(r.pipes,e))&&!l&&(Pt("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function d(t){Pt("onerror",t),p(),e.removeListener("error",d),0===Ft(e,"error")&&e.emit("error",t)}function h(){e.removeListener("finish",g),p()}function g(){Pt("onfinish"),e.removeListener("close",h),p()}function p(){Pt("unpipe"),n.unpipe(e)}return n.on("data",f),Lt(e,"error",d),e.once("close",h),e.once("finish",g),e.emit("pipe",n),r.flowing||(Pt("pipe resume"),n.resume()),e},Tt.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=un(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},Tt.prototype.on=function(e,t){var n=r.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Ht(this):Ue(Jt,this))}return n},Tt.prototype.addListener=Tt.prototype.on,Tt.prototype.resume=function(){var e=this._readableState;return e.flowing||(Pt("resume"),e.flowing=!0,$t(this,e)),this},Tt.prototype.pause=function(){return Pt("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(Pt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Tt.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(Pt("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){Pt("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return on(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){Pt("wrapped _read",t),n&&(n=!1,e.resume())},r},Tt._fromList=Qt,cn.WritableState=sn,We(cn,r),sn.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},cn.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},cn.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),T.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=an),r.ended?fn(this,n):dn(this,r,e,n)&&(r.pendingcb++,i=gn(this,r,e,t,n)),i},cn.prototype.cork=function(){this._writableState.corked++},cn.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Sn(this,e))},cn.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},cn.prototype._write=function(e,t,n){n(new Error("not implemented"))},cn.prototype._writev=null,cn.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||En(this,r,n)},We(Pn,Tt);for(var An,On=Object.keys(cn.prototype),kn=0;kn<On.length;kn++){var Mn=On[kn];Pn.prototype[Mn]||(Pn.prototype[Mn]=cn.prototype[Mn])}function Pn(e){if(!(this instanceof Pn))return new Pn(e);Tt.call(this,e),cn.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Ln)}function Ln(){this.allowHalfOpen||this._writableState.ended||Ue(Fn,this)}function Fn(e){e.end()}function In(e){this.afterTransform=function(t,n){return Tn(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Tn(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function jn(e){if(!(this instanceof jn))return new jn(e);Pn.call(this,e),this._transformState=new In(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Vn(t,e)})):Vn(t)}))}function Vn(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._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 e.push(null)}function Dn(e){if(!(this instanceof Dn))return new Dn(e);jn.call(this,e)}function Bn(){r.call(this)}function zn(e){return zn="function"==typeof Symbol&&"symbol"===A(Symbol.iterator)?function(e){return A(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":A(e)},zn(e)}function Nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gn(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 Hn(e,t,n){return t&&Gn(e.prototype,t),n&&Gn(e,n),e}function Un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Un(e,t,n[t])}))}return e}function Yn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jn(e,t)}function Wn(e){return Wn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wn(e)}function Jn(e,t){return Jn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Jn(e,t)}function $n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xn(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?$n(e):t}function Kn(e){return er(e)||tr(e)||rr()}function Qn(e){return Zn(e)||tr(e)||nr()}function Zn(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function er(e){if(Array.isArray(e))return e}function tr(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function nr(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function rr(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ir(){if(void 0===An){var e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=1,t[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 or(){return void 0!==m.location?m.location.hostname:""}function ur(){return[]}function ar(){return 0}function lr(){return Number.MAX_VALUE}function sr(){return Number.MAX_VALUE}function cr(){return[]}function fr(){return"Browser"}function dr(){return void 0!==m.navigator?m.navigator.appVersion:""}function hr(){}function gr(){}function pr(){return"/tmp"}We(jn,Pn),jn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Pn.prototype.push.call(this,e,t)},jn.prototype._transform=function(e,t,n){throw new Error("Not implemented")},jn.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},jn.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},We(Dn,jn),Dn.prototype._transform=function(e,t,n){n(null,e)},We(Bn,r),Bn.Readable=Tt,Bn.Writable=cn,Bn.Duplex=Pn,Bn.Transform=jn,Bn.PassThrough=Dn,Bn.Stream=Bn,Bn.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",l));var u=!1;function a(){u||(u=!0,e.end())}function l(){u||(u=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",l),n.removeListener("error",s),e.removeListener("error",s),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",s),e.on("error",s),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e};var vr={EOL:"\n",tmpdir:pr,tmpDir:pr,networkInterfaces:hr,getNetworkInterfaces:gr,release:dr,type:fr,cpus:cr,totalmem:sr,freemem:lr,uptime:ar,loadavg:ur,hostname:or,endianness:ir},mr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==re?re:"undefined"!=typeof self?self:{},br="Expected a function",yr="__lodash_hash_undefined__",wr=1/0,Sr="[object Function]",Cr="[object GeneratorFunction]",Rr="[object Symbol]",_r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Er=/^\w*$/,xr=/^\./,Ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Or=/[\\^$.*+?()[\]{}|]/g,kr=/\\(\\)?/g,Mr=/^\[object .+?Constructor\]$/,Pr="object"==A(mr)&&mr&&mr.Object===Object&&mr,Lr="object"==("undefined"==typeof self?"undefined":A(self))&&self&&self.Object===Object&&self,Fr=Pr||Lr||Function("return this")();function Ir(e,t){return null==e?void 0:e[t]}function Tr(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}var jr,Vr=Array.prototype,Dr=Function.prototype,Br=Object.prototype,zr=Fr["__core-js_shared__"],Nr=(jr=/[^.]+$/.exec(zr&&zr.keys&&zr.keys.IE_PROTO||""))?"Symbol(src)_1."+jr:"",Gr=Dr.toString,Hr=Br.hasOwnProperty,Ur=Br.toString,qr=RegExp("^"+Gr.call(Hr).replace(Or,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yr=Fr.Symbol,Wr=Vr.splice,Jr=Ci(Fr,"Map"),$r=Ci(Object,"create"),Xr=Yr?Yr.prototype:void 0,Kr=Xr?Xr.toString:void 0;function Qr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Zr(){this.__data__=$r?$r(null):{}}function ei(e){return this.has(e)&&delete this.__data__[e]}function ti(e){var t=this.__data__;if($r){var n=t[e];return n===yr?void 0:n}return Hr.call(t,e)?t[e]:void 0}function ni(e){var t=this.__data__;return $r?void 0!==t[e]:Hr.call(t,e)}function ri(e,t){return this.__data__[e]=$r&&void 0===t?yr:t,this}function ii(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oi(){this.__data__=[]}function ui(e){var t=this.__data__,n=vi(t,e);return!(n<0||(n==t.length-1?t.pop():Wr.call(t,n,1),0))}function ai(e){var t=this.__data__,n=vi(t,e);return n<0?void 0:t[n][1]}function li(e){return vi(this.__data__,e)>-1}function si(e,t){var n=this.__data__,r=vi(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function ci(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function fi(){this.__data__={hash:new Qr,map:new(Jr||ii),string:new Qr}}function di(e){return Si(this,e).delete(e)}function hi(e){return Si(this,e).get(e)}function gi(e){return Si(this,e).has(e)}function pi(e,t){return Si(this,e).set(e,t),this}function vi(e,t){for(var n=e.length;n--;)if(Mi(e[n][0],t))return n;return-1}function mi(e,t){for(var n=0,r=(t=Ri(t,e)?[t]:wi(t)).length;null!=e&&n<r;)e=e[Ai(t[n++])];return n&&n==r?e:void 0}function bi(e){return!(!Fi(e)||Ei(e))&&(Li(e)||Tr(e)?qr:Mr).test(Oi(e))}function yi(e){if("string"==typeof e)return e;if(Ti(e))return Kr?Kr.call(e):"";var t=e+"";return"0"==t&&1/e==-wr?"-0":t}function wi(e){return Pi(e)?e:xi(e)}function Si(e,t){var n=e.__data__;return _i(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ci(e,t){var n=Ir(e,t);return bi(n)?n:void 0}function Ri(e,t){if(Pi(e))return!1;var n=A(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ti(e))||Er.test(e)||!_r.test(e)||null!=t&&e in Object(t)}function _i(e){var t=A(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ei(e){return!!Nr&&Nr in e}Qr.prototype.clear=Zr,Qr.prototype.delete=ei,Qr.prototype.get=ti,Qr.prototype.has=ni,Qr.prototype.set=ri,ii.prototype.clear=oi,ii.prototype.delete=ui,ii.prototype.get=ai,ii.prototype.has=li,ii.prototype.set=si,ci.prototype.clear=fi,ci.prototype.delete=di,ci.prototype.get=hi,ci.prototype.has=gi,ci.prototype.set=pi;var xi=ki((function(e){e=ji(e);var t=[];return xr.test(e)&&t.push(""),e.replace(Ar,(function(e,n,r,i){t.push(r?i.replace(kr,"$1"):n||e)})),t}));function Ai(e){if("string"==typeof e||Ti(e))return e;var t=e+"";return"0"==t&&1/e==-wr?"-0":t}function Oi(e){if(null!=e){try{return Gr.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function ki(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(br);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var u=e.apply(this,r);return n.cache=o.set(i,u),u};return n.cache=new(ki.Cache||ci),n}function Mi(e,t){return e===t||e!=e&&t!=t}ki.Cache=ci;var Pi=Array.isArray;function Li(e){var t=Fi(e)?Ur.call(e):"";return t==Sr||t==Cr}function Fi(e){var t=A(e);return!!e&&("object"==t||"function"==t)}function Ii(e){return!!e&&"object"==A(e)}function Ti(e){return"symbol"==A(e)||Ii(e)&&Ur.call(e)==Rr}function ji(e){return null==e?"":yi(e)}function Vi(e,t,n){var r=null==e?void 0:mi(e,t);return void 0===r?n:r}var Di=Vi;function Bi(e,t,n){return void 0===e[t]?n:e[t]}function zi(e,t,n){var r=Array.isArray(t)?t:t.split("."),i=Kn(r),o=i[0],u=i.slice(1);return qn({},e,Un({},o,r.length>1?zi(e[o]||{},u,n):n))}function Ni(e,t){var n=Array.isArray(t)?t:t.split("."),r=Kn(n),i=r[0],o=r.slice(1);return"object"!==zn(e[i])?e:1===n.length?Object.keys(e).filter((function(e){return e!==i})).reduce((function(t,n){return Object.assign(t,Un({},n,e[n]))}),{}):Object.keys(e).reduce((function(t,n){return qn({},t,Un({},n,n!==i?e[n]:Ni(e[i],o)))}),{})}function Gi(e,t){try{return e.push.apply(e,Qn(t)),e}catch(n){return e.concat(t)}}function Hi(e,t){var n=!0;return e.reduce((function(e,r){return null==r&&(r=""),n?(n=!1,"".concat(r)):"".concat(e).concat(t).concat(r)}),"")}var Ui={getProp:Bi,setProp:zi,unsetProp:Ni,fastJoin:Hi,flattenReducer:Gi},qi=Ui.getProp,Yi=Ui.fastJoin,Wi=Ui.flattenReducer,Ji=function(){function e(t){Nn(this,e),this.opts=this.preprocessOpts(t)}return Hn(e,[{key:"preprocessOpts",value:function(e){var t=Object.assign({},e);return t.transforms=Array.isArray(t.transforms)?t.transforms:t.transforms?[t.transforms]:[],t.delimiter=t.delimiter||",",t.eol=t.eol||vr.EOL,t.quote="string"==typeof t.quote?t.quote:'"',t.escapedQuote="string"==typeof t.escapedQuote?t.escapedQuote:"".concat(t.quote).concat(t.quote),t.header=!1!==t.header,t.includeEmptyRows=t.includeEmptyRows||!1,t.withBOM=t.withBOM||!1,t}},{key:"preprocessFieldsInfo",value:function(e){var t=this;return e.map((function(e){if("string"==typeof e)return{label:e,value:e.includes(".")||e.includes("[")?function(n){return Di(n,e,t.opts.defaultValue)}:function(n){return qi(n,e,t.opts.defaultValue)}};if("object"===zn(e)){var n="default"in e?e.default:t.opts.defaultValue;if("string"==typeof e.value)return{label:e.label||e.value,value:e.value.includes(".")||e.value.includes("[")?function(t){return Di(t,e.value,n)}:function(t){return qi(t,e.value,n)}};if("function"==typeof e.value){var r=e.label||e.value.name||"",i={label:r,default:n};return{label:r,value:function(t){var r=e.value(t,i);return null==r?n:r}}}}throw new Error("Invalid field info option. "+JSON.stringify(e))}))}},{key:"getHeader",value:function(){var e=this;return Yi(this.opts.fields.map((function(t){return e.processValue(t.label)})),this.opts.delimiter)}},{key:"preprocessRow",value:function(e){return this.opts.transforms.reduce((function(e,t){return e.map((function(e){return t(e)})).reduce(Wi,[])}),[e])}},{key:"processRow",value:function(e){var t=this;if(e){var n=this.opts.fields.map((function(n){return t.processCell(e,n)}));if(this.opts.includeEmptyRows||!n.every((function(e){return void 0===e})))return Yi(n,this.opts.delimiter)}}},{key:"processCell",value:function(e,t){return this.processValue(t.value(e))}},{key:"processValue",value:function(e){if(null!=e){var t=zn(e);if("boolean"!==t&&"number"!==t&&"string"!==t){if(void 0===(e=JSON.stringify(e)))return;'"'===e[0]&&(e=e.replace(/^"(.+)"$/,"$1"))}return"string"==typeof e&&(this.opts.excelStrings?(e.includes(this.opts.quote)&&(e=e.replace(new RegExp(this.opts.quote,"g"),"".concat(this.opts.escapedQuote).concat(this.opts.escapedQuote))),e='"=""'.concat(e,'"""')):(e.includes(this.opts.quote)&&(e=e.replace(new RegExp(this.opts.quote,"g"),this.opts.escapedQuote)),e="".concat(this.opts.quote).concat(e).concat(this.opts.quote))),e}}}]),e}(),$i=Ui.fastJoin,Xi=Ui.flattenReducer,Ki=function(e){function t(e){var n;return Nn(this,t),(n=Xn(this,Wn(t).call(this,e))).opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields)),n}return Yn(t,e),Hn(t,[{key:"parse",value:function(e){var t=this.preprocessData(e);this.opts.fields||(this.opts.fields=t.reduce((function(e,t){return Object.keys(t).forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),this.opts.fields=this.preprocessFieldsInfo(this.opts.fields));var n=this.opts.header?this.getHeader():"",r=this.processData(t);return(this.opts.withBOM?"\ufeff":"")+n+(n&&r?this.opts.eol:"")+r}},{key:"preprocessData",value:function(e){var t=this,n=Array.isArray(e)?e:[e];if(!this.opts.fields&&(0===n.length||"object"!==zn(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(e){return t.preprocessRow(e)})).reduce(Xi,[])}},{key:"processData",value:function(e){var t=this;return $i(e.map((function(e){return t.processRow(e)})).filter((function(e){return e})),this.opts.eol)}}]),t}(Ji),Qi={},Zi=Qi.LEFT_BRACE=1,eo=Qi.RIGHT_BRACE=2,to=Qi.LEFT_BRACKET=3,no=Qi.RIGHT_BRACKET=4,ro=Qi.COLON=5,io=Qi.COMMA=6,oo=Qi.TRUE=7,uo=Qi.FALSE=8,ao=Qi.NULL=9,lo=Qi.STRING=10,so=Qi.NUMBER=11,co=Qi.START=17,fo=Qi.STOP=18,ho=Qi.TRUE1=33,go=Qi.TRUE2=34,po=Qi.TRUE3=35,vo=Qi.FALSE1=49,mo=Qi.FALSE2=50,bo=Qi.FALSE3=51,yo=Qi.FALSE4=52,wo=Qi.NULL1=65,So=Qi.NULL2=66,Co=Qi.NULL3=67,Ro=Qi.NUMBER1=81,_o=Qi.NUMBER3=83,Eo=Qi.STRING1=97,xo=Qi.STRING2=98,Ao=Qi.STRING3=99,Oo=Qi.STRING4=100,ko=Qi.STRING5=101,Mo=Qi.STRING6=102,Po=Qi.VALUE=113,Lo=Qi.KEY=114,Fo=Qi.OBJECT=129,Io=Qi.ARRAY=130,To="\\".charCodeAt(0),jo="/".charCodeAt(0),Vo="\b".charCodeAt(0),Do="\f".charCodeAt(0),Bo="\n".charCodeAt(0),zo="\r".charCodeAt(0),No="\t".charCodeAt(0),Go=65536;function Ho(){this.tState=co,this.value=void 0,this.string=void 0,this.stringBuffer=T.alloc?T.alloc(Go):new T(Go),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=Po,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new T(2),3:new T(3),4:new T(4)},this.offset=-1}Ho.toknam=function(e){for(var t=Object.keys(Qi),n=0,r=t.length;n<r;n++){var i=t[n];if(Qi[i]===e)return i}return e&&"0x"+e.toString(16)};var Uo=Ho.prototype;Uo.onError=function(e){throw e},Uo.charError=function(e,t){this.tState=fo,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(e[t]))+" at position "+t+" in state "+Ho.toknam(this.tState)))},Uo.appendStringChar=function(e){this.stringBufferOffset>=Go&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},Uo.appendStringBuf=function(e,t,n){var r=e.length;"number"==typeof t&&(r="number"==typeof n?n<0?e.length-t+n:n-t:e.length-t),r<0&&(r=0),this.stringBufferOffset+r>Go&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,n),this.stringBufferOffset+=r},Uo.write=function(e){var t;"string"==typeof e&&(e=new T(e));for(var n=0,r=e.length;n<r;n++)if(this.tState===co){if(t=e[n],this.offset++,123===t)this.onToken(Zi,"{");else if(125===t)this.onToken(eo,"}");else if(91===t)this.onToken(to,"[");else if(93===t)this.onToken(no,"]");else if(58===t)this.onToken(ro,":");else if(44===t)this.onToken(io,",");else if(116===t)this.tState=ho;else if(102===t)this.tState=vo;else if(110===t)this.tState=wo;else if(34===t)this.string="",this.stringBufferOffset=0,this.tState=Eo;else if(45===t)this.string="-",this.tState=Ro;else if(t>=48&&t<64)this.string=String.fromCharCode(t),this.tState=_o;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,n)}else if(this.tState===Eo)if(t=e[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]=e[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&&t>=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+n+" in state "+Ho.toknam(this.tState)));if(t>=194&&t<=223&&(this.bytes_in_sequence=2),t>=224&&t<=239&&(this.bytes_in_sequence=3),t>=240&&t<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+n>e.length){for(var o=0;o<=e.length-1-n;o++)this.temp_buffs[this.bytes_in_sequence][o]=e[n+o];this.bytes_remaining=n+this.bytes_in_sequence-e.length,n=e.length-1}else this.appendStringBuf(e,n,n+this.bytes_in_sequence),n=n+this.bytes_in_sequence-1}else if(34===t)this.tState=co,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(lo,this.string),this.offset+=T.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=xo;else{if(!(t>=32))return this.charError(e,n);this.appendStringChar(t)}else if(this.tState===xo)if(34===(t=e[n]))this.appendStringChar(t),this.tState=Eo;else if(92===t)this.appendStringChar(To),this.tState=Eo;else if(47===t)this.appendStringChar(jo),this.tState=Eo;else if(98===t)this.appendStringChar(Vo),this.tState=Eo;else if(102===t)this.appendStringChar(Do),this.tState=Eo;else if(110===t)this.appendStringChar(Bo),this.tState=Eo;else if(114===t)this.appendStringChar(zo),this.tState=Eo;else if(116===t)this.appendStringChar(No),this.tState=Eo;else{if(117!==t)return this.charError(e,n);this.unicode="",this.tState=Ao}else if(this.tState===Ao||this.tState===Oo||this.tState===ko||this.tState===Mo){if(!((t=e[n])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,n);if(this.unicode+=String.fromCharCode(t),this.tState++===Mo){var u=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&u>=56320&&u<57344?(this.appendStringBuf(new T(String.fromCharCode(this.highSurrogate,u))),this.highSurrogate=void 0):void 0===this.highSurrogate&&u>=55296&&u<56320?this.highSurrogate=u:(void 0!==this.highSurrogate&&(this.appendStringBuf(new T(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new T(String.fromCharCode(u)))),this.tState=Eo}}else if(this.tState===Ro||this.tState===_o)switch(t=e[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(t),this.tState=_o;break;default:this.tState=co;var a=Number(this.string);if(isNaN(a))return this.charError(e,n);this.string.match(/[0-9]+/)==this.string&&a.toString()!=this.string?this.onToken(lo,this.string):this.onToken(so,a),this.offset+=this.string.length-1,this.string=void 0,n--}else if(this.tState===ho){if(114!==e[n])return this.charError(e,n);this.tState=go}else if(this.tState===go){if(117!==e[n])return this.charError(e,n);this.tState=po}else if(this.tState===po){if(101!==e[n])return this.charError(e,n);this.tState=co,this.onToken(oo,!0),this.offset+=3}else if(this.tState===vo){if(97!==e[n])return this.charError(e,n);this.tState=mo}else if(this.tState===mo){if(108!==e[n])return this.charError(e,n);this.tState=bo}else if(this.tState===bo){if(115!==e[n])return this.charError(e,n);this.tState=yo}else if(this.tState===yo){if(101!==e[n])return this.charError(e,n);this.tState=co,this.onToken(uo,!1),this.offset+=4}else if(this.tState===wo){if(117!==e[n])return this.charError(e,n);this.tState=So}else if(this.tState===So){if(108!==e[n])return this.charError(e,n);this.tState=Co}else if(this.tState===Co){if(108!==e[n])return this.charError(e,n);this.tState=co,this.onToken(ao,null),this.offset+=3}},Uo.onToken=function(e,t){},Uo.parseError=function(e,t){this.tState=fo,this.onError(new Error("Unexpected "+Ho.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+Ho.toknam(this.state)))},Uo.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Uo.pop=function(){var e=this.value,t=this.stack.pop();this.value=t.value,this.key=t.key,this.mode=t.mode,this.emit(e),this.mode||(this.state=Po)},Uo.emit=function(e){this.mode&&(this.state=io),this.onValue(e)},Uo.onValue=function(e){},Uo.onToken=function(e,t){if(this.state===Po)if(e===lo||e===so||e===oo||e===uo||e===ao)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===Zi)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Lo,this.mode=Fo;else if(e===to)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Io,this.state=Po;else if(e===eo){if(this.mode!==Fo)return this.parseError(e,t);this.pop()}else{if(e!==no)return this.parseError(e,t);if(this.mode!==Io)return this.parseError(e,t);this.pop()}else if(this.state===Lo)if(e===lo)this.key=t,this.state=ro;else{if(e!==eo)return this.parseError(e,t);this.pop()}else if(this.state===ro){if(e!==ro)return this.parseError(e,t);this.state=Po}else{if(this.state!==io)return this.parseError(e,t);if(e===io)this.mode===Io?(this.key++,this.state=Po):this.mode===Fo&&(this.state=Lo);else{if(!(e===no&&this.mode===Io||e===eo&&this.mode===Fo))return this.parseError(e,t);this.pop()}}},Ho.C=Qi;var qo=Ho,Yo=function(e){function t(e,n){var r;return Nn(this,t),r=Xn(this,Wn(t).call(this,n)),Object.getOwnPropertyNames(Ji.prototype).forEach((function(e){return r[e]=Ji.prototype[e]})),r.opts=r.preprocessOpts(e),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 Yn(t,e),Hn(t,[{key:"initObjectModeParse",value:function(){var e=this;this.parser={write:function(t){e.pushLine(t)},getPendingData:function(){}}}},{key:"initNDJSONParse",value:function(){var e=this;this.parser={_data:"",write:function(t){this._data+=t.toString();var n=this._data.split("\n").map((function(e){return e.trim()})).filter((function(e){return""!==e})),r=!1;n.forEach((function(t,i){try{e.pushLine(JSON.parse(t))}catch(o){i===n.length-1?r=!0:(o.message="Invalid JSON (".concat(t,")"),e.emit("error",o))}})),this._data=r?this._data.slice(this._data.lastIndexOf("\n")):""},getPendingData:function(){return this._data}}}},{key:"initJSONParser",value:function(){var e=this;this.parser=new qo,this.parser.onValue=function(t){this.stack.length===this.depthToEmit&&e.pushLine(t)},this.parser._onToken=this.parser.onToken,this.parser.onToken=function(t,n){e.parser._onToken(t,n),0!==this.stack.length||e.opts.fields||this.mode===qo.C.ARRAY||this.mode===qo.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===qo.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(t){t.message.includes("Unexpected")&&(t.message="Invalid JSON (".concat(t.message,")")),e.emit("error",t)}}},{key:"_transform",value:function(e,t,n){this.parser.write(e),n()}},{key:"_flush",value:function(e){this.parser.getPendingData()&&e(new Error("Invalid data received from stdin",this.parser.getPendingData())),e()}},{key:"pushHeader",value:function(){if(this.opts.header){var e=this.getHeader();this.emit("header",e),this.push(e),this._hasWritten=!0}}},{key:"pushLine",value:function(e){var t=this,n=this.preprocessRow(e);this._hasWritten||(this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(Object.keys(n[0])),this.pushHeader()),n.forEach((function(e){var n=t.processRow(e,t.opts);void 0!==n&&(t.emit("line",n),t.push(t._hasWritten?t.opts.eol+n:n),t._hasWritten=!0)}))}}]),t}(Bn.Transform),Wo=Yo,Jo=Bn.Transform,$o=Ui.fastJoin,Xo=function(){function e(t,n){Nn(this,e),this.input=new Jo(n),this.input._read=function(){},this.transform=new Wo(t,n),this.processor=this.input.pipe(this.transform)}return Hn(e,[{key:"fromInput",value:function(e){if(this._input)throw new Error("Async parser already has an input.");return this._input=e,this.input=this._input.pipe(this.processor),this}},{key:"throughTransform",value:function(e){if(this._output)throw new Error("Can't add transforms once an output has been added.");return this.processor=this.processor.pipe(e),this}},{key:"toOutput",value:function(e){if(this._output)throw new Error("Async parser already has an output.");return this._output=e,this.processor=this.processor.pipe(e),this}},{key:"promise",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise((function(n,r){if(t){var i=[];e.processor.on("data",(function(e){return i.push(e.toString())})).on("finish",(function(){return n($o(i,""))})).on("error",(function(e){return r(e)}))}else e.processor.on("finish",(function(){return n()})).on("error",(function(e){return r(e)}))}))}}]),e}(),Ko=Xo;function Qo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.objects,n=void 0===t||t,r=e.arrays,i=void 0!==r&&r,o=e.separator,u=void 0===o?".":o;function a(e,t,r){return Object.keys(e).forEach((function(o){var l=r?"".concat(r).concat(u).concat(o):o,s=e[o];n&&"object"===zn(s)&&null!==s&&!Array.isArray(s)&&"[object Function]"!==Object.prototype.toString.call(s.toJSON)&&Object.keys(s).length||i&&Array.isArray(s)?a(s,t,l):t[l]=s})),t}return function(e){return a(e,{})}}var Zo=Qo,eu=Ui.setProp,tu=Ui.unsetProp,nu=Ui.flattenReducer;function ru(e,t){return Object.keys(e).reduce((function(n,r){var i=t?"".concat(t,".").concat(r):r,o=e[r];return"object"===zn(o)&&null!==o&&!Array.isArray(o)&&"[object Function]"!==Object.prototype.toString.call(o.toJSON)&&Object.keys(o).length?n=n.concat(ru(o,i)):Array.isArray(o)&&(n.push(i),n=n.concat(o.map((function(e){return ru(e,i)})).reduce(nu,[]).filter((function(e,t,n){return n.indexOf(e)!==t})))),n}),[])}function iu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.paths,n=void 0===t?void 0:t,r=e.blankOut,i=void 0!==r&&r;function o(e,t){return e.map((function(e){var n=Di(e,t);return Array.isArray(n)?n.length?n.map((function(n,r){return eu(i&&r>0?{}:e,t,n)})):tu(e,t):e})).reduce(nu,[])}return n=Array.isArray(n)?n:n?[n]:void 0,function(e){return(n||ru(e)).reduce(o,[e])}}var ou=iu,uu=Bn.Readable,au=Ki,lu=Ko,su=Wo,cu=function(e,t){return new Ki(t).parse(e)},fu=function(e,t,n){try{e instanceof uu||(n=Object.assign({},n,{objectMode:!0}));var r=new Ko(t,n),i=r.promise();return Array.isArray(e)?(e.forEach((function(e){return r.input.push(e)})),r.input.push(null)):e instanceof uu?r.fromInput(e):(r.input.push(e),r.input.push(null)),i}catch(o){return Promise.reject(o)}},du={flatten:Zo,unwind:ou},hu={Parser:au,AsyncParser:lu,Transform:su,parse:cu,parseAsync:fu,transforms:du};e.AsyncParser=lu,e.Parser=au,e.Transform=su,e.default=hu,e.parse=cu,e.parseAsync=fu,e.transforms=du,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Ie.exports);var Te=X.div(c||(c=O(["\n padding: ",";\n display: flex;\n background-color: ",";\n box-shadow: ",";\n justify-content: flex-end;\n border-top: 1px solid ",";\n"])),K["--ll-spacing-medium"],K["--ll-color-surface"],K["--ll-shadow-medium"],K["--ll-color-border"]),je=X.div(f||(f=O(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),K["--ll-spacing-medium"]),Ve={all:function(){return["profiles"]},list:function(e){return[].concat(R(Ve.all()),[e])}};var De=function(){var e,t,n,r,i,o,u,a=ye().dataExplorerState,l=oe().translations,s=(e={lat:a.location.lat,lng:a.location.lng,enabled:a.scores.checked,include:a.scores.include},t=e.lat,n=e.lng,r=e.include,i=e.enabled,o=ie().client,u={lat:t,lng:n,geographyLevels:["10","30"],locationScoresRounding:!1,include:r},me(D.list(u),x(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.getScores(u));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!u&&i})),c=s.data,f=s.isFetching,d=function(e){var t=e.lat,n=e.lng,r=e.enabled,i=e.include,o=e.limit,u=e.radius,a=ie().client,l={lat:t,lng:n,limit:o,radius:u,include:i};return me(z.list(l),x(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.getPois(l));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!l&&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}),h=d.data,g=d.isFetching,p=function(e){var t=e.lat,n=e.lng,r=e.enabled,i=e.limit,o=e.radius,u=ie().client,a={lat:t,lng:n,limit:i,radius:o};return me(B.list(a),x(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.getSchools(a));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!a&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.schools.checked,limit:a.pois.limit,radius:a.pois.radius}),v=p.data,m=p.isFetching,b=function(e){var t=e.lat,n=e.lng,r=e.enabled,i=e.radius,o=ie().client,u={lat:t,lng:n,radius:i};return me(be.list(u),x(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.getDemographics(u));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!u&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.demographics.checked,radius:a.demographics.radius}),y=b.data,w=b.isFetching,S=function(e){var t=e.lat,n=e.lng,r=e.enabled,i=ie().client,o={lat:t,lng:n};return me(Ve.list(o),x(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i.getProfiles(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.profiles.checked}),C=S.data,R=S.isFetching,E=J.exports.useMemo((function(){return M(M(M(M(M({},c&&a.scores.checked&&{scores:c}),h&&a.pois.checked&&{pois:h}),v&&a.schools.checked&&{schools:v}),y&&a.demographics.checked&&{demographics:y}),C&&a.profiles.checked&&{profiles:C})}),[h,c,v,C,y,a]),A=f||g||m||w||R,O=Object.keys(E).length;return Z(Te,{children:[A&&$(je,{children:$(ue,{})}),Z(ae,{variant:"contained",onClick:function(e){e.preventDefault(),se.downloadFile({data:JSON.stringify(E),fileName:"local-logic-data",fileType:"json"})},disabled:!Object.keys(E).length||A,children:[l.EXPORT," JSON"]}),$(le,{spacing:"--ll-spacing-xx-small"}),Z(ae,{variant:"contained",onClick:function(e){var t,n,r,i;e.preventDefault(),c&&(t=c.location,n="scores",r=Object.entries(t).map((function(e){var t=L(e,2);return M({score:t[0]},t[1])})),(i=Ie.exports.parse(r))&&se.downloadFile({data:i,fileName:n,fileType:"csv"})),function(){if(h){var e=Object.entries(h).map((function(e){var t=L(e,2),n=t[0];return t[1].map((function(e){return M({poi:n},e)}))})).flat(),t=Ie.exports.parse(e);t&&se.downloadFile({data:t,fileName:"pois",fileType:"csv"})}}(),function(){if(v){var e=Object.entries(v).map((function(e){var t=L(e,2),n=t[0];return t[1].map((function(e){return M({school:n},e)}))})).flat(),t=Ie.exports.parse(e);t&&se.downloadFile({data:t,fileName:"schools",fileType:"csv"})}}(),function(){if(y){var e=Object.entries(y).map((function(e){var t=L(e,2);return M({demographic:t[0]},t[1])})),t=Ie.exports.parse(e);t&&se.downloadFile({data:t,fileName:"demographics",fileType:"csv"})}}(),function(){if(C){var e=[C],t=Ie.exports.parse(e,{fields:["id","intro","name","profiles.character","profiles.housing","profiles.services","profiles.transport"]});t&&se.downloadFile({data:t,fileName:"profiles",fileType:"csv"})}}()},disabled:!O||A,children:[l.EXPORT," CSV (",O,")"]})]})},Be=X.div(d||(d=O(["\n height: 400px;\n display: flex;\n border: 2px solid ",";\n position: relative;\n border-radius: ",";\n overflow: hidden;\n"])),K["--ll-color-on-background"],K["--ll-border-radius-small"]),ze=X.div(h||(h=O(["\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"])),K["--ll-color-on-background"],K["--ll-spacing-xx-small"],K["--ll-spacing-x-small"],K["--ll-font-family-mono"],K["--ll-color-background"]),Ne=function(){var e,t,n,r,i=J.exports.useRef(),o=L(J.exports.useState(!0),2),u=o[0],a=o[1],l=ye(),s=l.dataExplorerState,c=l.setDataExplorerState,f=W().sdkState,d=L(J.exports.useState(!1),2),h=d[0],g=d[1],p=J.exports.useRef(),v=J.exports.useRef(!1),m=oe().translations,b="night"===(null==f||null===(e=f.globalOptions)||void 0===e||null===(t=e.appearance)||void 0===t?void 0:t.theme)?"basic-v2-dark":"600d69cb-288d-445e-9839-3dfe4d76b31a",y={position:"absolute",top:"0",left:"0",height:"100%",width:"100%"};return Z("div",{children:[$(N,{placeholder:m.SEARCH_MAP,renderListAbove:!1,onSearch:function(e){var t;c({location:{lat:e.latitude,lng:e.longitude}}),null==i||null===(t=i.current)||void 0===t||t.flyTo({center:[e.longitude,e.latitude],duration:2e3,essential:!0})}}),$(le,{vertical:!0,spacing:"--ll-spacing-small"}),Z(Be,{children:[u&&$(ce,{height:"400px",width:"100%"}),Z(G,{ref:i,style:u?M({visibility:"hidden"},y):y,onLoad:function(){return a(!1)},mapLib:H,mapStyle:"https://api.maptiler.com/maps/".concat(b,"/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(e){p.current=setTimeout((function(){v.current||g(!0)}),1e3)},onMouseUp:function(e){h&&c({location:{lat:e.lngLat.lat,lng:e.lngLat.lng}}),clearTimeout(p.current),g(!1)},onDragStart:function(){v.current=!0},onDragEnd:function(){v.current=!1},children:[$(ze,{children:Z(ee,{noMargin:!0,family:"mono",children:["Lat:"," ",Math.round(1e5*s.location.lat)/1e5,", Lng:"," ",Math.round(1e5*s.location.lng)/1e5]})}),$(U,{showCompass:!0,style:{marginTop:16,marginRight:16}}),$(q,{marker:M({icon:"pin"},s.location)})]})]})]})},Ge=X.div(g||(g=O(["\n margin: 2px;\n display: inline-block;\n"]))),He=function(){var e=ye(),t=e.dataExplorerState,n=e.setDataExplorerState,r=Object.keys(fe).filter((function(e){return Number.isNaN(Number(e))}));return $(de,{children:r.map((function(e){var r=t.scores.include.includes(e);return $(Ge,{children:$(he.Root,{options:{score:e,scoresData:void 0},children:$(ae,{size:"small",variant:r?"contained":"outlined",onClick:function(){n(r?{scores:M(M({},t.scores),{},{include:t.scores.include.filter((function(t){return t!==e}))})}:{scores:M(M({},t.scores),{},{include:[].concat(R(t.scores.include),[e])})})},children:$(he.Title,{options:{isRawText:!0}})})})},e)}))})},Ue=X.div(p||(p=O(["\n margin: 2px;\n display: inline-block;\n"]))),qe=function(){var e=oe().translations,t=ye(),n=t.dataExplorerState,r=t.setDataExplorerState,i=Object.keys(ge).filter((function(e){return Number.isNaN(Number(e))}));return Z(de,{children:[i.map((function(e){var t=n.pois.include.includes(e);return $(Ue,{children:$(pe.Root,{options:{poi:e},children:$(ae,{size:"small",variant:t?"contained":"outlined",onClick:function(){r(t?{pois:M(M({},n.pois),{},{include:n.pois.include.filter((function(t){return t!==e}))})}:{pois:M(M({},n.pois),{},{include:[].concat(R(n.pois.include),[e])})})},children:$(pe.Title,{options:{isRawText:!0}})})})},e)})),$(ve,{showValue:!0,label:"".concat(e.RADIUS," (m)"),min:100,max:25e3,step:100,value:[n.pois.radius],onValueChange:function(e){r({pois:M(M({},n.pois),{},{radius:e[0]})})}}),$(ve,{showValue:!0,label:e.LIMIT,min:1,max:30,step:1,value:[n.pois.limit],onValueChange:function(e){r({pois:M(M({},n.pois),{},{limit:e[0]})})}})]})},Ye=function(){var e=oe().translations,t=ye(),n=t.dataExplorerState,r=t.setDataExplorerState;return Z(de,{children:[$(ve,{showValue:!0,label:"".concat(e.RADIUS," (m)"),min:100,max:25e3,step:100,value:[n.schools.radius],onValueChange:function(e){r({schools:M(M({},n.schools),{},{radius:e[0]})})}}),$(ve,{showValue:!0,label:e.LIMIT,min:1,max:30,step:1,value:[n.schools.limit],onValueChange:function(e){r({schools:M(M({},n.schools),{},{limit:e[0]})})}})]})},We=function(){var e=oe().translations,t=ye(),n=t.dataExplorerState,r=t.setDataExplorerState;return $(ve,{showValue:!0,label:"".concat(e.RADIUS," (m)"),min:500,max:5e3,step:100,value:[n.demographics.radius],onValueChange:function(e){r({demographics:M(M({},n.demographics),{},{radius:e[0]})})}})};
|
|
2
|
+
/**
|
|
3
|
+
* table-core
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) TanStack
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
9
|
+
*
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/
|
|
12
|
+
function Je(e,t){return"function"==typeof e?e(t):e}function $e(e,t){return function(n){t.setState((function(t){return M(M({},t),{},P({},e,Je(n,t[e])))}))}}function Xe(e){return e instanceof Function}function Ke(e,t,n){var r,i=[];return function(){var o;n.key&&n.debug&&(o=Date.now());var u,a=e();if(!(a.length!==i.length||a.some((function(e,t){return i[t]!==e}))))return r;if(i=a,n.key&&n.debug&&(u=Date.now()),r=t.apply(void 0,R(a)),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){var l=Math.round(100*(Date.now()-o))/100,s=Math.round(100*(Date.now()-u))/100,c=s/16,f=function(e,t){for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ ".concat(f(s,5)," /").concat(f(l,5)," ms"),"\n font-size: .6rem;\n font-weight: bold;\n color: hsl(".concat(Math.max(0,Math.min(120-120*c,120)),"deg 100% 31%);"),null==n?void 0:n.key)}return r}}function Qe(e,t,n){var r,i={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:function(){var e=[];return function t(n){n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)}(i),e},getContext:function(){return{table:e,header:i,column:t}}};return e._features.forEach((function(t){Object.assign(i,null==t.createHeader?void 0:t.createHeader(i,e))})),i}var Ze={createTable:function(e){return{getHeaderGroups:Ke((function(){return[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]}),(function(t,n,r,i){var o,u,a=null!=(o=null==r?void 0:r.map((function(e){return n.find((function(t){return t.id===e}))})).filter(Boolean))?o:[],l=null!=(u=null==i?void 0:i.map((function(e){return n.find((function(t){return t.id===e}))})).filter(Boolean))?u:[],s=n.filter((function(e){return!(null!=r&&r.includes(e.id)||null!=i&&i.includes(e.id))}));return et(t,[].concat(R(a),R(s),R(l)),e)}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:Ke((function(){return[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]}),(function(t,n,r,i){return et(t,n=n.filter((function(e){return!(null!=r&&r.includes(e.id)||null!=i&&i.includes(e.id))})),e,"center")}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:Ke((function(){return[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]}),(function(t,n,r){var i;return et(t,null!=(i=null==r?void 0:r.map((function(e){return n.find((function(t){return t.id===e}))})).filter(Boolean))?i:[],e,"left")}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:Ke((function(){return[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]}),(function(t,n,r){var i;return et(t,null!=(i=null==r?void 0:r.map((function(e){return n.find((function(t){return t.id===e}))})).filter(Boolean))?i:[],e,"right")}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:Ke((function(){return[e.getHeaderGroups()]}),(function(e){return R(e).reverse()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:Ke((function(){return[e.getLeftHeaderGroups()]}),(function(e){return R(e).reverse()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:Ke((function(){return[e.getCenterHeaderGroups()]}),(function(e){return R(e).reverse()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:Ke((function(){return[e.getRightHeaderGroups()]}),(function(e){return R(e).reverse()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:Ke((function(){return[e.getHeaderGroups()]}),(function(e){return e.map((function(e){return e.headers})).flat()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:Ke((function(){return[e.getLeftHeaderGroups()]}),(function(e){return e.map((function(e){return e.headers})).flat()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:Ke((function(){return[e.getCenterHeaderGroups()]}),(function(e){return e.map((function(e){return e.headers})).flat()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:Ke((function(){return[e.getRightHeaderGroups()]}),(function(e){return e.map((function(e){return e.headers})).flat()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:Ke((function(){return[e.getCenterFlatHeaders()]}),(function(e){return e.filter((function(e){var t;return!(null!=(t=e.subHeaders)&&t.length)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:Ke((function(){return[e.getLeftFlatHeaders()]}),(function(e){return e.filter((function(e){var t;return!(null!=(t=e.subHeaders)&&t.length)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:Ke((function(){return[e.getRightFlatHeaders()]}),(function(e){return e.filter((function(e){var t;return!(null!=(t=e.subHeaders)&&t.length)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:Ke((function(){return[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]}),(function(e,t,n){var r,i,o,u,a,l;return[].concat(R(null!=(r=null==(i=e[0])?void 0:i.headers)?r:[]),R(null!=(o=null==(u=t[0])?void 0:u.headers)?o:[]),R(null!=(a=null==(l=n[0])?void 0:l.headers)?a:[])).map((function(e){return e.getLeafHeaders()})).flat()}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})}}};function et(e,t,n,r){var i,o,u=0;!function e(t,n){void 0===n&&(n=1),u=Math.max(u,n),t.filter((function(e){return e.getIsVisible()})).forEach((function(t){var r;null!=(r=t.columns)&&r.length&&e(t.columns,n+1)}),0)}(e);var a=[];!function e(t,i){var o={depth:i,id:[r,"".concat(i)].filter(Boolean).join("_"),headers:[]},u=[];t.forEach((function(e){var t,a=[].concat(u).reverse()[0],l=!1;if(e.column.depth===o.depth&&e.column.parent?t=e.column.parent:(t=e.column,l=!0),a&&(null==a?void 0:a.column)===t)a.subHeaders.push(e);else{var s=Qe(n,t,{id:[r,i,t.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?"".concat(u.filter((function(e){return e.column===t})).length):void 0,depth:i,index:u.length});s.subHeaders.push(e),u.push(s)}o.headers.push(e),e.headerGroup=o})),a.push(o),i>0&&e(u,i-1)}(t.map((function(e,t){return Qe(n,e,{depth:u,index:t})})),u-1),a.reverse();return function e(t){return t.filter((function(e){return e.column.getIsVisible()})).map((function(t){var n=0,r=0,i=[0];return t.subHeaders&&t.subHeaders.length?(i=[],e(t.subHeaders).forEach((function(e){var t=e.colSpan,r=e.rowSpan;n+=t,i.push(r)}))):n=1,r+=Math.min.apply(Math,R(i)),t.colSpan=n,t.rowSpan=r,{colSpan:n,rowSpan:r}}))}(null!=(i=null==(o=a[0])?void 0:o.headers)?i:[]),a}var tt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},nt={getDefaultColumnDef:function(){return tt},getInitialState:function(e){return M({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}},e)},getDefaultOptions:function(e){return{columnResizeMode:"onEnd",onColumnSizingChange:$e("columnSizing",e),onColumnSizingInfoChange:$e("columnSizingInfo",e)}},createColumn:function(e,t){return{getSize:function(){var n,r,i,o=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:tt.minSize,null!=(r=null!=o?o:e.columnDef.size)?r:tt.size),null!=(i=e.columnDef.maxSize)?i:tt.maxSize)},getStart:function(n){var r=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),i=r.findIndex((function(t){return t.id===e.id}));if(i>0){var o=r[i-1];return o.getStart(n)+o.getSize()}return 0},resetSize:function(){t.setColumnSizing((function(t){var n=e.id;t[n];return w(t,[n].map(S))}))},getCanResize:function(){var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},getIsResizing:function(){return t.getState().columnSizingInfo.isResizingColumn===e.id}}},createHeader:function(e,t){return{getSize:function(){var t=0;return function e(n){var r;n.subHeaders.length?n.subHeaders.forEach(e):t+=null!=(r=n.column.getSize())?r:0}(e),t},getStart:function(){if(e.index>0){var t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:function(){var n=t.getColumn(e.column.id),r=null==n?void 0:n.getCanResize();return function(i){if(n&&r&&(null==i.persist||i.persist(),!(it(i)&&i.touches&&i.touches.length>1))){var o=e.getSize(),u=e?e.getLeafHeaders().map((function(e){return[e.column.id,e.column.getSize()]})):[[n.id,n.getSize()]],a=it(i)?Math.round(i.touches[0].clientX):i.clientX,l={},s=function(e,n){"number"==typeof n&&(t.setColumnSizingInfo((function(e){var t,r,i=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),o=Math.max(i/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((function(e){var t=L(e,2),n=t[0],r=t[1];l[n]=Math.round(100*Math.max(r+r*o,0))/100})),M(M({},e),{},{deltaOffset:i,deltaPercentage:o})})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((function(e){return M(M({},e),l)})))},c=function(e){return s("move",e)},f=function(e){s("end",e),t.setColumnSizingInfo((function(e){return M(M({},e),{},{isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})}))},d={moveHandler:function(e){return c(e.clientX)},upHandler:function(e){document.removeEventListener("mousemove",d.moveHandler),document.removeEventListener("mouseup",d.upHandler),f(e.clientX)}},h={moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1},upHandler:function(e){var t;document.removeEventListener("touchmove",h.moveHandler),document.removeEventListener("touchend",h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof rt)return rt;var e=!1;try{var t={get passive(){return e=!0,!1}},n=function(){};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(r){e=!1}return rt=e}()&&{passive:!1};it(i)?(document.addEventListener("touchmove",h.moveHandler,g),document.addEventListener("touchend",h.upHandler,g)):(document.addEventListener("mousemove",d.moveHandler,g),document.addEventListener("mouseup",d.upHandler,g)),t.setColumnSizingInfo((function(e){return M(M({},e),{},{startOffset:a,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:n.id})}))}}}}},createTable:function(e){return{setColumnSizing:function(t){return null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t)},setColumnSizingInfo:function(t){return null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t)},resetColumnSizing:function(t){var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:function(t){var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:function(){var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getLeftTotalSize:function(){var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getCenterTotalSize:function(){var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getRightTotalSize:function(){var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0}}}},rt=null;function it(e){return"touchstart"===e.type}var ot={getInitialState:function(e){return M({expanded:{}},e)},getDefaultOptions:function(e){return{onExpandedChange:$e("expanded",e),paginateExpandedRows:!0}},createTable:function(e){var t=!1,n=!1;return{_autoResetExpanded:function(){var r,i;if(t){if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((function(){e.resetExpanded(),n=!1}))}}else e._queue((function(){t=!0}))},setExpanded:function(t){return null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t)},toggleAllRowsExpanded:function(t){(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:function(t){var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},getCanSomeRowsExpand:function(){return e.getRowModel().flatRows.some((function(e){return e.getCanExpand()}))},getToggleAllRowsExpandedHandler:function(){return function(t){null==t.persist||t.persist(),e.toggleAllRowsExpanded()}},getIsSomeRowsExpanded:function(){var t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:function(){var t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((function(e){return!e.getIsExpanded()}))},getExpandedDepth:function(){var t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((function(e){var n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:function(){return e.getSortedRowModel()},getExpandedRowModel:function(){return!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel()}}},createRow:function(e,t){return{toggleExpanded:function(n){t.setExpanded((function(r){var i,o=!0===r||!(null==r||!r[e.id]),u={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((function(e){u[e]=!0})):u=r,n=null!=(i=n)?i:!o,!o&&n)return M(M({},u),{},P({},e.id,!0));if(o&&!n){var a=u,l=e.id;a[l];return w(a,[l].map(S))}return r}))},getIsExpanded:function(){var n,r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},getCanExpand:function(){var n,r,i;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(i=e.subRows)||!i.length)},getToggleExpandedHandler:function(){var t=e.getCanExpand();return function(){t&&e.toggleExpanded()}}}}},ut=function(e,t,n){var r,i=n.toLowerCase();return Boolean(null==(r=e.getValue(t))?void 0:r.toLowerCase().includes(i))};ut.autoRemove=function(e){return vt(e)};var at=function(e,t,n){var r;return Boolean(null==(r=e.getValue(t))?void 0:r.includes(n))};at.autoRemove=function(e){return vt(e)};var lt=function(e,t,n){var r;return(null==(r=e.getValue(t))?void 0:r.toLowerCase())===n.toLowerCase()};lt.autoRemove=function(e){return vt(e)};var st=function(e,t,n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};st.autoRemove=function(e){return vt(e)||!(null!=e&&e.length)};var ct=function(e,t,n){return!n.some((function(n){var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}))};ct.autoRemove=function(e){return vt(e)||!(null!=e&&e.length)};var ft=function(e,t,n){return n.some((function(n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}))};ft.autoRemove=function(e){return vt(e)||!(null!=e&&e.length)};var dt=function(e,t,n){return e.getValue(t)===n};dt.autoRemove=function(e){return vt(e)};var ht=function(e,t,n){return e.getValue(t)==n};ht.autoRemove=function(e){return vt(e)};var gt=function(e,t,n){var r=L(n,2),i=r[0],o=r[1],u=e.getValue(t);return u>=i&&u<=o};gt.resolveFilterValue=function(e){var t=L(e,2),n=t[0],r=t[1],i="number"!=typeof n?parseFloat(n):n,o="number"!=typeof r?parseFloat(r):r,u=null===n||Number.isNaN(i)?-1/0:i,a=null===r||Number.isNaN(o)?1/0:o;if(u>a){var l=u;u=a,a=l}return[u,a]},gt.autoRemove=function(e){return vt(e)||vt(e[0])&&vt(e[1])};var pt={includesString:ut,includesStringSensitive:at,equalsString:lt,arrIncludes:st,arrIncludesAll:ct,arrIncludesSome:ft,equals:dt,weakEquals:ht,inNumberRange:gt};function vt(e){return null==e||""===e}function mt(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}var bt={sum:function(e,t,n){return n.reduce((function(t,n){var r=n.getValue(e);return t+("number"==typeof r?r:0)}),0)},min:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)})),r},extent:function(e,t,n){var r,i;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))})),[r,i]},mean:function(e,t){var n=0,r=0;if(t.forEach((function(t){var i=t.getValue(e);null!=i&&(i=+i)>=i&&(++n,r+=i)})),n)return r/n},median:function(e,t){if(t.length){var n=0,r=0;return t.forEach((function(t){var i=t.getValue(e);"number"==typeof i&&(n=Math.min(n,i),r=Math.max(r,i))})),(n+r)/2}},unique:function(e,t){return Array.from(new Set(t.map((function(t){return t.getValue(e)}))).values())},uniqueCount:function(e,t){return new Set(t.map((function(t){return t.getValue(e)}))).size},count:function(e,t){return t.length}};var yt={getInitialState:function(e){return M({rowSelection:{}},e)},getDefaultOptions:function(e){return{onRowSelectionChange:$e("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}},createTable:function(e){return{setRowSelection:function(t){return null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t)},resetRowSelection:function(t){var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},toggleAllRowsSelected:function(t){e.setRowSelection((function(n){t=void 0!==t?t:!e.getIsAllRowsSelected();var r=M({},n),i=e.getPreGroupedRowModel().flatRows;return t?i.forEach((function(e){e.getCanSelect()&&(r[e.id]=!0)})):i.forEach((function(e){delete r[e.id]})),r}))},toggleAllPageRowsSelected:function(t){return e.setRowSelection((function(n){var r=void 0!==t?t:!e.getIsAllPageRowsSelected(),i=M({},n);return e.getRowModel().rows.forEach((function(t){wt(i,t.id,r,e)})),i}))},getPreSelectedRowModel:function(){return e.getCoreRowModel()},getSelectedRowModel:Ke((function(){return[e.getState().rowSelection,e.getCoreRowModel()]}),(function(t,n){return Object.keys(t).length?St(e,n):{rows:[],flatRows:[],rowsById:{}}}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:Ke((function(){return[e.getState().rowSelection,e.getFilteredRowModel()]}),(function(t,n){return Object.keys(t).length?St(e,n):{rows:[],flatRows:[],rowsById:{}}}),{key:"getFilteredSelectedRowModel",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:Ke((function(){return[e.getState().rowSelection,e.getSortedRowModel()]}),(function(t,n){return Object.keys(t).length?St(e,n):{rows:[],flatRows:[],rowsById:{}}}),{key:"getGroupedSelectedRowModel",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:function(){var t=e.getFilteredRowModel().flatRows,n=e.getState().rowSelection,r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((function(e){return e.getCanSelect()&&!n[e.id]}))&&(r=!1),r},getIsAllPageRowsSelected:function(){var t=e.getPaginationRowModel().flatRows,n=e.getState().rowSelection,r=!!t.length;return r&&t.some((function(e){return e.getCanSelect()&&!n[e.id]}))&&(r=!1),r},getIsSomeRowsSelected:function(){var t,n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},getIsSomePageRowsSelected:function(){var t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.some((function(e){return e.getIsSelected()||e.getIsSomeSelected()}))},getToggleAllRowsSelectedHandler:function(){return function(t){e.toggleAllRowsSelected(t.target.checked)}},getToggleAllPageRowsSelectedHandler:function(){return function(t){e.toggleAllPageRowsSelected(t.target.checked)}}}},createRow:function(e,t){return{toggleSelected:function(n){var r=e.getIsSelected();t.setRowSelection((function(i){if(r===(n=void 0!==n?n:!r))return i;var o=M({},i);return wt(o,e.id,n,t),o}))},getIsSelected:function(){var n=t.getState().rowSelection;return Ct(e,n)},getIsSomeSelected:function(){var n=t.getState().rowSelection;return"some"===Rt(e,n)},getIsAllSubRowsSelected:function(){var n=t.getState().rowSelection;return"all"===Rt(e,n)},getCanSelect:function(){var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},getCanSelectSubRows:function(){var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},getCanMultiSelect:function(){var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},getToggleSelectedHandler:function(){var t=e.getCanSelect();return function(n){var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}}},wt=function e(t,n,r,i){var o,u=i.getRow(n);r?(u.getCanMultiSelect()||Object.keys(t).forEach((function(e){return delete t[e]})),u.getCanSelect()&&(t[n]=!0)):delete t[n],null!=(o=u.subRows)&&o.length&&u.getCanSelectSubRows()&&u.subRows.forEach((function(n){return e(t,n.id,r,i)}))};function St(e,t){var n=e.getState().rowSelection,r=[],i={};return{rows:function e(t,o){return t.map((function(t){var o,u=Ct(t,n);if(u&&(r.push(t),i[t.id]=t),null!=(o=t.subRows)&&o.length&&(t=M(M({},t),{},{subRows:e(t.subRows)})),u)return t})).filter(Boolean)}(t.rows),flatRows:r,rowsById:i}}function Ct(e,t){var n;return null!=(n=t[e.id])&&n}function Rt(e,t,n){if(e.subRows&&e.subRows.length){var r=!0,i=!1;return e.subRows.forEach((function(e){i&&!r||(Ct(e,t)?i=!0:r=!1)})),r?"all":!!i&&"some"}return!1}var _t=/([0-9]+)/gm;function Et(e,t){return e===t?0:e>t?1:-1}function xt(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function At(e,t){for(var n=e.split(_t).filter(Boolean),r=t.split(_t).filter(Boolean);n.length&&r.length;){var i=n.shift(),o=r.shift(),u=parseInt(i,10),a=parseInt(o,10),l=[u,a].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1}else{if(isNaN(l[1]))return isNaN(u)?-1:1;if(u>a)return 1;if(a>u)return-1}}return n.length-r.length}var Ot={alphanumeric:function(e,t,n){return At(xt(e.getValue(n)).toLowerCase(),xt(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return At(xt(e.getValue(n)),xt(t.getValue(n)))},text:function(e,t,n){return Et(xt(e.getValue(n)).toLowerCase(),xt(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return Et(xt(e.getValue(n)),xt(t.getValue(n)))},datetime:function(e,t,n){var r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},basic:function(e,t,n){return Et(e.getValue(n),t.getValue(n))}},kt=[Ze,{getInitialState:function(e){return M({columnVisibility:{}},e)},getDefaultOptions:function(e){return{onColumnVisibilityChange:$e("columnVisibility",e)}},createColumn:function(e,t){return{toggleVisibility:function(n){e.getCanHide()&&t.setColumnVisibility((function(t){return M(M({},t),{},P({},e.id,null!=n?n:!e.getIsVisible()))}))},getIsVisible:function(){var n,r;return null==(n=null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},getCanHide:function(){var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},getToggleVisibilityHandler:function(){return function(t){null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}}},createRow:function(e,t){return{_getAllVisibleCells:Ke((function(){return[e.getAllCells(),t.getState().columnVisibility]}),(function(e){return e.filter((function(e){return e.column.getIsVisible()}))}),{key:"row._getAllVisibleCells",debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:Ke((function(){return[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]}),(function(e,t,n){return[].concat(R(e),R(t),R(n))}),{key:!1,debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}},createTable:function(e){var t=function(t,n){return Ke((function(){return[n(),n().filter((function(e){return e.getIsVisible()})).map((function(e){return e.id})).join("_")]}),(function(e){return e.filter((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))}),{key:t,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return{getVisibleFlatColumns:t("getVisibleFlatColumns",(function(){return e.getAllFlatColumns()})),getVisibleLeafColumns:t("getVisibleLeafColumns",(function(){return e.getAllLeafColumns()})),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(function(){return e.getLeftLeafColumns()})),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(function(){return e.getRightLeafColumns()})),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(function(){return e.getCenterLeafColumns()})),setColumnVisibility:function(t){return null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t)},resetColumnVisibility:function(t){var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:function(t){var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((function(e,n){return M(M({},e),{},P({},n.id,t||!(null!=n.getCanHide&&n.getCanHide())))}),{}))},getIsAllColumnsVisible:function(){return!e.getAllLeafColumns().some((function(e){return!(null!=e.getIsVisible&&e.getIsVisible())}))},getIsSomeColumnsVisible:function(){return e.getAllLeafColumns().some((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))},getToggleAllColumnsVisibilityHandler:function(){return function(t){var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}}},{getInitialState:function(e){return M({columnOrder:[]},e)},getDefaultOptions:function(e){return{onColumnOrderChange:$e("columnOrder",e)}},createTable:function(e){return{setColumnOrder:function(t){return null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t)},resetColumnOrder:function(t){var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:Ke((function(){return[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]}),(function(e,t,n){return function(r){var i=[];if(null!=e&&e.length){for(var o=R(e),u=R(r),a=function(){var e=o.shift(),t=u.findIndex((function(t){return t.id===e}));t>-1&&i.push(u.splice(t,1)[0])};u.length&&o.length;)a();i=[].concat(R(i),R(u))}else i=r;return function(e,t,n){if(null==t||!t.length||!n)return e;var r=e.filter((function(e){return!t.includes(e.id)}));if("remove"===n)return r;var i=t.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean);return[].concat(R(i),R(r))}(i,t,n)}}),{key:!1})}}},{getInitialState:function(e){return M({columnPinning:{left:[],right:[]}},e)},getDefaultOptions:function(e){return{onColumnPinningChange:$e("columnPinning",e)}},createColumn:function(e,t){return{pin:function(n){var r=e.getLeafColumns().map((function(e){return e.id})).filter(Boolean);t.setColumnPinning((function(e){var t,i,o,u,a,l;return"right"===n?{left:(null!=(o=null==e?void 0:e.left)?o:[]).filter((function(e){return!(null!=r&&r.includes(e))})),right:[].concat(R((null!=(u=null==e?void 0:e.right)?u:[]).filter((function(e){return!(null!=r&&r.includes(e))}))),R(r))}:"left"===n?{left:[].concat(R((null!=(a=null==e?void 0:e.left)?a:[]).filter((function(e){return!(null!=r&&r.includes(e))}))),R(r)),right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((function(e){return!(null!=r&&r.includes(e))}))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((function(e){return!(null!=r&&r.includes(e))})),right:(null!=(i=null==e?void 0:e.right)?i:[]).filter((function(e){return!(null!=r&&r.includes(e))}))}}))},getCanPin:function(){return e.getLeafColumns().some((function(e){var n,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=t.options.enablePinning)||r)}))},getIsPinned:function(){var n=e.getLeafColumns().map((function(e){return e.id})),r=t.getState().columnPinning,i=r.left,o=r.right,u=n.some((function(e){return null==i?void 0:i.includes(e)})),a=n.some((function(e){return null==o?void 0:o.includes(e)}));return u?"left":!!a&&"right"},getPinnedIndex:function(){var n,r,i,o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(i=r[o])?void 0:i.indexOf(e.id))?n:-1:0}}},createRow:function(e,t){return{getCenterVisibleCells:Ke((function(){return[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]}),(function(e,t,n){var r=[].concat(R(null!=t?t:[]),R(null!=n?n:[]));return e.filter((function(e){return!r.includes(e.column.id)}))}),{key:"row.getCenterVisibleCells",debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:Ke((function(){return[e._getAllVisibleCells(),t.getState().columnPinning.left,,]}),(function(e,t){return(null!=t?t:[]).map((function(t){return e.find((function(e){return e.column.id===t}))})).filter(Boolean).map((function(e){return M(M({},e),{},{position:"left"})}))}),{key:"row.getLeftVisibleCells",debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:Ke((function(){return[e._getAllVisibleCells(),t.getState().columnPinning.right]}),(function(e,t){return(null!=t?t:[]).map((function(t){return e.find((function(e){return e.column.id===t}))})).filter(Boolean).map((function(e){return M(M({},e),{},{position:"right"})}))}),{key:"row.getRightVisibleCells",debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}},createTable:function(e){return{setColumnPinning:function(t){return null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t)},resetColumnPinning:function(t){var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},getIsSomeColumnsPinned:function(t){var n,r,i,o=e.getState().columnPinning;return t?Boolean(null==(n=o[t])?void 0:n.length):Boolean((null==(r=o.left)?void 0:r.length)||(null==(i=o.right)?void 0:i.length))},getLeftLeafColumns:Ke((function(){return[e.getAllLeafColumns(),e.getState().columnPinning.left]}),(function(e,t){return(null!=t?t:[]).map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean)}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:Ke((function(){return[e.getAllLeafColumns(),e.getState().columnPinning.right]}),(function(e,t){return(null!=t?t:[]).map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean)}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:Ke((function(){return[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]}),(function(e,t,n){var r=[].concat(R(null!=t?t:[]),R(null!=n?n:[]));return e.filter((function(e){return!r.includes(e.id)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})}}},{getDefaultColumnDef:function(){return{filterFn:"auto"}},getInitialState:function(e){return M({columnFilters:[],globalFilter:void 0},e)},getDefaultOptions:function(e){return{onColumnFiltersChange:$e("columnFilters",e),onGlobalFilterChange:$e("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:function(t){var n,r,i=null==(n=e.getCoreRowModel().flatRows[0])||null==(r=n._getAllCellsByColumnId()[t.id])?void 0:r.getValue();return"string"==typeof i||"number"==typeof i}}},createColumn:function(e,t){return{getAutoFilterFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?pt.includesString:"number"==typeof r?pt.inNumberRange:"boolean"==typeof r||null!==r&&"object"===A(r)?pt.equals:Array.isArray(r)?pt.arrIncludes:pt.weakEquals},getFilterFn:function(){var n,r;return Xe(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:pt[e.columnDef.filterFn]},getCanFilter:function(){var n,r,i;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(i=t.options.enableFilters)||i)&&!!e.accessorFn},getCanGlobalFilter:function(){var n,r,i,o;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(i=t.options.enableFilters)||i)&&(null==(o=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||o)&&!!e.accessorFn},getIsFiltered:function(){return e.getFilterIndex()>-1},getFilterValue:function(){var n,r;return null==(n=t.getState().columnFilters)||null==(r=n.find((function(t){return t.id===e.id})))?void 0:r.value},getFilterIndex:function(){var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},setFilterValue:function(n){t.setColumnFilters((function(t){var r,i=e.getFilterFn(),o=null==t?void 0:t.find((function(t){return t.id===e.id})),u=Je(n,o?o.value:void 0);if(mt(i,u,e))return null!=(r=null==t?void 0:t.filter((function(t){return t.id!==e.id})))?r:[];var a,l={id:e.id,value:u};return o?null!=(a=null==t?void 0:t.map((function(t){return t.id===e.id?l:t})))?a:[]:null!=t&&t.length?[].concat(R(t),[l]):[l]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:function(){return e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel()},_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:function(){return e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map},_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:function(){if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},createRow:function(e,t){return{columnFilters:{},columnFiltersMeta:{}}},createTable:function(e){return{getGlobalAutoFilterFn:function(){return pt.includesString},getGlobalFilterFn:function(){var t,n,r=e.options.globalFilterFn;return Xe(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:pt[r]},setColumnFilters:function(t){var n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((function(e){var r;return null==(r=Je(t,e))?void 0:r.filter((function(e){var t=n.find((function(t){return t.id===e.id}));if(t&&mt(t.getFilterFn(),e.value,t))return!1;return!0}))}))},setGlobalFilter:function(t){null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:function(t){e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:function(t){var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},getPreFilteredRowModel:function(){return e.getCoreRowModel()},getFilteredRowModel:function(){return!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()},_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:function(){return e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel()},_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:function(){return e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map},_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:function(){if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}}},{getInitialState:function(e){return M({sorting:[]},e)},getDefaultColumnDef:function(){return{sortingFn:"auto"}},getDefaultOptions:function(e){return{onSortingChange:$e("sorting",e),isMultiSortEvent:function(e){return e.shiftKey}}},createColumn:function(e,t){return{getAutoSortingFn:function(){var n,r=!1,i=C(t.getFilteredRowModel().flatRows.slice(10));try{for(i.s();!(n=i.n()).done;){var o=n.value,u=null==o?void 0:o.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(u))return Ot.datetime;if("string"==typeof u&&(r=!0,u.split(_t).length>1))return Ot.alphanumeric}}catch(a){i.e(a)}finally{i.f()}return r?Ot.text:Ot.basic},getAutoSortDir:function(){var n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:function(){var n,r;if(!e)throw new Error;return Xe(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:Ot[e.columnDef.sortingFn]},toggleSorting:function(n,r){var i=e.getNextSortingOrder(),o=null!=n;t.setSorting((function(u){var a,l,s=null==u?void 0:u.find((function(t){return t.id===e.id})),c=null==u?void 0:u.findIndex((function(t){return t.id===e.id})),f=[],d=o?n:"desc"===i;("toggle"===(a=null!=u&&u.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=u&&u.length&&c!==u.length-1?"replace":s?"toggle":"replace")&&(o||i||(a="remove")),"add"===a)?(f=[].concat(R(u),[{id:e.id,desc:d}])).splice(0,f.length-(null!=(l=t.options.maxMultiSortColCount)?l:Number.MAX_SAFE_INTEGER)):f="toggle"===a?u.map((function(t){return t.id===e.id?M(M({},t),{},{desc:d}):t})):"remove"===a?u.filter((function(t){return t.id!==e.id})):[{id:e.id,desc:d}];return f}))},getFirstSortDir:function(){var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},getNextSortingOrder:function(n){var r,i,o=e.getFirstSortDir(),u=e.getIsSorted();return u?!!(u===o||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(i=t.options.enableMultiRemove)&&!i)&&("desc"===u?"asc":"desc"):o},getCanSort:function(){var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},getCanMultiSort:function(){var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:function(){var n,r=null==(n=t.getState().sorting)?void 0:n.find((function(t){return t.id===e.id}));return!!r&&(r.desc?"desc":"asc")},getSortIndex:function(){var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},clearSorting:function(){t.setSorting((function(t){return null!=t&&t.length?t.filter((function(t){return t.id!==e.id})):[]}))},getToggleSortingHandler:function(){var n=e.getCanSort();return function(r){n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}}},createTable:function(e){return{setSorting:function(t){return null==e.options.onSortingChange?void 0:e.options.onSortingChange(t)},resetSorting:function(t){var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},getPreSortedRowModel:function(){return e.getGroupedRowModel()},getSortedRowModel:function(){return!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel()}}}},{getDefaultColumnDef:function(){return{aggregatedCell:function(e){var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}},getInitialState:function(e){return M({grouping:[]},e)},getDefaultOptions:function(e){return{onGroupingChange:$e("grouping",e),groupedColumnMode:"reorder"}},createColumn:function(e,t){return{toggleGrouping:function(){t.setGrouping((function(t){return null!=t&&t.includes(e.id)?t.filter((function(t){return t!==e.id})):[].concat(R(null!=t?t:[]),[e.id])}))},getCanGroup:function(){var n,r,i,o;return null!=(n=null==(r=null!=(i=null==(o=e.columnDef.enableGrouping)||o)?i:t.options.enableGrouping)||r)?n:!!e.accessorFn},getIsGrouped:function(){var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:function(){var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:function(){var t=e.getCanGroup();return function(){t&&e.toggleGrouping()}},getAutoAggregationFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?bt.sum:"[object Date]"===Object.prototype.toString.call(r)?bt.extent:void 0},getAggregationFn:function(){var n,r;if(!e)throw new Error;return Xe(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:bt[e.columnDef.aggregationFn]}}},createTable:function(e){return{setGrouping:function(t){return null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t)},resetGrouping:function(t){var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},getPreGroupedRowModel:function(){return e.getFilteredRowModel()},getGroupedRowModel:function(){return!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel()}}},createRow:function(e){return{getIsGrouped:function(){return!!e.groupingColumnId},_groupingValuesCache:{}}},createCell:function(e,t,n,r){return{getIsGrouped:function(){return t.getIsGrouped()&&t.id===n.groupingColumnId},getIsPlaceholder:function(){return!e.getIsGrouped()&&t.getIsGrouped()},getIsAggregated:function(){var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}}},ot,{getInitialState:function(e){return M(M({},e),{},{pagination:M(M({},{pageIndex:0,pageSize:10}),null==e?void 0:e.pagination)})},getDefaultOptions:function(e){return{onPaginationChange:$e("pagination",e)}},createTable:function(e){var t=!1,n=!1;return{_autoResetPageIndex:function(){var r,i;if(t){if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((function(){e.resetPageIndex(),n=!1}))}}else e._queue((function(){t=!0}))},setPagination:function(t){return null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((function(e){return Je(t,e)}))},resetPagination:function(t){var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:function(t){e.setPagination((function(n){var r=Je(t,n.pageIndex),i=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),M(M({},n),{},{pageIndex:r})}))},resetPageIndex:function(t){var n,r,i;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(i=r.pagination)?void 0:i.pageIndex)?n:0)},resetPageSize:function(t){var n,r,i;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(i=r.pagination)?void 0:i.pageSize)?n:10)},setPageSize:function(t){e.setPagination((function(e){var n=Math.max(1,Je(t,e.pageSize)),r=e.pageSize*e.pageIndex,i=Math.floor(r/n);return M(M({},e),{},{pageIndex:i,pageSize:n})}))},setPageCount:function(t){return e.setPagination((function(n){var r,i=Je(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof i&&(i=Math.max(-1,i)),M(M({},n),{},{pageCount:i})}))},getPageOptions:Ke((function(){return[e.getPageCount()]}),(function(e){var t=[];return e&&e>0&&(t=R(new Array(e)).fill(null).map((function(e,t){return t}))),t}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:function(){return e.getState().pagination.pageIndex>0},getCanNextPage:function(){var t=e.getState().pagination.pageIndex,n=e.getPageCount();return-1===n||0!==n&&t<n-1},previousPage:function(){return e.setPageIndex((function(e){return e-1}))},nextPage:function(){return e.setPageIndex((function(e){return e+1}))},getPrePaginationRowModel:function(){return e.getExpandedRowModel()},getPaginationRowModel:function(){return!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()},getPageCount:function(){var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},yt,nt];function Mt(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");var n={_features:kt},r=n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))}),{}),i=M(M({},{}),null!=(t=e.initialState)?t:{});n._features.forEach((function(e){var t;i=null!=(t=null==e.getInitialState?void 0:e.getInitialState(i))?t:i}));var o=[],u=!1,a={_features:kt,options:M(M({},r),e),initialState:i,_queue:function(e){o.push(e),u||(u=!0,Promise.resolve().then((function(){for(;o.length;)o.shift()();u=!1})).catch((function(e){return setTimeout((function(){throw e}))})))},reset:function(){n.setState(n.initialState)},setOptions:function(e){var t=Je(e,n.options);n.options=function(e){return n.options.mergeOptions?n.options.mergeOptions(r,e):M(M({},r),e)}(t)},getState:function(){return n.options.state},setState:function(e){null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:function(e,t,r){var i;return null!=(i=null==n.options.getRowId?void 0:n.options.getRowId(e,t,r))?i:"".concat(r?[r.id,t].join("."):t)},getCoreRowModel:function(){return n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()},getRowModel:function(){return n.getPaginationRowModel()},getRow:function(e){var t=n.getRowModel().rowsById[e];if(!t)throw new Error;return t},_getDefaultColumnDef:Ke((function(){return[n.options.defaultColumn]}),(function(e){var t;return e=null!=(t=e)?t:{},M(M({header:function(e){var t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:function(e){var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null}},n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())}),{})),e)}),{debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:!1}),_getColumnDefs:function(){return n.options.columns},getAllColumns:Ke((function(){return[n._getColumnDefs()]}),(function(e){return function e(t,r,i){return void 0===i&&(i=0),t.map((function(t){var o=function(e,t,n,r){var i,o,u,a=M(M({},e._getDefaultColumnDef()),t),l=a.accessorKey,s=null!=(i=null!=(o=a.id)?o:l?l.replace(".","_"):void 0)?i:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?u=a.accessorFn:l&&(u=l.includes(".")?function(e){var t,n=e,r=C(l.split("."));try{for(r.s();!(t=r.n()).done;){var i,o=t.value;n=null==(i=n)?void 0:i[o]}}catch(u){r.e(u)}finally{r.f()}return n}:function(e){return e[a.accessorKey]}),!s)throw new Error;var c={id:"".concat(String(s)),accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Ke((function(){return[!0]}),(function(){var e;return[c].concat(R(null==(e=c.columns)?void 0:e.flatMap((function(e){return e.getFlatColumns()}))))}),{key:"column.getFlatColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:Ke((function(){return[e._getOrderColumnsFn()]}),(function(e){var t;if(null!=(t=c.columns)&&t.length){var n=c.columns.flatMap((function(e){return e.getLeafColumns()}));return e(n)}return[c]}),{key:"column.getLeafColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return c=e._features.reduce((function(t,n){return Object.assign(t,null==n.createColumn?void 0:n.createColumn(c,e))}),c)}(n,t,i,r),u=t;return o.columns=u.columns?e(u.columns,o,i+1):[],o}))}(e)}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:Ke((function(){return[n.getAllColumns()]}),(function(e){return e.flatMap((function(e){return e.getFlatColumns()}))}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:Ke((function(){return[n.getAllFlatColumns()]}),(function(e){return e.reduce((function(e,t){return e[t.id]=t,e}),{})}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:Ke((function(){return[n.getAllColumns(),n._getOrderColumnsFn()]}),(function(e,t){return t(e.flatMap((function(e){return e.getLeafColumns()})))}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:function(e){return n._getAllFlatColumnsById()[e]}};return Object.assign(n,a),n._features.forEach((function(e){return Object.assign(n,null==e.createTable?void 0:e.createTable(n))})),n}var Pt=function(e,t,n,r,i,o){for(var u={id:t,index:r,original:n,depth:i,_valuesCache:{},_uniqueValuesCache:{},getValue:function(t){if(u._valuesCache.hasOwnProperty(t))return u._valuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?(u._valuesCache[t]=n.accessorFn(u.original,r),u._valuesCache[t]):void 0},getUniqueValues:function(t){if(u._uniqueValuesCache.hasOwnProperty(t))return u._uniqueValuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(u._uniqueValuesCache[t]=n.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[t]):(u._uniqueValuesCache[t]=[u.getValue(t)],u._uniqueValuesCache[t]):void 0},renderValue:function(t){var n;return null!=(n=u.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=o?o:[],getLeafRows:function(){return e=u.subRows,t=function(e){return e.subRows},n=[],function e(r){r.forEach((function(r){n.push(r);var i=t(r);null!=i&&i.length&&e(i)}))}(e),n;var e,t,n},getAllCells:Ke((function(){return[e.getAllLeafColumns()]}),(function(t){return t.map((function(t){return function(e,t,n,r){var i={id:"".concat(t.id,"_").concat(n.id),row:t,column:n,getValue:function(){return t.getValue(r)},renderValue:function(){var t;return null!=(t=i.getValue())?t:e.options.renderFallbackValue},getContext:Ke((function(){return[e,n,t,i]}),(function(e,t,n,r){return{table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}}),{key:!1,debug:function(){return e.options.debugAll}})};return e._features.forEach((function(r){Object.assign(i,null==r.createCell?void 0:r.createCell(i,n,t,e))}),{}),i}(e,u,t,t.id)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:Ke((function(){return[u.getAllCells()]}),(function(e){return e.reduce((function(e,t){return e[t.column.id]=t,e}),{})}),{key:"row.getAllCellsByColumnId",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},a=0;a<e._features.length;a++){var l=e._features[a];Object.assign(u,null==l||null==l.createRow?void 0:l.createRow(u,e))}return u};
|
|
13
|
+
/**
|
|
14
|
+
* react-table
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) TanStack
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
20
|
+
*
|
|
21
|
+
* @license MIT
|
|
22
|
+
*/
|
|
23
|
+
function Lt(e,t){return e?function(e){return"function"==typeof e&&((t=Object.getPrototypeOf(e)).prototype&&t.prototype.isReactComponent);var t}(n=e)||"function"==typeof n||function(e){return"object"===A(e)&&"symbol"===A(e.$$typeof)&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?$(e,M({},t)):e:null;var n}var Ft=X.div(v||(v=O(["\n padding: ",";\n display: flex;\n background-color: ",";\n box-shadow: ",";\n justify-content: flex-end;\n border-top: 1px solid ",";\n"])),K["--ll-spacing-medium"],K["--ll-color-surface"],K["--ll-shadow-medium"],K["--ll-color-border"]),It=X.table(m||(m=O(["\n font-family: ",";\n width: 100%;\n"])),K["--ll-font-family-mono"]),Tt=X.thead(b||(b=O(["\n font-weight: ",";\n"])),K["--ll-font-weight-bold"]),jt=X.tbody(y||(y=O(["\n & td:nth-child(1) {\n font-weight: ",";\n }\n\n & td:nth-child(n + 2) {\n text-align: right;\n }\n"])),K["--ll-font-weight-bold"]),Vt={accessor:function(e,t){return M(M({},t),{},"function"==typeof e?{accessorFn:e}:{accessorKey:e})},display:function(e){return e},group:function(e){return e}},Dt=[Vt.accessor("insight",{header:"Insight"})],Bt=function(){var e,t,n,r,i,o,u=L(Y.useState((function(){return[].concat(Dt)})),2),a=u[0],l=u[1],s=L(Y.useState([]),2),c=s[0],f=s[1],d=L(Y.useState([]),2),h=d[0],g=d[1],p=L(Y.useState(Object.values(fe).filter((function(e){return"string"==typeof e}))),2),v=p[0],m=p[1],b=Y.useCallback((function(){var e=[].concat(R(c),[{address:"123 Fake St, Fake City, FK, 012345"}]);f(e),l([].concat(Dt,R(e.map((function(e,t){return Vt.accessor("comparable_".concat(t),{header:e.address})}))))),g(R(v.map((function(t){return M({insight:t},e.reduce((function(e,t,n){return e["comparable_".concat(n)]=1.23,e}),{}))}))))}),[c,v]),y=Y.useCallback((function(){var e=[].concat(R(v),["New insight"]);m(e),g(R(v.map((function(e){return M({insight:e},c.reduce((function(e,t,n){return e["comparable_".concat(n)]=1.23,e}),{}))}))))}),[c,v]),w=(e={data:h,columns:a,getCoreRowModel:function(e){return Ke((function(){return[e.options.data]}),(function(t){var n={rows:[],flatRows:[],rowsById:{}};return n.rows=function t(r,i,o){void 0===i&&(i=0);for(var u=[],a=0;a<r.length;a++){var l,s=Pt(e,e._getRowId(r[a],a,o),r[a],a,i);n.flatRows.push(s),n.rowsById[s.id]=s,u.push(s),e.options.getSubRows&&(s.originalSubRows=e.options.getSubRows(r[a],a),null!=(l=s.originalSubRows)&&l.length&&(s.subRows=t(s.originalSubRows,i+1,s)))}return u}(t),n}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:function(){e._autoResetPageIndex()}})}},t=M({state:{},onStateChange:function(){},renderFallbackValue:null},e),n=L(J.exports.useState((function(){return{current:Mt(t)}})),1)[0],r=L(J.exports.useState((function(){return n.current.initialState})),2),i=r[0],o=r[1],n.current.setOptions((function(t){return M(M(M({},t),e),{},{state:M(M({},i),e.state),onStateChange:function(t){o(t),null==e.onStateChange||e.onStateChange(t)}})})),n.current);return Z(Y.Fragment,{children:[Z(It,{children:[$(Tt,{children:w.getHeaderGroups().map((function(e){return $("tr",{children:e.headers.map((function(e){return $("th",{children:e.isPlaceholder?null:Lt(e.column.columnDef.header,e.getContext())},e.id)}))},e.id)}))}),$(jt,{children:w.getRowModel().rows.map((function(e){return $("tr",{children:e.getVisibleCells().map((function(e){return $("td",{children:Lt(e.column.columnDef.cell,e.getContext())},e.id)}))},e.id)}))})]}),Z(Ft,{children:[$(ae,{variant:"contained",onClick:b,children:"Add Comparable"}),$(le,{spacing:"--ll-spacing-xx-small"}),$(ae,{variant:"contained",onClick:y,children:"Add Insight"})]})]})};E("default",(function(){var e=oe().translations,t=[{title:e.LOCATION,description:e.LOCATION_TEXT,value:"location",number:1,children:$(Ne,{})},{title:e.SCORES,description:e.SCORES_TEXT,value:"scores",number:2,children:$(He,{})},{title:e.POIS,description:e.POIS_TEXT,value:"pois",number:3,children:$(qe,{})},{title:e.SCHOOLS,description:e.SCHOOLS_TEXT,value:"schools",number:4,children:$(Ye,{})},{title:e.DEMOGRAPHICS,description:e.DEMOGRAPHICS_TEXT,value:"demographics",number:5,children:$(We,{})},{title:e.PROFILES,description:e.PROFILES_TEXT,value:"profiles",number:6},{title:e.TABLE,description:e.TABLE_TEXT,value:"table",number:7,children:$(Bt,{})}];return $(we,{children:Z(Se,{children:[$(Ce,{type:"single",defaultValue:"location",collapsible:!0,children:t.map((function(e){return $(Fe,{title:e.title,description:e.description,value:e.value,number:e.number,children:e.children},e.value)}))}),$(le,{vertical:!0}),$(De,{})]})})}))}}}))}();
|
|
@@ -1 +1 @@
|
|
|
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
|
+
!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",TABLE:"Table"}),{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é.",TABLE_TEXT:"Table retourne un exemple de données pour l'emplacement désiré."}))}}}))}();
|