"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7554],{67554:function(e,t,n){n.d(t,{D5:function(){return S},Jx:function(){return D},q6:function(){return F}});var a,i,o,l,s,c,u,d=n(67294),f=n(73935),p={},m={};({get exports(){return p},set exports(r){p=r}}).exports=function(){if(u)return m;u=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(t,o,l){var s,c={},u=null,d=null;for(s in void 0!==l&&(u=""+l),void 0!==o.key&&(u=""+o.key),void 0!==o.ref&&(d=o.ref),o)n.call(o,s)&&!i.hasOwnProperty(s)&&(c[s]=o[s]);if(t&&t.defaultProps)for(s in o=t.defaultProps)void 0===c[s]&&(c[s]=o[s]);return{$$typeof:e,type:t,key:u,ref:d,props:c,_owner:a.current}}return m.Fragment=t,m.jsx=o,m.jsxs=o,m}();let g=p.Fragment,y=p.jsx,h=p.jsxs,k=d.createContext(null),P=null;var C=((a=C||{})[a.Light=0]="Light",a[a.Dark=1]="Dark",a[a.Auto=2]="Auto",a),O=((i=O||{})[i.Standard=0]="Standard",i[i.MutedStandard=1]="MutedStandard",i[i.Hybrid=2]="Hybrid",i[i.Satellite=3]="Satellite",i),E=((o=E||{})[o.Adaptive=0]="Adaptive",o[o.Metric=1]="Metric",o[o.Imperial=2]="Imperial",o),v=((l=v||{})[l.LandCover=0]="LandCover",l[l.PointsOfInterest=1]="PointsOfInterest",l[l.None=2]="None",l);function b(e){if("number"==typeof e){if(e<0||e>1e3)throw RangeError("Display priority is out of range (0 to 1000)");return e}switch(e){case"low":return mapkit.Annotation.DisplayPriority.Low;case"high":return mapkit.Annotation.DisplayPriority.High;case"required":return mapkit.Annotation.DisplayPriority.Required;default:throw RangeError("Invalid display priority")}}var M=((s=M||{})[s.Hidden=0]="Hidden",s[s.Visible=1]="Visible",s[s.Adaptive=2]="Adaptive",s);function I(e){switch(e){case 2:return mapkit.FeatureVisibility.Adaptive;case 1:return mapkit.FeatureVisibility.Visible;case 0:return mapkit.FeatureVisibility.Hidden;default:throw RangeError("Invalid feature visibility")}}var w=((c=w||{})[c.Airport=0]="Airport",c[c.AmusementPark=1]="AmusementPark",c[c.Aquarium=2]="Aquarium",c[c.ATM=3]="ATM",c[c.Bakery=4]="Bakery",c[c.Bank=5]="Bank",c[c.Beach=6]="Beach",c[c.Brewery=7]="Brewery",c[c.Cafe=8]="Cafe",c[c.Campground=9]="Campground",c[c.CarRental=10]="CarRental",c[c.EVCharger=11]="EVCharger",c[c.FireStation=12]="FireStation",c[c.FitnessCenter=13]="FitnessCenter",c[c.FoodMarket=14]="FoodMarket",c[c.GasStation=15]="GasStation",c[c.Hospital=16]="Hospital",c[c.Hotel=17]="Hotel",c[c.Laundry=18]="Laundry",c[c.Library=19]="Library",c[c.Marina=20]="Marina",c[c.MovieTheater=21]="MovieTheater",c[c.Museum=22]="Museum",c[c.NationalPark=23]="NationalPark",c[c.Nightlife=24]="Nightlife",c[c.Park=25]="Park",c[c.Parking=26]="Parking",c[c.Pharmacy=27]="Pharmacy",c[c.Police=28]="Police",c[c.PostOffice=29]="PostOffice",c[c.PublicTransport=30]="PublicTransport",c[c.Restaurant=31]="Restaurant",c[c.Restroom=32]="Restroom",c[c.School=33]="School",c[c.Stadium=34]="Stadium",c[c.Store=35]="Store",c[c.Theater=36]="Theater",c[c.University=37]="University",c[c.Winery=38]="Winery",c[c.Zoo=39]="Zoo",c);function L(e){switch(e){case 0:return mapkit.PointOfInterestCategory.Airport;case 1:return mapkit.PointOfInterestCategory.AmusementPark;case 2:return mapkit.PointOfInterestCategory.Aquarium;case 3:return mapkit.PointOfInterestCategory.ATM;case 4:return mapkit.PointOfInterestCategory.Bakery;case 5:return mapkit.PointOfInterestCategory.Bank;case 6:return mapkit.PointOfInterestCategory.Beach;case 7:return mapkit.PointOfInterestCategory.Brewery;case 8:return mapkit.PointOfInterestCategory.Cafe;case 9:return mapkit.PointOfInterestCategory.Campground;case 10:return mapkit.PointOfInterestCategory.CarRental;case 11:return mapkit.PointOfInterestCategory.EVCharger;case 12:return mapkit.PointOfInterestCategory.FireStation;case 13:return mapkit.PointOfInterestCategory.FitnessCenter;case 14:return mapkit.PointOfInterestCategory.FoodMarket;case 15:return mapkit.PointOfInterestCategory.GasStation;case 16:return mapkit.PointOfInterestCategory.Hospital;case 17:return mapkit.PointOfInterestCategory.Hotel;case 18:return mapkit.PointOfInterestCategory.Laundry;case 19:return mapkit.PointOfInterestCategory.Library;case 20:return mapkit.PointOfInterestCategory.Marina;case 21:return mapkit.PointOfInterestCategory.MovieTheater;case 22:return mapkit.PointOfInterestCategory.Museum;case 23:return mapkit.PointOfInterestCategory.NationalPark;case 24:return mapkit.PointOfInterestCategory.Nightlife;case 25:return mapkit.PointOfInterestCategory.Park;case 26:return mapkit.PointOfInterestCategory.Parking;case 27:return mapkit.PointOfInterestCategory.Pharmacy;case 28:return mapkit.PointOfInterestCategory.Police;case 29:return mapkit.PointOfInterestCategory.PostOffice;case 30:return mapkit.PointOfInterestCategory.PublicTransport;case 31:return mapkit.PointOfInterestCategory.Restaurant;case 32:return mapkit.PointOfInterestCategory.Restroom;case 33:return mapkit.PointOfInterestCategory.School;case 34:return mapkit.PointOfInterestCategory.Stadium;case 35:return mapkit.PointOfInterestCategory.Store;case 36:return mapkit.PointOfInterestCategory.Theater;case 37:return mapkit.PointOfInterestCategory.University;case 38:return mapkit.PointOfInterestCategory.Winery;case 39:return mapkit.PointOfInterestCategory.Zoo;default:throw RangeError("Invalid point of interest category")}}function A(e){return new mapkit.CoordinateRegion(new mapkit.Coordinate(e.centerLatitude,e.centerLongitude),new mapkit.CoordinateSpan(e.latitudeDelta,e.longitudeDelta))}function R(e,t,n,a){(0,d.useEffect)(()=>{if(!e||!n)return;let i=e=>{n(a(e))};return e.addEventListener(t,i),()=>e.removeEventListener(t,i)},[e,n])}let S=d.forwardRef(({children:e,load:t,token:n,colorScheme:a=C.Light,mapType:i=O.Standard,distances:o=E.Adaptive,loadPriority:l=v.LandCover,isRotationEnabled:s=!0,isScrollEnabled:c=!0,isZoomEnabled:u=!0,showsCompass:f=M.Adaptive,showsScale:p=M.Hidden,showsMapTypeControl:m=!0,showsZoomControl:g=!0,showsUserLocationControl:h=!1,showsPointsOfInterest:b=!0,showsUserLocation:w=!1,tracksUserLocation:S=!1,allowWheelToZoom:T=!1,includedPOICategories:D,excludedPOICategories:F,paddingTop:_=0,paddingRight:x=0,paddingBottom:B=0,paddingLeft:H=0,initialRegion:N,cameraBoundary:U,minCameraDistance:V=0,maxCameraDistance:j=1/0,onLoad:Z,onRegionChangeStart:Y,onRegionChangeEnd:q,onMapTypeChange:W,onSingleTap:X,onDoubleTap:G,onLongPress:z,onUserLocationChange:$,onUserLocationError:J,onClick:K,onMouseMove:Q,onMouseDown:ee,onMouseUp:et},er)=>{let[en,ea]=(0,d.useState)(null),ei=(0,d.useRef)(null),eo=(0,d.useRef)(!1);(0,d.useEffect)(()=>(("function"==typeof t?t:function(e){return null!==P||(P=new Promise(t=>{let n=document.createElement("script");n.addEventListener("load",()=>{mapkit.init({authorizationCallback:t=>t(e)}),t()},{once:!0}),n.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",n.crossOrigin="anonymous",document.head.appendChild(n)})),P})(n).then(()=>{if(eo.current)return;let e=N?{region:A(N)}:{};ea(new mapkit.Map(ei.current,e)),eo.current=!0}),()=>{en&&(en.destroy(),eo.current=!1)}),[]),(0,d.useEffect)(()=>{null!==en&&(null==Z||Z())},[en]),(0,d.useImperativeHandle)(er,()=>en,[en]);let el=function(e){let t=e=>"u">typeof window&&window.matchMedia(e).matches,[n,a]=(0,d.useState)(t(e));function i(){a(t(e))}return(0,d.useEffect)(()=>{let t=window.matchMedia(e);return i(),t.addListener?t.addListener(i):t.addEventListener("change",i),()=>{t.removeListener?t.removeListener(i):t.removeEventListener("change",i)}},[e]),n}("(prefers-color-scheme: dark)");(0,d.useEffect)(()=>{en&&(en.colorScheme=function(e,t){switch(e){case 1:return mapkit.Map.ColorSchemes.Dark;case 0:return mapkit.Map.ColorSchemes.Light;case 2:return t?mapkit.Map.ColorSchemes.Dark:mapkit.Map.ColorSchemes.Light;default:throw RangeError("Invalid color scheme")}}(a,el))},[en,a,el]),(0,d.useEffect)(()=>{en&&(en.mapType=function(e){switch(e){case 0:return mapkit.Map.MapTypes.Standard;case 1:return mapkit.Map.MapTypes.MutedStandard;case 2:return mapkit.Map.MapTypes.Hybrid;case 3:return mapkit.Map.MapTypes.Satellite;default:throw RangeError("Invalid map type")}}(i))},[en,i]),(0,d.useEffect)(()=>{en&&(en.distances=function(e){switch(e){case 0:return mapkit.Map.Distances.Adaptive;case 1:return mapkit.Map.Distances.Metric;case 2:return mapkit.Map.Distances.Imperial;default:throw RangeError("Invalid distances value")}}(o))},[en,o]),(0,d.useEffect)(()=>{en&&(en.loadPriority=function(e){switch(e){case 0:return mapkit.Map.LoadPriorities.LandCover;case 1:return mapkit.Map.LoadPriorities.PointsOfInterest;case 2:return mapkit.Map.LoadPriorities.None;default:throw RangeError("Invalid load priority")}}(l))},[en,l]),Object.entries({isRotationEnabled:s,isScrollEnabled:c,isZoomEnabled:u,showsMapTypeControl:m,showsZoomControl:g,showsUserLocationControl:h,showsPointsOfInterest:b,showsUserLocation:w,tracksUserLocation:S}).forEach(([e,t])=>{(0,d.useEffect)(()=>{en&&(en[e]=t)},[en,t])}),Object.entries({showsCompass:f,showsScale:p}).forEach(([e,t])=>{(0,d.useEffect)(()=>{en&&(en[e]=I(t))},[en,t])}),(0,d.useEffect)(()=>{if(en)try{en._allowWheelToZoom=T}catch{}},[en,T]),(0,d.useEffect)(()=>{en&&(en.padding=new mapkit.Padding(_,x,B,H))},[en,_,x,B,H]),(0,d.useEffect)(()=>{en&&(en.cameraBoundary=U?A(U):null)},[en,U]),(0,d.useEffect)(()=>{en&&(en.cameraZoomRange=new mapkit.CameraZoomRange(V,j))},[en,V,j]),(0,d.useEffect)(()=>{if(en){if(D&&F)throw Error("Can’t specify both includedPOICategories and excludedPOICategories.");D?en.pointOfInterestFilter=mapkit.PointOfInterestFilter.including(D.map(L)):F?en.pointOfInterestFilter=mapkit.PointOfInterestFilter.excluding(F.map(L)):delete en.pointOfInterestFilter}},[en,D,F]);let es=()=>{var e;return{centerLatitude:(e=en.region).center.latitude,centerLongitude:e.center.longitude,latitudeDelta:e.span.latitudeDelta,longitudeDelta:e.span.longitudeDelta}};R(en,"region-change-start",Y,es),R(en,"region-change-end",q,es),R(en,"map-type-change",W,()=>(function(e){switch(e){case mapkit.Map.MapTypes.Standard:return 0;case mapkit.Map.MapTypes.MutedStandard:return 1;case mapkit.Map.MapTypes.Hybrid:return 2;case mapkit.Map.MapTypes.Satellite:return 3;default:throw RangeError("Invalid map type")}})(en.mapType));let ec=({domEvents:e,pointOnPage:t})=>({domEvents:e,pointOnPage:t,toCoordinates:()=>en.convertPointOnPageToCoordinate(t)});return R(en,"single-tap",X,ec),R(en,"double-tap",G,ec),R(en,"long-press",z,ec),R(en,"user-location-change",$,({coordinate:{latitude:e,longitude:t},timestamp:n,floorLevel:a})=>({coordinate:{latitude:e,longitude:t},timestamp:n,floorLevel:a})),R(en,"user-location-error",J,({code:e,message:t})=>({code:e,message:t})),[{name:"click",handler:K},{name:"mousemove",handler:Q},{name:"mousedown",handler:ee},{name:"mouseup",handler:et}].forEach(({name:e,handler:t})=>{(0,d.useEffect)(()=>{var n;if(!en||!t)return;let a=e=>{t({domEvents:[e],pointOnPage:{x:e.pageX,y:e.pageY},toCoordinates(){let{latitude:t,longitude:n}=en.convertPointOnPageToCoordinate(new DOMPoint(e.pageX,e.pageY));return{latitude:t,longitude:n}}})};return null==(n=ei.current)||n.addEventListener(e,a),()=>{var t;return null==(t=ei.current)?void 0:t.removeEventListener(e,a)}},[en,t])}),y(d.StrictMode,{children:y("div",{style:{width:"100%",height:"100%"},ref:ei,children:y(k.Provider,{value:en,children:e})})})}),T=d.forwardRef(({children:e,type:t="container"},n)=>y("div",{className:`mk-callout-${t}`,ref:n,children:e}));function D({latitude:e,longitude:t,title:n="",subtitle:a="",accessibilityLabel:i=null,subtitleVisibility:o=M.Adaptive,titleVisibility:l=M.Adaptive,clusteringIdentifier:s=null,displayPriority:c,collisionMode:u,color:p="#ff5b40",glyphColor:m="white",glyphText:P="",glyphImage:C=null,selectedGlyphImage:O=null,paddingTop:E=0,paddingRight:v=0,paddingBottom:w=0,paddingLeft:L=0,anchorOffsetX:A=0,anchorOffsetY:S=0,calloutElement:D,calloutContent:F,calloutLeftAccessory:_,calloutRightAccessory:x,calloutEnabled:B,calloutOffsetX:H=0,calloutOffsetY:N=0,selected:U=!1,animates:V=!0,appearanceAnimation:j="",visible:Z=!0,draggable:Y=!1,enabled:q=!0,onSelect:W,onDeselect:X,onDragStart:G,onDragEnd:z,onDragging:$}){let[J,K]=(0,d.useState)(null),Q=(0,d.useContext)(k);(0,d.useEffect)(()=>{if(null===Q)return;let n=new mapkit.MarkerAnnotation(new mapkit.Coordinate(e,t));return Q.addAnnotation(n),K(n),()=>{Q.removeAnnotation(n)}},[Q,e,t]),(0,d.useEffect)(()=>{J&&(J.subtitleVisibility=I(o))},[J,o]),(0,d.useEffect)(()=>{J&&(J.titleVisibility=I(l))},[J,l]),(0,d.useEffect)(()=>{J&&(J.padding=new mapkit.Padding(E,v,w,L))},[J,E,v,w,L]),(0,d.useEffect)(()=>{J&&(J.anchorOffset=new DOMPoint(A,S))},[J,A,S]),(0,d.useEffect)(()=>{J&&(J.calloutOffset=new DOMPoint(H,N))},[J,H,N]);let ee=(0,d.useRef)(null),et=(0,d.useRef)(null),er=(0,d.useRef)(null),en=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!J)return;let e={};D&&null!==en.current&&(e.calloutElementForAnnotation=()=>en.current),_&&null!==ee.current&&(e.calloutLeftAccessoryForAnnotation=()=>ee.current),x&&null!==et.current&&(e.calloutRightAccessoryForAnnotation=()=>et.current),F&&null!==er.current&&(e.calloutContentForAnnotation=()=>er.current),Object.keys(e).length>0?J.callout=e:delete J.callout},[J,D,_,x,F,en.current,ee.current,et.current,er.current]),(0,d.useEffect)(()=>{J&&("Circle"===u?J.collisionMode=mapkit.MarkerAnnotation.CollisionMode.Circle:"Rectangle"===u?J.collisionMode=mapkit.MarkerAnnotation.CollisionMode.Rectangle:delete J.collisionMode)},[J,u]),(0,d.useEffect)(()=>{if(J){if(void 0===c){delete J.displayPriority;return}J.displayPriority=b(c)}},[J,c]),Object.entries({title:n,subtitle:a,accessibilityLabel:i,color:p,glyphColor:m,glyphText:P,glyphImage:C,selectedGlyphImage:O,clusteringIdentifier:s,selected:U,animates:V,appearanceAnimation:j,draggable:Y,enabled:q,visible:Z,calloutEnabled:B}).forEach(([e,t])=>{(0,d.useEffect)(()=>{if(J){if(void 0===t){delete J[e];return}J[e]=t}},[J,t])});let ea=()=>{};return[{name:"select",handler:W},{name:"deselect",handler:X},{name:"drag-start",handler:G}].forEach(({name:e,handler:t})=>{R(J,e,t,ea)}),R(J,"drag-end",z,()=>({latitude:J.coordinate.latitude,longitude:J.coordinate.longitude})),R(J,"dragging",$,e=>({latitude:e.coordinate.latitude,longitude:e.coordinate.longitude})),B?h(g,{children:[void 0!==F&&(0,f.createPortal)(y(T,{ref:er,type:"content",children:F}),document.body),void 0!==_&&(0,f.createPortal)(y(T,{ref:ee,type:"left",children:_}),document.body),void 0!==x&&(0,f.createPortal)(y(T,{ref:et,type:"right",children:x}),document.body),void 0!==D&&(0,f.createPortal)(y(T,{ref:en,type:"container",children:D}),document.body)]}):null}function F({latitude:e,longitude:t,title:n="",subtitle:a="",accessibilityLabel:i=null,size:o,paddingTop:l=0,paddingRight:s=0,paddingBottom:c=0,paddingLeft:u=0,anchorOffsetX:p=0,anchorOffsetY:m=0,selected:P=!1,onSelect:C,onDeselect:O,onDragStart:E,onDragEnd:v,onDragging:M,animates:I=!0,appearanceAnimation:w="",visible:L=!0,clusteringIdentifier:A=null,displayPriority:S,collisionMode:D,calloutElement:F,calloutContent:_,calloutLeftAccessory:x,calloutRightAccessory:B,calloutEnabled:H,calloutOffsetX:N=0,calloutOffsetY:U=0,draggable:V=!1,enabled:j=!0,children:Z}){let[Y,q]=(0,d.useState)(null),W=(0,d.useMemo)(()=>document.createElement("div"),[]),X=(0,d.useContext)(k);(0,d.useEffect)(()=>{if(null===X)return;let n=new mapkit.Annotation(new mapkit.Coordinate(e,t),()=>W);return X.addAnnotation(n),q(n),()=>{X.removeAnnotation(n)}},[X,e,t]),(0,d.useEffect)(()=>{Y&&(Y.padding=new mapkit.Padding(l,s,c,u))},[Y,l,s,c,u]),(0,d.useEffect)(()=>{Y&&(Y.anchorOffset=new DOMPoint(p,m))},[Y,p,m]),(0,d.useEffect)(()=>{Y&&(Y.calloutOffset=new DOMPoint(N,U))},[Y,N,U]);let G=(0,d.useRef)(null),z=(0,d.useRef)(null),$=(0,d.useRef)(null),J=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!Y)return;let e={};F&&null!==J.current&&(e.calloutElementForAnnotation=()=>J.current),x&&null!==G.current&&(e.calloutLeftAccessoryForAnnotation=()=>G.current),B&&null!==z.current&&(e.calloutRightAccessoryForAnnotation=()=>z.current),_&&null!==$.current&&(e.calloutContentForAnnotation=()=>$.current),Object.keys(e).length>0?Y.callout=e:delete Y.callout},[Y,F,x,B,_,J.current,G.current,z.current,$.current]),(0,d.useEffect)(()=>{Y&&("Circle"===D?Y.collisionMode=mapkit.Annotation.CollisionMode.Circle:"Rectangle"===D?Y.collisionMode=mapkit.Annotation.CollisionMode.Rectangle:delete Y.collisionMode)},[Y,D]),(0,d.useEffect)(()=>{if(Y){if(void 0===S){delete Y.displayPriority;return}Y.displayPriority=b(S)}},[Y,S]),Object.entries({title:n,subtitle:a,accessibilityLabel:i,size:o,selected:P,animates:I,appearanceAnimation:w,draggable:V,enabled:j,visible:L,clusteringIdentifier:A,calloutEnabled:H}).forEach(([e,t])=>{(0,d.useEffect)(()=>{if(Y){if(void 0===t){delete Y[e];return}Y[e]=t}},[Y,t])});let K=()=>{};return[{name:"select",handler:C},{name:"deselect",handler:O},{name:"drag-start",handler:E}].forEach(({name:e,handler:t})=>{R(Y,e,t,K)}),R(Y,"drag-end",v,()=>({latitude:Y.coordinate.latitude,longitude:Y.coordinate.longitude})),R(Y,"dragging",M,e=>({latitude:e.coordinate.latitude,longitude:e.coordinate.longitude})),H?h(g,{children:[void 0!==_&&(0,f.createPortal)(y(T,{ref:$,type:"content",children:_}),document.body),void 0!==x&&(0,f.createPortal)(y(T,{ref:G,type:"left",children:x}),document.body),void 0!==B&&(0,f.createPortal)(y(T,{ref:z,type:"right",children:B}),document.body),void 0!==F&&(0,f.createPortal)(y(T,{ref:J,type:"container",children:F}),document.body),(0,f.createPortal)(Z,W)]}):(0,f.createPortal)(Z,W)}}}]);