text: (function(e){function t(t){for(var a,s,i=t[0],c=t[1],l=t[2],d=0,f=[];d<i.length;d++)s=i[d],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&f.push(r[s][0]),r[s]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);u&&u(t);while(f.length)f.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],a=!0,i=1;i<n.length;i++){var c=n[i];0!==r[c]&&(a=!1)}a&&(o.splice(t--,1),e=s(s.s=n[0]))}return e}var a={},r={app:0},o=[];function s(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=e,s.c=a,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)s.d(n,a,function(t){return e[t]}.bind(null,a));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=c;o.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"073c":function(e,t,n){"use strict";n("f65f")},"208a":function(e,t,n){"use strict";n("ad85")},"3b31":function(e,t,n){},"45d7":function(e,t,n){},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var a=n("7a23");function r(e,t,n,r,o,s){var i=Object(a["p"])("Calculator");return Object(a["k"])(),Object(a["c"])(i)}var o=n("3835"),s=(n("9911"),n("b0c0"),n("d3b7"),n("ddb0"),function(e){return Object(a["m"])("data-v-76fe2026"),e=e(),Object(a["l"])(),e}),i={class:"container text-start"},c={class:"navbar navbar-expand-sm navbar-light"},l={class:"flex-row ms-auto"},u={class:"",id:"navbarNav"},d={class:"navbar-nav flex-row ms-sm-auto"},f={class:"nav-item me-2"},b=["href"],h={class:"nav-item"},p={class:"nav-link",href:"https://github.com/paulinko/nutri-calc",target:"_blank"},O={class:"row"},g={class:"col-md-9"},j=s((function(){return Object(a["f"])("hr",null,null,-1)})),v={class:"fw-bold"},m={class:"fw-bold"},w=Object(a["g"])(),S=s((function(){return Object(a["f"])("br",null,null,-1)})),y=["href"],k={class:"fw-bold"},C=Object(a["g"])(),x=s((function(){return Object(a["f"])("br",null,null,-1)})),_=s((function(){return Object(a["f"])("hr",null,null,-1)})),I={class:"nav nav-tabs",id:"myTab",role:"tablist"},P=["onClick"],T={class:"tab-content"},q={class:"tab-pane fade show active py-3"},N=["title"],F={class:"row nutriprops-row"},M={class:"col-lg-4 col-md-6 py-1"},V=["name","id","onUpdate:modelValue"],U={class:"input-group-text col-4"},L={class:"col-lg-4 col-md-6 py-1"},B=["name","id","onUpdate:modelValue"],D={class:"input-group-text"},A={class:"col-md-2 d-none d-md-block ms-5"},R=["src"],E={class:"col-md-6"},z=["disabled"],J={key:1,class:"result-container",ref:"resultContainer"},H=s((function(){return Object(a["f"])("hr",null,null,-1)})),G={class:"fst-italic"},Y=["src"],X={class:"row score-row"},$={class:"col-md-2"},Q={class:"text-start score-result"},W={class:"col-md-10"},Z=s((function(){return Object(a["f"])("h2",null,"Details",-1)})),K={class:"row summary"},ee={ref:"resultNav",class:"col-md-3 col-xs-12 d-sm-block d-none points-list"},te={class:"mt-2"},ne={class:"nav flex-column result-nav negative"},ae=["href"],re={class:"result-nav-text"},oe={class:"mt-2"},se={class:"nav flex-column result-nav positive"},ie=["href"],ce={class:"result-nav-text"},le={class:"mt-2"},ue={class:"col-md-9 results-content","data-bs-spy":"scroll","data-bs-target":"#list-example","data-bs-offset":"0"},de={class:"footer"};function fe(e,t,n,r,s,fe){var be=Object(a["p"])("InlineIcon"),he=Object(a["p"])("modal"),pe=Object(a["p"])("intro"),Oe=Object(a["p"])("InputRow"),ge=Object(a["p"])("ResultChart"),je=Object(a["p"])("score-explanation"),ve=Object(a["p"])("Badge"),me=Object(a["p"])("inline-icon"),we=Object(a["p"])("Scale");return Object(a["k"])(),Object(a["e"])("div",null,[Object(a["f"])("div",i,[Object(a["f"])("nav",c,[Object(a["f"])("div",l,[Object(a["f"])("div",u,[Object(a["f"])("ul",d,[Object(a["f"])("li",f,[Object(a["f"])("a",{class:"nav-link",href:fe.otherLangLink},Object(a["q"])(fe.otherLang),9,b)]),Object(a["f"])("li",h,[Object(a["f"])("a",p,[Object(a["h"])(be,{type:"github"})])])])])])]),s.showModalInfoFor?(Object(a["k"])(),Object(a["c"])(he,{key:0,title:fe.inputDisplayNames(s.showModalInfoFor),mode:s.showModalInfoFor,params:s.modalParams,vars:s.modalParams,onCloseModal:t[0]||(t[0]=function(e){return fe.resetModal()})},null,8,["title","mode","params","vars"])):Object(a["d"])("",!0),Object(a["f"])("div",O,[Object(a["f"])("div",g,[Object(a["f"])("h1",null,Object(a["q"])(fe.displayNames("heading")),1),Object(a["h"])(pe),j,Object(a["f"])("div",null,[Object(a["f"])("p",null,[Object(a["f"])("span",v,Object(a["q"])(fe.displayNames("last_updated")),1),Object(a["g"])(": "+Object(a["q"])(s.updateTime),1)]),Object(a["f"])("p",null,[Object(a["f"])("span",m,Object(a["q"])(fe.displayNames("sources_used")),1),w,S,(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(s.sources,(function(e){return Object(a["k"])(),Object(a["e"])("a",{href:e.link,class:"text-decoration-none",target:"_blank",key:e.name},[Object(a["g"])(Object(a["q"])(e.name)+" ",1),Object(a["f"])("span",k,"("+Object(a["q"])(fe.trans(e.language))+")",1),C,x],8,y)})),128))])])])]),_,Object(a["f"])("div",null,[Object(a["f"])("h2",{id:"calculate",ref:"calculationForm"},Object(a["q"])(fe.trans("calculate")),513),Object(a["f"])("ul",I,[(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(s.tableNames,(function(e){return Object(a["k"])(),Object(a["e"])("li",{class:"nav-item",role:"presentation",key:e},[Object(a["f"])("button",{class:Object(a["i"])("nav-link px-2 "+(s.mode===e?"active":"")),id:"general-tab",onClick:function(t){s.mode=e,s.name=fe.getPlaceholderText(s.mode)},type:"button",role:"tab","aria-controls":"","aria-selected":"true"},Object(a["q"])(fe.displayNames(e)),11,P)])})),128))]),Object(a["f"])("div",T,[Object(a["f"])("div",q,[Object(a["f"])("h4",null,[Object(a["g"])(Object(a["q"])(fe.displayNames("calculate_for"))+"  ",1),Object(a["t"])(Object(a["f"])("input",{class:"form-control w-50 d-inline",title:fe.trans("enterName"),type:"text",name:"name",id:"productName","onUpdate:modelValue":t[1]||(t[1]=function(e){return s.name=e}),onFocus:t[2]||(t[2]=function(e){return e.target.setSelectionRange(0,e.target.value.length)})},null,40,N),[[a["r"],s.name]])]),Object(a["f"])("p",null,Object(a["q"])(fe.modeInfoText),1),Object(a["f"])("form",null,[Object(a["f"])("div",F,[Object(a["f"])("div",M,[Object(a["f"])("h4",null,[Object(a["g"])(Object(a["q"])(fe.displayNames("negative_inputs"))+" ",1),Object(a["f"])("small",null,Object(a["q"])(fe.displayNames("per100")),1)]),(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(fe.currentTable.negativeInputs(),(function(e){var n=Object(o["a"])(e,1),r=n[0];return Object(a["k"])(),Object(a["c"])(Oe,{key:r,class:"row g-2",name:r,"has-info-modal":fe.hasInfoModal(r),"label-name":fe.inputDisplayNames(r),onOpenModal:function(e){return s.showModalInfoFor=r}},{default:Object(a["s"])((function(){return[Object(a["t"])(Object(a["f"])("input",{class:Object(a["i"])("form-control "+(fe.isValid(r)?"":"is-invalid")),required:"",type:"text",name:r,id:r,"onUpdate:modelValue":function(e){return s.nutritionalInfo[r]=e},onFocus:t[3]||(t[3]=function(e){return e.target.setSelectionRange(0,e.target.value.length)})},null,42,V),[[a["r"],s.nutritionalInfo[r]]]),Object(a["f"])("span",U,Object(a["q"])(fe.getUnit(r)),1)]})),_:2},1032,["name","has-info-modal","label-name","onOpenModal"])})),128))]),Object(a["f"])("div",L,[Object(a["f"])("h4",null,[Object(a["g"])(Object(a["q"])(fe.displayNames("positive_inputs"))+" ",1),Object(a["f"])("small",null,Object(a["q"])(fe.displayNames("per100")),1)]),(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(fe.currentTable.positiveInputs(),(function(e){var n=Object(o["a"])(e,1),r=n[0];return Object(a["k"])(),Object(a["c"])(Oe,{key:r,class:"row g-2",name:r,"has-info-modal":fe.hasInfoModal(r),"label-name":fe.inputDisplayNames(r),onOpenModal:function(e){return s.showModalInfoFor=r}},{default:Object(a["s"])((function(){return[Object(a["t"])(Object(a["f"])("input",{class:Object(a["i"])("form-control "+(fe.isValid(r)?"":"is-invalid")),type:"text",name:r,required:"",id:r,"onUpdate:modelValue":function(e){return s.nutritionalInfo[r]=e},onFocus:t[4]||(t[4]=function(e){return e.target.setSelectionRange(0,e.target.value.length)})},null,42,B),[[a["r"],s.nutritionalInfo[r]]]),Object(a["f"])("span",D,Object(a["q"])(fe.getUnit(r)),1)]})),_:2},1032,["name","has-info-modal","label-name","onOpenModal"])})),128))]),Object(a["f"])("div",A,[Object(a["f"])("img",{src:fe.currentImage,alt:""},null,8,R)])])]),Object(a["f"])("div",{class:Object(a["i"])("row mt-3 "+fe.classesCalcElem)},[Object(a["f"])("div",E,[Object(a["f"])("button",{class:"btn btn-success btn-lg",onClick:t[5]||(t[5]=function(e){return fe.calculateScore()}),disabled:!fe.allFieldsValid()},Object(a["q"])(fe.trans("calculate_score")),9,z)])],2)])])]),s.result?(Object(a["k"])(),Object(a["e"])("div",J,[H,Object(a["f"])("h2",null,[Object(a["g"])(Object(a["q"])(fe.trans("result_for"))+" ",1),Object(a["f"])("span",G,Object(a["q"])(s.result.name),1)]),Object(a["f"])("h3",null,[Object(a["g"])(Object(a["q"])(fe.trans("category"))+": ",1),Object(a["f"])("img",{class:"h-1",src:fe.getImageForMode(s.result.mode),alt:""},null,8,Y),Object(a["g"])(" "+Object(a["q"])(fe.trans(s.result.mode)),1)]),Object(a["f"])("div",X,[Object(a["f"])("div",$,[Object(a["f"])("h3",null,Object(a["q"])(fe.trans("score")),1),Object(a["f"])("div",Q,[Object(a["f"])("div",null,[Object(a["f"])("span",{class:Object(a["i"])("score "+s.result.letterScore.points)},Object(a["q"])(s.result.letterScore.points),3)])])]),Object(a["f"])("div",W,[Object(a["f"])("h3",null,Object(a["q"])(fe.trans("distribution_points")),1),fe.resultColors?(Object(a["k"])(),Object(a["c"])(ge,{key:0,colors:fe.resultColors,"result-data":s.result},null,8,["colors","result-data"])):Object(a["d"])("",!0),Object(a["f"])("h3",null,Object(a["q"])(fe.trans("explanation")),1),Object(a["h"])(je,{"v-bind":s.result,result:s.result},null,8,["v-bind","result"])])]),Z,Object(a["f"])("div",K,[Object(a["f"])("div",ee,[Object(a["f"])("h5",te,Object(a["q"])(fe.trans("negative_inputs")),1),Object(a["f"])("nav",ne,[(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(s.result.negatives.keys(),(function(e){return Object(a["k"])(),Object(a["e"])("a",{key:e,class:"nav-link link-danger",href:"#"+e+"Result"},[Object(a["f"])("span",re,Object(a["q"])(fe.displayNames(e))+": "+Object(a["q"])(s.result.negatives.get(e).value.toLocaleString())+Object(a["q"])(fe.getUnit(e)),1),fe.getColorForProp(e)?(Object(a["k"])(),Object(a["c"])(ve,{key:0,classes:"float-end","badge-data":fe.getColorForProp(e),"is-positive":!1},null,8,["badge-data"])):Object(a["d"])("",!0)],8,ae)})),128))]),Object(a["f"])("h5",oe,Object(a["q"])(fe.trans("positive_inputs")),1),Object(a["f"])("nav",se,[(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(s.result.positives.keys(),(function(e){return Object(a["k"])(),Object(a["e"])("a",{key:e,class:"nav-link link-success","aria-current":"page",href:"#"+e+"Result"},[Object(a["f"])("span",ce,Object(a["q"])(fe.displayNames(e))+": "+Object(a["q"])(s.result.positives.get(e).value.toLocaleString())+Object(a["q"])(fe.getUnit(e)),1),fe.getColorForProp(e)?(Object(a["k"])(),Object(a["c"])(ve,{key:0,classes:"float-end","badge-data":fe.getColorForProp(e),"is-positive":!0},null,8,["badge-data"])):Object(a["d"])("",!0)],8,ie)})),128))]),Object(a["f"])("h5",le,Object(a["q"])(fe.trans("actions")),1),Object(a["f"])("a",{class:"nav-link link-dark clickable",onClick:t[6]||(t[6]=function(e){return fe.initModal("share",{shareUrl:s.shareUrl})})},[Object(a["h"])(me,{type:"share"}),Object(a["g"])(" "+Object(a["q"])(fe.trans("share_result")),1)]),Object(a["f"])("a",{class:"nav-link link-success clickable",onClick:t[7]||(t[7]=function(e){return fe.newCalculation()})},[Object(a["h"])(me,{type:"redo"}),Object(a["g"])(" "+Object(a["q"])(fe.trans("calculate_new")),1)])],512),Object(a["f"])("div",ue,[Object(a["h"])(we,{data:s.result.letterScore.points,fractal:s.result.letterScore.fractal,value:s.result.letterScore.value,name:fe.displayNames("letterScore"),scale:fe.currentPointScale,"was-used-in-calculation":!0,"score-unit":"","scale-classes":" text-white",red:"#d9411a",green:"#008043",yellow:"#f2c011","short-name":"letterScore","details-shown-initial":fe.resultNavVisible,"score-colors-override":s.originalScoreColors,"hide-badge":!0,unit:fe.getUnit("letterScore")},null,8,["data","fractal","value","name","scale","details-shown-initial","score-colors-override","unit"]),Object(a["f"])("h3",null,Object(a["q"])(fe.trans("negative_inputs")),1),(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(s.result.negatives,(function(e){var t=Object(o["a"])(e,2),n=t[0],r=t[1];return Object(a["k"])(),Object(a["c"])(we,{onColorsCalculated:function(e){return fe.appendPropColor(e,n)},data:r.points,fractal:r.fractal,value:r.value,name:fe.displayNames(n),scale:fe.resultScale.n[n].scale,key:n,"is-positive":!1,"short-name":n,"was-used-in-calculation":fe.wasUsedInCalculation(n),"details-shown-initial":fe.resultNavVisible,unit:fe.getUnit(n),"score-unit":"P"},null,8,["onColorsCalculated","data","fractal","value","name","scale","short-name","was-used-in-calculation","details-shown-initial","unit"])})),128)),Object(a["f"])("h3",null,Object(a["q"])(fe.trans("positive_inputs")),1),(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(s.result.positives,(function(e){var t=Object(o["a"])(e,2),n=t[0],r=t[1];return Object(a["k"])(),Object(a["c"])(we,{onColorsCalculated:function(e){return fe.appendPropColor(e,n)},data:r.points,fractal:r.fractal,value:r.value,name:fe.displayNames(n),scale:fe.resultScale.p[n].scale,key:n,"is-positive":!0,"short-name":n,"was-used-in-calculation":fe.wasUsedInCalculation(n),unit:fe.getUnit(n),"details-shown-initial":fe.resultNavVisible,"score-unit":"P"},null,8,["onColorsCalculated","data","fractal","value","name","scale","short-name","was-used-in-calculation","unit","details-shown-initial"])})),128)),Object(a["f"])("a",{class:"btn btn-lg btn-success mb-5 mx-auto d-flex justify-content-center",onClick:t[8]||(t[8]=function(e){return fe.newCalculation()})},Object(a["q"])(fe.trans("calculate_new")),1)])])],512)):Object(a["d"])("",!0),Object(a["f"])("div",de,[Object(a["f"])("div",{class:"me-3 clickable",onClick:t[9]||(t[9]=function(e){return fe.initModal("imprint")})},Object(a["q"])(fe.trans("imprint")),1),Object(a["f"])("div",{class:"clickable",onClick:t[10]||(t[10]=function(e){return fe.initModal("privacy")})},Object(a["q"])(fe.trans("privacy")),1)])])])}var be=n("b85c"),he=n("5530"),pe=(n("b64b"),n("3ca3"),n("2b3d"),n("9861"),n("4fad"),n("25f0"),n("ac1f"),n("5319"),{class:"result"}),Oe=["id"],ge={key:0,class:"details fade-in"},je={class:"fw-bolder"},ve=Object(a["g"])(")"),me={class:"d-flex justify-content-end"},we=["onClick"],Se={key:1,class:"details-container"},ye={class:"gauge-row"},ke={class:"left-container"},Ce={key:0},xe={class:"text-center"},_e={key:0},Ie={key:1},Pe={class:"gauge-container"},Te={class:"right-container"},qe={key:0},Ne={class:"text-center"},Fe={key:0},Me={key:1};function Ve(e,t,n,r,o,s){var i=Object(a["p"])("Badge"),c=Object(a["p"])("Arrow"),l=Object(a["p"])("Gauge");return Object(a["k"])(),Object(a["e"])("div",pe,[Object(a["f"])("div",null,[Object(a["f"])("a",{id:n.shortName+"Result"},[Object(a["f"])("h4",null,[Object(a["g"])(Object(a["q"])(n.name)+": "+Object(a["q"])(n.value)+Object(a["q"])(n.unit)+" ",1),n.hideBadge?Object(a["d"])("",!0):(Object(a["k"])(),Object(a["c"])(i,{key:0,"badge-data":s.getBadgeData(),"is-positive":n.isPositive},null,8,["badge-data","is-positive"])),Object(a["f"])("span",{onClick:t[0]||(t[0]=function(e){return o.detailsShown=!o.detailsShown}),class:"float-end clickable"},Object(a["q"])(o.detailsShown?"-":"+"),1)])],8,Oe)]),o.detailsShown?(Object(a["k"])(),Object(a["e"])("div",ge,[Object(a["f"])("h5",null,[Object(a["g"])(Object(a["q"])(s.trans("score_limits"))+" ",1),Object(a["f"])("small",null,[Object(a["g"])("("+Object(a["q"])(s.trans("higher_is"))+" ",1),Object(a["f"])("span",je,Object(a["q"])(s.trans(n.isPositive?"better":"worse")),1),ve])]),Object(a["f"])("p",null,Object(a["q"])(s.trans("score_limits_info")),1),Object(a["f"])("div",null,[Object(a["f"])("div",me,[o.showAll?(Object(a["k"])(),Object(a["e"])("span",{key:1,class:"toggler text-primary",onClick:t[2]||(t[2]=function(e){return s.hideAllDetails()})},Object(a["q"])(s.trans("hide_limits")),1)):(Object(a["k"])(),Object(a["e"])("span",{key:0,class:"toggler text-primary float-end",onClick:t[1]||(t[1]=function(e){return s.showAllDetails()})},Object(a["q"])(s.trans("show_limits")),1))]),Object(a["f"])("div",{class:Object(a["i"])("scale "+n.scaleClasses)},[(Object(a["k"])(!0),Object(a["e"])(a["a"],null,Object(a["n"])(s.totalSections,(function(e){return Object(a["k"])(),Object(a["e"])("div",{class:"scale-child",key:e,style:Object(a["j"])("background-color: "+s.colorCodes[e]),onClick:function(t){return s.toggleDetailsOfScore(e)}},[s.showBar&&s.isActualScore(e-1)?(Object(a["k"])(),Object(a["e"])("div",{key:0,class:"marker",style:Object(a["j"])("left:"+100*n.fractal+"%;")},null,4)):Object(a["d"])("",!0),s.isSelectedScore(e)?(Object(a["k"])(),Object(a["e"])("div",Se,[Object(a["f"])("div",{class:Object(a["i"])("score"+(s.isActualScore(e-1)?" active":""))},Object(a["q"])(s.scores[e-1]),3),Object(a["f"])("div",null,Object(a["q"])(s.getRangeString(e)),1)])):(Object(a["k"])(),Object(a["e"])("span",{key:2,class:Object(a["i"])(s.classes(e-1))},Object(a["q"])(s.scores[e-1]),3))],12,we)})),128))],2)]),Object(a["f"])("div",null,[Object(a["f"])("h5",null,Object(a["q"])(s.trans("tendency")),1),Object(a["f"])("p",null,Object(a["q"])(s.trans("tendency_info")),1),Object(a["f"])("div",ye,[Object(a["f"])("div",ke,[s.isLowest?Object(a["d"])("",!0):(Object(a["k"])(),Object(a["e"])("div",Ce,[Object(a["h"])(c,{"gradient-id":n.shortName+"leftArrow","color-start":s.gaugeLower,"color-end":s.gaugeLower},null,8,["gradient-id","color-start","color-end"]),Object(a["f"])("div",xe,[s.lowerBound-n.value!==0?(Object(a["k"])(),Object(a["e"])("span",_e,Object(a["q"])(s.trans("diff_from_points",{diff:"-"+s.diffToLower,points:s.previousScore.toString()+n.scoreUnit})),1)):(Object(a["k"])(),Object(a["e"])("span",Ie,Object(a["q"])(s.trans("bordering_on",{points:s.previousScore.toString()+n.scoreUnit})),1))])]))]),Object(a["f"])("div",Pe,[Object(a["h"])(l,{positive:n.isPositive,"lower-color":s.gaugeLower,"upper-color":s.gaugeUpper,"gradient-id":s.gradientId,percent:100*n.fractal},null,8,["positive","lower-color","upper-color","gradient-id","percent"])]),Object(a["f"])("div",Te,[s.isHighest?Object(a["d"])("",!0):(Object(a["k"])(),Object(a["e"])("div",qe,[Object(a["h"])(c,{"gradient-id":n.shortName+"rightArrow","color-start":s.gaugeUpper,"color-end":s.gaugeUpper},null,8,["gradient-id","color-start","color-end"]),Object(a["f"])("div",Ne,[s.upperBound-n.value!==0?(Object(a["k"])(),Object(a["e"])("span",Fe,Object(a["q"])(s.trans("diff_from_points",{diff:"+"+s.diffToUpper,points:s.nextScore.toString()+n.scoreUnit})),1)):(Object(a["k"])(),Object(a["e"])("span",Me,Object(a["q"])(s.trans("bordering_on",{points:s.nextScore.toString()+n.scoreUnit})),1))])]))])])])])):Object(a["d"])("",!0)])}var Ue=n("2909"),Le=(n("a9e3"),n("99af"),n("d81d"),n("4d90"),n("7db0"),n("4ec9"),n("262e")),Be=n("2caf"),De=n("d4ec"),Ae=n("bee2"),Re=n("ade3");n("4de4");function Ee(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=null,o=t[1],s=t[0]===-1/0?a:t[0],i=e-s,c=n;return o!==1/0&&(c=o-s),r=ze(i,c),{value:e,fractal:r,points:t[2]}}function ze(e,t){var n=e/t;return n<1?n:1}function Je(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e[e.length-2],o=r[1]-r[0],s=Object(be["a"])(e);try{for(s.s();!(n=s.n()).done;){var i=n.value;if(3===i.length&&t>i[0]&&t<=i[1])return Ee(t,i,o,a);if(2===i.length&&t<i[0])return i[1]}}catch(c){s.e(c)}finally{s.f()}return console.log(e,t),null}function He(e){return 1e3*e/2.5}var Ge=0,Ye=1,Xe=2,$e=3;function Qe(e,t){var n=e<11||e>=11&&t.value>=80,a=Ge;return n&&(a=e<11?Ye:Xe),{applyProtein:n,reason:a}}var We={BOTH:0,ONLY_INPUT:1,ONLY_OUTPUT:2};function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:We.BOTH;this.scale=e,this.mode=t}var Ke=new Ze([[-1/0,335,0],[335,670,1],[670,1005,2],[1005,1340,3],[1340,1675,4],[1675,2010,5],[2010,2345,6],[2345,2680,7],[2680,3015,8],[3015,3350,9],[3350,1/0,10]]),et=new Ze([[-1/0,4.5,0],[4.5,9,1],[9,13.5,2],[13.5,18,3],[18,22.5,4],[22.5,27,5],[27,31,6],[31,36,7],[36,40,8],[40,45,9],[45,1/0,10]]),tt=new Ze([[-1/0,1,0],[1,2,1],[2,3,2],[3,4,3],[4,5,4],[5,6,5],[6,7,6],[7,8,7],[8,9,8],[9,10,9],[10,1/0,10]]),nt=new Ze([[-1/0,90,0],[90,180,1],[180,270,2],[270,360,3],[360,450,4],[450,540,5],[540,630,6],[630,720,7],[720,810,8],[810,900,9],[900,1/0,10]],We.ONLY_OUTPUT),at=new Ze(null,We.ONLY_INPUT),rt=new Ze([[-1/0,1.6,0],[1.6,3.2,1],[3.2,4.8,2],[4.8,6.4,3],[6.4,8,4],[8,1/0,5]]),ot=new Ze([[-1/0,.9,0],[.9,1.9,1],[1.9,2.8,2],[2.8,3.7,3],[3.7,4.7,4],[4.7,1/0,5]]),st=new Ze([[-1/0,40,0],[40,60,1],[60,80,2],[80,1/0,5]]),it=[[-1/0,-1,"A"],[-1,2,"B"],[2,10,"C"],[10,18,"D"],[18,41,"E"]],ct=function(){function e(){Object(De["a"])(this,e)}return Object(Ae["a"])(e,null,[{key:"getInputNames",value:function(e){return Object.entries(e).filter((function(e){var t=Object(o["a"])(e,2),n=t[1];return n.mode===We.BOTH||n.mode===We.ONLY_INPUT}))}},{key:"negativeInputs",value:function(){return this.getInputNames(this.nutriprops.n)}},{key:"positiveInputs",value:function(){return this.getInputNames(this.nutriprops.p)}},{key:"getBadValues",value:function(e){return{kjValue:Je(this.nutriprops.n.kJ.scale,e.kJ),sugarValue:Je(this.nutriprops.n.sugar.scale,e.sugar),satFatsValue:Je(this.nutriprops.n.satFats.scale,e.satFats),sodiumValue:Je(this.nutriprops.n.sodium.scale,He(e.salt))}}},{key:"getGoodValues",value:function(e){return{protValue:Je(this.nutriprops.p.protein.scale,e.protein),fiberValue:Je(this.nutriprops.p.fiber.scale,e.fiber),goodStuffValue:Je(this.nutriprops.p.goodStuff.scale,e.goodStuff)}}}]),e}();Object(Re["a"])(ct,"nutriprops",{n:{kJ:Ke,sugar:et,satFats:tt,sodium:nt,salt:at},p:{protein:rt,fiber:ot,goodStuff:st}}),Object(Re["a"])(ct,"pointsToScore",it);var lt=function(e){Object(Le["a"])(n,e);var t=Object(Be["a"])(n);function n(){return Object(De["a"])(this,n),t.apply(this,arguments)}return Object(Ae["a"])(n,null,[{key:"calculateScore",value:function(e){var t=this.getBadValues(e),n=t.kjValue,a=t.sugarValue,r=t.satFatsValue,o=t.sodiumValue,s=this.getGoodValues(e),i=s.protValue,c=s.fiberValue,l=s.goodStuffValue,u=n.points+a.points+r.points+o.points,d=Qe(u,l),f=u-l.points-c.points;return d.applyProtein&&(f-=i.points),{negatives:new Map([["kJ",n],["sugar",a],["satFats",r],["sodium",o]]),positives:new Map([["protein",i],["fiber",c],["goodStuff",l]]),badScore:u,applyProtein:d.applyProtein,proteinAppliedReason:d.reason,totalScore:f,letterScore:Je(this.pointsToScore,f,-15)}}}]),n}(ct),ut=function(e){Object(Le["a"])(n,e);var t=Object(Be["a"])(n);function n(){return Object(De["a"])(this,n),t.apply(this,arguments)}return Object(Ae["a"])(n,null,[{key:"calculateScore",value:function(e){var t=this.getBadValues(e),n=t.kjValue,a=t.sugarValue,r=t.satFatsValue,o=t.sodiumValue,s=this.getGoodValues(e),i=s.protValue,c=s.fiberValue,l=s.goodStuffValue,u=n.points+a.points+r.points+o.points,d=i.points+l.points+c.points,f=u-d;return{negatives:new Map([["kJ",n],["sugar",a],["satFats",r],["sodium",o]]),positives:new Map([["protein",i],["fiber",c],["goodStuff",l]]),badScore:u,applyProtein:!0,proteinAppliedReason:$e,totalScore:f,letterScore:Je(this.pointsToScore,f,-15)}}}]),n}(ct),dt=function(e){Object(Le["a"])(n,e);var t=Object(Be["a"])(n);function n(){return Object(De["a"])(this,n),t.apply(this,arguments)}return Object(Ae["a"])(n,null,[{key:"getBadValues",value:function(e){var t=e.satFats/e.totalFats*100;return{kjValue:Je(this.nutriprops.n.kJ.scale,e.kJ),sugarValue:Je(this.nutriprops.n.sugar.scale,e.sugar),ratioValue:Je(this.nutriprops.n.ratioSatFats.scale,t),sodiumValue:Je(this.nutriprops.n.sodium.scale,He(e.salt))}}},{key:"calculateScore",value:function(e){var t=this.getBadValues(e),n=t.kjValue,a=t.sugarValue,r=t.ratioValue,o=t.sodiumValue,s=this.getGoodValues(e),i=s.protValue,c=s.fiberValue,l=s.goodStuffValue,u=n.points+a.points+r.points+o.points,d=Qe(u,l),f=l.points+c.points+(d.applyProtein?i.points:0),b=u-f;return{negatives:new Map([["kJ",n],["sugar",a],["ratioSatFats",r],["sodium",o]]),positives:new Map([["protein",i],["fiber",c],["goodStuff",l]]),badScore:u,applyProtein:d.applyProtein,proteinAppliedReason:d.reason,totalScore:b,letterScore:Je(this.pointsToScore,b,-15)}}}]),n}(ct);Object(Re["a"])(dt,"nutriprops",{n:{kJ:Ke,sugar:et,satFats:tt,sodium:nt,totalFats:new Ze(null,We.ONLY_INPUT),salt:at,ratioSatFats:new Ze([[-1/0,10,0],[10,16,1],[16,22,2],[22,28,3],[28,34,4],[34,40,5],[40,46,6],[46,52,7],[52,58,8],[58,64,9],[64,1/0,10]],We.ONLY_OUTPUT)},p:{protein:rt,fiber:ot,goodStuff:st}});var ft=function(e){Object(Le["a"])(n,e);var t=Object(Be["a"])(n);function n(){return Object(De["a"])(this,n),t.apply(this,arguments)}return Object(Ae["a"])(n,null,[{key:"calculateScore",value:function(e){var t=this.getBadValues(e),n=t.kjValue,a=t.sugarValue,r=t.satFatsValue,o=t.sodiumValue,s=this.getGoodValues(e),i=s.protValue,c=s.fiberValue,l=s.goodStuffValue,u=n.points+a.points+r.points+o.points,d=Qe(u,l),f=l.points+c.points+(d.applyProtein?i.points:0),b=u-f;return{negatives:new Map([["kJ",n],["sugar",a],["satFats",r],["sodium",o]]),positives:new Map([["protein",i],["fiber",c],["goodStuff",l]]),badScore:u,applyProtein:d.applyProtein,proteinAppliedReason:d.reason,totalScore:b,letterScore:Je(this.pointsToScore,b,-20)}}}]),n}(ct);function bt(e){switch(e){case"kJ":return"kJ";case"sodium":return"mg";case"ratioSatFats":return"%";case"letterScore":return"P";default:return"g"}}function ht(e,t){return"protein"!==e||t.applyProtein}Object(Re["a"])(ft,"nutriprops",{n:{kJ:new Ze([[-1/0,0,0],[0,30,1],[30,60,2],[60,90,3],[90,120,4],[120,150,5],[150,180,6],[180,210,7],[210,240,8],[240,270,9],[270,1/0,10]]),sugar:new Ze([[-1/0,0,0],[0,1.5,1],[1.5,3,2],[3,4.5,3],[4.5,6,4],[6,7.5,5],[7.5,9,6],[9,10.5,7],[10.5,12,8],[12,13.5,9],[13.5,1/0,10]]),salt:at,satFats:tt,sodium:nt},p:{protein:rt,fiber:ot,goodStuff:new Ze([[-1/0,40,0],[40,60,2],[60,80,4],[80,1/0,10]])}}),Object(Re["a"])(ft,"pointsToScore",[[-1/0,-1/0,"A"],[-1/0,2,"B"],[3,5,"C"],[5,9,"D"],[9,1/0,"E"]]);var pt={kJ:"kJ",kcal:"Calories",sugar:"Sugar",satFats:"Saturated Fat",totalFats:"Fat (total)",ratioSatFats:"Percentage of Saturated Fats",sodium:"Sodium",salt:"Salt",protein:"Protein",fiber:"Fiber",goodStuff:"Vegetables, fruit, nuts",cheese:"Cheese",general:"Solid Foods",fats:"Fats",drinks:"Drinks",cheesePlaceholder:"a cheese",generalPlaceholder:"a solid food",fatsPlaceholder:"a fat",drinksPlaceholder:"a drink",name:"name",letterScore:"Total Score",share:"Share result",heading:"Nutri Score Calculator",calculate_now:"Calculate now",calculate_score:"Calculate Score",last_updated:"Last updated",sources_used:"Sources used",calculate:"Calculate",calculate_for:"Calculate for ",negative_inputs:"Negative Ingredients",positive_inputs:"Positive Ingredients",result_for:"Result for",category:"Category",score:"Score",distribution_points:"Distribution of Points",points:"Points",explanation:"Explanation",details:"Details",score_limits:"Score/Scale",higher_is:"more is",better:"better",worse:"worse",show_limits:"Show Scale",hide_limits:"Hide Scale",score_limits_info:"This scale shows the limits for the different scores",tendency:"Trend",tendency_info:"This diagram shows the tendency of the score. The assignment of points is done step by step. Therefore, it is shown here whether the value tends to the better or worse score.",diff_from_points:"diff away from points",bordering_on:"bordering on points",share_result:"Share Result",calculate_new:"Calculate another Score",badge_explanation:'The "superscript" means the value of this ingredient is near the direction and tendency score.',better_dat:"better",worse_dat:"worse",higher_dat:"higher",lower_dat:"lower",not_counted:"not counted",actions:"Actions",de:"german",en:"english",imprint:"Contact",privacy:"Privacy",enterName:"Enter a name for this food",per100:"per 100g/100ml"},Ot=new Map([[Ge,"because it is not a cheese, the number of negative points is greater than 11 and the product consists of less than 80% fruit,vegetables or nuts"],[Ye,"because the number of negative points is less than 11 points"],[Xe,"because the negative sum is greater than 11 points, but the product consists of more than 80% fruit, vegetables or nuts"],[$e,"because the protein content of cheese is always included"]]),gt={kJ:"Beschreibt die Energie eines Lebensmittels und wird negativ gewertet.",drinks:'Here the Nutri-Score can be calculated for beverages such as teas, lemonades and juices. Dairy drinks are not calculated here, but via the "Dairy products" category. The Nutri-Score for water is an exception: it is always A. Water is the only beverage that can achieve the score A.',cheese:'Here the Nutri-Score can be calculated for cheese. Cream and butter are calculated with the category "Fats". Quark is not calculated here but in the "Solid Foods" tab',fats:"Here the Nutri-Score can be calculated for foods with high fat content like cream, oils or butter.",general:'The "General" or "Solid Foods" category is used to calculate the Nutri-Score for solid foods. There are separate calculation types for dairy products, fats and beverages.'},jt={kJ:"Der Energiegehalt des Lebensmittels",goodStuff:"Umfasst Obst, Gemüse, Hülsenfüchte, Vollkorn"},vt={salt:!0,fiber:!0,goodStuff:!0},mt="en";function wt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=null!==(t=pt[e])&&void 0!==t?t:e;if(null!==n)for(var r=0,s=Object.entries(n);r<s.length;r++){var i=Object(o["a"])(s[r],2),c=i[0],l=i[1];a=a.replace(c,l)}return a}function St(e){var t;return null!==(t=gt[e])&&void 0!==t?t:"Lorem Ipsum sit dolor amet..."}function yt(e){var t;return null!==(t=jt[e])&&void 0!==t?t:""}function kt(e){return Ct(e+"Placeholder")}function Ct(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n?null!==(t=pt[e])&&void 0!==t?t:e:pt[e]+" ("+pt["not_counted"]+") "}function xt(e){var t;return null!==(t=Ot.get(e))&&void 0!==t?t:"invalid value"}var _t={viewBox:"0 0 125 100",xmlns:"http://www.w3.org/2000/svg"},It=["fill"];function Pt(e,t,n,r,o,s){var i=Object(a["p"])("Gradient");return Object(a["k"])(),Object(a["e"])("svg",_t,[Object(a["f"])("defs",null,[Object(a["h"])(i,{id:n.gradientId,colorStart:n.colorStart,colorEnd:n.colorEnd,colorMiddle:n.colorMiddle},null,8,["id","colorStart","colorEnd","colorMiddle"])]),Object(a["f"])("path",{d:"M 0 50\n           L 50 100\n           L 50 75\n           L 125 75\n           L 125 25\n           L 50 25\n           L 50 0\n           Z",fill:"url(#".concat(n.gradientId,")")},null,8,It)])}var Tt=["id"],qt=["stop-color"],Nt=["offset","stop-color"],Ft=["stop-color"];function Mt(e,t,n,r,o,s){var i;return Object(a["k"])(),Object(a["e"])("linearGradient",{id:n.id},[n.colorStart?(Object(a["k"])(),Object(a["e"])("stop",{key:0,offset:"5%","stop-color":n.colorStart},null,8,qt)):Object(a["d"])("",!0),n.colorMiddle?(Object(a["k"])(),Object(a["e"])("stop",{key:1,offset:(null!==(i=n.middlePercent)&&void 0!==i?i:30)+"%","stop-color":n.colorMiddle},null,8,Nt)):Object(a["d"])("",!0),n.colorEnd?(Object(a["k"])(),Object(a["e"])("stop",{key:2,offset:"95%","stop-color":n.colorEnd},null,8,Ft)):Object(a["d"])("",!0)],8,Tt)}var Vt={name:"Gradient",props:{id:null,colorStart:null,colorMiddle:null,colorEnd:null,middlePercent:{type:Number,default:30}}},Ut=n("6b0d"),Lt=n.n(Ut);const Bt=Lt()(Vt,[["render",Mt]]);var Dt=Bt,At={name:"Arrow",components:{Gradient:Dt},props:{gradientId:null,colorStart:null,colorMiddle:null,colorEnd:null}};const Rt=Lt()(At,[["render",Pt]]);var Et=Rt,zt={viewBox:"0 0 100 50",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Jt=["fill"],Ht=Object(a["f"])("path",{d:"M 25 51\n           A 25 25, 0, 0, 1, 75 51\n           Z",fill:"white"},null,-1),Gt=["d"],Yt=["d"];function Xt(e,t,n,r,o,s){var i=Object(a["p"])("Gradient");return Object(a["k"])(),Object(a["e"])("svg",zt,[Object(a["f"])("defs",null,[Object(a["h"])(i,{id:n.gradientId,"color-start":n.lowerColor,"color-end":n.upperColor},null,8,["id","color-start","color-end"])]),Object(a["f"])("path",{d:"M 0 50\n           A 50 50, 0, 0, 1, 100 50\n           Z",fill:"url(#".concat(n.gradientId,")")},null,8,Jt),Ht,Object(a["f"])("path",{fill:"#333",d:s.tachoNeedleSemiCirclePath},null,8,Gt),Object(a["f"])("path",{d:s.tachoNeedlePath,stroke:"#333",fill:"#333"},null,8,Yt)])}var $t={name:"Arrow",components:{Gradient:Dt},props:{positive:Boolean,upperColor:String,lowerColor:String,percent:Number,gradientId:String},data:function(){return{bestColor:"#3aff00",middleColor:"#ffff00",worstColor:"#ff7f00",innerCircleRadius:6,middleX:50,middleY:50,shiftDown:1,gaugeThickness:6}},computed:{tachoNeedlePath:function(){return"M ".concat(this.tachoXStart," ").concat(this.tachoYStart,"\n           L ").concat(this.tachoX," ").concat(this.tachoY," L ").concat(this.tachoXEndt," ").concat(this.tachoYEnd," Z")},tachoNeedleSemiCirclePath:function(){return"M ".concat(this.middleX-this.innerCircleRadius," ").concat(this.middleY+this.shiftDown,"\n           A  5, 5, 0, 0, 1, ").concat(this.middleX+this.innerCircleRadius," ").concat(this.middleY+this.shiftDown,"\n           Z")},tachoX:function(){var e=50,t=this.percent*(Math.PI/100),n=this.polarToCartesian(t,e);return console.log("coords",n),console.log("angle",t),50-n[0]},tachoY:function(){var e=50,t=this.percent*(Math.PI/100),n=this.polarToCartesian(t,e);return console.log("coords",n),console.log("angle",t),50-n[1]},tachoXStart:function(){var e=this.innerCircleRadius-1,t=(this.percent-this.gaugeThickness)*(Math.PI/100),n=this.polarToCartesian(t,e);return console.log("coords",n),console.log("angle",t),50-n[0]},tachoYStart:function(){var e=this.innerCircleRadius-1,t=(this.percent-this.gaugeThickness)*(Math.PI/100),n=this.polarToCartesian(t,e);return console.log("coords",n),console.log("angle",t),50-n[1]},tachoXEndt:function(){var e=this.innerCircleRadius-1,t=(this.percent+this.gaugeThickness)*(Math.PI/100),n=this.polarToCartesian(t,e);return console.log("coords",n),console.log("angle",t),50-n[0]},tachoYEnd:function(){var e=this.innerCircleRadius-1,t=(this.percent+this.gaugeThickness)*(Math.PI/100),n=this.polarToCartesian(t,e);return console.log("coords",n),console.log("angle",t),50-n[1]}},methods:{polarToCartesian:function(e,t){var n=t*Math.cos(e),a=t*Math.sin(e);return[n,a]}}};const Qt=Lt()($t,[["render",Xt]]);var Wt=Qt,Zt=["title"];function Kt(e,t,n,r,o,s){var i;return Object(a["k"])(),Object(a["e"])("span",{title:s.title,class:Object(a["i"])(s.calculatedClasses),style:Object(a["j"])("background-color:"+n.badgeData.color)},[Object(a["g"])(Object(a["q"])(s.sign)+Object(a["q"])(s.value),1),Object(a["f"])("sup",null,Object(a["q"])(null!==(i=s.superscript)&&void 0!==i?i:" "),1)],14,Zt)}var en={name:"Badge",props:{badgeData:{value:Number,color:String,percentage:Number},classes:String,isPositive:Boolean},computed:{low:function(){return"▼"},high:function(){return"▲"},sign:function(){return this.isPositive?"-":"+"},value:function(){return this.badgeData.value>9?this.badgeData.value:" "+this.badgeData.value},calculatedClasses:function(){var e;return"badge fs-6 text-black-50 score-badge "+(null!==(e=this.classes)&&void 0!==e?e:"")},superscript:function(){return this.badgeData.percentage<25?this.low:this.badgeData.percentage>75?this.high:null},title:function(){if(this.superscript){var e=this.isPositive?wt("better_dat"):wt("worse_dat"),t=wt("higher_dat");return this.superscript===this.low&&(e=this.isPositive?wt("worse_dat"):wt("better_dat"),t=wt("lower_dat")),wt("badge_explanation",{superscript:this.superscript,direction:t,tendency:e})}return null}}};n("ff32");const tn=Lt()(en,[["render",Kt],["__scopeId","data-v-a82783f0"]]);var nn=tn,an=300,rn="#67ff00",on="#ffd200",sn="#ff7f00",cn={name:"Scale",components:{Badge:nn,Arrow:Et,Gauge:Wt},props:{data:Number,fractal:Number,value:Number,scale:Array,name:String,shortName:String,isPositive:Boolean,unit:String,scoreUnit:String,scaleClasses:{default:"",type:String},hideBadge:{default:!1,type:Boolean},collapse:{default:!1,type:Boolean},green:{default:rn,type:String},yellow:{default:on,type:String},red:{default:sn,type:String},scoreColorsOverride:Array,wasUsedInCalculation:Boolean,detailsShownInitial:{default:!0,type:Boolean}},data:function(){return{detailsSelectedScoreIndex:Number,showAll:!1,badgeData:Object,detailsShown:this.detailsShownInitial}},emits:["colors-calculated"],computed:{sectionLength:function(){return an/this.totalSections},totalSections:function(){return this.scale.length},colorCodes:function(){if(this.scoreColorsOverride)return[""].concat(Object(Ue["a"])(this.scoreColorsOverride));for(var e=[],t=255,n=0;n<=this.totalSections;n++){var a=0,r=0;n>this.totalSections/2?(r=Math.ceil(n*(1/this.totalSections)*t*2),a=t-Math.ceil(n*(1/this.totalSections)*t/2)):(a=t,r=Math.ceil(n*(1/this.totalSections)*2.5*t));var o=0;e.push(this.toHexCode(r,a,o))}return this.isPositive&&(e=e.reverse()),e},lowerLimits:function(){return this.scale.map((function(e){return e[0]}))},scores:function(){return console.log(this.scale.map((function(e){return e[e.length-1]}))),this.scale.map((function(e){return e[e.length-1]}))},previousScore:function(){return this.scores[this.currentScoreIndex-1]},nextScore:function(){return this.scores[this.currentScoreIndex+1]},scoreOffset:function(){switch(this.unit){case"P":case"kJ":return 1;case"g":return.01;case"mg":return 1;default:return 0}},diffToLower:function(){return this.round(this.value-this.lowerBound).toString()+this.unit},diffToUpper:function(){return this.round(this.upperBound-this.value+this.scoreOffset).toString()+this.unit},currentScoreIndex:function(){return this.scores.indexOf(this.data)},showBar:function(){return!(0===this.value||this.isHighest&&1===this.fractal)},gradientId:function(){return this.shortName+"GaugeGradient"},nextColor:function(){var e=this.scores.indexOf(this.data);return e>=0&&e++<this.scores.length?this.colorCodes[e]:this.colorCodes[0]},previousColor:function(){var e=this.scores.indexOf(this.data);return e>0?this.colorCodes[e-1]:this.colorCodes[0]},inFirstHalf:function(){return console.log(this.name,"idxOf",this.scores.indexOf(this.data)),console.log(this.scores.indexOf(this.data)<.5*this.scores.length),this.scores.indexOf(this.data)<.5*this.scores.length},gaugeLower:function(){return console.log("ifh",this.inFirstHalf),this.inFirstHalf?this.isPositive?this.red:this.green:this.yellow},gaugeUpper:function(){return this.inFirstHalf?this.yellow:this.isPositive?this.green:this.red},tableDataScore:function(){return this.getScoreDataFromTable(this.data)},lowerBound:function(){return this.tableDataScore[0]},upperBound:function(){return this.tableDataScore[1]},isLowest:function(){return!isFinite(this.lowerBound)},isHighest:function(){return!isFinite(this.upperBound)||!this.nextScore}},mounted:function(){this.detailsSelectedScoreIndex=-1},methods:{trans:wt,toHexCode:function(e,t,n){return e=e>255?255:e,n=e>255?255:n,t=e>255?255:t,"#"+e.toString(16).padStart(2,"0")+t.toString(16).padStart(2,"0")+n.toString(16).padStart(2,"0")},isActualScore:function(e){return this.data===this.scores[e]},classes:function(e){var t="scale-item-score";return this.isActualScore(e)?t+" actual-score":t},isSelectedScore:function(e){return this.detailsSelectedScoreIndex===e||this.showAll},getScoreDataFromTable:function(e){return this.scale.find((function(t){return t[t.length-1]===e}))},getRangeString:function(e){var t=this.scale[e-1][0],n=this.scale[e-1][1];if(t===-1/0&&n===-1/0)return"n/a";var a=">",r="<";return t===-1/0?"".concat(r," ").concat(n).concat(this.unit):"".concat(a," ").concat(t).concat(this.unit)},round:function(e){return Math.round(100*e)/100},toggleDetailsOfScore:function(e){this.detailsSelectedScoreIndex===e?this.detailsSelectedScoreIndex=-1:this.detailsSelectedScoreIndex=e},showAllDetails:function(){this.detailsSelectedScoreIndex=-1,this.showAll=!0},hideAllDetails:function(){this.showAll=!1},getBadgeData:function(){var e={value:this.data+this.scoreUnit,percentage:100*this.fractal,color:this.colorCodes[this.currentScoreIndex+1]+(this.wasUsedInCalculation?"FF":"77")};return console.log(e),this.$emit("colors-calculated",e),e},getInfoText:function(e){return St(e)}}};n("208a");const ln=Lt()(cn,[["render",Ve],["__scopeId","data-v-b8696ebc"]]);var un=ln,dn=function(e){return Object(a["m"])("data-v-531598cd"),e=e(),Object(a["l"])(),e},fn=dn((function(){return Object(a["f"])("canvas",{id:"resultChart"},null,-1)})),bn=[fn];function hn(e,t,n,r,o,s){return Object(a["k"])(),Object(a["e"])("div",null,bn)}var pn=n("d549"),On=.25,gn={name:"ResultChart",props:{resultData:Object,colors:Object},methods:{getColor:function(e){return this.colors[e].color},getPoints:function(e){var t,n=(null!==(t=this.resultData.negatives.get(e))&&void 0!==t?t:this.resultData.positives.get(e)).points;0===n&&(n=On);var a=this.resultData.negatives.get(e)?1:-1;return a*n},getDisplayNames:function(e){return Ct(e,ht(e,this.resultData))}},mounted:function(){var e=[].concat(Object(Ue["a"])(this.resultData.negatives.keys()),Object(Ue["a"])(this.resultData.positives.keys())),t=e.map(this.getDisplayNames),n={data:e.map(this.getPoints),backgroundColor:e.map(this.getColor)},a={type:"bar",data:{labels:t,datasets:[n]},options:{title:wt("distribution_of_points"),responsive:!0,scales:{y:{min:-5,max:10,label:wt("points")}},plugins:{tooltip:{callbacks:{label:function(e){var t=e.dataset.label||"";if(t&&(t+=": "),null!==e.parsed.y){var n=Math.abs(e.parsed.y)===On?0:e.parsed.y;t="".concat(t).concat(n," ").concat(wt("points"))}return t}}},legend:{display:!1}}}};new pn["a"](document.getElementById("resultChart"),a)}};n("b99b");const jn=Lt()(gn,[["render",hn],["__scopeId","data-v-531598cd"]]);var vn=jn,mn=Object(a["f"])("p",null," The Nutri-Score is calculated by adding points for the bad ingredients and subtracting points for the good ingredients. The more points a food has in total, the unhealthier it is. Depending on the score, the food is assigned a grade from A-E. A is the best score and E is the worst. ",-1),wn=Object(a["g"])(" First the points for the negative ingredients are calculated: "),Sn=Object(a["f"])("br",null,null,-1),yn={class:"fst-italic"},kn=Object(a["g"])(" Then points are deducted for the positive ingredients. In the case of the positive ingredients, the points for protein were "),Cn={key:0},xn=Object(a["f"])("br",null,null,-1),_n={class:"fst-italic"},In=Object(a["f"])("br",null,null,-1),Pn={class:"fst-italic"};function Tn(e,t,n,r,o,s){return Object(a["k"])(),Object(a["e"])("div",null,[mn,Object(a["f"])("p",null,[wn,Sn,Object(a["f"])("span",yn,Object(a["q"])(s.negativesSum)+" = "+Object(a["q"])(n.result.badScore)+"P",1)]),Object(a["f"])("p",null,[kn,n.result.applyProtein?Object(a["d"])("",!0):(Object(a["k"])(),Object(a["e"])("span",Cn,"not")),Object(a["g"])(" deducted, "+Object(a["q"])(s.proteinAppliedReason)+". The total score for the positive ingredients is therefore calculated as follows:",1),xn,Object(a["f"])("span",_n,Object(a["q"])(s.positivesSum)+" = "+Object(a["q"])(s.goodScore)+"P",1)]),Object(a["f"])("p",null,[Object(a["g"])(" To obtain the overall result, the sum of the good ingredients "+Object(a["q"])(s.goodScore)+"P is deducted from the sum of negative ingredients ("+Object(a["q"])(n.result.badScore)+"P): ",1),In,Object(a["f"])("span",Pn,Object(a["q"])(n.result.badScore)+"P - "+Object(a["q"])(s.goodScore)+"P = "+Object(a["q"])(n.result.totalScore)+"P",1)]),Object(a["f"])("p",null," This results in "+Object(a["q"])(n.result.letterScore.value)+" and thus corresponds to a Nutri-Score of "+Object(a["q"])(n.result.letterScore.points)+". ",1)])}n("159b"),n("a15b");var qn={name:"ScoreExplanation",props:{result:Object},computed:{negativesSum:function(){return this.getSumStringForMap(this.result.negatives)},positivesSum:function(){return this.getSumStringForMap(this.result.positives)},goodScore:function(){return Math.abs(this.result.totalScore-this.result.badScore)},proteinAppliedReason:function(){return xt(this.result.proteinAppliedReason)}},methods:{getSumStringForMap:function(e){var t=this,n=[];return e.forEach((function(e,a){return!ht(a,t.result)||n.push("".concat(e.points,"P(").concat(Ct(a),")"))})),n.join(" + ")}}};const Nn=Lt()(qn,[["render",Tn]]);var Fn=Nn,Mn=function(e){return Object(a["m"])("data-v-6ebe934f"),e=e(),Object(a["l"])(),e},Vn={class:"modal fade show",tabindex:"-1",role:"dialog",style:{display:"block"},"aria-hidden":"true"},Un={class:"modal-dialog modal-dialog-centered",role:"document"},Ln={class:"modal-content"},Bn={class:"modal-header"},Dn={class:"modal-title"},An={class:"modal-body"},Rn={key:0},En=Mn((function(){return Object(a["f"])("p",null," Here the amounts of fruits, vegetables and legumes as well as nuts and nuts are counted. ",-1)})),zn=Mn((function(){return Object(a["f"])("h5",null,"Limits",-1)})),Jn={class:"text-success"},Hn=Object(a["g"])(" Fruits, vegetables and legumes, as well as nuts count in the calculation, but ... "),Gn={class:"text-danger"},Yn=Mn((function(){return Object(a["f"])("span",{class:"fw-bolder"}," starchy tubers (e.g. potatoes and sweet potatoes),, Quinoa und spices, flour from corn or legumes ",-1)})),Xn=Object(a["g"])(" do not count. "),$n=Mn((function(){return Object(a["f"])("hr",null,null,-1)})),Qn=Mn((function(){return Object(a["f"])("h5",null,"Important infos",-1)})),Wn=Mn((function(){return Object(a["f"])("p",null,[Object(a["f"])("span",{class:"fw-bolder"},"Pickled foods"),Object(a["g"])(" The liquid can only be included in the calculation if it is to be consumed. ")],-1)})),Zn=Mn((function(){return Object(a["f"])("p",null,[Object(a["f"])("span",{class:"fw-bolder"},"Cooked/Dried fruits/vegetables"),Object(a["g"])(" The manufacturer can decide for himself whether to include the weight of the cooked or uncooked ingredient. ")],-1)})),Kn=Mn((function(){return Object(a["f"])("hr",null,null,-1)})),ea=Mn((function(){return Object(a["f"])("h5",null,"Processing/Preparation",-1)})),ta={class:"text-success"},na=Object(a["g"])(" contained whole, cut and peeled "),aa={class:"text-success"},ra=Object(a["g"])(" are frozen, dried, cooked and preserved in cans "),oa={class:"text-warning"},sa=Object(a["g"])(" Juices and purees, if the fruit and vegetables have only been pressed, pureed or otherwise chopped up "),ia={class:"text-danger"},ca=Object(a["g"])(" not concentrated syrup or highly processed fruits and vegetables. "),la={key:1},ua=Mn((function(){return Object(a["f"])("p",null," When calculating the Nutri-Score, the sodium content is rated negative. The sodium content can be calculated from the amount of salt . Enter the salt content specified by the manufacturer in the input field, and the application calculates the sodium content (40% of the salt contained). ",-1)})),da=[ua],fa={key:2},ba=Mn((function(){return Object(a["f"])("p",null," Show others your calculation with this link ",-1)})),ha=["value"],pa={key:3},Oa=Mn((function(){return Object(a["f"])("p",null," When calculating the Nutri-Score, the dietary fiber content is rated positively. Unfortunately, the declaration of the dietary fiber content on the packaging is voluntary in Germany. ",-1)})),ga=Mn((function(){return Object(a["f"])("p",null," If the dietary fiber content has not been indicated, it may be possible to ask the manufacturer. ",-1)})),ja=[Oa,ga],va={key:4},ma=Mn((function(){return Object(a["f"])("span",{class:"fw-bold"},"Contact",-1)})),wa=Mn((function(){return Object(a["f"])("p",null,[Object(a["g"])(" E-Mail: info(at)nutrirechner.xyz "),Object(a["f"])("br"),Object(a["f"])("a",{href:"https://github.com/paulinko/nutri-calc",target:"_blank"},"Source Code on Github")],-1)})),Sa=[ma,wa],ya={key:5},ka=Mn((function(){return Object(a["f"])("span",{class:"fw-bold"},"Server/Log Files",-1)})),Ca=Mn((function(){return Object(a["f"])("p",null," The provider (or its web space provider) collects data about each access to the offer (so-called so-called server log files). The access data includes: Name of the accessed website, file, date and time of access, amount of data transferred, message about successful retrieval, browser type and version, the operating system of the user, referrer URL (the previously visited visited page), IP address and the requesting provider. ",-1)})),xa=Mn((function(){return Object(a["f"])("p",null," The provider uses the log data only for statistical analysis for the purpose of the operation, security and security and optimization of the offer. The provider reserves the right, however, to review the log data to check the log data retrospectively if there is a justified suspicion of unlawful use due to specific illegal use exists. ",-1)})),_a=Mn((function(){return Object(a["f"])("span",{class:"fw-bold"},"Contact",-1)})),Ia=Mn((function(){return Object(a["f"])("p",null," When contacting the provider (for example, by e-mail), the user's information is stored for the purpose of processing the request and in the event that follow-up questions arise. ",-1)})),Pa=[ka,Ca,xa,_a,Ia],Ta={key:6};function qa(e,t,n,r,o,s){var i=Object(a["p"])("inline-icon");return Object(a["k"])(),Object(a["e"])("div",Vn,[Object(a["f"])("div",Un,[Object(a["f"])("div",Ln,[Object(a["f"])("div",Bn,[Object(a["f"])("h5",Dn,Object(a["q"])(n.title),1),Object(a["f"])("button",{type:"button",class:"btn-close clickable",onClick:t[0]||(t[0]=function(e){return s.closeModal()}),"aria-label":"Close"})]),Object(a["f"])("div",An,["goodStuff"===n.mode?(Object(a["k"])(),Object(a["e"])("div",Rn,[En,zn,Object(a["f"])("p",Jn,[Object(a["h"])(i,{type:"check"}),Hn]),Object(a["f"])("p",Gn,[Object(a["h"])(i,{type:"times"}),Yn,Xn]),$n,Qn,Wn,Zn,Kn,ea,Object(a["f"])("p",ta,[Object(a["h"])(i,{type:"check"}),na]),Object(a["f"])("p",aa,[Object(a["h"])(i,{type:"check"}),ra]),Object(a["f"])("p",oa,[Object(a["h"])(i,{type:"check"}),sa]),Object(a["f"])("p",ia,[Object(a["h"])(i,{type:"times"}),ca])])):"salt"===n.mode?(Object(a["k"])(),Object(a["e"])("div",la,da)):"share"===n.mode?(Object(a["k"])(),Object(a["e"])("div",fa,[ba,Object(a["f"])("input",{type:"text",class:"form-control",ref:"shareUrl",value:n.vars.shareUrl},null,8,ha),Object(a["f"])("button",{class:"btn btn-primary btn-copy btn-lg mx-auto d-block my-1 mb-2",onClick:t[1]||(t[1]=function(t){return s.copy(e.$refs.shareUrl,t.target)})},"Copy ")])):"fiber"===n.mode?(Object(a["k"])(),Object(a["e"])("div",pa,ja)):"imprint"===n.mode?(Object(a["k"])(),Object(a["e"])("div",va,Sa)):"privacy"===n.mode?(Object(a["k"])(),Object(a["e"])("div",ya,Pa)):(Object(a["k"])(),Object(a["e"])("div",Ta))])])])])}var Na=function(e){return Object(a["m"])("data-v-73e6c6e3"),e=e(),Object(a["l"])(),e},Fa={key:0,"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check",class:"svg-inline--fa fa-check fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Ma=Na((function(){return Object(a["f"])("path",{fill:"currentColor",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},null,-1)})),Va=[Ma],Ua={key:1,"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"times",class:"svg-inline--fa fa-times fa-w-11",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 352 512"},La=Na((function(){return Object(a["f"])("path",{fill:"currentColor",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},null,-1)})),Ba=[La],Da={key:2,"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"share",class:"svg-inline--fa fa-share fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Aa=Na((function(){return Object(a["f"])("path",{fill:"currentColor",d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"},null,-1)})),Ra=[Aa],Ea={key:3,"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"github",class:"svg-inline--fa fa-github fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},za=Na((function(){return Object(a["f"])("path",{fill:"currentColor",d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"},null,-1)})),Ja=[za],Ha={key:4,"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"redo-alt",class:"svg-inline--fa fa-redo-alt fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Ga=Na((function(){return Object(a["f"])("path",{fill:"currentColor",d:"M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"},null,-1)})),Ya=[Ga];function Xa(e,t,n,r,o,s){return"check"===n.type?(Object(a["k"])(),Object(a["e"])("svg",Fa,Va)):"times"===n.type?(Object(a["k"])(),Object(a["e"])("svg",Ua,Ba)):"share"===n.type?(Object(a["k"])(),Object(a["e"])("svg",Da,Ra)):"github"===n.type?(Object(a["k"])(),Object(a["e"])("svg",Ea,Ja)):"redo"===n.type?(Object(a["k"])(),Object(a["e"])("svg",Ha,Ya)):Object(a["d"])("",!0)}var $a={name:"InlineIcon",props:{type:String}};n("6bf0");const Qa=Lt()($a,[["render",Xa],["__scopeId","data-v-73e6c6e3"]]);var Wa=Qa,Za={name:"modal",components:{InlineIcon:Wa},props:{title:{type:String,default:"info"},mode:{type:String,default:"info"},vars:Object},data:function(){return{classes:"fade-in"}},emits:["close-modal"],methods:{closeModal:function(){this.$emit("close-modal"),this.classes="fade-in"},copy:function(e,t){e.select(),e.setSelectionRange(0,99999),navigator.clipboard.writeText(e.value);var n=t.classList.toString(),a=t.innerText;t.innerText="Copied",t.classList=n+" btn-success",setTimeout((function(){t.classList=n,t.innerText=a}),1e3)}}};n("ffac");const Ka=Lt()(Za,[["render",qa],["__scopeId","data-v-6ebe934f"]]);var er=Ka,tr=Object(a["f"])("p",null," The Nutri-Score is a seal that is intended to allow a quick and simplified comparison of similar foods. ",-1),nr=Object(a["f"])("p",null," The purpose of this calculator is to illustrate the calculation of the Nutri-Score. ",-1),ar=Object(a["f"])("p",null,[Object(a["f"])("span",{class:"fw-bold"},"Important Notice:"),Object(a["g"])(" This App is an inofficial project, all calculations and information are without warranty. Please refer to "),Object(a["f"])("a",{href:"https://www.santepubliquefrance.fr/media/files/02-determinants-de-sante/nutrition-et-activite-physique/nutri-score/tableur-calcul-nutri-score-en"}," the official calculation table "),Object(a["g"])(" by Santé publique France. ")],-1),rr=Object(a["f"])("div",null,[Object(a["f"])("a",{href:"#calculate",class:"btn btn-success"},"Calculate now"),Object(a["f"])("a",{href:"?kJ=1590+&sugar=22.4&satFats=0.6&sodium=0&protein=8.5&fiber=8.6&oil=0&goodStuff=0&totalFats=100&salt=0.22&mode=general&name=Chocolate+Cereal",class:"btn btn-primary ms-1"}," View example ")],-1),or=[tr,nr,ar,rr];function sr(e,t,n,r,o,s){return Object(a["k"])(),Object(a["e"])("div",null,or)}var ir={name:"Intro"};const cr=Lt()(ir,[["render",sr]]);var lr=cr,ur=function(e){return Object(a["m"])("data-v-95de99a6"),e=e(),Object(a["l"])(),e},dr={class:"row g-2"},fr={class:"col-auto flex-grow-1"},br=["for"],hr=ur((function(){return Object(a["f"])("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"question-circle",class:"svg-inline--fa fa-question-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[Object(a["f"])("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z"})],-1)})),pr=[hr],Or={class:"col-4"},gr={class:"input-group"};function jr(e,t,n,r,o,s){return Object(a["k"])(),Object(a["e"])("div",dr,[Object(a["f"])("div",fr,[Object(a["f"])("label",{class:"col-form-label",for:n.name},Object(a["q"])(n.labelName),9,br),n.hasInfoModal?(Object(a["k"])(),Object(a["e"])("span",{key:0,class:"text-primary small clickable ms-1",onClick:t[0]||(t[0]=function(e){return s.openModal()})},pr)):Object(a["d"])("",!0)]),Object(a["f"])("div",Or,[Object(a["f"])("div",gr,[Object(a["o"])(e.$slots,"default",{},void 0,!0)])])])}var vr={name:"InputRow",props:{name:String,labelName:String,hasInfoModal:Boolean},emits:["open-modal"],methods:{openModal:function(){this.$emit("open-modal")}}};n("6257");const mr=Lt()(vr,[["render",jr],["__scopeId","data-v-95de99a6"]]);var wr=mr;function Sr(e,t,n){this.name=e,this.link=t,this.language=n}var yr=[new Sr("Nutri-Score Technical and Scientific FAQ ","https://www.santepubliquefrance.fr/content/download/150263/file/2021_07_21_QR_scientifique_et_technique_V41_EN.pdf","en"),new Sr("Die wichtigsten Fragen und Antworten zum Nutri-Score","https://www.vzhh.de/sites/default/files/medien/134/dokumente/2019-10_Verbraucherzentrale-Hamburg_Fragen-und-Antworten-zum-Nutri-Score.pdf","de"),new Sr("Development of a new front-of-pack nutrition label in France: the five-colour Nutri-Score","https://www.euro.who.int/__data/assets/pdf_file/0008/357308/PHP-1122-NutriScore-eng.pdf","en")],kr=[new Sr(" Warum Nesquik einen so guten Nutri-Score bekommt","https://www.vzhh.de/themen/lebensmittel-ernaehrung/warum-nesquik-einen-so-guten-nutri-score-bekommt","deutsch")],Cr={name:"Calculator",components:{Scale:un,Badge:nn,ResultChart:vn,ScoreExplanation:Fn,Modal:er,InputRow:wr,InlineIcon:Wa,Intro:lr},computed:{resultNavVisible:function(){return document.getElementsByTagName("body")[0].getBoundingClientRect().width>=576},currentTable:function(){switch(this.mode){case"general":return lt;case"fats":return dt;case"cheese":return ut;case"drinks":return ft;default:return lt}},otherLang:function(){return"de"===mt?"Englisch":"German"},otherLangLink:function(){return"de"===mt?"../en/":"../de/"},currentImage:function(){return this.getImageForMode(this.mode)},classesCalcElem:function(){return this.result?"":" result-hidden"},resultScale:function(){return this.resultTable.nutriprops},currentPointScale:function(){return this.resultTable.pointsToScore},resultColors:function(){var e=this.result.negatives.size+this.result.positives.size===Object.keys(this.colors).length;return e?this.colors:null},modeInfoText:function(){return St(this.mode)}},data:function(){return{nutritionalInfo:{kJ:0,sugar:0,satFats:0,sodium:0,protein:0,fiber:0,oil:0,goodStuff:0,totalFats:100,salt:0},modalParams:{},name:kt("general"),originalScoreColors:["#008043","#85b931","#f2c011","#e37c13","#d9411a"],colors:{},result:null,mode:"general",tableNames:["general","fats","drinks","cheese"],sources:yr,furtherReadings:kr,resultTable:Object,showModalInfoFor:null,shareUrl:null,updateTime:new Date("2022-01-02").toLocaleString(void 0,{year:"numeric",month:"2-digit",day:"2-digit"}),availableModalInfos:{}}},mounted:function(){document.title=wt("heading");var e=new URL(window.location.href),t=e.searchParams.get("mode");if(t){this.mode=t,this.name=e.searchParams.get("name");for(var n=0,a=Object.entries(this.nutritionalInfo);n<a.length;n++){var r=Object(o["a"])(a[n],1),s=r[0],i=e.searchParams.get(s);i&&(this.nutritionalInfo[s]=i)}this.calculateScore()}},methods:{trans:wt,calculateScore:function(){var e=this;this.result=null,this.colors={};for(var t={},n=0,a=Object.entries(this.nutritionalInfo);n<a.length;n++){var r=Object(o["a"])(a[n],2),s=r[0],i=r[1];t[s]=this.normalizeFloat(i)}this.result=this.currentTable.calculateScore(t),console.log("result",this.result),this.result.mode=this.mode,this.result.name=this.name||this.getDisplayNames(this.mode),this.resultTable=this.currentTable,this.$nextTick((function(){setTimeout((function(){scrollTo({top:window.scrollY+e.$refs.resultContainer.getBoundingClientRect().top,behavior:"smooth"})}),25)})),this.shareUrl=this.buildUrl(this.nutritionalInfo,this.mode,this.name),window.history.pushState("","","?")},resetModal:function(){this.showModalInfoFor=null,this.modalParams={}},newCalculation:function(){this.nutritionalInfo={kJ:0,sugar:0,satFats:0,sodium:0,protein:0,fiber:0,oil:0,goodStuff:0,totalFats:100,salt:0},this.mode="general",this.name=this.getPlaceholderText(this.mode),scrollTo({top:window.scrollY+this.$refs.calculationForm.getBoundingClientRect().top,behavior:"smooth"})},initModal:function(e,t){this.showModalInfoFor=e,this.modalParams=t},buildQuery:function(e,t,n){var a=new URLSearchParams(Object(he["a"])(Object(he["a"])({},e),{},{mode:t,name:n}));return a.toString()},buildUrl:function(e,t,n){return window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+this.buildQuery(e,t,n)},normalizeFloat:function(e){return"de"===mt?parseFloat(e.toString().replace(",",".")):parseFloat(e.toString())},inputDisplayNames:function(e){return Ct(e,!0)},displayNames:function(e){return Ct(e,ht(e,this.result))},getUnit:function(e){return bt(e)},getInputInfoText:function(e){return yt(e)},getPlaceholderText:function(e){return kt(e)},appendPropColor:function(e,t){this.colors[t]=e},getColorForProp:function(e){var t;return null!==(t=this.colors[e])&&void 0!==t?t:null},hasInfoModal:function(e){return!!vt[e]},wasUsedInCalculation:function(e){return"protein"!==e||this.result.applyProtein},getImageForMode:function(e){var t="./img/";switch(e){case"general":return"".concat(t,"sandwich.svg");case"fats":return"".concat(t,"butter.svg");case"cheese":return"".concat(t,"cheese-wedge.svg");case"drinks":return"".concat(t,"cup.svg");default:return"".concat(t,"sandwich.svg")}},isValid:function(e){var t=this.nutritionalInfo[e];if(""===t)return!1;t=this.normalizeFloat(t);var n=function(e){return e>=0&&e<=100},a={kJ:function(e){return e>=0&&e<=1e4}};return(a[e]||n)(t)},allFieldsValid:function(){var e,t=!0,n=Object(be["a"])(this.currentTable.negativeInputs());try{for(n.s();!(e=n.n()).done;){var a=Object(o["a"])(e.value,1),r=a[0];t&=this.isValid(r)}}catch(u){n.e(u)}finally{n.f()}var s,i=Object(be["a"])(this.currentTable.positiveInputs());try{for(i.s();!(s=i.n()).done;){var c=Object(o["a"])(s.value,1),l=c[0];t&=this.isValid(l)}}catch(u){i.e(u)}finally{i.f()}return t}}};n("8f57");const xr=Lt()(Cr,[["render",fe],["__scopeId","data-v-76fe2026"]]);var _r=xr,Ir={name:"App",components:{Calculator:_r}};n("073c");const Pr=Lt()(Ir,[["render",r]]);var Tr=Pr;Object(a["b"])(Tr).mount("#app")},6257:function(e,t,n){"use strict";n("82ab")},"6bf0":function(e,t,n){"use strict";n("7174")},7174:function(e,t,n){},"82ab":function(e,t,n){},"8b40":function(e,t,n){},"8f57":function(e,t,n){"use strict";n("8b40")},a8a0:function(e,t,n){},ad85:function(e,t,n){},b99b:function(e,t,n){"use strict";n("a8a0")},f65f:function(e,t,n){},ff32:function(e,t,n){"use strict";n("3b31")},ffac:function(e,t,n){"use strict";n("45d7")}});
  //# sourceMappingURL=app.aae520bf.js.map