PageSourceSearch

https://chefito.de/app/_expo/static/js/web/manual-nutrition-entrie…?chefito-release=4acfbdc30b7897e4

js chefito.de collected 2026-10-02 01:53:58 UTC 4,387 bytes, 1 lines download raw bytes

1__d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),a=e(r(d[4])),s=e(r(d[5])),u=r(d[6]),c=r(d[7]),f=r(d[8]),y=r(d[9]),x=r(d[10]),h=r(d[11]),p=r(d[12]),j=r(d[13]),v=r(d[14]),w=r(d[15]);function _(){const e=(0,u.useRouter)(),{theme:l}=(0,f.useTheme)(),{t:_,language:T}=(0,y.useTranslation)(),{itemConsumptionsLog:S}=(0,x.useAnalyticsLog)(),{ensureListenersActive:I,deleteItemConsumption:F}=(0,x.useAnalyticsLogDispatch)(),{colors:N}=l;(0,t.useEffect)(()=>{I()},[I]);const b=(0,t.useMemo)(()=>S.filter(e=>!0===e.manualNutritionEntry||'manual'===e.entrySource||'string'==typeof e.consumedAmountInput).slice().sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()),[S]);return(0,w.jsxs)(n.SafeAreaView,{style:[C.container,{backgroundColor:N.background}],edges:['top'],children:[(0,w.jsx)(h.PageHeader,{title:_('nutrition_manual_entries_title')||'Manual nutrition entries',subtitle:_('nutrition_manual_entries_desc')||'Review and edit your logged entries.',onBackPress:()=>(0,j.safeBack)(e),showRightSpacer:!1,titleStyle:C.headerTitle}),(0,w.jsx)(o.default,{data:b,keyExtractor:(e,t)=>e.eventId||`${e.itemName}-${e.date}-${t}`,contentContainerStyle:C.listContent,showsVerticalScrollIndicator:!1,initialNumToRender:20,maxToRenderPerBatch:20,windowSize:11,removeClippedSubviews:!0,ListEmptyComponent:(0,w.jsx)(p.Card,{children:(0,w.jsx)(p.CardContent,{children:(0,w.jsx)(a.default,{style:[C.emptyText,{color:N.mutedForeground}],children:_('nutrition_manual_entries_empty')||'No manual nutrition entries yet.'})})}),renderItem:({item:t})=>{const n=!!t.eventId&&!t.eventId.includes(':'),o=new Date(t.date),l=Number.isNaN(o.getTime())?t.date:o.toLocaleDateString('de'===T?'de-DE':'es'===T?'es-ES':'en-US'),u=t.nutritionTotals;return(0,w.jsxs)(p.Card,{children:[(0,w.jsx)(p.CardHeader,{children:(0,w.jsxs)(p.CardTitle,{children:[(0,w.jsx)(c.Activity,{size:15,color:N.primary}),(0,w.jsx)(a.default,{style:[C.rowTitle,{color:N.foreground}],numberOfLines:1,children:t.itemName})]})}),(0,w.jsxs)(p.CardContent,{style:C.rowContent,children:[(0,w.jsx)(a.default,{style:[C.rowMeta,{color:N.mutedForeground}],children:l}),(0,w.jsxs)(s.default,{style:C.valuesRow,children:[(0,w.jsx)(a.default,{style:[C.valueText,{color:N.foreground}],children:`${Math.round(u?.caloriesKcal||0)} kcal`}),(0,w.jsx)(a.default,{style:[C.valueText,{color:N.foreground}],children:`${(u?.proteinG||0).toFixed(1)}g P`}),(0,w.jsx)(a.default,{style:[C.valueText,{color:N.foreground}],children:`${(u?.carbsG||0).toFixed(1)}g C`}),(0,w.jsx)(a.default,{style:[C.valueText,{color:N.foreground}],children:`${(u?.fatG||0).toFixed(1)}g F`})]}),(0,w.jsxs)(s.default,{style:C.rowActions,children:[(0,w.jsx)(p.Button,{size:"sm",variant:"outline",leftIcon:(0,w.jsx)(c.Trash2,{size:14,color:N.destructive}),onPress:()=>{n&&t.eventId&&v.Alert.alert(_('delete')||'Delete',_('confirm_delete_item')||'Do you really want to delete this entry?',[{text:_('cancel')||'Cancel',style:'cancel'},{text:_('delete')||'Delete',style:'destructive',onPress:()=>{(async()=>{try{await F(t.eventId)}catch(e){console.error('Failed to delete manual nutrition entry',e),v.Alert.alert(_('error')||'Error',_('failed_to_delete_item')||'Failed to delete entry.')}})()}}])},disabled:!n,children:_('delete')||'Delete'}),(0,w.jsx)(p.Button,{size:"sm",variant:"outline",leftIcon:(0,w.jsx)(c.Edit3,{size:14,color:N.primary}),onPress:()=>{n&&t.eventId&&e.push({pathname:'/manual-nutrition-entry',params:{entryId:t.eventId}})},disabled:!n,children:_('edit')||'Edit'})]})]})]})}})]})}const C=l.default.create({container:{flex:1},headerTitle:{fontSize:17,fontFamily:'Nunito_700Bold'},listContent:{paddingHorizontal:12,paddingBottom:24,gap:10},rowTitle:{marginLeft:8,flex:1,fontSize:15,fontFamily:'Nunito_700Bold'},rowContent:{gap:8},rowMeta:{fontSize:12,fontFamily:'Nunito_600SemiBold'},valuesRow:{flexDirection:'row',alignItems:'center',flexWrap:'wrap',gap:8},valueText:{fontSize:12,fontFamily:'Nunito_700Bold'},rowActions:{flexDirection:'row',justifyContent:'flex-end',gap:8},emptyText:{fontSize:13,fontFamily:'Nunito_600SemiBold',textAlign:'center',paddingVertical:16}})},5458,[39,5663,172,101,246,174,82,5701,781,2481,4938,5336,3000,3346,4756,2]);

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.