@performant-software/geospatial 2.3.10-beta.3 → 2.3.10-beta.6

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 (207) hide show
  1. package/dist/index.cjs14.js +1 -1
  2. package/dist/index.cjs15.js +1 -1
  3. package/dist/index.cjs16.js +1 -1
  4. package/dist/index.cjs183.js +1 -1
  5. package/dist/index.cjs183.js.map +1 -1
  6. package/dist/index.cjs184.js +1 -1
  7. package/dist/index.cjs184.js.map +1 -1
  8. package/dist/index.cjs185.js +4 -1
  9. package/dist/index.cjs185.js.map +1 -1
  10. package/dist/index.cjs186.js +1 -1
  11. package/dist/index.cjs186.js.map +1 -1
  12. package/dist/index.cjs187.js +1 -1
  13. package/dist/index.cjs187.js.map +1 -1
  14. package/dist/index.cjs188.js +1 -1
  15. package/dist/index.cjs188.js.map +1 -1
  16. package/dist/index.cjs189.js +1 -1
  17. package/dist/index.cjs189.js.map +1 -1
  18. package/dist/index.cjs19.js +1 -1
  19. package/dist/index.cjs190.js +1 -1
  20. package/dist/index.cjs190.js.map +1 -1
  21. package/dist/index.cjs191.js +1 -1
  22. package/dist/index.cjs191.js.map +1 -1
  23. package/dist/index.cjs192.js +1 -4
  24. package/dist/index.cjs192.js.map +1 -1
  25. package/dist/index.cjs193.js +1 -1
  26. package/dist/index.cjs193.js.map +1 -1
  27. package/dist/index.cjs194.js +1 -1
  28. package/dist/index.cjs194.js.map +1 -1
  29. package/dist/index.cjs195.js +1 -1
  30. package/dist/index.cjs195.js.map +1 -1
  31. package/dist/index.cjs196.js +1 -1
  32. package/dist/index.cjs196.js.map +1 -1
  33. package/dist/index.cjs197.js +1 -1
  34. package/dist/index.cjs197.js.map +1 -1
  35. package/dist/index.cjs198.js +1 -1
  36. package/dist/index.cjs198.js.map +1 -1
  37. package/dist/index.cjs199.js +1 -1
  38. package/dist/index.cjs199.js.map +1 -1
  39. package/dist/index.cjs200.js +1 -1
  40. package/dist/index.cjs200.js.map +1 -1
  41. package/dist/index.cjs201.js +1 -1
  42. package/dist/index.cjs201.js.map +1 -1
  43. package/dist/index.cjs202.js +1 -1
  44. package/dist/index.cjs202.js.map +1 -1
  45. package/dist/index.cjs203.js +1 -1
  46. package/dist/index.cjs203.js.map +1 -1
  47. package/dist/index.cjs204.js +1 -1
  48. package/dist/index.cjs204.js.map +1 -1
  49. package/dist/index.cjs208.js +1 -1
  50. package/dist/index.cjs209.js +1 -1
  51. package/dist/index.cjs210.js +1 -1
  52. package/dist/index.cjs228.js +1 -1
  53. package/dist/index.cjs233.js +1 -1
  54. package/dist/index.cjs233.js.map +1 -1
  55. package/dist/index.cjs234.js +1 -1
  56. package/dist/index.cjs234.js.map +1 -1
  57. package/dist/index.cjs235.js +1 -1
  58. package/dist/index.cjs235.js.map +1 -1
  59. package/dist/index.cjs236.js +1 -1
  60. package/dist/index.cjs236.js.map +1 -1
  61. package/dist/index.cjs237.js +1 -1
  62. package/dist/index.cjs237.js.map +1 -1
  63. package/dist/index.cjs239.js +1 -1
  64. package/dist/index.cjs242.js +1 -1
  65. package/dist/index.cjs245.js +1 -1
  66. package/dist/index.cjs248.js +1 -1
  67. package/dist/index.cjs250.js +1 -1
  68. package/dist/index.cjs253.js +1 -1
  69. package/dist/index.cjs254.js +1 -1
  70. package/dist/index.cjs257.js +1 -1
  71. package/dist/index.cjs257.js.map +1 -1
  72. package/dist/index.cjs258.js +1 -1
  73. package/dist/index.cjs258.js.map +1 -1
  74. package/dist/index.cjs259.js +1 -1
  75. package/dist/index.cjs26.js +1 -1
  76. package/dist/index.cjs52.js +1 -1
  77. package/dist/index.cjs56.js +1 -1
  78. package/dist/index.cjs58.js +1 -1
  79. package/dist/index.cjs67.js +1 -1
  80. package/dist/index.cjs67.js.map +1 -1
  81. package/dist/index.cjs68.js +1 -1
  82. package/dist/index.cjs68.js.map +1 -1
  83. package/dist/index.cjs69.js +1 -1
  84. package/dist/index.cjs69.js.map +1 -1
  85. package/dist/index.cjs70.js +1 -1
  86. package/dist/index.cjs70.js.map +1 -1
  87. package/dist/index.cjs71.js +1 -1
  88. package/dist/index.cjs71.js.map +1 -1
  89. package/dist/index.cjs72.js +1 -1
  90. package/dist/index.cjs72.js.map +1 -1
  91. package/dist/index.cjs73.js +1 -1
  92. package/dist/index.cjs73.js.map +1 -1
  93. package/dist/index.cjs74.js +1 -1
  94. package/dist/index.cjs74.js.map +1 -1
  95. package/dist/index.cjs75.js +1 -1
  96. package/dist/index.cjs75.js.map +1 -1
  97. package/dist/index.cjs76.js +1 -1
  98. package/dist/index.cjs76.js.map +1 -1
  99. package/dist/index.cjs77.js +1 -1
  100. package/dist/index.cjs77.js.map +1 -1
  101. package/dist/index.cjs78.js +1 -1
  102. package/dist/index.cjs78.js.map +1 -1
  103. package/dist/index.es14.js +1 -1
  104. package/dist/index.es15.js +8 -8
  105. package/dist/index.es16.js +1 -1
  106. package/dist/index.es183.js +7 -320
  107. package/dist/index.es183.js.map +1 -1
  108. package/dist/index.es184.js +144 -71
  109. package/dist/index.es184.js.map +1 -1
  110. package/dist/index.es185.js +12197 -3
  111. package/dist/index.es185.js.map +1 -1
  112. package/dist/index.es186.js +3 -18
  113. package/dist/index.es186.js.map +1 -1
  114. package/dist/index.es187.js +3 -13
  115. package/dist/index.es187.js.map +1 -1
  116. package/dist/index.es188.js +33 -28
  117. package/dist/index.es188.js.map +1 -1
  118. package/dist/index.es189.js +3 -7
  119. package/dist/index.es189.js.map +1 -1
  120. package/dist/index.es19.js +1 -1
  121. package/dist/index.es190.js +22 -7
  122. package/dist/index.es190.js.map +1 -1
  123. package/dist/index.es191.js +2 -150
  124. package/dist/index.es191.js.map +1 -1
  125. package/dist/index.es192.js +3 -12199
  126. package/dist/index.es192.js.map +1 -1
  127. package/dist/index.es193.js +0 -1
  128. package/dist/index.es193.js.map +1 -1
  129. package/dist/index.es194.js +34 -3
  130. package/dist/index.es194.js.map +1 -1
  131. package/dist/index.es195.js +13 -36
  132. package/dist/index.es195.js.map +1 -1
  133. package/dist/index.es196.js +16 -3
  134. package/dist/index.es196.js.map +1 -1
  135. package/dist/index.es197.js +8 -22
  136. package/dist/index.es197.js.map +1 -1
  137. package/dist/index.es198.js +323 -2
  138. package/dist/index.es198.js.map +1 -1
  139. package/dist/index.es199.js +77 -3
  140. package/dist/index.es199.js.map +1 -1
  141. package/dist/index.es200.js +5 -2
  142. package/dist/index.es200.js.map +1 -1
  143. package/dist/index.es201.js +15 -31
  144. package/dist/index.es201.js.map +1 -1
  145. package/dist/index.es202.js +11 -13
  146. package/dist/index.es202.js.map +1 -1
  147. package/dist/index.es203.js +30 -13
  148. package/dist/index.es203.js.map +1 -1
  149. package/dist/index.es204.js +4 -8
  150. package/dist/index.es204.js.map +1 -1
  151. package/dist/index.es208.js +1 -1
  152. package/dist/index.es209.js +1 -1
  153. package/dist/index.es210.js +1 -1
  154. package/dist/index.es228.js +1 -1
  155. package/dist/index.es233.js +4 -44
  156. package/dist/index.es233.js.map +1 -1
  157. package/dist/index.es234.js +45 -22
  158. package/dist/index.es234.js.map +1 -1
  159. package/dist/index.es235.js +23 -3
  160. package/dist/index.es235.js.map +1 -1
  161. package/dist/index.es236.js +6 -4
  162. package/dist/index.es236.js.map +1 -1
  163. package/dist/index.es237.js +3 -8
  164. package/dist/index.es237.js.map +1 -1
  165. package/dist/index.es239.js +1 -1
  166. package/dist/index.es242.js +1 -1
  167. package/dist/index.es245.js +1 -1
  168. package/dist/index.es248.js +2 -2
  169. package/dist/index.es250.js +1 -1
  170. package/dist/index.es253.js +1 -1
  171. package/dist/index.es254.js +1 -1
  172. package/dist/index.es257.js +4 -15
  173. package/dist/index.es257.js.map +1 -1
  174. package/dist/index.es258.js +15 -4
  175. package/dist/index.es258.js.map +1 -1
  176. package/dist/index.es259.js +2 -2
  177. package/dist/index.es26.js +1 -1
  178. package/dist/index.es52.js +4 -4
  179. package/dist/index.es56.js +1 -1
  180. package/dist/index.es58.js +11 -11
  181. package/dist/index.es60.js +2 -2
  182. package/dist/index.es61.js +2 -2
  183. package/dist/index.es67.js +27 -54
  184. package/dist/index.es67.js.map +1 -1
  185. package/dist/index.es68.js +56 -47
  186. package/dist/index.es68.js.map +1 -1
  187. package/dist/index.es69.js +46 -37
  188. package/dist/index.es69.js.map +1 -1
  189. package/dist/index.es70.js +38 -11
  190. package/dist/index.es70.js.map +1 -1
  191. package/dist/index.es71.js +10 -13
  192. package/dist/index.es71.js.map +1 -1
  193. package/dist/index.es72.js +14 -29
  194. package/dist/index.es72.js.map +1 -1
  195. package/dist/index.es73.js +29 -14
  196. package/dist/index.es73.js.map +1 -1
  197. package/dist/index.es74.js +13 -12
  198. package/dist/index.es74.js.map +1 -1
  199. package/dist/index.es75.js +13 -12
  200. package/dist/index.es75.js.map +1 -1
  201. package/dist/index.es76.js +49 -26
  202. package/dist/index.es76.js.map +1 -1
  203. package/dist/index.es77.js +58 -44
  204. package/dist/index.es77.js.map +1 -1
  205. package/dist/index.es78.js +10 -64
  206. package/dist/index.es78.js.map +1 -1
  207. package/package.json +1 -1
