@hybridcore/ui 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/Button-BZR43NHz.js +2025 -0
  2. package/dist/ButtonBase-B6WYZgVU.js +967 -0
  3. package/dist/CardContent-C8PxkJz4.js +73 -0
  4. package/dist/Checkbox-CxbQ9tJ5.js +673 -0
  5. package/dist/FormControl-C4PmH1vh.js +1491 -0
  6. package/dist/IconButton-CKHPuOyh.js +183 -0
  7. package/dist/Input-CH_JyT5B.js +324 -0
  8. package/dist/List-BX_5LP1i.js +132 -0
  9. package/dist/Object-DBPgar-D.js +688 -0
  10. package/dist/OutlinedInput-gnp48tDo.js +452 -0
  11. package/dist/Paper-CaiWdndQ.js +162 -0
  12. package/dist/Select-DOyHt8I_.js +2526 -0
  13. package/dist/Source-Bo1Eq6y-.js +4374 -0
  14. package/dist/Text-DVP2PrYM.js +2192 -0
  15. package/dist/Typography-XIiVCSto.js +178 -0
  16. package/dist/assertThisInitialized-BUtkG-md.js +13 -0
  17. package/dist/assets/index.css +1 -0
  18. package/dist/assets/index2.css +1 -0
  19. package/dist/chainPropTypes-DtBfUj5o.js +96 -0
  20. package/dist/components/access/helpers.js +32 -0
  21. package/dist/components/access/index.js +15 -0
  22. package/dist/components/card/index.js +159 -469
  23. package/dist/components/card/styled.js +75 -7
  24. package/dist/components/conditional-wrapper/index.js +9 -0
  25. package/dist/components/confirm/dialog.js +151 -0
  26. package/dist/components/confirm/index.js +23 -0
  27. package/dist/components/container/index.js +270 -0
  28. package/dist/components/context-menu/index.js +973 -0
  29. package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
  30. package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
  31. package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
  32. package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
  33. package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
  34. package/dist/components/data-management/instance-form/index.js +437 -0
  35. package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
  36. package/dist/components/data-security-selectors/security-level/index.js +81 -0
  37. package/dist/components/date-time-picker/index.js +103 -0
  38. package/dist/components/geometry-picker/coordinate/index.js +93 -0
  39. package/dist/components/geometry-picker/edit/index.js +71 -0
  40. package/dist/components/geometry-picker/geometry/index.js +160 -0
  41. package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
  42. package/dist/components/geometry-picker/index.js +140 -0
  43. package/dist/components/geometry-picker/kml/index.js +62 -0
  44. package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
  45. package/dist/components/geometry-picker/logic.js +69 -0
  46. package/dist/components/geometry-picker/map/index.js +42 -0
  47. package/dist/components/geometry-picker/map/logic.js +2360 -0
  48. package/dist/components/geometry-picker/map/style.js +88 -0
  49. package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
  50. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
  51. package/dist/components/geometry-picker/parser/index.js +179 -0
  52. package/dist/components/geometry-picker/parser/logic.js +84 -0
  53. package/dist/components/geometry-picker/parser/styled.js +25 -0
  54. package/dist/components/geometry-picker/styled.js +48 -0
  55. package/dist/components/geometry-picker/wkt/index.js +59 -0
  56. package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
  57. package/dist/components/icon-button/index.js +18 -0
  58. package/dist/components/icon-button/styled.js +51 -0
  59. package/dist/components/key-protection/index.js +4 -0
  60. package/dist/components/key-protection/menu.js +85 -0
  61. package/dist/components/key-protection/utils.js +10 -0
  62. package/dist/components/loading/index.js +7 -0
  63. package/dist/components/loading/styled.js +16 -0
  64. package/dist/components/map/helpers/kml.js +45 -0
  65. package/dist/components/map/helpers/mapbox.js +48 -0
  66. package/dist/components/map/helpers/ol.js +25 -0
  67. package/dist/components/map/helpers/wkt.js +29 -0
  68. package/dist/components/map/index.js +30 -0
  69. package/dist/components/map/logic.js +140 -0
  70. package/dist/components/map/styled.js +8 -0
  71. package/dist/components/phone-input/index.js +25 -0
  72. package/dist/components/phone-input/styled.js +26 -0
  73. package/dist/components/search-input/index.js +76 -0
  74. package/dist/components/tree-select/index.js +70 -0
  75. package/dist/components/tree-select/styled.js +64 -0
  76. package/dist/components/treeview-filter/index.js +621 -0
  77. package/dist/components/treeview-filter/item/index.js +7 -0
  78. package/dist/components/treeview-filter/item-label/index.js +44 -0
  79. package/dist/createTheme-agWfFD64.js +2392 -0
  80. package/dist/exactProp-CI8dagM-.js +36 -0
  81. package/dist/extends-C3382pL0.js +22 -0
  82. package/dist/hooks/useMenuLogic.js +21 -0
  83. package/dist/hooks/useToggle.js +23 -0
  84. package/dist/index-BQE8B4sc.js +957 -0
  85. package/dist/index-DHFb1Qpn.js +1105 -0
  86. package/dist/isHostComponent-kiaBvYVo.js +6 -0
  87. package/dist/isMuiElement-CxT3_ACP.js +13 -0
  88. package/dist/main.d.ts +646 -0
  89. package/dist/ol-CMEkXXLJ.js +15041 -0
  90. package/dist/ownerDocument-CUrv0DIK.js +6 -0
  91. package/dist/ownerWindow-niciwP7I.js +7 -0
  92. package/dist/styled-B22KrhDR.js +229 -0
  93. package/dist/styled-Iq9jsO4F.js +1033 -0
  94. package/dist/useFormControl-CatNKXAi.js +10 -0
  95. package/dist/useId-BHG98T5I.js +26 -0
  96. package/dist/useTheme-C0Dky5rV.js +17 -0
  97. package/dist/useTheme-CeyGVuQP.js +10 -0
  98. package/dist/useThemeProps-CzAjOL6F.js +26 -0
  99. package/dist/utils/ontology.js +37 -0
  100. package/dist/utils-Bq0ye5vf.js +115 -0
  101. package/dist/utils-C13eMoWa.js +365 -0
  102. package/package.json +26 -5
  103. package/dist/styled-BG5UIpPU.js +0 -3459
