@vaadin/bundles 25.0.0-alpha3 → 25.0.0-alpha5

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 (192) hide show
  1. package/node_modules_ol_ImageCanvas_js.js +76 -83
  2. package/node_modules_ol_ImageCanvas_js.js.map +1 -1
  3. package/node_modules_ol_TileRange_js.js +128 -110
  4. package/node_modules_ol_TileRange_js.js.map +1 -1
  5. package/node_modules_ol_Tile_js.js +279 -0
  6. package/node_modules_ol_Tile_js.js.map +1 -0
  7. package/node_modules_ol_VectorRenderTile_js.js +428 -143
  8. package/node_modules_ol_VectorRenderTile_js.js.map +1 -1
  9. package/node_modules_ol_VectorTile_js.js +405 -119
  10. package/node_modules_ol_VectorTile_js.js.map +1 -1
  11. package/node_modules_ol_control_MousePosition_js.js +327 -0
  12. package/node_modules_ol_control_MousePosition_js.js.map +1 -0
  13. package/node_modules_ol_control_ZoomToExtent_js.js +118 -0
  14. package/node_modules_ol_control_ZoomToExtent_js.js.map +1 -0
  15. package/node_modules_ol_events_SnapEvent_js.js +79 -0
  16. package/node_modules_ol_events_SnapEvent_js.js.map +1 -0
  17. package/node_modules_ol_featureloader_js.js +205 -0
  18. package/node_modules_ol_featureloader_js.js.map +1 -0
  19. package/node_modules_ol_geom_Circle_js.js +300 -0
  20. package/node_modules_ol_geom_Circle_js.js.map +1 -0
  21. package/node_modules_ol_geom_GeometryCollection_js.js +369 -0
  22. package/node_modules_ol_geom_GeometryCollection_js.js.map +1 -0
  23. package/node_modules_ol_geom_MultiPoint_js.js +228 -0
  24. package/node_modules_ol_geom_MultiPoint_js.js.map +1 -0
  25. package/node_modules_ol_geom_flat_center_js.js +47 -0
  26. package/node_modules_ol_geom_flat_center_js.js.map +1 -0
  27. package/node_modules_ol_geom_flat_geodesic_js.js +123 -88
  28. package/node_modules_ol_geom_flat_geodesic_js.js.map +1 -1
  29. package/node_modules_ol_geom_flat_interpolate_js.js +230 -0
  30. package/node_modules_ol_geom_flat_interpolate_js.js.map +1 -0
  31. package/node_modules_ol_geom_flat_length_js-_375a0.js +58 -0
  32. package/node_modules_ol_geom_flat_length_js-_375a0.js.map +1 -0
  33. package/node_modules_ol_geom_flat_length_js-_375a1.js +58 -0
  34. package/node_modules_ol_geom_flat_length_js-_375a1.js.map +1 -0
  35. package/node_modules_ol_geom_flat_length_js-_375a2.js +58 -0
  36. package/node_modules_ol_geom_flat_length_js-_375a2.js.map +1 -0
  37. package/node_modules_ol_geom_flat_length_js-_375a3.js +58 -0
  38. package/node_modules_ol_geom_flat_length_js-_375a3.js.map +1 -0
  39. package/node_modules_ol_geom_flat_length_js-_375a4.js +58 -0
  40. package/node_modules_ol_geom_flat_length_js-_375a4.js.map +1 -0
  41. package/node_modules_ol_geom_flat_linechunk_js.js +76 -0
  42. package/node_modules_ol_geom_flat_linechunk_js.js.map +1 -0
  43. package/node_modules_ol_geom_flat_straightchunk_js.js +68 -0
  44. package/node_modules_ol_geom_flat_straightchunk_js.js.map +1 -0
  45. package/node_modules_ol_geom_flat_textpath_js.js +178 -0
  46. package/node_modules_ol_geom_flat_textpath_js.js.map +1 -0
  47. package/node_modules_ol_interaction_DblClickDragZoom_js.js +285 -0
  48. package/node_modules_ol_interaction_DblClickDragZoom_js.js.map +1 -0
  49. package/node_modules_ol_interaction_DragAndDrop_js.js +351 -0
  50. package/node_modules_ol_interaction_DragAndDrop_js.js.map +1 -0
  51. package/node_modules_ol_interaction_DragRotateAndZoom_js.js +159 -0
  52. package/node_modules_ol_interaction_DragRotateAndZoom_js.js.map +1 -0
  53. package/node_modules_ol_layer_Vector_js-_49290.js +110 -0
  54. package/node_modules_ol_layer_Vector_js-_49290.js.map +1 -0
  55. package/node_modules_ol_layer_Vector_js-_49291.js +110 -0
  56. package/node_modules_ol_layer_Vector_js-_49291.js.map +1 -0
  57. package/node_modules_ol_layer_Vector_js-_49292.js +110 -0
  58. package/node_modules_ol_layer_Vector_js-_49292.js.map +1 -0
  59. package/node_modules_ol_layer_Vector_js-_49293.js +110 -0
  60. package/node_modules_ol_layer_Vector_js-_49293.js.map +1 -0
  61. package/node_modules_ol_loadingstrategy_js.js +95 -0
  62. package/node_modules_ol_loadingstrategy_js.js.map +1 -0
  63. package/node_modules_ol_render_VectorContext_js-_3ad60.js +144 -0
  64. package/node_modules_ol_render_VectorContext_js-_3ad60.js.map +1 -0
  65. package/node_modules_ol_render_VectorContext_js-_3ad61.js +144 -0
  66. package/node_modules_ol_render_VectorContext_js-_3ad61.js.map +1 -0
  67. package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js +372 -0
  68. package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js.map +1 -0
  69. package/node_modules_ol_render_canvas_ImageBuilder_js.js +318 -0
  70. package/node_modules_ol_render_canvas_ImageBuilder_js.js.map +1 -0
  71. package/node_modules_ol_render_canvas_Instruction_js.js +66 -0
  72. package/node_modules_ol_render_canvas_Instruction_js.js.map +1 -0
  73. package/node_modules_ol_render_canvas_LineStringBuilder_js.js +187 -0
  74. package/node_modules_ol_render_canvas_LineStringBuilder_js.js.map +1 -0
  75. package/node_modules_ol_render_canvas_PolygonBuilder_js.js +276 -0
  76. package/node_modules_ol_render_canvas_PolygonBuilder_js.js.map +1 -0
  77. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js +156 -0
  78. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js.map +1 -0
  79. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js +156 -0
  80. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js.map +1 -0
  81. package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js +301 -0
  82. package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js.map +1 -0
  83. package/node_modules_ol_renderer_Layer_js.js +219 -0
  84. package/node_modules_ol_renderer_Layer_js.js.map +1 -0
  85. package/node_modules_ol_source_Source_js.js +256 -0
  86. package/node_modules_ol_source_Source_js.js.map +1 -0
  87. package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js +318 -0
  88. package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js.map +1 -0
  89. package/node_modules_ol_source_VectorEventType_js.js +80 -0
  90. package/node_modules_ol_source_VectorEventType_js.js.map +1 -0
  91. package/node_modules_ol_structs_RBush_js.js +242 -0
  92. package/node_modules_ol_structs_RBush_js.js.map +1 -0
  93. package/node_modules_ol_style_js.js +2 -1
  94. package/node_modules_ol_style_js.js.map +1 -1
  95. package/node_modules_rbush_rbush_min_js.js +16 -0
  96. package/node_modules_rbush_rbush_min_js.js.map +1 -0
  97. package/package.json +142 -146
  98. package/vaadin-bundle.json +2447 -2352
  99. package/vaadin.js +52246 -63791
  100. package/vaadin.js.map +1 -1
  101. package/vendors-node_modules_dompurify_dist_purify_es_mjs.js +1364 -0
  102. package/vendors-node_modules_dompurify_dist_purify_es_mjs.js.map +1 -0
  103. package/vendors-node_modules_dompurify_dist_purify_js.js +26 -21
  104. package/vendors-node_modules_dompurify_dist_purify_js.js.map +1 -1
  105. package/vendors-node_modules_marked_lib_marked_esm_js.js +2205 -0
  106. package/vendors-node_modules_marked_lib_marked_esm_js.js.map +1 -0
  107. package/vendors-node_modules_marked_lib_marked_umd_js.js +2164 -2556
  108. package/vendors-node_modules_marked_lib_marked_umd_js.js.map +1 -1
  109. package/vendors-node_modules_ol_Feature_js.js +360 -0
  110. package/vendors-node_modules_ol_Feature_js.js.map +1 -0
  111. package/vendors-node_modules_ol_Geolocation_js.js +352 -293
  112. package/vendors-node_modules_ol_Geolocation_js.js.map +1 -1
  113. package/vendors-node_modules_ol_ImageTile_js.js +494 -0
  114. package/vendors-node_modules_ol_ImageTile_js.js.map +1 -0
  115. package/vendors-node_modules_ol_Overlay_js.js +606 -0
  116. package/vendors-node_modules_ol_Overlay_js.js.map +1 -0
  117. package/vendors-node_modules_ol_control_FullScreen_js.js +417 -0
  118. package/vendors-node_modules_ol_control_FullScreen_js.js.map +1 -0
  119. package/vendors-node_modules_ol_control_OverviewMap_js.js +711 -0
  120. package/vendors-node_modules_ol_control_OverviewMap_js.js.map +1 -0
  121. package/vendors-node_modules_ol_control_ScaleLine_js.js +509 -0
  122. package/vendors-node_modules_ol_control_ScaleLine_js.js.map +1 -0
  123. package/vendors-node_modules_ol_control_ZoomSlider_js.js +418 -0
  124. package/vendors-node_modules_ol_control_ZoomSlider_js.js.map +1 -0
  125. package/vendors-node_modules_ol_control_js.js +490 -0
  126. package/vendors-node_modules_ol_control_js.js.map +1 -0
  127. package/vendors-node_modules_ol_geom_LineString_js.js +574 -0
  128. package/vendors-node_modules_ol_geom_LineString_js.js.map +1 -0
  129. package/vendors-node_modules_ol_geom_MultiLineString_js.js +405 -0
  130. package/vendors-node_modules_ol_geom_MultiLineString_js.js.map +1 -0
  131. package/vendors-node_modules_ol_geom_MultiPolygon_js.js +773 -0
  132. package/vendors-node_modules_ol_geom_MultiPolygon_js.js.map +1 -0
  133. package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js +769 -0
  134. package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js.map +1 -0
  135. package/vendors-node_modules_ol_index_js.js +526 -675
  136. package/vendors-node_modules_ol_index_js.js.map +1 -1
  137. package/vendors-node_modules_ol_interaction_Draw_js.js +2777 -0
  138. package/vendors-node_modules_ol_interaction_Draw_js.js.map +1 -0
  139. package/vendors-node_modules_ol_interaction_Extent_js.js +586 -0
  140. package/vendors-node_modules_ol_interaction_Extent_js.js.map +1 -0
  141. package/vendors-node_modules_ol_interaction_Link_js.js +489 -0
  142. package/vendors-node_modules_ol_interaction_Link_js.js.map +1 -0
  143. package/vendors-node_modules_ol_interaction_Modify_js.js +1841 -0
  144. package/vendors-node_modules_ol_interaction_Modify_js.js.map +1 -0
  145. package/vendors-node_modules_ol_interaction_Select_js.js +623 -0
  146. package/vendors-node_modules_ol_interaction_Select_js.js.map +1 -0
  147. package/vendors-node_modules_ol_interaction_Snap_js.js +982 -0
  148. package/vendors-node_modules_ol_interaction_Snap_js.js.map +1 -0
  149. package/vendors-node_modules_ol_interaction_Translate_js.js +466 -0
  150. package/vendors-node_modules_ol_interaction_Translate_js.js.map +1 -0
  151. package/vendors-node_modules_ol_interaction_js.js +872 -0
  152. package/vendors-node_modules_ol_interaction_js.js.map +1 -0
  153. package/vendors-node_modules_ol_layer_Graticule_js.js +1374 -989
  154. package/vendors-node_modules_ol_layer_Graticule_js.js.map +1 -1
  155. package/vendors-node_modules_ol_render_Feature_js.js +546 -0
  156. package/vendors-node_modules_ol_render_Feature_js.js.map +1 -0
  157. package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js +897 -0
  158. package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js.map +1 -0
  159. package/vendors-node_modules_ol_render_canvas_Builder_js.js +907 -0
  160. package/vendors-node_modules_ol_render_canvas_Builder_js.js.map +1 -0
  161. package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js +539 -0
  162. package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js.map +1 -0
  163. package/vendors-node_modules_ol_render_canvas_Executor_js.js +1715 -0
  164. package/vendors-node_modules_ol_render_canvas_Executor_js.js.map +1 -0
  165. package/vendors-node_modules_ol_render_canvas_Immediate_js.js +1208 -0
  166. package/vendors-node_modules_ol_render_canvas_Immediate_js.js.map +1 -0
  167. package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js +825 -0
  168. package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js.map +1 -0
  169. package/vendors-node_modules_ol_renderer_canvas_Layer_js.js +654 -0
  170. package/vendors-node_modules_ol_renderer_canvas_Layer_js.js.map +1 -0
  171. package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js +1044 -0
  172. package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js.map +1 -0
  173. package/vendors-node_modules_ol_renderer_vector_js.js +460 -0
  174. package/vendors-node_modules_ol_renderer_vector_js.js.map +1 -0
  175. package/vendors-node_modules_ol_source_Vector_js.js +2091 -0
  176. package/vendors-node_modules_ol_source_Vector_js.js.map +1 -0
  177. package/node_modules_ol_ImageTile_js.js +0 -177
  178. package/node_modules_ol_ImageTile_js.js.map +0 -1
  179. package/node_modules_ol_render_js.js +0 -131
  180. package/node_modules_ol_render_js.js.map +0 -1
  181. package/node_modules_ol_structs_LRUCache_js.js +0 -275
  182. package/node_modules_ol_structs_LRUCache_js.js.map +0 -1
  183. package/node_modules_ol_tilecoord_js.js +0 -115
  184. package/node_modules_ol_tilecoord_js.js.map +0 -1
  185. package/vendors-node_modules_ol_TileCache_js.js +0 -461
  186. package/vendors-node_modules_ol_TileCache_js.js.map +0 -1
  187. package/vendors-node_modules_ol_Tile_js.js +0 -330
  188. package/vendors-node_modules_ol_Tile_js.js.map +0 -1
  189. package/vendors-node_modules_ol_style_Text_js.js +0 -509
  190. package/vendors-node_modules_ol_style_Text_js.js.map +0 -1
  191. package/vendors-node_modules_rbush_index_js.js +0 -531
  192. package/vendors-node_modules_rbush_index_js.js.map +0 -1