@@ -1,6 +1,26 @@
1
- import t from "./index.es206.js";
2
- const a = t("Object");
1
+ const a = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
2
+ function c(r) {
3
+ if (!r)
4
+ return null;
5
+ if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
6
+ return r;
7
+ const t = {};
8
+ for (const e of r.layers)
9
+ t[e.id] = e;
10
+ const f = r.layers.map((e) => {
11
+ let n = null;
12
+ "interactive" in e && (n = Object.assign({}, e), delete n.interactive);
13
+ const o = t[e.ref];
14
+ if (o) {
15
+ n = n || Object.assign({}, e), delete n.ref;
16
+ for (const i of a)
17
+ i in o && (n[i] = o[i]);
18
+ }
19
+ return n || e;
20
+ });
21
+ return { ...r, layers: f };
22
+ }
3
23
  export {
4
- a as default
24
+ c as normalizeStyle
5
25
  };
6
26
  //# sourceMappingURL=index.es235.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es235.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAeA,IAAAC,EAAU,QAAQ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es235.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"AAAA,MAAMA,IAAW,CAAC,QAAQ,UAAU,gBAAgB,WAAW,WAAW,UAAU,QAAQ;AAIrF,SAASC,EAAeC,GAAO;AAClC,MAAI,CAACA;AACM,WAAA;AAQP,MANA,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,SAEd,CAACA,EAAM;AACA,WAAAA;AAEX,QAAMC,IAAa,CAAA;AACR,aAAAC,KAASF,EAAM;AACX,IAAAC,EAAAC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAASE,MAAA;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAC,GAAGF,CAAK,GAGzC,OAAOE,EAAgB;AAIrB,UAAAC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,IAAIF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACID,EAAAE,CAAQ,IAAID,EAASC,CAAQ;AAAA,IAGzD;AACA,WAAOF,KAAmBF;AAAA,EAAA,CAC7B;AAEM,SAAA,EAAE,GAAGF,GAAO,QAAAG;AACvB;","x_google_ignoreList":[0]}
