/*! For license information please see filters.js.LICENSE.txt */ (()=>{"use strict";var e,t={410:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;rc});var a,s,l,c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,o;return t=e,o=[{key:"get",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.checkInit(),n(e._props[t])?e._props[t]:(null!==r&&(e._props[t]=r),r)}},{key:"has",value:function(t){return e._props&&void 0!==e._props[t]}},{key:"set",value:function(t,r){e.checkInit(),e._props[t]=r}},{key:"increment",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.checkInit(),void 0===e._props[t]?(e._props[t]=r,r):"number"==typeof e._props[t]?++e._props[t]:-1}},{key:"checkInit",value:function(){e._props||(e._props={})}}],(r=null)&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();a=c,l=void 0,(s=o(s="_props"))in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l},270:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(769),i=r(232);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){for(var r=0;r{r.d(t,{t:()=>i});var n=r(270),i=void 0===window.ponDispatcherManager?window.ponDispatcherManager=n.Z.getInstance():window.ponDispatcherManager},809:(e,t,r)=>{var n=r(294),i=r(745),o=r(622),a=r(884),s=r(400),l=r(520),c=r(232);const u={ajaxUrl:ponjstrig.ajaxurl,ajaxNonce:ponjstrig.ajax_nonce,fetchOptions:function(){return this.request("post","ponFiltersOptions")},fetchRecipes:function(e){return this.request("post","ponFiltersRecipes",e)},request:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n={action:t,security:this.ajaxNonce};return r&&(n.post_data=r),jQuery.ajax({url:this.ajaxUrl,type:e,dataType:"json",data:n})}};var p=r(486),f=r(964),d=r.n(f),h=r(723),v=r(893);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function m(e,t){for(var r=0;r-1&&i.splice(l,1)}else i.push(e);i.length&&this.setState({triggerMode:"clear"}),this.setState({activeOptions:i},(function(){t.props.selected({name:s,options:i})}))}}},{key:"handleSearch",value:function(e){var t=e.target.value;this.setState({searchTerm:t}),((t=t.trim()).length>=3||!t.length)&&this.filterOptions(t.toLowerCase())}},{key:"filterOptions",value:function(e){if(!this.state.deactivated){var t=this.props,r=t.options,n=t.hasChilds,i=[];if(n)i={},Object.keys(r).forEach((function(t){for(var n=r[t],o=[],a=0;a-1&&o.push({val:s.val,label:s.label})}o.length&&(i[t]=o)}));else for(var o=0;o-1&&i.push(a)}this.setState({filteredOptions:i})}}},{key:"checkActive",value:function(e){return!!this.state.activeOptions.includes(e)}},{key:"clearIngredients",value:function(){var e=this;this.setState({activeOptions:[],triggerMode:"search"},(function(){e.props.selected({name:e.props.name,options:[]})}))}},{key:"addRemStateArr",value:function(e,t){var r,n,i,o=this.state[e];o.includes(t)?this.removeFromArr(o,t):o.push(t),this.setState((r={},i=o,(n=y(n=e))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r))}},{key:"removeFromArr",value:function(e,t){for(var r=e.length;r--;)e[r]===t&&e.splice(r,1);return e}},{key:"render",value:function(){var e,t,r=this,n=this.props,i=n.name,o=n.label,a=n.sublabel,s=n.search,l=n.options,c=(n.active,n.activeDrop),u=n.header,p=n.align,f=n.hasChilds,b=n.hideIfSelected,m=this.state,y=(m.showSearch,m.triggerMode),g=m.activeOptions,_=(m.searchTerm,m.filteredOptions),w=m.activeSub,O=_.length||Object.keys(_).length?_:l,S=[];f?Object.keys(O).length&&(S=Object.keys(O).map((function(e,t){var n=t+1,i=O[e],o="";if(i.length){var a=i.map((function(e,t){return(0,v.jsx)("li",{className:r.checkActive(e.val)?"active-drop":"",onClick:function(){r.prepareOptions(e.val)},children:e.label},t)}));o=(0,v.jsxs)("li",{className:w.includes(n)?"active-sub":"",children:[(0,v.jsx)("span",{onClick:function(){r.addRemStateArr("activeSub",n)},children:e}),(0,v.jsx)("ul",{children:a})]},n)}return o}))):O.length&&(S=O.map((function(e,t){return(0,v.jsx)("li",{className:r.checkActive(e.val)?"active-drop":"",onClick:function(){r.prepareOptions(e.val)},children:e.label},t)}))),s&&"clear"===y&&(t=(0,v.jsxs)("div",{className:"pon-filter-dropdown-search pon-filter-dropdown-search-2",children:[(0,v.jsx)("div",{className:"pon-filter-dropdown-terms",onClick:function(){return r.setState({showSearch:!0})},children:g.join(", ")}),(0,v.jsx)("button",{className:"pon-filter-button pon-filter-button-reverse",type:"button",onClick:function(){return r.clearIngredients()},children:(0,v.jsx)("span",{children:"Clear"})})]}));var j=!0;return g.length&&b&&(j=!1),u&&j&&(e=(0,v.jsx)("div",{className:"pon-filter-dropdown-header",children:u})),(0,v.jsxs)("div",{className:"pon-filter-dropdown"+("categories"===i?" categories":"")+(p?" "+p:""),children:[(0,v.jsxs)("button",{className:"pon-filters-init"+(c===i?" has-filters":"")+(g.length?" has-filters-selected":""),type:"button",onBlur:null,onClick:function(e){if(c===i)r.props.active("");else{r.props.active(i);var t=i.match(/^sort_/);if(h.Z.isMobile()||t?t||E([document.documentElement,document.body]).animate({scrollTop:E(e.currentTarget).offset().top-E("header.sticky-top").height()-20},150):E([document.documentElement,document.body]).animate({scrollTop:E(".pon-recipe-custom-filters").offset().top-E("header.sticky-top").height()-80},150),"ingredients"===i)if("search"!==r.state.triggerMode||r.state.activeOptions.length){if(!1===r.state.showSearch){setTimeout((function(){E(".pon-filter-dropdown-terms").trigger("click")}),50);try{setTimeout((function(){r.searchInput.current.focus()}),100)}catch(e){try{setTimeout((function(){E(".pon-filter-dropdown-input input[type=text]").focus()}),100)}catch(e){}}}}else setTimeout((function(){E(".pon-filter-dropdown-search .pon-filter-button").trigger("click")}),20)}},children:[o,a&&(0,v.jsxs)("i",{children:[" (",a,")"]}),(0,v.jsx)("span",{})]}),(0,v.jsxs)("div",{className:"pon-filter-dropdown-list"+(c==i?" active":""),children:[t,void 0,e,(0,v.jsx)(d(),{children:(0,v.jsx)("ul",{className:f?"pon-filter-dropdown-list-sub":"",children:S})})]})]},i)}}])&&m(t.prototype,r),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.Component);r(410),r(838),r(489);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};try{gtag("event",e,t)}catch(e){console.log(e)}}},{key:"UNSAFE_componentWillMount",value:function(){u.fetchOptions().done(function(e){e&&this.setAjaxOption(e)}.bind(this))}},{key:"filterRecipes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.state,n=r.selections,i=r.offset,o=r.recipes,a=r.append,s=r.fetched,l=r.labels,c=r.filtersChanged;t&&(n.surpriseMe=!0),c?(n.offset=0,i=0):n.offset=i,this.setState({submitting:!0,surprising:!0,loadbar:!t,activeDrop:"",offset:i,filtersChanged:!1},(function(){u.fetchRecipes(n).done(function(e){if(e.recipes&&e.total>0){var r=this.state.loadbar,n={submitting:!1,surprising:!r,hasRecipes:!!r,loadbar:!1,favs:e.favs&&e.favs.length?e.favs:[],recipeMsg:!1,append:!0,fetched:s+e.recipes.length,loading:!1};if(t){var i=e.recipes[0].post_name;window.location.href="/recipes/".concat(i)}else n.totalRecipes=e.total?e.total:0,n.recipes=a?o.concat(e.recipes):e.recipes,n.labels={searchLabel:l.searchLabelAgain,searchLabelAgain:l.searchLabelAgain};this.setState(n,(function(){}))}else this.setState({submitting:!1,surprising:!1,loadbar:!1,recipes:[],totalRecipes:0,recipeMsg:!0,hasRecipes:!1,fetched:0,loading:!1})}.bind(e))}))}},{key:"loadMore",value:function(e){var t=this;e.preventDefault();var r=this.state,n=r.offset;if(r.totalRecipes>n){var i=n+12;this.setState({offset:i,loading:!0},(function(){t.filterRecipes()}))}}},{key:"setAjaxOption",value:function(e){Object.keys(e).forEach(function(t){this.setSubState("options",t,e[t])}.bind(this))}},{key:"setSubState",value:function(e,t,r){var n=this.state[e];n[t]=r,this.setState({name:n})}},{key:"isFav",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return!!this.state.favs.includes(String(e))}},{key:"initFave",value:function(e){var t=jQuery(e.currentTarget);if(l.Z.isLoggedIn()){var r=new a.Z({trigger:t});r.init()}else this.dispatch(c.e.CLICK_FAVE_GUEST,{type:"error"})}},{key:"checkDropdowns",value:function(e){var t=this.state.activeDrop,r=jQuery(e.target).parents(".pon-filter-dropdown");e.target.classList.contains("pon-filters-init")||r.length||!t||this.setState({activeDrop:""})}},{key:"clearAllFilters",value:function(e){e.preventDefault(),this.setState(T({},M)),D.dispatch("recipe.filters.reset",{})}},{key:"render",value:function(){var e=this,t=this.state,r=t.options,n=t.activeDrop,i=t.submitting,a=t.recipes,s=t.totalRecipes,l=t.recipeMsg,u=t.hasRecipes,p=(t.offset,t.fetched),f=t.labels,d=t.loading,h=t.showSort,b=t.surprising,m=t.loadbar,y=this.props,g=y.surpriseTemplateElement,_=y.surpriseFeature,w=[10290,10291,214,204,2051,1273];r.categories=r.categories.filter((function(e){return!w.includes(e.val)}));var O,E,j,k=[];s>p&&(O=(0,v.jsxs)("div",{className:"pon-recipe-custom-filter",children:[(0,v.jsx)("button",{disabled:d,className:"trackClick pon-submit pon-account-submit","data-track":"'category':'Recipe Finder','action':'click load more','label':'$title'",type:"button",onClick:function(t){if(d)return!1;e.loadMore(t)},children:"Load More"}),(0,v.jsxs)("div",{className:"pon-loadbar pon-loadbar-3"+(d?" pon-loadbar-active":""),children:[(0,v.jsx)("div",{className:"pon-loadbar-bar"}),(0,v.jsx)("div",{className:"pon-loadbar-bar"}),(0,v.jsx)("div",{className:"pon-loadbar-bar"})]})]}));var T=function(){e.setState({append:!1,fetched:0},(function(){e.filterRecipes(!0)})),e.dispatch("surprise_me__click")};return _&&!g&&(j=(0,v.jsxs)("div",{children:[(0,v.jsx)("div",{className:"pon-divider-drawing-16"}),(0,v.jsxs)("div",{className:"pon-surprise-action-content",children:[(0,v.jsx)("p",{children:"OR..."}),(0,v.jsx)("button",{"data-track":"'category':'Recipe Finder Surprise Me','action':'click'",className:"trackClick pon-button",disabled:i||b?"disabled":"",onClick:T,children:"Surprise Me"})]})]})),a.length&&(k=a.map((function(t,r){var n,i,a=t.time,s=Math.floor(a/60);s||(s="");var l=a%60;return n=(0,v.jsxs)("li",{children:[s&&(0,v.jsxs)(v.Fragment,{children:[s,(0,v.jsx)("span",{className:"text-uppercase",children:"hr"}),l&&" "]}),l&&(0,v.jsxs)(v.Fragment,{children:[l,!s&&(0,v.jsxs)("span",{className:"text-uppercase",children:["M",(0,v.jsx)("span",{children:"INS"})]})]})]}),t.calories&&(i=(0,v.jsxs)("li",{children:[t.calories,(0,v.jsx)("span",{className:"text-uppercase",children:"KCal"})]})),t.thumbnail&&window.location.href.match(/^http:\/\/dev\./)&&(t.thumbnail=t.thumbnail.replace("https://","http://")),(0,v.jsxs)("div",{className:"pon-recipe-thumbnail"+(r>2?" mt-57":""),children:[(0,v.jsx)("div",{className:"pon-recipe-thumbnail-image",children:(0,v.jsxs)("div",{className:"pon-recipe-thumbnail-image",children:[(0,v.jsx)("a",{target:"_blank",href:"/recipes/"+t.post_name,children:(0,v.jsx)("img",{className:"img-fluid pon-image",src:t.thumbnail,alt:t.post_title+" pinchofnom.com"})}),(0,v.jsxs)("button",{className:"pon-plus-btn pon-thumbnail-plus-btn pon-fave-btn"+(t.ID&&e.isFav(t.ID)?" pon-fave-added":""),"data-recipe":t.ID,onClick:function(t){e.initFave(t)},children:[(0,v.jsx)("span",{className:"pon-icomoon-icon pon-icon-plus"+(t.ID&&e.isFav(t.ID)?" pon-animated-plus pon-animated-end-plus":"")}),(0,v.jsx)("span",{className:"pon-icomoon-icon pon-icon-heart"})]})]})}),(0,v.jsxs)("div",{className:"d-flex align-items-center justify-content-between pon-thumbnail-info".concat(t.hasPackshot?" p-relative":""),children:[t.hasPackshot?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("span",{className:"pon-recipe-grid-bookimage-spanner"}),(0,v.jsx)("a",{href:t.packshotUrl,title:t.packshotTitle,target:"_blank",children:(0,v.jsx)("img",{alt:t.packshotTitleAlt,className:"pon-recipe-grid-bookimage pon-image-optimize",src:t.packshotTileSrc})})]}):(0,v.jsxs)(v.Fragment,{children:["Easy"===t.difficulty&&(0,v.jsx)("span",{className:"text-uppercase pon-thumbnail-ribbon pon-thumbnail-ribbon-easy",children:"Easy Peasy"}),"Medium"===t.difficulty&&(0,v.jsx)("span",{className:"text-uppercase pon-thumbnail-ribbon pon-thumbnail-ribbon-medium",children:"Simple"}),"Hard"===t.difficulty&&(0,v.jsx)("span",{className:"text-uppercase pon-thumbnail-ribbon pon-thumbnail-ribbon-hard",children:"A Bit Trickier"})]}),(0,v.jsxs)("ul",{className:"d-flex mb-0 list-unstyled pon-thumbnail-info-list",children:[n,i]})]}),(0,v.jsxs)("div",{className:"pon-thumbnail-caption",children:[(0,v.jsx)("h4",{className:"mb-0 pon-thumbnail-title",children:(0,v.jsx)("a",{href:"/recipes/"+t.post_name,children:t.post_title})}),(0,v.jsx)("button",{className:"pon-thumbnail-settings-btn","data-recipe":t.ID,onClick:function(e){return o.Z.init(jQuery(e.currentTarget))}})]})]},r)}))),E=h?(0,v.jsxs)("div",{className:"pon-recipe-custom-filters pon-recipe-custom-filters-2",children:[(0,v.jsx)("label",{className:"pon-filter-label",children:"SORT RESULTS"}),(0,v.jsx)(S,{name:"sort_calories",label:"Calories",options:r["sort-calories"],active:this.onActiveChange,activeDrop:n,single:"true",selected:this.getSelected,align:"left"}),(0,v.jsx)(S,{name:"sort_time",label:"Time",sublabel:"prep & cooking",options:r["sort-time"],active:this.onActiveChange,activeDrop:n,single:"true",selected:this.getSelected,align:"right"})]}):(0,v.jsx)("button",{"data-track":"'category':'Recipe Finder','action':'sort activate'",className:"trackClick pon-recipe-filters-sort-trigger",onClick:function(){u?e.setState({showSort:!0}):e.dispatch(c.e.FILTER_SORT_UNAVAILABLE,{type:"error"})},children:"SORT RESULTS"}),(0,v.jsxs)("div",{children:[(0,v.jsx)("section",{className:"pon-section-recipe-filters",onClick:function(t){return e.checkDropdowns(t)},children:(0,v.jsx)("div",{className:"d-flex pon-container",children:(0,v.jsx)("div",{className:"pon-left-area",children:g?(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{className:"pon-recipe-custom-filters pon-recipe-custom-filters-2",children:[(0,v.jsx)(S,{name:"restrictions",label:"Dietary",header:"Select one or more",options:r.restrictions,active:this.onActiveChange,activeDrop:n,selected:this.getSelected}),(0,v.jsx)(S,{name:"calories",label:"Calories",header:"KCAL / Per serving",options:r.calories,active:this.onActiveChange,activeDrop:n,single:"true",selected:this.getSelected}),(0,v.jsx)(S,{name:"time",label:"Time",header:"Prep & cooking combined",sublabel:"prep & cooking",options:r.time,active:this.onActiveChange,activeDrop:n,selected:this.getSelected})]}),(0,v.jsx)("div",{className:"pon-surprise-button-wrap pon-surprise-button-wrap-2",children:(0,v.jsxs)("div",{className:"pon-loadbar-wrapper --bare suprise",children:[(0,v.jsx)("button",{"data-track":"'category':'Recipe Finder','action':'click search'",className:"trackClick pon-button pon-loadbar-trigger",disabled:i||b?"disabled":"",onClick:T,children:"Surprise Me"}),(0,v.jsxs)("div",{className:"pon-loadbar pon-loadbar-3"+(i||b?" pon-loadbar-active":" "),children:[(0,v.jsx)("div",{className:"pon-loadbar-bar"}),(0,v.jsx)("div",{className:"pon-loadbar-bar"}),(0,v.jsx)("div",{className:"pon-loadbar-bar"})]})]})})]}):(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{className:"pon-recipe-custom-filters",children:[(0,v.jsx)(S,{name:"ingredients",label:"Main Ingredients",header:"Select one or more",search:"true",options:r.ingredients,active:this.onActiveChange,activeDrop:n,selected:this.getSelected,limit:25,hasChilds:"true",hideIfSelected:"true"}),(0,v.jsx)(S,{name:"categories",label:"Exclude Categories",header:"Exclude categories",options:r.categories,active:this.onActiveChange,activeDrop:n,selected:this.getSelected}),(0,v.jsx)(S,{name:"restrictions",label:"Dietary Needs",header:"Select one or more",options:r.restrictions,active:this.onActiveChange,activeDrop:n,selected:this.getSelected}),(0,v.jsx)(S,{name:"cooking",label:"Ease of Cooking",header:"Select one or more",options:r.cooking,active:this.onActiveChange,activeDrop:n,selected:this.getSelected}),(0,v.jsx)(S,{name:"calories",label:"Calories",header:"KCAL / Per serving",options:r.calories,active:this.onActiveChange,activeDrop:n,single:"true",selected:this.getSelected}),(0,v.jsx)(S,{name:"time",label:"Time",header:"Prep & cooking combined",sublabel:"prep & cooking",options:r.time,active:this.onActiveChange,activeDrop:n,selected:this.getSelected})]}),(0,v.jsxs)("div",{className:"pon-recipe-custom-filter mb-reset",children:[(0,v.jsx)("button",{"data-track":"'category':'Recipe Finder','action':'click search', 'label':'$title'",className:"trackClick pon-submit pon-account-submit",type:"button",disabled:i||b?"disabled":"",onClick:function(){return e.setState({append:!1,fetched:0},(function(){e.filterRecipes(),L([document.documentElement,document.body]).animate({scrollTop:L(".pon-recipes-thumbnails").offset().top-300})}))},children:f.searchLabel}),(0,v.jsxs)("div",{className:"pon-loadbar pon-loadbar-3"+(m?" pon-loadbar-active":""),children:[(0,v.jsx)("div",{className:"pon-loadbar-bar"}),(0,v.jsx)("div",{className:"pon-loadbar-bar"}),(0,v.jsx)("div",{className:"pon-loadbar-bar"})]})]}),(0,v.jsx)("div",{className:"pon-recipe-custom-filter",children:(0,v.jsx)("a",{href:"#",className:"pon-filters-clearall",onClick:function(t){e.clearAllFilters(t)},children:"Clear filters"})}),j]})})})}),!g&&(0,v.jsx)("section",{className:"pon-category-recipes-top-section"+(l?" pon-filter-recipe-results":""),children:(0,v.jsxs)("div",{className:"d-flex pon-container",children:[(0,v.jsxs)("div",{className:"pon-left-area",children:[E&&(0,v.jsx)("section",{className:"pon-recipe-filters-sort",children:E}),l&&(0,v.jsx)("p",{className:"text-center pon-recipe-filters-no-results",children:"0 Recipes found. Try removing some filters or amending your search term"}),u&&(0,v.jsx)("div",{className:"d-flex flex-wrap pon-recipes-thumbnails",children:k}),O]}),(0,v.jsx)("aside",{className:"pon-sidebar"})]})})]})}}],n&&C(r.prototype,n),i&&C(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}(n.Component);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}var U=document.getElementById("pon-recipe-custom-filters"),B=document.getElementById("pon-recipe-surprise"),K=!!G(window.ponFeatures.surpriseMe.enabled)&&window.ponFeatures.surpriseMe.enabled;U&&(0,i.s)(U).render((0,v.jsx)(F,{surpriseTemplateElement:!!B,surpriseFeature:K}));B&&(0,i.s)(B).render((0,v.jsx)(F,{surpriseTemplateElement:!!B,surpriseFeature:K}))},232:(e,t,r)=>{r.d(t,{e:()=>n});var n={CLICK_RATEARROW:"click.ratearrow",INITIALZED_POMETER:"initialized.pometer",CLICK_POMETER:"click.pometer",CLICK_POMETER_BLOCKED:"click.pometer.blocked",CLICK_RATE_HINT_GUEST:"click_rate_hint_guest",CLICK_RATE_HINT_ALREADY_RATED:"click_rate_hint_already_rated",CLICK_RATEARROW_GUEST:"click.rate.guest",CLICK_FAVE_GUEST:"click.fave.guest",CLICK_ADD_RECIPE_DOTS_GUEST:"click.add.recipe.dots.guest",CLICK_ADD_RECIPE_DOTS:"click.add.recipe.dots",CLICK_WEIGHTCONVERTER_PANEL_CLOSE:"click.weightconverter.close",CLICK_WEIGHTCONVERTER_PANEL_SEND_VALUE:"click.weightconverter.send",HINT_RATED:"hint.rated",NEWSLETTER_SUBMITTED:"newsletter.submitted",FORM_SUBMIT_INVALID:"form.submit.invalid",BOOK_NOT_OWNED:"book.not.owned",REQUEST_TRACKING:"request.tracking",FAVE_ADDED:"fave.added",FAVE_REMOVED:"fave.removed",FAVE_FAILED:"fave.failed",FILTER_MAX_INGREDIENTS_REACHED:"filter.max.reached",FILTER_SORT_UNAVAILABLE:"filter.sort.unavailable",CHANGE_PREFS_PHONE:"change.prefs.phone"}},769:(e,t,r)=>{r.d(t,{z:()=>n});var n={MESSENGER_REQUEST:"msg.request",ADBLOCKER_DETECTED:"adblocker.detected",TRACKER_BEFORE_TRACKED:"tracker.before.tracked",TRACKER_TRACKED:"tracker.tracked"}},838:(e,t,r)=>{r.d(t,{M:()=>n});var n={TRACKER_FACADE:"trackerFacade"}},489:(e,t,r)=>{r.d(t,{O:()=>n});var n={CATEGORY_RECIPE_GRID_TILE:"Recipe Grid Tile",CATEGORY_RECIPE_RATING:"Recipe Rating",CATEGORY_RECIPE_CARD:"Recipe Card",CATEGORY_RECIPE_FINDER:"Recipe Finder",CATEGORY_WLT:"WLT",CATEGORY_FORMS:"Forms",CATEGORY_CONSENT:"Consent",CATEGORY_ACTIVE_CAMPAIGN:"ActiveCampaign",CATEGORY_UI_GENERAL:"UI-General",CATEGORY_CONVERSION_INTENT:"Conversion Intent",CATEGORY_CONVERSION:"Conversion",CATEGORY_CONTENT:"Content",ACTION_RECIPERATING_RATED:"recipe rated - pometer",ACTION_RECIPERATING_CLICKED_GUEST:"arrow clicked guest",ACTION_RECIPECARD_UNIT_TOGGLED:"toggled servings",ACTION_RECIPECARD_SERVINGS_TOGGLED:"toggled unit",ACTION_RECIPETILE_FAVE_ADDED:"fave added",ACTION_RECIPETILE_FAVE_REMOVED:"fave removed",ACTION_RECIPEFINDER_CLICK_FILTER:"click filter",ACTION_RECIPEFINDER_SELECT_FILTER_OPTION:"select filter option",ACTION_RECIPEFINDER_CLICK_SORT:"click sort",ACTION_RECIPEGRID_LIST_CREATED:"recipe list created",ACTION_RECIPEGRID_ADDED_RECIPE_TO_LIST:"added to recipe list",ACTION_RECIPEGRID_REMOVED_RECIPE_TO_LIST:"removed from recipe list",ACTION_CONVERSION_LOGIN_CLICK_RATE_ATTEMPT:"rate",ACTION_CONVERSION_LOGIN_CLICK_FAVE_ATTEMPT:"fave",ACTION_CONVERSION_LOGIN_CLICK_RECIPE_DOTS:"recipe_card_dots",ACTION_WLT_CONVERTED_UNIT:"converted unit",ACTION_WLT_SUBMITTED_WEIGHT:"submitted weight",ACTION_FORMS_VALIDATION_ERROR:"validation error",ACTION_CONTENT_CLICK_SORT:"click sort"}},514:(e,t,r)=>{r.d(t,{$:()=>x});var n=r(520);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){for(var r=0;r-1?this.getPath(e):l(this,v,_).call(this,e)):null}},{key:"writeListItem",value:function(e,t,r,n){var i=this.getPath(e);if(i||(i=[]),r>0&&i.length>r-1&&i.shift(),!n&&i.length>0)for(var o=i.length;o>-1;o--)if(i[o]===t)return null;return i.push(t),this.setPath(e,i)}},{key:"set",value:function(e,t,r,n){return void 0!==n&&n&&this.setRootObj(n),!r&&e.indexOf(".")>-1?this.setPath(e,t):l(this,d,y).call(this,e,t)}},{key:"checkListItem",value:function(e,t){var r=this.getPath(e);if(!(r instanceof Array))return null;for(var n=r.length-1;n>-1;n--)if(r[n]===t)return r[n];return null}},{key:"remove",value:function(e,t){return!t&&e.indexOf(".")>-1?this.unsetPath(e):this.unset(e)}},{key:"splitTargetPath",value:function(e){var t=e.match(/[^\.]+$/),r=String(t[0]);if(r===e)e=null;else{var n=new RegExp("."+r,"");e=e.replace(n,"")}return{targetObjectPath:e,propName:r}}},{key:"unset",value:function(e){var t=this.getRootObj();return t[e]=null,delete t[e],t}},{key:"unsetPath",value:function(e){return this.setPath(e,p)}},{key:"clear",value:function(){this.setRootObj({})}},{key:"setRootObj",value:function(e){return c(this,f,e),e}},{key:"getRootObj",value:function(){return function(e,t){return t.get?t.get.call(e):t.value}(e=this,u(e,f,"get"))||{};var e}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function y(e,t,r){var n=this.getRootObj();return n[e]=t,n}function g(){for(var e,t=[!0],r=0;r-1){for(var l=(o=t.split(".")).length,c=0;c0){if(!e)return a&&a.hasOwnProperty(t)?a[t]:null;(a&&!a.hasOwnProperty(t)||"object"!=i(a[t])||null==a[t])&&(a[t]={}),n===p?(a[t][r]=null,delete a[t][r]):a[t][r]=n}return a}function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function E(e,t){for(var r=0;r{r.d(t,{Z:()=>p});var n=r(520);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){for(var r=0;r{r.d(t,{Z:()=>b});var n=r(769),i=r(270);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){for(var r=0;r=2}}],(r=null)&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();s(c,"adError",!1),s(c,"score",0),i.Z.getDispatcherStatic().addEventListener(n.z.ADBLOCKER_DETECTED,(function(e){c.adError=!0}));const u=c;var p=r(363),f=r(362);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"";t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null}},{key:"getNavLang",value:function(){return navigator.language||navigator.userLanguage}},{key:"isMobRl",value:function(){return f.Z.isMr()}},{key:"isMob",value:function(){return f.Z.isM()}},{key:"getUrlHash",value:function(){return window.location.hash.substr(1)}},{key:"getUrlQueryString",value:function(){return window.location.search}},{key:"getUrlPathSegments",value:function(){return window.location.pathname.split("/")}},{key:"getRequestParameters",value:function(){var e=document.location.search||document.location.hash,t={};if(e)for(var r=e.substring(1).split("&"),n=0;n=0}},{key:"isIos",value:function(){return f.Z.isI()}},{key:"wasSeenAsEd",value:function(){return document.cookie.indexOf("wpuu")>-1}}],(r=null)&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}()},362:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;rc});var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(u,e);var t,r,n,c=s(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),c.apply(this,arguments)}return t=u,n=[{key:"isM",value:function(){return o(l(u),"isMobile",this).call(this)}},{key:"isMr",value:function(){return u.isM()&&u.isT()}},{key:"isT",value:function(){return o(l(u),"isTouch",this).call(this)}},{key:"isI",value:function(){return o(l(u),"isIos",this).call(this)}}],(r=null)&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(r(723).Z)},723:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;ro});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"isMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t}},{key:"isTouch",value:function(){return"ontouchstart"in window||"onmsgesturechange"in window||window.DocumentTouch&&document instanceof DocumentTouch}},{key:"isIos",value:function(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}},{key:"isSmallViewport",value:function(){return window.innerWidth<575}}],(r=null)&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},251:(e,t,r)=>{var n=r(294),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,o={},c=null,u=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},294:(e,t,r)=>{e.exports=r(408)},893:(e,t,r)=>{e.exports=r(251)}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=t,e=[],n.O=(t,r,i,o)=>{if(!r){var a=1/0;for(u=0;u=o)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(s=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,i,o]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=714,(()=>{var e={714:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var i,o,[a,s,l]=r,c=0;if(a.some((t=>0!==e[t]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)var u=l(n)}for(t&&t(r);cn(809)));i=n.O(i)})();