@carto/ps-react-maps 1.1.2-alpha.0 → 1.1.2-alpha.2

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