@@ -1,9 +1,11 @@
1
- function t(r) {
2
- return function(n) {
3
- return n == null ? void 0 : n[r];
1
+ import { MAX_ARRAY_INDEX as o } from "./index.es24.js";
2
+ function u(e) {
3
+ return function(t) {
4
+ var r = e(t);
5
+ return typeof r == "number" && r >= 0 && r <= o;
4
6
  };
5
7
  }
6
8
  export {
7
- t as default
9
+ u as default
8
10
  };
9
11
  //# sourceMappingURL=index.es236.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es236.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"AACA,SAAwBA,EAAgBC,GAAK;AAC3C,SAAO,SAASC,GAAK;AACnB,WAAOA,KAAO,OAAO,SAASA,EAAID,CAAG;AAAA,EAAA;AAEzC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es236.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AACtB,QAAAC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EAAA;AAEnF;","x_google_ignoreList":[0]}
@@ -1,11 +1,6 @@
1
- import { MAX_ARRAY_INDEX as o } from "./index.es24.js";
2
- function u(e) {
3
- return function(t) {
4
- var r = e(t);
5
- return typeof r == "number" && r >= 0 && r <= o;
6
- };
7
- }
1
+ import t from "./index.es206.js";
2
+ const a = t("Object");
8
3
  export {
9
- u as default
4
+ a as default
10
5
  };
11
6
  //# sourceMappingURL=index.es237.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es237.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AACtB,QAAAC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EAAA;AAEnF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es237.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAeA,IAAAC,EAAU,QAAQ;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
1
  import { spherical as p, cartesian as x, cartesianNormalizeInPlace as z } from "./index.es240.js";
2
2
  import { tau as l, cos as v, sin as R, acos as I, epsilon as N } from "./index.es241.js";
3
- import "./index.es195.js";
3
+ import "./index.es188.js";
4
4
  function g(m, r, e, c, a, s) {
5
5
  if (e) {
6
6
  var u = v(r), o = R(r), n = c * e;
@@ -2,7 +2,7 @@ import { abs as q, epsilon as z } from "./index.es241.js";
2
2
  import X from "./index.es243.js";
3
3
  import Y from "./index.es244.js";
4
4
  import Z from "./index.es245.js";
5
- import "./index.es196.js";
5
+ import "./index.es189.js";
6
6
  import $ from "./index.es246.js";
7
7
  var S = 1e9, B = -S;
8
8
  function en(c, _, E, u) {
@@ -1,4 +1,4 @@
1
- import a from "./index.es258.js";
1
+ import a from "./index.es257.js";
2
2
  function g(f, v, h, o) {
3
3
  this.x = f, this.z = v, this.o = h, this.e = o, this.v = !1, this.n = this.p = null;
4
4
  }
@@ -4,8 +4,8 @@ import { clipExtent as F } from "./index.es242.js";
4
4
  import H from "./index.es251.js";
5
5
  import T from "./index.es252.js";
6
6
  import { degrees as i, radians as n, sqrt as I } from "./index.es241.js";
7
- import { rotateRadians as J } from "./index.es195.js";
8
- import { transformer as K } from "./index.es201.js";
7
+ import { rotateRadians as J } from "./index.es188.js";
8
+ import { transformer as K } from "./index.es194.js";
9
9
  import { fitExtent as N, fitSize as O } from "./index.es253.js";
10
10
  import w from "./index.es254.js";
11
11
  var Q = K({
@@ -1,7 +1,7 @@
1
1
  import { cartesian as Q, cartesianCross as T, cartesianDot as R, cartesianScale as g, cartesianAddInPlace as y, spherical as U } from "./index.es240.js";
2
2
  import { circleStream as $ } from "./index.es239.js";
3
3
  import { pi as v, cos as F, epsilon as x, abs as G, sqrt as b } from "./index.es241.js";
4
- import J from "./index.es258.js";
4
+ import J from "./index.es257.js";
5
5
  import m from "./index.es259.js";
6
6
  function fn(S, V) {
7
7
  var A = F(S), C = A > 0, W = G(A) > x;
@@ -1,5 +1,5 @@
1
1
  import c from "./index.es255.js";
2
- import n from "./index.es257.js";
2
+ import n from "./index.es258.js";
3
3
  function S(l, a, r) {
4
4
  var f = a[1][0] - a[0][0], m = a[1][1] - a[0][1], i = l.clipExtent && l.clipExtent();
5
5
  l.scale(150).translate([0, 0]), i != null && l.clipExtent(null), c(r, l.stream(n));
@@ -1,6 +1,6 @@
1
1
  import { cartesian as J } from "./index.es240.js";
2
2
  import { abs as B, cos as K, radians as O, sqrt as Q, asin as R, epsilon as H, atan2 as U } from "./index.es241.js";
3
- import { transformer as V } from "./index.es201.js";
3
+ import { transformer as V } from "./index.es194.js";
4
4
  var I = 16, W = K(30 * O);
5
5
  function h(e, t) {
6
6
  return +t ? Y(e, t) : X(e);
@@ -1,19 +1,8 @@
1
- import r from "./index.es256.js";
2
- var o = 1 / 0, f = o, t = -o, a = t, d = {
3
- point: u,
4
- lineStart: r,
5
- lineEnd: r,
6
- polygonStart: r,
7
- polygonEnd: r,
8
- result: function() {
9
- var n = [[o, f], [t, a]];
10
- return t = a = -(f = o = 1 / 0), n;
11
- }
12
- };
13
- function u(n, i) {
14
- n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
1
+ import { abs as n, epsilon as r } from "./index.es241.js";
2
+ function i(o, t) {
3
+ return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
15
4
  }
16
5
  export {
17
- d as default
6
+ i as default
18
7
  };
19
8
  //# sourceMappingURL=index.es257.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es257.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es257.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
@@ -1,8 +1,19 @@
1
- import { abs as n, epsilon as r } from "./index.es241.js";
2
- function i(o, t) {
3
- return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
1
+ import r from "./index.es256.js";
2
+ var o = 1 / 0, f = o, t = -o, a = t, d = {
3
+ point: u,
4
+ lineStart: r,
5
+ lineEnd: r,
6
+ polygonStart: r,
7
+ polygonEnd: r,
8
+ result: function() {
9
+ var n = [[o, f], [t, a]];
10
+ return t = a = -(f = o = 1 / 0), n;
11
+ }
12
+ };
13
+ function u(n, i) {
14
+ n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
4
15
  }
5
16
  export {
6
- i as default
17
+ d as default
7
18
  };
8
19
  //# sourceMappingURL=index.es258.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es258.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es258.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
@@ -1,8 +1,8 @@
1
1
  import A from "./index.es243.js";
2
2
  import D from "./index.es245.js";
3
3
  import { halfPi as S, epsilon as R } from "./index.es241.js";
4
- import F from "./index.es197.js";
5
- import "./index.es196.js";
4
+ import F from "./index.es190.js";
5
+ import "./index.es189.js";
6
6
  import G from "./index.es246.js";
7
7
  function T(e, p, m, v) {
8
8
  return function(g, n) {
@@ -1,5 +1,5 @@
1
1
  import { supportsDataView as e } from "./index.es24.js";
2
- import a from "./index.es235.js";
2
+ import a from "./index.es237.js";
3
3
  var p = e && a(new DataView(new ArrayBuffer(8))), i = typeof Map < "u" && a(/* @__PURE__ */ new Map());
4
4
  export {
5
5
  p as hasStringTagBug,
@@ -1,13 +1,13 @@
1
1
  import * as m from "react";
2
- import p from "./index.es67.js";
3
- import "./index.es68.js";
2
+ import p from "./index.es68.js";
4
3
  import "./index.es69.js";
5
4
  import "./index.es70.js";
6
- import i from "./index.es71.js";
7
- import "./index.es72.js";
5
+ import "./index.es71.js";
6
+ import i from "./index.es72.js";
8
7
  import "./index.es73.js";
9
8
  import "./index.es74.js";
10
9
  import "./index.es75.js";
10
+ import "./index.es78.js";
11
11
  const n = import("./index.es19.js").then((r) => r.o);
12
12
  m.forwardRef(function(o, t) {
13
13
  return p(o, t, n);
@@ -1,4 +1,4 @@
1
- import { coordEach as u } from "./index.es191.js";
1
+ import { coordEach as u } from "./index.es184.js";
2
2
  function n(t) {
3
3
  var i = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
4
4
  return u(t, function(f) {
@@ -1,18 +1,18 @@
1
- import O from "./index.es190.js";
2
- import { GeoJSONReader as q, BufferOp as A, GeoJSONWriter as F } from "./index.es192.js";
3
- import { featureEach as v, geomEach as d } from "./index.es191.js";
1
+ import O from "./index.es183.js";
2
+ import { GeoJSONReader as q, BufferOp as A, GeoJSONWriter as F } from "./index.es185.js";
3
+ import { featureEach as v, geomEach as d } from "./index.es184.js";
4
+ import "./index.es186.js";
5
+ import "./index.es187.js";
6
+ import "./index.es188.js";
7
+ import "./index.es189.js";
8
+ import "./index.es190.js";
9
+ import "./index.es191.js";
10
+ import "./index.es192.js";
4
11
  import "./index.es193.js";
5
12
  import "./index.es194.js";
6
13
  import "./index.es195.js";
7
- import "./index.es196.js";
14
+ import R from "./index.es196.js";
8
15
  import "./index.es197.js";
9
- import "./index.es198.js";
10
- import "./index.es199.js";
11
- import "./index.es200.js";
12
- import "./index.es201.js";
13
- import "./index.es202.js";
14
- import R from "./index.es203.js";
15
- import "./index.es204.js";
16
16
  import { featureCollection as c, radiansToLength as g, lengthToRadians as B, feature as J, earthRadius as S } from "./index.es54.js";
17
17
  function Y(r, e, t) {
18
18
  t = t || {};
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var a = { exports: {} };
2
2
  export {
3
- e as __module
3
+ a as __module
4
4
  };
5
5
  //# sourceMappingURL=index.es60.js.map
@@ -1,5 +1,5 @@
1
- var a = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- a as __module
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=index.es61.js.map
@@ -1,58 +1,31 @@
1
- import * as l from "react";
2
- import { useContext as b, useState as E, useRef as c, useEffect as x, useImperativeHandle as w, useMemo as y } from "react";
3
- import { MountedMapsContext as L } from "./index.es75.js";
4
- import m from "./index.es183.js";
5
- import I from "./index.es184.js";
6
- import C from "./index.es185.js";
7
- import g from "./index.es186.js";
8
- const R = l.createContext(null);
9
- function A(e, f, d) {
10
- const o = b(L), [i, p] = E(null), s = c(), { current: a } = c({ mapLib: null, map: null });
11
- x(() => {
12
- const v = e.mapLib;
13
- let u = !0, n;
14
- return Promise.resolve(v || d).then((r) => {
15
- if (!u)
16
- return;
17
- if (!r)
18
- throw new Error("Invalid mapLib");
19
- const t = "Map" in r ? r : r.default;
20
- if (!t.Map)
21
- throw new Error("Invalid mapLib");
22
- if (g(t, e), !t.supported || t.supported(e))
23
- e.reuseMaps && (n = m.reuse(e, s.current)), n || (n = new m(t.Map, e, s.current)), a.map = I(n), a.mapLib = t, p(n), o == null || o.onMapMount(a.map, e.id);
24
- else
25
- throw new Error("Map is not supported by this browser");
26
- }).catch((r) => {
27
- const { onError: t } = e;
28
- t ? t({
29
- type: "error",
30
- target: null,
31
- originalEvent: null,
32
- error: r
33
- }) : console.error(r);
34
- }), () => {
35
- u = !1, n && (o == null || o.onMapUnmount(e.id), e.reuseMaps ? n.recycle() : n.destroy());
36
- };
37
- }, []), C(() => {
38
- i && i.setProps(e);
39
- }), w(f, () => a.map, [i]);
40
- const M = y(() => ({
41
- position: "relative",
42
- width: "100%",
43
- height: "100%",
44
- ...e.style
45
- }), [e.style]), h = {
46
- height: "100%"
47
- };
48
- return l.createElement("div", { id: e.id, ref: s, style: M }, i && l.createElement(
49
- R.Provider,
50
- { value: a },
51
- l.createElement("div", { "mapboxgl-children": "", style: h }, e.children)
52
- ));
1
+ import { __exports as a } from "./index.es205.js";
2
+ function i(r, s) {
3
+ for (var o = 0; o < s.length; o++) {
4
+ const e = s[o];
5
+ if (typeof e != "string" && !Array.isArray(e)) {
6
+ for (const t in e)
7
+ if (t !== "default" && !(t in r)) {
8
+ const n = Object.getOwnPropertyDescriptor(e, t);
9
+ n && Object.defineProperty(r, t, n.get ? n : {
10
+ enumerable: !0,
11
+ get: () => e[t]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
53
17
  }
18
+ var f = a.printMsg = function() {
19
+ console.log("This is a message from the demo package");
20
+ };
21
+ const p = /* @__PURE__ */ i({
22
+ __proto__: null,
23
+ default: a,
24
+ printMsg: f
25
+ }, [a]);
54
26
  export {
55
- R as MapContext,
56
- A as default
27
+ a as default,
28
+ p as i,
29
+ f as printMsg
57
30
  };
58
31
  //# sourceMappingURL=index.es67.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es67.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useRef, useEffect, useContext, useMemo, useImperativeHandle } from 'react';\nimport { MountedMapsContext } from './use-map';\nimport Mapbox from '../mapbox/mapbox';\nimport createRef from '../mapbox/create-ref';\nimport useIsomorphicLayoutEffect from '../utils/use-isomorphic-layout-effect';\nimport setGlobals from '../utils/set-globals';\nexport const MapContext = React.createContext(null);\nexport default function Map(props, ref, defaultLib) {\n const mountedMapsContext = useContext(MountedMapsContext);\n const [mapInstance, setMapInstance] = useState(null);\n const containerRef = useRef();\n const { current: contextValue } = useRef({ mapLib: null, map: null });\n useEffect(() => {\n const mapLib = props.mapLib;\n let isMounted = true;\n let mapbox;\n Promise.resolve(mapLib || defaultLib)\n .then((module) => {\n if (!isMounted) {\n return;\n }\n if (!module) {\n throw new Error('Invalid mapLib');\n }\n const mapboxgl = 'Map' in module ? module : module.default;\n if (!mapboxgl.Map) {\n throw new Error('Invalid mapLib');\n }\n // workerUrl & workerClass may change the result of supported()\n // https://github.com/visgl/react-map-gl/discussions/2027\n setGlobals(mapboxgl, props);\n if (!mapboxgl.supported || mapboxgl.supported(props)) {\n if (props.reuseMaps) {\n mapbox = Mapbox.reuse(props, containerRef.current);\n }\n if (!mapbox) {\n mapbox = new Mapbox(mapboxgl.Map, props, containerRef.current);\n }\n contextValue.map = createRef(mapbox);\n contextValue.mapLib = mapboxgl;\n setMapInstance(mapbox);\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapMount(contextValue.map, props.id);\n }\n else {\n throw new Error('Map is not supported by this browser');\n }\n })\n .catch(error => {\n const { onError } = props;\n if (onError) {\n onError({\n type: 'error',\n target: null,\n originalEvent: null,\n error\n });\n }\n else {\n console.error(error); // eslint-disable-line\n }\n });\n return () => {\n isMounted = false;\n if (mapbox) {\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapUnmount(props.id);\n if (props.reuseMaps) {\n mapbox.recycle();\n }\n else {\n mapbox.destroy();\n }\n }\n };\n }, []);\n useIsomorphicLayoutEffect(() => {\n if (mapInstance) {\n mapInstance.setProps(props);\n }\n });\n useImperativeHandle(ref, () => contextValue.map, [mapInstance]);\n const style = useMemo(() => ({\n position: 'relative',\n width: '100%',\n height: '100%',\n ...props.style\n }), [props.style]);\n const CHILD_CONTAINER_STYLE = {\n height: '100%'\n };\n return (React.createElement(\"div\", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(MapContext.Provider, { value: contextValue },\n React.createElement(\"div\", { \"mapboxgl-children\": \"\", style: CHILD_CONTAINER_STYLE }, props.children)))));\n}\n//# sourceMappingURL=map.js.map"],"names":["MapContext","React","Map","props","ref","defaultLib","mountedMapsContext","useContext","MountedMapsContext","mapInstance","setMapInstance","useState","containerRef","useRef","contextValue","useEffect","mapLib","isMounted","mapbox","module","mapboxgl","setGlobals","Mapbox","createRef","error","onError","useIsomorphicLayoutEffect","useImperativeHandle","style","useMemo","CHILD_CONTAINER_STYLE"],"mappings":";;;;;;;AAOa,MAAAA,IAAaC,EAAM,cAAc,IAAI;AAC1B,SAAAC,EAAIC,GAAOC,GAAKC,GAAY;AAC1C,QAAAC,IAAqBC,EAAWC,CAAkB,GAClD,CAACC,GAAaC,CAAc,IAAIC,EAAS,IAAI,GAC7CC,IAAeC,KACf,EAAE,SAASC,EAAA,IAAiBD,EAAO,EAAE,QAAQ,MAAM,KAAK,KAAA,CAAM;AACpE,EAAAE,EAAU,MAAM;AACZ,UAAMC,IAASb,EAAM;AACrB,QAAIc,IAAY,IACZC;AACJ,mBAAQ,QAAQF,KAAUX,CAAU,EAC/B,KAAK,CAACc,MAAW;AAClB,UAAI,CAACF;AACD;AAEJ,UAAI,CAACE;AACK,cAAA,IAAI,MAAM,gBAAgB;AAEpC,YAAMC,IAAW,SAASD,IAASA,IAASA,EAAO;AAC/C,UAAA,CAACC,EAAS;AACJ,cAAA,IAAI,MAAM,gBAAgB;AAKpC,UADAC,EAAWD,GAAUjB,CAAK,GACtB,CAACiB,EAAS,aAAaA,EAAS,UAAUjB,CAAK;AAC/C,QAAIA,EAAM,cACNe,IAASI,EAAO,MAAMnB,GAAOS,EAAa,OAAO,IAEhDM,MACDA,IAAS,IAAII,EAAOF,EAAS,KAAKjB,GAAOS,EAAa,OAAO,IAEpDE,EAAA,MAAMS,EAAUL,CAAM,GACnCJ,EAAa,SAASM,GACtBV,EAAeQ,CAAM,GACEZ,KAAA,QAAiDA,EAAmB,WAAWQ,EAAa,KAAKX,EAAM,EAAE;AAAA;AAG1H,cAAA,IAAI,MAAM,sCAAsC;AAAA,IAC1D,CACH,EACI,MAAM,CAASqB,MAAA;AACV,YAAA,EAAE,SAAAC,EAAY,IAAAtB;AACpB,MAAIsB,IACQA,EAAA;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,eAAe;AAAA,QACf,OAAAD;AAAA,MAAA,CACH,IAGD,QAAQ,MAAMA,CAAK;AAAA,IACvB,CACH,GACM,MAAM;AACG,MAAAP,IAAA,IACRC,MACAZ,KAAuB,QAAiDA,EAAmB,aAAaH,EAAM,EAAE,GAC5GA,EAAM,YACNe,EAAO,QAAQ,IAGfA,EAAO,QAAQ;AAAA,IAEvB;AAAA,EAER,GAAG,CAAE,CAAA,GACLQ,EAA0B,MAAM;AAC5B,IAAIjB,KACAA,EAAY,SAASN,CAAK;AAAA,EAC9B,CACH,GACDwB,EAAoBvB,GAAK,MAAMU,EAAa,KAAK,CAACL,CAAW,CAAC;AACxD,QAAAmB,IAAQC,EAAQ,OAAO;AAAA,IACzB,UAAU;AAAA,IACV,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,GAAG1B,EAAM;AAAA,EACT,IAAA,CAACA,EAAM,KAAK,CAAC,GACX2B,IAAwB;AAAA,IAC1B,QAAQ;AAAA,EAAA;AAEZ,SAAQ7B,EAAM,cAAc,OAAO,EAAE,IAAIE,EAAM,IAAI,KAAKS,GAAc,OAAAgB,EAAgB,GAAAnB,KAAgBR,EAAM;AAAA,IAAcD,EAAW;AAAA,IAAU,EAAE,OAAOc,EAAa;AAAA,IACjKb,EAAM,cAAc,OAAO,EAAE,qBAAqB,IAAI,OAAO6B,EAAA,GAAyB3B,EAAM,QAAQ;AAAA,EAAA,CAAG;AAC/G;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es67.js","sources":["../../../node_modules/mapbox-gl/index.js"],"sourcesContent":["exports.printMsg = function() {\r\n console.log(\"This is a message from the demo package\");\r\n }"],"names":["printMsg","mapboxGl"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAAC,EAAA,WAAmB,WAAW;AAC1B,UAAQ,IAAI,yCAAyC;AACvD;;;;;;","x_google_ignoreList":[0]}
@@ -1,49 +1,58 @@
1
- import * as k from "react";
2
- import { memo as A, forwardRef as P, useContext as C, useRef as D, useMemo as M, useEffect as h, useImperativeHandle as y } from "react";
3
- import { createPortal as w } from "react-dom";
4
- import { applyReactStyle as x } from "./index.es187.js";
5
- import { MapContext as O } from "./index.es67.js";
6
- import { arePointsEqual as S } from "./index.es188.js";
7
- function q(o, E) {
8
- const { map: R, mapLib: b } = C(O), i = D({ props: o });
9
- i.current.props = o;
10
- const t = M(() => {
11
- let L = !1;
12
- k.Children.forEach(o.children, (a) => {
13
- a && (L = !0);
14
- });
15
- const _ = {
16
- ...o,
17
- element: L ? document.createElement("div") : null
18
- }, l = new b.Marker(_);
19
- return l.setLngLat([o.longitude, o.latitude]), l.getElement().addEventListener("click", (a) => {
20
- var n, e;
21
- (e = (n = i.current.props).onClick) === null || e === void 0 || e.call(n, {
22
- type: "click",
23
- target: l,
24
- originalEvent: a
25
- });
26
- }), l.on("dragstart", (a) => {
27
- var n, e;
28
- const r = a;
29
- r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDragStart) === null || e === void 0 || e.call(n, r);
30
- }), l.on("drag", (a) => {
31
- var n, e;
32
- const r = a;
33
- r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDrag) === null || e === void 0 || e.call(n, r);
34
- }), l.on("dragend", (a) => {
35
- var n, e;
36
- const r = a;
37
- r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDragEnd) === null || e === void 0 || e.call(n, r);
38
- }), l;
39
- }, []);
40
- h(() => (t.addTo(R.getMap()), () => {
41
- t.remove();
42
- }), []);
43
- const { longitude: c, latitude: s, offset: g, style: m, draggable: u = !1, popup: d = null, rotation: f = 0, rotationAlignment: v = "auto", pitchAlignment: p = "auto" } = o;
44
- return h(() => {
45
- x(t.getElement(), m);
46
- }, [m]), y(E, () => t, []), (t.getLngLat().lng !== c || t.getLngLat().lat !== s) && t.setLngLat([c, s]), g && !S(t.getOffset(), g) && t.setOffset(g), t.isDraggable() !== u && t.setDraggable(u), t.getRotation() !== f && t.setRotation(f), t.getRotationAlignment() !== v && t.setRotationAlignment(v), t.getPitchAlignment() !== p && t.setPitchAlignment(p), t.getPopup() !== d && t.setPopup(d), w(o.children, t.getElement());
1
+ import * as l from "react";
2
+ import { useContext as b, useState as E, useRef as c, useEffect as x, useImperativeHandle as w, useMemo as y } from "react";
3
+ import { MountedMapsContext as L } from "./index.es78.js";
4
+ import m from "./index.es198.js";
5
+ import I from "./index.es199.js";
6
+ import C from "./index.es200.js";
7
+ import g from "./index.es201.js";
8
+ const R = l.createContext(null);
9
+ function A(e, f, d) {
10
+ const o = b(L), [i, p] = E(null), s = c(), { current: a } = c({ mapLib: null, map: null });
11
+ x(() => {
12
+ const v = e.mapLib;
13
+ let u = !0, n;
14
+ return Promise.resolve(v || d).then((r) => {
15
+ if (!u)
16
+ return;
17
+ if (!r)
18
+ throw new Error("Invalid mapLib");
19
+ const t = "Map" in r ? r : r.default;
20
+ if (!t.Map)
21
+ throw new Error("Invalid mapLib");
22
+ if (g(t, e), !t.supported || t.supported(e))
23
+ e.reuseMaps && (n = m.reuse(e, s.current)), n || (n = new m(t.Map, e, s.current)), a.map = I(n), a.mapLib = t, p(n), o == null || o.onMapMount(a.map, e.id);
24
+ else
25
+ throw new Error("Map is not supported by this browser");
26
+ }).catch((r) => {
27
+ const { onError: t } = e;
28
+ t ? t({
29
+ type: "error",
30
+ target: null,
31
+ originalEvent: null,
32
+ error: r
33
+ }) : console.error(r);
34
+ }), () => {
35
+ u = !1, n && (o == null || o.onMapUnmount(e.id), e.reuseMaps ? n.recycle() : n.destroy());
36
+ };
37
+ }, []), C(() => {
38
+ i && i.setProps(e);
39
+ }), w(f, () => a.map, [i]);
40
+ const M = y(() => ({
41
+ position: "relative",
42
+ width: "100%",
43
+ height: "100%",
44
+ ...e.style
45
+ }), [e.style]), h = {
46
+ height: "100%"
47
+ };
48
+ return l.createElement("div", { id: e.id, ref: s, style: M }, i && l.createElement(
49
+ R.Provider,
50
+ { value: a },
51
+ l.createElement("div", { "mapboxgl-children": "", style: h }, e.children)
52
+ ));
47
53
  }
48
- A(P(q));
54
+ export {
55
+ R as MapContext,
56
+ A as default
57
+ };
49
58
  //# sourceMappingURL=index.es68.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es68.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/marker.js"],"sourcesContent":["/* global document */\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { useImperativeHandle, useEffect, useMemo, useRef, useContext, forwardRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport { MapContext } from './map';\nimport { arePointsEqual } from '../utils/deep-equal';\n/* eslint-disable complexity,max-statements */\nfunction Marker(props, ref) {\n const { map, mapLib } = useContext(MapContext);\n const thisRef = useRef({ props });\n thisRef.current.props = props;\n const marker = useMemo(() => {\n let hasChildren = false;\n React.Children.forEach(props.children, el => {\n if (el) {\n hasChildren = true;\n }\n });\n const options = {\n ...props,\n element: hasChildren ? document.createElement('div') : null\n };\n const mk = new mapLib.Marker(options);\n mk.setLngLat([props.longitude, props.latitude]);\n mk.getElement().addEventListener('click', (e) => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, {\n type: 'click',\n target: mk,\n originalEvent: e\n });\n });\n mk.on('dragstart', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDragStart) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n mk.on('drag', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDrag) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n mk.on('dragend', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDragEnd) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n return mk;\n }, []);\n useEffect(() => {\n marker.addTo(map.getMap());\n return () => {\n marker.remove();\n };\n }, []);\n const { longitude, latitude, offset, style, draggable = false, popup = null, rotation = 0, rotationAlignment = 'auto', pitchAlignment = 'auto' } = props;\n useEffect(() => {\n applyReactStyle(marker.getElement(), style);\n }, [style]);\n useImperativeHandle(ref, () => marker, []);\n if (marker.getLngLat().lng !== longitude || marker.getLngLat().lat !== latitude) {\n marker.setLngLat([longitude, latitude]);\n }\n if (offset && !arePointsEqual(marker.getOffset(), offset)) {\n marker.setOffset(offset);\n }\n if (marker.isDraggable() !== draggable) {\n marker.setDraggable(draggable);\n }\n if (marker.getRotation() !== rotation) {\n marker.setRotation(rotation);\n }\n if (marker.getRotationAlignment() !== rotationAlignment) {\n marker.setRotationAlignment(rotationAlignment);\n }\n if (marker.getPitchAlignment() !== pitchAlignment) {\n marker.setPitchAlignment(pitchAlignment);\n }\n if (marker.getPopup() !== popup) {\n marker.setPopup(popup);\n }\n return createPortal(props.children, marker.getElement());\n}\nexport default memo(forwardRef(Marker));\n//# sourceMappingURL=marker.js.map"],"names":["Marker","props","ref","map","mapLib","useContext","MapContext","thisRef","useRef","marker","useMemo","hasChildren","React","el","options","mk","e","_a","_b","evt","useEffect","longitude","latitude","offset","style","draggable","popup","rotation","rotationAlignment","pitchAlignment","applyReactStyle","useImperativeHandle","arePointsEqual","createPortal","memo","forwardRef"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es68.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useRef, useEffect, useContext, useMemo, useImperativeHandle } from 'react';\nimport { MountedMapsContext } from './use-map';\nimport Mapbox from '../mapbox/mapbox';\nimport createRef from '../mapbox/create-ref';\nimport useIsomorphicLayoutEffect from '../utils/use-isomorphic-layout-effect';\nimport setGlobals from '../utils/set-globals';\nexport const MapContext = React.createContext(null);\nexport default function Map(props, ref, defaultLib) {\n const mountedMapsContext = useContext(MountedMapsContext);\n const [mapInstance, setMapInstance] = useState(null);\n const containerRef = useRef();\n const { current: contextValue } = useRef({ mapLib: null, map: null });\n useEffect(() => {\n const mapLib = props.mapLib;\n let isMounted = true;\n let mapbox;\n Promise.resolve(mapLib || defaultLib)\n .then((module) => {\n if (!isMounted) {\n return;\n }\n if (!module) {\n throw new Error('Invalid mapLib');\n }\n const mapboxgl = 'Map' in module ? module : module.default;\n if (!mapboxgl.Map) {\n throw new Error('Invalid mapLib');\n }\n // workerUrl & workerClass may change the result of supported()\n // https://github.com/visgl/react-map-gl/discussions/2027\n setGlobals(mapboxgl, props);\n if (!mapboxgl.supported || mapboxgl.supported(props)) {\n if (props.reuseMaps) {\n mapbox = Mapbox.reuse(props, containerRef.current);\n }\n if (!mapbox) {\n mapbox = new Mapbox(mapboxgl.Map, props, containerRef.current);\n }\n contextValue.map = createRef(mapbox);\n contextValue.mapLib = mapboxgl;\n setMapInstance(mapbox);\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapMount(contextValue.map, props.id);\n }\n else {\n throw new Error('Map is not supported by this browser');\n }\n })\n .catch(error => {\n const { onError } = props;\n if (onError) {\n onError({\n type: 'error',\n target: null,\n originalEvent: null,\n error\n });\n }\n else {\n console.error(error); // eslint-disable-line\n }\n });\n return () => {\n isMounted = false;\n if (mapbox) {\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapUnmount(props.id);\n if (props.reuseMaps) {\n mapbox.recycle();\n }\n else {\n mapbox.destroy();\n }\n }\n };\n }, []);\n useIsomorphicLayoutEffect(() => {\n if (mapInstance) {\n mapInstance.setProps(props);\n }\n });\n useImperativeHandle(ref, () => contextValue.map, [mapInstance]);\n const style = useMemo(() => ({\n position: 'relative',\n width: '100%',\n height: '100%',\n ...props.style\n }), [props.style]);\n const CHILD_CONTAINER_STYLE = {\n height: '100%'\n };\n return (React.createElement(\"div\", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(MapContext.Provider, { value: contextValue },\n React.createElement(\"div\", { \"mapboxgl-children\": \"\", style: CHILD_CONTAINER_STYLE }, props.children)))));\n}\n//# sourceMappingURL=map.js.map"],"names":["MapContext","React","Map","props","ref","defaultLib","mountedMapsContext","useContext","MountedMapsContext","mapInstance","setMapInstance","useState","containerRef","useRef","contextValue","useEffect","mapLib","isMounted","mapbox","module","mapboxgl","setGlobals","Mapbox","createRef","error","onError","useIsomorphicLayoutEffect","useImperativeHandle","style","useMemo","CHILD_CONTAINER_STYLE"],"mappings":";;;;;;;AAOa,MAAAA,IAAaC,EAAM,cAAc,IAAI;AAC1B,SAAAC,EAAIC,GAAOC,GAAKC,GAAY;AAC1C,QAAAC,IAAqBC,EAAWC,CAAkB,GAClD,CAACC,GAAaC,CAAc,IAAIC,EAAS,IAAI,GAC7CC,IAAeC,KACf,EAAE,SAASC,EAAA,IAAiBD,EAAO,EAAE,QAAQ,MAAM,KAAK,KAAA,CAAM;AACpE,EAAAE,EAAU,MAAM;AACZ,UAAMC,IAASb,EAAM;AACrB,QAAIc,IAAY,IACZC;AACJ,mBAAQ,QAAQF,KAAUX,CAAU,EAC/B,KAAK,CAACc,MAAW;AAClB,UAAI,CAACF;AACD;AAEJ,UAAI,CAACE;AACK,cAAA,IAAI,MAAM,gBAAgB;AAEpC,YAAMC,IAAW,SAASD,IAASA,IAASA,EAAO;AAC/C,UAAA,CAACC,EAAS;AACJ,cAAA,IAAI,MAAM,gBAAgB;AAKpC,UADAC,EAAWD,GAAUjB,CAAK,GACtB,CAACiB,EAAS,aAAaA,EAAS,UAAUjB,CAAK;AAC/C,QAAIA,EAAM,cACNe,IAASI,EAAO,MAAMnB,GAAOS,EAAa,OAAO,IAEhDM,MACDA,IAAS,IAAII,EAAOF,EAAS,KAAKjB,GAAOS,EAAa,OAAO,IAEpDE,EAAA,MAAMS,EAAUL,CAAM,GACnCJ,EAAa,SAASM,GACtBV,EAAeQ,CAAM,GACEZ,KAAA,QAAiDA,EAAmB,WAAWQ,EAAa,KAAKX,EAAM,EAAE;AAAA;AAG1H,cAAA,IAAI,MAAM,sCAAsC;AAAA,IAC1D,CACH,EACI,MAAM,CAASqB,MAAA;AACV,YAAA,EAAE,SAAAC,EAAY,IAAAtB;AACpB,MAAIsB,IACQA,EAAA;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,eAAe;AAAA,QACf,OAAAD;AAAA,MAAA,CACH,IAGD,QAAQ,MAAMA,CAAK;AAAA,IACvB,CACH,GACM,MAAM;AACG,MAAAP,IAAA,IACRC,MACAZ,KAAuB,QAAiDA,EAAmB,aAAaH,EAAM,EAAE,GAC5GA,EAAM,YACNe,EAAO,QAAQ,IAGfA,EAAO,QAAQ;AAAA,IAEvB;AAAA,EAER,GAAG,CAAE,CAAA,GACLQ,EAA0B,MAAM;AAC5B,IAAIjB,KACAA,EAAY,SAASN,CAAK;AAAA,EAC9B,CACH,GACDwB,EAAoBvB,GAAK,MAAMU,EAAa,KAAK,CAACL,CAAW,CAAC;AACxD,QAAAmB,IAAQC,EAAQ,OAAO;AAAA,IACzB,UAAU;AAAA,IACV,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,GAAG1B,EAAM;AAAA,EACT,IAAA,CAACA,EAAM,KAAK,CAAC,GACX2B,IAAwB;AAAA,IAC1B,QAAQ;AAAA,EAAA;AAEZ,SAAQ7B,EAAM,cAAc,OAAO,EAAE,IAAIE,EAAM,IAAI,KAAKS,GAAc,OAAAgB,EAAgB,GAAAnB,KAAgBR,EAAM;AAAA,IAAcD,EAAW;AAAA,IAAU,EAAE,OAAOc,EAAa;AAAA,IACjKb,EAAM,cAAc,OAAO,EAAE,qBAAqB,IAAI,OAAO6B,EAAA,GAAyB3B,EAAM,QAAQ;AAAA,EAAA,CAAG;AAC/G;","x_google_ignoreList":[0]}