@arkyn/components 1.3.133 → 1.3.134

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -4743,10 +4743,10 @@ function Ew(t) {
4743
4743
  ...i
4744
4744
  } = t, o = wc(), a = ap(), [s, u] = I({});
4745
4745
  B(() => {
4746
- let h = { ...o == null ? void 0 : o.fieldErrors };
4747
- a.forEach((f) => {
4746
+ let h = {};
4747
+ o != null && o.fieldErrors && (h = o.fieldErrors), a.forEach((f) => {
4748
4748
  var C;
4749
- (C = f.data) != null && C.fieldErrors && (h = { ...h, ...f.data.fieldErrors });
4749
+ (C = f.data) != null && C.fieldErrors && f.state === "loading" && (h = { ...h, ...f.data.fieldErrors });
4750
4750
  }), JSON.stringify(h) !== JSON.stringify(s) && u(h);
4751
4751
  }, [a, o, s]);
4752
4752
  const l = Ue(null), c = ((m = l.current) == null ? void 0 : m.name) || "", d = (s == null ? void 0 : s[c]) || null, p = $d(), v = `arkynFormController ${n}`;
@@ -68,7 +68,7 @@ React keys must be passed directly to JSX without using spread:
68
68
  <circle cx="120" cy="120" opacity=".3" r="90" />
69
69
  <circle cx="120" cy="120" opacity=".2" r="110" />
70
70
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
71
- </svg>`,a=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const p=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:u,title:a,content:p};return new google.maps.marker.AdvancedMarkerElement(h)}const l={position:n,zIndex:u,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function Sp(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class eo{constructor(){Sp(eo,google.maps.OverlayView)}}var Qn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Qn||(Qn={}));const Ap=(t,e,n)=>{n.fitBounds(e.bounds)};class Lp extends eo{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new wp(r),renderer:o=new xp,onClusterClick:s=Ap}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(mt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Qn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,Qn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Bp(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Qn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Op(t){var e=_d(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new Lp(he(he({},t),{map:e}));i(o)}},[e]),r}function Pp(t){var e=t.children,n=t.options,r=Op(n);return r!==null?e(r):null}c.memo(Pp);var wa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ba={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Fp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=c.useContext(Be),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),B=D[0],b=D[1],O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useRef(null);return c.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),c.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),c.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),c.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){var _=new google.maps.InfoWindow(he({},r||{}));return d(_),K.current=document.createElement("div"),s&&b(google.maps.event.addListener(_,"closeclick",s)),a&&w(google.maps.event.addListener(_,"domready",a)),u&&R(google.maps.event.addListener(_,"content_changed",u)),l&&I(google.maps.event.addListener(_,"position_changed",l)),f&&N(google.maps.event.addListener(_,"zindex_changed",f)),_.setContent(K.current),i&&_.setPosition(i),o&&_.setZIndex(o),n?_.open(g,n):_.getPosition()?_.open(g):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p(_),function(){B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(_),_.close()}},[]),K.current?ln.createPortal(c.Children.only(e),K.current):null}c.memo(Fp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(he({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Oe({updaterMap:Ba,eventMap:wa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ba,eventMap:wa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ln.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(c.PureComponent);var xa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Sa={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Mp={};function kp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,b=c.useContext(Be),O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1];return c.useEffect(function(){E!==null&&E.setMap(b)},[b]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),c.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),c.useEffect(function(){E&&s&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),c.useEffect(function(){E&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(E,"dragend",a)))},[a]),c.useEffect(function(){E&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(E,"dragstart",u)))},[u]),c.useEffect(function(){E&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(E,"mousedown",l)))},[l]),c.useEffect(function(){E&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(E,"mousemove",f)))},[f]),c.useEffect(function(){E&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(E,"mouseout",p)))},[p]),c.useEffect(function(){E&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(E,"mouseover",h)))},[h]),c.useEffect(function(){E&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(E,"mouseup",g)))},[g]),c.useEffect(function(){E&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(E,"rightclick",y)))},[y]),c.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(E,"click",v)))},[v]),c.useEffect(function(){E&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(E,"drag",d)))},[d]),c.useEffect(function(){var ge=new google.maps.Polyline(he(he({},e||Mp),{map:b}));return o&&ge.setPath(o),typeof i<"u"&&ge.setVisible(i),typeof r<"u"&&ge.setEditable(r),typeof n<"u"&&ge.setDraggable(n),s&&R(google.maps.event.addListener(ge,"dblclick",s)),a&&I(google.maps.event.addListener(ge,"dragend",a)),u&&N(google.maps.event.addListener(ge,"dragstart",u)),l&&ie(google.maps.event.addListener(ge,"mousedown",l)),f&&H(google.maps.event.addListener(ge,"mousemove",f)),p&&ee(google.maps.event.addListener(ge,"mouseout",p)),h&&W(google.maps.event.addListener(ge,"mouseover",h)),g&&X(google.maps.event.addListener(ge,"mouseup",g)),y&&le(google.maps.event.addListener(ge,"rightclick",y)),v&&ve(google.maps.event.addListener(ge,"click",v)),d&&De(google.maps.event.addListener(ge,"drag",d)),w(ge),D&&D(ge),function(){F!==null&&google.maps.event.removeListener(F),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),B&&B(ge),ge.setMap(null)}},[]),null}c.memo(kp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Sa,eventMap:xa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Sa,eventMap:xa,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Aa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},La={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Tp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,b=t.onUnmount,O=t.onEdit,E=c.useContext(Be),w=c.useState(null),A=w[0],F=w[1],R=c.useState(null),P=R[0],z=R[1],I=c.useState(null),j=I[0],T=I[1],N=c.useState(null),K=N[0],_=N[1],ie=c.useState(null),re=ie[0],k=ie[1],H=c.useState(null),J=H[0],q=H[1],ee=c.useState(null),Y=ee[0],C=ee[1],W=c.useState(null),U=W[0],M=W[1],X=c.useState(null),te=X[0],G=X[1],le=c.useState(null),se=le[0],pe=le[1],ve=c.useState(null),Ce=ve[0],me=ve[1],De=c.useState(null),ge=De[0],Ne=De[1];return c.useEffect(function(){A!==null&&A.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),c.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),c.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),c.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),c.useEffect(function(){typeof o<"u"&&A!==null&&A.setPath(o)},[A,o]),c.useEffect(function(){typeof s<"u"&&A!==null&&A.setPaths(s)},[A,s]),c.useEffect(function(){A&&a&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(A,"dblclick",a)))},[a]),c.useEffect(function(){A&&(google.maps.event.addListener(A.getPath(),"insert_at",function(){O==null||O(A)}),google.maps.event.addListener(A.getPath(),"set_at",function(){O==null||O(A)}))},[A,O]),c.useEffect(function(){A&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(A,"dragend",u)))},[u]),c.useEffect(function(){A&&l&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),c.useEffect(function(){A&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",f)))},[f]),c.useEffect(function(){A&&p&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(A,"mousemove",p)))},[p]),c.useEffect(function(){A&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(A,"mouseout",h)))},[h]),c.useEffect(function(){A&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(A,"mouseover",g)))},[g]),c.useEffect(function(){A&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(A,"mouseup",y)))},[y]),c.useEffect(function(){A&&v&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(A,"rightclick",v)))},[v]),c.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(A,"click",d)))},[d]),c.useEffect(function(){A&&D&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),c.useEffect(function(){var ae=new google.maps.Polygon(he(he({},e||{}),{map:E}));return o&&ae.setPath(o),s&&ae.setPaths(s),typeof i<"u"&&ae.setVisible(i),typeof r<"u"&&ae.setEditable(r),typeof n<"u"&&ae.setDraggable(n),a&&z(google.maps.event.addListener(ae,"dblclick",a)),u&&T(google.maps.event.addListener(ae,"dragend",u)),l&&_(google.maps.event.addListener(ae,"dragstart",l)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),p&&q(google.maps.event.addListener(ae,"mousemove",p)),h&&C(google.maps.event.addListener(ae,"mouseout",h)),g&&M(google.maps.event.addListener(ae,"mouseover",g)),y&&G(google.maps.event.addListener(ae,"mouseup",y)),v&&pe(google.maps.event.addListener(ae,"rightclick",v)),d&&me(google.maps.event.addListener(ae,"click",d)),D&&Ne(google.maps.event.addListener(ae,"drag",D)),F(ae),B&&B(ae),function(){P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),K!==null&&google.maps.event.removeListener(K),re!==null&&google.maps.event.removeListener(re),J!==null&&google.maps.event.removeListener(J),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),te!==null&&google.maps.event.removeListener(te),se!==null&&google.maps.event.removeListener(se),Ce!==null&&google.maps.event.removeListener(Ce),b&&b(ae),ae.setMap(null)}},[]),null}c.memo(Tp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:La,eventMap:Aa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:La,eventMap:Aa,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Oa={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Pa={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Ip(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,b=t.onUnmount,O=c.useContext(Be),E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){w!==null&&w.setMap(O)},[O]),c.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),c.useEffect(function(){typeof o<"u"&&w!==null&&w.setVisible(o)},[w,o]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),c.useEffect(function(){w&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"dragend",a)))},[a]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&p&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseout",p)))},[p]),c.useEffect(function(){w&&h&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(function(){w&&g&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(w,"mouseup",g)))},[g]),c.useEffect(function(){w&&y&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(w,"rightclick",y)))},[y]),c.useEffect(function(){w&&v&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(w,"click",v)))},[v]),c.useEffect(function(){w&&d&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(function(){w&&D&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),c.useEffect(function(){var de=new google.maps.Rectangle(he(he({},e||{}),{map:O}));return typeof o<"u"&&de.setVisible(o),typeof i<"u"&&de.setEditable(i),typeof r<"u"&&de.setDraggable(r),typeof n<"u"&&de.setBounds(n),s&&P(google.maps.event.addListener(de,"dblclick",s)),a&&j(google.maps.event.addListener(de,"dragend",a)),u&&K(google.maps.event.addListener(de,"dragstart",u)),l&&re(google.maps.event.addListener(de,"mousedown",l)),f&&J(google.maps.event.addListener(de,"mousemove",f)),p&&Y(google.maps.event.addListener(de,"mouseout",p)),h&&U(google.maps.event.addListener(de,"mouseover",h)),g&&te(google.maps.event.addListener(de,"mouseup",g)),y&&se(google.maps.event.addListener(de,"rightclick",y)),v&&Ce(google.maps.event.addListener(de,"click",v)),d&&ge(google.maps.event.addListener(de,"drag",d)),D&&Ue(google.maps.event.addListener(de,"bounds_changed",D)),A(de),B&&B(de),function(){R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),b&&b(de),de.setMap(null)}},[]),null}c.memo(Ip),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Pa,eventMap:Oa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Pa,eventMap:Oa,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Fa={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ma={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},jp={};function Np(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,b=t.onRadiusChanged,O=t.onLoad,E=t.onUnmount,w=c.useContext(Be),A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1],ge=c.useState(null),Ne=ge[0],ae=ge[1],Ue=c.useState(null),de=Ue[0],we=Ue[1],Te=c.useState(null),Xe=Te[0],$e=Te[1];return c.useEffect(function(){F!==null&&F.setMap(w)},[w]),c.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),c.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),c.useEffect(function(){typeof o<"u"&&F!==null&&F.setEditable(o)},[F,o]),c.useEffect(function(){typeof s<"u"&&F!==null&&F.setVisible(s)},[F,s]),c.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),c.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),c.useEffect(function(){F&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(F,"dblclick",a)))},[a]),c.useEffect(function(){F&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(F,"dragend",u)))},[u]),c.useEffect(function(){F&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(F,"dragstart",l)))},[l]),c.useEffect(function(){F&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(F,"mousedown",f)))},[f]),c.useEffect(function(){F&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(F,"mousemove",p)))},[p]),c.useEffect(function(){F&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(F,"mouseout",h)))},[h]),c.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(F,"mouseover",g)))},[g]),c.useEffect(function(){F&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(F,"mouseup",y)))},[y]),c.useEffect(function(){F&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(F,"rightclick",v)))},[v]),c.useEffect(function(){F&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(F,"click",d)))},[d]),c.useEffect(function(){F&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(F,"drag",D)))},[D]),c.useEffect(function(){F&&B&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),c.useEffect(function(){F&&b&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(F,"radius_changed",b)))},[b]),c.useEffect(function(){var xe=new google.maps.Circle(he(he({},e||jp),{map:w}));return typeof r=="number"&&xe.setRadius(r),typeof n<"u"&&xe.setCenter(n),typeof r=="number"&&xe.setRadius(r),typeof s<"u"&&xe.setVisible(s),typeof o<"u"&&xe.setEditable(o),typeof i<"u"&&xe.setDraggable(i),a&&I(google.maps.event.addListener(xe,"dblclick",a)),u&&N(google.maps.event.addListener(xe,"dragend",u)),l&&ie(google.maps.event.addListener(xe,"dragstart",l)),f&&H(google.maps.event.addListener(xe,"mousedown",f)),p&&ee(google.maps.event.addListener(xe,"mousemove",p)),h&&W(google.maps.event.addListener(xe,"mouseout",h)),g&&X(google.maps.event.addListener(xe,"mouseover",g)),y&&le(google.maps.event.addListener(xe,"mouseup",y)),v&&ve(google.maps.event.addListener(xe,"rightclick",v)),d&&De(google.maps.event.addListener(xe,"click",d)),D&&ae(google.maps.event.addListener(xe,"drag",D)),B&&we(google.maps.event.addListener(xe,"center_changed",B)),b&&$e(google.maps.event.addListener(xe,"radius_changed",b)),R(xe),O&&O(xe),function(){z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),E&&E(xe),xe.setMap(null)}},[]),null}c.memo(Np),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ma,eventMap:Fa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ma,eventMap:Fa,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var ka={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Ta={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function _p(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,u=t.onMouseUp,l=t.onRightClick,f=t.onAddFeature,p=t.onRemoveFeature,h=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=c.useContext(Be),B=c.useState(null),b=B[0],O=B[1],E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){b!==null&&b.setMap(D)},[D]),c.useEffect(function(){b&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(b,"dblclick",r)))},[r]),c.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(b,"mousedown",i)))},[i]),c.useEffect(function(){b&&o&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),c.useEffect(function(){b&&s&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(b,"mouseout",s)))},[s]),c.useEffect(function(){b&&a&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(b,"mouseover",a)))},[a]),c.useEffect(function(){b&&u&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(b,"mouseup",u)))},[u]),c.useEffect(function(){b&&l&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",l)))},[l]),c.useEffect(function(){b&&n&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(b,"click",n)))},[n]),c.useEffect(function(){b&&f&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(b,"addfeature",f)))},[f]),c.useEffect(function(){b&&p&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(b,"removefeature",p)))},[p]),c.useEffect(function(){b&&h&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(b,"removeproperty",h)))},[h]),c.useEffect(function(){b&&g&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(b,"setgeometry",g)))},[g]),c.useEffect(function(){b&&y&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(b,"setproperty",y)))},[y]),c.useEffect(function(){if(D!==null){var de=new google.maps.Data(he(he({},e||{}),{map:D}));r&&A(google.maps.event.addListener(de,"dblclick",r)),i&&P(google.maps.event.addListener(de,"mousedown",i)),o&&j(google.maps.event.addListener(de,"mousemove",o)),s&&K(google.maps.event.addListener(de,"mouseout",s)),a&&re(google.maps.event.addListener(de,"mouseover",a)),u&&J(google.maps.event.addListener(de,"mouseup",u)),l&&Y(google.maps.event.addListener(de,"rightclick",l)),n&&U(google.maps.event.addListener(de,"click",n)),f&&te(google.maps.event.addListener(de,"addfeature",f)),p&&se(google.maps.event.addListener(de,"removefeature",p)),h&&Ce(google.maps.event.addListener(de,"removeproperty",h)),g&&ge(google.maps.event.addListener(de,"setgeometry",g)),y&&Ue(google.maps.event.addListener(de,"setproperty",y)),O(de),v&&v(de)}return function(){b&&(w!==null&&google.maps.event.removeListener(w),R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),d&&d(b),b.setMap(null))}},[]),null}c.memo(_p),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ta,eventMap:ka,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ta,eventMap:ka,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Ia={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},ja={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(he(he({},this.props.options),{map:this.context}));this.registeredEvents=Oe({updaterMap:ja,eventMap:Ia,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:ja,eventMap:Ia,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e})(c.PureComponent);function Na(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function zp(t,e){return new e(t.lat,t.lng)}function Wp(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Up(t,e,n){return t instanceof e?t:n(t,e)}function Hp(t,e,n){return t instanceof e?t:n(t,e)}function Rp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function Vp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function _a(t,e,n,r){return n!==void 0?Rp(t,e,Hp(n,google.maps.LatLngBounds,Wp)):Vp(t,e,Up(r,google.maps.LatLng,zp))}function qp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Gp(t,e,n,r,i){var o=function(s){He(a,s);function a(u,l,f,p){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=f,h.bounds=p,h}return a.prototype.onAdd=function(){var u,l=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];l==null||l.appendChild(this.container)},a.prototype.draw=function(){for(var u=this.getProjection(),l=he({},this.container?Na(this.container,i):{x:0,y:0}),f=_a(u,l,this.bounds,this.position),p=0,h=Object.entries(f);p<h.length;p++){var g=h[p],y=g[0],v=g[1];this.container.style[y]=v}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function za(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Wa(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function Zp(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,u=t.children,l=c.useContext(Be),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),p=c.useMemo(function(){return Gp(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(p),p==null||p.setMap(l),function(){s==null||s(p),p==null||p.setMap(null)}},[l,p]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Hs.createPortal(u,f)}c.memo(Zp),function(t){He(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();et(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=he({x:0,y:0},r.containerRef.current?Na(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=_a(o,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,f=u.top,p=u.width,h=u.height;qp(a,{left:l,top:f,width:p,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=za(n.position),i=za(this.props.position),o=Wa(n.bounds),s=Wa(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Hs.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Be,e}(c.PureComponent);function Yp(){}var Ua={onDblClick:"dblclick",onClick:"click"},Ha={opacity:function(t,e){t.setOpacity(e)}};function Kp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(Be),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var u=new google.maps.GroundOverlay(e,s,he({},r));return u},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",u),a.setMap(o))},[a,n]),null}c.memo(Kp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){et(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,he(he({},this.props.options),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ha,eventMap:Ua,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ha,eventMap:Ua,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:Yp},e.contextType=Be,e}(c.PureComponent);var Ra={},Va={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Xp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(Be),s=c.useState(null),a=s[0],u=s[1];return c.useEffect(function(){google.maps.visualization||et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){et(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(he(he({},i||{}),{data:e,map:o}));return u(l),n&&n(l),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(Xp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),et(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(he(he({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Oe({updaterMap:Va,eventMap:Ra,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Va,eventMap:Ra,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var qa={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ga={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Oe({updaterMap:Ga,eventMap:qa,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ga,eventMap:qa,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Be,e})(c.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){et(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(c.PureComponent);var Za={onDirectionsChanged:"directions_changed"},Ya={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Oe({updaterMap:Ya,eventMap:Za,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ya,eventMap:Za,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=Be,e})(c.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){et(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(c.PureComponent);var Ka={onPlacesChanged:"places_changed"},Xa={bounds:function(t,e){t.setBounds(e)}},Jp=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(et(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Oe({updaterMap:Xa,eventMap:Ka,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Xa,eventMap:Ka,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=Be,e}(c.PureComponent),Ja={onPlaceChanged:"place_changed"},Qa={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;et(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Oe({updaterMap:Qa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Qa,eventMap:Ja,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Pe(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Be,e})(c.PureComponent);function Qp({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(qd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(tp,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Se.MapPinned,{})})}function $p(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function eh(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,o=`arkynTableBody ${n}`,s=c.Children.count(r)===0;return x.jsx("tbody",{className:o.trim(),...i,children:s?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function th(t){const{className:e,children:n,...r}=t,i=`arkynTableCaption ${e}`;return x.jsx("caption",{className:i.trim(),...r,children:x.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function nh(t){const{children:e,className:n,...r}=t,i=`arkynTableContainer ${n}`;return x.jsx("div",{className:i.trim(),...r,children:x.jsx("table",{children:e})})}function rh(t){const{className:e,children:n,...r}=t,i=`arkynTableFooter ${e}`;return x.jsxs("tfoot",{className:i.trim(),...r,children:[x.jsx("tr",{className:"spacingRow"}),x.jsx("tr",{children:x.jsx("th",{colSpan:100,children:x.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ih(t){const{className:e,children:n,...r}=t,i=`arkynTableHeader ${e}`;return x.jsxs("thead",{className:i.trim(),...r,children:[x.jsx("tr",{children:n}),x.jsx("tr",{className:"spacingRow"})]})}function oh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:o="md",leftIcon:s,rightIcon:a,disabled:u,className:l="",children:f,...p}=t,g={xs:12,sm:16,md:20,lg:24}[o],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${o} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return x.jsxs("button",{className:d,disabled:u||e,...p,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Se.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),x.jsxs("div",{className:"arkynButtonContent",children:[Pr(g,s),f,Pr(g,a)]})]})}const $a=c.createContext({});function sh(t){var y;const{children:e,className:n,id:r,...i}=t,o=Tt.useActionData(),s=Tt.useFetchers(),[a,u]=c.useState({});c.useEffect(()=>{let v={...o==null?void 0:o.fieldErrors};s.forEach(d=>{var D;(D=d.data)!=null&&D.fieldErrors&&(v={...v,...d.data.fieldErrors})}),JSON.stringify(v)!==JSON.stringify(a)&&u(v)},[s,o,a]);const l=c.useRef(null),f=((y=l.current)==null?void 0:y.name)||"",p=(a==null?void 0:a[f])||null,h=c.useId(),g=`arkynFormController ${n}`;return x.jsx($a.Provider,{value:{error:p,id:h,inputRef:l},children:x.jsx("section",{id:r||f||void 0,className:g.trim(),...i,children:e})})}function yt(){return c.useContext($a)}function ah(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:o=!1,checked:s=null,onCheck:a,value:u,...l}=t,{id:f,inputRef:p,error:h}=yt(),g=i||!!h,[y,v]=c.useState(o||!1),d=typeof s=="boolean"?s:y,b=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const E=y;v(!E),a&&a(E?"":u||"checked")}return x.jsxs("button",{id:f,type:"button",className:b,onClick:O,...l,children:[x.jsx("input",{type:"hidden",name:e,ref:p,value:d?u||"checked":""}),x.jsx(Se.Check,{})]})}function uh(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:o}=yt();return e?x.jsx("strong",{className:i.trim(),...r,children:e}):o?x.jsx("strong",{className:i.trim(),...r,children:o}):x.jsx(x.Fragment,{})}function lh(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=yt(),s=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:s.trim(),htmlFor:i,...r})}function Gt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function to(t){return t&&t.replace(/[^0-9]/g,"")}function eu(t,e){let n="",r=0;return Array.from(t).forEach((i,o)=>{e[o+r].match(/[0-9]/)||(n+=e[o+r],r++),n+=i}),n}function tu(t){return t.length>11?"CNPJ":"CPF"}const no={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},nu=to(no.CNPJ).length;function ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,defaultValue:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,...b}=t;function O(T){let N=to(T);const K=tu(N);if(!(N.length>nu))return N=eu(N,no[K]),N}const E=f?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:f,defaultValue:O(h||""),disabled:p,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,loadingPosition:E,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...b}}function fh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,onChange:F,value:R,defaultValue:P,...z}=ch({...t,id:o,isError:u},e),[I,j]=c.useState(P),T=B&&!D,N=w&&!D,K=d==="left"&&D,_=d==="right"&&D;function ie(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function re(J){let q=to(J.target.value);const ee=tu(q);q.length>nu||(q=eu(q,no[ee]),J.target.value=q,j(q),F&&F(J))}function k(J){n(!0),O&&O(J)}function H(J){n(!1),E&&E(J)}return x.jsxs("section",{title:f,style:p,onClick:ie,className:h,children:[g,K&&A,T&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,value:R||I,onFocus:k,onChange:re,onBlur:H,...z}),N&&x.jsx(w,{size:v,strokeWidth:2.5}),_&&A,y]})}const dh=3,ph=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?dh:0),Tr=2,ru=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),ro=t=>{let e=t;return typeof t=="string"?(e=ru(t),e%1!==0&&(e=e.toFixed(Tr))):e=Number.isInteger(t)?Number(t)*10**Tr:t.toFixed(Tr),ru(e)/10**Tr},iu=(t,e,n)=>{if(!e)return[0,""];const r=ro(e),i=ph(t,r,n);return[r,i]};function hh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D=1e9,locale:B="pt-BR",currency:b="BRL",...O}=t,E=f?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,locale:B,currency:b,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D,loadingPosition:E,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}function vh(t){const[e,n]=c.useState(!1),[r,i]=c.useState("0"),o=c.useRef(null),{inputRef:s,id:a,error:u}=yt(),l=s||o,f=t.isError||!!u,{disabled:p,title:h,style:g,className:y,prefix:v,sufix:d,iconSize:D,loadingPosition:B,isLoading:b,LeftIcon:O,readOnly:E,onFocus:w,onBlur:A,RightIcon:F,Spinner:R,value:P,max:z,onChangeValue:I,onKeyPress:j,currency:T,locale:N,name:K,defaultValue:_,...ie}=hh({...t,id:a,isError:f},e),re=O&&!b,k=F&&!b,H=B==="left"&&b,J=B==="right"&&b;function q(){p||!(l!=null&&l.current)||(n(!0),l.current.focus())}function ee(M){n(!0),w&&w(M)}function Y(M){n(!1),A&&A(M)}const C=M=>{const[X,te]=iu(N,M,T);return!z||X<=z?(i(te),[X,te]):[ro(r),r]},W=M=>{M.preventDefault();const[X,te]=C(M.target.value);I(M,String(X),String(te))},U=M=>j&&j(M,M.key,M.key);return c.useEffect(()=>{const M=P||+_||void 0,[,X]=iu(N,M,T);i(X)},[T,_,P]),x.jsxs("section",{title:h,style:g,onClick:q,className:y,children:[v,H&&R,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:W,onBlur:Y,onFocus:ee,onKeyUp:U,disabled:p||b,readOnly:E,...ie}),x.jsx("input",{type:"hidden",ref:l,name:K,value:ro(r)}),J&&R,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function gh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:B=!1,type:b,...O}=t,E=f?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:E,iconSize:j,showMask:B,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}const mh=c.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function yh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,...F}=gh({...t,id:o,isError:u},e),R=B&&!D,P=w&&!D,z=d==="left"&&D,I=d==="right"&&D;function j(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function T(K){n(!0),O&&O(K)}function N(K){n(!1),E&&E(K)}return x.jsxs("section",{title:f,style:p,onClick:j,className:h,children:[g,z&&A,R&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Cd.InputMask,{component:mh,ref:a,onFocus:T,onBlur:N,disabled:l,...F}),P&&x.jsx(w,{size:v,strokeWidth:2.5}),I&&A,y]})}function Ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...B}=t,b=f?"right":"left",R=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,z={md:20,lg:20}[i];return{isLoading:n,className:R,prefix:Gt(a,z,"prefix"),sufix:Gt(u,z,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:b,iconSize:z,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...B}}function Dh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,type:A,Spinner:F,...R}=Ch({...t,id:o,isError:u},e),P=B&&!D,z=w&&!D,I=d==="left"&&D,j=d==="right"&&D;function T(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function N(_){n(!0),O&&O(_)}function K(_){n(!1),E&&E(_)}return A==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:a,...R}):x.jsxs("section",{title:f,style:p,onClick:T,className:h,children:[g,I&&F,P&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,onFocus:N,onBlur:K,type:A,...R}),z&&x.jsx(w,{size:v,strokeWidth:2.5}),j&&F,y]})}function ou(t){return t.type==="currency"?x.jsx(vh,{...t}):t.type==="masked"?x.jsx(yh,{...t}):t.type==="cpf-cnpj"?x.jsx(fh,{...t}):x.jsx(Dh,{...t})}function Eh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,o]=c.useState(null),s=u=>o(u),a=()=>{var g,y,v,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function p(D){const B=f.find(b=>b.types[0]===D);return B?B.long_name:""}function h(D){const B=f.find(b=>b.types[0]===D);return B?B.short_name:""}if(l){const D=p("route"),B=p("street_number"),b=p("sublocality_level_1"),O=p("administrative_area_level_2"),E=p("administrative_area_level_1"),w=h("administrative_area_level_1"),A=p("postal_code"),F=(y=(g=l.geometry)==null?void 0:g.location)==null?void 0:y.lat(),R=(d=(v=l.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:E,district:b,cep:A,streetNumber:B,stateShortName:w,coordinates:{lat:F,lng:R}})}};return x.jsx(Jp,{onLoad:s,onPlacesChanged:a,options:n,children:x.jsx(ou,{type:"text",onChange:u=>t(u.target.value),...r})})}function bh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:o,disabled:s,className:a="",...u}=t,l={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${a}`;return x.jsxs("button",{disabled:s||e,className:p.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Se.Loader2,{size:l[i],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(o,{size:l[i],strokeWidth:2.5})})]})}const su=c.createContext({});function wh(){return c.useContext(su)}function Bh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:o="md",className:s="",...a}=t,[u,l]=c.useState(e||""),{inputRef:f,id:p}=yt();function h(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${o} ${s}`;return x.jsxs(su.Provider,{value:{onChange:h,value:r||u,size:o},children:[x.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:r||u}),x.jsx("div",{className:g.trim(),...a})]})}function xh(t){const{value:e,size:n,disabled:r,children:i,className:o="",...s}=t,{onChange:a,size:u,value:l}=wh(),{error:f}=yt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${o}`;return x.jsxs("label",{className:v.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>a(e),onFocus:()=>a(e),...s}),i]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});for(var Sh=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),io={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},au={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Sh?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},oo={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Ir=1;Ir<20;Ir++)oo["f"+Ir]=111+Ir;function jr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(s){return uu(s,e)}),i=function(a){return r.some(function(u){return lu(u,a)})},o=n==null?i:i(n);return o}function Ah(t,e){return jr(t,e)}function Lh(t,e){return jr(t,{byKey:!0},e)}function uu(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),o=i.length;for(var s in io)r[io[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),p;!(a=(p=f.next()).done);a=!0){var h=p.value,g=h.endsWith("?")&&h.length>1;g&&(h=h.slice(0,-1));var y=so(h),v=io[y];if(h.length>1&&!v&&!au[h]&&!oo[y])throw new TypeError('Unknown modifier: "'+h+'"');(o===1||!v)&&(n?r.key=y:r.which=cu(h)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!a&&f.return&&f.return()}finally{if(u)throw l}}return r}function lu(t,e){for(var n in t){var r=t[n],i=void 0;if(r!=null&&(n==="key"&&e.key!=null?i=e.key.toLowerCase():n==="which"?i=r===91&&e.which===93?91:e.which:i=e[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function cu(t){t=so(t);var e=oo[t]||t.toUpperCase().charCodeAt(0);return e}function so(t){return t=t.toLowerCase(),t=au[t]||t,t}var Oh=It.default=jr,ao=It.isHotkey=jr;It.isCodeHotkey=Ah,It.isKeyHotkey=Lh,It.parseHotkey=uu,It.compareHotkey=lu,It.toKeyCode=cu,It.toKeyName=so;/*!
71
+ </svg>`,a=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const p=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:u,title:a,content:p};return new google.maps.marker.AdvancedMarkerElement(h)}const l={position:n,zIndex:u,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function Sp(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class eo{constructor(){Sp(eo,google.maps.OverlayView)}}var Qn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Qn||(Qn={}));const Ap=(t,e,n)=>{n.fitBounds(e.bounds)};class Lp extends eo{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new wp(r),renderer:o=new xp,onClusterClick:s=Ap}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(mt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Qn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,Qn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Bp(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Qn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Op(t){var e=_d(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new Lp(he(he({},t),{map:e}));i(o)}},[e]),r}function Pp(t){var e=t.children,n=t.options,r=Op(n);return r!==null?e(r):null}c.memo(Pp);var wa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ba={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Fp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=c.useContext(Be),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),B=D[0],b=D[1],O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useRef(null);return c.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),c.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),c.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),c.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){var _=new google.maps.InfoWindow(he({},r||{}));return d(_),K.current=document.createElement("div"),s&&b(google.maps.event.addListener(_,"closeclick",s)),a&&w(google.maps.event.addListener(_,"domready",a)),u&&R(google.maps.event.addListener(_,"content_changed",u)),l&&I(google.maps.event.addListener(_,"position_changed",l)),f&&N(google.maps.event.addListener(_,"zindex_changed",f)),_.setContent(K.current),i&&_.setPosition(i),o&&_.setZIndex(o),n?_.open(g,n):_.getPosition()?_.open(g):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p(_),function(){B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(_),_.close()}},[]),K.current?ln.createPortal(c.Children.only(e),K.current):null}c.memo(Fp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(he({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Oe({updaterMap:Ba,eventMap:wa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ba,eventMap:wa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ln.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(c.PureComponent);var xa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Sa={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Mp={};function kp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,b=c.useContext(Be),O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1];return c.useEffect(function(){E!==null&&E.setMap(b)},[b]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),c.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),c.useEffect(function(){E&&s&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),c.useEffect(function(){E&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(E,"dragend",a)))},[a]),c.useEffect(function(){E&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(E,"dragstart",u)))},[u]),c.useEffect(function(){E&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(E,"mousedown",l)))},[l]),c.useEffect(function(){E&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(E,"mousemove",f)))},[f]),c.useEffect(function(){E&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(E,"mouseout",p)))},[p]),c.useEffect(function(){E&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(E,"mouseover",h)))},[h]),c.useEffect(function(){E&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(E,"mouseup",g)))},[g]),c.useEffect(function(){E&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(E,"rightclick",y)))},[y]),c.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(E,"click",v)))},[v]),c.useEffect(function(){E&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(E,"drag",d)))},[d]),c.useEffect(function(){var ge=new google.maps.Polyline(he(he({},e||Mp),{map:b}));return o&&ge.setPath(o),typeof i<"u"&&ge.setVisible(i),typeof r<"u"&&ge.setEditable(r),typeof n<"u"&&ge.setDraggable(n),s&&R(google.maps.event.addListener(ge,"dblclick",s)),a&&I(google.maps.event.addListener(ge,"dragend",a)),u&&N(google.maps.event.addListener(ge,"dragstart",u)),l&&ie(google.maps.event.addListener(ge,"mousedown",l)),f&&H(google.maps.event.addListener(ge,"mousemove",f)),p&&ee(google.maps.event.addListener(ge,"mouseout",p)),h&&W(google.maps.event.addListener(ge,"mouseover",h)),g&&X(google.maps.event.addListener(ge,"mouseup",g)),y&&le(google.maps.event.addListener(ge,"rightclick",y)),v&&ve(google.maps.event.addListener(ge,"click",v)),d&&De(google.maps.event.addListener(ge,"drag",d)),w(ge),D&&D(ge),function(){F!==null&&google.maps.event.removeListener(F),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),B&&B(ge),ge.setMap(null)}},[]),null}c.memo(kp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Sa,eventMap:xa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Sa,eventMap:xa,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Aa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},La={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Tp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,b=t.onUnmount,O=t.onEdit,E=c.useContext(Be),w=c.useState(null),A=w[0],F=w[1],R=c.useState(null),P=R[0],z=R[1],I=c.useState(null),j=I[0],T=I[1],N=c.useState(null),K=N[0],_=N[1],ie=c.useState(null),re=ie[0],k=ie[1],H=c.useState(null),J=H[0],q=H[1],ee=c.useState(null),Y=ee[0],C=ee[1],W=c.useState(null),U=W[0],M=W[1],X=c.useState(null),te=X[0],G=X[1],le=c.useState(null),se=le[0],pe=le[1],ve=c.useState(null),Ce=ve[0],me=ve[1],De=c.useState(null),ge=De[0],Ne=De[1];return c.useEffect(function(){A!==null&&A.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),c.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),c.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),c.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),c.useEffect(function(){typeof o<"u"&&A!==null&&A.setPath(o)},[A,o]),c.useEffect(function(){typeof s<"u"&&A!==null&&A.setPaths(s)},[A,s]),c.useEffect(function(){A&&a&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(A,"dblclick",a)))},[a]),c.useEffect(function(){A&&(google.maps.event.addListener(A.getPath(),"insert_at",function(){O==null||O(A)}),google.maps.event.addListener(A.getPath(),"set_at",function(){O==null||O(A)}))},[A,O]),c.useEffect(function(){A&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(A,"dragend",u)))},[u]),c.useEffect(function(){A&&l&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),c.useEffect(function(){A&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",f)))},[f]),c.useEffect(function(){A&&p&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(A,"mousemove",p)))},[p]),c.useEffect(function(){A&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(A,"mouseout",h)))},[h]),c.useEffect(function(){A&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(A,"mouseover",g)))},[g]),c.useEffect(function(){A&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(A,"mouseup",y)))},[y]),c.useEffect(function(){A&&v&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(A,"rightclick",v)))},[v]),c.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(A,"click",d)))},[d]),c.useEffect(function(){A&&D&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),c.useEffect(function(){var ae=new google.maps.Polygon(he(he({},e||{}),{map:E}));return o&&ae.setPath(o),s&&ae.setPaths(s),typeof i<"u"&&ae.setVisible(i),typeof r<"u"&&ae.setEditable(r),typeof n<"u"&&ae.setDraggable(n),a&&z(google.maps.event.addListener(ae,"dblclick",a)),u&&T(google.maps.event.addListener(ae,"dragend",u)),l&&_(google.maps.event.addListener(ae,"dragstart",l)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),p&&q(google.maps.event.addListener(ae,"mousemove",p)),h&&C(google.maps.event.addListener(ae,"mouseout",h)),g&&M(google.maps.event.addListener(ae,"mouseover",g)),y&&G(google.maps.event.addListener(ae,"mouseup",y)),v&&pe(google.maps.event.addListener(ae,"rightclick",v)),d&&me(google.maps.event.addListener(ae,"click",d)),D&&Ne(google.maps.event.addListener(ae,"drag",D)),F(ae),B&&B(ae),function(){P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),K!==null&&google.maps.event.removeListener(K),re!==null&&google.maps.event.removeListener(re),J!==null&&google.maps.event.removeListener(J),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),te!==null&&google.maps.event.removeListener(te),se!==null&&google.maps.event.removeListener(se),Ce!==null&&google.maps.event.removeListener(Ce),b&&b(ae),ae.setMap(null)}},[]),null}c.memo(Tp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:La,eventMap:Aa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:La,eventMap:Aa,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Oa={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Pa={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Ip(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,b=t.onUnmount,O=c.useContext(Be),E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){w!==null&&w.setMap(O)},[O]),c.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),c.useEffect(function(){typeof o<"u"&&w!==null&&w.setVisible(o)},[w,o]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),c.useEffect(function(){w&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"dragend",a)))},[a]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&p&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseout",p)))},[p]),c.useEffect(function(){w&&h&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(function(){w&&g&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(w,"mouseup",g)))},[g]),c.useEffect(function(){w&&y&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(w,"rightclick",y)))},[y]),c.useEffect(function(){w&&v&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(w,"click",v)))},[v]),c.useEffect(function(){w&&d&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(function(){w&&D&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),c.useEffect(function(){var de=new google.maps.Rectangle(he(he({},e||{}),{map:O}));return typeof o<"u"&&de.setVisible(o),typeof i<"u"&&de.setEditable(i),typeof r<"u"&&de.setDraggable(r),typeof n<"u"&&de.setBounds(n),s&&P(google.maps.event.addListener(de,"dblclick",s)),a&&j(google.maps.event.addListener(de,"dragend",a)),u&&K(google.maps.event.addListener(de,"dragstart",u)),l&&re(google.maps.event.addListener(de,"mousedown",l)),f&&J(google.maps.event.addListener(de,"mousemove",f)),p&&Y(google.maps.event.addListener(de,"mouseout",p)),h&&U(google.maps.event.addListener(de,"mouseover",h)),g&&te(google.maps.event.addListener(de,"mouseup",g)),y&&se(google.maps.event.addListener(de,"rightclick",y)),v&&Ce(google.maps.event.addListener(de,"click",v)),d&&ge(google.maps.event.addListener(de,"drag",d)),D&&Ue(google.maps.event.addListener(de,"bounds_changed",D)),A(de),B&&B(de),function(){R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),b&&b(de),de.setMap(null)}},[]),null}c.memo(Ip),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Pa,eventMap:Oa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Pa,eventMap:Oa,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Fa={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ma={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},jp={};function Np(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,b=t.onRadiusChanged,O=t.onLoad,E=t.onUnmount,w=c.useContext(Be),A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1],ge=c.useState(null),Ne=ge[0],ae=ge[1],Ue=c.useState(null),de=Ue[0],we=Ue[1],Te=c.useState(null),Xe=Te[0],$e=Te[1];return c.useEffect(function(){F!==null&&F.setMap(w)},[w]),c.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),c.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),c.useEffect(function(){typeof o<"u"&&F!==null&&F.setEditable(o)},[F,o]),c.useEffect(function(){typeof s<"u"&&F!==null&&F.setVisible(s)},[F,s]),c.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),c.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),c.useEffect(function(){F&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(F,"dblclick",a)))},[a]),c.useEffect(function(){F&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(F,"dragend",u)))},[u]),c.useEffect(function(){F&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(F,"dragstart",l)))},[l]),c.useEffect(function(){F&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(F,"mousedown",f)))},[f]),c.useEffect(function(){F&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(F,"mousemove",p)))},[p]),c.useEffect(function(){F&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(F,"mouseout",h)))},[h]),c.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(F,"mouseover",g)))},[g]),c.useEffect(function(){F&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(F,"mouseup",y)))},[y]),c.useEffect(function(){F&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(F,"rightclick",v)))},[v]),c.useEffect(function(){F&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(F,"click",d)))},[d]),c.useEffect(function(){F&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(F,"drag",D)))},[D]),c.useEffect(function(){F&&B&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),c.useEffect(function(){F&&b&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(F,"radius_changed",b)))},[b]),c.useEffect(function(){var xe=new google.maps.Circle(he(he({},e||jp),{map:w}));return typeof r=="number"&&xe.setRadius(r),typeof n<"u"&&xe.setCenter(n),typeof r=="number"&&xe.setRadius(r),typeof s<"u"&&xe.setVisible(s),typeof o<"u"&&xe.setEditable(o),typeof i<"u"&&xe.setDraggable(i),a&&I(google.maps.event.addListener(xe,"dblclick",a)),u&&N(google.maps.event.addListener(xe,"dragend",u)),l&&ie(google.maps.event.addListener(xe,"dragstart",l)),f&&H(google.maps.event.addListener(xe,"mousedown",f)),p&&ee(google.maps.event.addListener(xe,"mousemove",p)),h&&W(google.maps.event.addListener(xe,"mouseout",h)),g&&X(google.maps.event.addListener(xe,"mouseover",g)),y&&le(google.maps.event.addListener(xe,"mouseup",y)),v&&ve(google.maps.event.addListener(xe,"rightclick",v)),d&&De(google.maps.event.addListener(xe,"click",d)),D&&ae(google.maps.event.addListener(xe,"drag",D)),B&&we(google.maps.event.addListener(xe,"center_changed",B)),b&&$e(google.maps.event.addListener(xe,"radius_changed",b)),R(xe),O&&O(xe),function(){z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),E&&E(xe),xe.setMap(null)}},[]),null}c.memo(Np),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ma,eventMap:Fa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ma,eventMap:Fa,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var ka={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Ta={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function _p(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,u=t.onMouseUp,l=t.onRightClick,f=t.onAddFeature,p=t.onRemoveFeature,h=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=c.useContext(Be),B=c.useState(null),b=B[0],O=B[1],E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){b!==null&&b.setMap(D)},[D]),c.useEffect(function(){b&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(b,"dblclick",r)))},[r]),c.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(b,"mousedown",i)))},[i]),c.useEffect(function(){b&&o&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),c.useEffect(function(){b&&s&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(b,"mouseout",s)))},[s]),c.useEffect(function(){b&&a&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(b,"mouseover",a)))},[a]),c.useEffect(function(){b&&u&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(b,"mouseup",u)))},[u]),c.useEffect(function(){b&&l&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",l)))},[l]),c.useEffect(function(){b&&n&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(b,"click",n)))},[n]),c.useEffect(function(){b&&f&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(b,"addfeature",f)))},[f]),c.useEffect(function(){b&&p&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(b,"removefeature",p)))},[p]),c.useEffect(function(){b&&h&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(b,"removeproperty",h)))},[h]),c.useEffect(function(){b&&g&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(b,"setgeometry",g)))},[g]),c.useEffect(function(){b&&y&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(b,"setproperty",y)))},[y]),c.useEffect(function(){if(D!==null){var de=new google.maps.Data(he(he({},e||{}),{map:D}));r&&A(google.maps.event.addListener(de,"dblclick",r)),i&&P(google.maps.event.addListener(de,"mousedown",i)),o&&j(google.maps.event.addListener(de,"mousemove",o)),s&&K(google.maps.event.addListener(de,"mouseout",s)),a&&re(google.maps.event.addListener(de,"mouseover",a)),u&&J(google.maps.event.addListener(de,"mouseup",u)),l&&Y(google.maps.event.addListener(de,"rightclick",l)),n&&U(google.maps.event.addListener(de,"click",n)),f&&te(google.maps.event.addListener(de,"addfeature",f)),p&&se(google.maps.event.addListener(de,"removefeature",p)),h&&Ce(google.maps.event.addListener(de,"removeproperty",h)),g&&ge(google.maps.event.addListener(de,"setgeometry",g)),y&&Ue(google.maps.event.addListener(de,"setproperty",y)),O(de),v&&v(de)}return function(){b&&(w!==null&&google.maps.event.removeListener(w),R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),d&&d(b),b.setMap(null))}},[]),null}c.memo(_p),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ta,eventMap:ka,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ta,eventMap:ka,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var Ia={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},ja={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(he(he({},this.props.options),{map:this.context}));this.registeredEvents=Oe({updaterMap:ja,eventMap:Ia,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:ja,eventMap:Ia,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e})(c.PureComponent);function Na(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function zp(t,e){return new e(t.lat,t.lng)}function Wp(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Up(t,e,n){return t instanceof e?t:n(t,e)}function Hp(t,e,n){return t instanceof e?t:n(t,e)}function Rp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function Vp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function _a(t,e,n,r){return n!==void 0?Rp(t,e,Hp(n,google.maps.LatLngBounds,Wp)):Vp(t,e,Up(r,google.maps.LatLng,zp))}function qp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Gp(t,e,n,r,i){var o=function(s){He(a,s);function a(u,l,f,p){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=f,h.bounds=p,h}return a.prototype.onAdd=function(){var u,l=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];l==null||l.appendChild(this.container)},a.prototype.draw=function(){for(var u=this.getProjection(),l=he({},this.container?Na(this.container,i):{x:0,y:0}),f=_a(u,l,this.bounds,this.position),p=0,h=Object.entries(f);p<h.length;p++){var g=h[p],y=g[0],v=g[1];this.container.style[y]=v}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function za(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Wa(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function Zp(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,u=t.children,l=c.useContext(Be),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),p=c.useMemo(function(){return Gp(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(p),p==null||p.setMap(l),function(){s==null||s(p),p==null||p.setMap(null)}},[l,p]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Hs.createPortal(u,f)}c.memo(Zp),function(t){He(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();et(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=he({x:0,y:0},r.containerRef.current?Na(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=_a(o,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,f=u.top,p=u.width,h=u.height;qp(a,{left:l,top:f,width:p,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=za(n.position),i=za(this.props.position),o=Wa(n.bounds),s=Wa(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Hs.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Be,e}(c.PureComponent);function Yp(){}var Ua={onDblClick:"dblclick",onClick:"click"},Ha={opacity:function(t,e){t.setOpacity(e)}};function Kp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(Be),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var u=new google.maps.GroundOverlay(e,s,he({},r));return u},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",u),a.setMap(o))},[a,n]),null}c.memo(Kp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){et(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,he(he({},this.props.options),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ha,eventMap:Ua,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ha,eventMap:Ua,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:Yp},e.contextType=Be,e}(c.PureComponent);var Ra={},Va={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Xp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(Be),s=c.useState(null),a=s[0],u=s[1];return c.useEffect(function(){google.maps.visualization||et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){et(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(he(he({},i||{}),{data:e,map:o}));return u(l),n&&n(l),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(Xp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),et(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(he(he({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Oe({updaterMap:Va,eventMap:Ra,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Va,eventMap:Ra,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent);var qa={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ga={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Oe({updaterMap:Ga,eventMap:qa,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ga,eventMap:qa,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Be,e})(c.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Be,e}(c.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){et(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(c.PureComponent);var Za={onDirectionsChanged:"directions_changed"},Ya={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Oe({updaterMap:Ya,eventMap:Za,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Ya,eventMap:Za,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=Be,e})(c.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){et(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(c.PureComponent);var Ka={onPlacesChanged:"places_changed"},Xa={bounds:function(t,e){t.setBounds(e)}},Jp=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(et(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Oe({updaterMap:Xa,eventMap:Ka,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Xa,eventMap:Ka,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=Be,e}(c.PureComponent),Ja={onPlaceChanged:"place_changed"},Qa={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;et(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Oe({updaterMap:Qa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Qa,eventMap:Ja,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Pe(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Be,e})(c.PureComponent);function Qp({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(qd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(tp,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Se.MapPinned,{})})}function $p(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function eh(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,o=`arkynTableBody ${n}`,s=c.Children.count(r)===0;return x.jsx("tbody",{className:o.trim(),...i,children:s?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function th(t){const{className:e,children:n,...r}=t,i=`arkynTableCaption ${e}`;return x.jsx("caption",{className:i.trim(),...r,children:x.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function nh(t){const{children:e,className:n,...r}=t,i=`arkynTableContainer ${n}`;return x.jsx("div",{className:i.trim(),...r,children:x.jsx("table",{children:e})})}function rh(t){const{className:e,children:n,...r}=t,i=`arkynTableFooter ${e}`;return x.jsxs("tfoot",{className:i.trim(),...r,children:[x.jsx("tr",{className:"spacingRow"}),x.jsx("tr",{children:x.jsx("th",{colSpan:100,children:x.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ih(t){const{className:e,children:n,...r}=t,i=`arkynTableHeader ${e}`;return x.jsxs("thead",{className:i.trim(),...r,children:[x.jsx("tr",{children:n}),x.jsx("tr",{className:"spacingRow"})]})}function oh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:o="md",leftIcon:s,rightIcon:a,disabled:u,className:l="",children:f,...p}=t,g={xs:12,sm:16,md:20,lg:24}[o],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${o} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return x.jsxs("button",{className:d,disabled:u||e,...p,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Se.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),x.jsxs("div",{className:"arkynButtonContent",children:[Pr(g,s),f,Pr(g,a)]})]})}const $a=c.createContext({});function sh(t){var y;const{children:e,className:n,id:r,...i}=t,o=Tt.useActionData(),s=Tt.useFetchers(),[a,u]=c.useState({});c.useEffect(()=>{let v={};o!=null&&o.fieldErrors&&(v=o.fieldErrors),s.forEach(d=>{var D;(D=d.data)!=null&&D.fieldErrors&&d.state==="loading"&&(v={...v,...d.data.fieldErrors})}),JSON.stringify(v)!==JSON.stringify(a)&&u(v)},[s,o,a]);const l=c.useRef(null),f=((y=l.current)==null?void 0:y.name)||"",p=(a==null?void 0:a[f])||null,h=c.useId(),g=`arkynFormController ${n}`;return x.jsx($a.Provider,{value:{error:p,id:h,inputRef:l},children:x.jsx("section",{id:r||f||void 0,className:g.trim(),...i,children:e})})}function yt(){return c.useContext($a)}function ah(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:o=!1,checked:s=null,onCheck:a,value:u,...l}=t,{id:f,inputRef:p,error:h}=yt(),g=i||!!h,[y,v]=c.useState(o||!1),d=typeof s=="boolean"?s:y,b=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const E=y;v(!E),a&&a(E?"":u||"checked")}return x.jsxs("button",{id:f,type:"button",className:b,onClick:O,...l,children:[x.jsx("input",{type:"hidden",name:e,ref:p,value:d?u||"checked":""}),x.jsx(Se.Check,{})]})}function uh(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:o}=yt();return e?x.jsx("strong",{className:i.trim(),...r,children:e}):o?x.jsx("strong",{className:i.trim(),...r,children:o}):x.jsx(x.Fragment,{})}function lh(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=yt(),s=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:s.trim(),htmlFor:i,...r})}function Gt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function to(t){return t&&t.replace(/[^0-9]/g,"")}function eu(t,e){let n="",r=0;return Array.from(t).forEach((i,o)=>{e[o+r].match(/[0-9]/)||(n+=e[o+r],r++),n+=i}),n}function tu(t){return t.length>11?"CNPJ":"CPF"}const no={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},nu=to(no.CNPJ).length;function ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,defaultValue:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,...b}=t;function O(T){let N=to(T);const K=tu(N);if(!(N.length>nu))return N=eu(N,no[K]),N}const E=f?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:f,defaultValue:O(h||""),disabled:p,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,loadingPosition:E,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...b}}function fh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,onChange:F,value:R,defaultValue:P,...z}=ch({...t,id:o,isError:u},e),[I,j]=c.useState(P),T=B&&!D,N=w&&!D,K=d==="left"&&D,_=d==="right"&&D;function ie(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function re(J){let q=to(J.target.value);const ee=tu(q);q.length>nu||(q=eu(q,no[ee]),J.target.value=q,j(q),F&&F(J))}function k(J){n(!0),O&&O(J)}function H(J){n(!1),E&&E(J)}return x.jsxs("section",{title:f,style:p,onClick:ie,className:h,children:[g,K&&A,T&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,value:R||I,onFocus:k,onChange:re,onBlur:H,...z}),N&&x.jsx(w,{size:v,strokeWidth:2.5}),_&&A,y]})}const dh=3,ph=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?dh:0),Tr=2,ru=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),ro=t=>{let e=t;return typeof t=="string"?(e=ru(t),e%1!==0&&(e=e.toFixed(Tr))):e=Number.isInteger(t)?Number(t)*10**Tr:t.toFixed(Tr),ru(e)/10**Tr},iu=(t,e,n)=>{if(!e)return[0,""];const r=ro(e),i=ph(t,r,n);return[r,i]};function hh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D=1e9,locale:B="pt-BR",currency:b="BRL",...O}=t,E=f?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,locale:B,currency:b,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D,loadingPosition:E,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}function vh(t){const[e,n]=c.useState(!1),[r,i]=c.useState("0"),o=c.useRef(null),{inputRef:s,id:a,error:u}=yt(),l=s||o,f=t.isError||!!u,{disabled:p,title:h,style:g,className:y,prefix:v,sufix:d,iconSize:D,loadingPosition:B,isLoading:b,LeftIcon:O,readOnly:E,onFocus:w,onBlur:A,RightIcon:F,Spinner:R,value:P,max:z,onChangeValue:I,onKeyPress:j,currency:T,locale:N,name:K,defaultValue:_,...ie}=hh({...t,id:a,isError:f},e),re=O&&!b,k=F&&!b,H=B==="left"&&b,J=B==="right"&&b;function q(){p||!(l!=null&&l.current)||(n(!0),l.current.focus())}function ee(M){n(!0),w&&w(M)}function Y(M){n(!1),A&&A(M)}const C=M=>{const[X,te]=iu(N,M,T);return!z||X<=z?(i(te),[X,te]):[ro(r),r]},W=M=>{M.preventDefault();const[X,te]=C(M.target.value);I(M,String(X),String(te))},U=M=>j&&j(M,M.key,M.key);return c.useEffect(()=>{const M=P||+_||void 0,[,X]=iu(N,M,T);i(X)},[T,_,P]),x.jsxs("section",{title:h,style:g,onClick:q,className:y,children:[v,H&&R,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:W,onBlur:Y,onFocus:ee,onKeyUp:U,disabled:p||b,readOnly:E,...ie}),x.jsx("input",{type:"hidden",ref:l,name:K,value:ro(r)}),J&&R,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function gh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:B=!1,type:b,...O}=t,E=f?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:E,iconSize:j,showMask:B,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}const mh=c.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function yh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,...F}=gh({...t,id:o,isError:u},e),R=B&&!D,P=w&&!D,z=d==="left"&&D,I=d==="right"&&D;function j(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function T(K){n(!0),O&&O(K)}function N(K){n(!1),E&&E(K)}return x.jsxs("section",{title:f,style:p,onClick:j,className:h,children:[g,z&&A,R&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Cd.InputMask,{component:mh,ref:a,onFocus:T,onBlur:N,disabled:l,...F}),P&&x.jsx(w,{size:v,strokeWidth:2.5}),I&&A,y]})}function Ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...B}=t,b=f?"right":"left",R=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,z={md:20,lg:20}[i];return{isLoading:n,className:R,prefix:Gt(a,z,"prefix"),sufix:Gt(u,z,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:b,iconSize:z,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...B}}function Dh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,type:A,Spinner:F,...R}=Ch({...t,id:o,isError:u},e),P=B&&!D,z=w&&!D,I=d==="left"&&D,j=d==="right"&&D;function T(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function N(_){n(!0),O&&O(_)}function K(_){n(!1),E&&E(_)}return A==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:a,...R}):x.jsxs("section",{title:f,style:p,onClick:T,className:h,children:[g,I&&F,P&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,onFocus:N,onBlur:K,type:A,...R}),z&&x.jsx(w,{size:v,strokeWidth:2.5}),j&&F,y]})}function ou(t){return t.type==="currency"?x.jsx(vh,{...t}):t.type==="masked"?x.jsx(yh,{...t}):t.type==="cpf-cnpj"?x.jsx(fh,{...t}):x.jsx(Dh,{...t})}function Eh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,o]=c.useState(null),s=u=>o(u),a=()=>{var g,y,v,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function p(D){const B=f.find(b=>b.types[0]===D);return B?B.long_name:""}function h(D){const B=f.find(b=>b.types[0]===D);return B?B.short_name:""}if(l){const D=p("route"),B=p("street_number"),b=p("sublocality_level_1"),O=p("administrative_area_level_2"),E=p("administrative_area_level_1"),w=h("administrative_area_level_1"),A=p("postal_code"),F=(y=(g=l.geometry)==null?void 0:g.location)==null?void 0:y.lat(),R=(d=(v=l.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:E,district:b,cep:A,streetNumber:B,stateShortName:w,coordinates:{lat:F,lng:R}})}};return x.jsx(Jp,{onLoad:s,onPlacesChanged:a,options:n,children:x.jsx(ou,{type:"text",onChange:u=>t(u.target.value),...r})})}function bh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:o,disabled:s,className:a="",...u}=t,l={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${a}`;return x.jsxs("button",{disabled:s||e,className:p.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Se.Loader2,{size:l[i],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(o,{size:l[i],strokeWidth:2.5})})]})}const su=c.createContext({});function wh(){return c.useContext(su)}function Bh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:o="md",className:s="",...a}=t,[u,l]=c.useState(e||""),{inputRef:f,id:p}=yt();function h(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${o} ${s}`;return x.jsxs(su.Provider,{value:{onChange:h,value:r||u,size:o},children:[x.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:r||u}),x.jsx("div",{className:g.trim(),...a})]})}function xh(t){const{value:e,size:n,disabled:r,children:i,className:o="",...s}=t,{onChange:a,size:u,value:l}=wh(),{error:f}=yt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${o}`;return x.jsxs("label",{className:v.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>a(e),onFocus:()=>a(e),...s}),i]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});for(var Sh=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),io={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},au={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Sh?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},oo={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Ir=1;Ir<20;Ir++)oo["f"+Ir]=111+Ir;function jr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(s){return uu(s,e)}),i=function(a){return r.some(function(u){return lu(u,a)})},o=n==null?i:i(n);return o}function Ah(t,e){return jr(t,e)}function Lh(t,e){return jr(t,{byKey:!0},e)}function uu(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),o=i.length;for(var s in io)r[io[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),p;!(a=(p=f.next()).done);a=!0){var h=p.value,g=h.endsWith("?")&&h.length>1;g&&(h=h.slice(0,-1));var y=so(h),v=io[y];if(h.length>1&&!v&&!au[h]&&!oo[y])throw new TypeError('Unknown modifier: "'+h+'"');(o===1||!v)&&(n?r.key=y:r.which=cu(h)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!a&&f.return&&f.return()}finally{if(u)throw l}}return r}function lu(t,e){for(var n in t){var r=t[n],i=void 0;if(r!=null&&(n==="key"&&e.key!=null?i=e.key.toLowerCase():n==="which"?i=r===91&&e.which===93?91:e.which:i=e[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function cu(t){t=so(t);var e=oo[t]||t.toUpperCase().charCodeAt(0);return e}function so(t){return t=t.toLowerCase(),t=au[t]||t,t}var Oh=It.default=jr,ao=It.isHotkey=jr;It.isCodeHotkey=Ah,It.isKeyHotkey=Lh,It.parseHotkey=uu,It.compareHotkey=lu,It.toKeyCode=cu,It.toKeyName=so;/*!
72
72
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
73
73
  *
74
74
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormController/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAW/E,OAAO,cAAc,CAAC;AAItB,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CA6CjD;AAED,iBAAS,iBAAiB,+BAEzB;AAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormController/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAW/E,OAAO,cAAc,CAAC;AAItB,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CA+CjD;AAED,iBAAS,iBAAiB,+BAEzB;AAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
@@ -9,9 +9,11 @@ function FormController(props) {
9
9
  const fetchers = useFetchers();
10
10
  const [fieldErrors, setFieldErrors] = useState({});
11
11
  useEffect(() => {
12
- let newFieldErrors = { ...actionData?.fieldErrors };
12
+ let newFieldErrors = {};
13
+ if (actionData?.fieldErrors)
14
+ newFieldErrors = actionData.fieldErrors;
13
15
  fetchers.forEach((fetcher) => {
14
- if (fetcher.data?.fieldErrors) {
16
+ if (fetcher.data?.fieldErrors && fetcher.state === "loading") {
15
17
  newFieldErrors = { ...newFieldErrors, ...fetcher.data.fieldErrors };
16
18
  }
17
19
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "1.3.133",
3
+ "version": "1.3.134",
4
4
  "main": "./dist/bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Lucas Gonçalves",
@@ -27,9 +27,11 @@ function FormController(props: FormControllerProps) {
27
27
  const [fieldErrors, setFieldErrors] = useState<{ [x: string]: string }>({});
28
28
 
29
29
  useEffect(() => {
30
- let newFieldErrors = { ...actionData?.fieldErrors };
30
+ let newFieldErrors = {};
31
+ if (actionData?.fieldErrors) newFieldErrors = actionData.fieldErrors;
32
+
31
33
  fetchers.forEach((fetcher) => {
32
- if (fetcher.data?.fieldErrors) {
34
+ if (fetcher.data?.fieldErrors && fetcher.state === "loading") {
33
35
  newFieldErrors = { ...newFieldErrors, ...fetcher.data.fieldErrors };
34
36
  }
35
37
  });