You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;t(r(d[1]));var o=r(d[2]),n=t(r(d[3])),l=t(r(d[4])),s=t(r(d[5])),c=r(d[6]),f=o.StyleSheet.create({container:{flex:1,backgroundColor:r(d[11]).theme.COLORS.BG},header:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',paddingHorizontal:16,paddingVertical:16,borderBottomWidth:1,borderBottomColor:r(d[11]).theme.COLORS.BORDER_GREY},backButton:{padding:8},headerTitle:{fontSize:18,fontWeight:'bold',color:r(d[11]).theme.COLORS.WHITE,fontFamily:r(d[12]).fontFamilies.Default},headerRight:{width:40,alignItems:'flex-end'},content:{flex:1},imageContainer:{width:'100%',backgroundColor:r(d[11]).theme.COLORS.BG,alignItems:'center',justifyContent:'center'},reportContent:{padding:16},reportTitle:{fontSize:20,fontWeight:'bold',color:r(d[11]).theme.COLORS.WHITE,fontFamily:r(d[12]).fontFamilies.Default,marginBottom:12},reportDescription:{fontSize:16,color:r(d[11]).theme.COLORS.TEXT_GREY,fontFamily:r(d[12]).fontFamilies.Default,lineHeight:24,marginBottom:20},metadataContainer:{flexDirection:'row',justifyContent:'space-between',marginBottom:24},metadataItem:{flex:1},metadataLabel:{fontSize:12,color:r(d[11]).theme.COLORS.TEXT_GREY_50P,fontFamily:r(d[12]).fontFamilies.Default,marginBottom:4},metadataValue:{fontSize:14,color:r(d[11]).theme.COLORS.WHITE,fontFamily:r(d[12]).fontFamilies.Default,fontWeight:'500'},locationContainer:{flex:1,marginRight:12},sectionTitle:{fontSize:16,fontWeight:'bold',color:r(d[11]).theme.COLORS.WHITE,fontFamily:r(d[12]).fontFamilies.Default,marginBottom:8},locationText:{fontSize:14,color:r(d[11]).theme.COLORS.TEXT_GREY,fontFamily:r(d[12]).fontFamilies.Default},distanceText:{fontSize:12,color:r(d[11]).theme.COLORS.TEXT_GREY_50P,fontFamily:r(d[12]).fontFamilies.Default,marginBottom:12},locationButton:{minHeight:48,paddingVertical:12,paddingHorizontal:16,backgroundColor:r(d[11]).theme.COLORS.BTN_BG_BLUE_30P,borderRadius:8,borderWidth:1,borderColor:r(d[11]).theme.COLORS.BTN_BG_BLUE},locationButtonContent:{flexDirection:'row',alignItems:'center',flex:1},navigationIconContainer:{flexShrink:0,alignItems:'center',justifyContent:'center'},loadingContainer:{flexDirection:'row',alignItems:'center',gap:8},value:{fontSize:14,color:r(d[11]).theme.COLORS.WHITE,fontFamily:r(d[12]).fontFamilies.Default},loadingText:{color:r(d[11]).theme.COLORS.TEXT_GREY,fontStyle:'italic'},errorContainer:{flexDirection:'row',alignItems:'center',gap:8,flexWrap:'wrap'},errorText:{color:'#FF6B6B',fontSize:12,flex:1},retryButton:{paddingHorizontal:8,paddingVertical:4,backgroundColor:r(d[11]).theme.COLORS.BTN_BG_BLUE_30P||'rgba(59, 130, 246, 0.3)',borderRadius:4,borderWidth:1,borderColor:r(d[11]).theme.COLORS.BTN_BG_BLUE},retryText:{color:r(d[11]).theme.COLORS.BTN_BG_BLUE,fontSize:12,fontWeight:'600'}});e.default=function(t){var h=t.route,u=(0,r(d[7]).useNavigation)(),x=((0,r(d[8]).useTranslation)().t,h.params.report),y=x.report,T=x.analysis[0];for(var C of x.analysis)if('en'===C.language){T=C;break}var O=(0,r(d[9]).useReverseGeocoding)({latitude:y.latitude,longitude:y.longitude,language:'en',autoFetch:!0}),p=O.address,B=O.loading,S=O.error,R=O.refetch,L=T.title||'Untitled Report',j=T.description||y.description||'';return(0,c.jsxs)(r(d[10]).SafeAreaView,{style:f.container,edges:['top','left','right'],children:[(0,c.jsxs)(o.View,{style:f.header,children:[(0,c.jsx)(o.Pressable,{style:f.backButton,onPress:function(){return u.goBack()},children:(0,c.jsx)(l.default,{color:r(d[11]).theme.COLORS.TEXT_GREY})}),(0,c.jsx)(o.Text,{style:f.headerTitle,children:"My Report Details"}),(0,c.jsx)(o.View,{style:f.headerRight})]}),(0,c.jsxs)(o.ScrollView,{style:f.content,showsVerticalScrollIndicator:!1,children:[y.seq&&(0,c.jsx)(o.View,{style:f.imageContainer,children:(0,c.jsx)(n.default,{reportSeq:y.seq,resizeMode:"contain",maxHeight:500,borderRadius:0})}),(0,c.jsxs)(o.View,{style:f.reportContent,children:[(0,c.jsx)(o.Text,{style:f.reportTitle,children:L}),j&&(0,c.jsx)(o.Text,{style:f.reportDescription,children:j}),(0,c.jsxs)(o.View,{style:f.metadataContainer,children:[(0,c.jsxs)(o.View,{style:f.metadataItem,children:[(0,c.jsx)(o.Text,{style:f.metadataLabel,children:"Date"}),(0,c.jsx)(o.Text,{style:f.metadataValue,children:(function(t){try{return new Date(t).toLocaleDateString('en-US',{weekday:'long',year:'numeric',month:'long',day:'numeric'})}catch(t){return'Unknown Date'}})(y.timestamp)})]}),(0,c.jsxs)(o.View,{style:f.metadataItem,children:[(0,c.jsx)(o.Text,{style:f.metadataLabel,children:"Time"}),(0,c.jsx)(o.Text,{style:f.metadataValue,children:(function(t){try{return new Date(t).toLocaleTimeString()}catch(o){return t}})(y.timestamp)})]})]}),(0,c.jsx)(o.Pressable,{onPress:function(){if(y.latitude&&y.longitude){var t=`https://www.google.com/maps?q=${y.latitude},${y.longitude}`;o.Linking.canOpenURL(t).then(function(n){o.Linking.openURL(t)}).catch(function(t){console.error('Error opening Google Maps:',t),o.Alert.alert('Error','Could not open Google Maps')})}else o.Alert.alert('Location Error','No coordinates available for this report')},style:f.locationButton,children:(0,c.jsxs)(o.View,{style:f.locationButtonContent,children:[(0,c.jsx)(o.View,{style:f.locationContainer,children:B?(0,c.jsxs)(o.View,{style:f.loadingContainer,children:[(0,c.jsx)(o.ActivityIndicator,{size:"small",color:r(d[11]).theme.COLORS.BTN_BG_BLUE}),(0,c.jsx)(o.Text,{style:[f.value,f.loadingText],children:"Getting address..."})]}):S?(0,c.jsxs)(o.View,{style:f.errorContainer,children:[(0,c.jsx)(o.Text,{style:[f.value,f.errorText],children:S}),(0,c.jsx)(o.Pressable,{onPress:R,style:f.retryButton,children:(0,c.jsx)(o.Text,{style:f.retryText,children:"Retry"})})]}):p?(0,c.jsx)(o.Text,{style:[f.value,f.locationText],children:p}):(0,c.jsx)(o.Text,{numberOfLines:3,style:[f.value,f.locationText],children:y.location||'Address not available'})}),(0,c.jsx)(o.View,{style:f.navigationIconContainer,children:(0,c.jsx)(s.default,{color:r(d[11]).theme.COLORS.BTN_BG_BLUE})})]})})]})]})]})}},989,[1,174,3,990,993,994,219,873,995,1012,1014,865,1023]);
1069
1069
__d(function(g,_r,_i,a,m,_e,d){var e=_r(d[0]);Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=void 0;var t=e(_r(d[1])),r=(function(e,t){if("function"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return(function(e,t){if(!t&&e&&e.__esModule)return e;var i,n,l={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return l;if(i=t?o:r){if(i.has(e))return i.get(e);i.set(e,l)}for(var s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((n=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,s))&&(n.get||n.set)?i(l,s,n):l[s]=e[s]);return l})(e,t)})(_r(d[2])),o=_r(d[3]),i=_r(d[4]);var n=r.default.memo(function(e){var n=e.reportSeq,s=e.maxHeight,c=void 0===s?400:s,u=e.borderRadius,h=void 0===u?8:u,f=e.showPlaceholder,y=void 0===f||f,p=e.placeholderText,S=void 0===p?'No Image':p,x=e.containerWidth,C=e.resizeMode,O=void 0===C?'contain':C,_=(0,r.useState)(null),v=(0,t.default)(_,2),w=v[0],b=(v[1],(0,r.useState)(!0)),T=(0,t.default)(b,2),j=T[0],L=T[1],R=(0,r.useState)(!1),E=(0,t.default)(R,2),B=E[0],k=E[1],P=o.Dimensions.get('window').width,G=x||P-32,M=(0,_r(d[5]).getUrls)(),N=n&&null!=M&&M.liveUrl?`${M.liveUrl}/api/v3/reports/rawimage?seq=${n}`:null;return N?B?(0,i.jsx)(o.View,{style:[l.errorContainer,{width:G,height:c,borderRadius:h}],children:(0,i.jsx)(o.Text,{style:l.errorText,children:"Failed to load image"})}):(0,i.jsxs)(o.View,{style:[l.container,{width:G}],children:[j&&(0,i.jsx)(o.View,{style:[l.loadingContainer,{width:'100%',height:c,borderRadius:h}],children:'contain'===O&&(0,i.jsx)(o.Text,{style:l.loadingText,children:"Loading..."})}),(0,i.jsx)(o.Image,{source:{uri:N},style:[l.image,{width:'100%',height:w||c,borderRadius:h,opacity:j?0:1}],resizeMode:O,onLoad:function(e){L(!1),k(!1)},onError:function(e){k(!0),L(!1)}})]}):y?(0,i.jsx)(o.View,{style:[l.placeholder,{width:G,height:c,borderRadius:h}],children:(0,i.jsx)(o.Text,{style:l.placeholderText,children:S})}):null}),l=o.StyleSheet.create({container:{position:'relative',alignSelf:'center'},image:{backgroundColor:'black'},placeholder:{backgroundColor:_r(d[6]).theme.COLORS.PANEL_BG,justifyContent:'center',alignItems:'center'},placeholderText:{color:_r(d[6]).theme.COLORS.TEXT_GREY,fontSize:14,fontFamily:'System'},errorContainer:{backgroundColor:_r(d[6]).theme.COLORS.PANEL_BG,justifyContent:'center',alignItems:'center',borderWidth:1,borderColor:_r(d[6]).theme.COLORS.BTN_BG_BLUE},errorText:{color:_r(d[6]).theme.COLORS.BTN_BG_BLUE,fontSize:14,fontFamily:'System'},loadingContainer:{backgroundColor:_r(d[6]).theme.COLORS.PANEL_BG,justifyContent:'center',alignItems:'center',position:'absolute',top:0,left:0},loadingText:{color:_r(d[6]).theme.COLORS.TEXT_GREY,fontSize:14,fontFamily:'System'}});_e.default=n},990,[1,39,174,3,219,991,865]);
0 commit comments