@@ -0,0 +1,688 @@
1
+ function N() {
2
+ throw new Error("Unimplemented abstract method.");
3
+ }
4
+ let _ = 0;
5
+ function b(n) {
6
+ return n.ol_uid || (n.ol_uid = String(++_));
7
+ }
8
+ const A = {
9
+ 1: "The view center is not defined",
10
+ 2: "The view resolution is not defined",
11
+ 3: "The view rotation is not defined",
12
+ 4: "`image` and `src` cannot be provided at the same time",
13
+ 5: "`imgSize` must be set when `image` is provided",
14
+ 7: "`format` must be set when `url` is set",
15
+ 8: "Unknown `serverType` configured",
16
+ 9: "`url` must be configured or set using `#setUrl()`",
17
+ 10: "The default `geometryFunction` can only handle `Point` geometries",
18
+ 11: "`options.featureTypes` must be an Array",
19
+ 12: "`options.geometryName` must also be provided when `options.bbox` is set",
20
+ 13: "Invalid corner",
21
+ 14: "Invalid color",
22
+ 15: "Tried to get a value for a key that does not exist in the cache",
23
+ 16: "Tried to set a value for a key that is used already",
24
+ 17: "`resolutions` must be sorted in descending order",
25
+ 18: "Either `origin` or `origins` must be configured, never both",
26
+ 19: "Number of `tileSizes` and `resolutions` must be equal",
27
+ 20: "Number of `origins` and `resolutions` must be equal",
28
+ 22: "Either `tileSize` or `tileSizes` must be configured, never both",
29
+ 24: "Invalid extent or geometry provided as `geometry`",
30
+ 25: "Cannot fit empty extent provided as `geometry`",
31
+ 26: "Features must have an id set",
32
+ 27: "Features must have an id set",
33
+ 28: '`renderMode` must be `"hybrid"` or `"vector"`',
34
+ 30: "The passed `feature` was already added to the source",
35
+ 31: "Tried to enqueue an `element` that was already added to the queue",
36
+ 32: "Transformation matrix cannot be inverted",
37
+ 33: "Invalid units",
38
+ 34: "Invalid geometry layout",
39
+ 36: "Unknown SRS type",
40
+ 37: "Unknown geometry type found",
41
+ 38: "`styleMapValue` has an unknown type",
42
+ 39: "Unknown geometry type",
43
+ 40: "Expected `feature` to have a geometry",
44
+ 41: "Expected an `ol/style/Style` or an array of `ol/style/Style.js`",
45
+ 42: "Question unknown, the answer is 42",
46
+ 43: "Expected `layers` to be an array or a `Collection`",
47
+ 47: "Expected `controls` to be an array or an `ol/Collection`",
48
+ 48: "Expected `interactions` to be an array or an `ol/Collection`",
49
+ 49: "Expected `overlays` to be an array or an `ol/Collection`",
50
+ 50: "`options.featureTypes` should be an Array",
51
+ 51: "Either `url` or `tileJSON` options must be provided",
52
+ 52: "Unknown `serverType` configured",
53
+ 53: "Unknown `tierSizeCalculation` configured",
54
+ 55: "The {-y} placeholder requires a tile grid with extent",
55
+ 56: "mapBrowserEvent must originate from a pointer event",
56
+ 57: "At least 2 conditions are required",
57
+ 59: "Invalid command found in the PBF",
58
+ 60: "Missing or invalid `size`",
59
+ 61: "Cannot determine IIIF Image API version from provided image information JSON",
60
+ 62: "A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",
61
+ 64: "Layer opacity must be a number",
62
+ 66: "`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",
63
+ 67: "A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",
64
+ 68: "A VectorTile source can only be rendered if it has a projection compatible with the view projection",
65
+ 69: "`width` or `height` cannot be provided together with `scale`"
66
+ };
67
+ class w extends Error {
68
+ /**
69
+ * @param {number} code Error code.
70
+ */
71
+ constructor(e) {
72
+ const s = A[e];
73
+ super(s), this.code = e, this.name = "AssertionError", this.message = s;
74
+ }
75
+ }
76
+ function M(n, e) {
77
+ if (!n)
78
+ throw new w(e);
79
+ }
80
+ function U(n, e, s) {
81
+ return Math.min(Math.max(n, e), s);
82
+ }
83
+ function D(n, e, s, t, i, r) {
84
+ const a = i - s, o = r - t;
85
+ if (a !== 0 || o !== 0) {
86
+ const l = ((n - s) * a + (e - t) * o) / (a * a + o * o);
87
+ l > 1 ? (s = i, t = r) : l > 0 && (s += a * l, t += o * l);
88
+ }
89
+ return R(n, e, s, t);
90
+ }
91
+ function R(n, e, s, t) {
92
+ const i = s - n, r = t - e;
93
+ return i * i + r * r;
94
+ }
95
+ function V(n) {
96
+ const e = n.length;
97
+ for (let t = 0; t < e; t++) {
98
+ let i = t, r = Math.abs(n[t][t]);
99
+ for (let o = t + 1; o < e; o++) {
100
+ const l = Math.abs(n[o][t]);
101
+ l > r && (r = l, i = o);
102
+ }
103
+ if (r === 0)
104
+ return null;
105
+ const a = n[i];
106
+ n[i] = n[t], n[t] = a;
107
+ for (let o = t + 1; o < e; o++) {
108
+ const l = -n[o][t] / n[t][t];
109
+ for (let u = t; u < e + 1; u++)
110
+ t == u ? n[o][u] = 0 : n[o][u] += l * n[t][u];
111
+ }
112
+ }
113
+ const s = new Array(e);
114
+ for (let t = e - 1; t >= 0; t--) {
115
+ s[t] = n[t][e] / n[t][t];
116
+ for (let i = t - 1; i >= 0; i--)
117
+ n[i][e] -= n[i][t] * s[t];
118
+ }
119
+ return s;
120
+ }
121
+ function B(n) {
122
+ return n * Math.PI / 180;
123
+ }
124
+ function G(n, e) {
125
+ const s = n % e;
126
+ return s * e < 0 ? s + e : s;
127
+ }
128
+ function k(n, e, s) {
129
+ return n + s * (e - n);
130
+ }
131
+ function j(n, e) {
132
+ const s = Math.pow(10, e);
133
+ return Math.round(n * s) / s;
134
+ }
135
+ const c = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", q = c.includes("firefox"), L = c.includes("safari") && !c.includes("chrom");
136
+ L && (c.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(c));
137
+ const K = c.includes("webkit") && !c.includes("edge"), W = c.includes("macintosh"), z = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, H = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, Y = typeof Image < "u" && Image.prototype.decode, X = function() {
138
+ let n = !1;
139
+ try {
140
+ const e = Object.defineProperty({}, "passive", {
141
+ get: function() {
142
+ n = !0;
143
+ }
144
+ });
145
+ window.addEventListener("_", null, e), window.removeEventListener("_", null, e);
146
+ } catch {
147
+ }
148
+ return n;
149
+ }();
150
+ class m {
151
+ /**
152
+ * @param {string} type Type.
153
+ */
154
+ constructor(e) {
155
+ this.propagationStopped, this.defaultPrevented, this.type = e, this.target = null;
156
+ }
157
+ /**
158
+ * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events
159
+ * will be fired.
160
+ * @api
161
+ */
162
+ preventDefault() {
163
+ this.defaultPrevented = !0;
164
+ }
165
+ /**
166
+ * Stop event propagation.
167
+ * @api
168
+ */
169
+ stopPropagation() {
170
+ this.propagationStopped = !0;
171
+ }
172
+ }
173
+ const I = {
174
+ /**
175
+ * Triggered when a property is changed.
176
+ * @event module:ol/Object.ObjectEvent#propertychange
177
+ * @api
178
+ */
179
+ PROPERTYCHANGE: "propertychange"
180
+ };
181
+ class T {
182
+ constructor() {
183
+ this.disposed = !1;
184
+ }
185
+ /**
186
+ * Clean up.
187
+ */
188
+ dispose() {
189
+ this.disposed || (this.disposed = !0, this.disposeInternal());
190
+ }
191
+ /**
192
+ * Extension point for disposable objects.
193
+ * @protected
194
+ */
195
+ disposeInternal() {
196
+ }
197
+ }
198
+ function $(n, e, s) {
199
+ let t, i;
200
+ s = s || S;
201
+ let r = 0, a = n.length, o = !1;
202
+ for (; r < a; )
203
+ t = r + (a - r >> 1), i = +s(n[t], e), i < 0 ? r = t + 1 : (a = t, o = !i);
204
+ return o ? r : ~r;
205
+ }
206
+ function S(n, e) {
207
+ return n > e ? 1 : n < e ? -1 : 0;
208
+ }
209
+ function J(n, e, s) {
210
+ if (n[0] <= e)
211
+ return 0;
212
+ const t = n.length;
213
+ if (e <= n[t - 1])
214
+ return t - 1;
215
+ if (typeof s == "function") {
216
+ for (let i = 1; i < t; ++i) {
217
+ const r = n[i];
218
+ if (r === e)
219
+ return i;
220
+ if (r < e)
221
+ return s(e, n[i - 1], r) > 0 ? i - 1 : i;
222
+ }
223
+ return t - 1;
224
+ }
225
+ if (s > 0) {
226
+ for (let i = 1; i < t; ++i)
227
+ if (n[i] < e)
228
+ return i - 1;
229
+ return t - 1;
230
+ }
231
+ if (s < 0) {
232
+ for (let i = 1; i < t; ++i)
233
+ if (n[i] <= e)
234
+ return i;
235
+ return t - 1;
236
+ }
237
+ for (let i = 1; i < t; ++i) {
238
+ if (n[i] == e)
239
+ return i;
240
+ if (n[i] < e)
241
+ return n[i - 1] - e < e - n[i] ? i - 1 : i;
242
+ }
243
+ return t - 1;
244
+ }
245
+ function Q(n, e, s) {
246
+ for (; e < s; ) {
247
+ const t = n[e];
248
+ n[e] = n[s], n[s] = t, ++e, --s;
249
+ }
250
+ }
251
+ function Z(n, e) {
252
+ const s = Array.isArray(e) ? e : [e], t = s.length;
253
+ for (let i = 0; i < t; i++)
254
+ n[n.length] = s[i];
255
+ }
256
+ function O(n, e) {
257
+ const s = n.length;
258
+ if (s !== e.length)
259
+ return !1;
260
+ for (let t = 0; t < s; t++)
261
+ if (n[t] !== e[t])
262
+ return !1;
263
+ return !0;
264
+ }
265
+ function ee() {
266
+ return !0;
267
+ }
268
+ function te() {
269
+ return !1;
270
+ }
271
+ function f() {
272
+ }
273
+ function ne(n) {
274
+ let e = !1, s, t, i;
275
+ return function() {
276
+ const r = Array.prototype.slice.call(arguments);
277
+ return (!e || this !== i || !O(r, t)) && (e = !0, i = this, t = r, s = n.apply(this, arguments)), s;
278
+ };
279
+ }
280
+ function y(n) {
281
+ for (const e in n)
282
+ delete n[e];
283
+ }
284
+ function x(n) {
285
+ let e;
286
+ for (e in n)
287
+ return !1;
288
+ return !e;
289
+ }
290
+ class C extends T {
291
+ /**
292
+ * @param {*} [target] Default event target for dispatched events.
293
+ */
294
+ constructor(e) {
295
+ super(), this.eventTarget_ = e, this.pendingRemovals_ = null, this.dispatching_ = null, this.listeners_ = null;
296
+ }
297
+ /**
298
+ * @param {string} type Type.
299
+ * @param {import("../events.js").Listener} listener Listener.
300
+ */
301
+ addEventListener(e, s) {
302
+ if (!e || !s)
303
+ return;
304
+ const t = this.listeners_ || (this.listeners_ = {}), i = t[e] || (t[e] = []);
305
+ i.includes(s) || i.push(s);
306
+ }
307
+ /**
308
+ * Dispatches an event and calls all listeners listening for events
309
+ * of this type. The event parameter can either be a string or an
310
+ * Object with a `type` property.
311
+ *
312
+ * @param {import("./Event.js").default|string} event Event object.
313
+ * @return {boolean|undefined} `false` if anyone called preventDefault on the
314
+ * event object or if any of the listeners returned false.
315
+ * @api
316
+ */
317
+ dispatchEvent(e) {
318
+ const s = typeof e == "string", t = s ? e : e.type, i = this.listeners_ && this.listeners_[t];
319
+ if (!i)
320
+ return;
321
+ const r = s ? new m(e) : (
322
+ /** @type {Event} */
323
+ e
324
+ );
325
+ r.target || (r.target = this.eventTarget_ || this);
326
+ const a = this.dispatching_ || (this.dispatching_ = {}), o = this.pendingRemovals_ || (this.pendingRemovals_ = {});
327
+ t in a || (a[t] = 0, o[t] = 0), ++a[t];
328
+ let l;
329
+ for (let u = 0, E = i.length; u < E; ++u)
330
+ if ("handleEvent" in i[u] ? l = /** @type {import("../events.js").ListenerObject} */
331
+ i[u].handleEvent(r) : l = /** @type {import("../events.js").ListenerFunction} */
332
+ i[u].call(this, r), l === !1 || r.propagationStopped) {
333
+ l = !1;
334
+ break;
335
+ }
336
+ if (--a[t] === 0) {
337
+ let u = o[t];
338
+ for (delete o[t]; u--; )
339
+ this.removeEventListener(t, f);
340
+ delete a[t];
341
+ }
342
+ return l;
343
+ }
344
+ /**
345
+ * Clean up.
346
+ */
347
+ disposeInternal() {
348
+ this.listeners_ && y(this.listeners_);
349
+ }
350
+ /**
351
+ * Get the listeners for a specified event type. Listeners are returned in the
352
+ * order that they will be called in.
353
+ *
354
+ * @param {string} type Type.
355
+ * @return {Array<import("../events.js").Listener>|undefined} Listeners.
356
+ */
357
+ getListeners(e) {
358
+ return this.listeners_ && this.listeners_[e] || void 0;
359
+ }
360
+ /**
361
+ * @param {string} [type] Type. If not provided,
362
+ * `true` will be returned if this event target has any listeners.
363
+ * @return {boolean} Has listeners.
364
+ */
365
+ hasListener(e) {
366
+ return this.listeners_ ? e ? e in this.listeners_ : Object.keys(this.listeners_).length > 0 : !1;
367
+ }
368
+ /**
369
+ * @param {string} type Type.
370
+ * @param {import("../events.js").Listener} listener Listener.
371
+ */
372
+ removeEventListener(e, s) {
373
+ const t = this.listeners_ && this.listeners_[e];
374
+ if (t) {
375
+ const i = t.indexOf(s);
376
+ i !== -1 && (this.pendingRemovals_ && e in this.pendingRemovals_ ? (t[i] = f, ++this.pendingRemovals_[e]) : (t.splice(i, 1), t.length === 0 && delete this.listeners_[e]));
377
+ }
378
+ }
379
+ }
380
+ const P = {
381
+ /**
382
+ * Generic change event. Triggered when the revision counter is increased.
383
+ * @event module:ol/events/Event~BaseEvent#change
384
+ * @api
385
+ */
386
+ CHANGE: "change",
387
+ /**
388
+ * Generic error event. Triggered when an error occurs.
389
+ * @event module:ol/events/Event~BaseEvent#error
390
+ * @api
391
+ */
392
+ ERROR: "error",
393
+ BLUR: "blur",
394
+ CLEAR: "clear",
395
+ CONTEXTMENU: "contextmenu",
396
+ CLICK: "click",
397
+ DBLCLICK: "dblclick",
398
+ DRAGENTER: "dragenter",
399
+ DRAGOVER: "dragover",
400
+ DROP: "drop",
401
+ FOCUS: "focus",
402
+ KEYDOWN: "keydown",
403
+ KEYPRESS: "keypress",
404
+ LOAD: "load",
405
+ RESIZE: "resize",
406
+ TOUCHMOVE: "touchmove",
407
+ WHEEL: "wheel"
408
+ };
409
+ function h(n, e, s, t, i) {
410
+ if (t && t !== n && (s = s.bind(t)), i) {
411
+ const a = s;
412
+ s = function() {
413
+ n.removeEventListener(e, s), a.apply(this, arguments);
414
+ };
415
+ }
416
+ const r = {
417
+ target: n,
418
+ type: e,
419
+ listener: s
420
+ };
421
+ return n.addEventListener(e, s), r;
422
+ }
423
+ function p(n, e, s, t) {
424
+ return h(n, e, s, t, !0);
425
+ }
426
+ function v(n) {
427
+ n && n.target && (n.target.removeEventListener(n.type, n.listener), y(n));
428
+ }
429
+ class d extends C {
430
+ constructor() {
431
+ super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
432
+ this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
433
+ this.onceInternal, this.un = /** @type {ObservableOnSignature<void>} */
434
+ this.unInternal, this.revision_ = 0;
435
+ }
436
+ /**
437
+ * Increases the revision counter and dispatches a 'change' event.
438
+ * @api
439
+ */
440
+ changed() {
441
+ ++this.revision_, this.dispatchEvent(P.CHANGE);
442
+ }
443
+ /**
444
+ * Get the version number for this object. Each time the object is modified,
445
+ * its version number will be incremented.
446
+ * @return {number} Revision.
447
+ * @api
448
+ */
449
+ getRevision() {
450
+ return this.revision_;
451
+ }
452
+ /**
453
+ * @param {string|Array<string>} type Type.
454
+ * @param {function((Event|import("./events/Event").default)): ?} listener Listener.
455
+ * @return {import("./events.js").EventsKey|Array<import("./events.js").EventsKey>} Event key.
456
+ * @protected
457
+ */
458
+ onInternal(e, s) {
459
+ if (Array.isArray(e)) {
460
+ const t = e.length, i = new Array(t);
461
+ for (let r = 0; r < t; ++r)
462
+ i[r] = h(this, e[r], s);
463
+ return i;
464
+ }
465
+ return h(
466
+ this,
467
+ /** @type {string} */
468
+ e,
469
+ s
470
+ );
471
+ }
472
+ /**
473
+ * @param {string|Array<string>} type Type.
474
+ * @param {function((Event|import("./events/Event").default)): ?} listener Listener.
475
+ * @return {import("./events.js").EventsKey|Array<import("./events.js").EventsKey>} Event key.
476
+ * @protected
477
+ */
478
+ onceInternal(e, s) {
479
+ let t;
480
+ if (Array.isArray(e)) {
481
+ const i = e.length;
482
+ t = new Array(i);
483
+ for (let r = 0; r < i; ++r)
484
+ t[r] = p(this, e[r], s);
485
+ } else
486
+ t = p(
487
+ this,
488
+ /** @type {string} */
489
+ e,
490
+ s
491
+ );
492
+ return s.ol_key = t, t;
493
+ }
494
+ /**
495
+ * Unlisten for a certain type of event.
496
+ * @param {string|Array<string>} type Type.
497
+ * @param {function((Event|import("./events/Event").default)): ?} listener Listener.
498
+ * @protected
499
+ */
500
+ unInternal(e, s) {
501
+ const t = (
502
+ /** @type {Object} */
503
+ s.ol_key
504
+ );
505
+ if (t)
506
+ F(t);
507
+ else if (Array.isArray(e))
508
+ for (let i = 0, r = e.length; i < r; ++i)
509
+ this.removeEventListener(e[i], s);
510
+ else
511
+ this.removeEventListener(e, s);
512
+ }
513
+ }
514
+ d.prototype.on;
515
+ d.prototype.once;
516
+ d.prototype.un;
517
+ function F(n) {
518
+ if (Array.isArray(n))
519
+ for (let e = 0, s = n.length; e < s; ++e)
520
+ v(n[e]);
521
+ else
522
+ v(
523
+ /** @type {import("./events.js").EventsKey} */
524
+ n
525
+ );
526
+ }
527
+ class g extends m {
528
+ /**
529
+ * @param {string} type The event type.
530
+ * @param {string} key The property name.
531
+ * @param {*} oldValue The old value for `key`.
532
+ */
533
+ constructor(e, s, t) {
534
+ super(e), this.key = s, this.oldValue = t;
535
+ }
536
+ }
537
+ class se extends d {
538
+ /**
539
+ * @param {Object<string, *>} [values] An object with key-value pairs.
540
+ */
541
+ constructor(e) {
542
+ super(), this.on, this.once, this.un, b(this), this.values_ = null, e !== void 0 && this.setProperties(e);
543
+ }
544
+ /**
545
+ * Gets a value.
546
+ * @param {string} key Key name.
547
+ * @return {*} Value.
548
+ * @api
549
+ */
550
+ get(e) {
551
+ let s;
552
+ return this.values_ && this.values_.hasOwnProperty(e) && (s = this.values_[e]), s;
553
+ }
554
+ /**
555
+ * Get a list of object property names.
556
+ * @return {Array<string>} List of property names.
557
+ * @api
558
+ */
559
+ getKeys() {
560
+ return this.values_ && Object.keys(this.values_) || [];
561
+ }
562
+ /**
563
+ * Get an object of all property names and values.
564
+ * @return {Object<string, *>} Object.
565
+ * @api
566
+ */
567
+ getProperties() {
568
+ return this.values_ && Object.assign({}, this.values_) || {};
569
+ }
570
+ /**
571
+ * @return {boolean} The object has properties.
572
+ */
573
+ hasProperties() {
574
+ return !!this.values_;
575
+ }
576
+ /**
577
+ * @param {string} key Key name.
578
+ * @param {*} oldValue Old value.
579
+ */
580
+ notify(e, s) {
581
+ let t;
582
+ t = `change:${e}`, this.hasListener(t) && this.dispatchEvent(new g(t, e, s)), t = I.PROPERTYCHANGE, this.hasListener(t) && this.dispatchEvent(new g(t, e, s));
583
+ }
584
+ /**
585
+ * @param {string} key Key name.
586
+ * @param {import("./events.js").Listener} listener Listener.
587
+ */
588
+ addChangeListener(e, s) {
589
+ this.addEventListener(`change:${e}`, s);
590
+ }
591
+ /**
592
+ * @param {string} key Key name.
593
+ * @param {import("./events.js").Listener} listener Listener.
594
+ */
595
+ removeChangeListener(e, s) {
596
+ this.removeEventListener(`change:${e}`, s);
597
+ }
598
+ /**
599
+ * Sets a value.
600
+ * @param {string} key Key name.
601
+ * @param {*} value Value.
602
+ * @param {boolean} [silent] Update without triggering an event.
603
+ * @api
604
+ */
605
+ set(e, s, t) {
606
+ const i = this.values_ || (this.values_ = {});
607
+ if (t)
608
+ i[e] = s;
609
+ else {
610
+ const r = i[e];
611
+ i[e] = s, r !== s && this.notify(e, r);
612
+ }
613
+ }
614
+ /**
615
+ * Sets a collection of key-value pairs. Note that this changes any existing
616
+ * properties and adds new ones (it does not remove any existing properties).
617
+ * @param {Object<string, *>} values Values.
618
+ * @param {boolean} [silent] Update without triggering an event.
619
+ * @api
620
+ */
621
+ setProperties(e, s) {
622
+ for (const t in e)
623
+ this.set(t, e[t], s);
624
+ }
625
+ /**
626
+ * Apply any properties from another object without triggering events.
627
+ * @param {BaseObject} source The source object.
628
+ * @protected
629
+ */
630
+ applyProperties(e) {
631
+ e.values_ && Object.assign(this.values_ || (this.values_ = {}), e.values_);
632
+ }
633
+ /**
634
+ * Unsets a property.
635
+ * @param {string} key Key name.
636
+ * @param {boolean} [silent] Unset without triggering an event.
637
+ * @api
638
+ */
639
+ unset(e, s) {
640
+ if (this.values_ && e in this.values_) {
641
+ const t = this.values_[e];
642
+ delete this.values_[e], x(this.values_) && (this.values_ = null), s || this.notify(e, t);
643
+ }
644
+ }
645
+ }
646
+ export {
647
+ w as A,
648
+ m as B,
649
+ $ as C,
650
+ T as D,
651
+ P as E,
652
+ te as F,
653
+ x as G,
654
+ Q as H,
655
+ Y as I,
656
+ W as M,
657
+ I as O,
658
+ X as P,
659
+ ee as T,
660
+ f as V,
661
+ H as W,
662
+ O as a,
663
+ U as b,
664
+ y as c,
665
+ N as d,
666
+ Z as e,
667
+ M as f,
668
+ b as g,
669
+ se as h,
670
+ p as i,
671
+ C as j,
672
+ B as k,
673
+ h as l,
674
+ G as m,
675
+ J as n,
676
+ ne as o,
677
+ k as p,
678
+ D as q,
679
+ S as r,
680
+ R as s,
681
+ j as t,
682
+ v as u,
683
+ K as v,
684
+ q as w,
685
+ z as x,
686
+ d as y,
687
+ V as z
688
+ };