@@ -0,0 +1,276 @@
1
+ (self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_render_canvas_PolygonBuilder_js"],{
2
+
3
+ /***/ "./node_modules/ol/render/canvas/PolygonBuilder.js":
4
+ /*!*********************************************************!*\
5
+ !*** ./node_modules/ol/render/canvas/PolygonBuilder.js ***!
6
+ \*********************************************************/
7
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8
+
9
+ __webpack_require__.r(__webpack_exports__);
10
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
12
+ /* harmony export */ });
13
+ /* harmony import */ var _geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geom/flat/simplify.js */ "./node_modules/ol/geom/flat/simplify.js");
14
+ /* harmony import */ var _canvas_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../canvas.js */ "./node_modules/ol/render/canvas.js");
15
+ /* harmony import */ var _Builder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Builder.js */ "./node_modules/ol/render/canvas/Builder.js");
16
+ /* harmony import */ var _Instruction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Instruction.js */ "./node_modules/ol/render/canvas/Instruction.js");
17
+ /**
18
+ * @module ol/render/canvas/PolygonBuilder
19
+ */
20
+
21
+
22
+
23
+
24
+
25
+ class CanvasPolygonBuilder extends _Builder_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
26
+ /**
27
+ * @param {number} tolerance Tolerance.
28
+ * @param {import("../../extent.js").Extent} maxExtent Maximum extent.
29
+ * @param {number} resolution Resolution.
30
+ * @param {number} pixelRatio Pixel ratio.
31
+ */
32
+ constructor(tolerance, maxExtent, resolution, pixelRatio) {
33
+ super(tolerance, maxExtent, resolution, pixelRatio);
34
+ }
35
+
36
+ /**
37
+ * @param {Array<number>} flatCoordinates Flat coordinates.
38
+ * @param {number} offset Offset.
39
+ * @param {Array<number>} ends Ends.
40
+ * @param {number} stride Stride.
41
+ * @private
42
+ * @return {number} End.
43
+ */
44
+ drawFlatCoordinatess_(flatCoordinates, offset, ends, stride) {
45
+ const state = this.state;
46
+ const fill = state.fillStyle !== undefined;
47
+ const stroke = state.strokeStyle !== undefined;
48
+ const numEnds = ends.length;
49
+ this.instructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.beginPathInstruction);
50
+ this.hitDetectionInstructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.beginPathInstruction);
51
+ for (let i = 0; i < numEnds; ++i) {
52
+ const end = ends[i];
53
+ const myBegin = this.coordinates.length;
54
+ const myEnd = this.appendFlatLineCoordinates(
55
+ flatCoordinates,
56
+ offset,
57
+ end,
58
+ stride,
59
+ true,
60
+ !stroke,
61
+ );
62
+ const moveToLineToInstruction = [
63
+ _Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].MOVE_TO_LINE_TO,
64
+ myBegin,
65
+ myEnd,
66
+ ];
67
+ this.instructions.push(moveToLineToInstruction);
68
+ this.hitDetectionInstructions.push(moveToLineToInstruction);
69
+ if (stroke) {
70
+ // Performance optimization: only call closePath() when we have a stroke.
71
+ // Otherwise the ring is closed already (see appendFlatLineCoordinates above).
72
+ this.instructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.closePathInstruction);
73
+ this.hitDetectionInstructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.closePathInstruction);
74
+ }
75
+ offset = end;
76
+ }
77
+ if (fill) {
78
+ this.instructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.fillInstruction);
79
+ this.hitDetectionInstructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.fillInstruction);
80
+ }
81
+ if (stroke) {
82
+ this.instructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.strokeInstruction);
83
+ this.hitDetectionInstructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.strokeInstruction);
84
+ }
85
+ return offset;
86
+ }
87
+
88
+ /**
89
+ * @param {import("../../geom/Circle.js").default} circleGeometry Circle geometry.
90
+ * @param {import("../../Feature.js").default} feature Feature.
91
+ * @param {number} [index] Render order index.
92
+ * @override
93
+ */
94
+ drawCircle(circleGeometry, feature, index) {
95
+ const state = this.state;
96
+ const fillStyle = state.fillStyle;
97
+ const strokeStyle = state.strokeStyle;
98
+ if (fillStyle === undefined && strokeStyle === undefined) {
99
+ return;
100
+ }
101
+ this.setFillStrokeStyles_();
102
+ this.beginGeometry(circleGeometry, feature, index);
103
+ if (state.fillStyle !== undefined) {
104
+ this.hitDetectionInstructions.push([
105
+ _Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].SET_FILL_STYLE,
106
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultFillStyle,
107
+ ]);
108
+ }
109
+ if (state.strokeStyle !== undefined) {
110
+ this.hitDetectionInstructions.push([
111
+ _Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].SET_STROKE_STYLE,
112
+ state.strokeStyle,
113
+ state.lineWidth,
114
+ state.lineCap,
115
+ state.lineJoin,
116
+ state.miterLimit,
117
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultLineDash,
118
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultLineDashOffset,
119
+ ]);
120
+ }
121
+ const flatCoordinates = circleGeometry.getFlatCoordinates();
122
+ const stride = circleGeometry.getStride();
123
+ const myBegin = this.coordinates.length;
124
+ this.appendFlatLineCoordinates(
125
+ flatCoordinates,
126
+ 0,
127
+ flatCoordinates.length,
128
+ stride,
129
+ false,
130
+ false,
131
+ );
132
+ const circleInstruction = [_Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].CIRCLE, myBegin];
133
+ this.instructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.beginPathInstruction, circleInstruction);
134
+ this.hitDetectionInstructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.beginPathInstruction, circleInstruction);
135
+ if (state.fillStyle !== undefined) {
136
+ this.instructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.fillInstruction);
137
+ this.hitDetectionInstructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.fillInstruction);
138
+ }
139
+ if (state.strokeStyle !== undefined) {
140
+ this.instructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.strokeInstruction);
141
+ this.hitDetectionInstructions.push(_Instruction_js__WEBPACK_IMPORTED_MODULE_1__.strokeInstruction);
142
+ }
143
+ this.endGeometry(feature);
144
+ }
145
+
146
+ /**
147
+ * @param {import("../../geom/Polygon.js").default|import("../Feature.js").default} polygonGeometry Polygon geometry.
148
+ * @param {import("../../Feature.js").FeatureLike} feature Feature.
149
+ * @param {number} [index] Render order index.
150
+ * @override
151
+ */
152
+ drawPolygon(polygonGeometry, feature, index) {
153
+ const state = this.state;
154
+ const fillStyle = state.fillStyle;
155
+ const strokeStyle = state.strokeStyle;
156
+ if (fillStyle === undefined && strokeStyle === undefined) {
157
+ return;
158
+ }
159
+ this.setFillStrokeStyles_();
160
+ this.beginGeometry(polygonGeometry, feature, index);
161
+ if (state.fillStyle !== undefined) {
162
+ this.hitDetectionInstructions.push([
163
+ _Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].SET_FILL_STYLE,
164
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultFillStyle,
165
+ ]);
166
+ }
167
+ if (state.strokeStyle !== undefined) {
168
+ this.hitDetectionInstructions.push([
169
+ _Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].SET_STROKE_STYLE,
170
+ state.strokeStyle,
171
+ state.lineWidth,
172
+ state.lineCap,
173
+ state.lineJoin,
174
+ state.miterLimit,
175
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultLineDash,
176
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultLineDashOffset,
177
+ ]);
178
+ }
179
+ const ends = polygonGeometry.getEnds();
180
+ const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();
181
+ const stride = polygonGeometry.getStride();
182
+ this.drawFlatCoordinatess_(
183
+ flatCoordinates,
184
+ 0,
185
+ /** @type {Array<number>} */ (ends),
186
+ stride,
187
+ );
188
+ this.endGeometry(feature);
189
+ }
190
+
191
+ /**
192
+ * @param {import("../../geom/MultiPolygon.js").default} multiPolygonGeometry MultiPolygon geometry.
193
+ * @param {import("../../Feature.js").FeatureLike} feature Feature.
194
+ * @param {number} [index] Render order index.
195
+ * @override
196
+ */
197
+ drawMultiPolygon(multiPolygonGeometry, feature, index) {
198
+ const state = this.state;
199
+ const fillStyle = state.fillStyle;
200
+ const strokeStyle = state.strokeStyle;
201
+ if (fillStyle === undefined && strokeStyle === undefined) {
202
+ return;
203
+ }
204
+ this.setFillStrokeStyles_();
205
+ this.beginGeometry(multiPolygonGeometry, feature, index);
206
+ if (state.fillStyle !== undefined) {
207
+ this.hitDetectionInstructions.push([
208
+ _Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].SET_FILL_STYLE,
209
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultFillStyle,
210
+ ]);
211
+ }
212
+ if (state.strokeStyle !== undefined) {
213
+ this.hitDetectionInstructions.push([
214
+ _Instruction_js__WEBPACK_IMPORTED_MODULE_1__["default"].SET_STROKE_STYLE,
215
+ state.strokeStyle,
216
+ state.lineWidth,
217
+ state.lineCap,
218
+ state.lineJoin,
219
+ state.miterLimit,
220
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultLineDash,
221
+ _canvas_js__WEBPACK_IMPORTED_MODULE_2__.defaultLineDashOffset,
222
+ ]);
223
+ }
224
+ const endss = multiPolygonGeometry.getEndss();
225
+ const flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();
226
+ const stride = multiPolygonGeometry.getStride();
227
+ let offset = 0;
228
+ for (let i = 0, ii = endss.length; i < ii; ++i) {
229
+ offset = this.drawFlatCoordinatess_(
230
+ flatCoordinates,
231
+ offset,
232
+ endss[i],
233
+ stride,
234
+ );
235
+ }
236
+ this.endGeometry(feature);
237
+ }
238
+
239
+ /**
240
+ * @return {import("../canvas.js").SerializableInstructions} the serializable instructions.
241
+ * @override
242
+ */
243
+ finish() {
244
+ this.reverseHitDetectionInstructions();
245
+ this.state = null;
246
+ // We want to preserve topology when drawing polygons. Polygons are
247
+ // simplified using quantization and point elimination. However, we might
248
+ // have received a mix of quantized and non-quantized geometries, so ensure
249
+ // that all are quantized by quantizing all coordinates in the batch.
250
+ const tolerance = this.tolerance;
251
+ if (tolerance !== 0) {
252
+ const coordinates = this.coordinates;
253
+ for (let i = 0, ii = coordinates.length; i < ii; ++i) {
254
+ coordinates[i] = (0,_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_3__.snap)(coordinates[i], tolerance);
255
+ }
256
+ }
257
+ return super.finish();
258
+ }
259
+
260
+ /**
261
+ * @private
262
+ */
263
+ setFillStrokeStyles_() {
264
+ const state = this.state;
265
+ this.updateFillStyle(state, this.createFill);
266
+ this.updateStrokeStyle(state, this.applyStroke);
267
+ }
268
+ }
269
+
270
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanvasPolygonBuilder);
271
+
272
+
273
+ /***/ })
274
+
275
+ }])
276
+ //# sourceMappingURL=node_modules_ol_render_canvas_PolygonBuilder_js.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node_modules_ol_render_canvas_PolygonBuilder_js.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACiD;AAK3B;AACmB;AAMf;;AAE1B,mCAAmC,mDAAa;AAChD;AACA,aAAa,QAAQ;AACrB,aAAa,kCAAkC;AAC/C,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,eAAe;AAC5B,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iEAAoB;AAC/C,uCAAuC,iEAAoB;AAC3D,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,uEAAiC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iEAAoB;AACnD,2CAA2C,iEAAoB;AAC/D;AACA;AACA;AACA;AACA,6BAA6B,4DAAe;AAC5C,yCAAyC,4DAAe;AACxD;AACA;AACA,6BAA6B,8DAAiB;AAC9C,yCAAyC,8DAAiB;AAC1D;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,oCAAoC;AACjD,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAgC;AACxC,QAAQ,wDAAgB;AACxB;AACA;AACA;AACA;AACA,QAAQ,wEAAkC;AAC1C;AACA;AACA;AACA;AACA;AACA,QAAQ,uDAAe;AACvB,QAAQ,6DAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8DAAwB;AACvD,2BAA2B,iEAAoB;AAC/C,uCAAuC,iEAAoB;AAC3D;AACA,6BAA6B,4DAAe;AAC5C,yCAAyC,4DAAe;AACxD;AACA;AACA,6BAA6B,8DAAiB;AAC9C,yCAAyC,8DAAiB;AAC1D;AACA;AACA;;AAEA;AACA,aAAa,yEAAyE;AACtF,aAAa,wCAAwC;AACrD,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAgC;AACxC,QAAQ,wDAAgB;AACxB;AACA;AACA;AACA;AACA,QAAQ,wEAAkC;AAC1C;AACA;AACA;AACA;AACA;AACA,QAAQ,uDAAe;AACvB,QAAQ,6DAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA;AACA;;AAEA;AACA,aAAa,8CAA8C;AAC3D,aAAa,wCAAwC;AACrD,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAgC;AACxC,QAAQ,wDAAgB;AACxB;AACA;AACA;AACA;AACA,QAAQ,wEAAkC;AAC1C;AACA;AACA;AACA;AACA;AACA,QAAQ,uDAAe;AACvB,QAAQ,6DAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,iDAAiD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD,yBAAyB,4DAAI;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,oBAAoB,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/render/canvas/PolygonBuilder.js"],"sourcesContent":["/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport {snap} from '../../geom/flat/simplify.js';\nimport {\n defaultFillStyle,\n defaultLineDash,\n defaultLineDashOffset,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n beginPathInstruction,\n closePathInstruction,\n fillInstruction,\n strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasPolygonBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @private\n * @return {number} End.\n */\n drawFlatCoordinatess_(flatCoordinates, offset, ends, stride) {\n const state = this.state;\n const fill = state.fillStyle !== undefined;\n const stroke = state.strokeStyle !== undefined;\n const numEnds = ends.length;\n this.instructions.push(beginPathInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction);\n for (let i = 0; i < numEnds; ++i) {\n const end = ends[i];\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n true,\n !stroke,\n );\n const moveToLineToInstruction = [\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n ];\n this.instructions.push(moveToLineToInstruction);\n this.hitDetectionInstructions.push(moveToLineToInstruction);\n if (stroke) {\n // Performance optimization: only call closePath() when we have a stroke.\n // Otherwise the ring is closed already (see appendFlatLineCoordinates above).\n this.instructions.push(closePathInstruction);\n this.hitDetectionInstructions.push(closePathInstruction);\n }\n offset = end;\n }\n if (fill) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (stroke) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n return offset;\n }\n\n /**\n * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawCircle(circleGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(circleGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const flatCoordinates = circleGeometry.getFlatCoordinates();\n const stride = circleGeometry.getStride();\n const myBegin = this.coordinates.length;\n this.appendFlatLineCoordinates(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n false,\n false,\n );\n const circleInstruction = [CanvasInstruction.CIRCLE, myBegin];\n this.instructions.push(beginPathInstruction, circleInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n if (state.fillStyle !== undefined) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (state.strokeStyle !== undefined) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawPolygon(polygonGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(polygonGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const ends = polygonGeometry.getEnds();\n const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n const stride = polygonGeometry.getStride();\n this.drawFlatCoordinatess_(\n flatCoordinates,\n 0,\n /** @type {Array<number>} */ (ends),\n stride,\n );\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawMultiPolygon(multiPolygonGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(multiPolygonGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const endss = multiPolygonGeometry.getEndss();\n const flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n const stride = multiPolygonGeometry.getStride();\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = this.drawFlatCoordinatess_(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n );\n }\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n this.reverseHitDetectionInstructions();\n this.state = null;\n // We want to preserve topology when drawing polygons. Polygons are\n // simplified using quantization and point elimination. However, we might\n // have received a mix of quantized and non-quantized geometries, so ensure\n // that all are quantized by quantizing all coordinates in the batch.\n const tolerance = this.tolerance;\n if (tolerance !== 0) {\n const coordinates = this.coordinates;\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = snap(coordinates[i], tolerance);\n }\n }\n return super.finish();\n }\n\n /**\n * @private\n */\n setFillStrokeStyles_() {\n const state = this.state;\n this.updateFillStyle(state, this.createFill);\n this.updateStrokeStyle(state, this.applyStroke);\n }\n}\n\nexport default CanvasPolygonBuilder;\n"],"names":[],"sourceRoot":""}
@@ -0,0 +1,156 @@
1
+ (self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_render_canvas_ZIndexContext_js-_fab20"],{
2
+
3
+ /***/ "./node_modules/ol/render/canvas/ZIndexContext.js":
4
+ /*!********************************************************!*\
5
+ !*** ./node_modules/ol/render/canvas/ZIndexContext.js ***!
6
+ \********************************************************/
7
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8
+
9
+ __webpack_require__.r(__webpack_exports__);
10
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
12
+ /* harmony export */ });
13
+ /* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/ol/dom.js");
14
+ /**
15
+ * @module ol/render/canvas/ZIndexContext
16
+ */
17
+
18
+
19
+
20
+ /** @typedef {CanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */
21
+
22
+ /**
23
+ * @extends {CanvasRenderingContext2D}
24
+ */
25
+ class ZIndexContext {
26
+ constructor() {
27
+ /**
28
+ * @private
29
+ * @type {Array<Array<*>>}
30
+ */
31
+ this.instructions_ = [];
32
+ /**
33
+ * @type {number}
34
+ */
35
+ this.zIndex = 0;
36
+ /**
37
+ * @private
38
+ * @type {number}
39
+ */
40
+ this.offset_ = 0;
41
+
42
+ /**
43
+ * @private
44
+ * @type {ZIndexContextProxy}
45
+ */
46
+ this.context_ = /** @type {ZIndexContextProxy} */ (
47
+ new Proxy((0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.getSharedCanvasContext2D)(), {
48
+ get: (target, property) => {
49
+ if (
50
+ typeof (/** @type {*} */ ((0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.getSharedCanvasContext2D)())[property]) !==
51
+ 'function'
52
+ ) {
53
+ // we only accept calling functions on the proxy, not accessing properties
54
+ return undefined;
55
+ }
56
+ this.push_(property);
57
+ return this.pushMethodArgs_;
58
+ },
59
+ set: (target, property, value) => {
60
+ this.push_(property, value);
61
+ return true;
62
+ },
63
+ })
64
+ );
65
+ }
66
+
67
+ /**
68
+ * @param {...*} args Arguments to push to the instructions array.
69
+ * @private
70
+ */
71
+ push_(...args) {
72
+ const instructions = this.instructions_;
73
+ const index = this.zIndex + this.offset_;
74
+ if (!instructions[index]) {
75
+ instructions[index] = [];
76
+ }
77
+ instructions[index].push(...args);
78
+ }
79
+
80
+ /**
81
+ * @private
82
+ * @param {...*} args Args.
83
+ * @return {ZIndexContext} This.
84
+ */
85
+ pushMethodArgs_ = (...args) => {
86
+ this.push_(args);
87
+ return this;
88
+ };
89
+
90
+ /**
91
+ * Push a function that renders to the context directly.
92
+ * @param {function(CanvasRenderingContext2D): void} render Function.
93
+ */
94
+ pushFunction(render) {
95
+ this.push_(render);
96
+ }
97
+
98
+ /**
99
+ * Get a proxy for CanvasRenderingContext2D which does not support getting state
100
+ * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a
101
+ * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,
102
+ * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.
103
+ * @return {ZIndexContextProxy} Context.
104
+ */
105
+ getContext() {
106
+ return this.context_;
107
+ }
108
+
109
+ /**
110
+ * @param {CanvasRenderingContext2D} context Context.
111
+ */
112
+ draw(context) {
113
+ this.instructions_.forEach((instructionsAtIndex) => {
114
+ for (let i = 0, ii = instructionsAtIndex.length; i < ii; ++i) {
115
+ const property = instructionsAtIndex[i];
116
+ if (typeof property === 'function') {
117
+ property(context);
118
+ continue;
119
+ }
120
+ const instructionAtIndex = instructionsAtIndex[++i];
121
+ if (typeof (/** @type {*} */ (context)[property]) === 'function') {
122
+ /** @type {*} */ (context)[property](...instructionAtIndex);
123
+ } else {
124
+ if (typeof instructionAtIndex === 'function') {
125
+ /** @type {*} */ (context)[property] = instructionAtIndex(context);
126
+ continue;
127
+ }
128
+ /** @type {*} */ (context)[property] = instructionAtIndex;
129
+ }
130
+ }
131
+ });
132
+ }
133
+
134
+ clear() {
135
+ this.instructions_.length = 0;
136
+ this.zIndex = 0;
137
+ this.offset_ = 0;
138
+ }
139
+
140
+ /**
141
+ * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to
142
+ * avoid conflicting context.clip() or context.save()/restore() calls.
143
+ */
144
+ offset() {
145
+ this.offset_ = this.instructions_.length;
146
+ this.zIndex = 0;
147
+ }
148
+ }
149
+
150
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ZIndexContext);
151
+
152
+
153
+ /***/ })
154
+
155
+ }])
156
+ //# sourceMappingURL=node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;;AAEsD;;AAEtD,cAAc,4BAA4B,mBAAmB;;AAE7D;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,+BAA+B,oBAAoB;AACnD,gBAAgB,iEAAwB;AACxC;AACA;AACA,+BAA+B,GAAG,IAAI,iEAAwB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,0CAA0C;AACvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,GAAG;AAClC,qBAAqB,GAAG;AACxB,UAAU;AACV;AACA,uBAAuB,GAAG;AAC1B;AACA;AACA,qBAAqB,GAAG;AACxB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,aAAa,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/render/canvas/ZIndexContext.js"],"sourcesContent":["/**\n * @module ol/render/canvas/ZIndexContext\n */\n\nimport {getSharedCanvasContext2D} from '../../dom.js';\n\n/** @typedef {CanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */\n\n/**\n * @extends {CanvasRenderingContext2D}\n */\nclass ZIndexContext {\n constructor() {\n /**\n * @private\n * @type {Array<Array<*>>}\n */\n this.instructions_ = [];\n /**\n * @type {number}\n */\n this.zIndex = 0;\n /**\n * @private\n * @type {number}\n */\n this.offset_ = 0;\n\n /**\n * @private\n * @type {ZIndexContextProxy}\n */\n this.context_ = /** @type {ZIndexContextProxy} */ (\n new Proxy(getSharedCanvasContext2D(), {\n get: (target, property) => {\n if (\n typeof (/** @type {*} */ (getSharedCanvasContext2D())[property]) !==\n 'function'\n ) {\n // we only accept calling functions on the proxy, not accessing properties\n return undefined;\n }\n this.push_(property);\n return this.pushMethodArgs_;\n },\n set: (target, property, value) => {\n this.push_(property, value);\n return true;\n },\n })\n );\n }\n\n /**\n * @param {...*} args Arguments to push to the instructions array.\n * @private\n */\n push_(...args) {\n const instructions = this.instructions_;\n const index = this.zIndex + this.offset_;\n if (!instructions[index]) {\n instructions[index] = [];\n }\n instructions[index].push(...args);\n }\n\n /**\n * @private\n * @param {...*} args Args.\n * @return {ZIndexContext} This.\n */\n pushMethodArgs_ = (...args) => {\n this.push_(args);\n return this;\n };\n\n /**\n * Push a function that renders to the context directly.\n * @param {function(CanvasRenderingContext2D): void} render Function.\n */\n pushFunction(render) {\n this.push_(render);\n }\n\n /**\n * Get a proxy for CanvasRenderingContext2D which does not support getting state\n * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a\n * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,\n * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.\n * @return {ZIndexContextProxy} Context.\n */\n getContext() {\n return this.context_;\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n */\n draw(context) {\n this.instructions_.forEach((instructionsAtIndex) => {\n for (let i = 0, ii = instructionsAtIndex.length; i < ii; ++i) {\n const property = instructionsAtIndex[i];\n if (typeof property === 'function') {\n property(context);\n continue;\n }\n const instructionAtIndex = instructionsAtIndex[++i];\n if (typeof (/** @type {*} */ (context)[property]) === 'function') {\n /** @type {*} */ (context)[property](...instructionAtIndex);\n } else {\n if (typeof instructionAtIndex === 'function') {\n /** @type {*} */ (context)[property] = instructionAtIndex(context);\n continue;\n }\n /** @type {*} */ (context)[property] = instructionAtIndex;\n }\n }\n });\n }\n\n clear() {\n this.instructions_.length = 0;\n this.zIndex = 0;\n this.offset_ = 0;\n }\n\n /**\n * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to\n * avoid conflicting context.clip() or context.save()/restore() calls.\n */\n offset() {\n this.offset_ = this.instructions_.length;\n this.zIndex = 0;\n }\n}\n\nexport default ZIndexContext;\n"],"names":[],"sourceRoot":""}
@@ -0,0 +1,156 @@
1
+ (self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_render_canvas_ZIndexContext_js-_fab21"],{
2
+
3
+ /***/ "./node_modules/ol/render/canvas/ZIndexContext.js":
4
+ /*!********************************************************!*\
5
+ !*** ./node_modules/ol/render/canvas/ZIndexContext.js ***!
6
+ \********************************************************/
7
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8
+
9
+ __webpack_require__.r(__webpack_exports__);
10
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
12
+ /* harmony export */ });
13
+ /* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/ol/dom.js");
14
+ /**
15
+ * @module ol/render/canvas/ZIndexContext
16
+ */
17
+
18
+
19
+
20
+ /** @typedef {CanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */
21
+
22
+ /**
23
+ * @extends {CanvasRenderingContext2D}
24
+ */
25
+ class ZIndexContext {
26
+ constructor() {
27
+ /**
28
+ * @private
29
+ * @type {Array<Array<*>>}
30
+ */
31
+ this.instructions_ = [];
32
+ /**
33
+ * @type {number}
34
+ */
35
+ this.zIndex = 0;
36
+ /**
37
+ * @private
38
+ * @type {number}
39
+ */
40
+ this.offset_ = 0;
41
+
42
+ /**
43
+ * @private
44
+ * @type {ZIndexContextProxy}
45
+ */
46
+ this.context_ = /** @type {ZIndexContextProxy} */ (
47
+ new Proxy((0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.getSharedCanvasContext2D)(), {
48
+ get: (target, property) => {
49
+ if (
50
+ typeof (/** @type {*} */ ((0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.getSharedCanvasContext2D)())[property]) !==
51
+ 'function'
52
+ ) {
53
+ // we only accept calling functions on the proxy, not accessing properties
54
+ return undefined;
55
+ }
56
+ this.push_(property);
57
+ return this.pushMethodArgs_;
58
+ },
59
+ set: (target, property, value) => {
60
+ this.push_(property, value);
61
+ return true;
62
+ },
63
+ })
64
+ );
65
+ }
66
+
67
+ /**
68
+ * @param {...*} args Arguments to push to the instructions array.
69
+ * @private
70
+ */
71
+ push_(...args) {
72
+ const instructions = this.instructions_;
73
+ const index = this.zIndex + this.offset_;
74
+ if (!instructions[index]) {
75
+ instructions[index] = [];
76
+ }
77
+ instructions[index].push(...args);
78
+ }
79
+
80
+ /**
81
+ * @private
82
+ * @param {...*} args Args.
83
+ * @return {ZIndexContext} This.
84
+ */
85
+ pushMethodArgs_ = (...args) => {
86
+ this.push_(args);
87
+ return this;
88
+ };
89
+
90
+ /**
91
+ * Push a function that renders to the context directly.
92
+ * @param {function(CanvasRenderingContext2D): void} render Function.
93
+ */
94
+ pushFunction(render) {
95
+ this.push_(render);
96
+ }
97
+
98
+ /**
99
+ * Get a proxy for CanvasRenderingContext2D which does not support getting state
100
+ * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a
101
+ * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,
102
+ * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.
103
+ * @return {ZIndexContextProxy} Context.
104
+ */
105
+ getContext() {
106
+ return this.context_;
107
+ }
108
+
109
+ /**
110
+ * @param {CanvasRenderingContext2D} context Context.
111
+ */
112
+ draw(context) {
113
+ this.instructions_.forEach((instructionsAtIndex) => {
114
+ for (let i = 0, ii = instructionsAtIndex.length; i < ii; ++i) {
115
+ const property = instructionsAtIndex[i];
116
+ if (typeof property === 'function') {
117
+ property(context);
118
+ continue;
119
+ }
120
+ const instructionAtIndex = instructionsAtIndex[++i];
121
+ if (typeof (/** @type {*} */ (context)[property]) === 'function') {
122
+ /** @type {*} */ (context)[property](...instructionAtIndex);
123
+ } else {
124
+ if (typeof instructionAtIndex === 'function') {
125
+ /** @type {*} */ (context)[property] = instructionAtIndex(context);
126
+ continue;
127
+ }
128
+ /** @type {*} */ (context)[property] = instructionAtIndex;
129
+ }
130
+ }
131
+ });
132
+ }
133
+
134
+ clear() {
135
+ this.instructions_.length = 0;
136
+ this.zIndex = 0;
137
+ this.offset_ = 0;
138
+ }
139
+
140
+ /**
141
+ * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to
142
+ * avoid conflicting context.clip() or context.save()/restore() calls.
143
+ */
144
+ offset() {
145
+ this.offset_ = this.instructions_.length;
146
+ this.zIndex = 0;
147
+ }
148
+ }
149
+
150
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ZIndexContext);
151
+
152
+
153
+ /***/ })
154
+
155
+ }])
156
+ //# sourceMappingURL=node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;;AAEsD;;AAEtD,cAAc,4BAA4B,mBAAmB;;AAE7D;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,+BAA+B,oBAAoB;AACnD,gBAAgB,iEAAwB;AACxC;AACA;AACA,+BAA+B,GAAG,IAAI,iEAAwB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,0CAA0C;AACvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,GAAG;AAClC,qBAAqB,GAAG;AACxB,UAAU;AACV;AACA,uBAAuB,GAAG;AAC1B;AACA;AACA,qBAAqB,GAAG;AACxB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,aAAa,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/render/canvas/ZIndexContext.js"],"sourcesContent":["/**\n * @module ol/render/canvas/ZIndexContext\n */\n\nimport {getSharedCanvasContext2D} from '../../dom.js';\n\n/** @typedef {CanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */\n\n/**\n * @extends {CanvasRenderingContext2D}\n */\nclass ZIndexContext {\n constructor() {\n /**\n * @private\n * @type {Array<Array<*>>}\n */\n this.instructions_ = [];\n /**\n * @type {number}\n */\n this.zIndex = 0;\n /**\n * @private\n * @type {number}\n */\n this.offset_ = 0;\n\n /**\n * @private\n * @type {ZIndexContextProxy}\n */\n this.context_ = /** @type {ZIndexContextProxy} */ (\n new Proxy(getSharedCanvasContext2D(), {\n get: (target, property) => {\n if (\n typeof (/** @type {*} */ (getSharedCanvasContext2D())[property]) !==\n 'function'\n ) {\n // we only accept calling functions on the proxy, not accessing properties\n return undefined;\n }\n this.push_(property);\n return this.pushMethodArgs_;\n },\n set: (target, property, value) => {\n this.push_(property, value);\n return true;\n },\n })\n );\n }\n\n /**\n * @param {...*} args Arguments to push to the instructions array.\n * @private\n */\n push_(...args) {\n const instructions = this.instructions_;\n const index = this.zIndex + this.offset_;\n if (!instructions[index]) {\n instructions[index] = [];\n }\n instructions[index].push(...args);\n }\n\n /**\n * @private\n * @param {...*} args Args.\n * @return {ZIndexContext} This.\n */\n pushMethodArgs_ = (...args) => {\n this.push_(args);\n return this;\n };\n\n /**\n * Push a function that renders to the context directly.\n * @param {function(CanvasRenderingContext2D): void} render Function.\n */\n pushFunction(render) {\n this.push_(render);\n }\n\n /**\n * Get a proxy for CanvasRenderingContext2D which does not support getting state\n * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a\n * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,\n * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.\n * @return {ZIndexContextProxy} Context.\n */\n getContext() {\n return this.context_;\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n */\n draw(context) {\n this.instructions_.forEach((instructionsAtIndex) => {\n for (let i = 0, ii = instructionsAtIndex.length; i < ii; ++i) {\n const property = instructionsAtIndex[i];\n if (typeof property === 'function') {\n property(context);\n continue;\n }\n const instructionAtIndex = instructionsAtIndex[++i];\n if (typeof (/** @type {*} */ (context)[property]) === 'function') {\n /** @type {*} */ (context)[property](...instructionAtIndex);\n } else {\n if (typeof instructionAtIndex === 'function') {\n /** @type {*} */ (context)[property] = instructionAtIndex(context);\n continue;\n }\n /** @type {*} */ (context)[property] = instructionAtIndex;\n }\n }\n });\n }\n\n clear() {\n this.instructions_.length = 0;\n this.zIndex = 0;\n this.offset_ = 0;\n }\n\n /**\n * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to\n * avoid conflicting context.clip() or context.save()/restore() calls.\n */\n offset() {\n this.offset_ = this.instructions_.length;\n this.zIndex = 0;\n }\n}\n\nexport default ZIndexContext;\n"],"names":[],"sourceRoot":""}