(function(e){function t(t){for(var n,a,s=t[0],c=t[1],u=t[2],p=0,h=[];p0?t.listRecipes(void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,{query:{last_viewed:this.settings.recently_viewed}}).then((function(t){e.last_viewed_recipes=t.data.results})):this.last_viewed_recipes=[]},genericSelectChanged:function(e){this.settings[e.var]=e.val,this.refreshData(!1)},resetSearch:function(){this.settings.search_input="",this.settings.search_internal=!1,this.settings.search_keywords=[],this.settings.search_foods=[],this.settings.search_books=[],this.refreshData(!1)},loadMore:function(e){this.pagination_page++,this.refreshData(!0)}}},g=v,m=(r("60bc"),r("2877")),y=Object(m["a"])(g,i,o,!1,null,null,null),S=y.exports,w=r("9225");n["default"].config.productionTip=!1,new n["default"]({i18n:w["a"],render:function(e){return e(S)}}).$mount("#app")},"6b0a":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("b-card",{attrs:{"no-body":""}},[r("a",{attrs:{href:e.clickUrl()}},[r("b-card-img-lazy",{staticStyle:{height:"15vh","object-fit":"cover"},attrs:{src:e.recipe_image,alt:e.$t("Recipe_Image"),top:""}}),r("div",{staticClass:"h-100 d-flex flex-column justify-content-right",staticStyle:{float:"right","text-align":"right","padding-top":"10px","padding-right":"5px"}},[null!==e.recipe?r("recipe-context-menu",{staticStyle:{float:"right"},attrs:{recipe:e.recipe}}):e._e()],1)],1),r("b-card-body",[r("h5",[r("a",{attrs:{href:e.clickUrl()}},[null!==e.recipe?[e._v(e._s(e.recipe.name))]:[e._v(e._s(e.meal_plan.title))]],2)]),r("b-card-text",{staticStyle:{"text-overflow":"ellipsis"}},[null!==e.recipe?[e._v(" "+e._s(e.recipe.description)+" "),r("keywords",{staticStyle:{"margin-top":"4px"},attrs:{recipe:e.recipe}}),e.recipe.internal?e._e():r("b-badge",{attrs:{pill:"",variant:"info"}},[e._v(e._s(e.$t("External")))]),Date.parse(e.recipe.created_at)>new Date(Date.now()-6048e5)?r("b-badge",{attrs:{pill:"",variant:"success"}},[e._v(e._s(e.$t("New")))]):e._e()]:[e._v(e._s(e.meal_plan.note))]],2)],1),void 0!==e.footer_text?r("b-card-footer",[r("i",{class:e.footer_icon}),e._v(" "+e._s(e.footer_text)+" ")]):e._e()],1)},i=[],o=r("fc0d"),a=r("81d5"),s=r("fa7d"),c={name:"RecipeCard",mixins:[s["b"]],components:{Keywords:a["a"],RecipeContextMenu:o["a"]},props:{recipe:Object,meal_plan:Object,footer_text:String,footer_icon:String},data:function(){return{recipe_image:""}},mounted:function(){null==this.recipe||null===this.recipe.image?this.recipe_image=window.IMAGE_PLACEHOLDER:this.recipe_image=this.recipe.image},methods:{clickUrl:function(){return null!==this.recipe?Object(s["g"])("view_recipe",this.recipe.id):Object(s["g"])("view_plan_entry",this.meal_plan.id)}}},u=c,d=r("2877"),p=Object(d["a"])(u,n,i,!1,null,"24a58963",null);t["a"]=p.exports},"6ce2":function(e){e.exports=JSON.parse('{"Import":"Import","import_running":"Import läuft, bitte warten!","Import_finished":"Import fertig","View_Recipes":"Rezepte Ansehen","Information":"Information","all_fields_optional":"Alle Felder sind optional und können leer gelassen werden.","convert_internal":"Zu internem Rezept wandeln","Log_Recipe_Cooking":"Kochen protokollieren","External_Recipe_Image":"Externes Rezept Bild","Add_to_Book":"Zu Buch hinzufügen","Add_to_Shopping":"Zu Einkaufsliste hinzufügen","Add_to_Plan":"Zu Plan hinzufügen","Step_start_time":"Schritt Startzeit","Select_Book":"Buch wählen","Recipe_Image":"Rezept Bild","Log_Cooking":"Kochen protokollieren","Proteins":"Proteine","Fats":"Fette","Carbohydrates":"Kohlenhydrate","Calories":"Kalorien","Nutrition":"Nährwerte","Keywords":"Stichwörter","Books":"Bücher","show_only_internal":"Nur interne Rezepte anzeigen","Ingredients":"Zutaten","min":"Min","Servings":"Portionen","Waiting":"Wartezeit","Preparation":"Zubereitung","Edit":"Bearbeiten","Open":"Öffnen","Save":"Speichern","Step":"Schritt","Search":"Suchen","Print":"Drucken","New_Recipe":"Neues Rezept","Url_Import":"URL Import","Reset_Search":"Suche zurücksetzen","or":"oder","and":"und","Recently_Viewed":"Kürzlich angesehen","External":"Extern","Settings":"Einstellungen","Meal_Plan":"Speiseplan","Date":"Datum","Share":"Teilen","Export":"Exportieren","Rating":"Bewertung","Close":"Schließen","Add":"Hinzufügen"}')},7432:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("multiselect",{attrs:{options:e.objects,"close-on-select":!0,"clear-on-select":!0,"hide-selected":!0,"preserve-search":!0,placeholder:e.placeholder,label:e.label,"track-by":"id",multiple:e.multiple,loading:e.loading},on:{"search-change":e.search,input:e.selectionChanged},model:{value:e.selected_objects,callback:function(t){e.selected_objects=t},expression:"selected_objects"}})},i=[],o=(r("ac1f"),r("841c"),r("99af"),r("8e5f")),a=r.n(o),s=r("2b2d"),c={name:"GenericMultiselect",components:{Multiselect:a.a},data:function(){return{loading:!1,objects:[],selected_objects:[]}},props:{placeholder:String,search_function:String,label:String,parent_variable:{type:String,default:void 0},sticky_options:{type:Array,default:function(){return[]}},initial_selection:{type:Array,default:function(){return[]}},multiple:{type:Boolean,default:!0},tree_api:{type:Boolean,default:!1}},watch:{initial_selection:function(e,t){this.selected_objects=e}},mounted:function(){this.search("")},methods:{search:function(e){var t=this,r=new s["a"];if(this.tree_api){var n=1,i=void 0,o=void 0,a=10;""===e&&(e=void 0),r[this.search_function](e,i,o,n,a).then((function(e){t.objects=t.sticky_options.concat(e.data.results)}))}else r[this.search_function]({query:{query:e,limit:10}}).then((function(e){t.objects=t.sticky_options.concat(e.data)}))},selectionChanged:function(){this.$emit("change",{var:this.parent_variable,val:this.selected_objects})}}},u=c,d=r("2877"),p=Object(d["a"])(u,n,i,!1,null,"abc99b66",null);t["a"]=p.exports},"7c15":function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return u}));var n=r("bc3a"),i=r.n(n),o=r("fa7d");function a(e){var t=Object(o["g"])("api:recipe-detail",e);return void 0!==window.SHARE_UID&&(t+="?share="+window.SHARE_UID),i.a.get(t).then((function(e){return e.data})).catch((function(e){d(e,"There was an error loading a resource!","danger")}))}function s(e){return i.a.post(Object(o["g"])("api:cooklog-list"),e).then((function(e){Object(o["f"])("Saved","Cook Log entry saved!","success")})).catch((function(e){d(e,"There was an error creating a resource!","danger")}))}function c(e){return i.a.get(Object(o["g"])("api:recipebook-list")+"?query="+e).then((function(e){return e.data})).catch((function(e){}))}function u(e){return i.a.post(Object(o["g"])("api:recipebookentry-list"),e).then((function(e){Object(o["f"])("Saved","Recipe Book entry saved!","success")})).catch((function(e){d(e,"There was an error creating a resource!","danger")}))}function d(e,t){if("response"in e){console.log(e.response);var r="statusText"in e.response?e.response.statusText:Object(o["e"])("Error");t+="\n\n"+JSON.stringify(e.response.data),Object(o["f"])(r,t,"danger")}else Object(o["f"])("Error",t,"danger"),console.log(e)}i.a.defaults.xsrfCookieName="csrftoken",i.a.defaults.xsrfHeaderName="X-CSRFTOKEN"},"81d5":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.recipe.keywords.length>0?r("div",e._l(e.recipe.keywords,(function(t){return r("span",{key:t.id,staticStyle:{padding:"2px"}},[r("b-badge",{attrs:{pill:"",variant:"light"}},[e._v(e._s(t.label))])],1)})),0):e._e()},i=[],o={name:"Keywords",props:{recipe:Object}},a=o,s=r("2877"),c=Object(s["a"])(a,n,i,!1,null,null,null);t["a"]=c.exports},9225:function(e,t,r){"use strict";r("159b"),r("d3b7"),r("ddb0"),r("ac1f"),r("466d");var n=r("a026"),i=r("a925");function o(){var e=r("49f8"),t={};return e.keys().forEach((function(r){var n=r.match(/([A-Za-z0-9-_]+)\./i);if(n&&n.length>1){var i=n[1];t[i]=e(r)}})),t}n["default"].use(i["a"]),t["a"]=new i["a"]({locale:Object({NODE_ENV:"production",BASE_URL:""}).VUE_APP_I18N_LOCALE||"en",fallbackLocale:Object({NODE_ENV:"production",BASE_URL:""}).VUE_APP_I18N_FALLBACK_LOCALE||"en",messages:o()})},a625:function(e){e.exports=JSON.parse('{"import_running":"Er wordt geïmporteerd, even geduld!","all_fields_optional":"Alle velden zijn optioneel en kunnen leeg gelaten worden.","convert_internal":"Zet om naar intern recept","Log_Recipe_Cooking":"Log Bereiding","External_Recipe_Image":"Externe Afbeelding Recept","Add_to_Book":"Voeg toe aan Boek","Add_to_Shopping":"Voeg toe aan Boodschappenlijst","Add_to_Plan":"Voeg toe aan Plan","Step_start_time":"Starttijd stap","Select_Book":"Selecteer Boek","Recipe_Image":"Afbeelding Recept","Import_finished":"Importeren gereed","View_Recipes":"Bekijk Recepten","Log_Cooking":"Log Bereiding","Proteins":"Eiwitten","Fats":"Vetten","Carbohydrates":"Koolhydraten","Calories":"Calorieën","Nutrition":"Voedingswaarde","Date":"Datum","Share":"Deel","Export":"Exporteren","Rating":"Beoordeling","Close":"Sluiten","Add":"Voeg toe","Ingredients":"Ingrediënten","min":"min","Servings":"Porties","Waiting":"Wachten","Preparation":"Bereiding","Edit":"Bewerken","Open":"Open","Save":"Opslaan","Step":"Stap","Search":"Zoeken","Import":"Importeer","Print":"Afdrukken","Information":"Informatie","Keywords":"Etiketten","Books":"Boeken","show_only_internal":"Toon alleen interne recepten","New_Recipe":"Nieuw Recept","Url_Import":"Importeer URL","Reset_Search":"Zoeken resetten","or":"of","and":"en","Recently_Viewed":"Recent bekeken","External":"Externe","Settings":"Instellingen","Meal_Plan":"Maaltijdplan","New":"Nieuw","Supermarket":"Supermarkt","Categories":"Categorieën","Category":"Categorie","Selected":"Geselecteerd"}')},d76c:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},i=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"row"},[r("div",{staticClass:"col",staticStyle:{"text-align":"center"}},[r("img",{staticClass:"spinner-tandoor",staticStyle:{height:"30vh"},attrs:{alt:"loading spinner",src:""}})])])}],o={name:"LoadingSpinner",props:{recipe:Object}},a=o,s=r("2877"),c=Object(s["a"])(a,n,i,!1,null,null,null);t["a"]=c.exports},edd4:function(e){e.exports=JSON.parse('{"err_fetching_resource":"There was an error fetching a resource!","err_creating_resource":"There was an error creating a resource!","err_updating_resource":"There was an error updating a resource!","err_deleting_resource":"There was an error deleting a resource!","success_fetching_resource":"Successfully fetched a resource!","success_creating_resource":"Successfully created a resource!","success_updating_resource":"Successfully updated a resource!","success_deleting_resource":"Successfully deleted a resource!","import_running":"Import running, please wait!","all_fields_optional":"All fields are optional and can be left empty.","convert_internal":"Convert to internal recipe","show_only_internal":"Show only internal recipes","show_split_screen":"Show split view","Log_Recipe_Cooking":"Log Recipe Cooking","External_Recipe_Image":"External Recipe Image","Add_to_Book":"Add to Book","Add_to_Shopping":"Add to Shopping","Add_to_Plan":"Add to Plan","Step_start_time":"Step start time","Meal_Plan":"Meal Plan","Select_Book":"Select Book","Recipe_Image":"Recipe Image","Import_finished":"Import finished","View_Recipes":"View Recipes","Log_Cooking":"Log Cooking","New_Recipe":"New Recipe","Url_Import":"Url Import","Reset_Search":"Reset Search","Recently_Viewed":"Recently Viewed","Load_More":"Load More","New_Keyword":"New Keyword","Delete_Keyword":"Delete Keyword","Edit_Keyword":"Edit Keyword","Move_Keyword":"Move Keyword","Merge_Keyword":"Merge Keyword","Hide_Keywords":"Hide Keywords","Hide_Recipes":"Hide Recipes","Keywords":"Keywords","Books":"Books","Proteins":"Proteins","Fats":"Fats","Carbohydrates":"Carbohydrates","Calories":"Calories","Nutrition":"Nutrition","Date":"Date","Share":"Share","Export":"Export","Rating":"Rating","Close":"Close","Cancel":"Cancel","Add":"Add","New":"New","Success":"Success","Ingredients":"Ingredients","Supermarket":"Supermarket","Categories":"Categories","Category":"Category","Selected":"Selected","min":"min","Servings":"Servings","Waiting":"Waiting","Preparation":"Preparation","External":"External","Size":"Size","Files":"Files","File":"File","Edit":"Edit","Delete":"Delete","Open":"Open","Ok":"Open","Save":"Save","Step":"Step","Search":"Search","Import":"Import","Print":"Print","Settings":"Settings","or":"or","and":"and","Information":"Information","View":"View","Recipes":"Recipes","Move":"Move","Merge":"Merge","Parent":"Parent","delete_confimation":"Are you sure that you want to delete {kw} and all of it\'s children?","move_confirmation":"Move {child} to parent {parent}","merge_confirmation":"Replace {source} with {target}","move_selection":"Select a parent to move {child} to.","merge_selection":"Replace all occurences of {source} with the selected {type}.","Advanced Search Settings":"Advanced Search Settings","Download":"Download","Root":"Root"}')},fa7d:function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"f",(function(){return s})),r.d(t,"a",(function(){return c})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"g",(function(){return p})),r.d(t,"d",(function(){return b}));var n=r("53ca"),i=(r("99af"),r("59e4"));function o(e,t,r){var n=Math.floor(e),i=1,o=n+1,a=1;if(e!==n)while(i<=t&&a<=t){var s=(n+o)/(i+a);if(e===s){i+a<=t?(i+=a,n+=o,a=t+1):i>a?a=t+1:i=t+1;break}et&&(i=a,n=o),!r)return[0,n,i];var c=Math.floor(n/i);return[c,n-c*i,i]}var a={methods:{makeToast:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return s(e,t,r)}}};function s(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new i["a"];n.$bvToast.toast(t,{title:e,variant:r,toaster:"b-toaster-top-center",solid:!0})}var c={methods:{_:function(e){return u(e)}}};function u(e){return window.gettext(e)}var d={methods:{resolveDjangoUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return p(e,t)}}};function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==t)return window.Urls[e]();if("object"!=Object(n["a"])(t))return window.Urls[e](t);if("object"==Object(n["a"])(t)){if(1===t.length)return window.Urls[e](t);if(2===t.length)return window.Urls[e](t[0],t[1]);if(3===t.length)return window.Urls[e](t[0],t[1],t[2])}}function h(e){return window.USER_PREF[e]}function b(e,t){if(h("use_fractions")){var r="",n=o(e*t,9,!0);return n[0]>0&&(r+=n[0]),n[1]>0&&(r+=" ".concat(n[1],"").concat(n[2],"")),r}return l(e*t)}function l(e){var t=h("user_fractions")?h("user_fractions"):2;return+(Math.round(e+"e+".concat(t))+"e-".concat(t))}},fc0d:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"dropdown"},[e._m(0),r("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuLink"}},[r("a",{staticClass:"dropdown-item",attrs:{href:e.resolveDjangoUrl("edit_recipe",e.recipe.id)}},[r("i",{staticClass:"fas fa-pencil-alt fa-fw"}),e._v(" "+e._s(e.$t("Edit")))]),e.recipe.internal?e._e():r("a",{staticClass:"dropdown-item",attrs:{href:e.resolveDjangoUrl("edit_convert_recipe",e.recipe.id)}},[r("i",{staticClass:"fas fa-exchange-alt fa-fw"}),e._v(" "+e._s(e.$t("convert_internal")))]),r("button",{staticClass:"dropdown-item",on:{click:function(t){return e.$bvModal.show("id_modal_add_book")}}},[r("i",{staticClass:"fas fa-bookmark fa-fw"}),e._v(" "+e._s(e.$t("Add_to_Book"))+" ")]),e.recipe.internal?r("a",{staticClass:"dropdown-item",attrs:{href:e.resolveDjangoUrl("view_shopping")+"?r=["+e.recipe.id+","+e.servings_value+"]",target:"_blank",rel:"noopener noreferrer"}},[r("i",{staticClass:"fas fa-shopping-cart fa-fw"}),e._v(" "+e._s(e.$t("Add_to_Shopping"))+" ")]):e._e(),r("a",{staticClass:"dropdown-item",attrs:{href:e.resolveDjangoUrl("new_meal_plan")+"?recipe="+e.recipe.id,target:"_blank",rel:"noopener noreferrer"}},[r("i",{staticClass:"fas fa-calendar fa-fw"}),e._v(" "+e._s(e.$t("Add_to_Plan"))+" ")]),r("button",{staticClass:"dropdown-item",on:{click:function(t){return e.$bvModal.show("id_modal_cook_log")}}},[r("i",{staticClass:"fas fa-clipboard-list fa-fw"}),e._v(" "+e._s(e.$t("Log_Cooking"))+" ")]),r("button",{staticClass:"dropdown-item",attrs:{onclick:"window.print()"}},[r("i",{staticClass:"fas fa-print fa-fw"}),e._v(" "+e._s(e.$t("Print"))+" ")]),r("a",{staticClass:"dropdown-item",attrs:{href:e.resolveDjangoUrl("view_export")+"?r="+e.recipe.id,target:"_blank",rel:"noopener noreferrer"}},[r("i",{staticClass:"fas fa-file-export fa-fw"}),e._v(" "+e._s(e.$t("Export")))]),e.recipe.internal?r("a",{staticClass:"dropdown-item",attrs:{href:e.resolveDjangoUrl("new_share_link",e.recipe.id),target:"_blank",rel:"noopener noreferrer"}},[r("i",{staticClass:"fas fa-share-alt fa-fw"}),e._v(" "+e._s(e.$t("Share")))]):e._e()])]),r("cook-log",{attrs:{recipe:e.recipe}})],1)},i=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("a",{staticClass:"btn shadow-none",attrs:{href:"#",role:"button",id:"dropdownMenuLink","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[r("i",{staticClass:"fas fa-ellipsis-v"})])}],o=(r("a9e3"),r("fa7d")),a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("b-modal",{staticClass:"modal",attrs:{id:"id_modal_cook_log",title:e.$t("Log_Recipe_Cooking"),"ok-title":e.$t("Save"),"cancel-title":e.$t("Close")},on:{ok:function(t){return e.logCook()}}},[r("p",[e._v(e._s(e.$t("all_fields_optional")))]),r("form",[r("label",{attrs:{for:"id_log_servings"}},[e._v(e._s(e.$t("Servings")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.logObject.servings,expression:"logObject.servings"}],staticClass:"form-control",attrs:{type:"number",id:"id_log_servings"},domProps:{value:e.logObject.servings},on:{input:function(t){t.target.composing||e.$set(e.logObject,"servings",t.target.value)}}}),r("label",{staticStyle:{"margin-top":"2vh"}},[e._v(e._s(e.$t("Rating"))+" - "),r("span",{attrs:{id:"id_rating_show"}},[e._v(e._s(e.logObject.rating)+"/5")])]),r("b-form-rating",{model:{value:e.logObject.rating,callback:function(t){e.$set(e.logObject,"rating",t)},expression:"logObject.rating"}}),r("label",{staticStyle:{"margin-top":"2vh"},attrs:{for:"id_date"}},[e._v(e._s(e.$t("Date")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.logObject.created_at,expression:"logObject.created_at"}],staticClass:"form-control",attrs:{type:"datetime-local",id:"id_date"},domProps:{value:e.logObject.created_at},on:{input:function(t){t.target.composing||e.$set(e.logObject,"created_at",t.target.value)}}})],1)])],1)},s=[],c=r("c1df"),u=r.n(c),d=r("a026"),p=r("5f5b"),h=r("7c15");d["default"].prototype.moment=u.a,d["default"].use(p["a"]);var b={name:"CookLog",props:{recipe:Object},data:function(){return{logObject:{recipe:this.recipe.id,servings:0,rating:0,created_at:u()().format("yyyy-MM-DDTHH:mm")}}},methods:{logCook:function(){Object(h["d"])(this.logObject)}}},l=b,f=r("2877"),j=Object(f["a"])(l,a,s,!1,null,null,null),O=j.exports,v={name:"RecipeContextMenu",mixins:[o["b"]],components:{CookLog:O},data:function(){return{servings_value:0}},props:{recipe:Object,servings:{type:Number,default:-1}},mounted:function(){this.servings_value=-1===this.servings?this.recipe.servings:this.servings}},g=v,m=Object(f["a"])(g,n,i,!1,null,null,null);t["a"]=m.exports}});