1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8dc79183-2fdc-4bd1-95ed-9e640c4e8bc8",e._sentryDebugIdIdentifier="sentry-dbid-8dc79183-2fdc-4bd1-95ed-9e640c4e8bc8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8786],{48541:(e,t,l)=>{l.r(t),l.d(t,{default:()=>s});var n,r,a=l(12115);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(this,arguments)}let s=function(e){return a.createElement("svg",i({width:2369,height:344,viewBox:"0 0 2369 344",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),n||(n=a.createElement("defs",null,a.createElement("linearGradient",{x1:"82.593%",y1:"30.135%",x2:"0%",y2:"86.123%",id:"logo_svg__b"},a.createElement("stop",{stopColor:"#0BC4FD",offset:"0%"}),a.createElement("stop",{stopColor:"#0997FE",offset:"100%"})),a.createElement("path",{id:"logo_svg__a",d:"M91.595.105L.53 154.915l91.066-42.074 91.069 42.074L91.595.105"}))),r||(r=a.createElement("g",{fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M237.247 299.236l-79.443-139.2 59.113-102.333 66.574 115.563-52.268 92.11 119.73-122.27 92.619 156.13H237.247zm255.548-1.709L371.213 87.761c-8.713-15.034-30.437-15.03-39.145.008l-23.58 40.72-64.65-112.976C232.068-5.05 202.445-5.2 190.47 15.244L105 161.164 206.024 333.76A20.706 20.706 0 00223.9 344l242.191-.148c23.784-.014 38.626-25.76 26.705-46.325z",fill:"#001E36",fillRule:"nonzero"}),a.createElement("g",{transform:"translate(0 189)"},a.createElement("mask",{id:"logo_svg__c",fill:"#fff"},a.createElement("use",{xlinkHref:"#logo_svg__a"})),a.createElement("path",{fill:"url(#logo_svg__b)",fillRule:"nonzero",mask:"url(#logo_svg__c)",d:"M91.595.105L.53 154.915l91.066-42.074 91.069 42.074L91.595.105"})),a.createElement("g",{fill:"#001E36",fillRule:"nonzero"},a.createElement("path",{d:"M691.41 242.513h69.342c19.81 0 32.449-12.685 32.449-30.17s-13.662-29.829-32.792-29.829h-69v60zm0-97.027h62.85c19.47 0 32.109-13.715 32.109-30.173 0-16.455-12.296-29.829-31.426-29.829H691.41v60.002zM647 284V44h109.31c46.116 0 73.782 27.772 73.782 63.428 0 23.313-11.612 43.2-30.059 53.828C827.703 172.572 840 195.199 840 219.542 840 256.228 811.988 284 763.825 284H647zM1007.229 192.67c0-28.715-23.628-53.33-52.729-53.33-30.132 0-52.731 24.615-52.731 53.33 0 28.718 22.599 52.988 52.731 52.988 28.76 0 52.729-24.27 52.729-52.988zm-147.229 0C860 140.023 900.743 99 950.047 99c22.94 0 41.43 9.23 54.442 22.905v-19.827H1049v181.187h-44.51v-19.486C991.477 277.111 972.987 286 950.046 286 900.743 286 860 243.266 860 192.67zM1081 192.67c0-52.647 42.674-93.67 93.958-93.67 39.235 0 72.274 24.272 86.042 59.142l-40.955 11.283c-7.915-17.435-24.436-30.426-45.087-30.426-29.255 0-51.97 24.956-51.97 53.671 0 28.718 22.715 53.331 51.97 53.331 20.994 0 37.512-12.648 45.087-30.426L1261 227.199c-13.422 34.186-46.116 58.801-86.042 58.801-53.003 0-93.958-42.734-93.958-93.33M1288 284V44h44.783v139.2l74.756-80.914h53.394l-78.198 82.971L1463 284h-52.362l-54.429-69.944-23.426 25.373V284H1288M1612 282.795c-56.02 15.765-100.351-4.458-100.351-58.27V140.89H1479v-38.389h32.649v-41.82L1555.98 48v54.501h54.3v38.39h-54.3v83.29c0 16.797 17.527 29.137 56.02 15.426v43.188M1642 284V102.86h44.39v26.997c10.587-18.795 32.442-33.15 67.61-27.682v47.506c-33.805-11.278-67.61 6.493-67.61 42.037V284H1642M1914.227 192.67c0-28.715-23.625-53.33-52.726-53.33-30.131 0-52.728 24.615-52.728 53.33 0 28.718 22.597 52.988 52.728 52.988 28.762 0 52.726-24.27 52.726-52.988zm-147.227 0c0-52.647 40.745-93.67 90.049-93.67 22.942 0 41.427 9.23 54.438 22.905v-19.827H1956v181.187h-44.513v-19.486C1898.476 277.111 1879.991 286 1857.05 286c-49.304 0-90.049-42.734-90.049-93.33zM1988 192.67c0-52.647 42.679-93.67 93.959-93.67 39.234 0 72.276 24.272 86.041 59.142l-40.954 11.283c-7.915-17.435-24.436-30.426-45.087-30.426-29.255 0-51.968 24.956-51.968 53.671 0 28.718 22.713 53.331 51.968 53.331 20.994 0 37.515-12.648 45.087-30.426L2168 227.199c-13.422 34.186-46.116 58.801-86.041 58.801-53 0-93.959-42.734-93.959-93.33M2194 284V44h44.784v139.2l74.754-80.914h53.398l-78.2 82.971L2369 284h-52.36l-54.43-69.944-23.426 25.373V284H2194"})))))}},78830:(e,t,l)=>{l.d(t,{A:()=>
1o});var n=l(95155),r=l(66031),a=l(12115),i=l(18987),s=l(58847);let o=a.forwardRef((e,t)=>{let{initialPoint:l,fill:o=s.Q1.primary500,radius:c=7}=e,d=(0,i.ko)(),[u,m]=(0,a.useState)(!1),p=e=>{var t,l;null===(l=d.current)||void 0===l||null===(t=l.getSource("scrubber"))||void 0===t||t.setData(r.featureCollection([r.point(e.coordinates)])),u||m(!0)};return(0,a.useImperativeHandle)(t,()=>({setCoordinatesValue:p,setVisible:m})),u?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.kL,{id:"scrubber",type:"geojson",data:r.featureCollection(l?[r.point(l.coordinates)]:[]),children:(0,n.jsx)(i.Wd,{type:"circle",id:"scrubber-circle",paint:{"circle-color":o,"circle-radius":c,"circle-stroke-width":4,"circle-stroke-color":"#FFFFFF"}})})}):null})},97074:(e,t,l)=>{l.d(t,{A:()=>o});var n=l(36420),r=l(96299),a=l(20284),i=l(18783),s=l(40051);let o=function(){let{onToken:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.A)(),l=(0,a.w)(),{resetStore:o}=(0,n.m)(),c=t=>{l((0,s.WG)(t)),o(),null==e||e(t),r.A.identify("user-id-set-by-backend")},d=async e=>{let{key:l}=(await t.post("/auth/login/",e)).data;c(l),r.A.track("User Logged In",{email:e.username})},u=async e=>{let{email:l,name:n,password1:a}=e,[i,...s]=n.split(" "),o=s.join(" "),{key:d}=(await t.post("/auth/registration/",{email:l,username:l,first_name:i,last_name:o,password1:a,password2:a})).data;c(d),r.A.track("User Signed Up",{email:l,firstName:i,lastName:o})};return{handleToken:c,login:d,register:u,checkEmailExists:async e=>{let{exists:l}=(await t.post("/auth/registration/check-email/",{email:e})).data;return l},logout:()=>{r.A.track("User Logged Out"),l((0,s.ri)()),o()}}}},78285:(e,t,l)=>{l.d(t,{A:()=>f});var n=l(95155),r=l(66031),a=l(12115),i=l(81602),s=l(4779),o=l(20320),c=l(9288),d=l(55805);let u=e=>{let t=(0,c.d4)(d.T0),l=(0,c.d4)(d.EZ);if(!t||!l||!e)return{};let n=[l,t];return{distance:r.distance(n,e,{units:"meters"}),bearing:r.bearing(n,e)}};var m=l(13618),p=l(3802),h=l(29),x=l(58847),v=l(11408);let f=(e,t)=>{var l,c,d;let{type:f,childrenCount:g}=e,j=null!==(d=null===(c=e.data)||void 0===c?void 0:null===(l=c.feature)||void 0===l?void 0:l.geometry)&&void 0!==d?d:e.geometry,{formatCoordinates:A=p.NC}=null!=t?t:{},b=(0,m.A)(),y=(0,a.useRef)(null),{distance:w,bearing:E}=u((null==j?void 0:j.type)==="Point"&&j.coordinates),k={[v.YB.line]:b.distance(0).toFormat("0.000"),[v.YB.marker]:"Set point",[v.YB.polygon]:b.area(0).toFormat("0.000")}[e.type],N=e=>{if((null==e?void 0:e.type)==="Point"){let t=e.coordinates;return t?w?[b.distance(w).toFormat("0,0.0"),void 0!==E&&(0,p.mg)(E)].filter(h.vN).join(", ")+" from me":A(t):k}if((null==e?void 0:e.type)==="LineString"){if(!e)return k;let t=r.length(r.feature(e),{units:"meters"});return b.distance(t).toFormat("0.00")}if((null==e?void 0:e.type)==="Polygon"){if(!e)return k;let t=r.area(r.feature(e));return b.area(t).toFormat("0.000")}return f===v.YB.folder&&g?"".concat(g," items"):k};return{subtitleRef:y,subtitle:N(j),getSubtitleAdditional:(t,l)=>{let{addLeftMargin:r=!0}=null!=l?l:{};if(!e.terrainInfo)return null;let{terrainInfo:a,terrainCacheKey:c}=e;return a&&c===a.cacheKey?f===v.YB.marker?!!a.elevation&&(0,n.jsxs)(i.default,{style:t,children:[r?" ⢠":"",b.elevation(a.elevation).toFormat("0,0")]}):f===v.YB.line?(0,n.jsxs)(s.A,{alignCenter:!0,children:[(0,n.jsx)(o.A,{name:"trending-up",color:t.color,style:r?{marginLeft:12}:{}}),(0,n.jsxs)(i.default,{style:t,children:[" ",b.elevation(a.elevationGain).toFormat("0,0")," "]}),(0,n.jsx)(o.A,{name:"trending-down",color:t.color,style:{marginLeft:x.R5.small}}),(0,n.jsxs)(i.default,{style:t,children:[" ",b.elevation(a.elevationLoss).toFormat("0,0")]})]}):null:null},updateSubtitle:e=>{var t;let l=N(e);null===(t=y.current)||void 0===t||t.setNativeProps({text:l})}}}},94178:(e,t,l)=>{l.d(t,{A:()=>a});var n=l(12115);let r="data-status",a=e=>{let[t,l]=(0,n.useState)("loading");return(0,n.useEffect)(()=>{let t=document.querySelector('script[src="'.concat(e,'"]'));if(t){var n;l(null!==(n=t.getAttribute(r))&&void 0!==n?n:"loading")}else(t=document.createElement("script")).src=e,t.async=!0,t.setAttribute(r,"loading"),document.body.appendChild(t);let a=e=>{let n="load"===e.type?"ready":"error";null==t||t.setAttribute(r,n),l(n)};return t.addEventListener("load",a),t.addEventListener("error",a),()=>{null==t||t.removeEventListener("load",a),null==t||t.removeEventListener("error",a)}},[e]),["loading"===t,"error"===t]}},23193:(e,t,l)=>{l.d(t,{Tm:()=>c,O3:()=>u,VG:()=>m,NO:()=>p});
1var n=l(20365),r=l(40215);let a={bar_pinlet:"martini",cafe_pinlet:"coffee",restaurant_pinlet:"utensils",shopping_pinlet:"shopping-bag",convenience_pinlet:"store",shoppingcart_pinlet:"shopping-cart",pharmacy_pinlet:"pill",atm_pinlet:"credit-card","bank-intl_pinlet":"landmark",gas_pinlet:"fuel",hotel_pinlet:"bed",postoffice_pinlet:"mail",dolphin_pinlet:"fish",golf_pinlet:"land-plot",historic_pinlet:"castle",movie_pinlet:"film",museum_pinlet:"landmark",theater_pinlet:"drama",airport_pinlet:"plane",bus_share_taxi_pinlet:"bus",train_rail_1_pinlet:"train-front",cemetery_pinlet:"tree-pine","civic-bldg_pinlet":"landmark",library_pinlet:"book-open",monument_pinlet:"landmark",parking_pinlet:"square-parking",school_pinlet:"school",worship_christian_pinlet:"church",boating_pinlet:"ship",camping_pinlet:"tent",tree_pinlet:"tree-pine",paw_pinlet:"paw-print",police_pinlet:"siren"};var i=l(83001),s=l(50904),o=function(e){return e.PRICE_LEVEL_UNSPECIFIED="PRICE_LEVEL_UNSPECIFIED",e.PRICE_LEVEL_FREE="PRICE_LEVEL_FREE",e.PRICE_LEVEL_INEXPENSIVE="PRICE_LEVEL_INEXPENSIVE",e.PRICE_LEVEL_MODERATE="PRICE_LEVEL_MODERATE",e.PRICE_LEVEL_EXPENSIVE="PRICE_LEVEL_EXPENSIVE",e.PRICE_LEVEL_VERY_EXPENSIVE="PRICE_LEVEL_VERY_EXPENSIVE",e}({});let c=["GetPlaceDetails","GetSearchPlaces"],d={[o.PRICE_LEVEL_UNSPECIFIED]:-1,[o.PRICE_LEVEL_FREE]:0,[o.PRICE_LEVEL_INEXPENSIVE]:1,[o.PRICE_LEVEL_MODERATE]:2,[o.PRICE_LEVEL_EXPENSIVE]:3,[o.PRICE_LEVEL_VERY_EXPENSIVE]:4},u=e=>d[e],m=(e,t)=>n.stringifyUrl({url:"https://places.googleapis.com/v1/".concat(e.name,"/media"),query:{key:i.sB,...t}}),p=e=>{var t;let{iconMaskBaseUri:l}=e,n=r.A(null!==(t=null==l?void 0:l.split("/"))&&void 0!==t?t:[]),i=n?a[n]:void 0;return i&&!s[i]&&(i=void 0),i}},91173:(e,t,l)=>{l.d(t,{A:()=>Y});var n,r,a,i,s,o=l(95155),c=l(12115),d=l(11414),u=l(34025),m=l(68921),p=l(6816),h=l(96299),x=l(18783),v=l(94178),f=l(83001),g=l(27146);let j=e=>{let{state:t,onSuccess:l,onError:n}=e,[r,a]=(0,c.useState)(!1),[i]=(0,v.A)("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");return(0,c.useEffect)(()=>{if(!1===i){var e;null===(e=window.AppleID)||void 0===e||e.auth.init({clientId:f.iE,scope:"name email",redirectURI:g.r8,usePopup:!0,state:t}),a(!0)}},[i]),{isLoaded:r,onClick:async e=>{null==e||e.preventDefault();try{var t;let e=await (null===(t=window.AppleID)||void 0===t?void 0:t.auth.signIn());l(e)}catch(e){null==n||n(e)}}}};function A(){return(A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(this,arguments)}let b=function(e){return c.createElement("svg",A({width:14,height:16,viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg"},e),n||(n=c.createElement("path",{d:"M11.57 14.947c-.856.795-1.799.671-2.698.296-.955-.382-1.83-.406-2.839 0-1.257.52-1.924.37-2.68-.296C-.923 10.727-.292 4.301 4.566 4.059c1.178.06 2.003.624 2.697.671 1.031-.201 2.018-.777 3.122-.702 1.327.103 2.319.605 2.981 1.508-2.728 1.573-2.082 5.02.425 5.989-.502 1.262-1.145 2.51-2.224 3.433l.001-.011zM7.168 4.013C7.04 2.138 8.626.596 10.449.444c.251 2.163-2.05 3.781-3.28 3.57z",fill:"#000",fillRule:"nonzero"})))},y=e=>{let{onSuccess:t,className:l}=e,n=(0,x.A)(),{isLoaded:r,onClick:a}=j({onSuccess:async e=>{try{var l,r,a;let{code:i,id_token:s}=e.authorization,{firstName:o,lastName:c}=null!==(r=null===(l=e.user)||void 0===l?void 0:l.name)&&void 0!==r?r:{},d=await n.post("/auth/apple/web/",{id_token:s,access_token:i,first_name:o,last_name:c}),{key:u}=null!==(a=d.data)&&void 0!==a?a:{};if(u)t(u),h.A.track("User Logged In With Apple");else throw console.error("Error logging in with Apple",d.data),Error()}catch(e){console.error(e),d.oR.error("Something went wrong")}},onError:()=>d.oR.error("Something went wrong")});return(0,o.jsxs)(p.A,{disabled:!r,onClick:a,className:(0,m.A)("flex items-center justify-center gap-2",l),children:[(0,o.jsx)(b,{})," Continue with Apple"]})};var w=l(80022),E=l(50887);function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(this,arguments)}let N=function(e){return c.createElement("svg",k({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=c.createElement("path",{d:"M15.83 8.18c0-.527-.047-1.027-.127-1.513H8.17v3.006h4.313a3.714 3.714 0 01-1.6 2.387v2h2.574c1.506-1.393 2.373-3.447 2.373-5.88z",fill:"#4285F4"})),a||(a=c.createElement("path",{d:"M8.17 16c2.16 0 3.967-.72 5.287-1.94l-2.574-2c-.72.48-1.633.773
1-2.713.773-2.087 0-3.853-1.406-4.487-3.306H1.03v2.06A7.988 7.988 0 008.17 16z",fill:"#34A853"})),i||(i=c.createElement("path",{d:"M3.683 9.527A4.642 4.642 0 013.43 8c0-.533.093-1.047.253-1.527v-2.06H1.03a7.907 7.907 0 000 7.174l2.653-2.06z",fill:"#FBBC05"})),s||(s=c.createElement("path",{d:"M8.17 3.167c1.18 0 2.233.406 3.067 1.2l2.28-2.28C12.137.793 10.33 0 8.17 0a7.988 7.988 0 00-7.14 4.413l2.653 2.06c.634-1.9 2.4-3.306 4.487-3.306z",fill:"#EA4335"})))},C=e=>{let{onSuccess:t,className:l}=e,n=(0,x.A)(),[r,a]=(0,E.A)(async e=>{let{key:l}=(await n.post("/auth/google/web/",{code:e})).data;t(l),h.A.track("User Logged In With Google")}),i=()=>d.oR.error("Something went wrong"),s=(0,w.mg)({onSuccess:e=>{let{code:t}=e;try{a(t)}catch(e){console.error(e),i()}},onError:i,flow:"auth-code"});return(0,o.jsxs)(p.A,{loading:r,className:(0,m.A)("flex items-center justify-center gap-2",l),onClick:()=>s(),children:[(0,o.jsx)(N,{})," Continue with Google"]})};var _=l(56086),I=l(37242),S=l(75423),L=l(90098),P=l(34776);let R=u.Ik().shape({email:u.Yj().required("This field is required").email("Must be a valid email")}),M=e=>{let{email:t=""}=e,l=(0,x.A)(),{pop:n}=(0,P.j)();return(0,o.jsx)(L.A,{title:"Reset password",description:"Enter your email address and we'll send you a link to reset your password.",onClickBackButton:n,width:"sm",children:(0,o.jsx)(_.A,{initialValues:{email:t},validateOnMount:!0,validationSchema:R,onSubmit:async e=>{var t,r;let a=null!==(r=null===(t=(await l.post("/auth/password/reset/",e)).data)||void 0===t?void 0:t.detail)&&void 0!==r?r:"Password reset email sent";d.oR.success(a),n()},children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(S.A,{inputClassName:"!text-sm",name:"email",placeholder:"Enter email address",autoFocus:!t}),(0,o.jsx)(I.A,{className:"w-full",children:"Submit"})]})})})};var O=l(84173),F=l(97074);let V=u.Ik({username:u.Yj().required("Required").email("Must be a valid email"),password:u.Yj().required("Required")}),z=e=>{let{email:t,onComplete:l}=e,{pop:n,push:r}=(0,P.j)(),{closeModal:a}=(0,O.k3)(),{login:i}=(0,F.A)({onToken:()=>{a(),d.oR.success("Logged in"),null==l||l()}});return(0,o.jsx)(L.A,{title:"Log in",onClickBackButton:n,width:"sm",children:(0,o.jsx)(_.A,{initialValues:{username:null!=t?t:"",password:""},isInitialValid:!1,validationSchema:V,onSubmit:i,children:e=>{let{values:l}=e;return(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(S.A,{inputClassName:"!text-sm",hideErrors:!0,name:"username",placeholder:"Enter email address",autoFocus:!t}),(0,o.jsxs)("div",{children:[(0,o.jsx)(S.A,{autoFocus:!!t,inputClassName:"!text-sm",name:"password",type:"password",placeholder:"Password"}),(0,o.jsx)("button",{type:"button",className:"mt-2 text-sm font-medium text-blue-600 hover:text-blue-500",onClick:()=>r(M,{email:l.username}),children:"Forgot password?"})]}),(0,o.jsx)(I.A,{className:"w-full",children:"Log in"})]})}})})},D=u.Ik().shape({email:u.Yj().required("This field is required").email("Must be a valid email"),name:u.Yj().required("This field is required").test("fullName","Please include first and last name",e=>{let[t,l]=(null!=e?e:"").split(" ");return!!t&&!!l}),password1:u.Yj().required("This field is required")}),B=e=>{let{email:t,onComplete:l}=e,{pop:n}=(0,P.j)(),{closeModal:r}=(0,O.k3)(),{register:a}=(0,F.A)({onToken:()=>{r(),d.oR.success("Logged in"),null==l||l()}});return(0,o.jsx)(L.A,{title:"Create an account",onClickBackButton:n,width:"sm",children:(0,o.jsx)(_.A,{initialValues:{email:null!=t?t:"",name:"",password1:""},isInitialValid:!1,validationSchema:D,onSubmit:a,children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(S.A,{inputClassName:"!text-sm",name:"email",placeholder:"Enter email address",autoFocus:!t}),(0,o.jsx)(S.A,{inputClassName:"!text-sm",name:"name",placeholder:"Full name",autoFocus:!!t}),(0,o.jsx)(S.A,{inputClassName:"!text-sm",name:"password1",type:"password",placeholder:"Password"}),(0,o.jsx)(I.A,{className:"w-full",children:"Create an account"})]})})})},T=u.Ik({email:u.Yj().required("Required").email("Must be a valid email")}),H=e=>{let{onComplete:t}=e,{push:l}=(0,P.j)(),{closeModal:n}=(0,O.k3)(),{handleToken:r,checkEmailExists:a}=(0,F.A)({onToken:()=>{n(),d.oR.success("Logged in")}});return(0,o.jsx)(L.A,{width:"sm",title:"Welcome to Backtrack",description:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:"Step 1: Create an account."}),(0,o.jsx)("li",{children:"Step 2: Make a map to plan your adventure."}),(0,o.jsx)("li",{children:"Step 3: Get outside!"})]}),children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(C,{onSuccess:r}),(0,o.jsx)(y,{onSuccess:r}),(0,o.jsxs)("div",{className:"isolate flex items-center justify-center text-xs font-medium text-gray-500",children:[(0,o.jsx)("div",{className:"absolute left-0 right-0 -z-10 h-[1px] bg-gray-200"}),(0,o.jsx)("div",{className:"bg-white p-1",children:"or"})]}),(0,o.jsx)(_.A,{initialValues:{email:""},isInitialValid:!1,validationSchema:T,onSubmit:async e=>{let{email:n}=e;try{await a(n)?l(z,{email:n,onComplete:t}):l(B,{email:n,onComplete:t})}catch(l){var r;let e=null==l?void 0:null===(r=l.response)||void 0===r?void 0:r.status,t="Sorry, something went wrong. Please try again later.";429===e&&(t="Too many requests. Please wait a minute and try again."),d.oR.error(t)}},children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(S.A,{inputClassName:"!text-sm",hideErrors:!0,name:"email",placeholder:"Enter email address"}),(0,o.jsx)(I.A,{className:"w-full",children:"Continue"})]})})]})})};var q=l(75914);let Y=e=>{let{onComplete:t}=e;return(0,o.jsx)(q.A,{initial:{component:H,props:{onComplete:t}},className:"flex min-h-full flex-col justify-center"})}},61598:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(95155),r=l(12115),a=l(69768),i=l(48016),s=l(97901),o=l(19789);let c=e=>{var t,l,c;let{displayMap:d,displayMapStyle:u,units:m,mapRef:p,children:h,...x}=e,[v,f]=(0,r.useState)(null),{mapStyle:g}=(0,r.useMemo)(()=>(0,s.yW)(d,m),[d,m]);return(0,n.jsxs)(a.A,{ref:(c=[f,p],e=>
1{c.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})}),mapStyle:g,initialViewState:{bounds:null!==(t=d.bbox)&&void 0!==t?t:o.iE,fitBoundsOptions:{maxZoom:14}},...x,children:[u&&(0,n.jsx)(i.A,{style:u,map:null!==(l=null==v?void 0:v.getMap())&&void 0!==l?l:null}),h]})}},10271:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(95155),r=l(3797),a=l(66442),i=l(795),s=l(58177);let o=e=>{let[t,l]=e;return"https://forecast.weather.gov/MapClick.php?lat=".concat(l,"&lon=").concat(t,"&site=all&smap=1")},c=e=>{let{lngLat:t,onClose:l,displayMap:c}=e,{measure:d,line:u,marker:m}=(0,s.A)(),{formatCoordinates:p}=(0,i.A)(),{isLocalMap:h,permissions:x}=c,{canEdit:v}=x,f=v&&!h;return(0,n.jsxs)(r.A,{onClose:l,children:[t&&(0,n.jsx)(a.A,{className:"px-4 py-2 text-xs font-medium",text:p(t.toArray())}),(0,n.jsx)(r.A.Divider,{}),f&&(0,n.jsx)(r.A.ActionItem,{action:m,onClick:()=>m.handler(!1,{point:t}),children:"Add Waypoint"}),f&&(0,n.jsx)(r.A.ActionItem,{action:u,onClick:()=>u.handler(!1,{startPoint:t}),children:"Add Route"}),(0,n.jsx)(r.A.Divider,{}),(0,n.jsx)(r.A.ActionItem,{action:d,onClick:()=>d.handler(!1,{startPoint:t})}),t&&(0,n.jsx)(r.A.Item,{icon:"external-link",onClick:()=>window.open(o(t.toArray()),"_blank"),children:"NWS forecast"})]})}},96241:(e,t,l)=>{l.d(t,{A:()=>J});var n=l(95155),r=l(9288),a=l(68921),i=l(94928),s=l(12115),o=l(11414),c=l(54646),d=l(20320),u=l(51214),m=l(96299),p=l(32722),h=l(50894),x=l(41632),v=l(75684),f=l(51138),g=l(22279);let j=e=>{let{mapRef:t,proRequired:l=!0}=e,[r,j]=(0,i.fp)(u.ZD),A=(0,f.A)(r),b=(0,s.useRef)(void 0),y=(0,x.A)(),{displayMap:w}=(0,h.Q)(),E=(0,v.A)(()=>{let e=!r;null==t||t.easeTo({pitch:e?60:0,duration:500}),setTimeout(()=>{j(e)},e?0:500),m.A.track(e?g.X.Map3DEnabled:g.X.Map3DDisabled,{mapId:w.id})},{source:p.X.ThreeDMap,proRequired:!r&&l}),k=e=>{var l;let n=null!==(l=null==t?void 0:t.getPitch())&&void 0!==l?l:0;n>0&&!A.current?j(!0):0===n&&A.current&&j(!1)},N=e=>{"mapbox-dem"===e.sourceId&&(e.isSourceLoaded||"visibility"!==e.sourceDataType||b.current||(b.current=o.Ay.loading("Loading 3D terrain",{duration:1/0})),e.isSourceLoaded&&"other:mapbox-dem"===e.sourceCacheId&&b.current&&(o.Ay.dismiss(b.current),b.current=void 0))};return(0,s.useEffect)(()=>(null==t||t.on("pitch",k),null==t||t.on("sourcedata",N),()=>{null==t||t.off("pitch",k),null==t||t.off("sourcedata",N)}),[t]),(0,n.jsx)(c.A,{tooltip:"Toggle 3D",className:(0,a.A)("h-8 w-8 text-[#333333]",r&&"!bg-slate-700 !text-white"),onClick:E,badge:!y&&l?(0,n.jsx)(d.A,{name:"lock",size:10}):void 0,badgeClassName:"!bg-gray-500 flex items-center justify-center",children:"3D"})};var A=l(58272);let b=e=>{let{mapRef:t}=e,l=(0,s.useRef)(null),r=e=>{var n;let r=null!==(n=null==t?void 0:t.getBearing())&&void 0!==n?n:0;l.current&&l.current.setBearing(r)};return(0,s.useEffect)(()=>(null==t||t.on("rotate",r),()=>{null==t||t.off("rotate",r)}),[t]),(0,n.jsx)(A.A,{ref:l,onClick:()=>null==t?void 0:t.resetNorth()})};var y=l(66376),w=l(99990),E=l.n(w);let k=e=>{let{mapRef:t}=e,l=(0,s.useRef)(null),[r,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{var e;if(!t)return;let n=new(E()).GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0,showUserHeading:!0}),r=()=>i(!0),a=()=>i(!1);return n.on("trackuserlocationstart",r),n.on("trackuserlocationend",a),n.on("error",a),t.addControl(n,"top-right"),null===(e=n._container)||void 0===e||e.classList.add("hidden"),l.current=n,()=>{try{l.current=null,null==n||n.off("trackuserlocationstart",r),null==n||n.off("trackuserlocationend",a),null==n||n.off("error",a),null==t||t.removeControl(n)}catch(e){}}},[t]),(0,n.jsx)(c.A,{tooltip:r?"Stop following your location":"Find my location",className:(0,a.A)("h-8 w-8 text-[#333333]",r&&"!bg-slate-700 !text-white"),onClick:()=>{var e;return null===(e=l.current)||void 0===e?void 0:e.trigger()},children:(0,n.jsx)(d.A,{name:"lucide-locate",size:17})})};var N=l(61994),C=l(92632),_=l(61676),I=l(17821);let S=e=>{let{}=e,{displayMap:t}=(0,h.Q)(),[l,r]=(0,i.fp)(u.PK),o=(0,s.useMemo)(()=>(0,I.ih)(t),[t]),p=(0,_.A)(()=>{r(e=>!e),m.A.track(l?g.X.LayersPanelClosed:g.X.LayersPanelOpened)});return(0,C.A)({hotkey:"l",handler:p}),(0,n.jsx)(c.A,{tooltip:(0,n.jsx)(N.A,{label:"Layers",shortcut:"l"}),className:(0,a.A)("h-8 w-8 text-[#333333]",l&&"!bg-slate-700 !text-white"),onClick:p,badge:o>0?o:void 0,children:(0,n.jsx)(d.A,{name:"layers",size:18})})},L=e=>{let{action:t}=e,[{tool:l},r]=(0,i.fp)(u.GI),{hotkey:s,label:o,id:m,icon:p}=t,h=l===m,x=(0,_.A)(()=>
1{if(h){r({tool:u.KR.Select});return}t.handler()});return(0,n.jsx)(c.A,{tooltip:(0,n.jsx)(N.A,{label:o,shortcut:s}),className:(0,a.A)("h-8 w-8 text-[#333333]",h&&"!bg-slate-700 !text-white"),onClick:x,children:!!p&&(0,n.jsx)(d.A,{name:p,size:18})})};var P=l(31385);let R=e=>{let{mapRef:t}=e;return(0,n.jsx)(P.A,{onClickZoomIn:()=>null==t?void 0:t.zoomIn(),onClickZoomOut:()=>null==t?void 0:t.zoomOut()})};var M=l(48173),O=l.n(M),F=l(91173),V=l(6816),z=l(699),D=l(84173),B=l(27146),T=l(48541);let H=e=>{let{onClick:t}=e;return(0,n.jsxs)(c.A,{className:"h-8 bg-white/50 p-1 px-2 backdrop-blur-sm",onClick:t,children:[(0,n.jsx)("div",{className:"mr-2 text-sm font-medium",children:"Powered By"}),(0,n.jsx)(T.default,{className:"h-[15px] w-auto"})]})},q=e=>{let{allowPopupExpand:t=!0,className:l}=e,{showModal:r}=(0,D.k3)(),{displayMap:i}=(0,h.Q)(),[o,c]=(0,s.useState)(!0);return o?(0,n.jsx)(H,{onClick:()=>{m.A.track(g.X.BacktrackAttributionClicked,{mapId:i.id}),t?c(e=>!e):window.open(B.r8,"_blank")}}):(0,n.jsxs)("div",{className:(0,a.A)("max-w-60 relative flex flex-col items-start gap-2 rounded-lg bg-white p-4 shadow-md",l),children:[(0,n.jsx)(z.A,{icon:"x",className:"absolute right-2 top-2",onClick:()=>c(e=>!e)}),(0,n.jsx)(T.default,{className:"h-4 w-auto"}),(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"Find and plan your next adventure with the ultimate backcountry navigation app."}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(V.A,{variant:"primary",className:"!px-2 !py-2 text-xs",onClick:()=>r(F.A),children:"Sign Up"}),(0,n.jsx)(O(),{href:"/",target:"_blank",children:(0,n.jsx)(V.A,{variant:"transparent-bg",className:"text-xs",children:"Learn More"})})]})]})};var Y=l(97095),U=l(47147),W=l(66442),X=l(795);let G=e=>{let{mapRef:t}=e,[l]=(0,i.fp)(u.F1),r=U.Fr?u.WH.Center:l,[a,o]=(0,s.useState)(),{formatCoordinates:c}=(0,X.A)();if((0,s.useEffect)(()=>{if(!t||r!==u.WH.Cursor)return;o(t.getCenter());let e=e=>{o(e.lngLat)};return t.on("mousemove",e),()=>{t.off("mousemove",e)}},[t,r]),(0,s.useEffect)(()=>{if(!t||r!==u.WH.Center)return;let e=()=>{o(t.getCenter())};e();let l=()=>{e()};return t.on("move",l),()=>{t.off("move",l)}},[t,r]),r===u.WH.Hide)return null;let d=a?c(a.toArray()):"";return(0,n.jsx)("div",{className:"rounded-md bg-white/50 p-2 text-xs backdrop-blur-sm",children:a&&r===u.WH.Center?(0,n.jsx)(W.A,{className:"tabular-nums",text:d}):a?(0,n.jsx)("span",{className:"tabular-nums",children:d}):null})};var Q=l(58177),Z=l(55805);let K=e=>{let{children:t}=e;return(0,n.jsx)(Y.A,{className:"flex flex-col items-center gap-2 rounded-3xl p-2 ",variant:"gray",children:t})},J=e=>{let{mapRef:t,mapInsets:l={top:0,right:0,bottom:0,left:0},showCursorInfo:a=!0,proRequiredFor3d:i=!0,allowBacktrackAttribution:s=!0,isEmbedded:o,showCreationTools:c,isLocalMap:d}=e,u=(0,r.d4)(Z.eP),{measure:m,line:p,marker:h,polygon:x}=(0,Q.A)();return(0,n.jsxs)(y.A,{mapInsets:l,bottom:(0,n.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[a&&(0,n.jsx)(G,{mapRef:t}),!u&&s&&(0,n.jsx)(q,{allowPopupExpand:!o,className:"pointer-events-auto"})]}),children:[(0,n.jsx)(b,{mapRef:t}),(0,n.jsxs)(K,{children:[(0,n.jsx)(R,{mapRef:t}),(0,n.jsx)(j,{mapRef:t,proRequired:i})]}),!o&&(0,n.jsxs)(K,{children:[(0,n.jsx)(L,{action:m}),(0,n.jsx)(k,{mapRef:t})]}),!d&&!o&&(0,n.jsx)(K,{children:(0,n.jsx)(S,{})}),c&&(0,n.jsx)(K,{children:[h,p,x].map(e=>(0,n.jsx)(L,{action:e},e.id))})]})}},58272:(e,t,l)=>{l.d(t,{A:()=>o});var n=l(95155),r=l(12115),a=l(92640),i=l(54646),s=l(58847);let o=r.forwardRef((e,t)=>{let{onClick:l}=e,o=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,()=>({setBearing:e=>{o.current&&(o.current.style.transform="rotate(".concat(360-e,"deg)"))}})),(0,n.jsx)(i.A,{ref:o,onClick:l,className:"h-[48px] w-[48px] !rounded-full",children:(0,n.jsx)(a.A,{className:"scale-[0.6]",northArrowColor:s.Q1.red})})})},54646:(e,t,l)=>{l.d(t,{A:()=>s});var n=l(95155),r=l(68921),a=l(12115),i=l(8129);let s=a.forwardRef((e,t)=>{let{className:l,children:a,badge:s,badgeClassName:o,tooltip:c,...d}=e;return(0,n.jsx)(i.A,{content:c,place:"left",disable:!c,portal:!0,children:(0,n.jsxs)("div",{ref:t,className:(0,r.A)("pointer-events-auto relative flex cursor-pointer select-none items-center justify-center rounded-full bg-white text-sm font-medium shadow-md hover:bg-gray-100",l),...d,children:[a,void 0!==s&&(0,n.jsx)("div",{className:(0,r.A)("absolute -right-2 -top-2 h-4 w-4 roun
1ded-full bg-primary500 text-center text-xs text-white",o),children:s})]})})})},66376:(e,t,l)=>{l.d(t,{A:()=>r});var n=l(95155);l(12115);let r=e=>{let{mapInsets:t={top:0,right:0,bottom:0,left:0},bottom:l,children:r}=e;return(0,n.jsxs)("div",{className:"pointer-events-none absolute flex flex-col items-end justify-between px-2 pb-2 pt-4",style:{bottom:t.bottom+20,top:t.top,right:t.right},children:[(0,n.jsx)("div",{className:"flex flex-col items-center gap-4",children:r}),l]})}},31385:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(95155),r=l(33473),a=l(36527),i=l(54646),s=l(61994),o=l(60821);let c=e=>{let{onClickZoomIn:t,onClickZoomOut:l}=e,{zoomIn:c,zoomOut:d}=(0,o.A)({enableHotkeys:!1}),u=[{Icon:r.A,onClick:t,tooltip:(0,n.jsx)(s.A,{label:c.label,shortcut:c.hotkey})},{Icon:a.A,onClick:l,tooltip:(0,n.jsx)(s.A,{label:d.label,shortcut:d.hotkey})}];return(0,n.jsx)(n.Fragment,{children:u.map((e,t)=>{let{Icon:l,onClick:r,tooltip:a}=e;return(0,n.jsx)(i.A,{tooltip:a,onClick:r,className:"h-8 w-8",children:(0,n.jsx)(l,{className:"h-4 w-4 text-[#333333]",strokeWidth:3})},t)})})}},97499:(e,t,l)=>{l.d(t,{A:()=>D});var n=l(95155),r=l(68921),a=l(96380),i=l(4332),s=l(699),o=l(8129),c=l(59876),d=l(27200),u=l(50894),m=l(36152),p=l(61676),h=l(23193);let x=e=>{var t;let{feature:l,place:x,mapIdToNodeId:v}=e,{displayMap:f}=(0,u.Q)(),{placeIdToNodeId:g,permissions:j}=f,{canEdit:A}=j,{properties:b}=l,{name:y}=null!=b?b:{},{googleMapsUri:w,id:E,displayName:k}=null!=x?x:{},N=null!==(t=null==k?void 0:k.text)&&void 0!==t?t:y,[C]=(0,d.A)(),[_]=(0,m.A)({refetchQueries:h.Tm}),I=(0,p.A)(async e=>{await C({name:N,geometry:l.geometry,place:x,mapId:e})}),S=!!(E&&g[E]),L=!!(E&&!a.A(v))||S;return(0,n.jsxs)("div",{className:"flex items-center gap-2 text-blue-500",children:[A&&(0,n.jsx)(c.A,{overlay:e=>{let{close:t}=e;return(0,n.jsx)(i.A,{title:"Save to map",onClose:t,onSelectMap:async e=>{let t=null==v?void 0:v[e];t?await _([t],{mapId:e}):I(e)},showCheckmarkForMap:e=>!!(null==v?void 0:v[e])})},children:e=>{let{anchorRef:t,toggleOpen:l}=e;return(0,n.jsx)(o.A,{content:"Save to map",children:(0,n.jsx)(s.A,{ref:t,icon:L?"lucide-bookmark-check":"bookmark",size:16,className:(0,r.A)(L&&"!bg-blue-100 !text-blue-500 !ring-blue-500"),onClick:()=>{f.isLocalMap||S?l():I(f.id)}})})}}),w&&(0,n.jsx)(o.A,{content:"Open in Google Maps",children:(0,n.jsx)(s.A,{icon:"external-link",size:16,onClick:()=>window.open(w,"_blank")})})]})};var v=l(66442),f=l(48139),g=l(89142),j=l(5565),A=l(7801),b=l.n(A),y=l(61944),w=l(20320);let E=(0,g.Ay)(f.A)({fontSize:16,"& .MuiRating-iconFilled":{color:"#FBBD05"}}),k=e=>{let{children:t,className:l}=e;return(0,n.jsx)("div",{className:(0,r.A)("py-4 [&:not(:first-child)]:border-t",l),children:t})},N=e=>{let{icon:t,children:l}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-4 overflow-hidden",children:[(0,n.jsx)("div",{className:"w-4 shrink-0",children:(0,n.jsx)(w.A,{name:t,size:16,className:"text-blue-500"})}),(0,n.jsx)("div",{className:"shrink-1 truncate",children:l})]})},C=e=>{let{feature:t,place:l,mapIdToNodeId:r}=e,{displayName:a,primaryTypeDisplayName:i,userRatingCount:s,rating:o,photos:c,priceLevel:d,editorialSummary:u,formattedAddress:m,websiteUri:p}=l,f=null==c?void 0:c[0],g=(0,h.O3)(d);return(0,n.jsxs)("div",{children:[f&&(0,n.jsx)(j.default,{alt:null==a?void 0:a.text,src:(0,h.VG)(f,{maxWidthPx:656}),width:328,height:128,className:"h-[128px] w-full object-cover"}),(0,n.jsxs)("div",{className:"px-6 pb-2 text-xs",children:[(0,n.jsxs)(k,{children:[a&&(0,n.jsx)("div",{className:"text-xl font-semibold",children:a.text}),!!o&&(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-1 text-gray-500",children:[(0,n.jsx)("span",{children:b()(o).format("0.0")}),(0,n.jsx)(E,{value:o,precision:.5,readOnly:!0}),(0,n.jsxs)("span",{children:["(",s,")"]}),g>0&&"⢠".concat(y.A(0,g).map(()=>"$").join(""))]}),i&&(0,n.jsx)("div",{className:"mt-1 text-gray-500",children:i.text}),(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(x,{feature:t,place:l,mapIdToNodeId:r})})]}),u&&(0,n.jsx)(k,{children:(0,n.jsx)("div",{children:u.text})}),(0,n.jsxs)(k,{className:"flex flex-col gap-4",children:[!!m&&(0,n.jsx)(N,{icon:"map-pin",children:(0,n.jsx)(v.A,{text:m,className:"shrink-1"})}),!!p&&(0,n.jsx)(N,{icon:"globe",children:(0,n.jsx)("a",{href:p,target:"_blank",className:"hover:underline",children:p})}),!!l.nationalPhoneNumber&&(0,n.jsx)(N,{icon:"phone",children:(0,n.jsx)(v.A,{text:l.nationalPhoneNumber})})]})]})]})},_=e=>{let{feature:t}=e,{properties:l}=t,{name:r,category_en:a,type:i}=l;return(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsx)("div",{className:"text-base font-semibold",children:r}),(0,n.jsx)("div",{className:"text-xs text-gray-500",children:null!=a?a:i}),(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(x,{feature:t})})]})};var I=l(96279),S=l(69292),L=l(19108),P=l(12115),R=l(83223),M=l(20698);
1function O(){let e=(0,M._)(["\n query GetSearchPlaces($input: PlaceSearchInput!) {\n searchPlaces(input: $input) {\n id\n name\n location\n bounds\n fullData\n nodes {\n id\n map {\n id\n name\n staticImage {\n id\n image\n placeholder\n }\n }\n }\n }\n }\n"]);return O=function(){return e},e}let F=(0,l(30273).J1)(O()),V=(e,t)=>{let{data:l,loading:n}=(0,S.I)(F,{variables:{input:e},...t});return{result:null==l?void 0:l.searchPlaces,loading:n}},z=e=>{var t;let{placeId:l,placeDetails:n,search:r}=e,{data:a,loading:i}=(0,S.I)(R.hm,{variables:{placeId:null!=l?l:""},skip:!l||!!n,fetchPolicy:"cache-first"}),s=null!=n?n:null==a?void 0:a.placeDetails,{result:o,loading:c}=V({location:null==r?void 0:r.location,limit:1,search:null!==(t=null==r?void 0:r.name)&&void 0!==t?t:""},{skip:!!l||!r,fetchPolicy:"cache-first"}),d=s||(null==o?void 0:o[0]),{fullData:u,nodes:m,bounds:p}=null!=d?d:{};return{placeData:(0,P.useMemo)(()=>u&&JSON.parse(u),[u]),mapIdToNodeId:(0,P.useMemo)(()=>{var e;return L.A(null!==(e=null==m?void 0:m.map(e=>{let{map:t,id:l}=e;return[t.id,l]}))&&void 0!==e?e:[])},[m]),nodes:m,bounds:p,loading:i||c}},D=e=>{let{feature:t,closePopup:l}=e,{geometry:r,properties:a}=t,{coordinates:i}=r,{name:o,placeId:c}=a,{loading:d,placeData:u,mapIdToNodeId:m}=z({placeId:c,search:{location:i,name:o}});return(0,n.jsxs)("div",{className:"relative w-[328px] overflow-hidden rounded-lg bg-white text-xs shadow-lg",children:[d&&!u?(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)(I.A,{})}):u?(0,n.jsx)(C,{feature:t,place:u,mapIdToNodeId:m}):(0,n.jsx)(_,{feature:t}),(0,n.jsx)(s.A,{icon:"x",size:12,variant:"transparent-bg",className:"absolute right-0 top-0 p-1 text-white",onClick:l})]})}},97095:(e,t,l)=>{l.d(t,{A:()=>a});var n=l(95155),r=l(68921);let a=l(12115).forwardRef((e,t)=>{let{variant:l="white",className:a,children:i,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.A)({white:"bg-white/90 backdrop-blur-xl",gray:"bg-gray-100/90 backdrop-blur-xl",bright:"bg-white/95 backdrop-blur-3xl"}[l],a),...s,children:i})})},66442:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(95155),r=l(68921),a=l(12115),i=l(20320),s=l(8129),o=l(90232);let c=e=>{let{text:t,children:l,className:c,...d}=e,[u,m]=(0,a.useState)(!1);return(0,o.y)(()=>m(!1),3e3,u),(0,n.jsxs)("div",{className:(0,r.A)("flex items-center",c),...d,children:[(0,n.jsx)("div",{className:"shrink-1 truncate",children:t}),(0,n.jsx)(s.A,{content:u?"Copied!":"Copy to clipboard",delayShow:u?0:600,children:(0,n.jsx)("div",{onClick:()=>{navigator.clipboard.writeText(t),m(!0)},className:"ml-2 shrink-0",children:(0,n.jsx)(i.A,{name:"copy",className:(0,r.A)("cursor-pointer",u?"text-green-500":"text-gray-500 hover:text-gray-900")})})},u?"1":"0"),l]})}},27200:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(31552),r=l(66031);l(11486);var a=l(61676),i=l(23193),s=l(11408);let o=e=>{let{name:t,geometry:l,place:n}=e,{id:a,formattedAddress:o}=null!=n?n:{};return{name:t,type:s.YB.marker,placeId:a,data:{feature:r.feature(l,{placeId:a}),style:{color:(null==n?void 0:n.iconBackgroundColor)?{hex:null==n?void 0:n.iconBackgroundColor}:void 0,icon:n&&(0,i.NO)(n)},formattedAddress:o}}},c=()=>{let[e]=(0,n.A)({refetchQueries:i.Tm});return[(0,a.A)(async t=>await e(o(t),t.mapId))]}},7898:(e,t,l)=>{l.d(t,{A:()=>es});var n=l(95155),r=l(94928),a=l(99990),i=l(12115),s=l(55933),o=l(18987),c=l(10271),d=l(85602),u=l(78592),m=l.n(u),p=l(75803),h=l(7359),x=l(5677),v=l(20698),f=l(69292),g=l(30273),j=l(94517),A=l(699),b=l(96279),y=l(20320),w=l(1665),E=l(795),k=l(30853),N=l(58177),C=l(60821),_=l(51214),I=l(50894),S=l(5497),L=l(78285),P=l(61676),R=l(27528),M=l(53809),O=l(11408);function F(){let e=(0,v._)(['\n query GetFeaturePopup($nodeId: ID!) {\n mapNode(id: $nodeId) {\n id\n name\n geometry\n descriptionText\n type\n length\n area\n map {\n id\n name\n }\n images(first: 3) {\n edges {\n node {\n ...ImageFields\n }\n }\n }\n terrainCacheKey\n terrainInfo(blocking: true) {\n id\n ...TerrainInfoFieldsFragment\n }\n nearbyMarkers: nearbyNodes(filters: { types: ["marker"] }) {\n distance\n percentAlongLine\n node {\n id\n }\n }\n }\n }\n ',"\n ","\n"]);return F=function(){return e},e}let V=e=>{if(e)switch(e.type){case"Point":return[e.coordinates];case"LineString":return e.coordinates;case"MultiLineString":case"Polygon":return e.coordinates[0];case"MultiPolygon":var t;
1return null===(t=e.coordinates[0])||void 0===t?void 0:t[0];default:return}},z=e=>{let{node:t}=e,{formatCoordinates:l}=(0,E.A)(),{subtitle:r,getSubtitleAdditional:a}=(0,L.A)(t,{formatCoordinates:l});return(0,n.jsxs)("div",{className:"flex items-center text-gray-500",children:[(0,n.jsx)("div",{children:r}),a({color:M.A.gray["500"],fontSize:12})]})},D=(0,g.J1)(F(),R.S,S.u),B=e=>{var t;let{feature:l,closePopup:a}=e,{node_id:s,map_id:o,name:c}=l.properties,{displayMap:d,setSelectedNodeIds:u,isEmbedded:m}=(0,I.Q)(),{focusPointIfUnderSidebar:p}=(0,w.A)(),[h]=(0,r.fp)(_.Zn),{toggleSidebar:x}=(0,C.A)(),{measure:v}=(0,N.A)(),[g]=(0,r.fp)(_.bA),[E]=(0,r.fp)(_.r7),S=(0,k.A)(),{data:L,loading:R}=(0,f.I)(D,{variables:{nodeId:s},errorPolicy:"ignore"}),M=R&&!L,{mapNode:F}=null!=L?L:{},{descriptionText:B,map:T,geometry:H,terrainInfo:q}=null!=F?F:{},{name:Y}=null!=T?T:{},U=o===d.id;(0,i.useEffect)(()=>(null==h||h.setFeatureState(l,{selected:!0}),()=>{null==h||h.setFeatureState(l,{selected:!1})}),[s]);let W=(0,P.A)(()=>{S(o,{selectedNodeIds:[s]}),a()}),X=(0,P.A)(()=>{let e=V(null!=H?H:l.geometry);v.handler(!1,(null==e?void 0:e.length)?{coordinates:e}:{}),a()});return(0,n.jsxs)("div",{className:"relative w-[300px] divide-y divide-gray-200 rounded-lg bg-white text-xs shadow-lg",children:[(0,n.jsxs)("div",{className:"flex flex-col items-start gap-1 p-4",children:[!U&&!!Y&&(0,n.jsx)("p",{className:"text-gray-500",children:Y}),(0,n.jsx)("h3",{className:"font-medium text-gray-900",children:c}),M&&(0,n.jsx)(b.A,{}),!!F&&(0,n.jsx)(z,{node:F})]}),!!B&&(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)("p",{className:"line-clamp-6 text-gray-500",children:B})}),H&&"LineString"===H.type&&(0,n.jsx)("div",{className:"h-28 pt-2",children:(0,n.jsx)(j.A,{map:d,nearbyMarkers:null==F?void 0:F.nearbyMarkers,geometry:H,elevationProfile:null!==(t=null==q?void 0:q.elevationProfile)&&void 0!==t?t:[]})}),!M&&!U&&(0,n.jsxs)("div",{className:"flex cursor-pointer items-center justify-center gap-2 p-4 font-medium text-blue-500",onClick:W,children:["Open Map",(0,n.jsx)(y.A,{name:"external-link",size:16})]}),U&&F&&!m&&(0,n.jsxs)("div",{className:"flex divide-x divide-gray-200",children:[(null==F?void 0:F.type)===O.YB.marker&&(0,n.jsxs)("div",{className:"flex flex-1 cursor-pointer items-center justify-center gap-2 p-4 font-medium text-blue-500",onClick:X,children:["Measure",(0,n.jsx)(y.A,{name:"lucide-ruler",size:16})]}),(0,n.jsxs)("div",{className:"flex flex-1 cursor-pointer items-center justify-center gap-2 p-4 font-medium text-blue-500",onClick:()=>{u([s]),g&&p(g),a(),E&&x.handler()},children:["View Details",(0,n.jsx)(y.A,{name:"info",size:16})]})]}),(0,n.jsx)(A.A,{icon:"x",size:12,variant:"transparent-bg",className:"absolute right-0 top-0 p-1",onClick:a})]})};var T=l(97499),H=l(66442),q=l(24334),Y=l(13618),U=l(12910),W=l(7801),X=l.n(W),G=l(75365),Q=l(29),Z=l(91182),K=l(1551),J=l(22031),$=l(3797),ee=l(77337),et=l(96299),el=l(18852),en=l(22279);let er={"poi-label":{identifier:el.nO.Place},"trail-poi-label":{identifier:el.nO.Place},"ski-area-labels":{identifier:el.nO.Place}},ea={[el.nO.Accident]:e=>{let{feature:t}=e,{report_url:l,location_description:r,summary_description:a,date:i}=t.properties;return(0,n.jsx)(x.A,{header:U.c9.fromISO(i).toLocaleString(U.c9.DATE_FULL),title:r,subtitle:a,button:{text:"Read full report",url:l}})},[el.nO.MountainViewImage]:Z.A,[el.nO.Observation]:K.A,[el.nO.WeatherStation]:e=>{let{feature:t,closePopup:l,data:n}=e,{nodeId:a}=null!=n?n:{},{id:s}=t.properties,{displayMap:o,setSelectedNodeIds:c}=(0,I.Q)(),{focusFeaturesIfUnderSidebar:d}=(0,w.A)(),[,u]=(0,r.fp)(_.PK),[,m]=(0,r.fp)(_.j0),p=o.nodes[a],{replace:h}=(0,J.k)(p),x=()=>{p&&s&&(h([s]),d([t]),o.isLocalMap?c([p.id]):(u(!0),m(p.id)),l())};return(0,i.useEffect)(()=>{x()},[]),null},[el.nO.ForecastZone]:e=>{let{feature:t}=e,{name:l,url:r}=t.properties;return(0,n.jsx)(x.A,{title:l,header:"",subtitle:"",button:{text:"Read forecast",url:r}})},[el.nO.IoverlanderPlace]:e=>{let{feature:t}=e,{id:l,name:r,category:a,description:i}=t.properties;return(0,n.jsx)(x.A,{header:a,title:r,subtitle:i,button:{text:"View on iOverlander",url:"https://ioverlander.com/places/".concat(l)}})},[el.nO.ActiveCaptainPoi]:e=>{let{feature:t}=e,{id:l,name:r,poiType:a,numberOfReviews:i,averageRating:s}=t.properties;return(0,n.jsx)(x.A,{header:a,title:r,subtitle:i?"Rating: ".concat(s," / 5 (").concat(i," reviews)"):"No reviews",button:{text:"View on ActiveCaptain",url:"https://activecaptain.garmin.com/en-US/pois/".concat(l)}})},[el.nO.Place]:T.A,[el.nO.Feature]:B,[el.nO.RawRouteImage]:e=>{let{feature:t}=e,{altitude:l,key:r,thumbnail_image_url:a,original_image_url:i}=t.properties,s=(0,Y.A)();return(0,n.jsx)(x.A,{title:(0,n.jsx)(H.A,{text:r,className:"w-28"}),subtitle:"Altitude: ".concat(s.elevation(l).toFormat("0,0.0")),children:(0,n.jsx)(q.Z2,{children:(0,n.jsx)(q.q7,{original:i,thumbnail:a,width:5472,height:3648,children:e=>{let{ref:t,open:l}=e;return(0,n.jsx)("img",{ref:t,onClick:l,src:a,className:"h-36 w-full cursor-pointer object-cover"})}})})})},[el.nO.WildfireIncident]:e=>{let{feature:t}=e,{incident_name:l,protecting_agency:r,area_acres:a,percent_contained:i,source_updated_at:s,discovered_at:o}=t.properties,c=["Wildfire",r&&"Agency ".concat(r)].filter(Q.vN);return(0,n.jsx)(x.A,{title:l,header:"",subtitle:c.join(" ⢠"),children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 p-4",children:[(0,n.jsxs)("div",{className:"flex items-center divide-x divide-gray-200",children:[(0,n.jsxs)("div",{className:"flex flex-1 flex-col items-center",children:[(0,n.jsx)("div",{className:"text-gray-500",children:"Acres"}),(0,n.jsx)("div",{className:"text-lg font-medium",children:a?X()(a).format("0,0"):"-"})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col items-center",children:[(0,n.jsx)("div",{className:"text-gray-500",children:"Containment"}),(0,n.jsx)("div",{className:"text-lg font-medium",children:i?X()(i/100).format("0%"):"-"})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[s&&(0,n.jsxs)("div",{children:["Updated"," ",(0,n.jsxs)("span",{className:"font-medium",children:[(0,G.fw)(U.c9.fromJSDate(new Date(s)))," ago"]})]}),o&&(0,n.jsxs)("div",{className:"text-gray-500",children:["Created"," ",U.c9.fromJSDate(new Date(o)).toLocaleStr
1ing(U.c9.DATETIME_MED)]})]})]})})},[el.nO.Poi]:null,[el.nO.ExploreRoute]:B},ei=e=>{var t,l;let{features:r,layerPopupComponentMap:a,closePopup:s,overrideComponents:o}=e,[c,u]=i.useState(),{displayMap:x}=(0,I.Q)(),v=(0,i.useMemo)(()=>p.A(e=>{var t;return null!==(t=e.id)&&void 0!==t?t:(0,h.A)()},r),[r]);if((0,i.useEffect)(()=>{if(1===v.length){let e=v[0];et.A.track(en.X.MapFeatureClicked,{layerId:e.layer.id,mapId:x.id})}},[]),v.length>1&&!c)return(0,n.jsxs)($.A,{children:[(0,n.jsxs)(ee.A,{className:"select-none px-4 py-2 pb-1 font-medium",children:[v.length," Features"]}),v.map(e=>{var t,l,r;let{id:i,properties:s,layer:o}=e,{getFeatureName:c}=null!==(t=a[o.id])&&void 0!==t?t:{},p=null!==(r=null!==(l=null==c?void 0:c(e))&&void 0!==l?l:s.name)&&void 0!==r?r:m()(s.feature_type);return(0,n.jsx)($.A.Item,{onClick:()=>u(i),children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("div",{children:p}),(0,n.jsx)(d,{className:"h-4 w-4"})]})},i)})]});let f=c?v.find(e=>{let{id:t}=e;return t===c}):v[0];if(!f)return null;let g=null!==(t=a[f.layer.id])&&void 0!==t?t:er[f.layer.id],j=null==g?void 0:g.identifier,A=j&&(null!==(l=null==o?void 0:o[j])&&void 0!==l?l:ea[j]);return A?(0,n.jsx)(A,{feature:f,data:g.data,closePopup:s}):null},es=e=>{let{style:t,onChangeSelectedNodeIds:l,overrideComponents:d}=e,{popupComponents:u}=null!=t?t:{},[{tool:m}]=(0,r.fp)(_.GI),[,p]=(0,r.fp)(_.bA),[h,x]=(0,r.fp)(_.E1),v=(0,i.useRef)(void 0),{displayMap:f}=(0,I.Q)(),g=m===_.KR.Select,j=(0,i.useMemo)(()=>[...Object.keys(null!=u?u:{}),...Object.keys(er)],[u]),A=(0,P.A)(e=>{var t,l,n;let r=null===(t=e.features)||void 0===t?void 0:t[0],a=!!h&&!(null==h?void 0:h.didShowOnHover);if(v.current&&v.current.id!==(null==r?void 0:r.id)&&e.target.setFeatureState(v.current,{hover:!1}),r&&(null===(l=e.features)||void 0===l?void 0:l.length)===1&&!a){let t=r.layer.id,{showOnHover:l}=null!==(n=null==u?void 0:u[t])&&void 0!==n?n:{};if(l&&g){x({point:e.lngLat,features:e.features,didShowOnHover:!0}),e.target.getCanvas().style.cursor="default";return}r.id&&(e.target.setFeatureState(r,{hover:!0}),v.current=r)}r&&g&&(e.target.getCanvas().style.cursor="pointer")}),b=(0,P.A)(e=>{e.target.getCanvas().style.cursor="",(null==h?void 0:h.didShowOnHover)&&x(void 0),v.current&&e.target.setFeatureState(v.current,{hover:!1})}),y=(0,P.A)(e=>{var t,n,r,a,i,s;if(p(e.lngLat),!g)return;let o=(null===(t=e.features)||void 0===t?void 0:t.length)===1&&(null==u?void 0:null===(n=u[null===(r=e.features)||void 0===r?void 0:r[0].layer.id])||void 0===n?void 0:n.showOnHover),{features:c}=e,d=null==c?void 0:c[0],m=null!==(i=null==c?void 0:c.length)&&void 0!==i?i:0;if(d&&1===m){let e=d.layer.id,{selectNodeId:t}=null!==(s=null==u?void 0:u[e])&&void 0!==s?s:{};if(t){null==l||l([t]);return}}(null===(a=e.features)||void 0===a?void 0:a.length)&&!o?x({point:e.lngLat,features:e.features}):x(void 0)}),w=(0,P.A)(()=>{x(void 0)}),E=(0,i.useMemo)(()=>h&&(0,n.jsx)(o.zD,{longitude:h.point.lng,latitude:h.point.lat,closeButton:!1,className:"mapboxgl-popup-custom",children:h.features.length?(0,n.jsx)(ei,{features:h.features,layerPopupComponentMap:null!=u?u:{},closePopup:w,overrideComponents:d}):(0,n.jsx)(c.A,{lngLat:new a.LngLat(h.point.lng,h.point.lat),onClose:w,displayMap:f})},"".concat(h.point.lat,"-").concat(h.point.lng,"-popup")),[h,u,w,d,f]);return(0,s.vC)("escape",()=>x(void 0)),(0,i.useEffect)(()=>{!g&&h&&x(void 0)},[g]),{interactiveLayerIds:j,onMouseMove:A,onMouseLeave:b,onClick:y,closePopup:w,popup:E}}},31552:(e,t,l)=>{l.d(t,{A:()=>O});var n=l(95155),r=l(34025),a=l(88631),i=l(27405),s=l(87371);let o=e=>{let{name:t,label:l,hideErrors:r,portal:o,className:c}=e,[,{error:d,value:u,touched:m},{setValue:p,setTouched:h}]=(0,a.Mt)(t);return(0,n.jsx)(i.A,{name:t,label:l,error:!r&&m&&d,className:c,children:(0,n.jsx)(s.A,{value:{hex:u},onChange:e=>{let{hex:t}=e;return p(t)},onChangeComplete:()=>h(!0),portal:o,children:(0,n.jsx)("div",{style:{backgroundColor:u},className:"h-5 w-5 cursor-pointer"})})})};var c=l(56086),d=l(37242),u=l(33784),m=l(46929);let p=e=>{let{name:t,label:l,hideErrors:r,className:s}=e,[,{error:o,value:c,touched:d},{setValue:p,setTouched:h}]=(0,a.Mt)(t);return(0,n.jsx)(i.A,{name:t,label:l,error:!r&&d&&o,className:s,children:(0,n.jsx)(u.A,{value:c,onChange:e=>{p(e),h(!0)},children:(0,n.jsx)(m.A,{size:16,name:c})})})};var h=l(52340),x=l(2422),v=l(84173);let f=e=>{let{name:t,label:l}=e,[,{value:r},{setValue:s}]=(0,a.Mt)(t),{showModal:o}=(0,v.k3)();return(0,n.jsx)(i.A,{name:t,label:l,children:(0,n.jsx)("div",{className:"max-h-60 overflow-auto rounded-md border",children:(0,n.jsx)(x.A,{filters:{includeBookmarks:!1},orderBy:"-opened_at",selectedMapId:r,onClickMap:s,onCreateMap:()=>{o(h.A,{onComplete(e){s(e)}})}})})})};var g=l(75423),j=l(90098),A=l(6816),b=l(1665),y=l(30853),w=l(50894),E=l(11486),k=l(17038),N=l(10315),C=l(11408);let _=e=>{var t,l,n,r,a;let{type:i,data:s}=e,o=null!==(r=null==s?void 0:null===(t=s.style)||void 0===t?void 0:t.icon)&&void 0!==r?r:N._K,c=null!==(a=null==s?void 0:null===(n=s.style)||void 0===n?void 0:null===(l=n.color)||void 0===l?void 0:l.hex)&&void 0!==a?a:N.Hy;return{...i===C.YB.marker?{icon:o,color:c}:i===C.YB.line?{color:c}:{}}},I=(e,t)=>{let l=null!=t?t:{};return"color"in e&&(l=k.A(["style","color","hex"],e.color,l)),"icon"in e&&(l=k.A(["style","icon"],e.icon,l)),l};var S=l(73168),L=l(21808);let P=r.Ik().shape({name:r.Yj().required(),mapId:r.Yj().required()}),R=e=>
1{let{input:t,mapId:l,refetchQueries:r}=e,{type:a,name:i}=t,{closeModal:s}=(0,v.k3)(),{displayMap:u}=(0,w.Q)(),[m]=(0,E.A)(void 0,{refetchQueries:r}),h=(0,y.A)(),{focusFeaturesIfUnderSidebar:x}=(0,b.A)(),k=null!=l?l:u.isLocalMap?void 0:u.id;return(0,n.jsx)(c.A,{initialValues:{name:i,mapId:k,..._(t)},validationSchema:P,validateOnMount:!0,onSubmit:async e=>{let l=I(e,t.data),n=await m({...t,name:e.name,data:l},{mapId:e.mapId});if(n){var r,a;let{node:e}=null!==(a=null===(r=n.data)||void 0===r?void 0:r.createMapNode)&&void 0!==a?a:{};if(e){let{id:t,mapId:l}=e;h(l,{selectedNodeIds:[t]}),s(),x([(0,S.vc)(e)])}}},children:(0,n.jsx)(j.A,{title:"Save your ".concat(L.lv[a].toLowerCase()),width:"sm",footer:(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)(A.A,{onClick:s,children:"Cancel"}),(0,n.jsx)(d.A,{children:"Save"})]}),children:(0,n.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,n.jsx)(g.A,{name:"name",label:"Name",autoFocus:!0,selectOnFocus:!0}),(0,n.jsxs)("div",{className:"flex gap-4",children:[a===C.YB.marker&&(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(p,{name:"icon",label:"Symbol"})}),(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(o,{name:"color",label:"Color",portal:!0})})]}),u.isLocalMap&&(0,n.jsx)(f,{name:"mapId",label:"Select map:"})]})})})};var M=l(30755);let O=function(){let{refetchQueries:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{showModal:t}=(0,v.k3)();return[(0,M.A)(async(l,n)=>{t(R,{input:l,mapId:n,refetchQueries:e})})]}},60821:(e,t,l)=>{l.d(t,{A:()=>o});var n=l(94928),r=l(50894),a=l(47305),i=l(1665),s=l(51214);let o=function(){let{enableHotkeys:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t]=(0,n.fp)(s.Zn),[,l]=(0,n.fp)(s.r7),{selectedNodeIds:o}=(0,r.Q)(),{focusMapNodes:c}=(0,i.A)(),d=(0,a.A)({label:"Zoom in",hotkey:"mod+=",enableHotkey:e,loginRequired:!1,handler:()=>{null==t||t.zoomIn()}});return{zoomIn:d,zoomOut:(0,a.A)({label:"Zoom out",hotkey:"mod+minus",enableHotkey:e,loginRequired:!1,handler:()=>{null==t||t.zoomOut()}}),zoomToSelection:(0,a.A)({label:"Zoom to selection",hotkey:"2",enableHotkey:e,loginRequired:!1,disabled:0===o.length,handler:()=>{c(o)}}),toggleSidebar:(0,a.A)({label:"Toggle sidebar",hotkey:"mod+\\",enableHotkey:e,loginRequired:!1,handler:()=>l(e=>!e)})}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.