@toclocoinc/lattice-grid 1.89.0 → 1.89.1

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 (310) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -1
  3. package/angular/package.json +1 -1
  4. package/docs/API.html +5 -5
  5. package/docs/THEMING.md +27 -0
  6. package/docs/api/adapters.html +1 -1
  7. package/docs/api/ai.html +1 -1
  8. package/docs/api/alarms.html +1 -1
  9. package/docs/api/calendar.html +1 -1
  10. package/docs/api/charts.html +1 -1
  11. package/docs/api/dashboard.html +1 -1
  12. package/docs/api/data-router.html +1 -1
  13. package/docs/api/deckgl.html +1 -1
  14. package/docs/api/designer.html +2 -2
  15. package/docs/api/gantt.html +1 -1
  16. package/docs/api/geometry.html +1 -1
  17. package/docs/api/grid.html +2 -2
  18. package/docs/api/index.html +1 -1
  19. package/docs/api/kanban.html +1 -1
  20. package/docs/api/kpi.html +1 -1
  21. package/docs/api/layout.html +1 -1
  22. package/docs/api/leaflet.html +1 -1
  23. package/docs/api/list.html +1 -1
  24. package/docs/api/mapview.html +1 -1
  25. package/docs/api/mock-socket.html +1 -1
  26. package/docs/api/presets.html +1 -1
  27. package/docs/api/tabs.html +1 -1
  28. package/docs/api/types.html +1 -1
  29. package/docs/api-detail.html +4 -4
  30. package/docs/warnings.json +1 -1
  31. package/lattice-grid.d.ts +1 -1
  32. package/lattice-grid.esm.min.js +3 -3
  33. package/lattice-grid.min.cjs +3 -3
  34. package/lattice-grid.min.css +1 -1
  35. package/lattice-grid.min.js +3 -3
  36. package/modules/ai.d.ts +1 -1
  37. package/modules/ai.esm.min.js +2 -2
  38. package/modules/ai.min.cjs +2 -2
  39. package/modules/ai.min.js +2 -2
  40. package/modules/alarms.d.ts +1 -1
  41. package/modules/alarms.esm.min.js +2 -2
  42. package/modules/alarms.min.cjs +2 -2
  43. package/modules/alarms.min.js +2 -2
  44. package/modules/angular.d.ts +1 -1
  45. package/modules/angular.esm.min.js +2 -2
  46. package/modules/angular.min.cjs +2 -2
  47. package/modules/angular.min.js +2 -2
  48. package/modules/calendar.d.ts +1 -1
  49. package/modules/calendar.esm.min.js +2 -2
  50. package/modules/calendar.min.cjs +2 -2
  51. package/modules/calendar.min.js +2 -2
  52. package/modules/chart-alluvial.d.ts +1 -1
  53. package/modules/chart-alluvial.esm.min.js +1 -1
  54. package/modules/chart-alluvial.min.cjs +1 -1
  55. package/modules/chart-alluvial.min.js +1 -1
  56. package/modules/chart-arc.d.ts +1 -1
  57. package/modules/chart-arc.esm.min.js +1 -1
  58. package/modules/chart-arc.min.cjs +1 -1
  59. package/modules/chart-arc.min.js +1 -1
  60. package/modules/chart-barrace.d.ts +1 -1
  61. package/modules/chart-barrace.esm.min.js +1 -1
  62. package/modules/chart-barrace.min.cjs +1 -1
  63. package/modules/chart-barrace.min.js +1 -1
  64. package/modules/chart-bubblemap.d.ts +1 -1
  65. package/modules/chart-bubblemap.esm.min.js +1 -1
  66. package/modules/chart-bubblemap.min.cjs +1 -1
  67. package/modules/chart-bubblemap.min.js +1 -1
  68. package/modules/chart-bump.d.ts +1 -1
  69. package/modules/chart-bump.esm.min.js +1 -1
  70. package/modules/chart-bump.min.cjs +1 -1
  71. package/modules/chart-bump.min.js +1 -1
  72. package/modules/chart-calendar.d.ts +1 -1
  73. package/modules/chart-calendar.esm.min.js +1 -1
  74. package/modules/chart-calendar.min.cjs +1 -1
  75. package/modules/chart-calendar.min.js +1 -1
  76. package/modules/chart-choropleth.d.ts +1 -1
  77. package/modules/chart-choropleth.esm.min.js +1 -1
  78. package/modules/chart-choropleth.min.cjs +1 -1
  79. package/modules/chart-choropleth.min.js +1 -1
  80. package/modules/chart-decomposition.d.ts +1 -1
  81. package/modules/chart-decomposition.esm.min.js +1 -1
  82. package/modules/chart-decomposition.min.cjs +1 -1
  83. package/modules/chart-decomposition.min.js +1 -1
  84. package/modules/chart-diverging.d.ts +1 -1
  85. package/modules/chart-diverging.esm.min.js +1 -1
  86. package/modules/chart-diverging.min.cjs +1 -1
  87. package/modules/chart-diverging.min.js +1 -1
  88. package/modules/chart-dumbbell.d.ts +1 -1
  89. package/modules/chart-dumbbell.esm.min.js +1 -1
  90. package/modules/chart-dumbbell.min.cjs +1 -1
  91. package/modules/chart-dumbbell.min.js +1 -1
  92. package/modules/chart-fan.d.ts +1 -1
  93. package/modules/chart-fan.esm.min.js +1 -1
  94. package/modules/chart-fan.min.cjs +1 -1
  95. package/modules/chart-fan.min.js +1 -1
  96. package/modules/chart-forcetree.d.ts +1 -1
  97. package/modules/chart-forcetree.esm.min.js +1 -1
  98. package/modules/chart-forcetree.min.cjs +1 -1
  99. package/modules/chart-forcetree.min.js +1 -1
  100. package/modules/chart-hexbin.d.ts +1 -1
  101. package/modules/chart-hexbin.esm.min.js +1 -1
  102. package/modules/chart-hexbin.min.cjs +1 -1
  103. package/modules/chart-hexbin.min.js +1 -1
  104. package/modules/chart-hexmap.d.ts +1 -1
  105. package/modules/chart-hexmap.esm.min.js +1 -1
  106. package/modules/chart-hexmap.min.cjs +1 -1
  107. package/modules/chart-hexmap.min.js +1 -1
  108. package/modules/chart-icicle.d.ts +1 -1
  109. package/modules/chart-icicle.esm.min.js +1 -1
  110. package/modules/chart-icicle.min.cjs +1 -1
  111. package/modules/chart-icicle.min.js +1 -1
  112. package/modules/chart-markermap.d.ts +1 -1
  113. package/modules/chart-markermap.esm.min.js +1 -1
  114. package/modules/chart-markermap.min.cjs +1 -1
  115. package/modules/chart-markermap.min.js +1 -1
  116. package/modules/chart-motion.d.ts +1 -1
  117. package/modules/chart-motion.esm.min.js +1 -1
  118. package/modules/chart-motion.min.cjs +1 -1
  119. package/modules/chart-motion.min.js +1 -1
  120. package/modules/chart-pack.d.ts +1 -1
  121. package/modules/chart-pack.esm.min.js +1 -1
  122. package/modules/chart-pack.min.cjs +1 -1
  123. package/modules/chart-pack.min.js +1 -1
  124. package/modules/chart-parallel.d.ts +1 -1
  125. package/modules/chart-parallel.esm.min.js +1 -1
  126. package/modules/chart-parallel.min.cjs +1 -1
  127. package/modules/chart-parallel.min.js +1 -1
  128. package/modules/chart-pictorial.d.ts +1 -1
  129. package/modules/chart-pictorial.esm.min.js +1 -1
  130. package/modules/chart-pictorial.min.cjs +1 -1
  131. package/modules/chart-pictorial.min.js +1 -1
  132. package/modules/chart-polararea.d.ts +1 -1
  133. package/modules/chart-polararea.esm.min.js +1 -1
  134. package/modules/chart-polararea.min.cjs +1 -1
  135. package/modules/chart-polararea.min.js +1 -1
  136. package/modules/chart-polarscatter.d.ts +1 -1
  137. package/modules/chart-polarscatter.esm.min.js +1 -1
  138. package/modules/chart-polarscatter.min.cjs +1 -1
  139. package/modules/chart-polarscatter.min.js +1 -1
  140. package/modules/chart-pyramid.d.ts +1 -1
  141. package/modules/chart-pyramid.esm.min.js +1 -1
  142. package/modules/chart-pyramid.min.cjs +1 -1
  143. package/modules/chart-pyramid.min.js +1 -1
  144. package/modules/chart-radialbar.d.ts +1 -1
  145. package/modules/chart-radialbar.esm.min.js +1 -1
  146. package/modules/chart-radialbar.min.cjs +1 -1
  147. package/modules/chart-radialbar.min.js +1 -1
  148. package/modules/chart-ridgeline.d.ts +1 -1
  149. package/modules/chart-ridgeline.esm.min.js +1 -1
  150. package/modules/chart-ridgeline.min.cjs +1 -1
  151. package/modules/chart-ridgeline.min.js +1 -1
  152. package/modules/chart-roc.d.ts +1 -1
  153. package/modules/chart-roc.esm.min.js +1 -1
  154. package/modules/chart-roc.min.cjs +1 -1
  155. package/modules/chart-roc.min.js +1 -1
  156. package/modules/chart-serpentine.d.ts +1 -1
  157. package/modules/chart-serpentine.esm.min.js +1 -1
  158. package/modules/chart-serpentine.min.cjs +1 -1
  159. package/modules/chart-serpentine.min.js +1 -1
  160. package/modules/chart-slope.d.ts +1 -1
  161. package/modules/chart-slope.esm.min.js +1 -1
  162. package/modules/chart-slope.min.cjs +1 -1
  163. package/modules/chart-slope.min.js +1 -1
  164. package/modules/chart-spiral.d.ts +1 -1
  165. package/modules/chart-spiral.esm.min.js +1 -1
  166. package/modules/chart-spiral.min.cjs +1 -1
  167. package/modules/chart-spiral.min.js +1 -1
  168. package/modules/chart-splom.d.ts +1 -1
  169. package/modules/chart-splom.esm.min.js +1 -1
  170. package/modules/chart-splom.min.cjs +1 -1
  171. package/modules/chart-splom.min.js +1 -1
  172. package/modules/chart-tree.d.ts +1 -1
  173. package/modules/chart-tree.esm.min.js +1 -1
  174. package/modules/chart-tree.min.cjs +1 -1
  175. package/modules/chart-tree.min.js +1 -1
  176. package/modules/chart-venn.d.ts +1 -1
  177. package/modules/chart-venn.esm.min.js +1 -1
  178. package/modules/chart-venn.min.cjs +1 -1
  179. package/modules/chart-venn.min.js +1 -1
  180. package/modules/chart-voronoi.d.ts +1 -1
  181. package/modules/chart-voronoi.esm.min.js +1 -1
  182. package/modules/chart-voronoi.min.cjs +1 -1
  183. package/modules/chart-voronoi.min.js +1 -1
  184. package/modules/chart-waffle.d.ts +1 -1
  185. package/modules/chart-waffle.esm.min.js +1 -1
  186. package/modules/chart-waffle.min.cjs +1 -1
  187. package/modules/chart-waffle.min.js +1 -1
  188. package/modules/chart-wordcloud.d.ts +1 -1
  189. package/modules/chart-wordcloud.esm.min.js +1 -1
  190. package/modules/chart-wordcloud.min.cjs +1 -1
  191. package/modules/chart-wordcloud.min.js +1 -1
  192. package/modules/charts.d.ts +1 -1
  193. package/modules/charts.esm.min.js +2 -2
  194. package/modules/charts.min.cjs +2 -2
  195. package/modules/charts.min.js +2 -2
  196. package/modules/dashboard.d.ts +1 -1
  197. package/modules/dashboard.esm.min.js +2 -2
  198. package/modules/dashboard.min.cjs +2 -2
  199. package/modules/dashboard.min.js +2 -2
  200. package/modules/data-router.d.ts +1 -1
  201. package/modules/data-router.esm.min.js +2 -2
  202. package/modules/data-router.min.cjs +2 -2
  203. package/modules/data-router.min.js +2 -2
  204. package/modules/deckgl.d.ts +1 -1
  205. package/modules/deckgl.esm.min.js +2 -2
  206. package/modules/deckgl.min.cjs +2 -2
  207. package/modules/deckgl.min.js +2 -2
  208. package/modules/designer.d.ts +1 -1
  209. package/modules/designer.esm.min.js +187 -73
  210. package/modules/designer.esm.min.js.map +2 -2
  211. package/modules/designer.min.cjs +187 -73
  212. package/modules/designer.min.js +187 -73
  213. package/modules/designer.min.js.map +2 -2
  214. package/modules/devtools.d.ts +1 -1
  215. package/modules/devtools.esm.min.js +1 -1
  216. package/modules/devtools.min.cjs +1 -1
  217. package/modules/devtools.min.js +1 -1
  218. package/modules/dhtmlx-compat.d.ts +1 -1
  219. package/modules/dhtmlx-compat.esm.min.js +2 -2
  220. package/modules/dhtmlx-compat.min.cjs +2 -2
  221. package/modules/dhtmlx-compat.min.js +2 -2
  222. package/modules/gantt.d.ts +1 -1
  223. package/modules/gantt.esm.min.js +2 -2
  224. package/modules/gantt.min.cjs +2 -2
  225. package/modules/gantt.min.js +2 -2
  226. package/modules/geo-europe-nuts.d.ts +1 -1
  227. package/modules/geo-europe-nuts.esm.min.js +1 -1
  228. package/modules/geo-europe-nuts.min.cjs +1 -1
  229. package/modules/geo-europe-nuts.min.js +1 -1
  230. package/modules/geo-uk.d.ts +1 -1
  231. package/modules/geo-uk.esm.min.js +1 -1
  232. package/modules/geo-uk.min.cjs +1 -1
  233. package/modules/geo-uk.min.js +1 -1
  234. package/modules/geo-us-states.d.ts +1 -1
  235. package/modules/geo-us-states.esm.min.js +1 -1
  236. package/modules/geo-us-states.min.cjs +1 -1
  237. package/modules/geo-us-states.min.js +1 -1
  238. package/modules/geo-world-110m.d.ts +1 -1
  239. package/modules/geo-world-110m.esm.min.js +1 -1
  240. package/modules/geo-world-110m.min.cjs +1 -1
  241. package/modules/geo-world-110m.min.js +1 -1
  242. package/modules/geo-world-50m.d.ts +1 -1
  243. package/modules/geo-world-50m.esm.min.js +1 -1
  244. package/modules/geo-world-50m.min.cjs +1 -1
  245. package/modules/geo-world-50m.min.js +1 -1
  246. package/modules/geometry.d.ts +1 -1
  247. package/modules/geometry.esm.min.js +2 -2
  248. package/modules/geometry.min.cjs +2 -2
  249. package/modules/geometry.min.js +2 -2
  250. package/modules/htmx.d.ts +1 -1
  251. package/modules/htmx.esm.min.js +3 -3
  252. package/modules/htmx.min.cjs +3 -3
  253. package/modules/htmx.min.js +3 -3
  254. package/modules/kanban.d.ts +1 -1
  255. package/modules/kanban.esm.min.js +2 -2
  256. package/modules/kanban.min.cjs +2 -2
  257. package/modules/kanban.min.js +2 -2
  258. package/modules/kpi.d.ts +1 -1
  259. package/modules/kpi.esm.min.js +2 -2
  260. package/modules/kpi.min.cjs +2 -2
  261. package/modules/kpi.min.js +2 -2
  262. package/modules/layout.d.ts +1 -1
  263. package/modules/layout.esm.min.js +2 -2
  264. package/modules/layout.min.cjs +2 -2
  265. package/modules/layout.min.js +2 -2
  266. package/modules/leaflet.d.ts +1 -1
  267. package/modules/leaflet.esm.min.js +2 -2
  268. package/modules/leaflet.min.cjs +2 -2
  269. package/modules/leaflet.min.js +2 -2
  270. package/modules/list.d.ts +1 -1
  271. package/modules/list.esm.min.js +2 -2
  272. package/modules/list.min.cjs +2 -2
  273. package/modules/list.min.js +2 -2
  274. package/modules/mapview.d.ts +1 -1
  275. package/modules/mapview.esm.min.js +2 -2
  276. package/modules/mapview.min.cjs +2 -2
  277. package/modules/mapview.min.js +2 -2
  278. package/modules/mock-socket.d.ts +1 -1
  279. package/modules/mock-socket.esm.min.js +1 -1
  280. package/modules/mock-socket.min.cjs +1 -1
  281. package/modules/mock-socket.min.js +1 -1
  282. package/modules/presets/antd5.css +9 -0
  283. package/modules/presets/bootstrap5.css +9 -0
  284. package/modules/presets/fluent2.css +9 -0
  285. package/modules/presets/material3.css +9 -0
  286. package/modules/presets.d.ts +1 -1
  287. package/modules/presets.esm.min.js +2 -2
  288. package/modules/presets.min.cjs +2 -2
  289. package/modules/presets.min.js +2 -2
  290. package/modules/react.d.ts +1 -1
  291. package/modules/react.esm.min.js +2 -2
  292. package/modules/react.min.cjs +2 -2
  293. package/modules/react.min.js +2 -2
  294. package/modules/svelte.d.ts +1 -1
  295. package/modules/svelte.esm.min.js +2 -2
  296. package/modules/svelte.min.cjs +2 -2
  297. package/modules/svelte.min.js +2 -2
  298. package/modules/tabs.d.ts +1 -1
  299. package/modules/tabs.esm.min.js +2 -2
  300. package/modules/tabs.min.cjs +2 -2
  301. package/modules/tabs.min.js +2 -2
  302. package/modules/vue.d.ts +1 -1
  303. package/modules/vue.esm.min.js +2 -2
  304. package/modules/vue.min.cjs +2 -2
  305. package/modules/vue.min.js +2 -2
  306. package/modules/webcomponent.d.ts +1 -1
  307. package/modules/webcomponent.esm.min.js +3 -3
  308. package/modules/webcomponent.min.cjs +3 -3
  309. package/modules/webcomponent.min.js +3 -3
  310. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, dashboard module
