PageSourceSearch

https://www.factormeals.nl/_next/static/chunks/pages/cookbook/import-fdf01babff87f94e.js

js factormeals.nl collected 2026-10-07 20:02:14 UTC 218,628 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[389,4578,10597,21394,50641,53286,66568,69517,70617,80046,87546,92621,96708],{10597:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M6 2h12v2H6V2ZM4 6h16v2H4V6ZM22 10H2v12h20V10Z",fill:"currentColor"})]}))}},21394:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 13a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm-2 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",fill:"currentColor"}),(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 5H8L7 7H3v12h18V7h-4l-1-2ZM5 9h3.236l1-2h5.528l1 2H19v8H5V9Z",fill:"currentColor"})]}))}},45727:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r}
1)(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.FD)("g",{clipPath:"url(#instagram_16_svg__a)",children:[(0,o.Y)("path",{d:"M4.687.055c-.851.04-1.433.177-1.94.376-.527.205-.973.48-1.416.925a3.92 3.92 0 0 0-.92 1.419c-.197.509-.33 1.09-.368 1.942C.005 5.571-.003 5.843 0 8.015c.004 2.172.014 2.445.054 3.299.041.85.177 1.432.376 1.94.205.526.48.972.925 1.415.446.444.892.716 1.42.92.508.197 1.09.331 1.941.368.854.038 1.126.046 3.298.042 2.173-.004 2.445-.014 3.298-.054.852-.04 1.433-.177 1.941-.376.526-.206.972-.48 1.415-.925.444-.445.716-.892.92-1.419.197-.509.331-1.09.368-1.942.037-.853.046-1.126.042-3.298-.004-2.173-.014-2.445-.054-3.298-.04-.852-.177-1.433-.376-1.941a3.924 3.924 0 0 0-.925-1.415 3.915 3.915 0 0 0-1.419-.92c-.509-.197-1.09-.331-1.942-.368-.853-.038-1.126-.046-3.298-.042C5.812.005 5.54.014 4.687.055Zm.093 14.462c-.78-.034-1.203-.163-1.486-.272a2.495 2.495 0 0 1-.92-.596 2.487 2.487 0 0 1-.6-.919c-.11-.282-.242-.705-.279-1.485-.04-.843-.049-1.096-.053-3.233-.004-2.135.004-2.388.04-3.232.034-.78.165-1.204.273-1.486.145-.374.317-.64.597-.92.28-.282.545-.455.919-.6.282-.111.705-.242 1.484-.279.844-.04 1.097-.048 3.232-.053 2.136-.004 2.39.004 3.233.04.78.035 1.204.164 1.485.273.374.145.641.317.922.597.28.28.454.545.6.919.11.281.241.705.278 1.484.04.844.049 1.097.053 3.232.004 2.136-.004 2.39-.04 3.233-.035.78-.164 1.204-.273 1.486-.145.374-.317.64-.597.921-.28.28-.545.454-.919.6-.281.11-.705.241-1.484.278-.844.04-1.096.049-3.233.053-2.135.004-2.388-.004-3.232-.04Zm6.522-10.793a.96.96 0 1 0 1.92-.005.96.96 0 0 0-1.92.005Zm-7.41 4.284a4.107 4.107 0 1 0 8.215-.016 4.107 4.107 0 0 0-8.215.016Zm1.441-.003a2.667 2.667 0 1 1 5.334-.01 2.667 2.667 0 0 1-5.334.01Z",fill:"url(#instagram_16_svg__b)"}),(0,o.Y)("path",{d:"M4.687.055c-.851.04-1.433.177-1.94.376-.527.205-.973.48-1.416.925a3.92 3.92 0 0 0-.92 1.419c-.197.509-.33 1.09-.368 1.942C.005 5.571-.003 5.843 0 8.015c.004 2.172.014 2.445.054 3.299.041.85.177 1.432.376 1.94.205.526.48.972.925 1.415.446.444.892.716 1.42.92.508.197 1.09.331 1.941.368.854.038 1.126.046 3.298.042 2.173-.004 2.445-.014 3.298-.054.852-.04 1.433-.177 1.941-.376.526-.206.972-.48 1.415-.925.444-.445.716-.892.92-1.419.197-.509.331-1.09.368-1.942.037-.853.046-1.126.042-3.298-.004-2.173-.014-2.445-.054-3.298-.04-.852-.177-1.433-.376-1.941a3.924 3.924 0 0 0-.925-1.415 3.915 3.915 0 0 0-1.419-.92c-.509-.197-1.09-.331-1.942-.368-.853-.038-1.126-.046-3.298-.042C5.812.005 5.54.014 4.687.055Zm.093 14.462c-.78-.034-1.203-.163-1.486-.272a2.495 2.495 0 0 1-.92-.596 2.487 2.487 0 0 1-.6-.919c-.11-.282-.242-.705-.279-1.485-.04-.843-.049-1.096-.053-3.233-.004-2.135.004-2.388.04-3.232.034-.78.165-1.204.273-1.486.145-.374.317-.64.597-.92.28-.282.545-.455.919-.6.282-.111.705-.242 1.484-.279.844-.04 1.097-.048 3.232-.053 2.136-.004 2.39.004 3.233.04.78.035 1.204.164 1.485.273.374.145.641.317.922.597.28.28.454.545.6.919.11.281.241.705.278 1.484.04.844.049 1.097.053 3.232.004 2.136-.004 2.39-.04 3.233-.035.78-.164 1.204-.273 1.486-.145.374-.317.64-.597.921-.28.28-.545.454-.919.6-.281.11-.705.241-1.484.278-.844.04-1.096.049-3.233.053-2.135.004-2.388-.004-3.232-.04Zm6.522-10.793a.96.96 0 1 0 1.92-.005.96.96 0 0 0-1.92.005Zm-7.41 4.284a4.107 4.107 0 1 0 8.215-.016 4.107 4.107 0 0 0-8.215.016Zm1.441-.003a2.667 2.667 0 1 1 5.334-.01 2.667 2.667 0 0 1-5.334.01Z",fill:"url(#instagram_16_svg__c)"})]}),(0,o.FD)("defs",{children:[(0,o.FD)("radialGradient",{id:"instagram_16_svg__b",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(4.267 17.227) scale(23.7778)",children:[(0,o.Y)("stop",{stopColor:"#FD5"}),(0,o.Y)("stop",{offset:.1,stopColor:"#FD5"}),(0,o.Y)("stop",{offset:.5,stopColor:"#FF543E"}),(0,o.Y)("stop",{offset:1,stopColor:"#C837AB"})]}),(0,o.FD)("radialGradient",{id:"instagram_16_svg__c",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(6.827 .027) scale(15.04)",children:[(0,o.Y)("stop",{stopColor:"#3771C8"}),(0,o.Y)("stop",{offset:.128,stopColor:"#3771C8",stopOpacity:0})]}),(0,o.Y)("clipPath",{id:"instagram_16_svg__a",children:(0,o.Y)("path",{fill:"#fff",d:"M0 0h16v16H0z"})})]})]}))}},58023:(e,t,r)=>{"use strict";r.d(t,{L:()=>a,Y:()=>i});var o=r(627393),n="hf_cookbook_imports",i=function(){try{var e=o.Ay.getItem(n);return e?JSON.parse(e):[]}catch(e){return[]}},a=function(e){try{o.Ay.setItem(n,JSON.stringify(e))}catch(e){}}},67019:(e,t,r)=>{"use strict";r.d(t,{c:()=>b});var o=r(674562),n=r(6083),i=r(127944),a=r(771562),l=r(470663),c=r(211654),u=r(47856);function s(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var f=function(){var e,t=(e=function(e,t){var r,o,i,l,c,u,s,p,d,f=arguments;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(b){switch(b.label){case 0:return r=e.id,i=void 0===(o=e.usePublicAuth)||o,l=e.systemCountry,c=e.locale,u=e.parentSpan,[4,(f.length>2&&void 0!==f[2]?f[2]:n.A)("".concat("/cookbook/v1/external-recipes","/").concat(r),t,{method:"DELETE",query:{country:l,locale:c,hf_public_id:(0,a.Ay)()},parentSpan:u,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"delete-external-recipe"}},{usePublicAuth:i})];case 1:return p=(s=b.sent()).headers.get("X-Free-Recipe-Save-Count"),d=s.headers.get("X-Free-Recipe-Save-Limit"),[2,{freeRecipeSaveCount:p?parseInt(p,10):null,freeRecipeSaveLimit:d?parseInt(d,10):null}]}})},function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){s(i,o,n,a,l,"next",e)}function l(e){s(i,o,n,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}(),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.A)().fetch,r=(0,l.A)(),n=(0,c.j)(),a=(0,o.useQueryClient)(),s=[u.A["externalRecipes.delete"]];return(0,o.useMutation)(function(e){return f(p(d(p({},e),{usePublicAuth:!r}),n),s,t)},d(p({},e),{onSuccess:function(t,r,o){var n;a.invalidateQueries(u.A["externalRecipes.list"]),a.invalidateQueries(u.A["internalRecipes.search"]),null==(n=e.onSuccess)||n.call(e,t,r,o)}}))}},79955:(e,t,r)=>{"use strict";r.d(t,{X:()=>l});var o=r(823357),n=r(69708),i=r(607555),a=r(830742),l=function(){var e=(0,o.hJ)((0,n.A)())?a.A:a.vh;return(0,i.A)(e)}},88620:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm5.314-15-7.046 7.045-2.828-2.828L6 12.657l4.242 4.243 8.486-8.486L17.313 7Z",fill:"currentColor"})]}))}},142943:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);
1return(0,o.FD)("svg",i(n(i(n({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M8.356 1.01a7 7 0 1 0-.712 13.98 7 7 0 0 0 .712-13.98ZM7.29 13.55a5.6 5.6 0 0 1-4.9-5.55c.003-.423.052-.843.147-1.254L5.89 10.1v.7a1.4 1.4 0 0 0 .594 1.143 1.829 1.829 0 0 1 .806 1.482v.126Zm4.83-1.778a1.39 1.39 0 0 0-1.33-.973h-.7V8.7a.7.7 0 0 0-.7-.7h-3.5a.7.7 0 0 1 0-1.4h.7a.7.7 0 0 0 .7-.7 1.4 1.4 0 0 1 1.4-1.4 1.4 1.4 0 0 0 1.4-1.4v-.287a5.588 5.588 0 0 1 2.03 8.96Z",fill:"currentColor"})]}))}},166568:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M6 22.5c-.55 0-1.02-.196-1.412-.587A1.926 1.926 0 0 1 4 20.5v-10c0-.55.196-1.02.588-1.412A1.926 1.926 0 0 1 6 8.5h3v2H6v10h12v-10h-3v-2h3c.55 0 1.02.196 1.413.588.391.391.587.862.587 1.412v10c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 18 22.5H6Zm5-6V5.325l-1.6 1.6L8 5.5l4-4 4 4-1.4 1.425-1.6-1.6V16.5h-2Z",fill:"currentColor"})]}))}},170176:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);
1return(0,o.FD)("svg",i(n(i(n({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M14.703 4.564a1.759 1.759 0 0 0-1.237-1.262C12.382 3 7.995 3 7.995 3s-4.367 0-5.45.302a1.82 1.82 0 0 0-1.259 1.262C1 5.67 1 7.994 1 7.994s0 2.326.286 3.442a1.84 1.84 0 0 0 1.258 1.262C3.628 13 7.994 13 7.994 13s4.388 0 5.472-.302a1.776 1.776 0 0 0 1.237-1.262C15 10.32 15 7.995 15 7.995s0-2.325-.297-3.43Zm-8.099 5.58V5.856l3.63 2.138-3.63 2.148Z",fill:"#F03"})]}))}},288520:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);
1return(0,o.FD)("svg",i(n(i(n({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M8 8c1.882 0 3.409-1.492 3.409-3.333 0-1.841-1.527-3.334-3.409-3.334-1.883 0-3.409 1.493-3.409 3.334C4.591 6.507 6.117 8 8 8ZM13.414 14.667c.904 0 1.622-.854 1.108-1.956-1.29-1.883-3.728-3.378-6.522-3.378s-5.232 1.495-6.522 3.378c-.514 1.102.204 1.956 1.108 1.956h10.828Z",fill:"currentColor"})]}))}},304578:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"m13 18.333 6.666-6.666L21 13l-9 9-9-9 1.333-1.333L11 18.333V2h2v16.333Z",fill:"currentColor"})]}))}},307690:(e,t,r)=>{"use strict";r.d(t,{GU:()=>d,RQ:()=>p,YR:()=>n,ku:()=>i,yg:()=>c});var o=r(225307),n="/gw/cookbook/v1/recipe-developers",i=function(e){return"".concat(n,"/").concat(e)},a=o.z.object({name:o.z.string(),quantity:o.z.string().nullable().optional(),unit:o.z.string().nullable().optional(),thumbnail_url:o.z.string().optional(),image_path:o.z.string().nullable().optional()}),l=o.z.object({index:o.z.number(),instructions:o.z.string()}),c=o.z.enum(["creator","customer_image","facebook","hellofresh","instagram","pinterest","tiktok","youtube","unsupported"]),u=o.z.object({id:o.z.string(),url:o.z.string(),title:o.z.string().optional(),headline:o.z.string().optional(),thumbnail_url:o.z.string().optional(),description:o.z.string().optional(),total_time:o.z.string().optional(),has_recipe_extracted:o.z.boolean(),source_platform:c.catch("unsupported"),owner_id:o.z.string(),owner_type:o.z.string().optional(),created_at:o.z.string(),updated_at:o.z.string().optional(),is_bookmark:o.z.boolean().optional(),bookmark_id:o.z.string().optional(),author_name:o.z.string().optional()});u.extend({ingredients:o.z.array(a),steps:o.z.array(l),share_token:o.z.string().optional()}),o.z.object({data:o.z.array(u),pagination:o.z.object({limit:o.z.number(),next_cursor:o.z.string().optional(),has_more:o.z.boolean()})});var s=o.z.enum(["instagram","youtube","tiktok","x","website"]),p=o.z.object({id:o.z.string(),type:o.z.string(),name:o.z.string(),slug:o.z.string(),bio:o.z.string(),headshotImage:o.z.object({url:o.z.string().optional()}).partial().passthrough(),socialLinks:o.z.array(o.z.object({platform:s,url:o.z.string()}).passthrough()),recipes:o.z.array(o.z.object({websiteUrl:o.z.string(),description:o.z.string().optional(),imageUrl:o.z.string().optional()}).passthrough())}).partial().passthrough(),d=o.z.object({avatarRef:o.z.string().nullable(),bio:o.z.string().max(300),socialLinks:o.z.array(o.z.object({platform:s,url:o.z.string().url(),id:o.z.string().optional()})),name:o.z.string().optional(),slug:o.z.string().optional(),consentChecked:o.z.boolean()})},353286:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M10 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"currentColor"}),(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 7h4v14H6v-4H2V3h16v4Zm-2-2H4v10h2V7h10V5Zm-3.92 14H9.92L11 17.458 12.08 19Zm6.088 0h-4.05l2.025-3.15L18.168 19ZM20 18.15l-3.857-6-3.072 4.78L11 13.97l-3 4.286V9h12v9.15Z",fill:"currentColor"})]}))}},382273:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);
1return(0,o.FD)("svg",i(n(i(n({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M6.819 6.57v-.39a3.287 3.287 0 0 0-.52-.04C4.233 6.14 2.5 7.77 2.5 9.792c0 1.327.658 2.46 1.657 3.132a3.742 3.742 0 0 1-1.128-2.703c0-2.017 1.726-3.646 3.79-3.65ZM8.01 2v7.86c0 1.03-.754 1.693-1.67 1.693-.305 0-.594-.07-.845-.199.319.32.822.63 1.373.63.917 0 1.67-.663 1.67-1.694V2.43h1.453A3.868 3.868 0 0 1 9.895 2H8.011Zm3.34 2.319a3.27 3.27 0 0 0 1.62.883V4.85a3.441 3.441 0 0 1-1.62-.531Z",fill:"#2DCCD3"}),(0,o.Y)("path",{d:"M11.35 4.318c-.446-.451-.787-1.073-.926-1.889h-.432c.247.883.754 1.498 1.359 1.89Zm1.621.883V6.69c-.84 0-1.634-.157-2.334-.62.815.8 1.804 1.05 2.863 1.05V5.28a3.353 3.353 0 0 1-.53-.079Zm-7.475 6.153a1.666 1.666 0 0 1-.359-1.064c0-1.19.948-1.819 2.21-1.688V6.609c-.363-.03-.726-.04-1.02-.04H6.32v1.603c-1.263-.13-2.21.498-2.21 1.689 0 .696.362 1.224 1.387 1.493Zm4.613-1.623c0 2.51-1.956 3.84-3.8 3.84a3.85 3.85 0 0 1-2.152-.648A3.826 3.826 0 0 0 6.838 14c1.844 0 3.8-1.33 3.8-3.84V6.07a3.598 3.598 0 0 1-.53-.43v4.09Z",fill:"#F1204A"}),(0,o.Y)("path",{d:"M6.31 13.571c1.843 0 3.799-1.33 3.799-3.84V5.64c.17.166.345.308.529.43.7.463 1.494.62 2.334.62V5.202a3.275 3.275 0 0 1-1.62-.883c-.605-.392-1.113-1.007-1.359-1.89H8.54v7.861c0 1.031-.753 1.693-1.67 1.693-.552 0-1.054-.31-1.373-.629-.525-.269-.888-.797-.888-1.493 0-1.19.947-1.819 2.21-1.689V6.61c-2.063.005-3.79 1.593-3.79 3.61 0 1.076.432 2.025 1.128 2.703a3.85 3.85 0 0 0 2.153.649Z",fill:"#000"})]}))}},385320:(e,t,r)=>{"use strict";r.d(t,{t:()=>b});var o=r(674562),n=r(6083),i=r(127944),a=r(771562),l=r(470663),c=r(211654),u=r(47856);function s(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var f=function(){var e,t=(e=function(e,t){var r,o,i,l,c,u,s,f,b,m,h,y,g,v=arguments;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(k){switch(k.label){case 0:return r=e.url,i=void 0===(o=e.usePublicAuth)||o,c=void 0!==(l=e.addMissingDetails)&&l,s=void 0!==(u=e.mirrorThumbnail)&&u,f=e.systemCountry,b=e.locale,m=e.parentSpan,[4,(v.length>2&&void 0!==v[2]?v[2]:n.A)("/cookbook/v2/external-recipes",t,{method:"POST",headers:{"Content-Type":"application/json","X-Import-Source":"web_manual_url_entry"},query:p({country:f,locale:b,hf_public_id:(0,a.Ay)()},c?{add_missing_details:!0}:{},s?{mirror_thumbnail:!0}:{}),data:{url:r},timeout:6e4,parentSpan:m,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"create-external-recipe"}},{usePublicAuth:i})];case 1:return y=(h=k.sent()).headers.get("X-Free-Recipe-Save-Count"),g=h.headers.get("X-Free-Recipe-Save-Limit"),[4,h.json()];case 2:return[2,d(p({},k.sent()),{freeRecipeSaveCount:y?parseInt(y,10):null,freeRecipeSaveLimit:g?parseInt(g,10):null})]}})},function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){s(i,o,n,a,l,"next",e)}function l(e){s(i,o,n,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}(),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.A)().fetch,r=(0,l.A)(),n=(0,c.j)(),a=(0,o.useQueryClient)(),s=[u.A["externalRecipes.create"]];return(0,o.useMutation)(function(e){return f(p(d(p({},e),{usePublicAuth:!r}),n),s,t)},d(p({},e),{onSuccess:function(t,r,o){var n;a.invalidateQueries(u.A["externalRecipes.list"]),null==(n=e.onSuccess)||n.call(e,t,r,o)}}))}},392621:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 5v17h13V5H8Zm11 2h-9v13h9V7Z",fill:"currentColor"}),(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 19V2h13v3h-2V4H5v13h3v2H3Z",fill:"currentColor"})]}))}},429239:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/cookbook/import",function(){return r(699846)}])},434418:(e,t,r)=>{"use strict";r.d(t,{n:()=>b});var o=r(674562),n=r(6083),i=r(127944),a=r(771562),l=r(470663),c=r(211654),u=r(47856);function s(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var f=function(){var e,t=(e=function(e,t){var r,o,i,l,c,u,s,f,b,m,h,y=arguments;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(g){switch(g.label){case 0:return r=e.bookmarkId,o=e.bookmarkSource,i=e.importSource,c=void 0===(l=e.usePublicAuth)||l,u=e.systemCountry,s=e.locale,f=e.parentSpan,[4,(y.length>2&&void 0!==y[2]?y[2]:n.A)("/cookbook/v1/internal-recipes",t,{method:"POST",headers:{"Content-Type":"application/json","X-Import-Source":null!=i?i:"web_".concat(o,"_recipe_redirect")},query:{country:u,locale:s,hf_public_id:(0,a.Ay)()},data:{bookmark_id:r,bookmark_source:o},timeout:6e4,parentSpan:f,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"create-internal-recipe-from-creator"}},{usePublicAuth:c})];case 1:return m=(b=g.sent()).headers.get("X-Free-Recipe-Save-Count"),h=b.headers.get("X-Free-Recipe-Save-Limit"),[4,b.json()];case 2:return[2,d(p({},g.sent()),{freeRecipeSaveCount:m?parseInt(m,10):null,freeRecipeSaveLimit:h?parseInt(h,10):null})]}})},function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){s(i,o,n,a,l,"next",e)}function l(e){s(i,o,n,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}(),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.A)().fetch,r=(0,l.A)(),n=(0,c.j)(),a=(0,o.useQueryClient)(),s=[u.A["internalRecipes.createFromCreator"]];return(0,o.useMutation)(function(e){return f(p(d(p({},e),{usePublicAuth:!r}),n),s,t)},d(p({},e),{onSuccess:function(t,r,o){var n;a.invalidateQueries(u.A["externalRecipes.list"]),a.invalidateQueries(u.A["internalRecipes.search"]),null==(n=e.onSuccess)||n.call(e,t,r,o)}}))}},600389:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"8 8 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M18.4 24.816h-1.6v-2.389h1.6v2.389ZM20.8 24.816h-1.6v-2.389h1.6v2.389ZM23.2 24.816h-1.6v-2.389h1.6v2.389Z",fill:"currentColor"}),(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26 28H14.4L12 20.04h16L26 28Zm-10.41-1.592h9.16l1.2-4.776h-11.8l1.44 4.776Z",fill:"currentColor"}),(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.51 16.855H28v4.777H12v-4.777h2.49L17.308 12l1.386.796-2.355 4.059h7.323l-2.355-4.06L22.692 12l2.817 4.855ZM13.6 20.039h12.8v-1.591H13.6v1.591Z",fill:"currentColor"})]}))}},638525:(e,t,r)=>{"use strict";r.d(t,{Qk:()=>d,tH:()=>f});var o=r(674562),n=r(6083),i=r(127944),a=r(211654),l=r(47856),c=r(307690);function u(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var p=function(){var e,t=(e=function(e,t){var r,o,i,a,l=arguments;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(u){switch(u.label){case 0:return r=e.parentSpan,o=e.creatorId,[4,(l.length>2&&void 0!==l[2]?l[2]:n.A)((0,c.ku)(o),t,{query:{include_recipes:"true"},parentSpan:r,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"get-creator-recipes"}})];case 1:return[4,u.sent().json()];case 2:return[2,{docs:a=null!=(i=u.sent().recipes)?i:[],totalDocs:a.length,limit:a.length,totalPages:1,page:1,pagingCounter:1,hasPrevPage:!1,hasNextPage:!1,prevPage:null,nextPage:null}]}})},function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){u(i,o,n,a,l,"next",e)}function l(e){u(i,o,n,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}(),d=function(e,t){var r=(0,i.A)().fetch,n=(0,a.j)(),c=[l.A["cookbookCreators.recipes"],e];return(0,o.useInfiniteQuery)(c,function(){return p(s({},e,n),c,r)},{enabled:!!e.creatorId,getNextPageParam:function(){},initialData:t,staleTime:t?1/0:0,cacheTime:t?1/0:0,suspense:!1})},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,i.A)().fetch,r=(0,a.j)();return(0,o.useQueries)(e.map(function(e){var o={creatorId:e},n=[l.A["cookbookCreators.recipes"],o];return{queryKey:n,queryFn:function(){return p(s({},o,r),n,t)},enabled:!!e,suspense:!1}}
1))}},670617:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M13 3h-2v8H3v2h8v8h2v-8h8v-2h-8V3Z",fill:"currentColor"})]}))}},671096:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);
1return(0,o.FD)("svg",i(n(i(n({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.667 4.06 5.36 12.37 2 9.01l1.06-1.06 2.299 2.298L12.607 3l1.06 1.06Z",fill:"currentColor"})]}))}},699846:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>n2,default:()=>n4});var o=r(126811),n=r(75834),i=r(124322),a=r.n(i),l=r(524477),c=r(736067),u=r(646228),s=r(845653),p=r(607555),d=r(710091),f=r(385320),b=r(674562),m=r(6083),h=r(127944),y=r(771562),g=r(470663),v=r(211654),k=r(47856);function w(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function S(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var C=function(){var e,t=(e=function(e,t){var r,o,n,i,a,l,c,u,s,p,d,f=arguments;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(b){switch(b.label){case 0:return r=e.description,n=void 0===(o=e.usePublicAuth)||o,a=void 0!==(i=e.addMissingDetails)&&i,l=e.systemCountry,c=e.locale,u=e.parentSpan,[4,(f.length>2&&void 0!==f[2]?f[2]:m.A)("/cookbook/v2/external-recipes",t,{method:"POST",headers:{"Content-Type":"application/json","X-Import-Source":"web_manual_text_entry"},query:O({country:l,locale:c,hf_public_id:(0,y.Ay)()},a?{add_missing_details:!0}:{}),data:{description:r},timeout:12e4,parentSpan:u,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"create-external-recipe-by-description"}},{usePublicAuth:n})];case 1:return p=(s=b.sent()).headers.get("X-Free-Recipe-Save-Count"),d=s.headers.get("X-Free-Recipe-Save-Limit"),[4,s.json()];case 2:return[2,S(O({},b.sent()),{freeRecipeSaveCount:p?parseInt(p,10):null,freeRecipeSaveLimit:d?parseInt(d,10):null})]}})},function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){w(i,o,n,a,l,"next",e)}function l(e){w(i,o,n,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}(),j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,h.A)().fetch,r=(0,g.A)(),o=(0,v.j)(),n=(0,b.useQueryClient)(),i=[k.A["externalRecipes.createFromDescription"]];return(0,b.useMutation)(function(e){return C(O(S(O({},e),{usePublicAuth:!r}),o),i,t)},S(O({},e),{onSuccess:function(t,r,o){var i;n.invalidateQueries(k.A["externalRecipes.list"]),null==(i=e.onSuccess)||i.call(e,t,r,o)}}))},x=r(67019);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function _(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function A(e){return function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){_(i,o,n,a,l,"next",e)}function l(e){_(i,o,n,a,l,"throw",e)}a(void 0)})}}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function I(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Y(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var R=function(){var e=A(function(e,t){var r,o,n,i,a,l,c,u,s=arguments;return Y(this,function(p){switch(p.label){case 0:return r=e.fileName,o=e.mimeType,n=e.fileSizeBytes,a=void 0===(i=e.usePublicAuth)||i,l=e.systemCountry,c=e.locale,u=e.parentSpan,[4,(s.length>2&&void 0!==s[2]?s[2]:m.A)("/cookbook/v1/external-recipes/upload-url",t,{method:"POST",headers:{"Content-Type":"application/json"},query:{country:l,locale:c,hf_public_id:(0,y.Ay)()},data:{file_name:r,mime_type:o,file_size_bytes:n},timeout:3e4,parentSpan:u,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"get-upload-url"}},{usePublicAuth:a})];case 1:return[2,p.sent().json()]}})});return function(t,r){return e.apply(this,arguments)}}(),T=function(){var e=A(function(e){var t,r,o,n,i;return Y(this,function(a){switch(a.label){case 0:return t=e.uploadUrl,r=e.uploadFields,o=e.file,n=new FormData,Object.entries(r).forEach(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return P(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],o=t[1];n.append(r,o)}),n.append("file",o),[4,window.fetch(t,{method:"POST",body:n})];case 1:if(!(i=a.sent()).ok)throw Error("S3 upload failed with status ".concat(i.status));return[2]}})});return function(t){return e.apply(this,arguments)}}(),D=function(){var e=A(function(e,t){var r,o,n,i,a,l,c,u,s,p=arguments;return Y(this,function(d){switch(d.label){case 0:return r=e.imageRef,n=void 0===(o=e.usePublicAuth)||o,i=e.systemCountry,a=e.locale,l=e.parentSpan,[4,(p.length>2&&void 0!==p[2]?p[2]:m.A)("/cookbook/v2/external-recipes",t,{method:"POST",headers:{"Content-Type":"application/json","X-Import-Source":"image_import_web"},query:{country:i,locale:a,hf_public_id:(0,y.Ay)()},data:{url:"",image_ref:r},timeout:12e4,parentSpan:l,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"create-external-recipe-from-image"}},{usePublicAuth:n})];case 1:return u=(c=d.sent()).headers.get("X-Free-Recipe-Save-Count"),s=c.headers.get("X-Free-Recipe-Save-Limit"),[4,c.json()];case 2:return[2,I(E({},d.sent()),{freeRecipeSaveCount:u?parseInt(u,10):null,freeRecipeSaveLimit:s?parseInt(s,10):null})]}})});return function(t,r){return e.apply(this,arguments)}}(),z=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(0,h.A)().fetch,o=!(0,g.A)(),n=(0,v.j)(),i=(0,b.useQueryClient)(),a=[k.A["externalRecipes.uploadUrl"]],l=[k.A["externalRecipes.create"]];return(0,b.useMutation)((e=A(function(e){var t,i;return Y(this,function(c){switch(c.label){case 0:return[4,R(E({fileName:(t=e.file).name,mimeType:t.type,fileSizeBytes:t.size,usePublicAuth:o},n),a,r)];case 1:return[4,T({uploadUrl:(i=c.sent()).upload_url,uploadFields:i.upload_fields,file:t})];case 2:return c.sent(),[2,D(E({imageRef:i.image_ref,usePublicAuth:o},n),l,r)]}})}),function(t){return e.apply(this,arguments)}),I(E({},t),{onSuccess:function(e,r,o){var n;i.invalidateQueries(k.A["externalRecipes.list"]),null==(n=t.onSuccess)||n.call(t,e,r,o)}}))},L=r(589651),F={ANONYMOUS_LIMIT_REACHED:"You have reached the recipe limit.",AI_SERVICE_UNAVAILABLE:"Our AI is temporarily unavailable. Please try again in a moment.",URL_UNREACHABLE:"We couldn't reach this URL. Check the link and try again.",CONTENT_EMPTY:"We couldn't extract a recipe from this page.",EXTRACTION_FAILED:"We couldn't extract a recipe from this page.",RECIPE_NOT_DETECTED:"No recipe was detected on this page.",VIDEO_TOO_LONG:"This video is too long to process.",MULTIPLE_RECIPES:"Multiple recipes were detected. Try a more specific URL.",MULTIPLE_LANGUAGES:"Multiple languages were detected on this page.",PLATFORM_NOT_SUPPORTED:"We don't support importing from this site yet.",URL_NOT_SUPPORTED:"This URL is not supported.",IMAGE_NOT_FOOD_RELATED:"This page doesn't seem to contain a food recipe.",CONTENT_ACCESS_RESTRICTED:"This page is private or login-protected.",TRANSCRIPT_EXTRACTION_FAILED:"We had trouble reading this video's audio.",TIMEOUT:"This is taking longer than usual. Please try again.",DUPLICATE:"You've already saved this recipe.",PARSE_FAILURE:"We couldn't read this page properly. Try a different link.",RATE_LIMIT:"You're going a bit fast. Please wait a moment and try again.",OFFLINE:"You're offline. Check your connection and try again."},M=function(e){var t,r,o=null!=(t=e.name)?t:"",n=null!=(r=e.message)?r:"";return"AbortError"===o||"TimeoutError"===o||/timeout/i.test(n)},N=function(e){if("undefined"!=typeof navigator&&!1===navigator.onLine)return!0;var t,r,o=null!=(r=e.message)?r:"";return(null!=(t=TypeError)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)||/network|fetch failed/i.test(o)},U=function(e){try{if(e.responseResult&&"string"==typeof e.responseResult){var t;return null!=(t=JSON.parse(e.responseResult).error_code)?t:null}}catch(e){}return null},V=function(e){if(!e)return null;if(N(e))return"OFFLINE";if(M(e))return"TIMEOUT";var t,r=null==(t=e.response)?void 0:t.status;if(429===r)return"RATE_LIMIT";
1if(409===r)return"DUPLICATE";var o=U(e);return o||("number"==typeof r&&r>=500?"PARSE_FAILURE":"TRANSPORT")},B=function(e,t){return e&&F[e]?t("cookbook.import.error.".concat(e.toLowerCase()))||F[e]:t("cookbook.import.error.generic")||"Something went wrong. Please try again."},H=r(58023),Z=r(434418);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var $=["creator","hellofresh"],G=function(e){var t;return e?Array.isArray(e)?null!=(t=e[0])?t:null:e:null},q=function(e){var t=e.isCustomer,r=e.isAtLimit,o=e.isListLoaded,i=(0,L.Ay)("cookbook").translateRaw,a=(0,l.r)(),c=(0,n.useRef)(!1),u=K((0,n.useState)(!1),2),s=u[0],p=u[1],d=K((0,n.useState)(null),2),f=d[0],b=d[1],m=K((0,n.useState)(!1),2),h=m[0],y=m[1],g=(0,Z.n)(),v=g.mutateAsync,k=g.isLoading;return(0,n.useEffect)(function(){if(a.isReady&&!c.current&&o){var e=G(a.query.bookmarkId);if(e){c.current=!0;var n=function(){a.replace("/cookbook/import",void 0,{shallow:!0})},l=G(a.query.bookmarkSource);if(!l||!$.includes(l))return void n();if(!t&&r){p(!0),n();return}b(null),v({bookmarkId:e,bookmarkSource:l}).then(function(){y(!0)}).catch(function(e){b(B(V(e),i))}).finally(n)}}},[a,o,r,t,v,i]),{isCreatingInternal:k,arrivedAtCap:s,consumeError:f,consumeSucceeded:h}},X=r(251846),Q=r(14190),J=r(534902),ee=r(682463),et=function(e){var t,r,o,n;return null!=(n=null!=(o=null==(t=e.recipeDeveloper)?void 0:t.displayName)?o:null==(r=e.recipeDeveloper)?void 0:r.name)?n:null},er=function(){var e=(0,X.$T)().trackJanusEvent;return{trackRecipeSaveSuccess:(0,n.useCallback)(function(t){var r,o,n,i,a=t.recipeId,l=t.recipe,c=t.recipeSourceType;e(J.Wn.janusEvent({event:J.Wn.event({systemMessage:null}),cookbookRecipeAction:J.Wn.cookbookRecipeAction({recipeId:a}),recipeView:J.Wn.recipeView({authorId:null!=(o=null==l||null==(r=l.recipeDeveloper)?void 0:r.id)?o:null,authorName:l?et(l):null,recipeId:null!=(n=null==l?void 0:l.id)?n:a,recipeSourceType:null!=c?c:J._3.Unknown,recipeTags:null!=(i=null==l?void 0:l.tags.map(function(e){return e.name}))?i:[]})}))},[e]),trackRecipeSaveError:(0,n.useCallback)(function(t){var r=t.systemMessage;e(ee.j.janusEvent({event:ee.j.event({systemMessage:r})}))},[e])}},eo="AllSaved",en=function(){var e=er(),t=e.trackRecipeSaveSuccess,r=e.trackRecipeSaveError;return{fireSaveSuccess:(0,n.useCallback)(function(e,r){return t({recipeId:r,recipeImportMethod:e,collectionId:eo,recipeSourceType:J._3.External})},[t]),fireSaveError:(0,n.useCallback)(function(e,t){return r({recipeId:"",recipeImportMethod:e,collectionId:eo,systemMessage:t})},[r])}},ei=function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch(t){return e}},ea=function(e){return{id:e.id,url:e.url,title:e.title||ei(e.url),hostname:ei(e.url),thumbnailUrl:e.thumbnail_url||null,shareToken:null,importedAt:e.created_at,sourcePlatform:e.source_platform,authorName:e.author_name}};function el(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function ec(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function eu(e){return function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){ec(i,o,n,a,l,"next",e)}function l(e){ec(i,o,n,a,l,"throw",e)}a(void 0)})}}function es(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return el(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return el(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ep(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var ed=function(){var e,t,r,o,i,a,l,c,u,s,p,b=(0,L.Ay)("cookbook").translateRaw,m=(0,g.A)(),h=es((0,n.use
1State)(null),2),y=h[0],v=h[1],k=es((0,n.useState)(null),2),w=k[0],O=k[1],S=(0,n.useCallback)(function(e){return O(e?{message:e}:null)},[]),C=es((0,n.useState)([]),2),P=C[0],_=C[1],A=es((0,n.useState)(!1),2),E=A[0],I=A[1],Y=es((0,n.useState)(!1),2),R=Y[0],T=Y[1];(0,n.useEffect)(function(){_((0,H.Y)()),I(!0)},[]);var D=(0,d.ql)({limit:6},{suspense:!1,refetchOnMount:!0,staleTime:3e5,cacheTime:6e5,onSuccess:function(e){var t=e.pages.flatMap(function(e){return e.data}).map(ea);(0,H.L)(t),_(t)}}),F=D.data,M=D.isLoading,N=D.isSuccess,U=D.refetch,Z=D.fetchNextPage,W=D.isFetchingNextPage,K=(0,f.t)(),$=K.mutateAsync,G=K.isLoading,X=j(),J=X.mutateAsync,ee=X.isLoading,et=(0,x.c)().mutateAsync,er=z(),eo=er.mutateAsync,ei=er.isLoading,el=en(),ec=el.fireSaveSuccess,ed=el.fireSaveError,ef=N?(null!=(a=null==F?void 0:F.pages.flatMap(function(e){return e.data}))?a:[]).map(ea):P,eb=null!=(l=null==F||null==(t=F.pages[F.pages.length-1])?void 0:t.pagination.has_more)&&l,em=null!=(c=null==F||null==(r=F.pages[0])?void 0:r.freeRecipeSaveLimit)?c:3,eh=null!=(u=null==F||null==(o=F.pages[0])?void 0:o.freeRecipeSaveCount)?u:ef.length,ey=!m&&eh>=em,eg=ef.some(function(e){return"creator"!==e.sourcePlatform&&"hellofresh"!==e.sourcePlatform}),ev=ef.map(function(e){return e.title}).filter(Boolean),ek=null!=(s=null==(i=ef[0])?void 0:i.thumbnailUrl)?s:null,ew=(0,n.useCallback)(function(){T(!0),U().catch(function(){}).finally(function(){return T(!1)})},[U]),eO=q({isCustomer:m,isAtLimit:ey,isListLoaded:N}),eS=eO.isCreatingInternal,eC=eO.arrivedAtCap,ej=eO.consumeError,ex=eO.consumeSucceeded;(0,n.useLayoutEffect)(function(){ex&&ew()},[ex,ew]),(0,n.useEffect)(function(){ej&&S(ej)},[ej,S]);var eP=function(){return b("cookbook.import.error.limit_reached",{limit:String(em),defaultValue:"You have reached the ".concat(em," recipe limit.")})},e_=function(e,t){var r=V(e);S(B(r,b)),ed(t,r)},eA=(0,n.useCallback)(function(e){var t;v(null),S(null);try{t=new URL(e.trim()).toString()}catch(e){return v(b("cookbook.import.error.invalid_url",{defaultValue:"Please enter a valid URL."})),ed(Q.hR.LinkImported,"INVALID_URL"),!1}return ey?(v(eP()),ed(Q.hR.LinkImported,"ANONYMOUS_LIMIT_REACHED"),!1):(eu(function(){var e;return ep(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,$({url:t})];case 1:return e=r.sent(),ew(),ec(Q.hR.LinkImported,e.id),[3,3];case 2:return e_(r.sent(),Q.hR.LinkImported),[3,3];case 3:return[2]}})})(),!0)},[ey,em,$,b]),eE=(0,n.useCallback)(function(e){return(v(null),S(null),ey)?(v(eP()),ed(Q.hR.PhotoImported,"ANONYMOUS_LIMIT_REACHED"),!1):e.type.startsWith("image/")?(eu(function(){var t;return ep(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,eo({file:e})];case 1:return t=r.sent(),ew(),ec(Q.hR.PhotoImported,t.id),[3,3];case 2:return e_(r.sent(),Q.hR.PhotoImported),[3,3];case 3:return[2]}})})(),!0):(v(b("cookbook.import.error.not_image",{defaultValue:"Please select an image file."})),ed(Q.hR.PhotoImported,"NOT_IMAGE"),!1)},[ey,em,eo,b]),eI=(0,n.useCallback)(function(e){if(v(null),S(null),ey)return v(eP()),ed(Q.hR.ManualImported,"ANONYMOUS_LIMIT_REACHED"),!1;var t=e.trim();return t?(eu(function(){var e;return ep(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,J({description:t})];case 1:return e=r.sent(),ew(),ec(Q.hR.ManualImported,e.id),[3,3];case 2:return e_(r.sent(),Q.hR.ManualImported),[3,3];case 3:return[2]}})})(),!0):(v(b("cookbook.import.error.empty_text",{defaultValue:"Please enter some recipe text."})),ed(Q.hR.ManualImported,"CONTENT_EMPTY"),!1)},[ey,em,J,b]),eY=(0,n.useCallback)(function(){return v(null)},[]),eR=(0,n.useCallback)((e=eu(function(e){return ep(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,et({id:e})];case 1:case 2:return t.sent(),[3,3];case 3:return[2]}})}),function(t){return e.apply(this,arguments)}),[et]);return{recipes:ef,isLoaded:N||E&&!M,importing:G||eS||ee||ei||R,importError:null!=(p=null!=y?y:null==w?void 0:w.message)?p:null,validationError:y,clearValidationError:eY,importErrorEvent:w,isAtLimit:ey,isCustomer:m,importRecipe:eA,importRecipeFromImage:eE,importRecipeFromText:eI,removeRecipe:eR,hasImportedRecipes:eg,recipeTitles:ev,firstRecipeThumbnailUrl:ek,arrivedAtCap:eC,hasMore:eb,isLoadingMore:W,loadMore:Z}};function ef(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function eb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function em(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var eh=r(225307),ey=r(307690);function eg(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function ev(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var ek=eh.z.object({id:eh.z.string(),name:eh.z.string(),imageLink:eh.z.string().optional(),imagePath:eh.z.string().optional(),websiteUrl:eh.z.string().optional(),totalTime:eh.z.string().optional(),prepTime:eh.z.string().optional(),headline:eh.z.string().optional(),description:eh.z.string().optional(),is_bookmarked:eh.z.boolean().optional(),is_community:eh.z.boolean().optional(),source_platform:ey.yg.catch("unsupported"),author:eh.z.string().optional(),is_owner:eh.z.boolean().optional()}),ew=eh.z.object({total:eh.z.number(),count:eh.z.number(),take:eh.z.number(),skip:eh.z.number(),next_page_token:eh.z.string().optional(),items:eh.z.array(ek)}),eO=function(){var e,t=(e=function(e,t){var r,o,n,i,a,l,c,u,s=arguments;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(p){switch(p.label){case 0:return o=void 0===(r=e.usePublicAuth)||r,n=e.take,i=e.skip,a=e.systemCountry,l=e.locale,c=e.parentSpan,[4,(s.length>2&&void 0!==s[2]?s[2]:m.A)("/gw/cookbook/v1/discovery/community",t,{query:ev({country:a,locale:l,hf_public_id:(0,y.Ay)()},void 0!==n&&{take:String(n)},void 0!==i&&{skip:String(i)}),parentSpan:c,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"get_community_recipes"}},{usePublicAuth:o})];case 1:return[4,p.sent().json()];case 2:return u=p.sent(),[2,ew.parse(u)]}})},function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){eg(i,o,n,a,l,"next",e)}function l(e){eg(i,o,n,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}(),eS=function(e){var t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,h.A)().fetch,i=(0,g.A)(),a=ev((t=ev({},e),r=r={usePublicAuth:!i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r}
1)(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t),(0,v.j)()),l=[k.A["cookbookDiscoveryCommunity.list"],a];return(0,b.useQuery)(l,function(){return eO(a,l,n)},ev({suspense:!1,staleTime:3e5,cacheTime:6e5},o))},eC="CookbookCommunityCarousel",ej={ctaTile:"cookbook-community-carousel-cta-tile",ctaSave:"cookbook-community-carousel-cta-save",ctaLearnHow:"cookbook-community-carousel-cta-learn-how",card:"cookbook-community-carousel-card"},ex=function(){var e=eS({take:10,skip:0}),t=(0,n.useMemo)(function(){var t,r;return null!=(r=null==(t=e.data)?void 0:t.items)?r:[]},[e.data]),r=(0,n.useMemo)(function(){return e.isLoading?"loading":e.isError?"error":0===t.length?"empty":"success"},[e.isLoading,e.isError,t.length]);return{recipes:t,status:r}},eP=r(916902),e_=r(21394),eA=r(579391);function eE(){var e,t,r=(e=["\n  display: flex;\n  align-items: center;\n  min-height: 68px;\n  cursor: text;\n  border: 1px solid\n    ",";\n  border-radius: 999px;\n  padding: 8px 16px;\n  background: #ffffff;\n  box-shadow: 0px 1px 3px rgba(35, 26, 10, 0.06);\n  gap: 10px;\n  transition: border-color 0.2s;\n\n  &:focus-within {\n    border-color: ",";\n  }\n\n  & textarea {\n    flex: 1;\n    border: none;\n    outline: none;\n    font-family: 'Roboto', sans-serif;\n    font-size: 17px;\n    line-height: 20px;\n    background: transparent;\n    min-width: 0;\n    resize: none;\n    padding: 0;\n    field-sizing: content;\n    max-height: 60px;\n    overflow-y: auto;\n    overflow-x: hidden;\n    white-space: nowrap;\n    scrollbar-width: none;\n\n    &::-webkit-scrollbar {\n      display: none;\n    }\n\n    &::placeholder {\n      color: #656565;\n    }\n  }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return eE=function(){return r},r}var eI=(0,eA.Ay)(s.az).withConfig({componentId:"sc-b39ae449-0"})(eE(),function(e){var t,r,o,n,i=e.$hasError,a=e.theme;return i?(null==(r=a.colors)||null==(t=r.error)?void 0:t[600])||"#d32f2f":(null==(n=a.colors)||null==(o=n.neutral)?void 0:o[300])||"#e0e0e0"},function(e){var t,r,o,n,i=e.$hasError,a=e.theme;return i?(null==(r=a.colors)||null==(t=r.error)?void 0:t[600])||"#d32f2f":(null==(n=a.colors)||null==(o=n.neutral)?void 0:o[500])||"#656565"}),eY=r(13446);let eR=function(e){var t=e.onClick,r=e.isDisabled,n=(0,L.Ay)("cookbook").translateRaw;return(0,o.FD)(s.az,{as:"button",type:"button",display:"flex",alignItems:"center",flexShrink:"0",gap:"global.xxs",bg:"transparent",borderWidth:"0",cursor:"pointer",opacity:r?"0.5":"1",color:"neutral.800",disabled:r,onClick:t,"data-test-id":"cookbook-import-paste-button",children:[(0,o.Y)(s.In,{icon:(0,o.Y)(eY.default,{}),color:"inherit"}),(0,o.Y)(s.EY,{type:"body-sm-bold",color:"inherit",children:n("cookbook.import.input.paste_button",{defaultValue:"Paste"})})]})};var eT=r(624281),eD=r(863421),ez=r(212746),eL=r(469278),eF=r(745734),eM=function(){var e=(0,X.$T)().trackJanusEvent,t=(0,n.useRef)(!1),r=(0,n.useCallback)(function(e,t){try{t()}catch(t){(0,eT.Cp)(t,{tags:{event:e,component:"useImportInputTracking"}})}},[]);return{trackUploadPhotoClick:(0,n.useCallback)(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{componentName:"cookbook-import-photo-button",componentLabel:"Upload photo"},o=t.componentName,n=t.componentLabel;r("Cookbook_Start_Import_Button_Click",function(){return e(eD.M1.janusEvent({uiComponent:eD.M1.uiComponent({uiComponentName:o,uiComponentLabel:n}),uiModal:eD.M1.uiModal({uiModalName:eD.Fj.Photo})}))})},[r,e]),trackInputFieldFocus:(0,n.useCallback)(function(){t.current||(t.current=!0,r("Cookbook_Start_Import_InputField_Click",function(){return e(eL._.janusEvent())}))},[r,e]),trackImportSubmitClick:(0,n.useCallback)(function(){r("Cookbook_Save_Recipe_Button_Click",function(){return e(eF.M8.janusEvent({cookbookRecipeAction:eF.M8.cookbookRecipeAction({recipeId:"",recipeImportMethod:eF.hR.LinkImported})}))})},[r,e]),trackTextImportClick:(0,n.useCallback)(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{componentName:"cookbook-add-recipe
1-dialog-paste-text-button",componentLabel:"Paste recipe text"},o=t.componentName,n=t.componentLabel;r("Cookbook_Start_Import_Button_Click",function(){return e(ez.M1.janusEvent({uiComponent:ez.M1.uiComponent({uiComponentName:o,uiComponentLabel:n,uiComponentPosition:null}),uiModal:ez.M1.uiModal({uiModalName:ez.Fj.RecipeAddMenu})}))})},[r,e])}};function eN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function eU(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}var eV="image/jpeg,image/png,image/webp,image/heic",eB=function(e){var t,r,o,i=e.onImport,a=e.onImageImport,l=(0,L.Ay)("cookbook").translateRaw,c=(t=(0,n.useState)(""),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return eN(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eN(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],s=c[1],p=(0,n.useRef)(null),d=!a,f=eM(),b=f.trackUploadPhotoClick,m=f.trackInputFieldFocus,h=f.trackImportSubmitClick,y=(r=function(){var e,t,r;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,3,4]),[4,null==(e=navigator.clipboard)?void 0:e.readText()];case 1:return(t=o.sent())&&s(t),[3,4];case 2:return o.sent(),[3,4];case 3:return null==(r=document.getElementById("cookbook-import-url-input"))||r.focus(),[7];case 4:return[2]}})},o=function(){var e=this,t=arguments;return new Promise(function(o,n){var i=r.apply(e,t);function a(e){eU(i,o,n,a,l,"next",e)}function l(e){eU(i,o,n,a,l,"throw",e)}a(void 0)})},function(){return o.apply(this,arguments)}),g=d?l("cookbook.import.add_recipe_dialog.input_placeholder",{defaultValue:"Paste your link here"}):l("cookbook.import.save_bar.placeholder"),v=l("cookbook.import.input.upload_photo_aria_label")||"Upload a photo of a recipe",k=l("cookbook.import.input.label")||"Paste a recipe link",w=l("cookbook.import.save_bar.submit");return{data:{value:u,isDialogVariant:d,fileInputRef:p},translations:{placeholder:g,photoAriaLabel:v,fileInputAriaLabel:"".concat(v," (JPEG, PNG, WebP, or HEIC)"),inputLabel:k,submitLabel:w},handlers:{setValue:s,handlePillClick:function(e){var t,r=e.target;"BUTTON"===r.tagName||r.closest("button")||null==(t=document.getElementById("cookbook-import-url-input"))||t.focus()},handleSubmit:function(e){e.preventDefault(),u.trim()&&(h(),i(u.trim()),s(""))},handleFileChange:function(e){var t,r=null==(t=e.target.files)?void 0:t[0];r&&(null==a||a(r)),p.current&&(p.current.value="")},handleUploadPhotoClick:function(){var e;b(),null==(e=p.current)||e.click()},handleClipboardPaste:y,trackInputFieldFocus:m}}},eH=(0,n.forwardRef)(function(e,t){var r=e.onImport,n=e.onImageImport,i=e.isLoading,a=e.isDisabled,l=e.error,c=eB({onImport:r,onImageImport:n}),u=c.data,p=c.translations,d=c.handlers,f=u.value,b=u.isDialogVariant,m=u.fileInputRef,h=p.placeholder,y=p.p
1hotoAriaLabel,g=p.fileInputAriaLabel,v=p.inputLabel,k=p.submitLabel,w=d.setValue,O=d.handlePillClick,S=d.handleSubmit,C=d.handleFileChange,j=d.handleUploadPhotoClick,x=d.handleClipboardPaste,P=d.trackInputFieldFocus;return(0,o.FD)(s.az,{as:"form",onSubmit:S,children:[(0,o.FD)(s.az,{display:"flex",flexDirection:b?"column":["column","row"],gap:"global.md-1",alignItems:b?"stretch":["stretch","center"],children:[(0,o.FD)(eI,{flex:"1",$hasError:!!l,onClick:O,children:[(0,o.Y)(s.In,{icon:(0,o.Y)(eP.default,{}),color:"neutral.600"}),(0,o.Y)("label",{htmlFor:"cookbook-import-url-input",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"},children:v}),(0,o.Y)("textarea",{ref:t,id:"cookbook-import-url-input",rows:1,placeholder:h,value:f,onChange:function(e){return w(e.target.value)},onFocus:P,disabled:a||i,autoComplete:"off","aria-describedby":l?"cookbook-import-error":void 0,"data-test-id":"cookbook-import-url-input"}),n?(0,o.Y)(s.K0.Tertiary,{icon:(0,o.Y)(e_.default,{}),size:"sm",type:"button",disabled:a||i,onClick:j,"aria-label":y,"data-test-id":"cookbook-import-photo-button"}):(0,o.Y)(eR,{onClick:x,isDisabled:a||i})]}),(0,o.Y)(s.az,{flexShrink:b?void 0:"0",width:b?"100%":void 0,children:(0,o.Y)(s.$n.Primary,{type:"submit",width:b?"100%":"auto",disabled:!f.trim()||a||i,loading:i,"data-test-id":"cookbook-import-submit-button",children:k})})]}),l&&(0,o.Y)(s.az,{mt:"global.xs",px:"global.sm-2",id:"cookbook-import-error",role:"alert",children:(0,o.Y)(s.EY,{type:"body-sm-regular",color:"error.600",children:l})}),n&&(0,o.Y)("input",{ref:m,type:"file",accept:eV,onChange:C,"aria-label":g,style:{display:"none"},"data-test-id":"cookbook-import-file-input"})]})}),eZ=r(670617);let eW=function(e){var t=e.onClick,r=(0,L.Ay)("cookbook").translateRaw,n=(0,o.Y)(s.$n.Primary,{leadingIcon:(0,o.Y)(eZ.default,{}),width:"auto",onClick:t,"data-test-id":"cookbook-save-recipe-cta",size:"lg",children:r("cookbook.import.save_bar.submit")});return(0,o.FD)(o.FK,{children:[(0,o.Y)(s.az,{display:["block","none"],position:"fixed",right:"16px",bottom:"24px",zIndex:100,color:"global.white",whiteSpace:"nowrap","data-test-id":"cookbook-save-recipe-cta-wrapper",children:n}),(0,o.Y)(s.az,{display:["none","block"],flexShrink:"0",whiteSpace:"nowrap",children:n})]})};
1var eK=r(490089),e$={IMAGE:"cookbook-add-recipe-dialog-action-card-image"};let eG=function(e){var t=e.imageSrc,r=e.label,n=e.onClick,i=e.isDisabled,a=void 0!==i&&i,l=e.testId;return(0,o.FD)(s.az,{as:"button",type:"button",display:"flex",alignItems:"center",gap:"global.sm-2",width:"100%",p:"global.sm-2",minHeight:"72px",backgroundColor:"alias.elevation.level-1",borderRadius:"border-radius-lg",borderStyle:"none",cursor:a?"default":"pointer",opacity:a?"0.5":"1",textAlign:"left",disabled:a,onClick:n,"data-test-id":l,children:[(0,o.Y)("img",{src:t,width:40,height:40,alt:"","aria-hidden":"true",style:{flexShrink:0},"data-test-id":e$.IMAGE}),(0,o.Y)(s.EY,{type:"body-md-bold",color:"neutral.800",children:r})]})};var eq={photo:"https://www.hellofresh.com/assets/hellofresh/cookbook/import/import-photo-icon.webp",text:"https://www.hellofresh.com/assets/hellofresh/cookbook/import/import-text-icon.webp"},eX={BUTTON:"cookbook-add-recipe-dialog-upload-image-button",FILE_INPUT:"cookbook-add-recipe-dialog-upload-image-file-input"},eQ={componentName:eX.BUTTON,componentLabel:"Upload image"};let eJ=function(e){var t=e.onImageImport,r=e.isDisabled,i=(0,L.Ay)("cookbook").translateRaw,a=(0,n.useRef)(null),l=eM().trackUploadPhotoClick,c=i("cookbook.import.add_recipe_dialog.upload_image.card_title",{defaultValue:"Save from image"}),u=i("cookbook.import.input.upload_photo_aria_label")||"Upload a photo of a recipe";return(0,o.FD)(o.FK,{children:[(0,o.Y)(eG,{imageSrc:eq.photo,label:c,onClick:function(){var e;l(eQ),null==(e=a.current)||e.click()},isDisabled:r,testId:eX.BUTTON}),(0,o.Y)("input",{ref:a,type:"file",accept:eV,onChange:function(e){var r,o=null==(r=e.target.files)?void 0:r[0];o&&t(o),a.current&&(a.current.value="")},"aria-label":"".concat(u," (JPEG, PNG, WebP, or HEIC)"),style:{display:"none"},"data-test-id":eX.FILE_INPUT})]})};var e0=r(134125),e1="40px";let e2=function(e){var t=e.title,r=e.subtitle,n=e.onBack,i=e.backAriaLabel,a=e.backTestId,l=e.titleTestId;return(0,o.FD)(s.az,{display:"flex",alignItems:"flex-start",gap:"global.sm-1",width:"100%",children:[(0,o.Y)(s.az,{as:"button",type:"button",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:e1,height:e1,borderRadius:"border-radius-lg",backgroundColor:"alias.brand.background.lighter",borderStyle:"none",cursor:"pointer","aria-label":i,onClick:n,"data-test-id":a,children:(0,o.Y)(s.In,{icon:(0,o.Y)(e0.default,{}),color:"alias.brand.foreground.default"})}),(0,o.FD)(s.az,{display:"flex",flexDirection:"column",flex:"1",children:[(0,o.Y)(s.EY,{as:"h2",type:"body-xl-bold","data-test-id":l,children:t}),r&&(0,o.Y)(s.EY,{as:"p",type:"body-md-regular",color:"neutral.500",children:r})]})]})};function e4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function e3(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}
1var e6={BACK:"cookbook-add-recipe-dialog-paste-text-back",TITLE:"cookbook-add-recipe-dialog-paste-text-title",TEXT_INPUT:"cookbook-add-recipe-dialog-paste-text-input",PASTE:"cookbook-add-recipe-dialog-paste-text-paste",SUBMIT:"cookbook-add-recipe-dialog-paste-text-submit"};let e5=function(e){var t,r,i,a=e.onTextImport,l=e.onBack,c=e.isDisabled,u=(0,L.Ay)("cookbook").translateRaw,p=(t=(0,n.useState)(""),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return e4(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e4(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=p[0],f=p[1],b=(0,n.useRef)(null);(0,n.useEffect)(function(){var e;null==(e=b.current)||e.focus()},[]);var m=u("cookbook.import.add_recipe_dialog.paste_text.title",{defaultValue:"Paste recipe text"}),h=u("cookbook.import.add_recipe_dialog.paste_text.subtitle",{defaultValue:"Drop in a full recipe and we'll tidy it."}),y=u("cookbook.import.add_recipe_dialog.paste_text.placeholder",{defaultValue:"Paste the recipe text here…"}),g=u("cookbook.import.input.paste_button",{defaultValue:"Paste"}),v=u("cookbook.import.add_recipe_dialog.paste_text.save",{defaultValue:"Save recipe"}),k=u("cookbook.import.add_recipe_dialog.paste_text.back",{defaultValue:"Back"}),w=d.trim().length,O=w>0&&w<100,S=0===w||O,C=(r=function(){var e,t;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,null==(e=navigator.clipboard)?void 0:e.readText()];case 1:return(t=r.sent())&&f(t),[3,3];case 2:return r.sent(),[3,3];case 3:return[2]}})},i=function(){var e=this,t=arguments;return new Promise(function(o,n){var i=r.apply(e,t);function a(e){e3(i,o,n,a,l,"next",e)}function l(e){e3(i,o,n,a,l,"throw",e)}a(void 0)})},function(){return i.apply(this,arguments)});return(0,o.FD)(s.az,{as:"form",display:"flex",flexDirection:"column",width:"100%",gap:"global.sm-1",onSubmit:function(e){e.preventDefault(),S||(a(d.trim()),f(""))},children:[(0,o.Y)(e2,{title:m,subtitle:h,onBack:l,backAriaLabel:k,backTestId:e6.BACK,titleTestId:e6.TITLE}),(0,o.FD)(s.az,{position:"relative",width:"100%",pt:"global.sm-2",pb:"global.sm-1",px:"global.xxs",__dangerouslySetCustomCSS:{textarea:{paddingBottom:"48px"}},children:[(0,o.Y)(s.fs,{ref:b,value:d,onChange:function(e){return f(e.target.value)},placeholder:y,rows:7,error:O,disabled:c,"data-test-id":e6.TEXT_INPUT}),(0,o.Y)(s.az,{position:"absolute",right:"global.sm-2",bottom:"global.sm-2","data-test-id":e6.PASTE,children:(0,o.FD)(s.az,{as:"button",type:"button",display:"flex",alignItems:"center",gap:"global.xxs",bg:"transparent",borderWidth:"0",cursor:c?"default":"pointer",opacity:c?"0.5":"1",color:"alias.brand.foreground.default",disabled:c,onClick:C,children:[(0,o.Y)(s.In,{icon:(0,o.Y)(eY.default,{}),color:"alias.brand.foreground.default"}),(0,o.Y)(s.EY,{type:"body-sm-bold",color:"inherit",children:g})]})})]}),O&&(0,o.FD)(s.EY,{type:"body-sm-regular",color:"error.600","aria-live":"polite",children:[w,"/",100," min. characters"]}),(0,o.Y)(s.$n.Primary,{type:"submit",width:"100%",disabled:S||c,"data-test-id":e6.SUBMIT,children:v})]})};
1var e8={BUTTON:"cookbook-add-recipe-dialog-paste-text-button"},e7={componentName:e8.BUTTON,componentLabel:"Paste recipe text"};let e9=function(e){var t=e.onExpand,r=e.isDisabled,n=(0,L.Ay)("cookbook").translateRaw,i=eM().trackTextImportClick,a=n("cookbook.import.add_recipe_dialog.paste_text.title",{defaultValue:"Paste recipe text"});return(0,o.Y)(eG,{imageSrc:eq.text,label:a,onClick:function(){i(e7),t()},isDisabled:r,testId:e8.BUTTON})};function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var tt={SCREEN:"cookbook-add-recipe-dialog",TITLE:"cookbook-add-recipe-dialog-title",SUBTITLE:"cookbook-add-recipe-dialog-subtitle",BODY:"cookbook-add-recipe-dialog-body",DIVIDER:"cookbook-add-recipe-dialog-divider"};let tr=function(e){var t,r=e.isOpen,i=e.onClose,a=e.onImport,l=e.onImageImport,c=e.onTextImport,u=e.isLoading,p=e.isDisabled,d=e.error,f=e.urlInputRef,b=(0,L.Ay)("cookbook").translateRaw,m=(0,eK.kW)(),h=(0,n.useRef)(null),y=(t=(0,n.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return te(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return te(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=y[0],v=y[1];(0,n.useEffect)(function(){r||v(!1)},[r]);var k=b("cookbook.import.add_recipe_dialog.title",{defaultValue:"Add a recipe"}),w=b("cookbook.import.add_recipe_dialog.subtitle",{defaultValue:"Paste a link from any recipe site."}),O=b("cookbook.import.add_recipe_dialog.field_label",{defaultValue:"Paste recipe URL"}),S=b("cookbook.import.add_recipe_dialog.divider",{defaultValue:"or"}),C=(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"global.xs","data-test-id":tt.BODY,children:[(0,o.Y)(s.EY,{as:"h2",type:"body-xl-bold","data-test-id":tt.TITLE,children:k}),(0,o.Y)(s.EY,{as:"p",type:"body-md-regular",color:"neutral.500","data-test-id":tt.SUBTITLE,children:w}),(0,o.FD)(s.az,{width:"100%",mt:"global.xs",children:[(0,o.Y)(s.EY,{as:"p",type:"body-sm-bold",mb:"global.xxs",children:O}),(0,o.Y)(eH,{ref:f,onImport:a,isLoading:u,isDisabled:p,error:d})]}),(0,o.FD)(s.az,{display:"flex",alignItems:"center",gap:"global.sm-1",width:"100%",my:"global.xs","data-test-id":tt.DIVIDER,children:[(0,o.Y)(s.az,{flex:"1",height:"1px",bg:"neutral.300"}),(0,o.Y)(s.EY,{type:"body-sm-regular",color:"neutral.500",children:S}),(0,o.Y)(s.az,{flex:"1",height:"1px",bg:"neutral.300"})]}),(0,o.Y)(eJ,{onImageImport:l,isDisabled:p||u}),(0,o.Y)(s.az,{mt:"global.sm-1",width:"100%",children:(0,o.Y)(e9,{onExpand:function(){return v(!0)},isDisabled:p||u})})]}),j=(0,o.Y)(e5,{onTextImport:c,onBack:function(){return v(!1)},isDisabled:p||u}),x=g?j:C;return"mobile"===m?(0,o.Y)(s._s.Container,{isModal:!0,isOpen:r,placement:"bottom",width:"100%",backgroundColor:"global.white",returnFocusRef:h,onClose:i,onDismiss:i,isTouchMoveEnabled:!0,positionAbsoluteCloseButton:!0,"aria-label":k,"data-test-id":tt.SCREEN,children:x}):(0,o.Y)(s.lG,{isOpen:r,onClose:i,onDismiss:i,headless:!0,hasCloseButton:!0,width:["100%","100%","480px"],customBackgroundColor:"global.white",dialogCustomOverflow:"auto",dialogBodyMinHeight:["100%","100%","auto"],padding:["global.md-1","global.md-1","global.md-2"],"aria-label":k,"data-test-id":tt.SCREEN,children:x})};var to=r(655764),tn=r(21691);let ti=function(){return(0,o.Y)(to.A,{customFilter:function(e){var t;return!!(null==(t=e.meta)?void 0:t.isCookbookImportNotification)},children:(0,o.Y)(tn.A,{})})};var ta=r(818864),tl=r(633490),tc="cookbook-import-error-notification",tu=function(){return(0,ta.s_)(function(e){return e.id===tc})},ts=function(e,t){(0,n.useEffect)(function(){if(!t||!e)return void tu();(0,ta.z8)(tl.Ay.create(e.message,tc,{type:tl._n.error,overrideId:tc,meta:{isCookbookImportNotification:!0}
1}))},[e,t]),(0,n.useEffect)(function(){return tu},[])};let tp=function(){var e=(0,L.Ay)("cookbook").translateRaw;return(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",py:"global.xl-2",px:"global.md-2",textAlign:"center","data-test-id":"cookbook-import-empty-state",children:[(0,o.Y)(s.az,{mb:"global.sm-2",children:(0,o.Y)("span",{"aria-hidden":"true",style:{fontSize:"64px"},children:"\uD83C\uDF73"})}),(0,o.Y)(s.EY,{as:"h2",type:"body-lg-bold",mb:"global.xxs",children:e("cookbook.import.empty_state.title")||"Save recipes from anywhere"}),(0,o.Y)(s.az,{maxWidth:"420px",children:(0,o.Y)(s.EY,{type:"body-md-regular",color:"neutral.500",children:e("cookbook.import.empty_state.body")||"Paste a link to any recipe you find online — from food blogs, YouTube, Instagram, TikTok, and more."})})]})};var td=r(848299),tf=r(60515),tb=function(e){var t=(0,X.$T)().trackJanusEvent,r=(0,n.useRef)(!1),o=(0,n.useCallback)(function(e,t){try{t()}catch(t){(0,eT.Cp)(t,{tags:{event:e,component:"useEducationBannerTracking"}})}},[]);return(0,n.useEffect)(function(){r.current||(r.current=!0,o("Cookbook_Card_RecipeImportTutorial_Impression",function(){return t(td.r.janusEvent({uiComponent:td.r.uiComponent({uiComponentName:"EducationHeroBanner",uiComponentLabel:e})}))}))},[o,t,e]),{trackCtaClick:(0,n.useCallback)(function(){o("Cookbook_Start_Import_Button_Click",function(){return t(tf.M1.janusEvent({uiComponent:tf.M1.uiComponent({uiComponentName:"StartImportButton",uiComponentLabel:e,uiComponentPosition:null}),uiModal:tf.M1.uiModal({uiModalName:tf.Fj.RecipeImportTutorial})}))})},[o,t,e])}},tm=r(996708),th=r(392621),ty=r(88620),tg=r(304578);function tv(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tk(){var e=tv(["\n  background: var(--color-brand-foreground-default, #067a46);\n  border-radius: 24px;\n"]);return tk=function(){return e},e}function tw(){var e=tv(["\n  color: var(--color-accent-default, #bbf06a);\n"]);return tw=function(){return e},e}function tO(){var e=tv(["\n  background: var(--color-brand-background-lighter, #e4fabf);\n  border: 1px solid rgba(0, 0, 0, 0.06);\n  box-shadow: 0px 2px 6px rgba(2, 40, 20, 0.1);\n  border-radius: 14px;\n"]);return tO=function(){return e},e}function tS(){var e=tv(["\n  width: 40px;\n  height: 40px;\n  border-radius: 11px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background: ",";\n"]);return tS=function(){return e},e}function tC(){var e=tv(["\n  background: #ffffff;\n  color: #242424;\n  border-radius: 8px;\n  width: 100%;\n\n  @media (min-width: 768px) {\n    width: auto;\n    min-width: 88px;\n  }\n\n  &:hover {\n    background: #f5f5f5;\n  }\n"]);return tC=function(){return e},e}function tj(){var e=tv(["\n  color: #e4fabf;\n  letter-spacing: 0.08em;\n  text-transform: uppercase;\n"]);return tj=function(){return e},e}function tx(){var e=tv(["\n  color: #656565;\n  letter-spacing: 0.08em;\n"]);return tx=function(){return e},e}function tP(){var e=tv(["\n  opacity: 0.55;\n"]);return tP=function(){return e},e}var t_=(0,eA.Ay)(s.az).withConfig({componentId:"sc-3c1b48ba-0"})(tk()),tA=eA.Ay.span.withConfig({componentId:"sc-3c1b48ba-1"})(tw()),tE=(0,eA.Ay)(s.az).withConfig({componentId:"sc-3c1b48ba-2"})(tO()),tI=(0,eA.Ay)(s.az).withConfig({componentId:"sc-3c1b48ba-3"})(tS(),function(e){return"done"===e.$variant?"var(--color-brand-foreground-default, #067a46)":"#faf8f3"}),tY=(0,eA.Ay)(s.$n.Primary).withConfig({componentId:"sc-3c1b48ba-4"})(tC()),tR=(0,eA.Ay)(s.EY).withConfig({componentId:"sc-3c1b48ba-5"})(tj()),tT=(0,eA.Ay)(s.EY).withConfig({componentId:"sc-3c1b48ba-6"})(tx()),tD=(0,eA.Ay)(s.az).withConfig({componentId:"sc-3c1b48ba-7"})(tP()),tz=[{labelKey:"step_1_label",titleKey:"step_1_title",icon:tm.default,variant:"default"},{labelKey:"step_2_label",titleKey:"step_2_title",icon:th.default,variant:"default"},{labelKey:"step_3_label",titleKey:"step_3_title",icon:ty.default,variant:"done"}];let tL=function(e){var t=e.onCtaClick,r=(0,L.Ay)("cookbook").translateRaw,i=r("cookbook.import.education.hero.eyebrow"),a=r("cookbook.import.education.hero.headline"),l=r("cookbook.import.education.hero.body"),c=r("cookbook.import.education.hero.cta"),u=tb(c).trackCtaClick;
1return(0,o.Y)("section",{"aria-label":i,"data-test-id":"cookbook-education-hero-banner",children:(0,o.FD)(t_,{display:"flex",flexDirection:["column","row"],alignItems:["stretch","center"],p:["global.md-2","global.lg-1"],gap:["global.md-2","global.md-2"],children:[(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"global.sm-1",flex:"1",children:[(0,o.Y)(tR,{type:"body-xs-bold",children:i}),(0,o.Y)(s.EY,{type:"display-lg",strong:!0,color:"global.white",children:a.split(/(<em>.*?<\/em>)/).map(function(e,t){var r=e.match(/^<em>(.*)<\/em>$/);return r?(0,o.Y)(tA,{children:r[1]},t):e})}),(0,o.Y)(s.EY,{type:"body-md-regular",color:"global.white",children:l}),(0,o.Y)(s.az,{mt:"global.sm-2",alignSelf:["stretch","flex-start"],children:(0,o.Y)(tY,{onClick:function(){u(),t()},children:c})})]}),(0,o.Y)(s.az,{display:"flex",flexDirection:"column",alignItems:["stretch","center"],gap:"global.xxs-2","aria-hidden":"true",children:tz.map(function(e,t){return(0,o.FD)(n.Fragment,{children:[t>0&&(0,o.Y)(s.az,{display:"flex",justifyContent:"center",py:"global.none",children:(0,o.Y)(tD,{children:(0,o.Y)(s.In,{icon:(0,o.Y)(tg.default,{}),color:"global.white"})})}),(0,o.FD)(tE,{display:"flex",flexDirection:"row",alignItems:"center",p:"global.sm-1",gap:"global.sm-1",width:["100%","320px"],children:[(0,o.Y)(tI,{$variant:e.variant,children:(0,o.Y)(s.In,{icon:(0,o.Y)(e.icon,{}),color:"done"===e.variant?"global.white":"alias.brand.foreground.default"})}),(0,o.FD)(s.az,{display:"flex",flexDirection:"column",gap:"global.none",children:[(0,o.Y)(tT,{type:"body-xs-bold",children:r("cookbook.import.education.hero.".concat(e.labelKey))}),(0,o.Y)(s.EY,{type:"body-md-bold",color:"neutral.800",children:r("cookbook.import.education.hero.".concat(e.titleKey))})]})]})]},e.labelKey)})})]})})};var tF=r(10597),tM=r(352396);function tN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var tU="hf_cookbook_trust_strip_dismissed_v1";let tV=function(){var e,t=(0,L.Ay)("cookbook").translateRaw,r=(0,tM.k)(),i=(e=(0,n.useState)(function(){return"1"===r.getItem(tU)}),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return tN(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tN(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1];if(a)return null;var c=t("cookbook.import.trust_strip.lead",{defaultValue:"What's next?"}),u=t("cookbook.import.trust_strip.body",{defaultValue:"Save another recipe from Instagram, TikTok, YouTube, or Pinterest—or browse recipes from HelloFresh creators."}),p=t("cookbook.import.trust_strip.close",{defaultValue:"Dismiss"});return(0,o.FD)(s.vM,{variant:"neutral",icon:(0,o.Y)(tF.default,{}),onClose:function(){r.setItem(tU,"1"),l(!0)},closeLabel:p,"data-test-id":"cookbook-import-platform-trust-strip",children:[(0,o.Y)(s.EY,{as:"span",type:"body-md-bold",children:c})," ",u]})};var tB=r(227336),tH=r(750523),tZ=r(456935),tW=r(191697),tK=r(693128),t$="AllSaved",tG="CookbookSavedRecipesCarousel",tq=function(e,t,r){try{r()}catch(r){(0,eT.Cp)(r,{tags:{event:e,component:t}})}},tX=function(){var e=(0,X.$T)().trackJanusEvent;return{trackSavedRecipeCardClick:(0,n.useCallback)(function(t){var r=t.recipeId,o=t.uiComponentName,n=t.uiComponentLabel;tq("Cookbook_View_Recipe_Card_Click","useCookbookGridTracking",function(){e(tH.kx.janusEvent({cookbookCollectionStateEntities:[tH.kx.cookbookCollectionState({collectionId:t$,collectionName:tH.EO.AllSaved}
1)],cookbookRecipeState:tH.kx.cookbookRecipeState({recipeId:r}),uiComponent:tH.kx.uiComponent({uiComponentName:o,uiComponentLabel:n})}))})},[e]),trackDeleteRecipeIconClick:(0,n.useCallback)(function(t){var r=t.recipeId;tq("Cookbook_Delete_Recipe_Icon_Click","useCookbookGridTracking",function(){e(tZ.Ry.janusEvent({event:tZ.Ry.event({actionType:tZ.X2.Click,interactionType:tZ.X8.Delete,target:tZ.We.Recipe,uiElementType:tZ.pG.Icon}),cookbookCollectionState:tZ.Ry.cookbookCollectionState({collectionId:t$,collectionName:tZ.EO.AllSaved}),cookbookRecipeState:tZ.Ry.cookbookRecipeState({recipeId:r})}))})},[e]),trackSavedCarouselImpression:(0,n.useCallback)(function(){tq("Cookbook_Carousel_CookbookCollection_Impression","useCookbookGridTracking",function(){e(tW.Jf.janusEvent({event:tW.Jf.event({impressionType:tW.eK.ScrolledTo}),cookbookCollectionState:tW.Jf.cookbookCollectionState({collectionId:t$,collectionName:tW.EO.AllSaved}),uiComponent:tW.Jf.uiComponent({uiComponentName:tG,uiComponentLabel:null})}))})},[e]),trackRecipeCardImpression:(0,n.useCallback)(function(t){var r=t.recipeId,o=t.uiComponentLabel;tq("Cookbook_Card_Recipe_Impression","useCookbookGridTracking",function(){e(tK.W.janusEvent({cookbookCollectionState:tK.W.cookbookCollectionState({collectionId:t$}),cookbookRecipeState:tK.W.cookbookRecipeState({recipeId:r}),uiComponent:tK.W.uiComponent({uiComponentName:tG,uiComponentLabel:o})}))})},[e])}},tQ=r(844725),tJ=r(328846),t0="https://media.hellofresh.com/hellofresh-website/cookbook/landing-page",t1={instagram:"Instagram",tiktok:"TikTok",pinterest:"Pinterest",youtube:"YouTube",facebook:"Facebook",hellofresh:"HelloFresh"},t2={instagram:"".concat(t0,"/app-instagram-bw.png"),tiktok:"".concat(t0,"/app-tiktok-bw.png"),facebook:"".concat(t0,"/app-facebook-bw.png")},t4=function(e){if(!e||""===e.trim())return null;try{return new URL(e).hostname.replace(/^www\./,"")}catch(e){return null}},t3=function(e,t,r,o){if("creator"===e&&(null==o?void 0:o.trim()))return{label:o.trim(),iconUrl:null};var n,i=e&&t1[e];if(i)return{label:i,iconUrl:null!=(n=e&&t2[e])?n:null};var a=t4(t);return a?{label:a,iconUrl:null}:{label:r,iconUrl:null}},t6=r(102767),t5=r(827056),t8=function(){var e=(0,X.$T)().trackJanusEvent;return{trackStartDeletionButtonClick:(0,n.useCallback)(function(t){var r;e(t6.H_.janusEvent({recipeView:t6.H_.recipeView({authorId:null,authorName:null!=(r=t.authorName)?r:null,recipeId:t.id,recipeSourceType:(0,t5.T)(t.sourcePlatform),recipeTags:[]})}))},[e])}},t7=new Set,t9=function(e){try{var t=new URL(e,"https://hellofresh.com");return"".concat(t.pathname).concat(t.search).concat(t.hash)}catch(e){return null}};let re=function(e){var t=e.recipe,r=e.onRemove,i=(0,L.Ay)("cookbook").translateRaw,a=tX(),l=a.trackSavedRecipeCardClick,c=a.trackDeleteRecipeIconClick,u=a.trackRecipeCardImpression,p=t8().trackStartDeletionButtonClick,d="creator"===t.sourcePlatform||"hellofresh"===t.sourcePlatform?t9(t.url):null,f=null!=d?d:"/cookbook/import/".concat(t.id),b=i("cookbook.import.card.your_recipe")||"Your recipe",m=t3(t.sourcePlatform,t.url,b,t.authorName),h=i("cookbook.import.card.link_aria_label",{title:t.title,hostname:m.label})||"".concat(t.title," from ").concat(m.label),y=i("cookbook.import.card.remove_aria_label",{title:t.title})||"Remove ".concat(t.title),g=(0,tB.Wx)({threshold:1,triggerOnce:!0}),v=g.ref,k=g.inView;return(0,n.useEffect)(function(){!k||t7.has(t.id)||(t7.add(t.id),u({recipeId:t.id,uiComponentLabel:m.label}))},[k,t.id,m.label,u]),(0,o.FD)(s.az,{ref:v,position:"relative",height:"100%","data-test-id":"cookbook-import-recipe-card",children:[(0,o.Y)(s.Zp.Navigation,{variant:"elevated",href:f,padding:"global.none",display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden","aria-label":h,onClick:function(){l({recipeId:t.id,uiComponentName:tG,uiComponentLabel:m.label})},children:(0,o.FD)(s.az,{display:"flex",flexDirection:"column",height:"100%",width:"100%",children:[(0,o.Y)(s.az,{position:"relative",width:"100%",height:"180px",flexShrink:0,backgroundColor:"shared-alias.neutral.background.default",children:t.thumbnailUrl?(0,o.Y)(tJ.Ay,{src:t.thumbnailUrl,alt:"",fill:!0,unoptimized:!0,style:{objectFit:"cover"}}):(0,o.Y)(s.az,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",children:(0,o.Y)(s.EY,{as:"span",type:"display-md","aria-hidden":!0,
1children:"\uD83C\uDF7D️"})})}),(0,o.FD)(s.az,{p:"global.sm-2",display:"flex",flexDirection:"column",flexGrow:1,gap:"global.xs",children:[(0,o.Y)(s.EY,{as:"span",type:"body-md-bold",overflow:"hidden",textOverflow:"ellipsis",children:t.title}),(0,o.Y)(s.az,{marginTop:"auto",alignSelf:"flex-start",children:(0,o.Y)(s.dS,{size:"sm",type:"subtle",leadingIcon:m.iconUrl?(0,o.Y)(tJ.Ay,{src:m.iconUrl,alt:"",width:16,height:16,unoptimized:!0}):(0,o.Y)(tQ.A,{"aria-hidden":!0}),children:m.label})})]})]})}),(0,o.Y)(s.az,{position:"absolute",top:"global.sm-1",right:"global.sm-1",zIndex:"1",children:(0,o.Y)(s.Jn,{placement:"over-assets","aria-label":y,onClick:function(e){e.preventDefault(),e.stopPropagation(),c({recipeId:t.id}),p(t),r(t.id)},"data-test-id":"cookbook-import-remove-button"})})]})};function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function rr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function ro(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var rn={background:"linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%)",backgroundSize:"200% 100%",animation:"shimmer 1.4s infinite"},ri={borderRadius:"8px",overflow:"hidden",backgroundColor:"white",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.08)"},ra=[{key:"cookbook.import.loading.scanning",fallback:"Scanning the source",durationMs:3500},{key:"cookbook.import.loading.collecting",fallback:"Collecting recipe info",durationMs:2800},{key:"cookbook.import.loading.cleaning",fallback:"Cleaning up ingredients & steps",durationMs:6500},{key:"cookbook.import.loading.almost_done",fallback:"Almost done",durationMs:0}];let rl=function(){var e,t=(0,L.Ay)("cookbook").translateRaw,r=(e=(0,n.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return rt(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rt(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],a=r[1];(0,n.useEffect)(function(){if(("function"!=typeof window.matchMedia||!window.matchMedia("(prefers-reduced-motion: reduce)").matches)&&!(i>=ra.length-1)){var e=setTimeout(function(){a(function(e){return e+1})},ra[i].durationMs);return function(){return clearTimeout(e)}}},[i]);var l=ra[i],c=t(l.key)||l.fallback;return(0,o.FD)(o.FK,{children:[(0,o.Y)("style",{children:"\n      @keyframes shimmer {\n        0% { background-position: 200% 0; }\n        100% { background-position: -200% 0; }\n      }\n      @keyframes cookbookDots {\n        0%, 20% { content: '.'; }\n        40% { content: '..'; }\n        60%, 100% { content: '...'; }\n      }\n      .cookbook-loading-dots::after {\n        content: '.';\n        animation: cookbookDots 1.2s steps(3, end) infinite;\n      }\n      @media (prefers-reduced-motion: reduce) {\n        @keyframes shimmer {\n          0%, 100% { background-position: 0 0; }\n        }\n        .cookbook-loading-dots::after {\n          animation: none;\n          content: '…';\n        }\n      }\n    "}
1),(0,o.FD)("div",{style:ri,"data-test-id":"cookbook-import-skeleton",role:"status","aria-live":"polite","aria-label":t("cookbook.import.skeleton_aria_label")||"Loading recipe","aria-busy":"true",children:[(0,o.Y)("div",{style:ro(rr({},rn),{height:"180px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 16px",textAlign:"center"}),children:(0,o.FD)(s.EY,{type:"body-md-bold",color:"neutral.800",children:[(0,o.Y)("span",{children:c}),(0,o.Y)("span",{className:"cookbook-loading-dots","aria-hidden":"true"})]})}),(0,o.FD)(s.az,{p:"global.sm-2",children:[(0,o.Y)("div",{style:ro(rr({},rn),{height:"16px",borderRadius:"4px",marginBottom:"8px",width:"70%"})}),(0,o.Y)("div",{style:ro(rr({},rn),{height:"12px",borderRadius:"4px",width:"40%"})})]})]})]})};var rc={tiktok:"TikTok",instagram:"Instagram",website:"a website"};let ru=function(e){var t=e.platform,r=e.onClick,n=(0,L.Ay)("cookbook").translateRaw,i=n("cookbook.import.empty_platform_card.headline",{platform:rc[t],defaultValue:"Save from {{platform}}"}),a=n("cookbook.import.empty_platform_card.subcopy",{defaultValue:"Paste a link to add it"});return(0,o.Y)(s.Zp.Navigation,{href:"#",variant:"filled",scroll:!1,onClick:function(e){e.preventDefault(),r()},backgroundColor:"alias.elevation.level-1",width:"100%",height:"100%",padding:"global.md-2","aria-label":i,"data-test-id":"cookbook-import-empty-platform-card-".concat(t),children:(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",width:"100%",minHeight:"240px",gap:"global.sm-1",children:[(0,o.Y)(eP.default,{"aria-hidden":!0}),(0,o.Y)(s.EY,{type:"body-md-bold",children:i}),(0,o.Y)(s.EY,{type:"body-sm-regular",color:"neutral.500",children:a})]})})};var rs=["instagram","tiktok","website"];let rp=function(e){var t=e.recipes,r=e.isCustomer,i=e.showSkeleton,a=e.recipeLimit,l=e.hasMore,c=e.isLoadingMore,u=e.onLoadMore,p=e.onRemove,d=e.onEmptySlotClick,f=e.nextBestAction,b=(0,L.Ay)("cookbook").translateRaw,m=tX().trackSavedCarouselImpression,h=(0,tB.Wx)({threshold:.3,triggerOnce:!0}),y=h.ref,g=h.inView,v=(0,n.useRef)(!1);(0,n.useEffect)(function(){g&&!v.current&&(v.current=!0,m())},[g,m]);var k=(0,n.useCallback)(function(e){e.preventDefault(),null==u||u()},[u]),w=Math.max(0,a-(t.length+ +!!i)),O=rs.filter(function(e){return!("website"!==e&&t.some(function(t){return t.sourcePlatform===e}))}).slice(0,w);return(0,o.FD)(s.az,{ref:y,children:[(0,o.FD)(s.az,{mb:"global.sm-2",display:"flex",alignItems:"center",gap:"global.sm-2",children:[(0,o.FD)(s.EY,{as:"h2",type:"body-xl-bold",children:[b("cookbook.import.saved_recipes",{defaultValue:"Recently saved"}),!r&&(0,o.FD)(s.EY,{as:"span",type:"body-md-regular",color:"neutral.500",ml:"global.xxs","aria-label":b("cookbook.import.count_aria_label",{count:String(t.length),limit:String(a),defaultValue:"".concat(t.length," of ").concat(a)}),children:["(",t.length,"/",a,")"]})]}),f&&(0,o.Y)(s.az,{display:["none","none","block"],flexShrink:0,width:"400px",children:f})]}),(0,o.FD)(s.az,{display:"grid",gridTemplateColumns:["1fr","repeat(2, 1fr)","repeat(3, 1fr)"],gap:["global.sm-2","global.md-1","global.md-1"],children:[i&&(0,o.Y)(rl,{}),t.map(function(e){return(0,o.Y)(re,{recipe:e,onRemove:p},e.id)}),O.map(function(e){return(0,o.Y)(ru,{platform:e,onClick:d},e)})]}),void 0!==l&&l&&(0,o.Y)(s.az,{display:"flex",justifyContent:"center",mt:"global.sm-2",children:(0,o.Y)(s.N_,{href:"#",onClick:k,disabled:void 0!==c&&c,children:b("cookbook.import.load_more",{defaultValue:"See more"})})})]})};var rd=r(247489);function rf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var rb={server:4.5,desktop:4.5,tablet:3,mobile:1.3},rm=function(){var e,t,r=(0,eK.kW)(),o=(0,n.useRef)(null),i=(e=(0,n.useReducer)(function(e){return e+1},0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return rf(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rf(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,n.useEffect)(function(){var e=o.current;if(e&&"undefined"!=typeof ResizeObserver){var t=new ResizeObserver(function(){return i()});return t.observe(e),function(){return t.disconnect()}}},[]),{containerRef:o,perPage:null!=(t=rb[r])?t:rb.desktop,isDesktop:"desktop"===r}},rh=r(638525),ry=r(786571),rg="/creators",rv=(0,r(150106).A)("cookbook-creator-recipes",{creatorIds:[]}).useConfig,rk=function(){var e=rv().creatorIds,t=(0,rh.tH)(e),r=(0,n.useMemo)(function(){return t.flatMap(function(e){var t,r;return null!=(r=null==(t=e.data)?void 0:t.docs)?r:[]}).slice(0,12)},[t]),o=(0,n.useMemo)(function(){return r.map(function(e){return e.id})},[r]),i=(0,ry.c)({bookmarkIds:o}).data,a=(0,n.useMemo)(function(){var e;return new Set(null!=(e=null==i?void 0:i.bookmarkIds)?e:[])},[i]),l=(0,n.useMemo)(function(){return r.map(function(e){var t,r;return t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}({},e),r=r={isSaved:a.has(e.id)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t})},[r,a]),c=t.length>0,u=c&&t.every(function(e){return e.isLoading}),s=c&&t.every(function(e){return e.isError})?"error":u?"loading":0===l.length?"empty":"success";return{recipes:l,status:s}};function rw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function rO(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function rS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rw(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var rC="AllSaved",rj=function(){var e=rS((0,n.useState)(null),2),t=e[0],r=e[1],o=rS((0,n.useState)(!1),2),i=o[0],a=o[1],l=(0,n.useRef)(null),c=(0,b.useQueryClient)(),u=(0,Z.n)().mutate,s=er(),p=s.trackRecipeSaveSuccess,d=s.trackRecipeSaveError,f=(0,n.useCallback)(function(e){r(function(t){return t===e?null:t}),l.current===e&&(l.current=null)},[]);return{save:(0,n.useCallback)(function(e){var t,o,n=e.id;l.current!==n&&(l.current=n,r(n),u({bookmarkId:n,bookmarkSource:"creator"},{onSuccess:(t=function(t){var r,o,i;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:return r=t.id,o=t.freeRecipeSaveCount,i=t.freeRecipeSaveLimit,null!==o&&null!==i&&o>=i&&a(!0),p({recipeId:r,recipeImportMethod:Q.hR.Bookmarked,collectionId:rC,recipe:e,recipeSourceType:J._3.Creator}),[4,c.refetchQueries(k.A["externalRecipes.list"])];case 1:return l.sent(),f(n),[2]}})},o=function(){var e=this,r=arguments;return new Promise(function(o,n){var i=t.apply(e,r);function a(e){rO(i,o,n,a,l,"next",e)}function l(e){rO(i,o,n,a,l,"throw",e)}a(void 0)})},function(e){return o.apply(this,arguments)}),onError:function(e){var t=V(e);"ANONYMOUS_LIMIT_REACHED"===t&&a(!0),d({recipeId:n,recipeImportMethod:Q.hR.Bookmarked,collectionId:rC,systemMessage:t}),f(n)}}))},[u,c,f,p,d]),savingId:t,isAtLimit:i}},rx=r(33146),rP=r(705692),r_=r(332745),rA=r(397938),rE=function(e){if(!e)return null;var t=e.match(/^PT(?:(\d+)H)?(?:(\d+)M)?$/);if(!t)return null;var r=60*(t[1]?parseInt(t[1],10):0)+(t[2]?parseInt(t[2],10):0);return r>0?r:null},rI="CookbookCreatorRecipes",rY=function(e,t,r){try{r()}catch(r){(0,eT.Cp)(r,{tags:{event:e,component:t}})}},rR=function(e){var t,r,o,n,i;return null!=(i=null!=(n=null!=(o=null==(t=e.recipeDeveloper)?void 0:t.displayName)?o:null==(r=e.recipeDeveloper)?void 0:r.name)?n:e.author)?i:""},rT=function(e){var t,r,o=null==(t=e.recipeDeveloper)?void 0:t.id;return o?{cookingTime:null!=(r=rE(e.totalTime))?r:rE(e.prepTime),cooksCount:null,creatorId:o,creatorName:rR(e),creatorRecipeId:e.id,recipeRating:"number"==typeof e.averageRating?e.averageRating:null}:null},rD=function(){var e=(0,X.$T)().trackJanusEvent;return{trackCarouselImpression:(0,n.useCallback)(function(){rY("Cookbook_Carousel_CreatorRecipe_Impression","useCookbookCreatorCarouselTracking",function(){e(rx.M.janusEvent())})},[e]),trackSeeMoreLinkClick:(0,n.useCallback)(function(){rY("Cookbook_View_CreatorList_Link_Click","useCookbookCreatorCarouselTracking",function(){e(rP.Y.janusEvent())})},[e]),trackCreatorRecipeCardClick:(0,n.useCallback)(function(t){var r=rT(t);if(!r)return void(0,eT.Cp)(Error("CreatorRecipe missing recipeDeveloper; skipping Cookbook_View_Recipe_Card_Click"),{tags:{event:"Cookbook_View_Recipe_Card_Click",component:"useCookbookCreatorCarouselTracking"}});rY("Cookbook_View_Recipe_Card_Click","useCookbookCreatorCarouselTracking",function(){e(tH.kx.janusEvent({cookbookRecipeState:tH.kx.cookbookRecipeState({re
1cipeId:t.id}),creatorRecipeStateEntities:[tH.kx.creatorRecipeState(r)],uiComponent:tH.kx.uiComponent({uiComponentName:rI,uiComponentLabel:r.creatorName||null})}))})},[e]),trackSaveRecipeIconClick:(0,n.useCallback)(function(t){var r=rT(t);rY("Cookbook_Save_Recipe_Icon_Click","useCookbookCreatorCarouselTracking",function(){e(r_.X.janusEvent({cookbookRecipeAction:r_.X.cookbookRecipeAction({recipeId:t.id}),creatorRecipeStateEntities:r?[r_.X.creatorRecipeState(r)]:[]}))})},[e]),trackCarouselNavChange:(0,n.useCallback)(function(){rY("Cookbook_Change_Recipe_Icon_Click","useCookbookCreatorCarouselTracking",function(){e(rA.y.janusEvent({uiComponent:rA.y.uiComponent({uiComponentName:rI,uiComponentLabel:null})}))})},[e])}},rz=r(330977);let rL=function(e){var t=e.headshotPath,r=e.label;return(0,o.FD)(s.az,{display:"inline-flex",alignItems:"center",gap:"global.xxs",backgroundColor:"shared-alias.neutral.background.lightest",borderRadius:"global.lg",paddingY:"global.xxs",paddingX:"global.xs",maxWidth:"100%","data-test-id":"creator-source-tag",children:[!!t&&(0,o.Y)(s.az,{width:"".concat(20,"px"),height:"".concat(20,"px"),borderRadius:"global.circle",overflow:"hidden",flexShrink:0,position:"relative",children:(0,o.Y)(tJ.Ay,{src:t,alt:"",width:20,height:20,crop:"thumb",gravity:"face",style:{objectFit:"cover"}})}),(0,o.Y)(s.EY,{as:"span",type:"body-xs-bold",color:"shared-alias.neutral.foreground.default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","aria-label":r,children:r})]})};var rF=r(671096),rM=function(e){var t,r,o,n,i;return null!=(i=null!=(n=null!=(o=null==(t=e.recipeDeveloper)?void 0:t.displayName)?o:null==(r=e.recipeDeveloper)?void 0:r.name)?n:e.author)?i:""},rN=function(e){var t,r,o,n=[],i=null!=(o=rE(e.totalTime))?o:rE(e.prepTime);i&&n.push("".concat(i," min"));var a=null==(t=e.nutrition)?void 0:t.find(function(e){return"Calories"===e.name||"Energy (kcal)"===e.name});a&&n.push("".concat(Math.round(a.amount)," kcal"));var l=null==(r=e.nutrition)?void 0:r.find(function(e){return"Protein"===e.name});return l&&n.push("".concat(Math.round(l.amount),"g prot.")),n.join(" \xb7 ")},rU=n.memo(function(e){var t=e.imagePath,r=e.alt;return t?t.startsWith("http")?(0,o.Y)(tJ.Ay,{src:t,alt:r,fill:!0,unoptimized:!0,style:{objectFit:"cover"}}):(0,o.Y)(tJ.Ay,{src:"/recipes".concat(t),alt:r,fill:!0,sizes:"(max-width: 640px) 80vw, (max-width: 1024px) 40vw, 280px",style:{objectFit:"cover"}}):(0,o.Y)(tJ.Ay,{src:"/hellofresh_website/empty-dish-thumbnail.png",alt:r,fill:!0,sizes:"(max-width: 640px) 80vw, (max-width: 1024px) 40vw, 280px",style:{objectFit:"cover"}})});rU.displayName="CreatorRecipeImage";let rV=n.memo(function(e){var t,r,n,i,a,l,c=e.recipe,u=e.isSaved,p=e.isSaving,d=e.onSave,f=e.onCardClick,b=(0,L.Ay)("cookbook").translateRaw,m=rM(c),h=rN(c),y=b("cookbook.creator_recipes.recipe_by",{name:m,defaultValue:"Recipe by: ".concat(m)}),g=u||p,v=b("cookbook.creator_recipes.save_aria_label",{title:null!=(n=c.name)?n:"",defaultValue:"Save ".concat(null!=(i=c.name)?i:"recipe"," to your cookbook")}),k=b("cookbook.creator_recipes.saved_aria_label",{title:null!=(a=c.name)?a:"",defaultValue:"".concat(null!=(l=c.name)?l:"Recipe"," saved to your cookbook")});return(0,o.FD)(s.az,{position:"relative",width:"100%",children:[(0,o.Y)(s.Zp.Navigation,{variant:"filled",href:c.websiteUrl||rg,padding:"global.none",display:"block",width:"100%","data-test-id":"creator-recipe-card",onClick:f,children:(0,o.FD)(s.az,{display:"flex",flexDirection:"column",width:"100%",children:[(0,o.FD)(s.az,{position:"relative",width:"100%",overflow:"hidden",borderRadius:"global.md",aspectRatio:"4 / 3",children:[(0,o.Y)(rU,{imagePath:c.imagePath,alt:c.name||""}),m&&(0,o.Y)(s.az,{position:"absolute",bottom:"global.xs",left:"global.xs",children:(0,o.Y)(rL,{headshotPath:null==(r=c.recipeDeveloper)||null==(t=r.headshotImage)?void 0:t.path,label:y})})]}),(0,o.FD)(s.az,{marginTop:"global.sm-2",children:[(0,o.Y)(s.EY,{as:"h4",type:"body-lg-bold",children:c.name}),h&&(0,o.Y)(s.EY,{as:"p",type:"body-sm-regular",color:"shared-alias.neutral.foreground.dark",marginTop:"global.xxs",children:h})]})]})}),(0,o.Y)(s.az,{position:"absolute",top:"global.xs",right:"global.xs",zIndex:"1",children:(0,o.Y)(s.K0.Primary,{shape:"circle",icon:g?(0,o.Y)(rF.A,{}):(0,o.Y)(rz.default,{}),"aria-label":g?k:v,"aria-pressed":g,disabled:g,onClick:function(){g||d(c.id)}
1,"data-test-id":"creator-recipe-save-button",appearance:"brand"})})]})});var rB={backgroundImage:"linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%)",backgroundSize:"200% 100%",animation:"creatorRecipeShimmer 1.4s infinite","@keyframes creatorRecipeShimmer":{"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},"@media (prefers-reduced-motion: reduce)":{animation:"none"}},rH=function(e){return(0,o.Y)(s.az,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}({__dangerouslySetCustomCSS:rB},e))};let rZ=function(){return(0,o.FD)(s.az,{width:"100%","data-test-id":"creator-recipe-card-skeleton","aria-hidden":!0,children:[(0,o.Y)(rH,{width:"100%",overflow:"hidden",borderRadius:"global.md",aspectRatio:"4 / 3"}),(0,o.FD)(s.az,{marginTop:"global.sm-2",children:[(0,o.Y)(rH,{height:"16px",width:"80%",borderRadius:"global.sm",marginBottom:"global.xxs"}),(0,o.Y)(rH,{height:"12px",width:"50%",borderRadius:"global.sm"})]})]})};var rW=r(181822);let rK=function(e){var t=e.title,r=e.socialProof,n=e.onSeeMoreClick,i=(0,L.Ay)("cookbook").translateRaw;return(0,o.FD)(s.az,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"global.sm-2",marginBottom:"global.sm-2",children:[(0,o.FD)(s.az,{children:[(0,o.Y)(s.EY,{as:"h2",type:"body-xl-bold",children:t}),(0,o.Y)(s.EY,{type:"body-md-regular",color:"neutral.500",marginTop:"global.xxs",children:r})]}),(0,o.Y)(s.az,{flexShrink:0,children:(0,o.Y)(s.N_,{href:rg,strong:!0,trailingIcon:(0,o.Y)(rW.A,{}),"aria-label":i("cookbook.creator_recipes.see_more_aria_label",{defaultValue:"See more recipes from this creator"}),"data-test-id":"creator-recipes-see-more",onClick:n,children:i("cookbook.creator_recipes.see_more",{defaultValue:"See more"})})})]})},r$=function(e){var t=e.isCustomer,r=e.onAtLimit,i=(0,L.Ay)("cookbook").translateRaw,a=rk(),l=a.recipes,c=a.status,u=rj(),p=u.save,d=u.savingId,f=u.isAtLimit,b=rm(),m=b.containerRef,h=b.perPage,y=(0,rd.A)(),g=rD(),v=g.trackCarouselImpression,k=g.trackSeeMoreLinkClick,w=g.trackCreatorRecipeCardClick,O=g.trackSaveRecipeIconClick,S=g.trackCarouselNavChange,C=(0,n.useRef)(!1),j=(0,n.useCallback)(function(){if(!C.current){C.current=!0;return}S()},[S]),x=(0,tB.Wx)({threshold:.3,triggerOnce:!0}),P=x.ref,_=x.inView,A=(0,n.useRef)(!1);(0,n.useEffect)(function(){_&&!A.current&&"success"===c&&(A.current=!0,v())},[_,c,v]);var E=(0,n.useCallback)(function(e){if(!t&&f)return void r();p(e)},[t,f,r,p]),I=(0,n.useCallback)(function(e){return function(){O(e),E(e)}},[E,O]),Y=(0,n.useCallback)(function(e){return function(){return w(e)}},[w]),R=(0,n.useRef)(!1);if((0,n.useEffect)(function(){t||(!R.current&&f&&r(),R.current=f)},[f,t,r]),"empty"===c||"error"===c)return null;var T=new Intl.NumberFormat(y||void 0).format(12400),D=i("cookbook.creator_recipes.title",{defaultValue:"From HelloFresh creators"}),z=i("cookbook.creator_recipes.social_proof",{count:T,defaultValue:"Saved by ".concat(T," members this week.")}),F="loading"===c;return(0,o.FD)(s.az,{ref:function(e){m&&"current"in m&&(m.current=e),P(e)},as:"section",maxWidth:["100%","100%","1144px"],mx:"auto",px:["global.sm-2","global.md-1","global.none"],py:["global.md-2","global.lg-1"],"data-test-id":"creator-recipes-section",children:[(0,o.Y)(rK,{title:D,socialProof:z,onSeeMoreClick:k}),F?(0,o.Y)(s.az,{display:"grid",gridTemplateColumns:["repeat(2, 1fr)","repeat(3, 1fr)","repeat(4, 1fr)"],gap:["global.sm-2","global.md-1"],children:Array.from({length:4}).map(function(e,t){return(0,o.Y)(rZ,{},t)})}):(0,o.Y)(s.FN,{id:"cookbook-creator-recipes",perPage:h,snapAlign:"start",autosnap:!0,partialSlideView:h<3,showArrowNavigation:!0,hideNavigationWhenSinglePage:!0,paddingX:"global.none",onPageChange:j,children:l.slice(0,12).map(function(e){return(0,o.Y)(s.az,{paddingRight:["global.sm-2","global.md-1"],height:"100%",children:(0,o.Y)(rV,{recipe:e,isSaved:e.isSaved,isSaving:d===e.id,onSave:I(e),onCardClick:Y(e)})},e.id)})})]})};function rG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var rq={server:4.5,desktop:4.5,tablet:3,mobile:2.1},rX=function(){var e,t,r=(0,eK.kW)(),o=(0,n.useRef)(null),i=(e=(0,n.useReducer)(function(e){return e+1},0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return rG(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rG(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,n.useEffect)(function(){var e=o.current;if(e&&"undefined"!=typeof ResizeObserver){var t=new ResizeObserver(function(){return i()});return t.observe(e),function(){return t.disconnect()}}},[]),{containerRef:o,perPage:null!=(t=rq[r])?t:rq.desktop,isDesktop:"desktop"===r}},rQ=r(568836),rJ="813k",r0=function(){var e,t=(0,rQ.Fj)("cookbook-metadata");return t.isReady&&t.value&&null!=(e=t.value.userCount)?e:rJ},r1=r(229290),r2=r(786619),r4=r(227069),r3=function(){var e=(0,X.$T)().trackJanusEvent;return{trackCarouselImpression:(0,n.useCallback)(function(t){t.forEach(function(t){e(r2.W.janusEvent({communityRecipeStateEntities:[r2.W.communityRecipeState({recipeId:t.id})],cookbookRecipeState:r2.W.cookbookRecipeState({recipeId:t.id}),uiComponent:r2.W.uiComponent({uiComponentName:eC,uiComponentLabel:null})}))})},[e]),trackCommunityRecipeCardClick:(0,n.useCallback)(function(t){var r;e(r1.kx.janusEvent({communityRecipeStateEntities:[r1.kx.communityRecipeState({recipeId:t.id})],cookbookRecipeState:r1.kx.cookbookRecipeState({recipeId:t.id}),uiComponent:r1.kx.uiComponent({uiComponentName:eC,uiComponentLabel:null!=(r=t.author)?r:null})}))},[e]),trackCtaSaveRecipeClick:(0,n.useCallback)(function(){e(ez.M1.janusEvent({uiComponent:ez.M1.uiComponent({uiComponentName:"Recipe",uiComponentLabel:eC,uiComponentPosition:null}),uiModal:ez.M1.uiModal({uiModalName:ez.Fj.RecipeImportTutorial})}))},[e]),trackCtaLearnHowClick:(0,n.useCallback)(function(){e(r4.EL.janusEvent({uiComponent:r4.EL.uiComponent({uiComponentName:"LearnHowLink",uiComponentLabel:eC,uiComponentPosition:null}),uiModal:r4.EL.uiModal({uiModalName:r4.Fj.RecipeImportTutorial})}))},[e])}},r6={backgroundImage:"linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%)",backgroundSize:"200% 100%",animation:"communityRecipeShimmer 1.4s infinite","@keyframes communityRecipeShimmer":{"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},"@media (prefers-reduced-motion: reduce)":{animation:"none"}};let r5=function(){return(0,o.Y)(s.az,{width:"100%","data-test-id":"community-recipe-card-skeleton","aria-hidden":!0,children:(0,o.Y)(s.az,{width:"100%",overflow:"hidden",borderRadius:"global.md",aspectRatio:"3 / 4",__dangerouslySetCustomCSS:r6})})};function r8(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}let r7=function(e){var t,r=e.onSaveRecipePress,i=e.onLearnHowPress,a=(0,L.Ay)("cookbook").translateRaw,l=(t=(0,n.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return r8(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r8(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1],p=a("cookbook.empty_state.community_carousel.cta.title",{defaultValue:"Save recipes from anywhere"}),d=a("cookbook.empty_state.community_carousel.cta.save_button.label",{defaultValue:"Save a recipe"}),f=a("cookbook.empty_state.community_carousel.cta.learn_how.label",{defaultValue:"Learn how"});return(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",aspectRatio:"171 / 256",backgroundColor:"alias.brand.background.default",borderRadius:"global.lg",padding:"global.sm-1",overflow:"hidden","data-test-id":ej.ctaTile,children:[!c&&(0,o.Y)(s.az,{flex:"1",minHeight:0,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",children:(0,o.Y)("img",{src:"https://media.hellofresh.com/hellofresh-website/cookbook/onboarding/import-tutorial/community-cta-illustration-v2.gif",alt:"",onError:function(){return u(!0)},style:{objectFit:"contain",maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto"}})}),(0,o.Y)(s.EY,{as:"h4",type:"body-lg-bold",color:"shared-alias.neutral.foreground.inverse",mt:"global.xs",mb:"global.xs",textAlign:"center",overflow:"hidden",children:p}),(0,o.Y)(s.az,{mt:"global.xxs",mb:"global.xs",width:"100%",children:(0,o.Y)(s.$n.Primary,{appearance:"neutral",size:"sm",onClick:r,"data-test-id":ej.ctaSave,"aria-label":d,children:d})}),(0,o.Y)(s.az,{pb:"global.xs",children:(0,o.Y)(s.N_,{href:"#",onClick:function(e){e.preventDefault(),i()},type:"body-sm-bold",customColor:"global.white",trailingIcon:(0,o.Y)(rW.A,{}),textDecoration:"underline","aria-label":f,"data-test-id":ej.ctaLearnHow,children:f})})]})};var r9=r(45727),oe=r(382273),ot=r(170176),or=r(142943),oo=r(288520),on=r(980046),oi={instagram:r9.A,tiktok:oe.A,youtube:ot.A,unsupported:or.A,creator:oo.A,hellofresh:on.default};let oa=function(e){var t=e.platform;if("instagram"!==t&&"tiktok"!==t&&"youtube"!==t&&"unsupported"!==t&&"creator"!==t&&"hellofresh"!==t)return null;var r=oi[t];return(0,o.Y)(s.In,{icon:(0,o.Y)(r,{}),color:"global.white","aria-hidden":!0})};var ol=new Set(["instagram","tiktok","youtube","facebook","pinterest"]),oc=function(e){var t=e.trim();return t.startsWith("@")?t:"@".concat(t)},ou=n.memo(function(e){var t=e.imagePath,r=e.alt;return t?t.startsWith("http")?(0,o.Y)(tJ.Ay,{src:t,alt:r,fill:!0,unoptimized:!0,style:{objectFit:"cover"}}):(0,o.Y)(tJ.Ay,{src:"/recipes".concat(t),alt:r,fill:!0,sizes:"(max-width: 640px) 60vw, (max-width: 1024px) 30vw, 260px",style:{objectFit:"cover"}}
1):(0,o.Y)(tJ.Ay,{src:"/hellofresh_website/empty-dish-thumbnail.png",alt:r,fill:!0,sizes:"(max-width: 640px) 60vw, (max-width: 1024px) 30vw, 260px",style:{objectFit:"cover"}})});ou.displayName="CommunityRecipeImage";let os=n.memo(function(e){var t,r,n=e.recipe,i=e.onCardClick,a=(0,L.Ay)("cookbook").translateRaw,l=n.source_platform,c=a("cookbook.import.card.your_recipe")||"Your recipe",u=l&&ol.has(l)&&n.author?oc(n.author):t3(l,null!=(t=n.websiteUrl)?t:"",c,n.author).label,p=n.name,d=(0,o.FD)(o.FK,{children:[(0,o.Y)(ou,{imagePath:null!=(r=n.imagePath)?r:n.imageLink,alt:n.name}),(0,o.FD)("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",justifyContent:"flex-end",paddingTop:"32px",paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px",background:"linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 28%, transparent 50%, rgba(0, 0, 0, 0.92) 100%)"},children:[u&&(0,o.FD)(s.az,{display:"flex",alignItems:"center",gap:"global.xxs",mb:"global.xxs",children:[(0,o.Y)(oa,{platform:l}),(0,o.Y)(s.EY,{type:"body-xs-regular",color:"shared-alias.neutral.foreground.inverse",children:u})]}),(0,o.Y)(s.EY,{as:"h3",type:"body-md-bold",color:"shared-alias.neutral.foreground.inverse",children:n.name})]})]});return n.websiteUrl?(0,o.Y)(s.Zp.Navigation,{variant:"filled",href:n.websiteUrl,padding:"global.none",display:"block",width:"100%","data-test-id":ej.card,onClick:i,"aria-label":p,children:(0,o.Y)(s.az,{position:"relative",width:"100%",overflow:"hidden",borderRadius:"global.md",aspectRatio:"171 / 256",children:d})}):(0,o.Y)(s.az,{position:"relative",width:"100%",overflow:"hidden",borderRadius:"global.md",aspectRatio:"171 / 256","aria-label":p,"data-test-id":ej.card,children:d})});var op=function(e,t){return function(){t(),e()}};let od=function(e){var t=e.onSaveRecipePress,r=e.onLearnHowPress,i=(0,L.Ay)("cookbook").translateRaw,a=ex(),l=a.recipes,c=a.status,u=rX(),p=u.containerRef,d=u.perPage,f=r3(),b=f.trackCarouselImpression,m=f.trackCommunityRecipeCardClick,h=f.trackCtaSaveRecipeClick,y=f.trackCtaLearnHowClick,g=(0,tB.Wx)({threshold:.3,triggerOnce:!0}),v=g.ref,k=g.inView,w=(0,n.useRef)(!1);(0,n.useEffect)(function(){k&&!w.current&&"success"===c&&(w.current=!0,b(l.slice(0,10)))},[k,c,l,b]);var O=r0();if("empty"===c||"error"===c)return null;var S=i("cookbook.empty_state.community_carousel.header.eyebrow",{defaultValue:"Recipes from the community"}),C=i("cookbook.empty_state.community_carousel.header.subtitle",{count:O,defaultValue:"".concat(O," people are saving recipes")}),j="loading"===c;return(0,o.FD)(s.az,{ref:function(e){p&&"current"in p&&(p.current=e),v(e)},as:"section",width:"100%","data-test-id":"cookbook-community-carousel",mb:"global.md-2",children:[(0,o.FD)(s.az,{mb:"global.sm-2",children:[(0,o.Y)(s.EY,{type:"body-xs-bold",color:"neutral.500",textTransform:"uppercase",children:S}),(0,o.Y)(s.EY,{as:"h2",type:"body-xl-bold",mt:"global.xxs",children:C})]}),j?(0,o.Y)(s.az,{display:"grid",gridTemplateColumns:["repeat(2, 1fr)","repeat(3, 1fr)","repeat(4, 1fr)"],gap:["global.sm-2","global.md-1"],children:Array.from({length:4}).map(function(e,t){return(0,o.Y)(r5,{},t)})}):(0,o.FD)(s.FN,{id:"cookbook-community-carousel",perPage:d,snapAlign:"start",autosnap:!0,partialSlideView:d<3,showArrowNavigation:!0,hideNavigationWhenSinglePage:!0,paddingX:"global.none",children:[(0,o.Y)(s.az,{paddingRight:["global.sm-2","global.md-1"],aspectRatio:"171 / 256",children:(0,o.Y)(r7,{onSaveRecipePress:op(t,h),onLearnHowPress:op(r,y)})}),l.slice(0,10).map(function(e){return(0,o.Y)(s.az,{paddingRight:["global.sm-2","global.md-1"],aspectRatio:"171 / 256",children:(0,o.Y)(os,{recipe:e,onCardClick:function(){return m(e)}})},e.id)})]})]})};var of=r(658215),ob=["save","picture","notes","learn"],om={save:function(e){return!e.hasSavedRecipe},picture:function(e){return!e.hasUsedImageImport},notes:function(e){return!e.hasCreatedRecipe},learn:function(e){return e.needsEducation}},oh=function(e){var t=ob.filter(function(t){return om[t](e)});return t.length>0?t:ob},oy={save:{label:"social-recipe-bridge.nba.save.label",a11yLabel:"social-recipe-bridge.nba.save.a11y.label"},picture:{label:"social-recipe-bridge.nba.picture.label",a11yLabel:"social-recipe-bridge.nba.picture.a11y.label"},notes:{label:"social-recipe-bridge.nba.notes.label",a11yLabel:"social-recipe-bridge.nba.notes.a11y.label"},learn:{label:"social-recipe-bridge.nba.learn.label",a11yLabel:"social-recipe-bridge.nba.learn.a11y.label"}},og={save:"Save your first recipe",picture:"Save from a photo",notes:"Paste your recipe notes",learn:"Learn how to save recipes"},ov={save:"Recipe",picture:"Photo",notes:"Notes",learn:"LearnHow"},ok=function(){var e=(0,X.$T)().trackJanusEvent,t=(0,n.useRef)(!1);return(0,n.useEffect)(function(){t.current||(t.current=!0,e(of.N.janusEvent()))},[e]),{trackNbaActionPress:(0,n.useCallback)(function(t){var r=ov[t];if("learn"===t)return void e(r4.EL.janusEvent({uiComponent:r4.EL.uiComponent({uiComponentName:r,uiComponentLabel:null,uiComponentPosition:null}
1),uiModal:r4.EL.uiModal({uiModalName:r4.Fj.NextBestAction})}));e(ez.M1.janusEvent({uiComponent:ez.M1.uiComponent({uiComponentName:r,uiComponentLabel:og[t],uiComponentPosition:null}),uiModal:ez.M1.uiModal({uiModalName:ez.Fj.NextBestAction})}))},[e])}};function ow(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function oO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ow(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ow(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var oS=function(e){var t=oO((0,n.useState)(e[0]),2),r=t[0],o=t[1],i=oO((0,n.useState)("visible"),2),a=i[0],l=i[1],c=(0,n.useRef)(e),u=(0,n.useRef)(0),s=(0,n.useRef)([]);c.current=e;var p=(0,n.useCallback)(function(){s.current.forEach(function(e){return window.clearTimeout(e)}),s.current=[]},[]);(0,n.useEffect)(function(){return p(),u.current=0,l("visible"),o(e[0]),p},[e.join("|")]);var d=(0,n.useCallback)(function(){var e,t=c.current;if(!(t.length<2)&&void 0!==t[0]){var r=null!=(e=t[u.current])?e:t[0],n=(t.indexOf(r)+1)%t.length;u.current=n,l("fading-out");var i=window.setTimeout(function(){o(null!=(e=t[n])?e:t[0]),l("fading-in");var e,r=window.setTimeout(function(){l("visible")},620);s.current.push(r)},320);s.current.push(i)}},[]);return(0,n.useEffect)(function(){if(!(e.length<2)){var t="function"==typeof window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):{matches:!1},r=window.setInterval(function(){t.matches||d()},5940);return function(){window.clearInterval(r)}}},[e.length,d]),(0,n.useEffect)(function(){return p},[p]),{currentId:r,iconVisibility:a}},oC={save:"eie-nbavis-v5-save-web-alpha.gif",picture:"eie-nbavis-v5-picture-web-alpha.gif",notes:"eie-nbavis-v5-notes-web-alpha.gif",learn:"eie-nbavis-v5-learn-web-alpha.gif"},oj=function(e){var t=e.actionId;return(0,o.Y)("img",{src:"".concat("https://media.hellofresh.com/hellofresh-website/cookbook/nba","/").concat(oC[t]),alt:"",width:80,height:54,style:{objectFit:"cover"}})},ox={hasSavedRecipe:!1,hasUsedImageImport:!1,hasCreatedRecipe:!1,needsEducation:!0}
1,oP="opacity ".concat(320,"ms ease-out, transform ").concat(320,"ms ease-out"),o_={visible:{opacity:1,transform:"translateX(0) scale(1) rotate(0deg)",transition:oP},"fading-out":{opacity:0,transform:"translateX(-14px) scale(0.6) rotate(-12deg)",transition:oP},"fading-in":{opacity:1,transform:"translateX(2px) scale(1) rotate(0deg)",transition:"opacity ".concat(620,"ms ease-out, transform ").concat(620,"ms ease-out")}},oA=function(e){var t=e.context,r=e.onActionPress,i=e.testId,a=(0,L.Ay)("social-recipe-bridge").translateRaw,l=oS(oh(void 0===t?ox:t)),c=l.currentId,u=l.iconVisibility,p=(0,n.useCallback)(function(){c&&r(c)},[c,r]);if(!c)return null;var d=oy[c],f=a(d.label,{defaultValue:og[c]}),b=a(d.a11yLabel,{defaultValue:og[c]});return(0,o.FD)(s.az,{as:"button",type:"button",onClick:p,display:"flex",alignItems:"center",gap:"global.sm-1",width:"100%",height:"54px",px:"global.sm-1",backgroundColor:"alias.accent.default",borderRadius:"global.lg",boxShadow:"shadow-md","aria-label":b,"data-test-id":void 0===i?"next-best-action":i,cursor:"pointer",textAlign:"left",borderStyle:"none",children:[(0,o.Y)(s.az,{flexShrink:0,width:"80px",height:"54px",overflow:"hidden",children:(0,o.Y)("div",{style:o_[u],children:(0,o.Y)(oj,{actionId:c})})}),(0,o.Y)(s.az,{flex:"1",minWidth:0,children:(0,o.Y)(s.EY,{type:"body-md-bold",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:f})}),(0,o.Y)(s.az,{flexShrink:0,children:(0,o.Y)(s.In,{icon:(0,o.Y)(rW.A,{}),color:"neutral.600"})})]})};function oE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function oI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oE(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var oY={platform:"platform",find:"copy",copy:"paste",paste:"paste"},oR={platform:"platform",find:"platform",copy:"find",paste:"copy"},oT=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"platform",t=oI((0,n.useState)(e),2),r=t[0],o=t[1],i=oI((0,n.use
1State)(null),2),a=i[0],l=i[1];return{screen:r,selectedPlatform:a,selectPlatform:(0,n.useCallback)(function(e){l(e),o("find")},[]),next:(0,n.useCallback)(function(){o(function(e){return oY[e]})},[]),back:(0,n.useCallback)(function(){o(function(e){return oR[e]})},[]),reset:(0,n.useCallback)(function(){o("platform"),l(null)},[]),goTo:(0,n.useCallback)(function(e,t){o(e),l(null!=t?t:null)},[])}},oD=r(916482),oz="https://media.hellofresh.com/hellofresh_website/cookbook/import/social-icons",oL=[{id:"website",iconUrl:"".concat(oz,"/web.png"),titleKey:"cookbook.import.tutorial_walkthrough.platform.website.title",defaultTitle:"Recipe website",descriptionKey:"cookbook.import.tutorial_walkthrough.platform.website.description",defaultDescription:"Copy the URL from your browser"},{id:"instagram",iconUrl:"".concat(oz,"/instagram.png"),titleKey:"cookbook.import.tutorial_walkthrough.platform.instagram.title",defaultTitle:"Instagram",descriptionKey:"cookbook.import.tutorial_walkthrough.platform.instagram.description",defaultDescription:"Copy a link from a post or Reel"},{id:"tiktok",iconUrl:"".concat(oz,"/tiktok.png"),titleKey:"cookbook.import.tutorial_walkthrough.platform.tiktok.title",defaultTitle:"TikTok",descriptionKey:"cookbook.import.tutorial_walkthrough.platform.tiktok.description",defaultDescription:"Copy a link from a recipe video"},{id:"youtube",iconUrl:"".concat(oz,"/youtube.png"),titleKey:"cookbook.import.tutorial_walkthrough.platform.y
1outube.title",defaultTitle:"YouTube",descriptionKey:"cookbook.import.tutorial_walkthrough.platform.youtube.description",defaultDescription:"Copy a link from a recipe video"},{id:"facebook",iconUrl:"".concat(oz,"/facebook.png"),titleKey:"cookbook.import.tutorial_walkthrough.platform.facebook.title",defaultTitle:"Facebook",descriptionKey:"cookbook.import.tutorial_walkthrough.platform.facebook.description",defaultDescription:"Copy a link from a post or Reel"}];let oF=function(e){var t=e.onSelectPlatform,r=(0,L.Ay)("cookbook").translateRaw;return(0,o.Y)(s.az,{display:"grid",gridTemplateColumns:["1fr","1fr","repeat(2, 1fr)"],gap:"global.sm-2","data-test-id":"cookbook-import-tutorial-walkthrough-platform-select",children:oL.map(function(e){var n=r(e.titleKey,{defaultValue:e.defaultTitle}),i=r(e.descriptionKey,{defaultValue:e.defaultDescription});return(0,o.Y)(s.Zp.Navigation,{href:"#",variant:"filled",scroll:!1,onClick:function(r){r.preventDefault(),t(e.id)},backgroundColor:"alias.elevation.level-1",padding:"global.sm-2","aria-label":n,"data-test-id":"cookbook-import-tutorial-walkthrough-platform-".concat(e.id),children:(0,o.FD)(s.az,{display:"flex",alignItems:"center",gap:"global.sm-2",width:"100%",children:[(0,o.Y)(tJ.Ay,{src:e.iconUrl,alt:"","aria-hidden":"true",width:40,height:40,style:{objectFit:"contain",flexShrink:0},unoptimized:!0}),(0,o.FD)(s.az,{flexGrow:1,minWidth:0,textAlign:"left",children:[(0,o.Y)(s.EY,{as:"p",type:"body-md-bold",children:n}),(0,o.Y)(s.EY,{as:"p",type:"body-sm-regular",color:"neutral.500",children:i})]}),(0,o.Y)(oD.default,{"aria-hidden":!0})]})},e.id)})})};var oM=[{screen:"find",listValueKey:"cookbook.import.tutorial_walkthrough.step.find.list_value",defaultListValue:"Find",titleKey:"cookbook.import.tutorial_walkthrough.step.find.title",defaultTitle:"Find the recipe",bodyKey:"cookbook.import.tutorial_walkthrough.step.find.body",defaultBody:"Open it on any recipe blog, website or social post you like."},{screen:"copy",listValueKey:"cookbook.import.tutorial_walkthrough.step.copy.list_value",defaultListValue:"Copy",titleKey:"cookbook.import.tutorial_walkthrough.step.copy.title",defaultTitle:"Copy the link",bodyKey:"cookbook.import.tutorial_walkthrough.step.copy.body",defaultBody:"Use Share, then Copy link — or copy the address from your browser."},{screen:"paste",listValueKey:"cookbook.import.tutorial_walkthrough.step.paste.list_value",defaultListValue:"Paste",titleKey:"cookbook.import.tutorial_walkthrough.step.paste.title",defaultTitle:"Paste the link and save",bodyKey:"cookbook.import.tutorial_walkthrough.step.paste.body",defaultBody:"Paste it into the field above and select Save recipe."}],oN="cookbook.import.tutorial_walkthrough.step.find",oU={website:{urlText:"hellofresh.com/recipes/creamy-garlic-pasta",titleKey:"".concat(oN,".title"),defaultTitle:"Find the recipe",bodyKey:"".concat(oN,".body"),defaultBody:"Open it on any recipe blog, website or social post you like."},instagram:{urlText:"instagram.com/recipe",titleKey:"".concat(oN,".instagram.title"),defaultTitle:"Open the recipe post",bodyKey:"".concat(oN,".instagram.body"),defaultBody:"Find the reel or post with the recipe in Instagram."},tiktok:{urlText:"tiktok.com/recipe",titleKey:"".concat(oN,".tiktok.title"),defaultTitle:"Find the recipe video",bodyKey:"".concat(oN,".tiktok.body"),defaultBody:"Open the recipe video in TikTok."},youtube:{urlText:"youtube.com/recipe",titleKey:"".concat(oN,".youtube.title"),defaultTitle:"Open the recipe video",bodyKey:"".concat(oN,".youtube.body"),defaultBody:"Find the cooking video on YouTube."},facebook:{urlText:"facebook.com/recipe",titleKey:"".concat(oN,".facebook.title"),defaultTitle:"Open the recipe post",bodyKey:"".concat(oN,".facebook.body"),defaultBody:"Find the reel or post with the recipe in Facebook."}},oV=r(353286);let oB=function(e){var t=e.url;return(0,o.FD)(s.az,{"data-test-id":"cookbook-import-tutorial-walkthrough-browser-chrome",backgroundColor:"global.white",borderRadius:"border-radius-md",boxShadow:"shadow-sm",overflow:"hidden",width:"300px",height:"126px",flexShrink:0,display:"flex",flexDirection:"column",children:[(0,o.FD)(s.az,{display:"flex",alignItems:"center",gap:"global.xxs",flexShrink:"0",backgroundColor:"neutral.200",px:"global.xs",py:"global.xs",children:[(0,o.Y)(s.az,{display:"flex",gap:"global.xxs",flexShrink:"0",children:[0,1,2].map(function(e){return(0,o.Y)(s.az,{width:"5px",height:"5
1px",borderRadius:"border-radius-circle",backgroundColor:"neutral.400"},e)})}),(0,o.Y)(s.az,{flex:1,minWidth:0,backgroundColor:"global.white",borderRadius:"border-radius-pill",px:"global.xs",py:"global.xxs",overflow:"hidden",children:(0,o.Y)(s.EY,{type:"body-xs-regular",color:"neutral.700",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:t})})]}),(0,o.Y)(s.az,{"data-test-id":"cookbook-import-tutorial-walkthrough-browser-chrome-content",flex:1,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"neutral.100",children:(0,o.Y)(s.In,{icon:(0,o.Y)(oV.default,{}),color:"neutral.400"})})]})};function oH(){var e,t,r=(e=["\n  background: var(\n    --card-color-navigational-theme-elevated-backgound-default,\n    #efe9de\n  );\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return oH=function(){return r},r}var oZ=(0,eA.Ay)(s.az).withConfig({componentId:"sc-960c5e50-0"})(oH());let oW=function(e){var t=e.url;return(0,o.Y)(oZ,{"data-test-id":"cookbook-import-tutorial-walkthrough-find-mockup",borderRadius:"border-radius-sm",display:"flex",alignItems:"center",justifyContent:"center",minHeight:"220px",py:"global.md-2",children:(0,o.Y)(oB,{url:t})})};var oK=r(166568),o$=r(509868);function oG(){var e,t,r=(e=["\n  background: var(\n    --card-color-navigational-theme-elevated-backgound-default,\n    #efe9de\n  );\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return oG=function(){return r},r}var oq=(0,eA.Ay)(s.az).withConfig({componentId:"sc-c01d03e4-0"})(oG()),oX="cookbook.import.tutorial_walkthrough.step.copy.share_sheet",oQ=function(e){var t=e.icon,r=e.label,n=e.highlighted,i=e["data-test-id"];return(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"center",gap:"global.xxs",children:[(0,o.Y)(s.az,{"data-test-id":i,backgroundColor:"global.white",borderRadius:"border-radius-circle",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderWidth:n?"2px":void 0,borderStyle:n?"solid":void 0,borderColor:n?"success.300":void 0,children:t}),(0,o.Y)(s.EY,{type:"body-xs-regular",color:"neutral.700",children:r})]})};let oJ=function(e){var t=e.url,r=(0,L.Ay)("cookbook").translateRaw,n=r("".concat(oX,".share"),{defaultValue:"Share"}),i=r("".concat(oX,".copy_link"),{defaultValue:"Copy link"}),a=r("".concat(oX,".more"),{defaultValue:"More"}),l=r("cookbook.import.tutorial_walkthrough.step.copy.link_copied",{defaultValue:"Link copied"});return(0,o.FD)(oq,{"data-test-id":"cookbook-import-tutorial-walkthrough-copy-mockup",borderRadius:"border-radius-sm",display:"flex",flexDirection:"column",alignItems:"center",gap:"global.sm-1",minHeight:"220px",py:"global.md-2",px:"global.sm-2",children:[(0,o.FD)(s.az,{display:"flex",flexDirection:["column","column","row"],alignItems:"center",gap:"global.sm-2",children:[(0,o.Y)(oB,{url:t}),(0,o.FD)(s.az,{display:"flex",gap:"global.sm-1",children:[(0,o.Y)(oQ,{icon:(0,o.Y)(s.In,{icon:(0,o.Y)(oK.default,{}),color:"neutral.700"}),label:n}),(0,o.Y)(oQ,{icon:(0,o.Y)(s.In,{icon:(0,o.Y)(th.default,{}),color:"neutral.700"}),label:i,highlighted:!0,"data-test-id":"cookbook-import-tutorial-walkthrough-copy-link-action"}),(0,o.Y)(oQ,{icon:(0,o.Y)(s.EY,{type:"body-md-bold",color:"neutral.700",children:"•••"}),label:a,"data-test-id":"cookbook-import-tutorial-walkthrough-copy-more-action"})]})]}),(0,o.Y)(s.dS,{type:"strong",variant:"v3",leadingIcon:(0,o.Y)(o$.A,{}),children:l})]})};function o0(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function o1(){var e=o0(["\n  display: flex;\n  align-items: center;\n  min-height: 48px;\n  border: 1px solid #e0e0e0;\n  border-radius: 999px;\n  padding: 8px 16px;\n  background: #ffffff;\n  box-shadow: 0px 1px 3px rgba(35, 26, 10, 0.06);\n  gap: 10px;\n"]);return o1=function(){return e},e}function o2(){var e=o0(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  min-height: 48px;\n  background: var(--color-brand-foreground-default, #067a46);\n  border-radius: 8px;\n  padding: 0 24px;\n  white-space: nowrap;\n  flex-shrink: 0;\n"]);return o2=function(){return e},e}function o4(){var e=o0(["\n  background: var(\n    --card-color-navigational-theme-elevated-backgound-default,\n    #efe9de\n  );\n"]);return o4=function(){return e},e}var o3=(0,eA.Ay)(s.az).withConfig({componentId:"sc-390237fd-0"})(o1()),o6=(0,eA.Ay)(s.az).withConfig({componentId:"sc-390237fd-1"})(o2()),o5=(0,eA.Ay)(s.az).withConfig({componentId:"sc-390237fd-2"})(o4());let o8=function(){var e=(0,L.Ay)("cookbook").translateRaw,t=e("cookbook.import.tutorial_walkthrough.step.paste.recipe_link",{defaultValue:"Paste a recipe link"}),r=e("cookbook.import.tutorial_walkthrough.step.paste.save",{defaultValue:"Save recipe"});
1return(0,o.Y)(o5,{"data-test-id":"cookbook-import-tutorial-walkthrough-paste-mockup",borderRadius:"border-radius-sm",display:"flex",alignItems:"center",justifyContent:"center",minHeight:"220px",py:"global.md-2",px:"global.md-1",children:(0,o.FD)(s.az,{display:"flex",flexDirection:["column","column","row"],gap:"global.sm-2",alignItems:"center",width:"100%",maxWidth:"380px",children:[(0,o.FD)(o3,{flex:"1",minWidth:0,children:[(0,o.Y)(s.In,{icon:(0,o.Y)(eP.default,{}),color:"neutral.400"}),(0,o.Y)(s.EY,{type:"body-sm-regular",color:"neutral.500",children:t})]}),(0,o.Y)(o6,{children:(0,o.Y)(s.EY,{type:"body-sm-bold",color:"global.white",children:r})})]})})},o7=function(e){var t=e.screen,r=e.selectedPlatform,n=e.onBack,i=e.onPrimaryAction,a=(0,L.Ay)("cookbook").translateRaw,l=oM.findIndex(function(e){return e.screen===t}),c=oM[l],u=oU[null!=r?r:"website"],p=oM.map(function(e,t){var r=a(e.listValueKey,{defaultValue:e.defaultListValue});return{listValue:r,href:"#",disabled:t!==l,progress:t<l?"completed":t===l?"current":"next","aria-label":r}}),d="find"===t?a(u.titleKey,{defaultValue:u.defaultTitle}):a(c.titleKey,{defaultValue:c.defaultTitle}),f="find"===t?a(u.bodyKey,{defaultValue:u.defaultBody}):a(c.bodyKey,{defaultValue:c.defaultBody}),b=a("cookbook.import.tutorial_walkthrough.footer.back",{defaultValue:"Back"}),m=a("cookbook.import.tutorial_walkthrough.footer.next",{defaultValue:"Next"}),h=a("cookbook.import.tutorial_walkthrough.footer.done",{defaultValue:"Done"});return(0,o.FD)(s.az,{display:"flex",flexDirection:"column",gap:"global.md-1",pt:"global.xxs-2","data-test-id":"cookbook-import-tutorial-walkthrough-step-".concat(t),children:[(0,o.Y)(s.si,{variant:"numbered",steps:p,customAriaLabel:a("cookbook.import.tutorial_walkthrough.stepper.aria_label",{defaultValue:"Walkthrough progress"})}),"paste"===t&&(0,o.Y)(o8,{}),"find"===t&&(0,o.Y)(oW,{url:u.urlText}),"copy"===t&&(0,o.Y)(oJ,{url:u.urlText}),(0,o.FD)(s.az,{children:[(0,o.Y)(s.EY,{as:"h2",type:"body-xl-bold",children:d}),(0,o.Y)(s.EY,{as:"p",type:"body-md-regular",color:"neutral.500",children:f})]}),(0,o.FD)(s.az,{display:"flex",justifyContent:"space-between",mt:"global.sm-1",children:[(0,o.Y)(s.$n.Secondary,{size:"lg",width:"fit-content",onClick:n,"data-test-id":"cookbook-import-tutorial-walkthrough-back",children:b}),(0,o.Y)(s.$n.Primary,{size:"lg",width:"fit-content",onClick:i,"data-test-id":"cookbook-import-tutorial-walkthrough-primary-action",children:"paste"===t?h:m})]})]})};var o9=r(817681),ne=r(109016),nt=r(694085),nr=r(528572),no="ImportTutorialWalkthrough",nn={find:1,copy:2,paste:3},ni={website:"url",instagram:"social_media",tiktok:"social_media",youtube:"social_media",facebook:"social_media"},na=function(e,t){var r=(0,X.$T)().trackJanusEvent,o=(0,n.useRef)(!1),i=(0,n.useRef)(!1),a=(0,n.useRef)(new Set),l=(0,n.useCallback)(function(e,t){try{t()}catch(t){(0,eT.Cp)(t,{tags:{event:e,component:"useTutorialWalkthroughTracking"}})}},[]);return(0,n.useEffect)(function(){if(!t){o.current=!1,i.current=!1,a.current.clear();return}if("platform"===e){if(o.current)return;o.current=!0,l("Cookbook_Drawer_SourceSelector_Impression",function(){return r(nt.j.janusEvent({uiComponent:nt.j.uiComponent({uiComponentName:"DiscoverSourceSelectorDrawer",uiComponentLabel:"Where's the recipe?"})}))})}else if("paste"===e)a.current.has(e)||(a.current.add(e),l("Cookbook_Drawer_RecipeImportTutorial_Impression",function(){return r(ne.k.janusEvent({uiComponent:ne.k.uiComponent({uiComponentName:no,uiComponentLabel:e,uiComponentPosition:nn[e]})}))})),i.current||(i.current=!0,l("Cookbook_Drawer_RecipeImportTutorialCompletion_Impression",function(){return r(o9.Q.janusEvent({uiComponent:o9.Q.uiComponent({uiComponentName:"ImportTutorialCompletion",uiComponentLabel:e,uiComponentPosition:nn[e]})}))}));else{if(a.current.has(e))return;a.current.add(e),l("Cookbook_Drawer_RecipeImportTutorial_Impression",function(){return r(ne.k.janusEvent({uiComponent:ne.k.uiComponent({uiComponentName:no,uiComponentLabel:e,uiComponentPosition:nn[e]})}))})}},[t,e,l,r]),{trackSourceSelect:(0,n.useCallback)(function(e,t){l("Cookbook_Select_Source_Button_Click",function(){var o;return r(nr.m.janusEvent({uiComponent:nr.m.uiComponent({uiComponentName:null!=(o=ni[e])?o:"other",uiComponentLabel:t})}))})},[l,r])}};let nl=function(e){var t=e.isOpen,r=e.onClose,i=e.initialScreen,a=(0,L.Ay)("cookbook").translateRaw,l=oT(i),c=l.screen,u=l.selectedPlatform,p=l.selectPlatform,d=l.next,f=l.back,b=l.reset,m=l.goTo,h=na(c,t).trackSourceSelect,y=(0,n.useCallback)(function(e){var t=oL.findIndex(function(t){return t.id===e}),r=oL[t];h(e,a(r.titleKey,{defaultValue:r.defaultTitle})),p(e)},[p,h,a]);(0,n.useEffect)(function(){t?i&&m(i):b()},[t]);var g=a("cookbook.import.tutorial_walkthrough.platform_select.title",{defaultValue:"Where's the recipe?"}),v=a("cookbook.import.tutorial_walkthrough.platform_select.subtitle",{defaultValue:"Pick a website to save your recipe."}),k=oM.find(function(e){return e.screen===c}),w=oU[null!=u?u:"website"],O=g;return"find"===c?O=a(w.titleKey,{defaultValue:w.defaultTitle}):k&&(O=a(k.titleKey,{defaultValue:k.defaultTitle})),(0,o.Y)(s.lG,{isOpen:t,onClose:r,onDismiss:r,headless:!0,hasCloseButton:!0,width:["90%","90%","620px"],dialogCustomOverflow:"auto",dialogBodyMinHeight:"auto",padding:["global.md-1","global.md-1","global.md-2"],"aria-label":O,"data-test-id":"
1cookbook-import-tutorial-walkthrough-dialog",children:(0,o.FD)(s.az,{display:"flex",flexDirection:"column",gap:"global.md-1",children:["platform"===c&&(0,o.FD)(o.FK,{children:[(0,o.FD)(s.az,{textAlign:"center",children:[(0,o.Y)(s.EY,{as:"h2",type:"body-xl-bold",children:g}),(0,o.Y)(s.EY,{as:"p",type:"body-md-regular",color:"neutral.500",children:v})]}),(0,o.Y)(oF,{onSelectPlatform:y})]}),"platform"!==c&&(0,o.Y)(o7,{screen:c,selectedPlatform:u,onBack:f,onPrimaryAction:"paste"===c?r:d})]})})};var nc=r(24084);let nu=function(e){var t=e.isOpen,r=e.onClose,n=e.recipeTitles,i=e.firstRecipeThumbnailUrl,a=(0,L.Ay)("cookbook").translateRaw,c=(0,eK.kW)(),u=(0,l.r)(),p=(0,tM.k)(),d=function(e){p.setItem("hf_cookbook_pending_transfer_titles",n),u.push("".concat(e,"?redirectUrl=").concat(encodeURIComponent("/cookbook/import"),"&displayCookbookBanner=true"))},f=a("cookbook.import.sign_in_nudge.titles_heading",{count:String(n.length),defaultValue:"Your ".concat(n.length," saved recipes are waiting")}),b=n.join(", ");return(0,o.Y)(s.lG,{isOpen:t,onClose:r,onDismiss:r,headless:!0,hasCloseButton:!0,width:["100%","100%","480px"],fullScreen:"mobile"===c,dialogCustomOverflow:"auto",dialogBodyMinHeight:["100%","100%","auto"],padding:["global.md-1","global.md-1","global.md-2"],"aria-label":a("cookbook.import.sign_in_nudge.title",{defaultValue:"Sign in to keep saving"}),"data-test-id":"cookbook-import-sign-in-nudge-modal",children:(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:"global.sm-2",py:"global.sm-2",children:[(0,o.Y)(tJ.Ay,{src:"/hellofresh_website/cookbook/landing-page/sign-in-nudge.png",alt:"","aria-hidden":"true",width:160,height:160,style:{objectFit:"contain"},"data-test-id":"cookbook-import-sign-in-nudge-illustration"}),(0,o.Y)(s.EY,{as:"h2",type:"body-xl-bold",children:a("cookbook.import.sign_in_nudge.title",{defaultValue:"Sign in to keep saving"})}),(0,o.Y)(s.EY,{as:"p",type:"body-md-regular",color:"neutral.700",children:a("cookbook.import.sign_in_nudge.subtitle",{defaultValue:"Save your recipes and never lose them."})}),n.length>0&&(0,o.FD)(s.az,{"data-test-id":"cookbook-import-sign-in-nudge-titles",backgroundColor:"global.white",borderRadius:"border-radius-sm",borderWidth:"1px",borderColor:"neutral.300",borderStyle:"solid",width:"100%",mt:"global.sm-1",px:"global.md-1",py:"global.sm-2",display:"flex",alignItems:"center",gap:"global.sm-2",textAlign:"left",children:[i&&(0,o.Y)(tJ.Ay,{src:i,alt:"","aria-hidden":"true",width:56,height:56,style:{objectFit:"cover",borderRadius:"8px",flexShrink:0},unoptimized:!0,"data-test-id":"cookbook-import-sign-in-nudge-thumbnail"}),(0,o.FD)(s.az,{children:[(0,o.Y)(s.EY,{as:"p",type:"body-sm-bold",color:"neutral.800",children:f}),(0,o.FD)(s.EY,{as:"p",type:"body-sm-regular",color:"neutral.700",children:[b,"."]})]})]}),(0,o.FD)(s.az,{display:"flex",flexDirection:"column",gap:"global.xs",mt:"global.sm-2",width:"100%",children:[(0,o.Y)(s.$n.Primary,{size:"lg",onClick:function(){return d("/login")},"data-test-id":"cookbook-import-sign-in-nudge-signup-cta",children:a("cookbook.import.sign_in_nudge.signup_cta",{defaultValue:"Sign in to continue"})}),(0,o.Y)(s.$n.Secondary,{size:"lg",onClick:function(){return d("/login")},"data-test-id":"cookbook-import-sign-in-nudge-login-cta",children:a("cookbook.import.sign_in_nudge.login_cta",{defaultValue:"Log in"})})]})]})})};var ns=r(246178),np=r(681643),nd=r(252607),nf=r(652633),nb=function(){var e=(0,X.$T)().trackJanusEvent;return{trackClose:(0,n.useCallback)(function(){try{e(nf.Z.janusEvent())}catch(e){(0,eT.Cp)(e,{tags:{event:"Cookbook_Close_Onboarding_Modal_Click",component:"useTrackCookbookWelcomeCloseButtonClick"}})}},[e])}},nm=function(){var e=(0,X.$T)().trackJanusEvent;return{trackCtaClick:(0,n.useCallback)(function(){try{e(ez.M1.janusEvent({uiComponent:ez.M1.uiComponent({uiComponentName:"LetsGetStarted",uiComponentLabel:"Let's get started",uiComponentPosition:null}),uiModal:ez.M1.uiModal({uiModalName:ez.Fj.CookbookWelcome})}))}catch(e){(0,eT.Cp)(e,{tags:{event:"Cookbook_Start_Import_Button_Click",component:"useTrackCookbookWelcomeCtaButtonClick"}})}},[e])}},nh=r(404172),ny=function(){var e=(0,X.$T)().trackJanusEvent;return{trackImpression:(0,n.useCallback)(function(){try{e(nh.q.janusEvent())}catch(e){(0,eT.Cp)(e,{tags:{event:"Cookbook_Modal_CookbookWelcome_Impression",component:"useTrackCookbookWelcomeImpression"}})}},[e])}},ng=r(950641),nv=r(600389),nk={SCREEN:"cookbook-welcome",CTA:"cookbook-welcome-cta",FEATURE_LIST:"cookbook-welcome-feature-list",FEATURE_ROW:"cookbook-welcome-feature-row",EYEBROW:"cookbook-welcome-eyebrow",HEADLINE:"cookbook-welcome-headline",ILLUSTRATION:"cookbook-welcome-illustration"},nw={EYEBROW:"cookbook.welcome_drawer.eyebrow",EYEBROW_A11Y:"cookbook.welcome_drawer.eyebrow.accessibility_label",HEADLINE:"cookbook.welcome_drawer.headline",CTA:"cookbook.welcome_drawer.cta.label",CTA_A11Y_HINT:"cookbook.welcome_drawer.cta.accessibility_hint",CLOSE_A11Y_LABEL:"cookbook.welcome_drawer.close.accessibility_label",CLOSE_A11Y_HINT:"cookbook.welcome_drawer.close.accessibility_hint",FEATURE_SAVE:"cookbook.welcome_drawer.feature.save.label",FEATURE_SAVE_SUBTITLE:"cookbook.welcome_drawer.feature.save.subtitle",FEATURE_ORGANISE:"cookbook.welcome_drawer.feature.organise.label",FEATURE_ORGANISE_SUBTITLE:"cookbook.welcome_drawer.feature.organise.subtitle",FEATURE_PLAN:"cookbook.welcome_drawer.feature.plan.label",FEATURE_PLAN_SUBTITLE:"cookbook.welcome_drawer.feature.plan.subtitle",FEATURE_CREATE:"cookbook.welcome_drawer.feature.create.label",FEATURE_CREATE_SUBTITLE:"cookbook.welcome_drawer.feature.create.subtitle",FEATURE_KEEP:"cookbook.welcome_drawer.feature.keep.label",FEATURE_KEEP_SUBTITLE:"cookbook.welcome_drawer.feature.keep.subtitle"},nO={save:rz.default,organise:ng.default,plan:nv.default,create:e_.default,keep:null},nS=function(e){var t=e.item;return(0,o.FD)(s.az,{display:"flex",flexDirection:"row",alignItems:"center",gap:"global.sm-1","data-test-id":"".concat(nk.FEATURE_ROW,"-").concat(t.id),children:[(0,o.Y)(s.az,{display:"flex",alignItems:"center",justifyContent:"center",width:"".concat(40,"px"),height:"".concat(40,"px"),borderRadius:"border-radius-circle",backgroundColor:"alias.brand.background.lighter",flexShrink:0,"aria-hidden":"true",children:"keep"===t.id?(0,o.Y)(s.EY,{type:"body-lg-regular",textAlign:"center",children:"∞"}
1):t.icon&&(0,o.Y)(s.In,{icon:(0,o.Y)(t.icon,{}),color:"neutral.800"})}),(0,o.FD)(s.az,{display:"flex",flexDirection:"column",gap:"global.none",flex:1,children:[(0,o.Y)(s.EY,{type:"body-md-bold",color:"neutral.800",children:t.label}),(0,o.Y)(s.EY,{type:"body-sm-regular",color:"neutral.700",children:t.subtitle})]})]})},nC={EYEBROW:"Welcome to Cookbook",EYEBROW_A11Y:"Welcome to Cookbook",HEADLINE:"Your recipes, all in one place",CTA:"Save your first recipe",CTA_A11Y_HINT:"Dismisses the welcome screen",CLOSE_A11Y_LABEL:"Close",CLOSE_A11Y_HINT:"Dismisses the welcome screen",FEATURE_SAVE:"Save recipes from anywhere",FEATURE_SAVE_SUBTITLE:"Social media, blogs, websites and HelloFresh.",FEATURE_ORGANISE:"Organise everything",FEATURE_ORGANISE_SUBTITLE:"Curate collections to keep your recipes easy to find.",FEATURE_PLAN:"Turn recipes into a grocery list",FEATURE_PLAN_SUBTITLE:"Use your saved recipes to plan what you need.",FEATURE_CREATE:"Create recipes from photos & notes",FEATURE_CREATE_SUBTITLE:"Share a link, upload a photo or paste your own text.",FEATURE_KEEP:"Cookbook is yours to keep",FEATURE_KEEP_SUBTITLE:"Your saved recipes stay with you, even if you cancel your subscription."},nj=function(){var e=(0,L.Ay)("cookbook").translateRaw;return{translations:{eyebrow:e(nw.EYEBROW,{defaultValue:nC.EYEBROW}),eyebrowA11y:e(nw.EYEBROW_A11Y,{defaultValue:nC.EYEBROW_A11Y}),headline:e(nw.HEADLINE,{defaultValue:nC.HEADLINE}),cta:e(nw.CTA,{defaultValue:nC.CTA}),ctaA11yHint:e(nw.CTA_A11Y_HINT,{defaultValue:nC.CTA_A11Y_HINT}),closeA11yLabel:e(nw.CLOSE_A11Y_LABEL,{defaultValue:nC.CLOSE_A11Y_LABEL}),closeA11yHint:e(nw.CLOSE_A11Y_HINT,{defaultValue:nC.CLOSE_A11Y_HINT})},featureItems:["save","organise","plan","create","keep"].map(function(t){var r="FEATURE_".concat(t.toUpperCase()),o="".concat(r,"_SUBTITLE");return{id:t,icon:nO[t],label:e(nw[r],{defaultValue:nC[r]}),subtitle:e(nw[o],{defaultValue:nC[o]})}})}},nx=r(799256),nP=function(){var e=(0,nx.I)();return{getVariants:function(t){return e?{initial:{opacity:1,y:0},animate:{opacity:1,y:0}}:{initial:{opacity:0,y:8},animate:{opacity:1,y:0,transition:{delay:.25+.2*t,duration:.22}}}},prefersReducedMotion:e}};function n_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var nA=function(){var e,t=(e=(0,n.useState)(!1),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return n_(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n_(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],i=t[1];return r?null:(0,o.Y)(s.az,{display:"flex",justifyContent:"flex-start",alignItems:"flex-start","aria-hidden":"true","data-test-id":nk.ILLUSTRATION,children:(0,o.Y)(tJ.Ay,{src:"https://media.hellofresh.com/hellofresh-website/cookbook/onboarding/welcome/welcome-hero-v5.gif",alt:"",width:96,height:182,unoptimized:!0,style:{objectFit:"contain"},onError:function(){return i(!0)}})})},nE=function(e){var t,r=e.onDismiss,i=e.onGetStarted,a=nj(),l=a.translations,c=a.featureItems,u=nP().getVariants,p=ny().trackImpression,d=nb().trackClose,f=nm().trackCtaClick,b=(0,eK.kW)(),m=(0,n.useRef)(null);(0,n.useEffect)(function(){p()},[p]);var h=function(){d(),r()},y=(0,o.FD)(s.az,{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"global.sm-1",children:[(0,o.Y)(nA,{}),(0,o.Y)(s.az,{mb:"global.xs",children:(0,o.Y)(s.dS,{type:"subtle",variant:"v6",size:"sm",fontWeight:"regular","data-test-id":nk.EYEBROW,"aria-label":null!=(t=l.eyebrowA11y)?t:l.eyebrow,children:l.eyebrow.toUpperCase()})}),(0,o.Y)(s.EY,{as:"h3",type:"body-xxl-bold",color:"neutral.800",textAlign:"left",mb:"global.sm-1","data-test-id":nk.HEADLINE,children:l.headline}),(0,o.Y)(s.az,{display:"flex",flexDirection:"column",width:"100%",gap:"global.sm-3",mb:"global.sm-2","data-test-id":nk.FEATURE_LIST,children:c.map(function(e,t){return(0,o.Y)(nd.P.div,{initial:u(t).initial,animate:u(t).animate,children:(0,o.Y)(nS,{item:e})},e.id)})}),(0,o.Y)(s.az,{width:"100%",pb:"global.xs",children:(0,o.Y)(s.$n.Primary,{size:"lg",appearance:"brand",width:"100%",onClick:function(){f(),i()},"data-test-id":nk.CTA,"aria-label":l.cta,"aria-description":l.ctaA11yHint,children:l.cta})})]});return"mobile"===b?(0,o.Y)(s._s.Container,{isModal:!0,isOpen:!0,placement:"bottom",width:"100%",returnFocusRef:m,onClose:h,onDismiss:h,isTouchMoveEnabled:!0,positionAbsoluteCloseButton:!0,"aria-label":l.headline,"data-test-id":nk.SCREEN,children:y}):(0,o.Y)(s.lG,{isOpen:!0,onClose:h,onDismiss:h,headless:!0,hasCloseButton:!0,width:["100%","100%","480px"],dialogCustomOverflow:"auto",dialogBodyMinHeight:["100%","100%","auto"],padding:["global.md-1","global.md-1","global.md-2"],"aria-label":l.headline,"data-test-id":nk.SCREEN,children:y})},nI=r(656547);function nY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var nR=function(){var e,t=(e=(0,nI.A)("hf_cookbook_welcome_drawer_seen",{defaultValue:"false"}),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return nY(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nY(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],o=t[1];return{hasSeen:"true"===r,markAsSeen:(0,n.useCallback)(function(){o("true")},[o])}},nT=function(e){var t=e.onDismiss,r=e.onGetStarted,n=(0,ns.dj)({runUsingStatsig:!0}),i=n.decide,a=n.isReady,l=(0,np.D)({runUsingStatsig:!0}),c=l.id,u=l.attributes,s=l.isReady,p=nR(),d=p.hasSeen,f=p.markAsSeen;if(!a||!s)return null;var b=i({experimentKey:"cookbook-welcome-web",experimentationUserId:c,experimentationUserAttributes:u}),m=b.variationKey,h=b.parameters;return!(a&&("Test"===m||(null==h?void 0:h.isEnabled)===!0))||d?null:(0,o.Y)(nE,{onDismiss:function(){f(),t()},onGetStarted:function(){f(),r()}})};function nD(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var nz=function(e){var t,r=e.isAtLimit,o=e.isCustomer,i=e.recipeTitles,a=e.firstRecipeThumbnailUrl,l=e.atCapArrival,c=(t=(0,n.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nD(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nD(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],s=c[1],p=(0,n.useRef)(null),d=(0,n.useRef)(!1);return(0,n.useEffect)(function(){if(!o){var e=p.current;p.current=r,null!==e&&!e&&r&&s(!0)}},[r,o]),(0,n.useEffect)(function(){!o&&!d.current&&l&&r&&(d.current=!0,s(!0))},[l,r,o]),{isOpen:u,open:(0,n.useCallback)(function(){o||s(!0)},[o]),close:(0,n.useCallback)(function(){return s(!1)},[]),recipeTitlesForCarryOver:i,firstRecipeThumbnailUrl:a}},nL=r(830742),nF=function(){var e=(0,ns.dj)({runUsingStatsig:!0}),t=e.decide,r=e.isReady,o=(0,np.D)({runUsingStatsig:!0}),n=o.id,i=o.attributes,a=o.isReady;if(!r||!a)return!1;var l=t({experimentKey:nL.QN,experimentationUserId:n,experimentationUserAttributes:i}),c=l.variationKey,u=l.parameters;return"Test"===c||(null==u?void 0:u.isEnabled)===!0},nM=r(965220),nN=r(731608),nU=r(521897),nV=r(887546),nB=r(760747),nH=r(45749),nZ=r(458287);let nW=function(e){var t=e.onDismiss,r=(0,L.Ay)("cookbook").translate,i=(0,nB.d)({userAction:"cookbookAppDownloadBannerAppInstall",gaEventLabel:"cookbookAppDownloadBannerAppInstall"}).handleDownloadClick,a=(0,nH.sq)(),l=a.trackBannerImpression,c=a.trackAppStoreBannerClick,u=a.trackCloseAppStoreIconClick;return(0,n.useEffect)(function(){l({impressionType:nZ.eK.NavigatedTo,uiComponentName:nH.yh,uiComponentLabel:"top"})},[l]),(0,o.FD)(s.az,{"data-test-id":"cookbook-app-download-banner",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"global.hellofresh.action-black.900",px:["global.sm-1","global.md-1","global.lg-1"],py:"global.sm-1",children:[(0,o.FD)(s.az,{display:"flex",alignItems:"center",gap:"global.sm-2",children:[(0,o.Y)(s.az,{display:["none","flex"],alignItems:"center",justifyContent:"center",borderRadius:"border-radius-lg",width:"36px",height:"36px",flexShrink:"0",backgroundColor:"global.mint.500",children:(0,o.Y)(s.In,{icon:(0,o.Y)(nV.default,{}),color:"global.white"})}),(0,o.FD)(s.az,{display:"flex",flexDirection:"column",mr:"global.sm-1",children:[(0,o.Y)(s.EY,{color:"global.white",type:"body-sm-bold",children:r("cookbook.app-download-banner.title",{defaultValue:"Get the HelloFresh app to keep cooking on the go."})}),(0,o.Y)(s.az,{display:["none","block"],children:(0,o.Y)(s.EY,{c
1olor:"neutral.400",type:"body-sm-regular",children:r("cookbook.app-download-banner.subtitle",{defaultValue:"Browse all your saves, organize collections, auto-build your grocery list."})})})]})]}),(0,o.FD)(s.az,{display:"flex",alignItems:"center",gap:["zero","global.md-1"],flexShrink:"0",children:[(0,o.Y)(s.az,{backgroundColor:"global.white",borderRadius:"border-radius-md",children:(0,o.Y)(s.$n.Tertiary,{onClick:function(){c({uiComponentName:nH.yh,uiComponentLabel:"DownloadFree"}),i()},size:"sm",width:"fit-content","data-test-id":"cookbook-app-download-banner-cta",children:r("cookbook.app-download-banner.cta",{defaultValue:"Download free"})})}),(0,o.Y)(s.az,{p:"zero",children:(0,o.Y)(s.$n.Tertiary,{as:"button",onClick:function(){u({uiComponentName:nH.yh,uiComponentLabel:"dismiss"}),t()},"aria-label":"Dismiss","data-test-id":"cookbook-app-download-banner-dismiss",size:"sm",children:(0,o.Y)(s.In,{color:"global.white",icon:(0,o.Y)(nU.A,{})})})})]})]})};function nK(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var n$="cookbook-app-download-banner";let nG=function(){var e,t=(e=(0,nI.A)("hf_cookbook-app-banner-dismissed",{defaultValue:"false",expiresIn:7776e3}),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return nK(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nK(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],i=t[1],a=(0,p.A)("cookbook-app-download-banner").isEnabled,l="true"!==r&&a;(0,n.useEffect)(function(){return l?((0,nM.Bn)(nN.A.create((0,o.Y)(nW,{onDismiss:function(){i("true"),(0,nM.Uf)({id:n$})}}),{id:n$})),function(){(0,nM.Uf)({id:n$})}):void(0,nM.Uf)({id:n$})},[l,i])};function nq(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function nX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nq(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nq(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}let nQ=function(){var e,t,r,i,a,l,c,u=nX((0,n.useState)(!1),2),d=u[0],f=u[1],b=nX((0,n.useState)(!1),2),m=b[0],h=b[1],y=nX((0,n.useState)(),2),g=y[0],v=y[1],k=nX((0,n.useState)(!1),2),w=k[0],O=k[1],S=(0,n.useRef)(null);(0,n.useEffect)(function(){return f(!0)},[]);var C=ed(),j=C.recipes,x=C.isLoaded,P=C.importing,_=C.importError,A=C.validationError,E=C.clearValidationError,I=C.importErrorEvent,Y=C.isAtLimit,R=C.isCustomer,T=C.importRecipe,D=C.importRecipeFromImage,z=C.importRecipeFromText,F=C.removeRecipe,M=C.hasImportedRecipes,N=C.recipeTitles,U=C.firstRecipeThumbnailUrl,V=C.arrivedAtCap,B=C.hasMore,H=C.isLoadingMore,Z=C.loadMore,W=(0,p.A)(nL.gL).isEnabled,K=(0,p.A)(nL.r0).isEnabled;ts(I,K);var $=nF(),G=ex().status,q=nz({isAtLimit:Y,isCustomer:R,recipeTitles:N,firstRecipeThumbnailUrl:U,atCapArrival:V}),X=(0,n.useCallback)(function(e){return Y&&!R?(q.open(),!0):T(e)},[Y,R,q,T]),Q=(0,n.useCallback)(function(e){return Y&&!R?(q.open(),!0):D(e)},[Y,R,q,D]),J=(0,n.useCallback)(function(e){return Y&&!R?(q.open(),!0):z(e)},[Y,R,q,z]),ee=(0,n.useCallback)(function(){O(!1),E()},[E]),et=(0,n.useCallback)(function(e){X(e)&&ee()},[X,ee]),er=(0,n.useCallback)(function(e){Q(e)&&ee()},[Q,ee]),eo=(0,n.useCallback)(function(e){J(e)&&ee()},[J,ee]),en=(0,n.useCallback)(function(){if(K)return void O(!0);var e=S.current;e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.focus({preventScroll:!0}))},[K,S]),ei=(0,L.Ay)("cookbook").translateRaw;nG();var ea=(e=j.length,t=(0,L.Ay)("cookbook").translateRaw,a=(r=(0,n.use
1State)(""),i=function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(r,2)||function(e,t){if(e){if("string"==typeof e)return ef(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ef(e,t)}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],l=i[1],c=(0,n.useRef)(0),(0,n.useEffect)(function(){if(d){var r={count:String(e),limit:String(3)};e>c.current?l(t("cookbook.import.status.recipe_imported",em(eb({},r),{defaultValue:"Recipe imported. ".concat(e," of ").concat(3," saved.")}))):e<c.current&&l(t("cookbook.import.status.recipe_removed",em(eb({},r),{defaultValue:"Recipe removed. ".concat(e," of ").concat(3," saved.")}))),c.current=e}},[e,d,t]),a),el=j.length>0,ec=j.filter(function(e){return"creator"!==e.sourcePlatform&&"hellofresh"!==e.sourcePlatform}).length,eu=$&&d&&x&&!P&&!M&&el&&"empty"!==G&&"error"!==G,es=$&&d&&x&&!P&&M&&ec<5,ep=d&&x&&!M&&!P&&!eu&&!es&&W&&R,eh=(0,n.useCallback)(function(e){v(e),h(!0)},[]),ey=ok().trackNbaActionPress,eg=(0,n.useCallback)(function(e){var t;return(ey(e),"learn"===e)?void eh("find"):K?void O(!0):void(null==(t=S.current)||t.focus())},[ey,eh,K]);return(0,o.FD)(o.FK,{children:[K&&(0,o.Y)(ti,{}),(0,o.FD)(s.az,{maxWidth:["100%","100%","1144px"],mx:"auto",px:["global.sm-2","global.md-1","global.none"],py:["global.md-2","global.lg-1"],children:[(0,o.FD)(s.az,{mb:"global.md-2",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:"global.sm-1",children:[(0,o.FD)(s.az,{children:[(0,o.Y)(s.EY,{as:"h1",mb:"global.xxs","data-test-id":"cookbook-import-heading",children:ei("cookbook.import.heading",{defaultValue:"My cookbook"})}),(0,o.Y)(s.EY,{type:"body-md-regular",color:"neutral.500",children:R?ei("cookbook.import.subheading_customer",{limit:String(3),defaultValue:"Save recipes from any website and organize them into collections. Get the app for grocery lists and more."}):j.length>0?ei("cookbook.import.subheading_with_count",{count:String(j.length),limit:String(3),defaultValue:"".concat(j.length," of ").concat(3," saved — sign up to keep saving")}):ei("cookbook.import.subheading",{limit:String(3),defaultValue:"Save recipes from any website. Save ".concat(3," for free — sign up for unlimited.")})})]}),K&&(0,o.Y)(eW,{onClick:function(){return O(!0)}})]}),d&&!R&&(0,o.Y)(s.az,{mb:"global.md-2",children:(0,o.Y)(tV,{})}),!K&&(0,o.Y)(s.az,{mb:"global.md-2",children:(0,o.Y)(eH,{ref:S,onImport:X,onImageImport:Q,isLoading:P,isDisabled:!1,error:_})}),eu&&(0,o.Y)(od,{onSaveRecipePress:function(){return eh()},onLearnHowPress:function(){return eh()}}),es&&(0,o.Y)(s.az,{mb:"global.md-2",display:["block","block","none"],children:(0,o.Y)(oA,{onActionPress:eg})}),(0,o.Y)("div",{"aria-live":"polite",role:"status",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"},children:ea}),ep?(0,o.Y)(s.az,{mb:"global.md-2",children:(0,o.Y)(tL,{onCtaClick:function(){return eh()}})}):d&&x&&!el&&!P&&!eu&&!es&&(0,o.Y)(tp,{}),d&&(el||P||ep)&&(0,o.Y)(rp,{recipes:j,isCustomer:R,showSkeleton:P,recipeLimit:3,hasMore:B,isLoadingMore:H,onLoadMore:Z,onRemove:F,onEmptySlotClick:en,nextBestAction:es?(0,o.Y)(oA,{onActionPress:eg}):null})]}),d&&(0,o.Y)(r$,{isCustomer:R,onAtLimit:q.open}),!ep&&(0,o.Y)(nc.A,{maxWidth:"1144px"}),(0,o.Y)(nT,{onDismiss:function(){},onGetStarted:function(){return eh()}}),(0,o.Y)(nl,{isOpen:m,onClose:function(){return h(!1)},initialScreen:g}),K&&(0,o.Y)(tr,{isOpen:w,onClose:ee,onImport:et,onImageImport:er,onTextImport:eo,isLoading:P,isDisabled:!1,error:A,urlInputRef:S}),!R&&(0,o.Y)(nu,{isOpen:q.isOpen,onClose:q.close,recipeTitles:q.recipeTitlesForCarryOver,firstRecipeThumbnailUrl:q.firstRecipeThumbnailUrl})]})};var nJ=r(79955),n0=r(578543),n1=function(){var e=(0,nJ.X)(),t=e.isEnabled,r=e.isReady,i=(0,l.r)();return(0,X.op)(n0.L3.Cookbook),(0,n.useEffect)(function(){r&&!t&&i.replace("/cookbook")},[r,t,i]),(0,o.FD)(o.FK,{children:[(0,o.Y)(a(),{children:(0,o.Y)("meta",{name:"robots",content:"noindex,nofollow"},"robots")}),(0,o.Y)(u.A,{}),r&&t&&(0,o.Y)(nQ,{})]})};n1.customLayout=c.Ay,n1.provideCustomLayoutProps=function(){return{}};var n2=!0;let n4=n1},710091:(e,t,r)=>{"use strict";r.d(t,{kU:()=>b,ql:()=>m});var o=r(674562),n=r(6083),i=r(127944),a=r(771562),l=r(470663),c=r(211654),u=r(47856);function s(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var f=function(){var e,t=(e=function(e,t){var r,o,i,l,c,u,s,f,b,m,h=arguments;return function(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(y){switch(y.label){case 0:return o=void 0===(r=e.usePublicAuth)||r,i=e.limit,l=e.cursor,c=e.systemCountry,u=e.locale,s=e.parentSpan,[4,(h.length>2&&void 0!==h[2]?h[2]:n.A)("/cookbook/v1/external-recipes",t,{query:p({country:c,locale:u,hf_public_id:(0,a.Ay)()},void 0!==i&&{limit:i},void 0!==l&&{cursor:l}),parentSpan:s,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"get-external-recipes"}},{usePublicAuth:o})];case 1:return b=(f=y.sent()).headers.get("X-Free-Recipe-Save-Count"),m=f.headers.get("X-Free-Recipe-Save-Limit"),[4,f.json()];case 2:return[2,d(p({},y.sent()),{freeRecipeSaveCount:b?parseInt(b,10):null,freeRecipeSaveLimit:m?parseInt(m,10):null})]}})},function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){s(i,o,n,a,l,"next",e)}function l(e){s(i,o,n,a,l,"throw",e)}a(void 0)})});return function(e,r){return t.apply(this,arguments)}}(),b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,i.A)().fetch,n=(0,l.A)(),a=p(d(p({},e),{usePublicAuth:!n}),(0,c.j)()),s=[u.A["externalRecipes.list"],a];return(0,o.useQuery)(s,function(){return f(a,s,r)},p({staleTime:3e5,cacheTime:6e5},t))},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,i.A)().fetch,n=(0,l.A)(),a=p(d(p({},e),{usePublicAuth:!n}),(0,c.j)()),s=[u.A["externalRecipes.list"],a];return(0,o.useInfiniteQuery)(s,function(e){var t;return f(p({},a,null!=(t=e.pageParam)?t:{}),s,r)},p({getNextPageParam:function(e){return e.pagination.has_more?{cursor:e.pagination.next_cursor}:void 0},staleTime:3e5,cacheTime:6e5},t))}},731608:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var o=r(663516),n=r(965220);function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let l=function(){var e,t;function r(e,t){var n,i=this;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");a(this,"id",void 0),a(this,"delayedTimer",void 0),a(this,"content",void 0),this.content=e,this.id=null!=(n=null==t?void 0:t.id)?n:(0,o.A)(),this.delayedTimer=(null==t?void 0:t.delayedTimer)?setTimeout(function(){return i.close()},t.delayedTimer):void 0}return e=[{key:"close",value:function(){var e=this;this.delayedTimer&&clearTimeout(this.delayedTimer),(0,n.c3)(function(t){return t.id==e.id}),(0,n.eE)()}}],t=[{key:"create",value:function(e,t){return new r(e,t)}}],e&&i(r.prototype,e),t&&i(r,t),r}()},760747:(e,t,r)=>{"use strict";r.d(t,{d:()=>p});var o=r(75834),n=r(277944),i=r(384652);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c="7bdjd1g",u="hellofresh://cookbook?forceVideo=true",s=function(e,t){return"https://app.adjust.com/".concat(e,"?deep_link=").concat(encodeURIComponent(t))},p=function(e){var t=e.userAction,r=e.gaEventLabel,a=e.deepLinkParams,p=(0,n.O)().userAgent,d=(0,i.A)().push,f=a?"".concat(u,"&").concat(new URLSearchParams(a)):u,b=l((0,o.useState)(s(c,f)),2),m=b[0],h=b[1],y=l((0,o.useState)("iOS"),2),g=y[0],v=y[1];return(0,o.useEffect)(function(){var e,t=/Android/i.test((null==p||null==(e=p.getResult())?void 0:e.ua)||"");h(s(t?"qfxjg4i":c,f)),v(t?"Android":"iOS")},[p,f]),{handleDownloadClick:function(){d({event:"gaEventTrigger",event_name:"Navigation_PageCTAclick",user_action:t,gaEventCategory:"navigation",gaEventAction:"CTA",gaEventLabel:r,mobileDevice:g}),window.open(m,"_blank","noopener,noreferrer")}}}},786571:(e,t,r)=>{"use strict";r.d(t,{c:()=>y});var o=r(674562),n=r(6083),i=r(127944),a=r(470663),l=r(211654),c=r(47856);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function s(e,t,r,o,n,i,a){try{var l=e[i](a),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(o,n)}function p(e){return function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(e){s(i,o,n,a,l,"next",e)}function l(e){s(i,o,n,a,l,"throw",e)}a(void 0)})}}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function f(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function b(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var m=function(e,t){for(var r=[],o=0;o<e.length;o+=t)r.push(e.slice(o,o+t));return r},h=function(){var e=p(function(e,t){var r,o,i,a,l,c,u,s,d,f,h=arguments;return b(this,function(y){switch(y.label){case 0:var g;if(r=e.bookmarkIds,i=void 0!==(o=e.usePublicAuth)&&o,a=e.systemCountry,l=e.locale,c=e.parentSpan,u=h.length>2&&void 0!==h[2]?h[2]:n.A,0===r.length)return[2,{bookmarkIds:[],recipeIdsByBookmarkId:{}}];return[4,Promise.all(m(r,50).map((g=p(function(e){return b(this,function(r){switch(r.label){case 0:return[4,u("/cookbook/v1/internal-recipes/search",t,{method:"POST",headers:{"Content-Type":"application/json"},query:{country:a,locale:l},data:{bookmark_ids:e},parentSpan:c,fetchSpanAttributes:{"request.backend_service":"cookbook-api","request.backend_action":"search-bookmarked-recipes"}},{usePublicAuth:i})];case 1:return[4,r.sent().json()];case 2:return[2,r.sent()]}})}),function(e){return g.apply(this,arguments)})))];case 1:return s=y.sent(),d=new Set,f={}
1,s.forEach(function(e){var t;return null==(t=e.recipes)?void 0:t.forEach(function(e){d.add(e.bookmark_id),f[e.bookmark_id]=e.id})}),[2,{bookmarkIds:Array.from(d),recipeIdsByBookmarkId:f}]}})});return function(t,r){return e.apply(this,arguments)}}(),y=function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(0,i.A)().fetch,p=(0,a.A)(),b=((function(e){if(Array.isArray(e))return u(e)})(t=e.bookmarkIds)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(),m=d(f(d({},e),{bookmarkIds:b,usePublicAuth:!p}),(0,l.j)()),y=[c.A["internalRecipes.search"],m],g=null==(r=n.enabled)||r;return(0,o.useQuery)(y,function(){return h(m,y,s)},f(d({staleTime:3e5,cacheTime:6e5,suspense:!1},n),{enabled:p&&b.length>0&&g}))}},827056:(e,t,r)=>{"use strict";r.d(t,{T:()=>n});var o=r(52929),n=function(e){switch(e){case void 0:case"":return o._3.Unknown;case"hellofresh":return o._3.HelloFresh;case"creator":return o._3.Creator;default:return o._3.External}}},830742:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,AS:()=>i,QN:()=>c,gL:()=>a,r0:()=>l,vh:()=>o});var o="cookbook_anonymous_web_import_enabled",n="cookbook_web_preview_enabled",i="cookbook_import_unified_recipe_view",a="cookbook_web_import_tutorial",l="cookbook_import_dialog",c="cookbook_empty_state_redesign_web"},844725:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);
1return(0,o.FD)("svg",i(n(i(n({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.232 7.49 14.8 3.923a2 2 0 1 0-2.829-2.828L8.325 4.74l-4.05 1.186c-3.587 1.05-4.878 5.61-2.325 8.207 2.554 2.597 7.037 1.284 8.07-2.364l1.212-4.28Zm1.555-5.429a.7.7 0 0 1 .94-.045.606.606 0 0 1 .255.551.698.698 0 0 1-.205.485L9.967 6.86l-.99-.99 2.202-2.202a.399.399 0 0 0 .676.218l.85-.85a.399.399 0 0 0-.218-.676l.3-.3ZM4.659 7.283c-2.11.618-3.048 2.814-2.49 4.579.547-1.44 2.017-3.244 3.755-4.317l1.95-1.204-3.215.942Zm4.027 4.095c-.632 2.234-2.945 3.175-4.71 2.456 1.43-.524 3.261-2.047 4.341-3.856L9.774 7.54l-1.088 3.84Zm-5.55 1.612-.004-.011a.049.049 0 0 1 .003.01Zm.003-.179.054-.008c.294-.052.726-.22 1.244-.54A9.08 9.08 0 0 0 7.3 9.35l1.172-1.963-1.93 1.192c-1.18.729-2.237 1.863-2.864 2.912-.314.527-.48.966-.53 1.266l-.01.054Zm-.165.007-.01-.003.01.003Z",fill:"currentColor"})]}))}},887546:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M11 6v8l-3-3-1.5 1.5L12 18l5.5-5.5L16 11l-3 3V6h-2Z",fill:"currentColor"}),(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z",fill:"currentColor"})]}))}},950641:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M6 2h12v2H6V2Z",fill:"currentColor"}),(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 10v12h20V10H2Zm18 2H4v8h16v-8Z",fill:"currentColor"}),(0,o.Y)("path",{d:"M20 6H4v2h16V6Z",fill:"currentColor"})]}))}},980046:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);
1"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{d:"M20.874 6.483a.886.886 0 0 1 .01.895 4.458 4.458 0 0 0-.726 2.892v-.002c.196 2.843-1.436 5.827-4.406 7.508-2.97 1.68-6.444 1.58-8.888.01v.001a4.783 4.783 0 0 0-2.941-.819.939.939 0 0 1-.797-.452.886.886 0 0 1-.009-.896 4.457 4.457 0 0 0 .724-2.891v.002C3.647 9.887 5.28 6.903 8.248 5.224c2.97-1.679 6.445-1.581 8.888-.01a4.785 4.785 0 0 0 2.942.82c.328.003.63.173.796.449Z",fill:"currentColor"})]}))}},996708:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var o=r(126811);function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(75834);let a=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["title","titleId"]);return(0,o.FD)("svg",i(n(i(n({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),a),{children:[t?(0,o.Y)("title",{id:r,children:t}):null,(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.388 15.827a7.123 7.123 0 1 1 1.44-1.439L20 18.561 18.561 20l-4.173-4.173Zm.822-5.704a5.088 5.088 0 1 1-10.175 0 5.088 5.088 0 0 1 10.175 0Z",fill:"currentColor"})]}))}}},e=>{e.O(0,[82097,80626,90213,20269,10083,58307,67448,27471,19743,10560,41323,20687,73038,95722,19510,13646,63453,64057,76894,15142,76163,14993,8282,46859,14368,95583,41956,26036,77935,90636,46593,38792],()=>e(e.s=429239)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.