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