2
+ * Lattice Grid 1.89.1, dashboard module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
6
- (function(Te){"use strict";var Ie=Object.create(null),ze=Object.create(null);function Pe(y,ee){Ie[y]=ee}function Ke(y){var ee=ze[y];if(ee)return ee;var V=Object.create(null);ze[y]=V;var I=Ie[y];if(!I)throw new Error("[lattice] missing module: "+y);return I(V,Ke),V}Pe("packages/core/src/internal/util.js",function(y,ee){"use strict";Object.defineProperty(y,"VERSION",{enumerable:!0,get:function(){return A}}),Object.defineProperty(y,"reportedWarnings",{enumerable:!0,get:function(){return de}}),Object.defineProperty(y,"warnOnce",{enumerable:!0,get:function(){return G}}),Object.defineProperty(y,"infoOnce",{enumerable:!0,get:function(){return k}}),Object.defineProperty(y,"resetWarnings",{enumerable:!0,get:function(){return j}}),Object.defineProperty(y,"fail",{enumerable:!0,get:function(){return f}}),Object.defineProperty(y,"invariant",{enumerable:!0,get:function(){return m}}),Object.defineProperty(y,"DEV",{enumerable:!0,get:function(){return z}}),Object.defineProperty(y,"isObject",{enumerable:!0,get:function(){return C}}),Object.defineProperty(y,"isFunction",{enumerable:!0,get:function(){return S}}),Object.defineProperty(y,"isNil",{enumerable:!0,get:function(){return X}}),Object.defineProperty(y,"isBlank",{enumerable:!0,get:function(){return D}}),Object.defineProperty(y,"isCtor",{enumerable:!0,get:function(){return R}}),Object.defineProperty(y,"pathGetter",{enumerable:!0,get:function(){return N}}),Object.defineProperty(y,"pathSetter",{enumerable:!0,get:function(){return c}}),Object.defineProperty(y,"getPath",{enumerable:!0,get:function(){return h}}),Object.defineProperty(y,"setPath",{enumerable:!0,get:function(){return a}}),Object.defineProperty(y,"humanise",{enumerable:!0,get:function(){return d}}),Object.defineProperty(y,"escapeHtml",{enumerable:!0,get:function(){return w}}),Object.defineProperty(y,"titleCase",{enumerable:!0,get:function(){return M}}),Object.defineProperty(y,"expand",{enumerable:!0,get:function(){return te}}),Object.defineProperty(y,"toArray",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(y,"merge",{enumerable:!0,get:function(){return me}}),Object.defineProperty(y,"mergeRow",{enumerable:!0,get:function(){return be}}),Object.defineProperty(y,"Lru",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(y,"collator",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(y,"defaultCompare",{enumerable:!0,get:function(){return re}}),Object.defineProperty(y,"now",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(y,"nextFrame",{enumerable:!0,get:function(){return we}}),Object.defineProperty(y,"cancelFrame",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(y,"frameBatched",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(y,"settleDebounce",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(y,"whenIdle",{enumerable:!0,get:function(){return je}}),Object.defineProperty(y,"uid",{enumerable:!0,get:function(){return Se}});const V="1.89.0";async function I(){return V}const A="1.89.0",F=new Set,fe=2e3;function ne(n){if(F.add(n),F.size>fe){const r=F.values().next().value;r!==void 0&&F.delete(r)}}const W=[],ae=500;function b(n,r,u){W.push({key:n,level:r,message:u.map($=>typeof $=="string"?$:x($)).join(" "),at:Date.now()}),W.length>ae&&W.shift()}function x(n){if(n instanceof Error)return n.message;try{return JSON.stringify(n)}catch{return String(n)}}function de(){return W.map(n=>({...n}))}function se(n){if(n.length===0||typeof n[0]!="string")return n;const r=n[0].replace(/^\[lattice\]\s*/,"");return r===n[0]?n:[r,...n.slice(1)]}function G(n,...r){if(F.has(n))return;ne(n);const u=se(r);b(n,"warn",u),console.warn("[lattice]",...u)}function k(n,...r){if(F.has(n))return;ne(n);const u=se(r);b(n,"info",u),console.info("[lattice]",...u)}function j(){F.clear(),W.length=0}function f(n,r){const u=new Error(`[lattice] ${n}`);throw r!==void 0&&(u.cause=r),u}function m(n,r){n||f(r)}const z=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function C(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function S(n){return typeof n=="function"}function X(n){return n==null}function D(n){return n==null||n===""}function R(n){return typeof n!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(n))?!0:!!(n.prototype&&Object.getOwnPropertyNames(n.prototype).length>1)}const P=new Map;function N(n){let r=P.get(n);if(r)return r;if(!n.includes("."))r=u=>u?.[n];else{const u=n.split("."),$=u.length;r=Z=>{let Q=Z;for(let U=0;U<$;U++){if(Q==null)return;Q=Q[u[U]]}return Q}}return P.set(n,r),r}const E=new Map;function c(n){let r=E.get(n);if(r)return r;if(!n.includes("."))r=(u,$)=>{u!=null&&(u[n]=$)};else{const u=n.split("."),$=u.length-1;r=(Z,Q)=>{let U=Z;for(let ie=0;ie<$;ie++){if(U==null)return;const ke=u[ie];U[ke]==null&&(U[ke]={}),U=U[ke]}U!=null&&(U[u[$]]=Q)}}return E.set(n,r),r}function h(n,r){return N(r)(n)}function a(n,r,u){c(r)(n,u)}function d(n){return n?(n.includes(".")?n.slice(n.lastIndexOf(".")+1):n).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,u=>u.toUpperCase()):""}const l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function w(n){const r=n==null?"":String(n);return/[&<>"']/.test(r)?r.replace(/[&<>"']/g,u=>l[u]):r}function M(n){return String(n).replace(/\w\S*/g,r=>r[0].toUpperCase()+r.slice(1).toLowerCase())}function te(n,r,u){if(n!==void 0)return n===!0?{enabled:!0,...u}:n===!1?{enabled:!1}:C(n)?n:{[r]:n,enabled:!0}}function oe(n){return n==null?[]:Array.isArray(n)?n:[n]}const $e=Object.freeze(new Set(["__proto__","constructor","prototype"]));function me(n,r){if(!C(n))return C(r)?{...r}:r;if(!C(r))return r===void 0?n:r;const u={...n};for(const $ of Object.keys(r)){if($e.has($))continue;const Z=r[$];Z!==void 0&&(u[$]=C(Z)&&C(u[$])?me(u[$],Z):Z)}return u}function be(n,r){if(!C(n)||!C(r)||n===r)return r;const u=Object.create(Object.getPrototypeOf(n));return Object.assign(u,n,r),u}class Y{#t;#e=new Map;#n;constructor(r=256,u=null){this.#t=r,this.#n=u}get size(){return this.#e.size}get max(){return this.#t}set max(r){this.#t=r,this.#r()}has(r){return this.#e.has(r)}get(r){const u=this.#e;if(!u.has(r))return;const $=u.get(r);return u.delete(r),u.set(r,$),$}peek(r){return this.#e.get(r)}set(r,u){const $=this.#e;return $.has(r)&&$.delete(r),$.set(r,u),this.#r(),u}delete(r){const u=this.#e.get(r);return this.#e.delete(r)&&this.#n&&this.#n(u,r),u}clear(){if(this.#n)for(const[r,u]of this.#e)this.#n(u,r);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const r=this.#e;for(;r.size>this.#t;){const u=r.keys().next().value,$=r.get(u);r.delete(u),this.#n&&this.#n($,u)}}}const le=new Map;function Re(n,r){const u=`${n||""}|${r?JSON.stringify(r):""}`;let $=le.get(u);return $||($=new Intl.Collator(n||void 0,{numeric:!0,sensitivity:"variant",...r}),le.set(u,$)),$}function re(n,r){if(n===r)return 0;if(n==null)return 1;if(r==null)return-1;if(typeof n=="number"&&typeof r=="number")return Number.isNaN(n)?Number.isNaN(r)?0:1:Number.isNaN(r)||n<r?-1:n>r?1:0;const u=String(n),$=String(r);return u<$?-1:u>$?1:0}function ye(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const Oe=typeof requestAnimationFrame=="function";function we(n){return Oe?requestAnimationFrame(n):setTimeout(()=>n(ye()),16)}function pe(n){n!=null&&(Oe?cancelAnimationFrame(n):clearTimeout(n))}function Le(n){let r=null,u=null;const $=()=>{r=null;const Q=u;u=null,n(...Q||[])},Z=(...Q)=>{u=Q,r===null&&(r=we($))};return Z.cancel=()=>{pe(r),r=null,u=null},Z.flush=()=>{r!==null&&(pe(r),$())},Z}function Ae(n,r){let u=null,$=null;const Z=()=>{if(u=null,$===null)return;const ie=$;$=null,n(...ie),Q()},Q=()=>{u=setTimeout(Z,r),typeof u?.unref=="function"&&u.unref()},U=(...ie)=>{u===null?(n(...ie),Q()):($=ie,clearTimeout(u),Q())};return U.flush=()=>{if(u!==null&&clearTimeout(u),u=null,$===null)return;const ie=$;$=null,n(...ie)},U.cancel=()=>{u!==null&&clearTimeout(u),u=null,$=null},U.pending=()=>u!==null||$!==null,U}function je(n,r=50){return typeof requestIdleCallback=="function"?requestIdleCallback(n,{timeout:r}):setTimeout(()=>n({timeRemaining:()=>0,didTimeout:!0}),1)}let Ee=0;function Se(n="l"){return`${n}${(++Ee).toString(36)}`}}),Pe("packages/modules/dashboard/spec.js",function(y,ee){"use strict";Object.defineProperty(y,"PANEL_KINDS",{enumerable:!0,get:function(){return V}}),Object.defineProperty(y,"SOURCE_KINDS",{enumerable:!0,get:function(){return I}}),Object.defineProperty(y,"MAP_BINDINGS",{enumerable:!0,get:function(){return A}}),Object.defineProperty(y,"GRID_REF",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(y,"isPlain",{enumerable:!0,get:function(){return b}}),Object.defineProperty(y,"copySpec",{enumerable:!0,get:function(){return x}}),Object.defineProperty(y,"sameSpec",{enumerable:!0,get:function(){return de}}),Object.defineProperty(y,"parseSourceRef",{enumerable:!0,get:function(){return se}}),Object.defineProperty(y,"readRelation",{enumerable:!0,get:function(){return G}}),Object.defineProperty(y,"inspectSpec",{enumerable:!0,get:function(){return k}}),Object.defineProperty(y,"validateDashboardSpec",{enumerable:!0,get:function(){return j}});const V=Object.freeze(["grid","chart","kpi","calendar","map","html"]),I=Object.freeze(["rows","pushdown","router","grid"]),A=Object.freeze(["chart","leaflet","deckgl"]),F=Object.freeze(["layout","panels","sources","links"]),fe=Object.freeze(["id","kind","title","source","options","binding"]),ne=Object.freeze(["from","to","on"]),W=Object.freeze({rows:["kind","rows","columns","rowKey"],router:["kind","router","predicate","route","columns","rowKey"],grid:["kind","of"]}),ae="grid:";function b(f){if(!f||typeof f!="object"||Array.isArray(f))return!1;const m=Object.getPrototypeOf(f);return m===Object.prototype||m===null}function x(f,m){if(m==="rows"&&Array.isArray(f))return f;if(Array.isArray(f))return f.map(C=>x(C));if(!b(f)||Object.values(f).some(C=>typeof C=="function"))return f;const z={};for(const[C,S]of Object.entries(f))S!==void 0&&(z[C]=x(S,C));return z}function de(f,m){if(f===m)return!0;if(Array.isArray(f)||Array.isArray(m))return!Array.isArray(f)||!Array.isArray(m)||f.length!==m.length?!1:f.every((S,X)=>de(S,m[X]));if(!b(f)||!b(m))return!1;const z=Object.keys(f).filter(S=>f[S]!==void 0),C=Object.keys(m).filter(S=>m[S]!==void 0);return z.length!==C.length?!1:z.every(S=>de(f[S],m[S]))}function se(f){return typeof f!="string"||f===""?null:f.startsWith(ae)?{kind:"grid",of:f.slice(ae.length)}:{kind:"named",id:f}}function G(f){return typeof f=="string"&&f!==""?{from:f,to:f}:typeof f=="function"?f:b(f)&&typeof f.from=="string"&&f.from!==""&&typeof f.to=="string"&&f.to!==""?{from:f.from,to:f.to}:null}function k(f){const m=[],z=new Set,C=new Set,S=new Set,X=new Set,D={fatal:null,problems:m,badPanels:z,badSources:C,badLinks:S,badWindows:X};if(!b(f))return D.fatal="the spec is not an object",m.push({path:"",message:"is not an object: a spec is { layout, panels, sources, links }"}),D;const R=f;if(!Array.isArray(R.panels))return D.fatal="spec.panels is not an array",m.push({path:"panels",message:"is not an array of panels"}),D;for(const c of Object.keys(R))F.includes(c)||m.push({path:c,message:`is not a dashboard spec key (${F.join(", ")})`});const P=new Map;R.panels.forEach((c,h)=>{const a=`panels[${h}]`;if(!b(c)){z.add(h),m.push({path:a,message:"is not an object"});return}if(typeof c.id!="string"||c.id===""){z.add(h),m.push({path:`${a}.id`,message:"is missing: every panel needs a unique string id"});return}if(P.has(c.id)){z.add(h),m.push({path:`${a}.id`,panel:c.id,message:`repeats "${c.id}", which panels[${P.get(c.id).index}] already uses`});return}P.set(c.id,{index:h,kind:c.kind})});const N=R.sources===void 0?{}:R.sources;if(!b(N))m.push({path:"sources",message:"is not an object of named sources"});else for(const[c,h]of Object.entries(N)){const a=`sources.${c}`,d=(w,M)=>{C.add(c),m.push({path:w,message:M})};if(!b(h)){d(a,"is not an object");continue}if(!I.includes(h.kind)){d(`${a}.kind`,`names no source kind (${I.join(", ")})`);continue}const l=W[h.kind];if(l)for(const w of Object.keys(h))l.includes(w)||m.push({path:`${a}.${w}`,message:`is not a key of a ${h.kind} source (${l.join(", ")})`});if(h.columns!==void 0&&!Array.isArray(h.columns)&&d(`${a}.columns`,"is not an array of columns"),h.kind==="rows"&&!Array.isArray(h.rows)&&d(`${a}.rows`,"is not an array of rows"),h.kind==="pushdown"&&!(h.adapter&&typeof h.adapter.execute=="function")&&d(`${a}.adapter`,"is not a pushdown adapter (an object with execute())"),h.kind==="router"&&(h.router&&typeof h.router.attach=="function"||d(`${a}.router`,"is not a Data Router (an object with attach())"),h.predicate===void 0&&d(`${a}.predicate`,"is missing: name the partition value or predicate the route matches")),h.kind==="grid"){const w=typeof h.of=="string"?P.get(h.of):void 0;w?w.kind!=="grid"&&d(`${a}.of`,`names "${h.of}", a ${w.kind} panel: only a grid panel has a grid to view`):d(`${a}.of`,"names no panel")}}const E=new Map;R.panels.forEach((c,h)=>{if(z.has(h))return;const a=`panels[${h}]`,d=(M,te)=>{z.add(h),m.push({path:M,panel:c.id,message:te})};for(const M of Object.keys(c))fe.includes(M)||m.push({path:`${a}.${M}`,panel:c.id,message:`is not a panel key (${fe.join(", ")}); a viewer's own settings go in options`});if(!V.includes(c.kind)){d(`${a}.kind`,`names no panel kind (${V.join(", ")})`);return}if(c.title!==void 0&&typeof c.title!="string"&&m.push({path:`${a}.title`,panel:c.id,message:"is not a string"}),c.options!==void 0&&!b(c.options)){d(`${a}.options`,"is not an object");return}if(c.binding!==void 0&&(c.kind!=="map"?d(`${a}.binding`,`is only read on a map panel, and this is a ${c.kind} panel`):A.includes(c.binding)||d(`${a}.binding`,`names no map binding (${A.join(", ")})`)),c.source===void 0){(c.kind==="chart"||c.kind==="map"||c.kind==="calendar")&&d(`${a}.source`,`is missing: a ${c.kind} panel draws a source's rows`);return}if(c.kind==="html"){d(`${a}.source`,"is set on an html panel, which reads no rows");return}const l=se(c.source);if(!l){d(`${a}.source`,"is not a source id");return}let w=null;if(l.kind==="grid")w=l.of;else if(!b(N)||!Object.hasOwn(N,l.id)){d(`${a}.source`,`names "${l.id}", which is not in sources`);return}else if(C.has(l.id)){d(`${a}.source`,`names "${l.id}", a source that is not usable`);return}else N[l.id].kind==="grid"&&(w=N[l.id].of);if(w!==null){const M=P.get(w);if(!M){d(`${a}.source`,`views the grid of "${w}", which is not a panel`);return}if(M.kind!=="grid"){d(`${a}.source`,`views the grid of "${w}", a ${M.kind} panel`);return}if(w===c.id){d(`${a}.source`,"views its own grid");return}E.set(c.id,w)}});for(let c=!0;c;)c=!1,R.panels.forEach((h,a)=>{if(z.has(a)||!E.has(h.id))return;const d=new Set([h.id]);let l=E.get(h.id);for(;l!==void 0;){const w=P.get(l);if(d.has(l)){z.add(a),m.push({path:`panels[${a}].source`,panel:h.id,message:`is part of a cycle of panels viewing each other's grids (${[...d,l].join(" -> ")})`}),c=!0;return}if(!w||z.has(w.index)){z.add(a),m.push({path:`panels[${a}].source`,panel:h.id,message:`views the grid of "${l}", a panel that was not built`}),c=!0;return}d.add(l),l=E.get(l)}});if(R.links!==void 0&&!Array.isArray(R.links)?m.push({path:"links",message:"is not an array of links"}):(R.links||[]).forEach((c,h)=>{const a=`links[${h}]`,d=(l,w)=>{S.add(h),m.push({path:l,link:h,message:w})};if(!b(c)){d(a,"is not an object");return}for(const l of Object.keys(c))ne.includes(l)||m.push({path:`${a}.${l}`,link:h,message:`is not a link key (${ne.join(", ")})`});if(typeof c.from!="string"||!P.has(c.from)){d(`${a}.from`,"names no panel");return}if(typeof c.to!="string"||!P.has(c.to)){d(`${a}.to`,"names no panel");return}if(c.from===c.to){d(`${a}.to`,"is the panel the link starts from");return}G(c.on)||d(`${a}.on`,"is not a column name, a { from, to } pair of column names, or a relation function")}),R.layout!==void 0){if(!b(R.layout))m.push({path:"layout",message:"is not an object"});else if(R.layout.windows!==void 0)if(!Array.isArray(R.layout.windows))m.push({path:"layout.windows",message:"is not an array of windows"});else{const c=new Set;R.layout.windows.forEach((h,a)=>{const d=`layout.windows[${a}]`;!b(h)||typeof h.id!="string"?(X.add(a),m.push({path:d,message:"is not a window with a string id"})):P.has(h.id)?c.has(h.id)?(X.add(a),m.push({path:`${d}.id`,message:`places "${h.id}" a second time`})):c.add(h.id):(X.add(a),m.push({path:`${d}.id`,message:`names "${h.id}", which is not a panel`}))})}}return D}function j(f){const{problems:m}=k(f);return{ok:m.length===0,problems:m.map(({path:z,message:C})=>({path:z,message:C}))}}}),Pe("packages/modules/dashboard/propose.js",function(y,ee){"use strict";Object.defineProperty(y,"PROPOSE_SYSTEM",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(y,"columnRefs",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(y,"proposalRequest",{enumerable:!0,get:function(){return b}}),Object.defineProperty(y,"parseProposal",{enumerable:!0,get:function(){return de}}),Object.defineProperty(y,"checkProposal",{enumerable:!0,get:function(){return se}});const V=ee("packages/modules/dashboard/spec.js"),I=V.inspectSpec,A=V.isPlain,F=V.copySpec,fe=V.parseSourceRef,ne=["You design dashboards for a data grid. Return ONLY a JSON object of the form",'{ "layout": { "columns": <n>, "rows": <n> }, "panels": [ { "id": "<id>", "kind": "<kind>",','"title": "<title>", "source": "<source id>", "binding": "chart", "options": { ... } } ],','"links": [ { "from": "<grid panel id>", "to": "<panel id>", "on": "<column>" } ] }.',"Use only the panel kinds and the columns listed in SCHEMA, and only the source it names.","A chart panel's options are a chart spec (type, x, y, series); a kpi panel's are",'{ tiles: [ { id, field, aggregation } ] }; a map panel with binding "chart" takes a map chart',`spec (type "markermap", lon, lat); a grid panel's are { columns: [ { field } ] }.`,"A person reviews the proposal before anything is built."].join(" "),W=Object.freeze(["x","y","series","measure","size","value","volume","lon","lat","geometry","label","start","end","source","target","multiples"]);function ae(G){const k=new Set,j=A(G.options)?G.options:{},f=m=>{typeof m=="string"&&m!==""&&k.add(m)};if(G.kind==="grid")for(const m of Array.isArray(j.columns)?j.columns:[])A(m)&&f(m.field);else if(G.kind==="kpi"){for(const m of Array.isArray(j.tiles)?j.tiles:[])A(m)&&f(m.field);for(const m of Array.isArray(j.fields)?j.fields:[])f(m)}else if(G.kind==="chart"||G.kind==="map"&&(G.binding||"chart")==="chart")for(const m of W)f(j[m]);else G.kind==="map"&&A(j.position)&&(f(j.position.lon),f(j.position.lat),f(j.position.geometry));return[...k]}function b(G,k){const j={source:k.source,columns:k.columns,kinds:k.kinds};let f=`${G}
6
+ (function(Te){"use strict";var Ie=Object.create(null),ze=Object.create(null);function Pe(y,ee){Ie[y]=ee}function Ke(y){var ee=ze[y];if(ee)return ee;var V=Object.create(null);ze[y]=V;var I=Ie[y];if(!I)throw new Error("[lattice] missing module: "+y);return I(V,Ke),V}Pe("packages/core/src/internal/util.js",function(y,ee){"use strict";Object.defineProperty(y,"VERSION",{enumerable:!0,get:function(){return A}}),Object.defineProperty(y,"reportedWarnings",{enumerable:!0,get:function(){return de}}),Object.defineProperty(y,"warnOnce",{enumerable:!0,get:function(){return G}}),Object.defineProperty(y,"infoOnce",{enumerable:!0,get:function(){return k}}),Object.defineProperty(y,"resetWarnings",{enumerable:!0,get:function(){return j}}),Object.defineProperty(y,"fail",{enumerable:!0,get:function(){return f}}),Object.defineProperty(y,"invariant",{enumerable:!0,get:function(){return m}}),Object.defineProperty(y,"DEV",{enumerable:!0,get:function(){return z}}),Object.defineProperty(y,"isObject",{enumerable:!0,get:function(){return C}}),Object.defineProperty(y,"isFunction",{enumerable:!0,get:function(){return S}}),Object.defineProperty(y,"isNil",{enumerable:!0,get:function(){return X}}),Object.defineProperty(y,"isBlank",{enumerable:!0,get:function(){return D}}),Object.defineProperty(y,"isCtor",{enumerable:!0,get:function(){return R}}),Object.defineProperty(y,"pathGetter",{enumerable:!0,get:function(){return N}}),Object.defineProperty(y,"pathSetter",{enumerable:!0,get:function(){return c}}),Object.defineProperty(y,"getPath",{enumerable:!0,get:function(){return h}}),Object.defineProperty(y,"setPath",{enumerable:!0,get:function(){return a}}),Object.defineProperty(y,"humanise",{enumerable:!0,get:function(){return d}}),Object.defineProperty(y,"escapeHtml",{enumerable:!0,get:function(){return w}}),Object.defineProperty(y,"titleCase",{enumerable:!0,get:function(){return M}}),Object.defineProperty(y,"expand",{enumerable:!0,get:function(){return te}}),Object.defineProperty(y,"toArray",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(y,"merge",{enumerable:!0,get:function(){return me}}),Object.defineProperty(y,"mergeRow",{enumerable:!0,get:function(){return be}}),Object.defineProperty(y,"Lru",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(y,"collator",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(y,"defaultCompare",{enumerable:!0,get:function(){return re}}),Object.defineProperty(y,"now",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(y,"nextFrame",{enumerable:!0,get:function(){return we}}),Object.defineProperty(y,"cancelFrame",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(y,"frameBatched",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(y,"settleDebounce",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(y,"whenIdle",{enumerable:!0,get:function(){return je}}),Object.defineProperty(y,"uid",{enumerable:!0,get:function(){return Se}});const V="1.89.1";async function I(){return V}const A="1.89.1",F=new Set,fe=2e3;function ne(n){if(F.add(n),F.size>fe){const r=F.values().next().value;r!==void 0&&F.delete(r)}}const W=[],ae=500;function b(n,r,u){W.push({key:n,level:r,message:u.map($=>typeof $=="string"?$:x($)).join(" "),at:Date.now()}),W.length>ae&&W.shift()}function x(n){if(n instanceof Error)return n.message;try{return JSON.stringify(n)}catch{return String(n)}}function de(){return W.map(n=>({...n}))}function se(n){if(n.length===0||typeof n[0]!="string")return n;const r=n[0].replace(/^\[lattice\]\s*/,"");return r===n[0]?n:[r,...n.slice(1)]}function G(n,...r){if(F.has(n))return;ne(n);const u=se(r);b(n,"warn",u),console.warn("[lattice]",...u)}function k(n,...r){if(F.has(n))return;ne(n);const u=se(r);b(n,"info",u),console.info("[lattice]",...u)}function j(){F.clear(),W.length=0}function f(n,r){const u=new Error(`[lattice] ${n}`);throw r!==void 0&&(u.cause=r),u}function m(n,r){n||f(r)}const z=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function C(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function S(n){return typeof n=="function"}function X(n){return n==null}function D(n){return n==null||n===""}function R(n){return typeof n!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(n))?!0:!!(n.prototype&&Object.getOwnPropertyNames(n.prototype).length>1)}const P=new Map;function N(n){let r=P.get(n);if(r)return r;if(!n.includes("."))r=u=>u?.[n];else{const u=n.split("."),$=u.length;r=Z=>{let Q=Z;for(let U=0;U<$;U++){if(Q==null)return;Q=Q[u[U]]}return Q}}return P.set(n,r),r}const E=new Map;function c(n){let r=E.get(n);if(r)return r;if(!n.includes("."))r=(u,$)=>{u!=null&&(u[n]=$)};else{const u=n.split("."),$=u.length-1;r=(Z,Q)=>{let U=Z;for(let ie=0;ie<$;ie++){if(U==null)return;const ke=u[ie];U[ke]==null&&(U[ke]={}),U=U[ke]}U!=null&&(U[u[$]]=Q)}}return E.set(n,r),r}function h(n,r){return N(r)(n)}function a(n,r,u){c(r)(n,u)}function d(n){return n?(n.includes(".")?n.slice(n.lastIndexOf(".")+1):n).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,u=>u.toUpperCase()):""}const l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function w(n){const r=n==null?"":String(n);return/[&<>"']/.test(r)?r.replace(/[&<>"']/g,u=>l[u]):r}function M(n){return String(n).replace(/\w\S*/g,r=>r[0].toUpperCase()+r.slice(1).toLowerCase())}function te(n,r,u){if(n!==void 0)return n===!0?{enabled:!0,...u}:n===!1?{enabled:!1}:C(n)?n:{[r]:n,enabled:!0}}function oe(n){return n==null?[]:Array.isArray(n)?n:[n]}const $e=Object.freeze(new Set(["__proto__","constructor","prototype"]));function me(n,r){if(!C(n))return C(r)?{...r}:r;if(!C(r))return r===void 0?n:r;const u={...n};for(const $ of Object.keys(r)){if($e.has($))continue;const Z=r[$];Z!==void 0&&(u[$]=C(Z)&&C(u[$])?me(u[$],Z):Z)}return u}function be(n,r){if(!C(n)||!C(r)||n===r)return r;const u=Object.create(Object.getPrototypeOf(n));return Object.assign(u,n,r),u}class Y{#t;#e=new Map;#n;constructor(r=256,u=null){this.#t=r,this.#n=u}get size(){return this.#e.size}get max(){return this.#t}set max(r){this.#t=r,this.#r()}has(r){return this.#e.has(r)}get(r){const u=this.#e;if(!u.has(r))return;const $=u.get(r);return u.delete(r),u.set(r,$),$}peek(r){return this.#e.get(r)}set(r,u){const $=this.#e;return $.has(r)&&$.delete(r),$.set(r,u),this.#r(),u}delete(r){const u=this.#e.get(r);return this.#e.delete(r)&&this.#n&&this.#n(u,r),u}clear(){if(this.#n)for(const[r,u]of this.#e)this.#n(u,r);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const r=this.#e;for(;r.size>this.#t;){const u=r.keys().next().value,$=r.get(u);r.delete(u),this.#n&&this.#n($,u)}}}const le=new Map;function Re(n,r){const u=`${n||""}|${r?JSON.stringify(r):""}`;let $=le.get(u);return $||($=new Intl.Collator(n||void 0,{numeric:!0,sensitivity:"variant",...r}),le.set(u,$)),$}function re(n,r){if(n===r)return 0;if(n==null)return 1;if(r==null)return-1;if(typeof n=="number"&&typeof r=="number")return Number.isNaN(n)?Number.isNaN(r)?0:1:Number.isNaN(r)||n<r?-1:n>r?1:0;const u=String(n),$=String(r);return u<$?-1:u>$?1:0}function ye(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const Oe=typeof requestAnimationFrame=="function";function we(n){return Oe?requestAnimationFrame(n):setTimeout(()=>n(ye()),16)}function pe(n){n!=null&&(Oe?cancelAnimationFrame(n):clearTimeout(n))}function Le(n){let r=null,u=null;const $=()=>{r=null;const Q=u;u=null,n(...Q||[])},Z=(...Q)=>{u=Q,r===null&&(r=we($))};return Z.cancel=()=>{pe(r),r=null,u=null},Z.flush=()=>{r!==null&&(pe(r),$())},Z}function Ae(n,r){let u=null,$=null;const Z=()=>{if(u=null,$===null)return;const ie=$;$=null,n(...ie),Q()},Q=()=>{u=setTimeout(Z,r),typeof u?.unref=="function"&&u.unref()},U=(...ie)=>{u===null?(n(...ie),Q()):($=ie,clearTimeout(u),Q())};return U.flush=()=>{if(u!==null&&clearTimeout(u),u=null,$===null)return;const ie=$;$=null,n(...ie)},U.cancel=()=>{u!==null&&clearTimeout(u),u=null,$=null},U.pending=()=>u!==null||$!==null,U}function je(n,r=50){return typeof requestIdleCallback=="function"?requestIdleCallback(n,{timeout:r}):setTimeout(()=>n({timeRemaining:()=>0,didTimeout:!0}),1)}let Ee=0;function Se(n="l"){return`${n}${(++Ee).toString(36)}`}}),Pe("packages/modules/dashboard/spec.js",function(y,ee){"use strict";Object.defineProperty(y,"PANEL_KINDS",{enumerable:!0,get:function(){return V}}),Object.defineProperty(y,"SOURCE_KINDS",{enumerable:!0,get:function(){return I}}),Object.defineProperty(y,"MAP_BINDINGS",{enumerable:!0,get:function(){return A}}),Object.defineProperty(y,"GRID_REF",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(y,"isPlain",{enumerable:!0,get:function(){return b}}),Object.defineProperty(y,"copySpec",{enumerable:!0,get:function(){return x}}),Object.defineProperty(y,"sameSpec",{enumerable:!0,get:function(){return de}}),Object.defineProperty(y,"parseSourceRef",{enumerable:!0,get:function(){return se}}),Object.defineProperty(y,"readRelation",{enumerable:!0,get:function(){return G}}),Object.defineProperty(y,"inspectSpec",{enumerable:!0,get:function(){return k}}),Object.defineProperty(y,"validateDashboardSpec",{enumerable:!0,get:function(){return j}});const V=Object.freeze(["grid","chart","kpi","calendar","map","html"]),I=Object.freeze(["rows","pushdown","router","grid"]),A=Object.freeze(["chart","leaflet","deckgl"]),F=Object.freeze(["layout","panels","sources","links"]),fe=Object.freeze(["id","kind","title","source","options","binding"]),ne=Object.freeze(["from","to","on"]),W=Object.freeze({rows:["kind","rows","columns","rowKey"],router:["kind","router","predicate","route","columns","rowKey"],grid:["kind","of"]}),ae="grid:";function b(f){if(!f||typeof f!="object"||Array.isArray(f))return!1;const m=Object.getPrototypeOf(f);return m===Object.prototype||m===null}function x(f,m){if(m==="rows"&&Array.isArray(f))return f;if(Array.isArray(f))return f.map(C=>x(C));if(!b(f)||Object.values(f).some(C=>typeof C=="function"))return f;const z={};for(const[C,S]of Object.entries(f))S!==void 0&&(z[C]=x(S,C));return z}function de(f,m){if(f===m)return!0;if(Array.isArray(f)||Array.isArray(m))return!Array.isArray(f)||!Array.isArray(m)||f.length!==m.length?!1:f.every((S,X)=>de(S,m[X]));if(!b(f)||!b(m))return!1;const z=Object.keys(f).filter(S=>f[S]!==void 0),C=Object.keys(m).filter(S=>m[S]!==void 0);return z.length!==C.length?!1:z.every(S=>de(f[S],m[S]))}function se(f){return typeof f!="string"||f===""?null:f.startsWith(ae)?{kind:"grid",of:f.slice(ae.length)}:{kind:"named",id:f}}function G(f){return typeof f=="string"&&f!==""?{from:f,to:f}:typeof f=="function"?f:b(f)&&typeof f.from=="string"&&f.from!==""&&typeof f.to=="string"&&f.to!==""?{from:f.from,to:f.to}:null}function k(f){const m=[],z=new Set,C=new Set,S=new Set,X=new Set,D={fatal:null,problems:m,badPanels:z,badSources:C,badLinks:S,badWindows:X};if(!b(f))return D.fatal="the spec is not an object",m.push({path:"",message:"is not an object: a spec is { layout, panels, sources, links }"}),D;const R=f;if(!Array.isArray(R.panels))return D.fatal="spec.panels is not an array",m.push({path:"panels",message:"is not an array of panels"}),D;for(const c of Object.keys(R))F.includes(c)||m.push({path:c,message:`is not a dashboard spec key (${F.join(", ")})`});const P=new Map;R.panels.forEach((c,h)=>{const a=`panels[${h}]`;if(!b(c)){z.add(h),m.push({path:a,message:"is not an object"});return}if(typeof c.id!="string"||c.id===""){z.add(h),m.push({path:`${a}.id`,message:"is missing: every panel needs a unique string id"});return}if(P.has(c.id)){z.add(h),m.push({path:`${a}.id`,panel:c.id,message:`repeats "${c.id}", which panels[${P.get(c.id).index}] already uses`});return}P.set(c.id,{index:h,kind:c.kind})});const N=R.sources===void 0?{}:R.sources;if(!b(N))m.push({path:"sources",message:"is not an object of named sources"});else for(const[c,h]of Object.entries(N)){const a=`sources.${c}`,d=(w,M)=>{C.add(c),m.push({path:w,message:M})};if(!b(h)){d(a,"is not an object");continue}if(!I.includes(h.kind)){d(`${a}.kind`,`names no source kind (${I.join(", ")})`);continue}const l=W[h.kind];if(l)for(const w of Object.keys(h))l.includes(w)||m.push({path:`${a}.${w}`,message:`is not a key of a ${h.kind} source (${l.join(", ")})`});if(h.columns!==void 0&&!Array.isArray(h.columns)&&d(`${a}.columns`,"is not an array of columns"),h.kind==="rows"&&!Array.isArray(h.rows)&&d(`${a}.rows`,"is not an array of rows"),h.kind==="pushdown"&&!(h.adapter&&typeof h.adapter.execute=="function")&&d(`${a}.adapter`,"is not a pushdown adapter (an object with execute())"),h.kind==="router"&&(h.router&&typeof h.router.attach=="function"||d(`${a}.router`,"is not a Data Router (an object with attach())"),h.predicate===void 0&&d(`${a}.predicate`,"is missing: name the partition value or predicate the route matches")),h.kind==="grid"){const w=typeof h.of=="string"?P.get(h.of):void 0;w?w.kind!=="grid"&&d(`${a}.of`,`names "${h.of}", a ${w.kind} panel: only a grid panel has a grid to view`):d(`${a}.of`,"names no panel")}}const E=new Map;R.panels.forEach((c,h)=>{if(z.has(h))return;const a=`panels[${h}]`,d=(M,te)=>{z.add(h),m.push({path:M,panel:c.id,message:te})};for(const M of Object.keys(c))fe.includes(M)||m.push({path:`${a}.${M}`,panel:c.id,message:`is not a panel key (${fe.join(", ")}); a viewer's own settings go in options`});if(!V.includes(c.kind)){d(`${a}.kind`,`names no panel kind (${V.join(", ")})`);return}if(c.title!==void 0&&typeof c.title!="string"&&m.push({path:`${a}.title`,panel:c.id,message:"is not a string"}),c.options!==void 0&&!b(c.options)){d(`${a}.options`,"is not an object");return}if(c.binding!==void 0&&(c.kind!=="map"?d(`${a}.binding`,`is only read on a map panel, and this is a ${c.kind} panel`):A.includes(c.binding)||d(`${a}.binding`,`names no map binding (${A.join(", ")})`)),c.source===void 0){(c.kind==="chart"||c.kind==="map"||c.kind==="calendar")&&d(`${a}.source`,`is missing: a ${c.kind} panel draws a source's rows`);return}if(c.kind==="html"){d(`${a}.source`,"is set on an html panel, which reads no rows");return}const l=se(c.source);if(!l){d(`${a}.source`,"is not a source id");return}let w=null;if(l.kind==="grid")w=l.of;else if(!b(N)||!Object.hasOwn(N,l.id)){d(`${a}.source`,`names "${l.id}", which is not in sources`);return}else if(C.has(l.id)){d(`${a}.source`,`names "${l.id}", a source that is not usable`);return}else N[l.id].kind==="grid"&&(w=N[l.id].of);if(w!==null){const M=P.get(w);if(!M){d(`${a}.source`,`views the grid of "${w}", which is not a panel`);return}if(M.kind!=="grid"){d(`${a}.source`,`views the grid of "${w}", a ${M.kind} panel`);return}if(w===c.id){d(`${a}.source`,"views its own grid");return}E.set(c.id,w)}});for(let c=!0;c;)c=!1,R.panels.forEach((h,a)=>{if(z.has(a)||!E.has(h.id))return;const d=new Set([h.id]);let l=E.get(h.id);for(;l!==void 0;){const w=P.get(l);if(d.has(l)){z.add(a),m.push({path:`panels[${a}].source`,panel:h.id,message:`is part of a cycle of panels viewing each other's grids (${[...d,l].join(" -> ")})`}),c=!0;return}if(!w||z.has(w.index)){z.add(a),m.push({path:`panels[${a}].source`,panel:h.id,message:`views the grid of "${l}", a panel that was not built`}),c=!0;return}d.add(l),l=E.get(l)}});if(R.links!==void 0&&!Array.isArray(R.links)?m.push({path:"links",message:"is not an array of links"}):(R.links||[]).forEach((c,h)=>{const a=`links[${h}]`,d=(l,w)=>{S.add(h),m.push({path:l,link:h,message:w})};if(!b(c)){d(a,"is not an object");return}for(const l of Object.keys(c))ne.includes(l)||m.push({path:`${a}.${l}`,link:h,message:`is not a link key (${ne.join(", ")})`});if(typeof c.from!="string"||!P.has(c.from)){d(`${a}.from`,"names no panel");return}if(typeof c.to!="string"||!P.has(c.to)){d(`${a}.to`,"names no panel");return}if(c.from===c.to){d(`${a}.to`,"is the panel the link starts from");return}G(c.on)||d(`${a}.on`,"is not a column name, a { from, to } pair of column names, or a relation function")}),R.layout!==void 0){if(!b(R.layout))m.push({path:"layout",message:"is not an object"});else if(R.layout.windows!==void 0)if(!Array.isArray(R.layout.windows))m.push({path:"layout.windows",message:"is not an array of windows"});else{const c=new Set;R.layout.windows.forEach((h,a)=>{const d=`layout.windows[${a}]`;!b(h)||typeof h.id!="string"?(X.add(a),m.push({path:d,message:"is not a window with a string id"})):P.has(h.id)?c.has(h.id)?(X.add(a),m.push({path:`${d}.id`,message:`places "${h.id}" a second time`})):c.add(h.id):(X.add(a),m.push({path:`${d}.id`,message:`names "${h.id}", which is not a panel`}))})}}return D}function j(f){const{problems:m}=k(f);return{ok:m.length===0,problems:m.map(({path:z,message:C})=>({path:z,message:C}))}}}),Pe("packages/modules/dashboard/propose.js",function(y,ee){"use strict";Object.defineProperty(y,"PROPOSE_SYSTEM",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(y,"columnRefs",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(y,"proposalRequest",{enumerable:!0,get:function(){return b}}),Object.defineProperty(y,"parseProposal",{enumerable:!0,get:function(){return de}}),Object.defineProperty(y,"checkProposal",{enumerable:!0,get:function(){return se}});const V=ee("packages/modules/dashboard/spec.js"),I=V.inspectSpec,A=V.isPlain,F=V.copySpec,fe=V.parseSourceRef,ne=["You design dashboards for a data grid. Return ONLY a JSON object of the form",'{ "layout": { "columns": <n>, "rows": <n> }, "panels": [ { "id": "<id>", "kind": "<kind>",','"title": "<title>", "source": "<source id>", "binding": "chart", "options": { ... } } ],','"links": [ { "from": "<grid panel id>", "to": "<panel id>", "on": "<column>" } ] }.',"Use only the panel kinds and the columns listed in SCHEMA, and only the source it names.","A chart panel's options are a chart spec (type, x, y, series); a kpi panel's are",'{ tiles: [ { id, field, aggregation } ] }; a map panel with binding "chart" takes a map chart',`spec (type "markermap", lon, lat); a grid panel's are { columns: [ { field } ] }.`,"A person reviews the proposal before anything is built."].join(" "),W=Object.freeze(["x","y","series","measure","size","value","volume","lon","lat","geometry","label","start","end","source","target","multiples"]);function ae(G){const k=new Set,j=A(G.options)?G.options:{},f=m=>{typeof m=="string"&&m!==""&&k.add(m)};if(G.kind==="grid")for(const m of Array.isArray(j.columns)?j.columns:[])A(m)&&f(m.field);else if(G.kind==="kpi"){for(const m of Array.isArray(j.tiles)?j.tiles:[])A(m)&&f(m.field);for(const m of Array.isArray(j.fields)?j.fields:[])f(m)}else if(G.kind==="chart"||G.kind==="map"&&(G.binding||"chart")==="chart")for(const m of W)f(j[m]);else G.kind==="map"&&A(j.position)&&(f(j.position.lon),f(j.position.lat),f(j.position.geometry));return[...k]}function b(G,k){const j={source:k.source,columns:k.columns,kinds:k.kinds};let f=`${G}
7
7
 
8
8
  SCHEMA
9
9
  ${JSON.stringify(j)}`;k.rows&&(f+=`
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, data-router module type declarations
2
+ * Lattice Grid 1.89.1, data-router module type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */