@hybridcore/ui 1.0.2 → 1.1.2

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