@deck.gl/widgets 9.0.40 → 9.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.dev.js CHANGED
@@ -29,6 +29,10 @@ var __exports__ = (() => {
29
29
  };
30
30
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
31
31
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
32
+ // If the importer is in node compatibility mode or this is not an ESM
33
+ // file that has been converted to a CommonJS file using a Babel-
34
+ // compatible transform (i.e. "__esModule" has not been set), then set
35
+ // "default" to the CommonJS "module.exports" for node compatibility.
32
36
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
37
  mod
34
38
  ));
@@ -77,47 +81,50 @@ var __exports__ = (() => {
77
81
  var r;
78
82
  var f;
79
83
  var e;
80
- var c = {};
81
- var s = [];
82
- var a = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
83
- var h = Array.isArray;
84
- function v(n2, l2) {
84
+ var c;
85
+ var s;
86
+ var a;
87
+ var h = {};
88
+ var p = [];
89
+ var v = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
90
+ var y = Array.isArray;
91
+ function d(n2, l2) {
85
92
  for (var u3 in l2)
86
93
  n2[u3] = l2[u3];
87
94
  return n2;
88
95
  }
89
- function p(n2) {
96
+ function w(n2) {
90
97
  var l2 = n2.parentNode;
91
98
  l2 && l2.removeChild(n2);
92
99
  }
93
- function y(l2, u3, t2) {
100
+ function _(l2, u3, t2) {
94
101
  var i3, o2, r2, f3 = {};
95
102
  for (r2 in u3)
96
103
  "key" == r2 ? i3 = u3[r2] : "ref" == r2 ? o2 = u3[r2] : f3[r2] = u3[r2];
97
104
  if (arguments.length > 2 && (f3.children = arguments.length > 3 ? n.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps)
98
105
  for (r2 in l2.defaultProps)
99
106
  void 0 === f3[r2] && (f3[r2] = l2.defaultProps[r2]);
100
- return d(l2, f3, i3, o2, null);
107
+ return g(l2, f3, i3, o2, null);
101
108
  }
102
- function d(n2, t2, i3, o2, r2) {
109
+ function g(n2, t2, i3, o2, r2) {
103
110
  var f3 = { type: n2, props: t2, key: i3, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: null == r2 ? ++u : r2, __i: -1, __u: 0 };
104
111
  return null == r2 && null != l.vnode && l.vnode(f3), f3;
105
112
  }
106
- function g(n2) {
113
+ function k(n2) {
107
114
  return n2.children;
108
115
  }
109
116
  function b(n2, l2) {
110
117
  this.props = n2, this.context = l2;
111
118
  }
112
- function m(n2, l2) {
119
+ function x(n2, l2) {
113
120
  if (null == l2)
114
- return n2.__ ? m(n2.__, n2.__i + 1) : null;
121
+ return n2.__ ? x(n2.__, n2.__i + 1) : null;
115
122
  for (var u3; l2 < n2.__k.length; l2++)
116
123
  if (null != (u3 = n2.__k[l2]) && null != u3.__e)
117
124
  return u3.__e;
118
- return "function" == typeof n2.type ? m(n2) : null;
125
+ return "function" == typeof n2.type ? x(n2) : null;
119
126
  }
120
- function w(n2) {
127
+ function C(n2) {
121
128
  var l2, u3;
122
129
  if (null != (n2 = n2.__) && null != n2.__c) {
123
130
  for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++)
@@ -125,46 +132,46 @@ var __exports__ = (() => {
125
132
  n2.__e = n2.__c.base = u3.__e;
126
133
  break;
127
134
  }
128
- return w(n2);
135
+ return C(n2);
129
136
  }
130
137
  }
131
- function k(n2) {
132
- (!n2.__d && (n2.__d = true) && i.push(n2) && !x.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r)(x);
138
+ function M(n2) {
139
+ (!n2.__d && (n2.__d = true) && i.push(n2) && !P.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r)(P);
133
140
  }
134
- function x() {
135
- var n2, u3, t2, o2, r2, e2, c2, s2, a2;
141
+ function P() {
142
+ var n2, u3, t2, o2, r2, e2, c2, s2;
136
143
  for (i.sort(f); n2 = i.shift(); )
137
- n2.__d && (u3 = i.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, s2 = [], a2 = [], (c2 = t2.__P) && ((o2 = v({}, r2)).__v = r2.__v + 1, l.vnode && l.vnode(o2), L(c2, o2, r2, t2.__n, void 0 !== c2.ownerSVGElement, 32 & r2.__u ? [e2] : null, s2, null == e2 ? m(r2) : e2, !!(32 & r2.__u), a2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, M(s2, o2, a2), o2.__e != e2 && w(o2)), i.length > u3 && i.sort(f));
138
- x.__r = 0;
144
+ n2.__d && (u3 = i.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((o2 = d({}, r2)).__v = r2.__v + 1, l.vnode && l.vnode(o2), O(t2.__P, o2, r2, t2.__n, t2.__P.namespaceURI, 32 & r2.__u ? [e2] : null, c2, null == e2 ? x(r2) : e2, !!(32 & r2.__u), s2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, j(c2, o2, s2), o2.__e != e2 && C(o2)), i.length > u3 && i.sort(f));
145
+ P.__r = 0;
139
146
  }
140
- function C(n2, l2, u3, t2, i3, o2, r2, f3, e2, a2, h2) {
141
- var v2, p2, y2, d2, _, g2 = t2 && t2.__k || s, b2 = l2.length;
142
- for (u3.__d = e2, P(u3, l2, g2), e2 = u3.__d, v2 = 0; v2 < b2; v2++)
143
- null != (y2 = u3.__k[v2]) && "boolean" != typeof y2 && "function" != typeof y2 && (p2 = -1 === y2.__i ? c : g2[y2.__i] || c, y2.__i = v2, L(n2, y2, p2, i3, o2, r2, f3, e2, a2, h2), d2 = y2.__e, y2.ref && p2.ref != y2.ref && (p2.ref && z(p2.ref, null, y2), h2.push(y2.ref, y2.__c || d2, y2)), null == _ && null != d2 && (_ = d2), 65536 & y2.__u || p2.__k === y2.__k ? (d2 || p2.__e != e2 || (e2 = m(p2)), e2 = S(y2, e2, n2)) : "function" == typeof y2.type && void 0 !== y2.__d ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609);
144
- u3.__d = e2, u3.__e = _;
147
+ function S(n2, l2, u3, t2, i3, o2, r2, f3, e2, c2, s2) {
148
+ var a2, v2, y2, d2, w2, _2 = t2 && t2.__k || p, g2 = l2.length;
149
+ for (u3.__d = e2, $(u3, l2, _2), e2 = u3.__d, a2 = 0; a2 < g2; a2++)
150
+ null != (y2 = u3.__k[a2]) && "boolean" != typeof y2 && "function" != typeof y2 && (v2 = -1 === y2.__i ? h : _2[y2.__i] || h, y2.__i = a2, O(n2, y2, v2, i3, o2, r2, f3, e2, c2, s2), d2 = y2.__e, y2.ref && v2.ref != y2.ref && (v2.ref && N(v2.ref, null, y2), s2.push(y2.ref, y2.__c || d2, y2)), null == w2 && null != d2 && (w2 = d2), 65536 & y2.__u || v2.__k === y2.__k ? e2 = I(y2, e2, n2) : "function" == typeof y2.type && void 0 !== y2.__d ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609);
151
+ u3.__d = e2, u3.__e = w2;
145
152
  }
146
- function P(n2, l2, u3) {
153
+ function $(n2, l2, u3) {
147
154
  var t2, i3, o2, r2, f3, e2 = l2.length, c2 = u3.length, s2 = c2, a2 = 0;
148
155
  for (n2.__k = [], t2 = 0; t2 < e2; t2++)
149
- r2 = t2 + a2, null != (i3 = n2.__k[t2] = null == (i3 = l2[t2]) || "boolean" == typeof i3 || "function" == typeof i3 ? null : "string" == typeof i3 || "number" == typeof i3 || "bigint" == typeof i3 || i3.constructor == String ? d(null, i3, null, null, null) : h(i3) ? d(g, { children: i3 }, null, null, null) : void 0 === i3.constructor && i3.__b > 0 ? d(i3.type, i3.props, i3.key, i3.ref ? i3.ref : null, i3.__v) : i3) ? (i3.__ = n2, i3.__b = n2.__b + 1, f3 = H(i3, u3, r2, s2), i3.__i = f3, o2 = null, -1 !== f3 && (s2--, (o2 = u3[f3]) && (o2.__u |= 131072)), null == o2 || null === o2.__v ? (-1 == f3 && a2--, "function" != typeof i3.type && (i3.__u |= 65536)) : f3 !== r2 && (f3 === r2 + 1 ? a2++ : f3 > r2 ? s2 > e2 - r2 ? a2 += f3 - r2 : a2-- : f3 < r2 ? f3 == r2 - 1 && (a2 = f3 - r2) : a2 = 0, f3 !== t2 + a2 && (i3.__u |= 65536))) : (o2 = u3[r2]) && null == o2.key && o2.__e && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = m(o2)), N(o2, o2, false), u3[r2] = null, s2--);
156
+ r2 = t2 + a2, null != (i3 = n2.__k[t2] = null == (i3 = l2[t2]) || "boolean" == typeof i3 || "function" == typeof i3 ? null : "string" == typeof i3 || "number" == typeof i3 || "bigint" == typeof i3 || i3.constructor == String ? g(null, i3, null, null, null) : y(i3) ? g(k, { children: i3 }, null, null, null) : void 0 === i3.constructor && i3.__b > 0 ? g(i3.type, i3.props, i3.key, i3.ref ? i3.ref : null, i3.__v) : i3) ? (i3.__ = n2, i3.__b = n2.__b + 1, f3 = L(i3, u3, r2, s2), i3.__i = f3, o2 = null, -1 !== f3 && (s2--, (o2 = u3[f3]) && (o2.__u |= 131072)), null == o2 || null === o2.__v ? (-1 == f3 && a2--, "function" != typeof i3.type && (i3.__u |= 65536)) : f3 !== r2 && (f3 == r2 - 1 ? a2-- : f3 == r2 + 1 ? a2++ : f3 > r2 ? s2 > e2 - r2 ? a2 += f3 - r2 : a2-- : f3 < r2 && (f3 == r2 - a2 ? a2 -= f3 - r2 : a2++), f3 !== t2 + a2 && (i3.__u |= 65536))) : (o2 = u3[r2]) && null == o2.key && o2.__e && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x(o2)), V(o2, o2, false), u3[r2] = null, s2--);
150
157
  if (s2)
151
158
  for (t2 = 0; t2 < c2; t2++)
152
- null != (o2 = u3[t2]) && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = m(o2)), N(o2, o2));
159
+ null != (o2 = u3[t2]) && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x(o2)), V(o2, o2));
153
160
  }
154
- function S(n2, l2, u3) {
161
+ function I(n2, l2, u3) {
155
162
  var t2, i3;
156
163
  if ("function" == typeof n2.type) {
157
164
  for (t2 = n2.__k, i3 = 0; t2 && i3 < t2.length; i3++)
158
- t2[i3] && (t2[i3].__ = n2, l2 = S(t2[i3], l2, u3));
165
+ t2[i3] && (t2[i3].__ = n2, l2 = I(t2[i3], l2, u3));
159
166
  return l2;
160
167
  }
161
- n2.__e != l2 && (u3.insertBefore(n2.__e, l2 || null), l2 = n2.__e);
168
+ n2.__e != l2 && (l2 && n2.type && !u3.contains(l2) && (l2 = x(n2)), u3.insertBefore(n2.__e, l2 || null), l2 = n2.__e);
162
169
  do {
163
170
  l2 = l2 && l2.nextSibling;
164
171
  } while (null != l2 && 8 === l2.nodeType);
165
172
  return l2;
166
173
  }
167
- function H(n2, l2, u3, t2) {
174
+ function L(n2, l2, u3, t2) {
168
175
  var i3 = n2.key, o2 = n2.type, r2 = u3 - 1, f3 = u3 + 1, e2 = l2[u3];
169
176
  if (null === e2 || e2 && i3 == e2.key && o2 === e2.type && 0 == (131072 & e2.__u))
170
177
  return u3;
@@ -183,10 +190,10 @@ var __exports__ = (() => {
183
190
  }
184
191
  return -1;
185
192
  }
186
- function I(n2, l2, u3) {
187
- "-" === l2[0] ? n2.setProperty(l2, null == u3 ? "" : u3) : n2[l2] = null == u3 ? "" : "number" != typeof u3 || a.test(l2) ? u3 : u3 + "px";
193
+ function T(n2, l2, u3) {
194
+ "-" === l2[0] ? n2.setProperty(l2, null == u3 ? "" : u3) : n2[l2] = null == u3 ? "" : "number" != typeof u3 || v.test(l2) ? u3 : u3 + "px";
188
195
  }
189
- function T(n2, l2, u3, t2, i3) {
196
+ function A(n2, l2, u3, t2, i3) {
190
197
  var o2;
191
198
  n:
192
199
  if ("style" === l2)
@@ -195,83 +202,86 @@ var __exports__ = (() => {
195
202
  else {
196
203
  if ("string" == typeof t2 && (n2.style.cssText = t2 = ""), t2)
197
204
  for (l2 in t2)
198
- u3 && l2 in u3 || I(n2.style, l2, "");
205
+ u3 && l2 in u3 || T(n2.style, l2, "");
199
206
  if (u3)
200
207
  for (l2 in u3)
201
- t2 && u3[l2] === t2[l2] || I(n2.style, l2, u3[l2]);
208
+ t2 && u3[l2] === t2[l2] || T(n2.style, l2, u3[l2]);
202
209
  }
203
210
  else if ("o" === l2[0] && "n" === l2[1])
204
- o2 = l2 !== (l2 = l2.replace(/(PointerCapture)$|Capture$/i, "$1")), l2 = l2.toLowerCase() in n2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u3, u3 ? t2 ? u3.u = t2.u : (u3.u = Date.now(), n2.addEventListener(l2, o2 ? D : A, o2)) : n2.removeEventListener(l2, o2 ? D : A, o2);
211
+ o2 = l2 !== (l2 = l2.replace(/(PointerCapture)$|Capture$/i, "$1")), l2 = l2.toLowerCase() in n2 || "onFocusOut" === l2 || "onFocusIn" === l2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u3, u3 ? t2 ? u3.u = t2.u : (u3.u = e, n2.addEventListener(l2, o2 ? s : c, o2)) : n2.removeEventListener(l2, o2 ? s : c, o2);
205
212
  else {
206
- if (i3)
213
+ if ("http://www.w3.org/2000/svg" == i3)
207
214
  l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
208
- else if ("width" !== l2 && "height" !== l2 && "href" !== l2 && "list" !== l2 && "form" !== l2 && "tabIndex" !== l2 && "download" !== l2 && "rowSpan" !== l2 && "colSpan" !== l2 && "role" !== l2 && l2 in n2)
215
+ else if ("width" != l2 && "height" != l2 && "href" != l2 && "list" != l2 && "form" != l2 && "tabIndex" != l2 && "download" != l2 && "rowSpan" != l2 && "colSpan" != l2 && "role" != l2 && "popover" != l2 && l2 in n2)
209
216
  try {
210
217
  n2[l2] = null == u3 ? "" : u3;
211
218
  break n;
212
219
  } catch (n3) {
213
220
  }
214
- "function" == typeof u3 || (null == u3 || false === u3 && "-" !== l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, u3));
221
+ "function" == typeof u3 || (null == u3 || false === u3 && "-" !== l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, "popover" == l2 && 1 == u3 ? "" : u3));
215
222
  }
216
223
  }
217
- function A(n2) {
218
- if (this.l) {
219
- var u3 = this.l[n2.type + false];
220
- if (n2.t) {
221
- if (n2.t <= u3.u)
224
+ function F(n2) {
225
+ return function(u3) {
226
+ if (this.l) {
227
+ var t2 = this.l[u3.type + n2];
228
+ if (null == u3.t)
229
+ u3.t = e++;
230
+ else if (u3.t < t2.u)
222
231
  return;
223
- } else
224
- n2.t = Date.now();
225
- return u3(l.event ? l.event(n2) : n2);
226
- }
227
- }
228
- function D(n2) {
229
- if (this.l)
230
- return this.l[n2.type + true](l.event ? l.event(n2) : n2);
232
+ return t2(l.event ? l.event(u3) : u3);
233
+ }
234
+ };
231
235
  }
232
- function L(n2, u3, t2, i3, o2, r2, f3, e2, c2, s2) {
233
- var a2, p2, y2, d2, _, m2, w2, k2, x2, P2, S2, $, H2, I2, T2, A2 = u3.type;
236
+ function O(n2, u3, t2, i3, o2, r2, f3, e2, c2, s2) {
237
+ var a2, h2, p2, v2, w2, _2, g2, m, x2, C2, M2, P2, $2, I2, H, L2, T2 = u3.type;
234
238
  if (void 0 !== u3.constructor)
235
239
  return null;
236
240
  128 & t2.__u && (c2 = !!(32 & t2.__u), r2 = [e2 = u3.__e = t2.__e]), (a2 = l.__b) && a2(u3);
237
241
  n:
238
- if ("function" == typeof A2)
242
+ if ("function" == typeof T2)
239
243
  try {
240
- if (k2 = u3.props, x2 = (a2 = A2.contextType) && i3[a2.__c], P2 = a2 ? x2 ? x2.props.value : a2.__ : i3, t2.__c ? w2 = (p2 = u3.__c = t2.__c).__ = p2.__E : ("prototype" in A2 && A2.prototype.render ? u3.__c = p2 = new A2(k2, P2) : (u3.__c = p2 = new b(k2, P2), p2.constructor = A2, p2.render = O), x2 && x2.sub(p2), p2.props = k2, p2.state || (p2.state = {}), p2.context = P2, p2.__n = i3, y2 = p2.__d = true, p2.__h = [], p2._sb = []), null == p2.__s && (p2.__s = p2.state), null != A2.getDerivedStateFromProps && (p2.__s == p2.state && (p2.__s = v({}, p2.__s)), v(p2.__s, A2.getDerivedStateFromProps(k2, p2.__s))), d2 = p2.props, _ = p2.state, p2.__v = u3, y2)
241
- null == A2.getDerivedStateFromProps && null != p2.componentWillMount && p2.componentWillMount(), null != p2.componentDidMount && p2.__h.push(p2.componentDidMount);
244
+ if (m = u3.props, x2 = "prototype" in T2 && T2.prototype.render, C2 = (a2 = T2.contextType) && i3[a2.__c], M2 = a2 ? C2 ? C2.props.value : a2.__ : i3, t2.__c ? g2 = (h2 = u3.__c = t2.__c).__ = h2.__E : (x2 ? u3.__c = h2 = new T2(m, M2) : (u3.__c = h2 = new b(m, M2), h2.constructor = T2, h2.render = q), C2 && C2.sub(h2), h2.props = m, h2.state || (h2.state = {}), h2.context = M2, h2.__n = i3, p2 = h2.__d = true, h2.__h = [], h2._sb = []), x2 && null == h2.__s && (h2.__s = h2.state), x2 && null != T2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = d({}, h2.__s)), d(h2.__s, T2.getDerivedStateFromProps(m, h2.__s))), v2 = h2.props, w2 = h2.state, h2.__v = u3, p2)
245
+ x2 && null == T2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), x2 && null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);
242
246
  else {
243
- if (null == A2.getDerivedStateFromProps && k2 !== d2 && null != p2.componentWillReceiveProps && p2.componentWillReceiveProps(k2, P2), !p2.__e && (null != p2.shouldComponentUpdate && false === p2.shouldComponentUpdate(k2, p2.__s, P2) || u3.__v === t2.__v)) {
244
- for (u3.__v !== t2.__v && (p2.props = k2, p2.state = p2.__s, p2.__d = false), u3.__e = t2.__e, u3.__k = t2.__k, u3.__k.forEach(function(n3) {
247
+ if (x2 && null == T2.getDerivedStateFromProps && m !== v2 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(m, M2), !h2.__e && (null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(m, h2.__s, M2) || u3.__v === t2.__v)) {
248
+ for (u3.__v !== t2.__v && (h2.props = m, h2.state = h2.__s, h2.__d = false), u3.__e = t2.__e, u3.__k = t2.__k, u3.__k.forEach(function(n3) {
245
249
  n3 && (n3.__ = u3);
246
- }), S2 = 0; S2 < p2._sb.length; S2++)
247
- p2.__h.push(p2._sb[S2]);
248
- p2._sb = [], p2.__h.length && f3.push(p2);
250
+ }), P2 = 0; P2 < h2._sb.length; P2++)
251
+ h2.__h.push(h2._sb[P2]);
252
+ h2._sb = [], h2.__h.length && f3.push(h2);
249
253
  break n;
250
254
  }
251
- null != p2.componentWillUpdate && p2.componentWillUpdate(k2, p2.__s, P2), null != p2.componentDidUpdate && p2.__h.push(function() {
252
- p2.componentDidUpdate(d2, _, m2);
255
+ null != h2.componentWillUpdate && h2.componentWillUpdate(m, h2.__s, M2), x2 && null != h2.componentDidUpdate && h2.__h.push(function() {
256
+ h2.componentDidUpdate(v2, w2, _2);
253
257
  });
254
258
  }
255
- if (p2.context = P2, p2.props = k2, p2.__P = n2, p2.__e = false, $ = l.__r, H2 = 0, "prototype" in A2 && A2.prototype.render) {
256
- for (p2.state = p2.__s, p2.__d = false, $ && $(u3), a2 = p2.render(p2.props, p2.state, p2.context), I2 = 0; I2 < p2._sb.length; I2++)
257
- p2.__h.push(p2._sb[I2]);
258
- p2._sb = [];
259
+ if (h2.context = M2, h2.props = m, h2.__P = n2, h2.__e = false, $2 = l.__r, I2 = 0, x2) {
260
+ for (h2.state = h2.__s, h2.__d = false, $2 && $2(u3), a2 = h2.render(h2.props, h2.state, h2.context), H = 0; H < h2._sb.length; H++)
261
+ h2.__h.push(h2._sb[H]);
262
+ h2._sb = [];
259
263
  } else
260
264
  do {
261
- p2.__d = false, $ && $(u3), a2 = p2.render(p2.props, p2.state, p2.context), p2.state = p2.__s;
262
- } while (p2.__d && ++H2 < 25);
263
- p2.state = p2.__s, null != p2.getChildContext && (i3 = v(v({}, i3), p2.getChildContext())), y2 || null == p2.getSnapshotBeforeUpdate || (m2 = p2.getSnapshotBeforeUpdate(d2, _)), C(n2, h(T2 = null != a2 && a2.type === g && null == a2.key ? a2.props.children : a2) ? T2 : [T2], u3, t2, i3, o2, r2, f3, e2, c2, s2), p2.base = u3.__e, u3.__u &= -161, p2.__h.length && f3.push(p2), w2 && (p2.__E = p2.__ = null);
265
+ h2.__d = false, $2 && $2(u3), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s;
266
+ } while (h2.__d && ++I2 < 25);
267
+ h2.state = h2.__s, null != h2.getChildContext && (i3 = d(d({}, i3), h2.getChildContext())), x2 && !p2 && null != h2.getSnapshotBeforeUpdate && (_2 = h2.getSnapshotBeforeUpdate(v2, w2)), S(n2, y(L2 = null != a2 && a2.type === k && null == a2.key ? a2.props.children : a2) ? L2 : [L2], u3, t2, i3, o2, r2, f3, e2, c2, s2), h2.base = u3.__e, u3.__u &= -161, h2.__h.length && f3.push(h2), g2 && (h2.__E = h2.__ = null);
264
268
  } catch (n3) {
265
- u3.__v = null, c2 || null != r2 ? (u3.__e = e2, u3.__u |= c2 ? 160 : 32, r2[r2.indexOf(e2)] = null) : (u3.__e = t2.__e, u3.__k = t2.__k), l.__e(n3, u3, t2);
269
+ if (u3.__v = null, c2 || null != r2) {
270
+ for (u3.__u |= c2 ? 160 : 32; e2 && 8 === e2.nodeType && e2.nextSibling; )
271
+ e2 = e2.nextSibling;
272
+ r2[r2.indexOf(e2)] = null, u3.__e = e2;
273
+ } else
274
+ u3.__e = t2.__e, u3.__k = t2.__k;
275
+ l.__e(n3, u3, t2);
266
276
  }
267
277
  else
268
- null == r2 && u3.__v === t2.__v ? (u3.__k = t2.__k, u3.__e = t2.__e) : u3.__e = j(t2.__e, u3, t2, i3, o2, r2, f3, c2, s2);
278
+ null == r2 && u3.__v === t2.__v ? (u3.__k = t2.__k, u3.__e = t2.__e) : u3.__e = z(t2.__e, u3, t2, i3, o2, r2, f3, c2, s2);
269
279
  (a2 = l.diffed) && a2(u3);
270
280
  }
271
- function M(n2, u3, t2) {
281
+ function j(n2, u3, t2) {
272
282
  u3.__d = void 0;
273
283
  for (var i3 = 0; i3 < t2.length; i3++)
274
- z(t2[i3], t2[++i3], t2[++i3]);
284
+ N(t2[i3], t2[++i3], t2[++i3]);
275
285
  l.__c && l.__c(u3, n2), n2.some(function(u4) {
276
286
  try {
277
287
  n2 = u4.__h, u4.__h = [], n2.some(function(n3) {
@@ -282,70 +292,82 @@ var __exports__ = (() => {
282
292
  }
283
293
  });
284
294
  }
285
- function j(l2, u3, t2, i3, o2, r2, f3, e2, s2) {
286
- var a2, v2, y2, d2, _, g2, b2, w2 = t2.props, k2 = u3.props, x2 = u3.type;
287
- if ("svg" === x2 && (o2 = true), null != r2) {
288
- for (a2 = 0; a2 < r2.length; a2++)
289
- if ((_ = r2[a2]) && "setAttribute" in _ == !!x2 && (x2 ? _.localName === x2 : 3 === _.nodeType)) {
290
- l2 = _, r2[a2] = null;
295
+ function z(l2, u3, t2, i3, o2, r2, f3, e2, c2) {
296
+ var s2, a2, p2, v2, d2, _2, g2, m = t2.props, k2 = u3.props, b2 = u3.type;
297
+ if ("svg" === b2 ? o2 = "http://www.w3.org/2000/svg" : "math" === b2 ? o2 = "http://www.w3.org/1998/Math/MathML" : o2 || (o2 = "http://www.w3.org/1999/xhtml"), null != r2) {
298
+ for (s2 = 0; s2 < r2.length; s2++)
299
+ if ((d2 = r2[s2]) && "setAttribute" in d2 == !!b2 && (b2 ? d2.localName === b2 : 3 === d2.nodeType)) {
300
+ l2 = d2, r2[s2] = null;
291
301
  break;
292
302
  }
293
303
  }
294
304
  if (null == l2) {
295
- if (null === x2)
305
+ if (null === b2)
296
306
  return document.createTextNode(k2);
297
- l2 = o2 ? document.createElementNS("http://www.w3.org/2000/svg", x2) : document.createElement(x2, k2.is && k2), r2 = null, e2 = false;
307
+ l2 = document.createElementNS(o2, b2, k2.is && k2), r2 = null, e2 = false;
298
308
  }
299
- if (null === x2)
300
- w2 === k2 || e2 && l2.data === k2 || (l2.data = k2);
309
+ if (null === b2)
310
+ m === k2 || e2 && l2.data === k2 || (l2.data = k2);
301
311
  else {
302
- if (r2 = r2 && n.call(l2.childNodes), w2 = t2.props || c, !e2 && null != r2)
303
- for (w2 = {}, a2 = 0; a2 < l2.attributes.length; a2++)
304
- w2[(_ = l2.attributes[a2]).name] = _.value;
305
- for (a2 in w2)
306
- _ = w2[a2], "children" == a2 || ("dangerouslySetInnerHTML" == a2 ? y2 = _ : "key" === a2 || a2 in k2 || T(l2, a2, null, _, o2));
307
- for (a2 in k2)
308
- _ = k2[a2], "children" == a2 ? d2 = _ : "dangerouslySetInnerHTML" == a2 ? v2 = _ : "value" == a2 ? g2 = _ : "checked" == a2 ? b2 = _ : "key" === a2 || e2 && "function" != typeof _ || w2[a2] === _ || T(l2, a2, _, w2[a2], o2);
309
- if (v2)
310
- e2 || y2 && (v2.__html === y2.__html || v2.__html === l2.innerHTML) || (l2.innerHTML = v2.__html), u3.__k = [];
311
- else if (y2 && (l2.innerHTML = ""), C(l2, h(d2) ? d2 : [d2], u3, t2, i3, o2 && "foreignObject" !== x2, r2, f3, r2 ? r2[0] : t2.__k && m(t2, 0), e2, s2), null != r2)
312
- for (a2 = r2.length; a2--; )
313
- null != r2[a2] && p(r2[a2]);
314
- e2 || (a2 = "value", void 0 !== g2 && (g2 !== l2[a2] || "progress" === x2 && !g2 || "option" === x2 && g2 !== w2[a2]) && T(l2, a2, g2, w2[a2], false), a2 = "checked", void 0 !== b2 && b2 !== l2[a2] && T(l2, a2, b2, w2[a2], false));
312
+ if (r2 = r2 && n.call(l2.childNodes), m = t2.props || h, !e2 && null != r2)
313
+ for (m = {}, s2 = 0; s2 < l2.attributes.length; s2++)
314
+ m[(d2 = l2.attributes[s2]).name] = d2.value;
315
+ for (s2 in m)
316
+ if (d2 = m[s2], "children" == s2)
317
+ ;
318
+ else if ("dangerouslySetInnerHTML" == s2)
319
+ p2 = d2;
320
+ else if ("key" !== s2 && !(s2 in k2)) {
321
+ if ("value" == s2 && "defaultValue" in k2 || "checked" == s2 && "defaultChecked" in k2)
322
+ continue;
323
+ A(l2, s2, null, d2, o2);
324
+ }
325
+ for (s2 in k2)
326
+ d2 = k2[s2], "children" == s2 ? v2 = d2 : "dangerouslySetInnerHTML" == s2 ? a2 = d2 : "value" == s2 ? _2 = d2 : "checked" == s2 ? g2 = d2 : "key" === s2 || e2 && "function" != typeof d2 || m[s2] === d2 || A(l2, s2, d2, m[s2], o2);
327
+ if (a2)
328
+ e2 || p2 && (a2.__html === p2.__html || a2.__html === l2.innerHTML) || (l2.innerHTML = a2.__html), u3.__k = [];
329
+ else if (p2 && (l2.innerHTML = ""), S(l2, y(v2) ? v2 : [v2], u3, t2, i3, "foreignObject" === b2 ? "http://www.w3.org/1999/xhtml" : o2, r2, f3, r2 ? r2[0] : t2.__k && x(t2, 0), e2, c2), null != r2)
330
+ for (s2 = r2.length; s2--; )
331
+ null != r2[s2] && w(r2[s2]);
332
+ e2 || (s2 = "value", void 0 !== _2 && (_2 !== l2[s2] || "progress" === b2 && !_2 || "option" === b2 && _2 !== m[s2]) && A(l2, s2, _2, m[s2], o2), s2 = "checked", void 0 !== g2 && g2 !== l2[s2] && A(l2, s2, g2, m[s2], o2));
315
333
  }
316
334
  return l2;
317
335
  }
318
- function z(n2, u3, t2) {
336
+ function N(n2, u3, t2) {
319
337
  try {
320
- "function" == typeof n2 ? n2(u3) : n2.current = u3;
338
+ if ("function" == typeof n2) {
339
+ var i3 = "function" == typeof n2.__u;
340
+ i3 && n2.__u(), i3 && null == u3 || (n2.__u = n2(u3));
341
+ } else
342
+ n2.current = u3;
321
343
  } catch (n3) {
322
344
  l.__e(n3, t2);
323
345
  }
324
346
  }
325
- function N(n2, u3, t2) {
347
+ function V(n2, u3, t2) {
326
348
  var i3, o2;
327
- if (l.unmount && l.unmount(n2), (i3 = n2.ref) && (i3.current && i3.current !== n2.__e || z(i3, null, u3)), null != (i3 = n2.__c)) {
349
+ if (l.unmount && l.unmount(n2), (i3 = n2.ref) && (i3.current && i3.current !== n2.__e || N(i3, null, u3)), null != (i3 = n2.__c)) {
328
350
  if (i3.componentWillUnmount)
329
351
  try {
330
352
  i3.componentWillUnmount();
331
353
  } catch (n3) {
332
354
  l.__e(n3, u3);
333
355
  }
334
- i3.base = i3.__P = null, n2.__c = void 0;
356
+ i3.base = i3.__P = null;
335
357
  }
336
358
  if (i3 = n2.__k)
337
359
  for (o2 = 0; o2 < i3.length; o2++)
338
- i3[o2] && N(i3[o2], u3, t2 || "function" != typeof n2.type);
339
- t2 || null == n2.__e || p(n2.__e), n2.__ = n2.__e = n2.__d = void 0;
360
+ i3[o2] && V(i3[o2], u3, t2 || "function" != typeof n2.type);
361
+ t2 || null == n2.__e || w(n2.__e), n2.__c = n2.__ = n2.__e = n2.__d = void 0;
340
362
  }
341
- function O(n2, l2, u3) {
363
+ function q(n2, l2, u3) {
342
364
  return this.constructor(n2, u3);
343
365
  }
344
- function q(u3, t2, i3) {
366
+ function B(u3, t2, i3) {
345
367
  var o2, r2, f3, e2;
346
- l.__ && l.__(u3, t2), r2 = (o2 = "function" == typeof i3) ? null : i3 && i3.__k || t2.__k, f3 = [], e2 = [], L(t2, u3 = (!o2 && i3 || t2).__k = y(g, null, [u3]), r2 || c, c, void 0 !== t2.ownerSVGElement, !o2 && i3 ? [i3] : r2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, f3, !o2 && i3 ? i3 : r2 ? r2.__e : t2.firstChild, o2, e2), M(f3, u3, e2);
368
+ l.__ && l.__(u3, t2), r2 = (o2 = "function" == typeof i3) ? null : i3 && i3.__k || t2.__k, f3 = [], e2 = [], O(t2, u3 = (!o2 && i3 || t2).__k = _(k, null, [u3]), r2 || h, h, t2.namespaceURI, !o2 && i3 ? [i3] : r2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, f3, !o2 && i3 ? i3 : r2 ? r2.__e : t2.firstChild, o2, e2), j(f3, u3, e2);
347
369
  }
348
- n = s.slice, l = { __e: function(n2, l2, u3, t2) {
370
+ n = p.slice, l = { __e: function(n2, l2, u3, t2) {
349
371
  for (var i3, o2, r2; l2 = l2.__; )
350
372
  if ((i3 = l2.__c) && !i3.__)
351
373
  try {
@@ -359,20 +381,22 @@ var __exports__ = (() => {
359
381
  return null != n2 && null == n2.constructor;
360
382
  }, b.prototype.setState = function(n2, l2) {
361
383
  var u3;
362
- u3 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = v({}, this.state), "function" == typeof n2 && (n2 = n2(v({}, u3), this.props)), n2 && v(u3, n2), null != n2 && this.__v && (l2 && this._sb.push(l2), k(this));
384
+ u3 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = d({}, this.state), "function" == typeof n2 && (n2 = n2(d({}, u3), this.props)), n2 && d(u3, n2), null != n2 && this.__v && (l2 && this._sb.push(l2), M(this));
363
385
  }, b.prototype.forceUpdate = function(n2) {
364
- this.__v && (this.__e = true, n2 && this.__h.push(n2), k(this));
365
- }, b.prototype.render = g, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f = function(n2, l2) {
386
+ this.__v && (this.__e = true, n2 && this.__h.push(n2), M(this));
387
+ }, b.prototype.render = k, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f = function(n2, l2) {
366
388
  return n2.__v.__b - l2.__v.__b;
367
- }, x.__r = 0, e = 0;
389
+ }, P.__r = 0, e = 0, c = F(false), s = F(true), a = 0;
368
390
 
369
391
  // ../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
370
392
  var f2 = 0;
371
393
  var i2 = Array.isArray;
372
394
  function u2(e2, t2, n2, o2, i3, u3) {
373
- var a2, c2, p2 = {};
374
- for (c2 in t2)
375
- "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
395
+ t2 || (t2 = {});
396
+ var a2, c2, p2 = t2;
397
+ if ("ref" in p2)
398
+ for (c2 in p2 = {}, t2)
399
+ "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
376
400
  var l2 = { type: e2, props: p2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --f2, __i: -1, __u: 0, __source: i3, __self: u3 };
377
401
  if ("function" == typeof e2 && (a2 = e2.defaultProps))
378
402
  for (c2 in a2)
@@ -418,12 +442,14 @@ var __exports__ = (() => {
418
442
  this.id = "fullscreen";
419
443
  this.placement = "top-left";
420
444
  this.fullscreen = false;
421
- this.id = props.id || "fullscreen";
422
- this.placement = props.placement || "top-left";
423
- props.enterLabel = props.enterLabel || "Enter Fullscreen";
424
- props.exitLabel = props.exitLabel || "Exit Fullscreen";
425
- props.style = props.style || {};
426
- this.props = props;
445
+ this.id = props.id ?? this.id;
446
+ this.placement = props.placement ?? this.placement;
447
+ this.props = {
448
+ ...props,
449
+ enterLabel: props.enterLabel ?? "Enter Fullscreen",
450
+ exitLabel: props.exitLabel ?? "Exit Fullscreen",
451
+ style: props.style ?? {}
452
+ };
427
453
  }
428
454
  onAdd({ deck }) {
429
455
  const { style, className } = this.props;
@@ -445,8 +471,8 @@ var __exports__ = (() => {
445
471
  }
446
472
  update() {
447
473
  const { enterLabel, exitLabel } = this.props;
448
- const el = this.element;
449
- if (!el) {
474
+ const element = this.element;
475
+ if (!element) {
450
476
  return;
451
477
  }
452
478
  const ui = /* @__PURE__ */ u2(
@@ -457,9 +483,10 @@ var __exports__ = (() => {
457
483
  className: this.fullscreen ? "deck-widget-fullscreen-exit" : "deck-widget-fullscreen-enter"
458
484
  }
459
485
  );
460
- q(ui, el);
486
+ B(ui, element);
461
487
  }
462
488
  setProps(props) {
489
+ this.placement = props.placement ?? this.placement;
463
490
  const oldProps = this.props;
464
491
  const el = this.element;
465
492
  if (el) {
@@ -475,6 +502,7 @@ var __exports__ = (() => {
475
502
  }
476
503
  }
477
504
  Object.assign(this.props, props);
505
+ this.update();
478
506
  }
479
507
  getContainer() {
480
508
  return this.props.container || this.deck?.getCanvas()?.parentElement;
@@ -523,15 +551,19 @@ var __exports__ = (() => {
523
551
  this.placement = "top-left";
524
552
  this.viewId = null;
525
553
  this.viewports = {};
526
- this.id = props.id || "compass";
527
- this.viewId = props.viewId || null;
528
- this.placement = props.placement || "top-left";
529
- props.transitionDuration = props.transitionDuration || 200;
530
- props.label = props.label || "Compass";
531
- props.style = props.style || {};
532
- this.props = props;
554
+ this.id = props.id ?? this.id;
555
+ this.viewId = props.viewId ?? this.viewId;
556
+ this.placement = props.placement ?? this.placement;
557
+ this.props = {
558
+ ...props,
559
+ transitionDuration: props.transitionDuration ?? 200,
560
+ label: props.label ?? "Reset Compass",
561
+ style: props.style ?? {}
562
+ };
533
563
  }
534
564
  setProps(props) {
565
+ this.placement = props.placement ?? this.placement;
566
+ this.viewId = props.viewId ?? this.viewId;
535
567
  const oldProps = this.props;
536
568
  const el = this.element;
537
569
  if (el) {
@@ -547,10 +579,13 @@ var __exports__ = (() => {
547
579
  }
548
580
  }
549
581
  Object.assign(this.props, props);
582
+ this.update();
550
583
  }
551
584
  onViewportChange(viewport) {
552
- this.viewports[viewport.id] = viewport;
553
- this.update();
585
+ if (!viewport.equals(this.viewports[viewport.id])) {
586
+ this.viewports[viewport.id] = viewport;
587
+ this.update();
588
+ }
554
589
  }
555
590
  onAdd({ deck }) {
556
591
  const { style, className } = this.props;
@@ -589,7 +624,7 @@ var __exports__ = (() => {
589
624
  this.handleCompassReset(viewport2);
590
625
  }
591
626
  },
592
- label: this.props.label,
627
+ title: this.props.label,
593
628
  style: { transform: `rotateX(${rx}deg)` },
594
629
  children: /* @__PURE__ */ u2("svg", { fill: "none", width: "100%", height: "100%", viewBox: "0 0 26 26", children: /* @__PURE__ */ u2("g", { transform: `rotate(${rz},13,13)`, children: [
595
630
  /* @__PURE__ */ u2(
@@ -609,7 +644,7 @@ var __exports__ = (() => {
609
644
  ] }) })
610
645
  }
611
646
  ) });
612
- q(ui, element);
647
+ B(ui, element);
613
648
  }
614
649
  onRemove() {
615
650
  this.deck = void 0;
@@ -636,18 +671,19 @@ var __exports__ = (() => {
636
671
  constructor(props) {
637
672
  this.id = "zoom";
638
673
  this.placement = "top-left";
639
- this.orientation = "vertical";
640
674
  this.viewId = null;
641
675
  this.viewports = {};
642
- this.id = props.id || "zoom";
643
- this.viewId = props.viewId || null;
644
- this.placement = props.placement || "top-left";
645
- this.orientation = props.orientation || "vertical";
646
- props.transitionDuration = props.transitionDuration || 200;
647
- props.zoomInLabel = props.zoomInLabel || "Zoom In";
648
- props.zoomOutLabel = props.zoomOutLabel || "Zoom Out";
649
- props.style = props.style || {};
650
- this.props = props;
676
+ this.id = props.id ?? this.id;
677
+ this.viewId = props.viewId ?? this.viewId;
678
+ this.placement = props.placement ?? this.placement;
679
+ this.props = {
680
+ ...props,
681
+ orientation: props.orientation ?? "vertical",
682
+ transitionDuration: props.transitionDuration ?? 200,
683
+ zoomInLabel: props.zoomInLabel ?? "Zoom In",
684
+ zoomOutLabel: props.zoomOutLabel ?? "Zoom Out",
685
+ style: props.style ?? {}
686
+ };
651
687
  }
652
688
  onAdd({ deck }) {
653
689
  const { style, className } = this.props;
@@ -656,27 +692,9 @@ var __exports__ = (() => {
656
692
  if (className)
657
693
  element.classList.add(className);
658
694
  (0, import_core4._applyStyles)(element, style);
659
- const ui = /* @__PURE__ */ u2(ButtonGroup, { orientation: this.orientation, children: [
660
- /* @__PURE__ */ u2(
661
- GroupedIconButton,
662
- {
663
- onClick: () => this.handleZoomIn(),
664
- label: this.props.zoomInLabel,
665
- className: "deck-widget-zoom-in"
666
- }
667
- ),
668
- /* @__PURE__ */ u2(
669
- GroupedIconButton,
670
- {
671
- onClick: () => this.handleZoomOut(),
672
- label: this.props.zoomOutLabel,
673
- className: "deck-widget-zoom-out"
674
- }
675
- )
676
- ] });
677
- q(ui, element);
678
695
  this.deck = deck;
679
696
  this.element = element;
697
+ this.update();
680
698
  return element;
681
699
  }
682
700
  onRemove() {
@@ -684,6 +702,8 @@ var __exports__ = (() => {
684
702
  this.element = void 0;
685
703
  }
686
704
  setProps(props) {
705
+ this.placement = props.placement ?? this.placement;
706
+ this.viewId = props.viewId ?? this.viewId;
687
707
  const oldProps = this.props;
688
708
  const el = this.element;
689
709
  if (el) {
@@ -699,6 +719,7 @@ var __exports__ = (() => {
699
719
  }
700
720
  }
701
721
  Object.assign(this.props, props);
722
+ this.update();
702
723
  }
703
724
  onViewportChange(viewport) {
704
725
  this.viewports[viewport.id] = viewport;
@@ -723,6 +744,31 @@ var __exports__ = (() => {
723
744
  this.handleZoom(viewport, viewport.zoom - 1);
724
745
  }
725
746
  }
747
+ update() {
748
+ const element = this.element;
749
+ if (!element) {
750
+ return;
751
+ }
752
+ const ui = /* @__PURE__ */ u2(ButtonGroup, { orientation: this.props.orientation, children: [
753
+ /* @__PURE__ */ u2(
754
+ GroupedIconButton,
755
+ {
756
+ onClick: () => this.handleZoomIn(),
757
+ label: this.props.zoomInLabel,
758
+ className: "deck-widget-zoom-in"
759
+ }
760
+ ),
761
+ /* @__PURE__ */ u2(
762
+ GroupedIconButton,
763
+ {
764
+ onClick: () => this.handleZoomOut(),
765
+ label: this.props.zoomOutLabel,
766
+ className: "deck-widget-zoom-out"
767
+ }
768
+ )
769
+ ] });
770
+ B(ui, element);
771
+ }
726
772
  };
727
773
 
728
774
  // src/themes.ts