@carto/ps-react-maps 1.1.0 → 1.1.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -10
- package/dist/index.js +321 -292
- package/dist/types/map-provider/index.d.ts +1 -1
- package/dist/types/map-provider/map-provider.context.d.ts +1 -0
- package/dist/types/map-provider/map-provider.hook.d.ts +10 -1
- package/dist/types/map-provider/map-provider.types.d.ts +9 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react");var De=(a=>(a.Roadmap="roadmap",a.Satellite="satellite",a.Terrain="terrain",a))(De||{}),Ae=(a=>(a.DarkMatter="dark-matter",a.Positron="positron",a.Voyager="voyager",a))(Ae||{});const br={positron:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",voyager:"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json","dark-matter":"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"},q=()=>{throw new Error("You forgot to wrap your component in <MapProvider>.")},M={state:{maps:{}},references:{current:{}},actions:{setViewState:q,setBasemap:q,setResize:q,setZoom:q}},ne=h.createContext(M.state),Rr=h.createContext(M.references),ae=h.createContext(M.actions);var D=(a=>(a.SetViewState="SetViewState",a.SetBasemap="SetBasemap",a.SetResize="SetResize",a.SetZoom="SetZoom",a))(D||{});function Ie(a,{type:y,payload:_}){return{SetViewState:()=>{const{id:u,viewState:E}=_,f={...a.maps};return f[u]={...a.maps[u],viewState:E},{...a,maps:f}},SetResize:()=>{const{id:u,width:E,height:f}=_,S={...a.maps};return S[u]={...a.maps[u],viewState:{...a.maps[u].viewState,width:E,height:f}},{...a,maps:S}},SetBasemap:()=>{const{id:u,basemap:E}=_,f={...a.maps};return f[u]={...a.maps[u],basemap:E},{...a,maps:f}},SetZoom:()=>{const{id:u,zoom:E}=_,f={...a.maps};return f[u]={...a.maps[u],viewState:{...a.maps[u].viewState,zoom:E}},{...a,maps:f}}}[y]?.()??a}function Fe(){return h.useContext(ne)}function Me(){return h.useContext(ae)}function gr(a){const{maps:{[a]:y}}=Fe();return y}function hr(a){const{setBasemap:y,setResize:_,setViewState:C,setZoom:u}=Me();return{setBasemap:y.bind(null,a),setResize:_.bind(null,a),setViewState:C.bind(null,a),setZoom:u.bind(null,a)}}var te={exports:{}},W={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var je;function Er(){if(je)return W;je=1;var a=h,y=Symbol.for("react.element"),_=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,u=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function f(S,m,x){var b,w={},l=null,d=null;x!==void 0&&(l=""+x),m.key!==void 0&&(l=""+m.key),m.ref!==void 0&&(d=m.ref);for(b in m)C.call(m,b)&&!E.hasOwnProperty(b)&&(w[b]=m[b]);if(S&&S.defaultProps)for(b in m=S.defaultProps,m)w[b]===void 0&&(w[b]=m[b]);return{$$typeof:y,type:S,key:l,ref:d,props:w,_owner:u.current}}return W.Fragment=_,W.jsx=f,W.jsxs=f,W}var Y={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+o[
|
|
17
|
+
*/var ke;function _r(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){var a=h,y=Symbol.for("react.element"),_=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),S=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),j=Symbol.iterator,oe="@@iterator";function Ve(e){if(e===null||typeof e!="object")return null;var r=j&&e[j]||e[oe];return typeof r=="function"?r:null}var A=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];$e("error",e,t)}}function $e(e,r,t){{var n=A.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(i){return String(i)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var We=!1,Ye=!1,Le=!1,Be=!1,Ne=!1,ie;ie=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===E||Ne||e===u||e===x||e===b||Be||e===d||We||Ye||Le||typeof e=="object"&&e!==null&&(e.$$typeof===l||e.$$typeof===w||e.$$typeof===f||e.$$typeof===S||e.$$typeof===m||e.$$typeof===ie||e.getModuleId!==void 0))}function ze(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function se(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case _:return"Portal";case E:return"Profiler";case u:return"StrictMode";case x:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S:var r=e;return se(r)+".Consumer";case f:var t=e;return se(t._context)+".Provider";case m:return ze(e,e.render,"ForwardRef");case w:var n=e.displayName||null;return n!==null?n:P(e.type)||"Memo";case l:{var s=e,c=s._payload,i=s._init;try{return P(i(c))}catch{return null}}}return null}var k=Object.assign,V=0,ue,ce,le,fe,de,ve,pe;function me(){}me.__reactDisabledLog=!0;function qe(){{if(V===0){ue=console.log,ce=console.info,le=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function Ze(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},e,{value:ue}),info:k({},e,{value:ce}),warn:k({},e,{value:le}),error:k({},e,{value:fe}),group:k({},e,{value:de}),groupCollapsed:k({},e,{value:ve}),groupEnd:k({},e,{value:pe})})}V<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=A.ReactCurrentDispatcher,J;function L(e,r,t){{if(J===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return`
|
|
18
|
+
`+J+e}}var G=!1,B;{var Je=typeof WeakMap=="function"?WeakMap:Map;B=new Je}function ye(e,r){if(!e||G)return"";{var t=B.get(e);if(t!==void 0)return t}var n;G=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=Z.current,Z.current=null,qe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){n=O}Reflect.construct(e,[],i)}else{try{i.call()}catch(O){n=O}e.call(i.prototype)}}else{try{throw Error()}catch(O){n=O}e()}}catch(O){if(O&&n&&typeof O.stack=="string"){for(var o=O.stack.split(`
|
|
19
|
+
`),g=n.stack.split(`
|
|
20
|
+
`),v=o.length-1,p=g.length-1;v>=1&&p>=0&&o[v]!==g[p];)p--;for(;v>=1&&p>=0;v--,p--)if(o[v]!==g[p]){if(v!==1||p!==1)do if(v--,p--,p<0||o[v]!==g[p]){var T=`
|
|
21
|
+
`+o[v].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,T),T}while(v>=1&&p>=0);break}}}finally{G=!1,Z.current=c,Ze(),Error.prepareStackTrace=s}var F=e?e.displayName||e.name:"",xe=F?L(F):"";return typeof e=="function"&&B.set(e,xe),xe}function Ge(e,r,t){return ye(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return ye(e,Ke(e));if(typeof e=="string")return L(e);switch(e){case x:return L("Suspense");case b:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return Ge(e.render);case w:return N(e.type,r,t);case l:{var n=e,s=n._payload,c=n._init;try{return N(c(s),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,be={},Re=A.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}function He(e,r,t,n,s){{var c=Function.call.bind(U);for(var i in e)if(c(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var g=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}o=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){o=v}o&&!(o instanceof Error)&&(z(s),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof o),z(null)),o instanceof Error&&!(o.message in be)&&(be[o.message]=!0,z(s),R("Failed %s type: %s",t,o.message),z(null))}}}var Xe=Array.isArray;function K(e){return Xe(e)}function Qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function er(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function he(e){if(er(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),ge(e)}var $=A.ReactCurrentOwner,rr={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,H;H={};function tr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ar(e,r){if(typeof e.ref=="string"&&$.current&&r&&$.current.stateNode!==r){var t=P($.current.type);H[t]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P($.current.type),e.ref),H[t]=!0)}}function or(e,r){{var t=function(){Ee||(Ee=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ir(e,r){{var t=function(){_e||(_e=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var sr=function(e,r,t,n,s,c,i){var o={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function ur(e,r,t,n,s){{var c,i={},o=null,g=null;t!==void 0&&(he(t),o=""+t),nr(r)&&(he(r.key),o=""+r.key),tr(r)&&(g=r.ref,ar(r,s));for(c in r)U.call(r,c)&&!rr.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var v=e.defaultProps;for(c in v)i[c]===void 0&&(i[c]=v[c])}if(o||g){var p=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&or(i,p),g&&ir(i,p)}return sr(e,o,g,s,n,$.current,i)}}var X=A.ReactCurrentOwner,Se=A.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Se.setExtraStackFrame(t)}else Se.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function Te(){{if(X.current){var e=P(X.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function cr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var
|
|
25
|
+
Check your code at `+r+":"+t+"."}return""}}var Ce={};function lr(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(Ce[t])return;Ce[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+P(e._owner.type)+"."),I(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),I(null)}}function Pe(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var n=e[t];ee(n)&&we(n,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var s=Ve(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)ee(i.value)&&we(i.value,r)}}}function fr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===w))t=r.propTypes;else return;if(t){var n=P(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var s=P(r);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){I(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),I(null);break}}e.ref!==null&&(I(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}function Oe(e,r,t,n,s,c){{var i=Ue(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var g=cr(s);g?o+=g:o+=Te();var v;e===null?v="null":K(e)?v="array":e!==void 0&&e.$$typeof===y?(v="<"+(P(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,o)}var p=ur(e,r,t,s,c);if(p==null)return p;if(i){var T=r.children;if(T!==void 0)if(n)if(K(T)){for(var F=0;F<T.length;F++)Pe(T[F],e);Object.freeze&&Object.freeze(T)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pe(T,e)}return e===C?dr(p):fr(p),p}}function vr(e,r,t){return Oe(e,r,t,!0)}function pr(e,r,t){return Oe(e,r,t,!1)}var mr=pr,yr=vr;Y.Fragment=C,Y.jsx=mr,Y.jsxs=yr}()),Y}process.env.NODE_ENV==="production"?te.exports=Er():te.exports=_r();var re=te.exports;function Sr({children:a,maps:y,externalSync:_}){const[C,u]=h.useReducer(Ie,{...M.state,maps:y.reduce((l,d)=>(l[d.id]=d,l),M.state.maps)}),E=h.useRef(y.reduce((l,d)=>(l[d.id]={instanceRef:{current:null},overlayRef:{current:null}},l),{})),f=h.useCallback((l,d,j)=>{y[0].id===l&&_?.({type:d,payload:j})},[_,y]),S=h.useCallback((l,d)=>{u({type:D.SetViewState,payload:{id:l,viewState:d}}),f(l,D.SetViewState,d)},[u,f]),m=h.useCallback((l,{height:d,width:j})=>{u({type:D.SetResize,payload:{id:l,height:d,width:j}}),f(l,D.SetResize,{height:d,width:j})},[u,f]),x=h.useCallback((l,d)=>{u({type:D.SetBasemap,payload:{id:l,basemap:d}})},[u]),b=h.useCallback((l,d)=>{u({type:D.SetZoom,payload:{id:l,zoom:d}})},[u]),w=h.useRef({setViewState:S,setBasemap:x,setResize:m,setZoom:b});return re.jsx(ae.Provider,{value:w.current,children:re.jsx(Rr.Provider,{value:E,children:re.jsx(ne.Provider,{value:C,children:a})})})}exports.CartoBasemapURL=br;exports.CartoBasemapsNames=Ae;exports.GMapsBasemap=De;exports.INITIAL_STATE=M;exports.MapActionsContext=ae;exports.MapContext=ne;exports.MapProvider=Sr;exports.reducer=Ie;exports.useMap=Fe;exports.useMapActions=Me;exports.useMapActionsByID=hr;exports.useMapByID=gr;
|
package/dist/index.js
CHANGED
|
@@ -1,87 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
const
|
|
1
|
+
import De, { createContext as ne, useContext as Fe, useReducer as yr, useRef as xe, useCallback as M } from "react";
|
|
2
|
+
var Rr = /* @__PURE__ */ ((a) => (a.Roadmap = "roadmap", a.Satellite = "satellite", a.Terrain = "terrain", a))(Rr || {}), gr = /* @__PURE__ */ ((a) => (a.DarkMatter = "dark-matter", a.Positron = "positron", a.Voyager = "voyager", a))(gr || {});
|
|
3
|
+
const Cr = {
|
|
4
4
|
positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
5
5
|
voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
6
6
|
"dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
7
|
-
},
|
|
7
|
+
}, Z = () => {
|
|
8
8
|
throw new Error("You forgot to wrap your component in <MapProvider>.");
|
|
9
|
-
},
|
|
9
|
+
}, Y = {
|
|
10
10
|
state: {
|
|
11
11
|
maps: {}
|
|
12
12
|
// sync: false,
|
|
13
13
|
},
|
|
14
|
+
references: {
|
|
15
|
+
current: {}
|
|
16
|
+
},
|
|
14
17
|
actions: {
|
|
15
18
|
// toggleSync: stub,
|
|
16
|
-
setViewState:
|
|
17
|
-
setBasemap:
|
|
18
|
-
setResize:
|
|
19
|
-
setZoom:
|
|
19
|
+
setViewState: Z,
|
|
20
|
+
setBasemap: Z,
|
|
21
|
+
setResize: Z,
|
|
22
|
+
setZoom: Z
|
|
20
23
|
}
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
),
|
|
24
|
-
|
|
24
|
+
}, Ae = ne(
|
|
25
|
+
Y.state
|
|
26
|
+
), br = ne(Y.references), Ie = ne(
|
|
27
|
+
Y.actions
|
|
25
28
|
);
|
|
26
|
-
var
|
|
27
|
-
function
|
|
29
|
+
var k = /* @__PURE__ */ ((a) => (a.SetViewState = "SetViewState", a.SetBasemap = "SetBasemap", a.SetResize = "SetResize", a.SetZoom = "SetZoom", a))(k || {});
|
|
30
|
+
function hr(a, { type: y, payload: E }) {
|
|
28
31
|
return {
|
|
29
32
|
SetViewState: () => {
|
|
30
|
-
const { id: u, viewState:
|
|
31
|
-
return
|
|
33
|
+
const { id: u, viewState: h } = E, f = { ...a.maps };
|
|
34
|
+
return f[u] = {
|
|
32
35
|
...a.maps[u],
|
|
33
|
-
viewState:
|
|
36
|
+
viewState: h
|
|
34
37
|
}, {
|
|
35
38
|
...a,
|
|
36
|
-
maps:
|
|
39
|
+
maps: f
|
|
37
40
|
};
|
|
38
41
|
},
|
|
39
42
|
SetResize: () => {
|
|
40
|
-
const { id: u, width:
|
|
41
|
-
return
|
|
43
|
+
const { id: u, width: h, height: f } = E, _ = { ...a.maps };
|
|
44
|
+
return _[u] = {
|
|
42
45
|
...a.maps[u],
|
|
43
46
|
viewState: {
|
|
44
47
|
...a.maps[u].viewState,
|
|
45
|
-
width:
|
|
46
|
-
height:
|
|
48
|
+
width: h,
|
|
49
|
+
height: f
|
|
47
50
|
}
|
|
48
51
|
}, {
|
|
49
52
|
...a,
|
|
50
|
-
maps:
|
|
53
|
+
maps: _
|
|
51
54
|
};
|
|
52
55
|
},
|
|
53
56
|
SetBasemap: () => {
|
|
54
|
-
const { id: u, basemap:
|
|
55
|
-
return
|
|
57
|
+
const { id: u, basemap: h } = E, f = { ...a.maps };
|
|
58
|
+
return f[u] = {
|
|
56
59
|
...a.maps[u],
|
|
57
|
-
basemap:
|
|
60
|
+
basemap: h
|
|
58
61
|
}, {
|
|
59
62
|
...a,
|
|
60
|
-
maps:
|
|
63
|
+
maps: f
|
|
61
64
|
};
|
|
62
65
|
},
|
|
63
66
|
SetZoom: () => {
|
|
64
|
-
const { id: u, zoom:
|
|
65
|
-
return
|
|
67
|
+
const { id: u, zoom: h } = E, f = { ...a.maps };
|
|
68
|
+
return f[u] = {
|
|
66
69
|
...a.maps[u],
|
|
67
70
|
viewState: {
|
|
68
71
|
...a.maps[u].viewState,
|
|
69
|
-
zoom:
|
|
72
|
+
zoom: h
|
|
70
73
|
}
|
|
71
74
|
}, {
|
|
72
75
|
...a,
|
|
73
|
-
maps:
|
|
76
|
+
maps: f
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
|
-
}[
|
|
79
|
+
}[y]?.() ?? a;
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
81
|
+
function Er() {
|
|
82
|
+
return Fe(Ae);
|
|
80
83
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
84
|
+
function _r() {
|
|
85
|
+
return Fe(Ie);
|
|
83
86
|
}
|
|
84
|
-
|
|
87
|
+
function Pr(a) {
|
|
88
|
+
const {
|
|
89
|
+
maps: { [a]: y }
|
|
90
|
+
} = Er();
|
|
91
|
+
return y;
|
|
92
|
+
}
|
|
93
|
+
function Or(a) {
|
|
94
|
+
const { setBasemap: y, setResize: E, setViewState: w, setZoom: u } = _r();
|
|
95
|
+
return {
|
|
96
|
+
setBasemap: y.bind(null, a),
|
|
97
|
+
setResize: E.bind(null, a),
|
|
98
|
+
setViewState: w.bind(null, a),
|
|
99
|
+
setZoom: u.bind(null, a)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
var te = { exports: {} }, $ = {};
|
|
85
103
|
/**
|
|
86
104
|
* @license React
|
|
87
105
|
* react-jsx-runtime.production.min.js
|
|
@@ -91,23 +109,23 @@ var re = { exports: {} }, $ = {};
|
|
|
91
109
|
* This source code is licensed under the MIT license found in the
|
|
92
110
|
* LICENSE file in the root directory of this source tree.
|
|
93
111
|
*/
|
|
94
|
-
var
|
|
95
|
-
function
|
|
96
|
-
if (
|
|
112
|
+
var je;
|
|
113
|
+
function Sr() {
|
|
114
|
+
if (je)
|
|
97
115
|
return $;
|
|
98
|
-
|
|
99
|
-
var a =
|
|
100
|
-
function
|
|
101
|
-
var
|
|
102
|
-
O !== void 0 && (
|
|
103
|
-
for (
|
|
104
|
-
|
|
105
|
-
if (
|
|
106
|
-
for (
|
|
107
|
-
|
|
108
|
-
return { $$typeof:
|
|
116
|
+
je = 1;
|
|
117
|
+
var a = De, y = Symbol.for("react.element"), E = Symbol.for("react.fragment"), w = Object.prototype.hasOwnProperty, u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
118
|
+
function f(_, m, O) {
|
|
119
|
+
var R, T = {}, l = null, d = null;
|
|
120
|
+
O !== void 0 && (l = "" + O), m.key !== void 0 && (l = "" + m.key), m.ref !== void 0 && (d = m.ref);
|
|
121
|
+
for (R in m)
|
|
122
|
+
w.call(m, R) && !h.hasOwnProperty(R) && (T[R] = m[R]);
|
|
123
|
+
if (_ && _.defaultProps)
|
|
124
|
+
for (R in m = _.defaultProps, m)
|
|
125
|
+
T[R] === void 0 && (T[R] = m[R]);
|
|
126
|
+
return { $$typeof: y, type: _, key: l, ref: d, props: T, _owner: u.current };
|
|
109
127
|
}
|
|
110
|
-
return $.Fragment =
|
|
128
|
+
return $.Fragment = E, $.jsx = f, $.jsxs = f, $;
|
|
111
129
|
}
|
|
112
130
|
var W = {};
|
|
113
131
|
/**
|
|
@@ -119,27 +137,27 @@ var W = {};
|
|
|
119
137
|
* This source code is licensed under the MIT license found in the
|
|
120
138
|
* LICENSE file in the root directory of this source tree.
|
|
121
139
|
*/
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
return
|
|
125
|
-
var a =
|
|
126
|
-
function
|
|
140
|
+
var ke;
|
|
141
|
+
function wr() {
|
|
142
|
+
return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
143
|
+
var a = De, y = Symbol.for("react.element"), E = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), l = Symbol.for("react.lazy"), d = Symbol.for("react.offscreen"), x = Symbol.iterator, ae = "@@iterator";
|
|
144
|
+
function Ve(e) {
|
|
127
145
|
if (e === null || typeof e != "object")
|
|
128
146
|
return null;
|
|
129
|
-
var r =
|
|
147
|
+
var r = x && e[x] || e[ae];
|
|
130
148
|
return typeof r == "function" ? r : null;
|
|
131
149
|
}
|
|
132
|
-
var
|
|
133
|
-
function
|
|
150
|
+
var D = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
151
|
+
function g(e) {
|
|
134
152
|
{
|
|
135
153
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
136
154
|
t[n - 1] = arguments[n];
|
|
137
|
-
|
|
155
|
+
Me("error", e, t);
|
|
138
156
|
}
|
|
139
157
|
}
|
|
140
|
-
function
|
|
158
|
+
function Me(e, r, t) {
|
|
141
159
|
{
|
|
142
|
-
var n =
|
|
160
|
+
var n = D.ReactDebugCurrentFrame, s = n.getStackAddendum();
|
|
143
161
|
s !== "" && (r += "%s", t = t.concat([s]));
|
|
144
162
|
var c = t.map(function(i) {
|
|
145
163
|
return String(i);
|
|
@@ -147,60 +165,60 @@ function Er() {
|
|
|
147
165
|
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
148
166
|
}
|
|
149
167
|
}
|
|
150
|
-
var $e = !1, We = !1, Ye = !1,
|
|
151
|
-
|
|
152
|
-
function
|
|
153
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
168
|
+
var $e = !1, We = !1, Ye = !1, Le = !1, Ne = !1, oe;
|
|
169
|
+
oe = Symbol.for("react.module.reference");
|
|
170
|
+
function Ue(e) {
|
|
171
|
+
return !!(typeof e == "string" || typeof e == "function" || e === w || e === h || Ne || e === u || e === O || e === R || Le || e === d || $e || We || Ye || typeof e == "object" && e !== null && (e.$$typeof === l || e.$$typeof === T || e.$$typeof === f || e.$$typeof === _ || e.$$typeof === m || // This needs to include all possible module reference object
|
|
154
172
|
// types supported by any Flight configuration anywhere since
|
|
155
173
|
// we don't know which Flight build this will end up being used
|
|
156
174
|
// with.
|
|
157
|
-
e.$$typeof ===
|
|
175
|
+
e.$$typeof === oe || e.getModuleId !== void 0));
|
|
158
176
|
}
|
|
159
|
-
function
|
|
177
|
+
function ze(e, r, t) {
|
|
160
178
|
var n = e.displayName;
|
|
161
179
|
if (n)
|
|
162
180
|
return n;
|
|
163
181
|
var s = r.displayName || r.name || "";
|
|
164
182
|
return s !== "" ? t + "(" + s + ")" : t;
|
|
165
183
|
}
|
|
166
|
-
function
|
|
184
|
+
function ie(e) {
|
|
167
185
|
return e.displayName || "Context";
|
|
168
186
|
}
|
|
169
187
|
function C(e) {
|
|
170
188
|
if (e == null)
|
|
171
189
|
return null;
|
|
172
|
-
if (typeof e.tag == "number" &&
|
|
190
|
+
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
173
191
|
return e.displayName || e.name || null;
|
|
174
192
|
if (typeof e == "string")
|
|
175
193
|
return e;
|
|
176
194
|
switch (e) {
|
|
177
|
-
case
|
|
195
|
+
case w:
|
|
178
196
|
return "Fragment";
|
|
179
|
-
case
|
|
197
|
+
case E:
|
|
180
198
|
return "Portal";
|
|
181
|
-
case
|
|
199
|
+
case h:
|
|
182
200
|
return "Profiler";
|
|
183
201
|
case u:
|
|
184
202
|
return "StrictMode";
|
|
185
203
|
case O:
|
|
186
204
|
return "Suspense";
|
|
187
|
-
case
|
|
205
|
+
case R:
|
|
188
206
|
return "SuspenseList";
|
|
189
207
|
}
|
|
190
208
|
if (typeof e == "object")
|
|
191
209
|
switch (e.$$typeof) {
|
|
192
|
-
case
|
|
210
|
+
case _:
|
|
193
211
|
var r = e;
|
|
194
|
-
return
|
|
195
|
-
case
|
|
212
|
+
return ie(r) + ".Consumer";
|
|
213
|
+
case f:
|
|
196
214
|
var t = e;
|
|
197
|
-
return
|
|
198
|
-
case
|
|
199
|
-
return
|
|
200
|
-
case
|
|
215
|
+
return ie(t._context) + ".Provider";
|
|
216
|
+
case m:
|
|
217
|
+
return ze(e, e.render, "ForwardRef");
|
|
218
|
+
case T:
|
|
201
219
|
var n = e.displayName || null;
|
|
202
220
|
return n !== null ? n : C(e.type) || "Memo";
|
|
203
|
-
case
|
|
221
|
+
case l: {
|
|
204
222
|
var s = e, c = s._payload, i = s._init;
|
|
205
223
|
try {
|
|
206
224
|
return C(i(c));
|
|
@@ -211,18 +229,18 @@ function Er() {
|
|
|
211
229
|
}
|
|
212
230
|
return null;
|
|
213
231
|
}
|
|
214
|
-
var
|
|
215
|
-
function
|
|
232
|
+
var j = Object.assign, I = 0, se, ue, ce, le, fe, de, ve;
|
|
233
|
+
function pe() {
|
|
216
234
|
}
|
|
217
|
-
|
|
218
|
-
function
|
|
235
|
+
pe.__reactDisabledLog = !0;
|
|
236
|
+
function Be() {
|
|
219
237
|
{
|
|
220
|
-
if (
|
|
221
|
-
|
|
238
|
+
if (I === 0) {
|
|
239
|
+
se = console.log, ue = console.info, ce = console.warn, le = console.error, fe = console.group, de = console.groupCollapsed, ve = console.groupEnd;
|
|
222
240
|
var e = {
|
|
223
241
|
configurable: !0,
|
|
224
242
|
enumerable: !0,
|
|
225
|
-
value:
|
|
243
|
+
value: pe,
|
|
226
244
|
writable: !0
|
|
227
245
|
};
|
|
228
246
|
Object.defineProperties(console, {
|
|
@@ -235,68 +253,68 @@ function Er() {
|
|
|
235
253
|
groupEnd: e
|
|
236
254
|
});
|
|
237
255
|
}
|
|
238
|
-
|
|
256
|
+
I++;
|
|
239
257
|
}
|
|
240
258
|
}
|
|
241
|
-
function
|
|
259
|
+
function Ze() {
|
|
242
260
|
{
|
|
243
|
-
if (
|
|
261
|
+
if (I--, I === 0) {
|
|
244
262
|
var e = {
|
|
245
263
|
configurable: !0,
|
|
246
264
|
enumerable: !0,
|
|
247
265
|
writable: !0
|
|
248
266
|
};
|
|
249
267
|
Object.defineProperties(console, {
|
|
250
|
-
log:
|
|
251
|
-
value: ae
|
|
252
|
-
}),
|
|
253
|
-
info: x({}, e, {
|
|
254
|
-
value: oe
|
|
255
|
-
}),
|
|
256
|
-
warn: x({}, e, {
|
|
257
|
-
value: ie
|
|
258
|
-
}),
|
|
259
|
-
error: x({}, e, {
|
|
268
|
+
log: j({}, e, {
|
|
260
269
|
value: se
|
|
261
270
|
}),
|
|
262
|
-
|
|
271
|
+
info: j({}, e, {
|
|
263
272
|
value: ue
|
|
264
273
|
}),
|
|
265
|
-
|
|
274
|
+
warn: j({}, e, {
|
|
266
275
|
value: ce
|
|
267
276
|
}),
|
|
268
|
-
|
|
277
|
+
error: j({}, e, {
|
|
269
278
|
value: le
|
|
279
|
+
}),
|
|
280
|
+
group: j({}, e, {
|
|
281
|
+
value: fe
|
|
282
|
+
}),
|
|
283
|
+
groupCollapsed: j({}, e, {
|
|
284
|
+
value: de
|
|
285
|
+
}),
|
|
286
|
+
groupEnd: j({}, e, {
|
|
287
|
+
value: ve
|
|
270
288
|
})
|
|
271
289
|
});
|
|
272
290
|
}
|
|
273
|
-
|
|
291
|
+
I < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
274
292
|
}
|
|
275
293
|
}
|
|
276
|
-
var
|
|
277
|
-
function
|
|
294
|
+
var q = D.ReactCurrentDispatcher, J;
|
|
295
|
+
function L(e, r, t) {
|
|
278
296
|
{
|
|
279
|
-
if (
|
|
297
|
+
if (J === void 0)
|
|
280
298
|
try {
|
|
281
299
|
throw Error();
|
|
282
300
|
} catch (s) {
|
|
283
301
|
var n = s.stack.trim().match(/\n( *(at )?)/);
|
|
284
|
-
|
|
302
|
+
J = n && n[1] || "";
|
|
285
303
|
}
|
|
286
304
|
return `
|
|
287
|
-
` +
|
|
305
|
+
` + J + e;
|
|
288
306
|
}
|
|
289
307
|
}
|
|
290
|
-
var G = !1,
|
|
308
|
+
var G = !1, N;
|
|
291
309
|
{
|
|
292
310
|
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
293
|
-
|
|
311
|
+
N = new qe();
|
|
294
312
|
}
|
|
295
|
-
function
|
|
313
|
+
function me(e, r) {
|
|
296
314
|
if (!e || G)
|
|
297
315
|
return "";
|
|
298
316
|
{
|
|
299
|
-
var t =
|
|
317
|
+
var t = N.get(e);
|
|
300
318
|
if (t !== void 0)
|
|
301
319
|
return t;
|
|
302
320
|
}
|
|
@@ -305,7 +323,7 @@ function Er() {
|
|
|
305
323
|
var s = Error.prepareStackTrace;
|
|
306
324
|
Error.prepareStackTrace = void 0;
|
|
307
325
|
var c;
|
|
308
|
-
c =
|
|
326
|
+
c = q.current, q.current = null, Be();
|
|
309
327
|
try {
|
|
310
328
|
if (r) {
|
|
311
329
|
var i = function() {
|
|
@@ -342,74 +360,74 @@ function Er() {
|
|
|
342
360
|
if (P && n && typeof P.stack == "string") {
|
|
343
361
|
for (var o = P.stack.split(`
|
|
344
362
|
`), b = n.stack.split(`
|
|
345
|
-
`),
|
|
346
|
-
|
|
347
|
-
for (;
|
|
348
|
-
if (o[
|
|
349
|
-
if (
|
|
363
|
+
`), v = o.length - 1, p = b.length - 1; v >= 1 && p >= 0 && o[v] !== b[p]; )
|
|
364
|
+
p--;
|
|
365
|
+
for (; v >= 1 && p >= 0; v--, p--)
|
|
366
|
+
if (o[v] !== b[p]) {
|
|
367
|
+
if (v !== 1 || p !== 1)
|
|
350
368
|
do
|
|
351
|
-
if (
|
|
352
|
-
var
|
|
353
|
-
` + o[
|
|
354
|
-
return e.displayName &&
|
|
369
|
+
if (v--, p--, p < 0 || o[v] !== b[p]) {
|
|
370
|
+
var S = `
|
|
371
|
+
` + o[v].replace(" at new ", " at ");
|
|
372
|
+
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, S), S;
|
|
355
373
|
}
|
|
356
|
-
while (
|
|
374
|
+
while (v >= 1 && p >= 0);
|
|
357
375
|
break;
|
|
358
376
|
}
|
|
359
377
|
}
|
|
360
378
|
} finally {
|
|
361
|
-
G = !1,
|
|
379
|
+
G = !1, q.current = c, Ze(), Error.prepareStackTrace = s;
|
|
362
380
|
}
|
|
363
|
-
var
|
|
364
|
-
return typeof e == "function" &&
|
|
381
|
+
var A = e ? e.displayName || e.name : "", Oe = A ? L(A) : "";
|
|
382
|
+
return typeof e == "function" && N.set(e, Oe), Oe;
|
|
365
383
|
}
|
|
366
384
|
function Je(e, r, t) {
|
|
367
|
-
return
|
|
385
|
+
return me(e, !1);
|
|
368
386
|
}
|
|
369
|
-
function
|
|
387
|
+
function Ge(e) {
|
|
370
388
|
var r = e.prototype;
|
|
371
389
|
return !!(r && r.isReactComponent);
|
|
372
390
|
}
|
|
373
|
-
function
|
|
391
|
+
function U(e, r, t) {
|
|
374
392
|
if (e == null)
|
|
375
393
|
return "";
|
|
376
394
|
if (typeof e == "function")
|
|
377
|
-
return
|
|
395
|
+
return me(e, Ge(e));
|
|
378
396
|
if (typeof e == "string")
|
|
379
|
-
return
|
|
397
|
+
return L(e);
|
|
380
398
|
switch (e) {
|
|
381
399
|
case O:
|
|
382
|
-
return
|
|
383
|
-
case
|
|
384
|
-
return
|
|
400
|
+
return L("Suspense");
|
|
401
|
+
case R:
|
|
402
|
+
return L("SuspenseList");
|
|
385
403
|
}
|
|
386
404
|
if (typeof e == "object")
|
|
387
405
|
switch (e.$$typeof) {
|
|
388
|
-
case
|
|
406
|
+
case m:
|
|
389
407
|
return Je(e.render);
|
|
390
|
-
case
|
|
391
|
-
return
|
|
392
|
-
case
|
|
408
|
+
case T:
|
|
409
|
+
return U(e.type, r, t);
|
|
410
|
+
case l: {
|
|
393
411
|
var n = e, s = n._payload, c = n._init;
|
|
394
412
|
try {
|
|
395
|
-
return
|
|
413
|
+
return U(c(s), r, t);
|
|
396
414
|
} catch {
|
|
397
415
|
}
|
|
398
416
|
}
|
|
399
417
|
}
|
|
400
418
|
return "";
|
|
401
419
|
}
|
|
402
|
-
var
|
|
403
|
-
function
|
|
420
|
+
var z = Object.prototype.hasOwnProperty, ye = {}, Re = D.ReactDebugCurrentFrame;
|
|
421
|
+
function B(e) {
|
|
404
422
|
if (e) {
|
|
405
|
-
var r = e._owner, t =
|
|
406
|
-
|
|
423
|
+
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
424
|
+
Re.setExtraStackFrame(t);
|
|
407
425
|
} else
|
|
408
|
-
|
|
426
|
+
Re.setExtraStackFrame(null);
|
|
409
427
|
}
|
|
410
|
-
function
|
|
428
|
+
function Ke(e, r, t, n, s) {
|
|
411
429
|
{
|
|
412
|
-
var c = Function.call.bind(
|
|
430
|
+
var c = Function.call.bind(z);
|
|
413
431
|
for (var i in e)
|
|
414
432
|
if (c(e, i)) {
|
|
415
433
|
var o = void 0;
|
|
@@ -419,70 +437,70 @@ function Er() {
|
|
|
419
437
|
throw b.name = "Invariant Violation", b;
|
|
420
438
|
}
|
|
421
439
|
o = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
422
|
-
} catch (
|
|
423
|
-
o =
|
|
440
|
+
} catch (v) {
|
|
441
|
+
o = v;
|
|
424
442
|
}
|
|
425
|
-
o && !(o instanceof Error) && (
|
|
443
|
+
o && !(o instanceof Error) && (B(s), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof o), B(null)), o instanceof Error && !(o.message in ye) && (ye[o.message] = !0, B(s), g("Failed %s type: %s", t, o.message), B(null));
|
|
426
444
|
}
|
|
427
445
|
}
|
|
428
446
|
}
|
|
429
|
-
var
|
|
447
|
+
var He = Array.isArray;
|
|
430
448
|
function K(e) {
|
|
431
|
-
return
|
|
449
|
+
return He(e);
|
|
432
450
|
}
|
|
433
|
-
function
|
|
451
|
+
function Xe(e) {
|
|
434
452
|
{
|
|
435
453
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
436
454
|
return t;
|
|
437
455
|
}
|
|
438
456
|
}
|
|
439
|
-
function
|
|
457
|
+
function Qe(e) {
|
|
440
458
|
try {
|
|
441
|
-
return
|
|
459
|
+
return ge(e), !1;
|
|
442
460
|
} catch {
|
|
443
461
|
return !0;
|
|
444
462
|
}
|
|
445
463
|
}
|
|
446
|
-
function
|
|
464
|
+
function ge(e) {
|
|
447
465
|
return "" + e;
|
|
448
466
|
}
|
|
449
|
-
function
|
|
450
|
-
if (
|
|
451
|
-
return
|
|
467
|
+
function be(e) {
|
|
468
|
+
if (Qe(e))
|
|
469
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), ge(e);
|
|
452
470
|
}
|
|
453
|
-
var
|
|
471
|
+
var V = D.ReactCurrentOwner, er = {
|
|
454
472
|
key: !0,
|
|
455
473
|
ref: !0,
|
|
456
474
|
__self: !0,
|
|
457
475
|
__source: !0
|
|
458
|
-
},
|
|
476
|
+
}, he, Ee, H;
|
|
459
477
|
H = {};
|
|
460
|
-
function
|
|
461
|
-
if (
|
|
478
|
+
function rr(e) {
|
|
479
|
+
if (z.call(e, "ref")) {
|
|
462
480
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
463
481
|
if (r && r.isReactWarning)
|
|
464
482
|
return !1;
|
|
465
483
|
}
|
|
466
484
|
return e.ref !== void 0;
|
|
467
485
|
}
|
|
468
|
-
function
|
|
469
|
-
if (
|
|
486
|
+
function tr(e) {
|
|
487
|
+
if (z.call(e, "key")) {
|
|
470
488
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
471
489
|
if (r && r.isReactWarning)
|
|
472
490
|
return !1;
|
|
473
491
|
}
|
|
474
492
|
return e.key !== void 0;
|
|
475
493
|
}
|
|
476
|
-
function
|
|
477
|
-
if (typeof e.ref == "string" &&
|
|
478
|
-
var t = C(
|
|
479
|
-
H[t] || (
|
|
494
|
+
function nr(e, r) {
|
|
495
|
+
if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
|
|
496
|
+
var t = C(V.current.type);
|
|
497
|
+
H[t] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', C(V.current.type), e.ref), H[t] = !0);
|
|
480
498
|
}
|
|
481
499
|
}
|
|
482
|
-
function
|
|
500
|
+
function ar(e, r) {
|
|
483
501
|
{
|
|
484
502
|
var t = function() {
|
|
485
|
-
|
|
503
|
+
he || (he = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
486
504
|
};
|
|
487
505
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
488
506
|
get: t,
|
|
@@ -490,10 +508,10 @@ function Er() {
|
|
|
490
508
|
});
|
|
491
509
|
}
|
|
492
510
|
}
|
|
493
|
-
function
|
|
511
|
+
function or(e, r) {
|
|
494
512
|
{
|
|
495
513
|
var t = function() {
|
|
496
|
-
|
|
514
|
+
Ee || (Ee = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
497
515
|
};
|
|
498
516
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
499
517
|
get: t,
|
|
@@ -501,10 +519,10 @@ function Er() {
|
|
|
501
519
|
});
|
|
502
520
|
}
|
|
503
521
|
}
|
|
504
|
-
var
|
|
522
|
+
var ir = function(e, r, t, n, s, c, i) {
|
|
505
523
|
var o = {
|
|
506
524
|
// This tag allows us to uniquely identify this as a React Element
|
|
507
|
-
$$typeof:
|
|
525
|
+
$$typeof: y,
|
|
508
526
|
// Built-in properties that belong on the element
|
|
509
527
|
type: e,
|
|
510
528
|
key: r,
|
|
@@ -530,38 +548,38 @@ function Er() {
|
|
|
530
548
|
value: s
|
|
531
549
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
532
550
|
};
|
|
533
|
-
function
|
|
551
|
+
function sr(e, r, t, n, s) {
|
|
534
552
|
{
|
|
535
553
|
var c, i = {}, o = null, b = null;
|
|
536
|
-
t !== void 0 && (
|
|
554
|
+
t !== void 0 && (be(t), o = "" + t), tr(r) && (be(r.key), o = "" + r.key), rr(r) && (b = r.ref, nr(r, s));
|
|
537
555
|
for (c in r)
|
|
538
|
-
|
|
556
|
+
z.call(r, c) && !er.hasOwnProperty(c) && (i[c] = r[c]);
|
|
539
557
|
if (e && e.defaultProps) {
|
|
540
|
-
var
|
|
541
|
-
for (c in
|
|
542
|
-
i[c] === void 0 && (i[c] =
|
|
558
|
+
var v = e.defaultProps;
|
|
559
|
+
for (c in v)
|
|
560
|
+
i[c] === void 0 && (i[c] = v[c]);
|
|
543
561
|
}
|
|
544
562
|
if (o || b) {
|
|
545
|
-
var
|
|
546
|
-
o &&
|
|
563
|
+
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
564
|
+
o && ar(i, p), b && or(i, p);
|
|
547
565
|
}
|
|
548
|
-
return
|
|
566
|
+
return ir(e, o, b, s, n, V.current, i);
|
|
549
567
|
}
|
|
550
568
|
}
|
|
551
|
-
var X =
|
|
552
|
-
function
|
|
569
|
+
var X = D.ReactCurrentOwner, _e = D.ReactDebugCurrentFrame;
|
|
570
|
+
function F(e) {
|
|
553
571
|
if (e) {
|
|
554
|
-
var r = e._owner, t =
|
|
555
|
-
|
|
572
|
+
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
573
|
+
_e.setExtraStackFrame(t);
|
|
556
574
|
} else
|
|
557
|
-
|
|
575
|
+
_e.setExtraStackFrame(null);
|
|
558
576
|
}
|
|
559
577
|
var Q;
|
|
560
578
|
Q = !1;
|
|
561
579
|
function ee(e) {
|
|
562
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
580
|
+
return typeof e == "object" && e !== null && e.$$typeof === y;
|
|
563
581
|
}
|
|
564
|
-
function
|
|
582
|
+
function Se() {
|
|
565
583
|
{
|
|
566
584
|
if (X.current) {
|
|
567
585
|
var e = C(X.current.type);
|
|
@@ -573,7 +591,7 @@ Check the render method of \`` + e + "`.";
|
|
|
573
591
|
return "";
|
|
574
592
|
}
|
|
575
593
|
}
|
|
576
|
-
function
|
|
594
|
+
function ur(e) {
|
|
577
595
|
{
|
|
578
596
|
if (e !== void 0) {
|
|
579
597
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
@@ -584,10 +602,10 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
584
602
|
return "";
|
|
585
603
|
}
|
|
586
604
|
}
|
|
587
|
-
var
|
|
588
|
-
function
|
|
605
|
+
var we = {};
|
|
606
|
+
function cr(e) {
|
|
589
607
|
{
|
|
590
|
-
var r =
|
|
608
|
+
var r = Se();
|
|
591
609
|
if (!r) {
|
|
592
610
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
593
611
|
t && (r = `
|
|
@@ -597,39 +615,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
597
615
|
return r;
|
|
598
616
|
}
|
|
599
617
|
}
|
|
600
|
-
function
|
|
618
|
+
function Te(e, r) {
|
|
601
619
|
{
|
|
602
620
|
if (!e._store || e._store.validated || e.key != null)
|
|
603
621
|
return;
|
|
604
622
|
e._store.validated = !0;
|
|
605
|
-
var t =
|
|
606
|
-
if (
|
|
623
|
+
var t = cr(r);
|
|
624
|
+
if (we[t])
|
|
607
625
|
return;
|
|
608
|
-
|
|
626
|
+
we[t] = !0;
|
|
609
627
|
var n = "";
|
|
610
|
-
e && e._owner && e._owner !== X.current && (n = " It was passed a child from " + C(e._owner.type) + "."),
|
|
628
|
+
e && e._owner && e._owner !== X.current && (n = " It was passed a child from " + C(e._owner.type) + "."), F(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), F(null);
|
|
611
629
|
}
|
|
612
630
|
}
|
|
613
|
-
function
|
|
631
|
+
function Ce(e, r) {
|
|
614
632
|
{
|
|
615
633
|
if (typeof e != "object")
|
|
616
634
|
return;
|
|
617
635
|
if (K(e))
|
|
618
636
|
for (var t = 0; t < e.length; t++) {
|
|
619
637
|
var n = e[t];
|
|
620
|
-
ee(n) &&
|
|
638
|
+
ee(n) && Te(n, r);
|
|
621
639
|
}
|
|
622
640
|
else if (ee(e))
|
|
623
641
|
e._store && (e._store.validated = !0);
|
|
624
642
|
else if (e) {
|
|
625
|
-
var s =
|
|
643
|
+
var s = Ve(e);
|
|
626
644
|
if (typeof s == "function" && s !== e.entries)
|
|
627
645
|
for (var c = s.call(e), i; !(i = c.next()).done; )
|
|
628
|
-
ee(i.value) &&
|
|
646
|
+
ee(i.value) && Te(i.value, r);
|
|
629
647
|
}
|
|
630
648
|
}
|
|
631
649
|
}
|
|
632
|
-
function
|
|
650
|
+
function lr(e) {
|
|
633
651
|
{
|
|
634
652
|
var r = e.type;
|
|
635
653
|
if (r == null || typeof r == "string")
|
|
@@ -637,155 +655,166 @@ Check the top-level render call using <` + t + ">.");
|
|
|
637
655
|
var t;
|
|
638
656
|
if (typeof r == "function")
|
|
639
657
|
t = r.propTypes;
|
|
640
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
658
|
+
else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
|
|
641
659
|
// Inner props are checked in the reconciler.
|
|
642
|
-
r.$$typeof ===
|
|
660
|
+
r.$$typeof === T))
|
|
643
661
|
t = r.propTypes;
|
|
644
662
|
else
|
|
645
663
|
return;
|
|
646
664
|
if (t) {
|
|
647
665
|
var n = C(r);
|
|
648
|
-
|
|
666
|
+
Ke(t, e.props, "prop", n, e);
|
|
649
667
|
} else if (r.PropTypes !== void 0 && !Q) {
|
|
650
668
|
Q = !0;
|
|
651
669
|
var s = C(r);
|
|
652
|
-
|
|
670
|
+
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
653
671
|
}
|
|
654
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
672
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
655
673
|
}
|
|
656
674
|
}
|
|
657
|
-
function
|
|
675
|
+
function fr(e) {
|
|
658
676
|
{
|
|
659
677
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
660
678
|
var n = r[t];
|
|
661
679
|
if (n !== "children" && n !== "key") {
|
|
662
|
-
|
|
680
|
+
F(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), F(null);
|
|
663
681
|
break;
|
|
664
682
|
}
|
|
665
683
|
}
|
|
666
|
-
e.ref !== null && (
|
|
684
|
+
e.ref !== null && (F(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
667
685
|
}
|
|
668
686
|
}
|
|
669
|
-
function
|
|
687
|
+
function Pe(e, r, t, n, s, c) {
|
|
670
688
|
{
|
|
671
|
-
var i =
|
|
689
|
+
var i = Ue(e);
|
|
672
690
|
if (!i) {
|
|
673
691
|
var o = "";
|
|
674
692
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
675
|
-
var b =
|
|
676
|
-
b ? o += b : o +=
|
|
677
|
-
var
|
|
678
|
-
e === null ?
|
|
693
|
+
var b = ur(s);
|
|
694
|
+
b ? o += b : o += Se();
|
|
695
|
+
var v;
|
|
696
|
+
e === null ? v = "null" : K(e) ? v = "array" : e !== void 0 && e.$$typeof === y ? (v = "<" + (C(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, o);
|
|
679
697
|
}
|
|
680
|
-
var
|
|
681
|
-
if (
|
|
682
|
-
return
|
|
698
|
+
var p = sr(e, r, t, s, c);
|
|
699
|
+
if (p == null)
|
|
700
|
+
return p;
|
|
683
701
|
if (i) {
|
|
684
|
-
var
|
|
685
|
-
if (
|
|
702
|
+
var S = r.children;
|
|
703
|
+
if (S !== void 0)
|
|
686
704
|
if (n)
|
|
687
|
-
if (K(
|
|
688
|
-
for (var
|
|
689
|
-
|
|
690
|
-
Object.freeze && Object.freeze(
|
|
705
|
+
if (K(S)) {
|
|
706
|
+
for (var A = 0; A < S.length; A++)
|
|
707
|
+
Ce(S[A], e);
|
|
708
|
+
Object.freeze && Object.freeze(S);
|
|
691
709
|
} else
|
|
692
|
-
|
|
710
|
+
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
693
711
|
else
|
|
694
|
-
|
|
712
|
+
Ce(S, e);
|
|
695
713
|
}
|
|
696
|
-
return e ===
|
|
714
|
+
return e === w ? fr(p) : lr(p), p;
|
|
697
715
|
}
|
|
698
716
|
}
|
|
699
|
-
function fr(e, r, t) {
|
|
700
|
-
return Te(e, r, t, !0);
|
|
701
|
-
}
|
|
702
717
|
function dr(e, r, t) {
|
|
703
|
-
return
|
|
718
|
+
return Pe(e, r, t, !0);
|
|
704
719
|
}
|
|
705
|
-
|
|
706
|
-
|
|
720
|
+
function vr(e, r, t) {
|
|
721
|
+
return Pe(e, r, t, !1);
|
|
722
|
+
}
|
|
723
|
+
var pr = vr, mr = dr;
|
|
724
|
+
W.Fragment = w, W.jsx = pr, W.jsxs = mr;
|
|
707
725
|
}()), W;
|
|
708
726
|
}
|
|
709
|
-
process.env.NODE_ENV === "production" ?
|
|
710
|
-
var
|
|
711
|
-
function
|
|
727
|
+
process.env.NODE_ENV === "production" ? te.exports = Sr() : te.exports = wr();
|
|
728
|
+
var re = te.exports;
|
|
729
|
+
function xr({
|
|
712
730
|
children: a,
|
|
713
|
-
maps:
|
|
714
|
-
externalSync:
|
|
731
|
+
maps: y,
|
|
732
|
+
externalSync: E
|
|
715
733
|
}) {
|
|
716
|
-
const [
|
|
717
|
-
...
|
|
718
|
-
maps:
|
|
719
|
-
}),
|
|
720
|
-
(l,
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
734
|
+
const [w, u] = yr(hr, {
|
|
735
|
+
...Y.state,
|
|
736
|
+
maps: y.reduce((l, d) => (l[d.id] = d, l), Y.state.maps)
|
|
737
|
+
}), h = xe(
|
|
738
|
+
y.reduce((l, d) => (l[d.id] = {
|
|
739
|
+
instanceRef: {
|
|
740
|
+
current: null
|
|
741
|
+
},
|
|
742
|
+
overlayRef: {
|
|
743
|
+
current: null
|
|
744
|
+
}
|
|
745
|
+
}, l), {})
|
|
746
|
+
), f = M(
|
|
747
|
+
(l, d, x) => {
|
|
748
|
+
y[0].id === l && E?.({
|
|
749
|
+
type: d,
|
|
750
|
+
payload: x
|
|
724
751
|
});
|
|
725
752
|
},
|
|
726
|
-
[
|
|
727
|
-
),
|
|
728
|
-
(l,
|
|
753
|
+
[E, y]
|
|
754
|
+
), _ = M(
|
|
755
|
+
(l, d) => {
|
|
729
756
|
u({
|
|
730
|
-
type:
|
|
757
|
+
type: k.SetViewState,
|
|
731
758
|
payload: {
|
|
732
759
|
id: l,
|
|
733
|
-
viewState:
|
|
760
|
+
viewState: d
|
|
734
761
|
}
|
|
735
|
-
}),
|
|
762
|
+
}), f(l, k.SetViewState, d);
|
|
736
763
|
},
|
|
737
|
-
[u,
|
|
738
|
-
),
|
|
739
|
-
(l, { height:
|
|
764
|
+
[u, f]
|
|
765
|
+
), m = M(
|
|
766
|
+
(l, { height: d, width: x }) => {
|
|
740
767
|
u({
|
|
741
|
-
type:
|
|
768
|
+
type: k.SetResize,
|
|
742
769
|
payload: {
|
|
743
770
|
id: l,
|
|
744
|
-
height:
|
|
745
|
-
width:
|
|
771
|
+
height: d,
|
|
772
|
+
width: x
|
|
746
773
|
}
|
|
747
|
-
}),
|
|
774
|
+
}), f(l, k.SetResize, { height: d, width: x });
|
|
748
775
|
},
|
|
749
|
-
[u,
|
|
750
|
-
),
|
|
751
|
-
(l,
|
|
776
|
+
[u, f]
|
|
777
|
+
), O = M(
|
|
778
|
+
(l, d) => {
|
|
752
779
|
u({
|
|
753
|
-
type:
|
|
780
|
+
type: k.SetBasemap,
|
|
754
781
|
payload: {
|
|
755
782
|
id: l,
|
|
756
|
-
basemap:
|
|
783
|
+
basemap: d
|
|
757
784
|
}
|
|
758
785
|
});
|
|
759
786
|
},
|
|
760
787
|
[u]
|
|
761
|
-
),
|
|
762
|
-
(l,
|
|
788
|
+
), R = M(
|
|
789
|
+
(l, d) => {
|
|
763
790
|
u({
|
|
764
|
-
type:
|
|
791
|
+
type: k.SetZoom,
|
|
765
792
|
payload: {
|
|
766
793
|
id: l,
|
|
767
|
-
zoom:
|
|
794
|
+
zoom: d
|
|
768
795
|
}
|
|
769
796
|
});
|
|
770
797
|
},
|
|
771
798
|
[u]
|
|
772
|
-
),
|
|
773
|
-
setViewState:
|
|
774
|
-
setBasemap:
|
|
775
|
-
setResize:
|
|
776
|
-
setZoom:
|
|
799
|
+
), T = xe({
|
|
800
|
+
setViewState: _,
|
|
801
|
+
setBasemap: O,
|
|
802
|
+
setResize: m,
|
|
803
|
+
setZoom: R
|
|
777
804
|
});
|
|
778
|
-
return /* @__PURE__ */
|
|
805
|
+
return /* @__PURE__ */ re.jsx(Ie.Provider, { value: T.current, children: /* @__PURE__ */ re.jsx(br.Provider, { value: h, children: /* @__PURE__ */ re.jsx(Ae.Provider, { value: w, children: a }) }) });
|
|
779
806
|
}
|
|
780
807
|
export {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
808
|
+
Cr as CartoBasemapURL,
|
|
809
|
+
gr as CartoBasemapsNames,
|
|
810
|
+
Rr as GMapsBasemap,
|
|
811
|
+
Y as INITIAL_STATE,
|
|
812
|
+
Ie as MapActionsContext,
|
|
813
|
+
Ae as MapContext,
|
|
814
|
+
xr as MapProvider,
|
|
815
|
+
hr as reducer,
|
|
816
|
+
Er as useMap,
|
|
817
|
+
_r as useMapActions,
|
|
818
|
+
Or as useMapActionsByID,
|
|
819
|
+
Pr as useMapByID
|
|
791
820
|
};
|
|
@@ -2,5 +2,5 @@ export * from './map-provider.const';
|
|
|
2
2
|
export * from './map-provider.types';
|
|
3
3
|
export { INITIAL_STATE, MapContext, MapActionsContext, } from './map-provider.context';
|
|
4
4
|
export { reducer } from './map-provider.reducer';
|
|
5
|
-
export { useMap, useMapActions } from './map-provider.hook';
|
|
5
|
+
export { useMap, useMapActions, useMapByID, useMapActionsByID, } from './map-provider.hook';
|
|
6
6
|
export { MapProvider } from './map-provider.provider';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MapContextInterface } from './map-provider.types';
|
|
2
2
|
export declare const INITIAL_STATE: MapContextInterface;
|
|
3
3
|
export declare const MapContext: import("react").Context<import("./map-provider.types").MapState>;
|
|
4
|
+
export declare const MapReferencesContext: import("react").Context<import("react").MutableRefObject<import("./map-provider.types").MapReferencesState>>;
|
|
4
5
|
export declare const MapActionsContext: import("react").Context<import("./map-provider.types").MapActionsState>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { Deck } from '@deck.gl/core/typed';
|
|
1
2
|
/**
|
|
2
3
|
* Returns the current map state from the MapContext.
|
|
3
4
|
* @returns {MapContextInterface['state']} The current map state.
|
|
4
5
|
*/
|
|
5
6
|
export declare function useMap(): import("./map-provider.types").MapState;
|
|
7
|
+
export declare function useRefences(): import("react").MutableRefObject<import("./map-provider.types").MapReferencesState>;
|
|
6
8
|
/**
|
|
7
9
|
* Returns the map actions from the MapActionsContext.
|
|
8
10
|
* @returns {MapContextInterface['actions']} The map actions.
|
|
@@ -14,9 +16,16 @@ export declare function useMapActions(): import("./map-provider.types").MapActio
|
|
|
14
16
|
* @returns {MapContextInterface['state']['maps'][string]} The map with the given ID.
|
|
15
17
|
*/
|
|
16
18
|
export declare function useMapByID(id: string): import("./map-provider.types").MapsProps;
|
|
19
|
+
export declare function useMapReferencesByID(id: string): {
|
|
20
|
+
instanceRef: import("react").MutableRefObject<import("./map-provider.types").InstanceMapRef>;
|
|
21
|
+
overlayRef: import("react").MutableRefObject<import("./map-provider.types").OverlayMapRef>;
|
|
22
|
+
getDeckInstance: () => Deck | undefined;
|
|
23
|
+
getOverlayInstance: () => import("./map-provider.types").OverlayMapRef;
|
|
24
|
+
getViewState: () => any;
|
|
25
|
+
};
|
|
17
26
|
export declare function useMapActionsByID(id: string): {
|
|
18
27
|
setBasemap: (basemap: import("./map-provider.types").Basemap) => void;
|
|
19
28
|
setResize: (props: import("./map-provider.types").MapResize) => void;
|
|
20
|
-
setViewState: (viewState:
|
|
29
|
+
setViewState: (viewState: any) => void;
|
|
21
30
|
setZoom: (zoom: number) => void;
|
|
22
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
import type { PickingInfo
|
|
2
|
+
import type { PickingInfo } from '@deck.gl/core/typed';
|
|
3
3
|
import type { GoogleMapsOverlay, GoogleMapsOverlayProps } from '@deck.gl/google-maps/typed';
|
|
4
4
|
import type { DeckGLProps, DeckGLRef } from '@deck.gl/react/typed';
|
|
5
5
|
import type { StyleSpecification } from 'maplibre-gl';
|
|
@@ -41,11 +41,16 @@ export type MapResize = {
|
|
|
41
41
|
width: number | string;
|
|
42
42
|
height: number | string;
|
|
43
43
|
};
|
|
44
|
+
export type MapReferences = {
|
|
45
|
+
instanceRef: MutableRefObject<InstanceMapRef>;
|
|
46
|
+
overlayRef: MutableRefObject<OverlayMapRef>;
|
|
47
|
+
};
|
|
48
|
+
export type MapReferencesState = Record<MapsProps['id'], MapReferences>;
|
|
44
49
|
/**
|
|
45
50
|
* Actions that can be performed on the map.
|
|
46
51
|
*/
|
|
47
52
|
export type MapActionsState = {
|
|
48
|
-
setViewState: (id: MapsProps['id'], viewState:
|
|
53
|
+
setViewState: (id: MapsProps['id'], viewState: DeckGLMapsProps['viewState']) => void;
|
|
49
54
|
setResize: (id: MapsProps['id'], props: MapResize) => void;
|
|
50
55
|
setBasemap: (id: MapsProps['id'], basemap: Basemap) => void;
|
|
51
56
|
setZoom: (id: MapsProps['id'], zoom: number) => void;
|
|
@@ -55,6 +60,7 @@ export type MapActionsState = {
|
|
|
55
60
|
*/
|
|
56
61
|
export type MapContextInterface = {
|
|
57
62
|
state: MapState;
|
|
63
|
+
references: MutableRefObject<MapReferencesState>;
|
|
58
64
|
actions: MapActionsState;
|
|
59
65
|
};
|
|
60
66
|
/**
|
|
@@ -67,9 +73,7 @@ export type Basemap = (typeof GMapsBasemap)[keyof typeof GMapsBasemap] | (typeof
|
|
|
67
73
|
export type CommonProps = {
|
|
68
74
|
id: string;
|
|
69
75
|
basemap: Basemap;
|
|
70
|
-
|
|
71
|
-
overlayRef?: MutableRefObject<OverlayMapRef>;
|
|
72
|
-
} & DeckGLProps;
|
|
76
|
+
} & DeckGLProps & Partial<MapReferences>;
|
|
73
77
|
/**
|
|
74
78
|
* Properties for the maps.
|
|
75
79
|
*/
|