1"use strict";(self.webpackChunkmy_app=self.webpackChunkmy_app||[]).push([[6903],{66903:(e,n,t)=>{t.r(n),t.d(n,{default:()=>g});var r=t(55718),i=t(47313),l=t(57829),u=t(71003),o=t(8047),s=t(80432),a=t(58467),d=t(70281),c=t(32605),h=t(90182),v=t(22102),m=t(46417);const g=()=>{const{client:e}=(0,i.useContext)(s.RY),{id:n}=(0,a.UO)(),t=i.useRef(""),[g,x]=(0,i.useState)(null),p=(0,c.u)(),j=(0,a.s0)(),{data:b}=(0,d.f)({queryKey:["munzee",g],queryFn:()=>null===e||void 0===e?void 0:e.munzees.getMunzee({url:g}),enabled:!!g});return(0,m.jsx)("div",{id:"rover-page-content",children:(0,m.jsxs)(v.Z,{children:[(0,m.jsx)(h.q,{children:(0,m.jsx)("title",{children:"Munzee. 21st Century Scavenger Hunt. Rover Drop"})}),(0,m.jsx)(r.V1,{title:"Get your Rover into the Game"}),!!g&&(0,m.jsx)(l.Z,{children:b?0===(null===b||void 0===b?void 0:b.deployed)?(0,m.jsx)(r.bZ,{type:"error",align:"left",children:"You have to choose a munzee which has been deployed."}):(0,m.jsxs)(l.Z,{children:[(0,m.jsx)(r.Gd,{pos:{latitude:Number(b.latitude),longitude:Number(b.longitude)},zoom:10,view:"street",pins:[{latitude:Number(b.latitude),longitude:Number(b.longitude),id:String(b.munzee_id),imageUrl:b.pin_icon,tooltipContent:void 0}]}),(0,m.jsx)(l.Z,{textAlign:"right",mt:2,children:(0,m.jsx)(u.Z,{type:"submit",variant:"contained",className:"btn-green",onClick:()=>{(async()=>{if(!e)return;if(null===b||void 0===b||!b.munzee_id)return alert("Oops, something went wrong"),void x(null);let t="Oops, something went wrong!";try{const r=await e.rovers.unleash({roverId:Number(n),munzeeId:b.munzee_id});if(null===r||void 0===r||!r.success)throw null!==r&&void 0!==r&&r.error&&(t=null===r||void 0===r?void 0:r.error),new Error("Something went wrong!");await p(["rover",n]),alert("Successfully unleashed!"),j(`/r/${n}`)}catch(r){console.error(r),alert(t)}})()},children:"Unleash it!"})}),(0,m.jsx)("hr",{})]}):(0,m.jsxs)(l.Z,{children:[(0,m.jsx)(r.aN,{}),(0,m.jsx)("hr",{})]})}),(0,m.jsxs)(l.Z,{children:[(0,m.jsx)(l.Z,{mb:2,children:(0,m.jsx)(o.Z,{label:"Munzee's URL goes here... (e.g. https://www.munzee.com/m/coolant/23)",variant:"outlined",fullWidth:!0,name:"munzeeurl",defaultValue:"",onChange:e=>t.current=e.target.value})}),(0,m.jsx)(l.Z,{textAlign:"right",children:(0,m.jsx)(u.Z,{type:"submit",variant:"contained",className:"btn-green",onClick:()=>{t.current?x(t.current):alert("You must enter a Munzee URL")},children:"Check it!"})})]})]})})}},32605:(e,n,t)=>{t.d(n,{u:()=>o});var r=t(47313),i=t(14052),l=t(80432),u=t(61918);function o(){const e=(0,i.NL)(),{client:n}=(0,r.useContext)(l.RY),t=(0,u.b)(n);return(0,r.useCallback)((async n=>{var r,i;null===(r=t.current)||void 0===r||r.invalidateCache(),await e.invalidateQueries(["client",null===(i=t.current)||void 0===i?void 0:i.id,...n])}),[e,t])}}}]);
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.