@gurpinderjitsingh/recipe-ui 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/cjs/app-modal_7.cjs.entry.js +12 -14
  2. package/dist/cjs/app-toast.cjs.entry.js +2 -2
  3. package/dist/cjs/{index-0Jp0srDV.js → index-CRcwY0Fb.js} +6 -416
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/recipe-ui.cjs.js +2 -2
  7. package/dist/collection/components/app-modal/app-modal.css +8 -41
  8. package/dist/collection/components/app-modal/app-modal.js +2 -5
  9. package/dist/collection/components/app-toast/app-toast.js +1 -1
  10. package/dist/collection/components/meal-plan-day/meal-plan-day.css +149 -13
  11. package/dist/collection/components/meal-plan-day/meal-plan-day.js +23 -8
  12. package/dist/collection/components/recipe-card/recipe-card.js +1 -1
  13. package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.js +1 -1
  14. package/dist/collection/components/recipe-form/recipe-form.js +1 -1
  15. package/dist/collection/components/recipe-rating/recipe-rating.js +1 -1
  16. package/dist/collection/components/recipe-search-bar/recipe-search-bar.js +1 -1
  17. package/dist/components/app-modal.js +1 -1
  18. package/dist/components/app-toast.js +1 -1
  19. package/dist/components/index.js +1 -1
  20. package/dist/components/meal-plan-day.js +1 -1
  21. package/dist/components/p-BJU3HdRm.js +1 -0
  22. package/dist/components/{p-iruuKwXb.js → p-BUu-OE2n.js} +1 -1
  23. package/dist/components/{p-DzNqfLiF.js → p-Bi4G3e9f.js} +1 -1
  24. package/dist/components/{p-CwBR8qrC.js → p-Bj2iIXUo.js} +1 -1
  25. package/dist/components/p-BqnbT3UL.js +1 -0
  26. package/dist/components/{p-Cn-9hkL0.js → p-DXdnWxeM.js} +1 -1
  27. package/dist/components/p-Dp1sKtrN.js +1 -0
  28. package/dist/components/p-S4266va_.js +1 -0
  29. package/dist/components/{p-C300pX48.js → p-Xf30T5IO.js} +1 -1
  30. package/dist/components/recipe-card.js +1 -1
  31. package/dist/components/recipe-filter-bar.js +1 -1
  32. package/dist/components/recipe-form.js +1 -1
  33. package/dist/components/recipe-rating.js +1 -1
  34. package/dist/components/recipe-search-bar.js +1 -1
  35. package/dist/esm/app-modal_7.entry.js +12 -14
  36. package/dist/esm/app-toast.entry.js +2 -2
  37. package/dist/esm/{index-Cq6PCsWh.js → index-CrZUP9M-.js} +6 -416
  38. package/dist/esm/index.js +1 -1
  39. package/dist/esm/loader.js +3 -3
  40. package/dist/esm/recipe-ui.js +3 -3
  41. package/dist/recipe-ui/index.esm.js +1 -1
  42. package/dist/recipe-ui/{p-47428346.entry.js → p-531fb6c4.entry.js} +1 -1
  43. package/dist/recipe-ui/p-CrZUP9M-.js +3 -0
  44. package/dist/recipe-ui/p-a8cd146e.entry.js +1 -0
  45. package/dist/recipe-ui/recipe-ui.esm.js +1 -1
  46. package/dist/types/components/meal-plan-day/meal-plan-day.d.ts +2 -7
  47. package/dist/types/components.d.ts +11 -28
  48. package/package.json +1 -1
  49. package/dist/components/p-BioNY75Q.js +0 -1
  50. package/dist/components/p-BjeRE-Yp.js +0 -1
  51. package/dist/components/p-D4_zWccP.js +0 -1
  52. package/dist/components/p-q8BcbM65.js +0 -1
  53. package/dist/recipe-ui/p-6add6efb.entry.js +0 -1
  54. package/dist/recipe-ui/p-Cq6PCsWh.js +0 -3
@@ -0,0 +1,3 @@
1
+ function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},i=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u=new Map,f="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},d=t=>Promise.resolve(t),p=(()=>{try{return!!f.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),h=!!p&&(()=>!!f.document&&Object.getOwnPropertyDescriptor(f.document.adoptedStyleSheets,"length").writable)(),m=!1,v=[],y=[],b=()=>{var t;return(null==(t=f.document)?void 0:t.hidden)?j(g):a.raf(g)},$=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&a.u?j(g):b())},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},g=()=>{w(v),w(y),(m=v.length>0)&&b()},j=t=>d().then(t),S=$(y,!0);function O(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(h?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var M,E=new WeakMap,C=t=>"sc-"+t.h,N=t=>"object"==(t=typeof t)||"function"===t,x=(t,e,...n)=>{let o=null,l=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)if(o=e[n],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(i="function"!=typeof t&&!N(o))o+="";else if("function"!=typeof t&&void 0===o.u){s("Invalid vNode child");continue}i&&r?c[c.length-1].m+=o:c.push(i?A(null,o):o),r=i}};if(u(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=A(t,null);return f.v=e,c.length>0&&(f.$=c),f.j=l,f},A=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),L={},R=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},T=(t,e)=>null==t||N(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,D=(t,e)=>{const n=(t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$})(t);return{emit:t=>P(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},P=(t,e,n)=>{const o=a.ce(e,n);return t.dispatchEvent(o),o},H=(t,e,n,l,s,r)=>{if(n===l)return;let c=i(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,o=W(n);let i=W(l);e.remove(...o.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=N(l);if((c||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||s)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):i(f,u)?u.slice(2):u[2]+e.slice(3),n||l){const o=e.endsWith(z);e=e.replace(F,""),n&&a.rel(t,e,n,o),l&&a.ael(t,e,l,o)}},U=/\s/,W=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(U):[]),z="Capture",F=RegExp(z+"$"),V=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of q(Object.keys(l)))t in i||H(o,t,l[t],void 0,n,e.u);for(const t of q(Object.keys(i)))H(o,t,l[t],i[t],n,e.u)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var B=!1,G=!1,I=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=f.document.createTextNode(o.m);else{if(!f.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=f.document.createElement(o.S),V(null,o,G),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=I(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=M,l},Y=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=I(null,n,l),s&&(o[l].O=s,K(r,s,e)))},Z=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},_=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),J=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?("slot"!==e.S||B||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{a.u|=1;const e=t.closest(M.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(K(e,t,null!=n?n:null),t["s-sh"]=void 0)}a.u&=-2})(e.O.parentElement)),V(t,e,G),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const y="template"===n.S?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(_(d,m,l))J(d,m,l),d=e[++r],m=o[++c];else if(_(p,v,l))J(p,v,l),p=e[--a],v=o[--h];else if(_(d,v,l))J(d,v,l),K(y,d.O,p.O.nextSibling),d=e[++r],v=o[--h];else if(_(p,m,l))J(p,m,l),K(y,p.O,d.O),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(s=e[u],s.S!==m.S?i=I(e&&e[c],n,u):(J(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=I(e&&e[c],n,c),m=o[++c]),i&&K(d.O.parentNode,i,d.O)}r>a?Y(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&Z(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),Y(o,null,e,i,0,i.length-1)):!n&&null!==l&&Z(l,0,l.length-1)):t.m!==s&&(o.data=s)},K=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),Q=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},X=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Q(t,t.C);const n=()=>tt(t,e);if(!e)return S(n);queueMicrotask((()=>{n()}))},tt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.N.length&&t.N.forEach((t=>t(n))),l=rt(o,"componentWillLoad",void 0,n)):l=rt(o,"componentWillUpdate",void 0,n),l=et(l,(()=>rt(o,"componentWillRender",void 0,n))),et(l,(()=>ot(t,o,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=C(e),s=u.get(i);if(!f.document)return i;if(t=11===t.nodeType?t:f.document,s)if("string"==typeof s){let l,r=E.get(t=t.head||t);if(r||E.set(t,r=new Set),!r.has(i)){l=f.document.createElement("style"),l.textContent=s;const c=null!=(n=a.A)?n:k(f.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),h?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=E.get(t);if(e||E.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}h?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>it(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.L||A(null,null),s=(t=>t&&t.S===L)(e)?e:x(null,null,e);if(M=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.S=null,s.u|=4,t.L=s,s.O=i.O=o.shadowRoot||o,B=!(!(1&l.u)||128&l.u),J(i,s,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},it=t=>{const e=t.$hostElement$,n=t.i,o=t.C;rt(n,"componentDidRender",void 0,e),64&t.u?rt(n,"componentDidUpdate",void 0,e):(t.u|=64,ct(e),rt(n,"componentDidLoad",void 0,e),t.R(e),o||st()),t.M&&(t.M(),t.M=void 0),512&t.u&&j((()=>X(t,!1))),t.u&=-517},st=()=>{j((()=>P(f,"appload",{detail:{namespace:"recipe-ui"}})))},rt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,n,l)=>{const i=o(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(e),u=i.u,f=i.i;if(n=T(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.T){const t=l.T[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):i.N.push((()=>{i.i[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||X(i,!1)}}},ft=(e,n,l)=>{var i,s;const r=e.prototype;{e.watchers&&!n.T&&(n.T=R(e.watchers)),e.deserializers&&!n.D&&(n.D=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,T(t,i)),void ut(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return ut(this,e,t,n),void(1&l&&!s.i&&s.N.push((()=>{4096&n.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const o=()=>{const o=s.i[e];!s.l.get(e)&&o&&s.l.set(e,o),s.i[e]=T(t,i),ut(this,e,s.i[e],n)};s.i?o():s.N.push((()=>{o()}))}}}})}})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){a.jmp((()=>{var s;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&i!==l){const o=f.i,r=null==(s=n.T)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&t||1&r)&&o[s].call(o,i,l,e)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===i&&void 0===this[u];d&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,u);p||i==this[u]||h.get&&!h.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.T)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},at=async(t,e,n)=>{var o;let l;try{if(!(32&e.u)){if(e.u|=32,e.u&=-1025,n.H){const i=((t,e)=>{var n;const o=t.h.replace(/-/g,"_"),l=t.H;if(!l)return;const i=r.get(l);if(i)return i[o];const u=null!=(n=c.get(l))?n:0,f=[u>0?"s-retry="+u:"",""].filter(Boolean).join("&");
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
3
+ return import(`./${l}.entry.js${f?"?"+f:""}`).then((t=>(c.delete(l),r.set(l,t),t[o])),(t=>{c.set(l,u+1),s(t,e.$hostElement$)}))})(n,e);if(i&&"then"in i){const t=()=>{};l=await i,t()}else l=i;if(!l)throw e.u&=-33,e.U=(null!=(o=e.U)?o:0)+1,e.U<3&&(e.u|=1024),Error(`Constructor for "${n.h}#${e.W}" was not found`);l.isProxied||(n.T=R(l.watchers),n.P=l.serializers,n.D=l.deserializers,ft(l,n,2),l.isProxied=!0);const u=()=>{};e.u|=8;try{new l(e)}catch(e){s(e,t)}e.u&=-9,e.u|=128,u(),dt(e.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=C(n);if(!u.has(e)){const o=()=>{};((t,e,n)=>{let o=u.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,u.set(t,o)})(e,t,!!(1&n.u)),o()}}}const i=e.C,f=()=>X(e,!0);i&&i["s-rc"]?i["s-rc"].push(f):f()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),!e.R||1024&e.u||e.R(t)}},dt=(t,e)=>{rt(t,"connectedCallback",void 0,e)},pt=(t,e)=>{rt(t,"disconnectedCallback",void 0,e||t)},ht=(t,e={})=>{var n;if(!f.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],i=e.exclude||[],s=f.customElements,r=f.document.head,c=r.querySelector("meta[charset]"),u=f.document.createElement("style"),d=[];let p,h=!0;if(Object.assign(a,e),a.p=new URL(e.resourcesUrl||"./",f.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,r;const c={u:e[0],h:e[1],t:e[2],F:e[3]};c.t=e[2],c.T=R(e[4]),c.P=null!=(n=e[5])?n:{},c.D=null!=(r=e[6])?r:{};const u=c.h,f=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,V:new Map};n.q=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.N=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,c),1&c.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else O.call(t,c)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),p&&(clearTimeout(p),p=null),h?d.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?dt(e.i,t):1024&e.u?setTimeout((()=>at(t,e,n)),1e3):(null==e?void 0:e.q)&&e.q.then((()=>dt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Q(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),at(t,e,n)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=o(t);(null==e?void 0:e.i)?pt(e.i,t):(null==e?void 0:e.q)&&e.q.then((()=>pt(e.i,t)))}E.has(t)&&E.delete(t),t.shadowRoot&&E.has(t.shadowRoot)&&E.delete(t.shadowRoot)})(this))),j((()=>{var t;const e=o(this);if(!e)return;const n=d.findIndex((t=>t===this));n>-1&&d.splice(n,1),(null==(t=null==e?void 0:e.L)?void 0:t.O)instanceof Node&&!e.L.O.isConnected&&delete e.L.O}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.q}};c.H=t[0],i.includes(u)||s.get(u)||(l.push(u),s.define(u,ft(f,c,1)))}))})),l.length>0&&(u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(n=a.A)?n:k(f.document);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}h=!1,d.length?d.map((t=>t.connectedCallback())):a.jmp((()=>p=setTimeout(st,30)))},mt=t=>a.A=t;export{ht as b,D as c,x as h,d as p,l as r,mt as s}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as a}from"./p-CrZUP9M-.js";const i=class{constructor(a){e(this,a),this.favoriteToggle=t(this,"favoriteToggle"),this.cardClick=t(this,"cardClick"),this.category="",this.favorite=!1,this.onFavoriteClick=e=>{e.stopPropagation(),this.favoriteToggle.emit({favorite:!this.favorite})}}render(){return a("div",{key:"ab4f6e822f8b961d15c49d488af4e9b617ae71d2",class:"card",onClick:()=>this.cardClick.emit()},a("div",{key:"f57fc00e484283bd223f7e8557af7e76de33217e",class:"image-wrap"},this.image?a("img",{src:this.image,alt:this.recipeTitle}):a("div",{class:"placeholder"}),a("button",{key:"2f05b10aa6de8f6d51e0a216567a65900011a198",class:{"fav-btn":!0,active:this.favorite},onClick:this.onFavoriteClick,"aria-label":"Toggle favorite"},this.favorite?"★":"☆")),a("div",{key:"bb120c622bef2e7ae8abfedf31ba988a66d393c3",class:"body"},a("h3",{key:"2b0115c0ae28b302e35a00e0ed1a70d0b20712ab"},this.recipeTitle),this.category&&a("span",{key:"388a88c469547f04e7af2b1da0d303a28f499481",class:"category"},this.category),a("div",{key:"ff8e56f5a2ce08736ec9cef2a17bbcc2aad4b946",class:"actions"},a("slot",{key:"8952391cb6163493dc5ab27b690c4375ef535ac4",name:"actions"}))))}};i.style=":host{display:block;font-family:system-ui, sans-serif}.card{border:1px solid #e5e5e5;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:box-shadow 0.15s ease, transform 0.15s ease}.card:hover{box-shadow:0 4px 16px rgba(0, 0, 0, 0.08);transform:translateY(-2px)}.image-wrap{position:relative;aspect-ratio:4 / 3;background:#f2f2f2}.image-wrap img{width:100%;height:100%;object-fit:cover;display:block}.placeholder{width:100%;height:100%;background:linear-gradient(135deg, #eee, #ddd)}.fav-btn{position:absolute;top:8px;right:8px;border:none;background:rgba(255, 255, 255, 0.9);border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer;color:#f5a623}.fav-btn.active{color:#ff6b35}.body{padding:12px 14px}h3{margin:0 0 4px;font-size:15px;line-height:1.3}.category{font-size:12px;color:#777;text-transform:uppercase;letter-spacing:0.03em}.actions{margin-top:8px}";const s=class{constructor(a){e(this,a),this.search=t(this,"search"),this.placeholder="Search recipes...",this.value="",this.debounceMs=350,this.internalValue="",this.onInput=e=>{this.internalValue=e.target.value,clearTimeout(this.timer),this.timer=setTimeout((()=>{this.search.emit({value:this.internalValue})}),this.debounceMs)},this.onKeyDown=e=>{"Enter"===e.key&&(clearTimeout(this.timer),this.search.emit({value:this.internalValue}))}}componentWillLoad(){this.internalValue=this.value}onValuePropChange(e){this.internalValue=e}render(){return a("div",{key:"eb622258d322ed13168a4e4da4f6fecc67c5e3ea",class:"wrap"},a("input",{key:"5594cf8585234e21e4529a069ad9621631c9e103",type:"search",placeholder:this.placeholder,value:this.internalValue,onInput:this.onInput,onKeyDown:this.onKeyDown}),a("button",{key:"7540e7232d5071a65360c8196deda3461bfa8308",onClick:()=>this.search.emit({value:this.internalValue}),"aria-label":"Search"},"🔍"))}static get watchers(){return{value:[{onValuePropChange:0}]}}};s.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:6px}input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #ddd;font-size:14px;outline:none}input:focus{border-color:#ff6b35}button{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:0 16px;cursor:pointer;font-size:15px}";const o=class{constructor(a){e(this,a),this.filterChange=t(this,"filterChange"),this.categories=[],this.active=""}select(e){this.filterChange.emit({value:e})}render(){const e=Array.isArray(this.categories)?this.categories:[];return a("div",{key:"084a1e0d79a1916d07277e1c080ff779aba1aa79",class:"wrap"},a("button",{key:"f0b9b529d1dca7f98621404b174837b5b21163e7",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),e.map((e=>a("button",{class:{chip:!0,active:this.active===e},onClick:()=>this.select(e)},e))))}};o.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}";const r=class{constructor(a){e(this,a),this.ratingChange=t(this,"ratingChange"),this.value=0,this.readonly=!1,this.max=5}render(){const e=Array.from({length:this.max},((e,t)=>t+1));return a("div",{key:"19cb1bd17a6dc207c7e556ae026a4f343a784f50",class:"wrap",role:this.readonly?void 0:"radiogroup"},e.map((e=>a("span",{class:{star:!0,filled:e<=this.value,clickable:!this.readonly},onClick:()=>!this.readonly&&this.ratingChange.emit({value:e})},"★"))))}};r.style=":host{display:inline-block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:2px}.star{font-size:18px;color:#ddd}.star.filled{color:#f5a623}.star.clickable{cursor:pointer}";const c=class{constructor(a){e(this,a),this.save=t(this,"save"),this.cancel=t(this,"cancel"),this.title="",this.image="",this.category="",this.ingredients=[""],this.instructions="",this.errors={},this.onSubmit=e=>{if(e.preventDefault(),!this.validate())return;const t={id:this.initialData?.id,title:this.title.trim(),image:this.image.trim(),category:this.category.trim(),ingredients:this.ingredients.map((e=>e.trim())).filter(Boolean),instructions:this.instructions.trim()};this.save.emit(t)},this.addIngredient=()=>{this.ingredients=[...this.ingredients,""]},this.removeIngredient=e=>{this.ingredients=this.ingredients.filter(((t,a)=>a!==e))}}componentWillLoad(){this.loadInitialData()}onInitialDataChange(){this.loadInitialData()}loadInitialData(){let e;if("string"==typeof this.initialData&&this.initialData)try{e=JSON.parse(this.initialData)}catch{e=void 0}else this.initialData&&"object"==typeof this.initialData&&(e=this.initialData);e&&(this.title=e.title??"",this.image=e.image??"",this.category=e.category??"",this.ingredients=e.ingredients?.length?[...e.ingredients]:[""],this.instructions=e.instructions??"")}validate(){const e={};return this.title.trim()||(e.title="Title is required."),0===this.ingredients.map((e=>e.trim())).filter(Boolean).length&&(e.ingredients="Add at least one ingredient."),this.instructions.trim()||(e.instructions="Instructions are required."),this.errors=e,0===Object.keys(e).length}updateIngredient(e,t){const a=[...this.ingredients];a[e]=t,this.ingredients=a}render(){return a("form",{key:"6699f62ff8027114e5a0e3d154f8743048cf4d96",onSubmit:this.onSubmit},a("slot",{key:"8de0f7e758feb4fc6f1ea877c4acd7c41cbe13ed",name:"header"}),a("label",{key:"881275928734c4eabfee6d22b35cddad1af03853"},"Title",a("input",{key:"a55ae352c35cec0b2391061d48153151a7dc5e6b",type:"text",value:this.title,onInput:e=>this.title=e.target.value}),this.errors.title&&a("span",{key:"dbace66ddaab5ab5096acb39822c7cd3a18923be",class:"error"},this.errors.title)),a("label",{key:"ae1bcdb323ccaa03307b6a283fcc395ef49954c5"},"Image URL",a("input",{key:"6ee9483689e0304c0ae28ab755dc93e117d4952e",type:"text",value:this.image,onInput:e=>this.image=e.target.value})),a("label",{key:"751b54959a8e2c85e98f2b192a4d8aa83d8ebafe"},"Category",a("input",{key:"83f852c74727b86a1a8a6c9a0d93e9ffdb3f33f3",type:"text",value:this.category,onInput:e=>this.category=e.target.value})),a("div",{key:"6a7c99a86d601ed51ece26c85b4b45766a2dafdf",class:"field"},a("span",{key:"ee082917bb3b90ec45ce1feea234c374f7fc35a0"},"Ingredients"),this.ingredients.map(((e,t)=>a("div",{class:"ingredient-row"},a("input",{type:"text",value:e,onInput:e=>this.updateIngredient(t,e.target.value)}),a("button",{type:"button",onClick:()=>this.removeIngredient(t),"aria-label":"Remove"},"✕")))),a("button",{key:"4f81107c94bf8810dfc14aa58d5afcf55d8e126d",type:"button",class:"add-btn",onClick:this.addIngredient},"+ Add ingredient"),this.errors.ingredients&&a("span",{key:"d87cc375b194c187b64def1ef9840797dab1d456",class:"error"},this.errors.ingredients)),a("label",{key:"dc6c04a5a2b5cc7d1912f535b8904125ce74af56"},"Instructions",a("textarea",{key:"0c9c4b09da5b3f24addb66c18fccad7c900bebcb",rows:5,onInput:e=>this.instructions=e.target.value},this.instructions),this.errors.instructions&&a("span",{key:"f430772f46e5298b2a2522aaef2822a59df61a08",class:"error"},this.errors.instructions)),a("div",{key:"337abce7c4f93a9fbb90917e6b407dfb5b95039d",class:"footer"},a("slot",{key:"b8b610485f592592afb6cef682faeb13d52da6ea",name:"footer"}),a("button",{key:"faf249c9be390b5d574300d0ff24bcd0c5603a3c",type:"button",class:"cancel-btn",onClick:()=>this.cancel.emit()},"Cancel"),a("button",{key:"527146d147778940c28e5357c100d1809cbcd6df",type:"submit",class:"save-btn"},"Save Recipe")))}static get watchers(){return{initialData:[{onInitialDataChange:0}]}}};c.style=":host{display:block;font-family:system-ui, sans-serif}form{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#333;font-weight:600}input,textarea{font-weight:400;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.ingredient-row{display:flex;gap:6px}.ingredient-row input{flex:1}.ingredient-row button{border:none;background:#f4f4f4;border-radius:6px;cursor:pointer;width:30px}.add-btn{align-self:flex-start;border:1px dashed #bbb;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:#555}.error{color:#e74c3c;font-size:12px;font-weight:400}.footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.cancel-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 16px;cursor:pointer}.save-btn{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:8px 18px;cursor:pointer;font-weight:600}";const d=class{constructor(a){e(this,a),this.assignMeal=t(this,"assignMeal"),this.removeMeal=t(this,"removeMeal"),this.day="",this.meals=[],this.icon=""}render(){const e=Array.isArray(this.meals)?this.meals:[];return a("div",{key:"cd4f194f1eeb5f53a029f380c40aa0b4ec2f32f4",class:"day-col"},a("div",{key:"d88966142d5101fc522d5de89b6d4cab72cbbbf3",class:"col-header"},this.icon&&a("span",{key:"5a9a27a3a1909bcf7295ec7eeccf309e5e2d1ae0",class:"icon"},this.icon),a("h3",{key:"fd1fa2f1274cc1f6bd8917959015722cb69002ba"},this.day),e.length>0&&a("span",{key:"feff3bc91b52203dba19f7a87c56d3813fc95cdd",class:"count-badge"},e.length)),a("div",{key:"4afee9ce77bf1447bf9e32efc7e2f9b9571873e7",class:"meals"},e.map((e=>a("div",{class:"meal-chip"},a("div",{class:"thumb"},e.image&&a("img",{src:e.image,alt:e.title})),a("span",{class:"title"},e.title),a("button",{class:"remove-btn",onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":`Remove ${e.title}`},"✕")))),0===e.length&&a("p",{key:"9a4002b1b4516fc5ff6ef8f9a2e0a7f5e8465cbd",class:"empty"},"No meal planned")),a("button",{key:"2cef3c5f7d0e89303cb8989f78eefb95c426683f",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},a("span",{key:"ae54b56f8f0b01f45029e36919764ae31f3a38b9",class:"plus"},"+")," Add meal"))}};d.style=":host{display:block;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif}.day-col{background:#ffffff;border:1px solid #e8eaed;border-radius:12px;padding:14px;min-width:160px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 2px rgba(16, 24, 40, 0.04);transition:box-shadow 0.15s ease, border-color 0.15s ease}.day-col:hover{box-shadow:0 4px 12px rgba(16, 24, 40, 0.08);border-color:#d8dce1}.col-header{display:flex;align-items:center;gap:6px;padding-bottom:8px;border-bottom:1px solid #f0f1f3}.col-header .icon{font-size:15px;line-height:1}.col-header h3{margin:0;font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#4b5563;flex:1}.count-badge{background:#eef2ff;color:#4338ca;font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:999px;line-height:1.5}.meals{display:flex;flex-direction:column;gap:6px;min-height:44px}.meal-chip{display:flex;align-items:center;gap:8px;background:#f9fafb;border:1px solid #eef0f2;border-radius:9px;padding:6px 8px;font-size:12.5px;transition:background 0.12s ease}.meal-chip:hover{background:#f3f4f6}.thumb{width:28px;height:28px;border-radius:6px;overflow:hidden;flex-shrink:0;background:#e5e7eb}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.meal-chip .title{flex:1;color:#1f2937;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remove-btn{border:none;background:none;cursor:pointer;color:#9ca3af;font-size:11px;line-height:1;padding:3px;border-radius:5px;transition:color 0.12s ease, background 0.12s ease}.remove-btn:hover{color:#dc2626;background:#fef2f2}.empty{font-size:12px;color:#9ca3af;margin:6px 0;text-align:center;font-style:italic}.add-btn{display:flex;align-items:center;justify-content:center;gap:4px;border:1.5px dashed #d1d5db;background:none;border-radius:9px;padding:7px;font-size:12px;font-weight:600;cursor:pointer;color:#6b7280;transition:border-color 0.12s ease, color 0.12s ease, background 0.12s ease}.add-btn:hover{border-color:#6366f1;color:#4f46e5;background:#f5f5ff}.plus{font-size:14px;line-height:1}";const n=class{constructor(a){e(this,a),this.close=t(this,"close"),this.open=!1,this.modalTitle=""}render(){return this.open?a("div",{class:"overlay",onClick:()=>this.close.emit()},a("div",{class:"dialog",onClick:e=>e.stopPropagation()},a("div",{class:"header"},a("h2",null,this.modalTitle),a("button",{class:"close-btn",onClick:()=>this.close.emit(),"aria-label":"Close"},"✕")),a("div",{class:"body"},a("slot",null)))):null}};n.style=":host{font-family:system-ui, sans-serif}.overlay{position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);display:flex;align-items:center;justify-content:center;z-index:1000}.dialog{background:#fff;border-radius:12px;min-width:320px;max-width:90vw;max-height:85vh;overflow-y:auto;padding:20px;box-shadow:0 10px 40px rgba(0,0,0,0.2)}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.header h2{margin:0;font-size:18px}.close-btn{border:none;background:none;font-size:16px;cursor:pointer;color:#666}";export{n as app_modal,d as meal_plan_day,i as recipe_card,o as recipe_filter_bar,c as recipe_form,r as recipe_rating,s as recipe_search_bar}
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-Cq6PCsWh.js";export{s as setNonce}from"./p-Cq6PCsWh.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((async e=>(await i(),a([["p-6add6efb",[[260,"app-modal",{open:[4],modalTitle:[1,"modal-title"]}],[1,"meal-plan-day",{day:[1],meals:[16]}],[257,"recipe-card",{recipeTitle:[1,"recipe-title"],image:[1],category:[1],favorite:[4]}],[1,"recipe-filter-bar",{categories:[16],active:[1]}],[257,"recipe-form",{initialData:[1,"initial-data"],title:[32],image:[32],category:[32],ingredients:[32],instructions:[32],errors:[32]},null,{initialData:[{onInitialDataChange:0}]}],[1,"recipe-rating",{value:[2],readonly:[4],max:[2]}],[1,"recipe-search-bar",{placeholder:[1],value:[1],debounceMs:[2,"debounce-ms"],internalValue:[32]},null,{value:[{onValuePropChange:0}]}]]],["p-47428346",[[1,"app-toast",{message:[1],type:[1],duration:[2]}]]]],e))));
1
+ import{p as e,b as a}from"./p-CrZUP9M-.js";export{s as setNonce}from"./p-CrZUP9M-.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((async e=>(await i(),a([["p-a8cd146e",[[257,"app-modal",{open:[4],modalTitle:[1,"modal-title"]}],[1,"meal-plan-day",{day:[1],meals:[16],icon:[1]}],[257,"recipe-card",{recipeTitle:[1,"recipe-title"],image:[1],category:[1],favorite:[4]}],[1,"recipe-filter-bar",{categories:[16],active:[1]}],[257,"recipe-form",{initialData:[1,"initial-data"],title:[32],image:[32],category:[32],ingredients:[32],instructions:[32],errors:[32]},null,{initialData:[{onInitialDataChange:0}]}],[1,"recipe-rating",{value:[2],readonly:[4],max:[2]}],[1,"recipe-search-bar",{placeholder:[1],value:[1],debounceMs:[2,"debounce-ms"],internalValue:[32]},null,{value:[{onValuePropChange:0}]}]]],["p-531fb6c4",[[1,"app-toast",{message:[1],type:[1],duration:[2]}]]]],e))));
@@ -4,16 +4,11 @@ export interface PlannedMeal {
4
4
  title: string;
5
5
  image?: string;
6
6
  }
7
- /**
8
- * One column of the weekly meal planner, representing a single day.
9
- * `meals` is the list of recipes currently assigned to this day.
10
- * Emits `removeMeal` when a meal's remove button is clicked, and
11
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
12
- * is expected to open its own picker/modal and then update `meals`).
13
- */
14
7
  export declare class MealPlanDay {
15
8
  day: string;
16
9
  meals: PlannedMeal[];
10
+ /** Optional emoji/icon shown next to the label, e.g. "🌅" */
11
+ icon: string;
17
12
  assignMeal: EventEmitter<{
18
13
  day: string;
19
14
  }>;
@@ -40,18 +40,16 @@ export namespace Components {
40
40
  */
41
41
  "type": 'success' | 'error' | 'info';
42
42
  }
43
- /**
44
- * One column of the weekly meal planner, representing a single day.
45
- * `meals` is the list of recipes currently assigned to this day.
46
- * Emits `removeMeal` when a meal's remove button is clicked, and
47
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
48
- * is expected to open its own picker/modal and then update `meals`).
49
- */
50
43
  interface MealPlanDay {
51
44
  /**
52
45
  * @default ''
53
46
  */
54
47
  "day": string;
48
+ /**
49
+ * Optional emoji/icon shown next to the label, e.g. "🌅"
50
+ * @default ''
51
+ */
52
+ "icon": string;
55
53
  /**
56
54
  * @default []
57
55
  */
@@ -223,13 +221,6 @@ declare global {
223
221
  "assignMeal": { day: string };
224
222
  "removeMeal": { day: string; mealId: string };
225
223
  }
226
- /**
227
- * One column of the weekly meal planner, representing a single day.
228
- * `meals` is the list of recipes currently assigned to this day.
229
- * Emits `removeMeal` when a meal's remove button is clicked, and
230
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
231
- * is expected to open its own picker/modal and then update `meals`).
232
- */
233
224
  interface HTMLMealPlanDayElement extends Components.MealPlanDay, HTMLStencilElement {
234
225
  addEventListener<K extends keyof HTMLMealPlanDayElementEventMap>(type: K, listener: (this: HTMLMealPlanDayElement, ev: MealPlanDayCustomEvent<HTMLMealPlanDayElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
235
226
  addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -399,18 +390,16 @@ declare namespace LocalJSX {
399
390
  */
400
391
  "type"?: 'success' | 'error' | 'info';
401
392
  }
402
- /**
403
- * One column of the weekly meal planner, representing a single day.
404
- * `meals` is the list of recipes currently assigned to this day.
405
- * Emits `removeMeal` when a meal's remove button is clicked, and
406
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
407
- * is expected to open its own picker/modal and then update `meals`).
408
- */
409
393
  interface MealPlanDay {
410
394
  /**
411
395
  * @default ''
412
396
  */
413
397
  "day"?: string;
398
+ /**
399
+ * Optional emoji/icon shown next to the label, e.g. "🌅"
400
+ * @default ''
401
+ */
402
+ "icon"?: string;
414
403
  /**
415
404
  * @default []
416
405
  */
@@ -531,6 +520,7 @@ declare namespace LocalJSX {
531
520
  }
532
521
  interface MealPlanDayAttributes {
533
522
  "day": string;
523
+ "icon": string;
534
524
  }
535
525
  interface RecipeCardAttributes {
536
526
  "recipeTitle": string;
@@ -578,13 +568,6 @@ declare module "@stencil/core" {
578
568
  * Simple notification toast. Auto-dismisses after `duration` ms if > 0.
579
569
  */
580
570
  "app-toast": LocalJSX.IntrinsicElements["app-toast"] & JSXBase.HTMLAttributes<HTMLAppToastElement>;
581
- /**
582
- * One column of the weekly meal planner, representing a single day.
583
- * `meals` is the list of recipes currently assigned to this day.
584
- * Emits `removeMeal` when a meal's remove button is clicked, and
585
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
586
- * is expected to open its own picker/modal and then update `meals`).
587
- */
588
571
  "meal-plan-day": LocalJSX.IntrinsicElements["meal-plan-day"] & JSXBase.HTMLAttributes<HTMLMealPlanDayElement>;
589
572
  /**
590
573
  * Displays a summary of a recipe (image, title, category) inside a card.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurpinderjitsingh/recipe-ui",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "Reusable web component library for the Recipe Finder & Meal Planner app, built with StencilJS.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{t as e,p as t,H as s,c as o,h as i}from"./p-q8BcbM65.js";const n=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.close=o(this,"close"),this.open=!1,this.modalTitle=""}render(){return this.open?i("div",{class:"overlay",onClick:e=>{e.target===e.currentTarget&&this.close.emit()}},i("div",{class:"dialog",onClick:e=>e.stopPropagation()},i("div",{class:"header"},i("h2",null,this.modalTitle),i("button",{class:"close-btn",onClick:()=>this.close.emit(),"aria-label":"Close"},"✕")),i("div",{class:"body"},i("slot",null)))):null}static get style(){return":host{font-family:system-ui, sans-serif}.overlay{position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);display:flex;align-items:center;justify-content:center;z-index:1000}.dialog{position:relative;background:#fff;border-radius:12px;min-width:320px;max-width:90vw;max-height:85vh;overflow-y:auto;padding:20px;box-shadow:0 10px 40px rgba(0, 0, 0, 0.2)}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.header h2{margin:0;font-size:18px}.close-btn{border:none;background:none;font-size:16px;cursor:pointer;color:#666}"}},[260,"app-modal",{open:[4],modalTitle:[1,"modal-title"]}]);function a(){"undefined"!=typeof customElements&&["app-modal"].forEach((t=>{"app-modal"===t&&(customElements.get(e(t))||customElements.define(e(t),n))}))}a();export{n as A,a as d}
@@ -1 +0,0 @@
1
- import{t as e,p as a,H as s,c as t,h as d}from"./p-q8BcbM65.js";const i=a(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.assignMeal=t(this,"assignMeal"),this.removeMeal=t(this,"removeMeal"),this.day="",this.meals=[]}render(){const e=Array.isArray(this.meals)?this.meals:[];return d("div",{key:"7a0b592fd4b8d9971d7f4912cecb5f9126be11b3",class:"day-col"},d("h3",{key:"b0f1f6a717ad409e6339219ea2f71b73d73bb1f3"},this.day),d("div",{key:"2c978721af3aad27042572dd7825d5f2b5b659fb",class:"meals"},e.map((e=>d("div",{class:"meal-chip"},e.image&&d("img",{src:e.image,alt:e.title}),d("span",{class:"title"},e.title),d("button",{onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":"Remove meal"},"✕")))),0===e.length&&d("p",{key:"326b5f3201df2416f43debc7257918a60a6ab6dd",class:"empty"},"No meals planned")),d("button",{key:"3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},"+ Add meal"))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.day-col{border:1px solid #eee;border-radius:10px;padding:10px;min-width:150px;display:flex;flex-direction:column;gap:8px;background:#fafafa}h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:0.04em;color:#555}.meals{display:flex;flex-direction:column;gap:6px;min-height:40px}.meal-chip{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eee;border-radius:8px;padding:4px 6px;font-size:12px}.meal-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover}.meal-chip .title{flex:1}.meal-chip button{border:none;background:none;cursor:pointer;color:#999}.empty{font-size:12px;color:#aaa;margin:4px 0}.add-btn{border:1px dashed #ccc;background:none;border-radius:8px;padding:6px;font-size:12px;cursor:pointer;color:#666}"}},[1,"meal-plan-day",{day:[1],meals:[16]}]);function o(){"undefined"!=typeof customElements&&["meal-plan-day"].forEach((a=>{"meal-plan-day"===a&&(customElements.get(e(a))||customElements.define(e(a),i))}))}o();export{i as M,o as d}
@@ -1 +0,0 @@
1
- import{t as e,p as s,H as t,c as i,h as r}from"./p-q8BcbM65.js";const c=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.filterChange=i(this,"filterChange"),this.categories=[],this.active=""}select(e){this.filterChange.emit({value:e})}render(){const e=Array.isArray(this.categories)?this.categories:[];return r("div",{key:"13bc63f39ebfc55c0f05c035b63036121f7b3930",class:"wrap"},r("button",{key:"8aeb99775268204433a8f9831eca9873066c7b9e",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),e.map((e=>r("button",{class:{chip:!0,active:this.active===e},onClick:()=>this.select(e)},e))))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}"}},[1,"recipe-filter-bar",{categories:[16],active:[1]}]);function a(){"undefined"!=typeof customElements&&["recipe-filter-bar"].forEach((s=>{"recipe-filter-bar"===s&&(customElements.get(e(s))||customElements.define(e(s),c))}))}a();export{c as R,a as d}
@@ -1 +0,0 @@
1
- function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],s=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);s&&Object.defineProperty(e,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},f={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,p=[],h=[],v=()=>{var t;return(null==(t=r.document)?void 0:t.hidden)?$(y):f.raf(y)},m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&f.i?$(y):v())},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},y=()=>{b(p),b(h),(d=p.length>0)&&v()},$=t=>Promise.resolve(undefined).then(t),g=m(h,!0),w=t=>{const e=new URL(t,f.u);return e.origin!==r.location.origin?e.href:e.pathname},j=t=>f.u=t;function O(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(a?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var S=t=>{const e=_(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&N(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!k(t,E(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&_(t,"childNodes").length&&S(t)}};function N(t,e,n){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||E(o)===n)&&(s.push(o),void 0!==n))return s;s=[...s,...N(_(o,"childNodes"),e,n)]}return s}var k=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)E(l)!==e||!n&&l["s-sr"]||o.push(l);return o},M=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,E=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function _(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var A,C,L=new WeakMap,R=t=>"sc-"+t.p,T=t=>"object"==(t=typeof t)||"function"===t,F=(t,e,...n)=>{let o=null,l=null,i=null,r=!1,c=!1;const f=[],u=e=>{for(let n=0;n<e.length;n++)if(o=e[n],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(r="function"!=typeof t&&!T(o))o=String(o);else if("function"!=typeof t&&void 0===o.i){s("Invalid vNode child");continue}r&&c?f[f.length-1].h+=o:f.push(r?x(null,o):o),c=r}};if(u(n),e){e.key&&(l=e.key),e.name&&(i=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const a=x(t,null);return a.v=e,f.length>0&&(a.m=f),a.$=l,a.j=i,a},x=(t,e)=>({i:0,O:t,h:null!=e?e:null,S:null,m:null,v:null,$:null,j:null}),D={},H=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},P=(t,e)=>null==t||T(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?String(t):t,U=(t,e)=>{const n=t;return{emit:t=>W(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},W=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},B=(t,e,n,s,i,c)=>{if(n===s)return;let u=l(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=q(n);let l=q(s);e.remove(...o.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let l;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(l=t[1])}}return l||(l=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const o=T(s);if((u||o&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const o=null==s?"":s;"list"===e?u=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!u||4&c||i)&&!o&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):l(r,a)?a.slice(2):a[2]+e.slice(3),n||s){const o=e.endsWith(z);e=e.replace(I,""),n&&f.rel(t,e,n,o),s&&f.ael(t,e,s,o)}},V=/\s/,q=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(V):[]),z="Capture",I=new RegExp(z+"$"),Y=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.v||{},s=e.v||{};for(const t of Z(Object.keys(l)))t in s||B(o,t,l[t],void 0,n,e.i);for(const t of Z(Object.keys(s)))B(o,t,l[t],s[t],n,e.i)};function Z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,J=!1,K=!1,Q=!1,X=(t,e,n)=>{var o;const l=e.m[n];let s,i,c,f=0;if(G||(K=!0,"slot"===l.O&&(l.i|=l.m?2:1)),null!=l.h)s=l.S=r.document.createTextNode(l.h);else if(1&l.i)s=l.S=r.document.createTextNode(""),Y(null,l,Q);else{if(!r.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.S=r.document.createElement(!G&&2&l.i?"slot-fb":l.O),Y(null,l,Q),l.m){const e="template"===l.O?s.content:s;for(f=0;f<l.m.length;++f)i=X(t,l,f),i&&e.appendChild(i)}}return s["s-hn"]=C,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=A,s["s-sn"]=l.j||"",s["s-rf"]=null==(o=l.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e})(l.childNodes)).forEach((t=>{o===E(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(s),c=t&&t.m&&t.m[n],c&&c.O===l.O&&t.S&&tt(t.S)),s},tt=t=>{f.i|=1;const e=t.closest(C.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(ft(e,t,null!=n?n:null),t["s-sh"]=void 0,K=!0)}f.i&=-2},et=(t,e)=>{f.i|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===C&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==C&&o["s-ol"]&&(ft(st(o).parentNode,o,st(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,K=!0),e&&et(o,e)}f.i&=-2},nt=(t,e,n,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot),"template"===n.O&&(r=r.content);l<=s;++l)o[l]&&(i=X(null,n,l),i&&(o[l].S=i,ft(r,i,st(e))))},ot=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;t&&(J=!0,t["s-ol"]?t["s-ol"].remove():et(t,!0),t.remove())}}},lt=(t,e,n=!1)=>t.O===e.O&&("slot"===t.O?t.j===e.j:n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),st=t=>t&&t["s-ol"]||t,it=(t,e,n=!1)=>{const o=e.S=t.S,l=t.m,s=e.m,i=e.h;let r;null==i?("slot"!==e.O||G||t.j!==e.j&&(e.S["s-sn"]=e.j||"",tt(e.S.parentElement)),Y(t,e,Q),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,v=o[0],m=o[h];const b="template"===n.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(lt(d,v,l))it(d,v,l),d=e[++r],v=o[++c];else if(lt(p,m,l))it(p,m,l),p=e[--a],m=o[--h];else if(lt(d,m,l))"slot"!==d.O&&"slot"!==m.O||et(d.S.parentNode,!1),it(d,m,l),ft(b,d.S,p.S.nextSibling),d=e[++r],m=o[--h];else if(lt(p,v,l))"slot"!==d.O&&"slot"!==m.O||et(p.S.parentNode,!1),it(p,v,l),ft(b,p.S,d.S),p=e[--a],v=o[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].$&&e[u].$===v.$){f=u;break}f>=0?(i=e[f],i.O!==v.O?s=X(e&&e[c],n,f):(it(i,v,l),e[f]=void 0,s=i.S),v=o[++c]):(s=X(e&&e[c],n,c),v=o[++c]),s&&ft(st(d.S).parentNode,s,st(d.S))}r>a?nt(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&ot(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.h&&(o.textContent=""),nt(o,null,e,s,0,s.length-1)):!n&&null!==l&&ot(l,0,l.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.h!==i&&(o.data=i)},rt=[],ct=t=>{let e,n,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const l=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(!e["s-sh"]||e["s-sh"]!==t["s-hn"]||""!==l&&E(e)===l))if(M(e,l)){let n=rt.find((t=>t.N===e));J=!0,e["s-sn"]=e["s-sn"]||l,n?(n.N["s-sh"]=t["s-hn"],n.k=t):(e["s-sh"]=t["s-hn"],rt.push({k:t,N:e})),e["s-sr"]&&rt.map((t=>{M(t.N,e["s-sn"])&&(n=rt.find((t=>t.N===e)),n&&!t.k&&(t.k=n.k))}))}else rt.some((t=>t.N===e))||rt.push({N:e})}1===t.nodeType&&ct(t)}},ft=(t,e,n,o)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,n);const{slotNode:l}=function(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=E(t)||"";return{slotNode:N(_(e,"childNodes"),e.tagName,o)[0],slotName:o}}(e);return l&&!o&&l.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},ut=(t,e,n=!1)=>{var o,l,s,i,c;const u=t.$hostElement$,a=t.o,d=t.M||x(null,null);var p;const h=(p=e)&&p.O===D?e:F(null,null,e);if(C=u.tagName,n&&h.v)for(const t of Object.keys(h.v))u.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(h.v[t]=u[t]);if(h.O=null,h.i|=4,t.M=h,h.S=d.S=u.shadowRoot||u,G=!(!(1&a.i)||128&a.i),A=u["s-cr"],J=!1,it(d,h,n),f.i|=1,K){ct(h.S);for(const t of rt){const e=t.N;if(!e["s-ol"]&&r.document){const t=r.document.createTextNode("");t["s-nr"]=e,ft(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of rt){const e=t.N,c=t.k;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(o=e.hidden)&&o),c){const t=c.parentNode;let o=c.nextSibling;if(o&&1===o.nodeType){let n=null==(l=e["s-ol"])?void 0:l.previousSibling;for(;n;){let l=null!=(s=n["s-nr"])?s:null;if(l&&l["s-sn"]===e["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===e||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}n=n.previousSibling}}if((!o&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==o)&&e!==o){if(ft(t,e,o,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=r.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,ft(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(i=e["s-ih"])&&i)}e&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===e.nodeType&&(e.hidden=!0)}}if(J&&S(h.S),f.i&=-2,rt.length=0,!G&&!(1&a.i)&&u["s-cr"]){const t=h.S.__childNodes||h.S.childNodes;for(const e of t)if(e["s-hn"]!==C&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(c=e.hidden)&&c),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=r.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],ft(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}A=void 0},at=(t,e)=>{if(e&&!t._&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t._=()=>{e["s-p"].splice(n-1,1),o()})))}},dt=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);at(t,t.A);const n=()=>pt(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},pt=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=gt(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=ht(l,(()=>gt(o,"componentWillRender",void 0,n))),ht(l,(()=>mt(t,o,e)))},ht=(t,e)=>vt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),vt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,mt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.i,l=((t,e)=>{var n,o,l;const s=R(e),c=i.get(s);if(!r.document)return s;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let l,i=L.get(t=t.head||t);if(i||L.set(t,i=new Set),!i.has(s)){l=r.document.createElement("style"),l.textContent=c;const d=null!=(n=f.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&l.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(l)}else t.append(l);1&e.i&&t.insertBefore(l,null),4&e.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=L.get(t);if(e||L.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(c.constructor===n.CSSStyleSheet)o=c;else{o=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)o.insertRule(c.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);bt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>yt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},bt=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,ut(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},yt=t=>{const e=t.$hostElement$,n=e,o=t.A;gt(n,"componentDidRender",void 0,e),64&t.i?gt(n,"componentDidUpdate",void 0,e):(t.i|=64,wt(e),gt(n,"componentDidLoad",void 0,e),t.L(e),o||$t()),t._&&(t._(),t._=void 0),512&t.i&&$((()=>dt(t,!1))),t.i&=-517},$t=()=>{$((()=>W(r,"appload",{detail:{namespace:"recipe-ui"}})))},gt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},wt=t=>t.classList.add("hydrated"),jt=(t,e,n,l)=>{const i=o(t);if(!i)return;const r=t,c=i.l.get(e),f=i.i,u=r;n=P(n,l.t[e][0]);const a=Number.isNaN(c)&&Number.isNaN(n);if(n!==c&&!a){if(i.l.set(e,n),l.R){const t=l.R[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&f||1&l)&&(u?u[o](n,c,e):i.T.push((()=>{i.F[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,c,e)&&!(16&f))return;16&f||dt(i,!1)}}},Ot=(e,n)=>{var l,s;const i=e.prototype;{e.watchers&&!n.R&&(n.R=H(e.watchers)),e.deserializers&&!n.D&&(n.D=e.deserializers),e.serializers&&!n.H&&(n.H=e.serializers);const r=Object.entries(null!=(l=n.t)?l:{});r.map((([e,[l]])=>{if(31&l||32&l){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):(t=e,o(this).l.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=o(this);if(s){if(r)return void 0===(32&l?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),r.apply(this,[P(t,l)]),void jt(this,e,t=32&l?this[e]:s.$hostElement$[e],n);jt(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var c;const f=t.get(e),u=o(this);if(this.hasOwnProperty(f),i.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==s)return;if(null==f){const t=null==u?void 0:u.i;if(u&&t&&!(8&t)&&s!==l){const o=this,i=null==(c=n.R)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,e)}))}return}const a=r.find((([t])=>t===f)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[f];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(i,f);p||s==this[f]||h.get&&!h.set||(this[f]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.R)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},St=async(t,e,n)=>{let o;try{if(!(32&e.i)&&(e.i|=32,e.i&=-1025,o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const e=R(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);u&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.i)),o()}}const l=e.A,s=()=>dt(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){s(n,t),e._&&(e._(),e._=void 0),!e.L||1024&e.i||e.L(t)}},Nt=(t,e)=>{const l={i:e[0],p:e[1]};try{l.t=e[2],l.R=H(t.R),l.D=t.D,l.H=t.H;const s=t.prototype.connectedCallback,i=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,P:new Map};o.U=new Promise((t=>o.L=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,l)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!o(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&f.i)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.i)(null==e?void 0:e.F)||(1024&e.i?setTimeout((()=>St(t,e,n)),1e3):(null==e?void 0:e.U)&&e.U.then((()=>{})));else{e.i|=1,12&n.i&&(t=>{if(!r.document)return;const e=t["s-cr"]=r.document.createComment("");e["s-cn"]=!0,ft(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){at(e,e.A=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),St(t,e,n)}l()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{1&f.i||o(t),L.has(t)&&L.delete(t),t.shadowRoot&&L.has(t.shadowRoot)&&L.delete(t.shadowRoot)})(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${l.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else O.call(this,l)}}),Object.defineProperty(t,"is",{value:l.p,configurable:!0}),Ot(t,l)}catch(e){return s(e),t}},kt=t=>f.C=t,Mt=t=>Object.assign(f,t),Et=new WeakMap;function _t(t,e){let n=Et.get(e);n||(n={i:0,o:{i:0,p:e.tagName},$hostElement$:e},Et.set(e,n)),ut(n,t)}function At(t){return t}export{c as H,kt as a,Mt as b,U as c,w as g,F as h,Nt as p,_t as r,j as s,At as t}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i}from"./p-Cq6PCsWh.js";const a=class{constructor(i){e(this,i),this.favoriteToggle=t(this,"favoriteToggle"),this.cardClick=t(this,"cardClick"),this.category="",this.favorite=!1,this.onFavoriteClick=e=>{e.stopPropagation(),this.favoriteToggle.emit({favorite:!this.favorite})}}render(){return i("div",{key:"abd19b1d63409b52cf66f348131f5f6f77bb47a6",class:"card",onClick:()=>this.cardClick.emit()},i("div",{key:"1292c3f6dfe7d3b399943004f764c41a3d072188",class:"image-wrap"},this.image?i("img",{src:this.image,alt:this.recipeTitle}):i("div",{class:"placeholder"}),i("button",{key:"0efdc01af349d011ca0e11c4df5438b79876b467",class:{"fav-btn":!0,active:this.favorite},onClick:this.onFavoriteClick,"aria-label":"Toggle favorite"},this.favorite?"★":"☆")),i("div",{key:"66c2c4d845d9cc082c07f24f5d827313f6ad51c4",class:"body"},i("h3",{key:"779fc629c3b97b6158f99440d9bb17fafb708dd3"},this.recipeTitle),this.category&&i("span",{key:"259ec599a43a5c8a279ad5993ba36f8602125b76",class:"category"},this.category),i("div",{key:"58ab20f9682b4b73b7d027571496641cbfa76d0b",class:"actions"},i("slot",{key:"28103422d993e58b133c2350e37c06fddf24300f",name:"actions"}))))}};a.style=":host{display:block;font-family:system-ui, sans-serif}.card{border:1px solid #e5e5e5;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:box-shadow 0.15s ease, transform 0.15s ease}.card:hover{box-shadow:0 4px 16px rgba(0, 0, 0, 0.08);transform:translateY(-2px)}.image-wrap{position:relative;aspect-ratio:4 / 3;background:#f2f2f2}.image-wrap img{width:100%;height:100%;object-fit:cover;display:block}.placeholder{width:100%;height:100%;background:linear-gradient(135deg, #eee, #ddd)}.fav-btn{position:absolute;top:8px;right:8px;border:none;background:rgba(255, 255, 255, 0.9);border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer;color:#f5a623}.fav-btn.active{color:#ff6b35}.body{padding:12px 14px}h3{margin:0 0 4px;font-size:15px;line-height:1.3}.category{font-size:12px;color:#777;text-transform:uppercase;letter-spacing:0.03em}.actions{margin-top:8px}";const s=class{constructor(i){e(this,i),this.search=t(this,"search"),this.placeholder="Search recipes...",this.value="",this.debounceMs=350,this.internalValue="",this.onInput=e=>{this.internalValue=e.target.value,clearTimeout(this.timer),this.timer=setTimeout((()=>{this.search.emit({value:this.internalValue})}),this.debounceMs)},this.onKeyDown=e=>{"Enter"===e.key&&(clearTimeout(this.timer),this.search.emit({value:this.internalValue}))}}componentWillLoad(){this.internalValue=this.value}onValuePropChange(e){this.internalValue=e}render(){return i("div",{key:"fe5eb2928308fb2496badd784e684b19df52501a",class:"wrap"},i("input",{key:"3d4abb23a1155075a8889e015819b37a8569f6f5",type:"search",placeholder:this.placeholder,value:this.internalValue,onInput:this.onInput,onKeyDown:this.onKeyDown}),i("button",{key:"f33f95b5bfcad9146903a2eb4448932a1d68edb7",onClick:()=>this.search.emit({value:this.internalValue}),"aria-label":"Search"},"🔍"))}static get watchers(){return{value:[{onValuePropChange:0}]}}};s.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:6px}input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #ddd;font-size:14px;outline:none}input:focus{border-color:#ff6b35}button{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:0 16px;cursor:pointer;font-size:15px}";const o=class{constructor(i){e(this,i),this.filterChange=t(this,"filterChange"),this.categories=[],this.active=""}select(e){this.filterChange.emit({value:e})}render(){const e=Array.isArray(this.categories)?this.categories:[];return i("div",{key:"13bc63f39ebfc55c0f05c035b63036121f7b3930",class:"wrap"},i("button",{key:"8aeb99775268204433a8f9831eca9873066c7b9e",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),e.map((e=>i("button",{class:{chip:!0,active:this.active===e},onClick:()=>this.select(e)},e))))}};o.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}";const r=class{constructor(i){e(this,i),this.ratingChange=t(this,"ratingChange"),this.value=0,this.readonly=!1,this.max=5}render(){const e=Array.from({length:this.max},((e,t)=>t+1));return i("div",{key:"1e1c67012185e7aaecfcc89671532946262a6957",class:"wrap",role:this.readonly?void 0:"radiogroup"},e.map((e=>i("span",{class:{star:!0,filled:e<=this.value,clickable:!this.readonly},onClick:()=>!this.readonly&&this.ratingChange.emit({value:e})},"★"))))}};r.style=":host{display:inline-block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:2px}.star{font-size:18px;color:#ddd}.star.filled{color:#f5a623}.star.clickable{cursor:pointer}";const d=class{constructor(i){e(this,i),this.save=t(this,"save"),this.cancel=t(this,"cancel"),this.title="",this.image="",this.category="",this.ingredients=[""],this.instructions="",this.errors={},this.onSubmit=e=>{if(e.preventDefault(),!this.validate())return;const t={id:this.initialData?.id,title:this.title.trim(),image:this.image.trim(),category:this.category.trim(),ingredients:this.ingredients.map((e=>e.trim())).filter(Boolean),instructions:this.instructions.trim()};this.save.emit(t)},this.addIngredient=()=>{this.ingredients=[...this.ingredients,""]},this.removeIngredient=e=>{this.ingredients=this.ingredients.filter(((t,i)=>i!==e))}}componentWillLoad(){this.loadInitialData()}onInitialDataChange(){this.loadInitialData()}loadInitialData(){let e;if("string"==typeof this.initialData&&this.initialData)try{e=JSON.parse(this.initialData)}catch{e=void 0}else this.initialData&&"object"==typeof this.initialData&&(e=this.initialData);e&&(this.title=e.title??"",this.image=e.image??"",this.category=e.category??"",this.ingredients=e.ingredients?.length?[...e.ingredients]:[""],this.instructions=e.instructions??"")}validate(){const e={};return this.title.trim()||(e.title="Title is required."),0===this.ingredients.map((e=>e.trim())).filter(Boolean).length&&(e.ingredients="Add at least one ingredient."),this.instructions.trim()||(e.instructions="Instructions are required."),this.errors=e,0===Object.keys(e).length}updateIngredient(e,t){const i=[...this.ingredients];i[e]=t,this.ingredients=i}render(){return i("form",{key:"bb5c6c7f1b421b55515994f0256c5b39ea781632",onSubmit:this.onSubmit},i("slot",{key:"16940e4c8368aa6b546254ff8db7b28885a4409b",name:"header"}),i("label",{key:"7e3d6ba3231039ecdcca6a4c4314cf27038e1732"},"Title",i("input",{key:"f86056de021f040b8bbf3bf67a0d40ba526ad754",type:"text",value:this.title,onInput:e=>this.title=e.target.value}),this.errors.title&&i("span",{key:"54d552a15e037f54b2c6f0fd13cb4b685c25c76c",class:"error"},this.errors.title)),i("label",{key:"376da4904e7919b5540ee8dabf494f6aab053523"},"Image URL",i("input",{key:"761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef",type:"text",value:this.image,onInput:e=>this.image=e.target.value})),i("label",{key:"0b7ff19b8718540b08921bb7f301be5cacf0df36"},"Category",i("input",{key:"4f1bae8316d588e93006a12e0d824579ddbece43",type:"text",value:this.category,onInput:e=>this.category=e.target.value})),i("div",{key:"280d98b91621defa547dbcc35c0cb6da55a67b5f",class:"field"},i("span",{key:"96a015e055b434441eba85dcb89470823d0ebcc8"},"Ingredients"),this.ingredients.map(((e,t)=>i("div",{class:"ingredient-row"},i("input",{type:"text",value:e,onInput:e=>this.updateIngredient(t,e.target.value)}),i("button",{type:"button",onClick:()=>this.removeIngredient(t),"aria-label":"Remove"},"✕")))),i("button",{key:"697cda22eb5bdf42e50ac40669619fbc04140405",type:"button",class:"add-btn",onClick:this.addIngredient},"+ Add ingredient"),this.errors.ingredients&&i("span",{key:"6a46c393bdd9af8e1e1255792d5532daf433f25b",class:"error"},this.errors.ingredients)),i("label",{key:"6abdbe72d381c3a0a56c46560a92b1e533fcce2a"},"Instructions",i("textarea",{key:"1d3b62d6543e42a4cd0755522f657c13e2d1e4a7",rows:5,onInput:e=>this.instructions=e.target.value},this.instructions),this.errors.instructions&&i("span",{key:"b5845bb5cd0ddd40de21f074307513d376a05f56",class:"error"},this.errors.instructions)),i("div",{key:"778adeff176e2d2b080aad59602db6e92a69ea1c",class:"footer"},i("slot",{key:"c9584d6606ed33f616eb8f3035aa4a0fd5086af3",name:"footer"}),i("button",{key:"b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a",type:"button",class:"cancel-btn",onClick:()=>this.cancel.emit()},"Cancel"),i("button",{key:"a9e91907aa44c8587a2c492f869d0cb5daa942fe",type:"submit",class:"save-btn"},"Save Recipe")))}static get watchers(){return{initialData:[{onInitialDataChange:0}]}}};d.style=":host{display:block;font-family:system-ui, sans-serif}form{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#333;font-weight:600}input,textarea{font-weight:400;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.ingredient-row{display:flex;gap:6px}.ingredient-row input{flex:1}.ingredient-row button{border:none;background:#f4f4f4;border-radius:6px;cursor:pointer;width:30px}.add-btn{align-self:flex-start;border:1px dashed #bbb;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:#555}.error{color:#e74c3c;font-size:12px;font-weight:400}.footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.cancel-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 16px;cursor:pointer}.save-btn{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:8px 18px;cursor:pointer;font-weight:600}";const n=class{constructor(i){e(this,i),this.assignMeal=t(this,"assignMeal"),this.removeMeal=t(this,"removeMeal"),this.day="",this.meals=[]}render(){const e=Array.isArray(this.meals)?this.meals:[];return i("div",{key:"7a0b592fd4b8d9971d7f4912cecb5f9126be11b3",class:"day-col"},i("h3",{key:"b0f1f6a717ad409e6339219ea2f71b73d73bb1f3"},this.day),i("div",{key:"2c978721af3aad27042572dd7825d5f2b5b659fb",class:"meals"},e.map((e=>i("div",{class:"meal-chip"},e.image&&i("img",{src:e.image,alt:e.title}),i("span",{class:"title"},e.title),i("button",{onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":"Remove meal"},"✕")))),0===e.length&&i("p",{key:"326b5f3201df2416f43debc7257918a60a6ab6dd",class:"empty"},"No meals planned")),i("button",{key:"3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},"+ Add meal"))}};n.style=":host{display:block;font-family:system-ui, sans-serif}.day-col{border:1px solid #eee;border-radius:10px;padding:10px;min-width:150px;display:flex;flex-direction:column;gap:8px;background:#fafafa}h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:0.04em;color:#555}.meals{display:flex;flex-direction:column;gap:6px;min-height:40px}.meal-chip{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eee;border-radius:8px;padding:4px 6px;font-size:12px}.meal-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover}.meal-chip .title{flex:1}.meal-chip button{border:none;background:none;cursor:pointer;color:#999}.empty{font-size:12px;color:#aaa;margin:4px 0}.add-btn{border:1px dashed #ccc;background:none;border-radius:8px;padding:6px;font-size:12px;cursor:pointer;color:#666}";const c=class{constructor(i){e(this,i),this.close=t(this,"close"),this.open=!1,this.modalTitle=""}render(){return this.open?i("div",{class:"overlay",onClick:e=>{e.target===e.currentTarget&&this.close.emit()}},i("div",{class:"dialog",onClick:e=>e.stopPropagation()},i("div",{class:"header"},i("h2",null,this.modalTitle),i("button",{class:"close-btn",onClick:()=>this.close.emit(),"aria-label":"Close"},"✕")),i("div",{class:"body"},i("slot",null)))):null}};c.style=":host{font-family:system-ui, sans-serif}.overlay{position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);display:flex;align-items:center;justify-content:center;z-index:1000}.dialog{position:relative;background:#fff;border-radius:12px;min-width:320px;max-width:90vw;max-height:85vh;overflow-y:auto;padding:20px;box-shadow:0 10px 40px rgba(0, 0, 0, 0.2)}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.header h2{margin:0;font-size:18px}.close-btn{border:none;background:none;font-size:16px;cursor:pointer;color:#666}";export{c as app_modal,n as meal_plan_day,a as recipe_card,o as recipe_filter_bar,d as recipe_form,r as recipe_rating,s as recipe_search_bar}
@@ -1,3 +0,0 @@
1
- function t(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var n,e=(n,e)=>{var o;Object.entries(null!=(o=e.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=n[o],s=t(Object.getPrototypeOf(n),o,!0)||Object.getOwnPropertyDescriptor(n,o);s&&Object.defineProperty(n,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),e.l.has(o)?n[o]=e.l.get(o):void 0!==l&&(n[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},s=(t,n)=>n in t,i=(t,n)=>(0,console.error)(t,n),r=new Map,c=new Map,u=new Map,f="slot-fb{display:contents}slot-fb[hidden]{display:none}",a="undefined"!=typeof window?window:{},d={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},p=t=>Promise.resolve(t),h=(()=>{try{return!!a.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),v=!!h&&(()=>!!a.document&&Object.getOwnPropertyDescriptor(a.document.adoptedStyleSheets,"length").writable)(),m=!1,y=[],b=[],$=()=>{var t;return(null==(t=a.document)?void 0:t.hidden)?S(j):d.raf(j)},w=(t,n)=>e=>{t.push(e),m||(m=!0,n&&4&d.u?S(j):$())},g=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){i(t)}t.length=0},j=()=>{g(y),g(b),(m=y.length>0)&&$()},S=t=>p().then(t),O=w(b,!0);function k(){const t=this.attachShadow({mode:"open"});void 0===n&&(n=null),n&&(v?t.adoptedStyleSheets.push(n):t.adoptedStyleSheets=[...t.adoptedStyleSheets,n])}var N=t=>{const n=L(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&E(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!M(t,T(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&L(t,"childNodes").length&&N(t)}};function E(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||T(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...E(L(o,"childNodes"),n,e)]}return s}var M=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)T(l)!==n||!e&&l["s-sr"]||o.push(l);return o},C=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,T=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function L(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function R(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var A,x,F=new WeakMap,D=t=>"sc-"+t.h,P=t=>"object"==(t=typeof t)||"function"===t,H=(t,n,...e)=>{let o=null,l=null,s=null,r=!1,c=!1;const u=[],f=n=>{for(let e=0;e<n.length;e++)if(o=n[e],Array.isArray(o))f(o);else if(null!=o&&"boolean"!=typeof o){if(r="function"!=typeof t&&!P(o))o+="";else if("function"!=typeof t&&void 0===o.u){i("Invalid vNode child");continue}r&&c?u[u.length-1].v+=o:u.push(r?U(null,o):o),c=r}};if(f(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}const a=U(t,null);return a.m=n,u.length>0&&(a.$=u),a.j=l,a.S=s,a},U=(t,n)=>({u:0,O:t,v:null!=n?n:null,k:null,$:null,m:null,j:null,S:null}),_={},B=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},W=(t,n)=>null==t||P(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,z=(t,n)=>{const e=(t=>{var n;return null==(n=o(t))?void 0:n.$hostElement$})(t);return{emit:t=>V(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},V=(t,n,e)=>{const o=d.ce(n,e);return t.dispatchEvent(o),o},q=(t,n,e,l,i,r)=>{if(e===l)return;let c=s(t,n),u=n.toLowerCase();if("class"===n){const n=t.classList,o=Y(e);let s=Y(l);n.remove(...o.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!o.includes(t))))}else if("key"===n);else if(c||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let s;{const n=o(t);if(n&&n.o&&n.o.t){const t=n.o.t[e];t&&t[1]&&(s=t[1])}}return s||(s=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===l?"":l))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=l}catch(t){}return}{const o=P(l);if((c||o&&null!==l)&&!i)try{if(t.tagName.includes("-"))t[n]!==l&&(t[n]=l);else{const o=null==l?"":l;"list"===n?c=!1:null!=e&&t[n]===o||("function"==typeof t.__lookupSetter__(n)?t[n]=o:t.setAttribute(n,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(n)||t.removeAttribute(n):(!c||4&r||i)&&!o&&1===t.nodeType&&t.setAttribute(n,l=!0===l?"":l)}}else if(n="-"===n[2]?n.slice(3):s(a,u)?u.slice(2):u[2]+n.slice(3),e||l){const o=n.endsWith(G);n=n.replace(Z,""),e&&d.rel(t,n,e,o),l&&d.ael(t,n,l,o)}},I=/\s/,Y=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(I):[]),G="Capture",Z=RegExp(G+"$"),J=(t,n,e)=>{const o=11===n.k.nodeType&&n.k.host?n.k.host:n.k,l=t&&t.m||{},s=n.m||{};for(const t of K(Object.keys(l)))t in s||q(o,t,l[t],void 0,e,n.u);for(const t of K(Object.keys(s)))q(o,t,l[t],s[t],e,n.u)};function K(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Q=!1,X=!1,tt=!1,nt=!1,et=(t,n,e)=>{var o;const l=n.$[e];let s,i,r,c=0;if(Q||(tt=!0,"slot"===l.O&&(l.u|=l.$?2:1)),null!=l.v)s=l.k=a.document.createTextNode(l.v);else if(1&l.u)s=l.k=a.document.createTextNode(""),J(null,l,nt);else{if(!a.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.k=a.document.createElement(!Q&&2&l.u?"slot-fb":l.O),J(null,l,nt),l.$){const n="template"===l.O?s.content:s;for(c=0;c<l.$.length;++c)i=et(t,l,c),i&&n.appendChild(i)}}return s["s-hn"]=x,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=A,s["s-sn"]=l.S||"",s["s-rf"]=null==(o=l.m)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===T(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),r=t&&t.$&&t.$[e],r&&r.O===l.O&&t.k&&ot(t.k)),s},ot=t=>{d.u|=1;const n=t.closest(x.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(dt(n,t,null!=e?e:null),t["s-sh"]=void 0,tt=!0)}d.u&=-2},lt=(t,n)=>{d.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===x&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==x&&o["s-ol"]&&(dt(ct(o).parentNode,o,ct(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,tt=!0),n&&lt(o,n)}d.u&=-2},st=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===x&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=et(null,e,l),i&&(o[l].k=i,dt(r,i,ct(n))))},it=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;t&&(X=!0,t["s-ol"]?t["s-ol"].remove():lt(t,!0),t.remove())}}},rt=(t,n,e=!1)=>t.O===n.O&&("slot"===t.O?t.S===n.S:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),ct=t=>t&&t["s-ol"]||t,ut=(t,n,e=!1)=>{const o=n.k=t.k,l=t.$,s=n.$,i=n.v;let r;null==i?("slot"!==n.O||Q||t.S!==n.S&&(n.k["s-sn"]=n.S||"",ot(n.k.parentElement)),J(t,n,nt),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,v=o[0],m=o[h];const y="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(rt(d,v,l))ut(d,v,l),d=n[++r],v=o[++c];else if(rt(p,m,l))ut(p,m,l),p=n[--a],m=o[--h];else if(rt(d,m,l))"slot"!==d.O&&"slot"!==m.O||lt(d.k.parentNode,!1),ut(d,m,l),dt(y,d.k,p.k.nextSibling),d=n[++r],m=o[--h];else if(rt(p,v,l))"slot"!==d.O&&"slot"!==m.O||lt(p.k.parentNode,!1),ut(p,v,l),dt(y,p.k,d.k),p=n[--a],v=o[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===v.j){u=f;break}u>=0?(i=n[u],i.O!==v.O?s=et(n&&n[c],e,u):(ut(i,v,l),n[u]=void 0,s=i.k),v=o[++c]):(s=et(n&&n[c],e,c),v=o[++c]),s&&dt(ct(d.k).parentNode,s,ct(d.k))}r>a?st(t,null==o[h+1]?null:o[h+1].k,e,o,c,h):c>h&&it(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.v&&(o.textContent=""),st(o,null,n,s,0,s.length-1)):!e&&null!==l&&it(l,0,l.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.v!==i&&(o.data=i)},ft=[],at=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==t["s-hn"]&&(!n["s-sh"]||n["s-sh"]!==t["s-hn"]||""!==l&&T(n)===l))if(C(n,l)){let e=ft.find((t=>t.N===n));X=!0,n["s-sn"]=n["s-sn"]||l,e?(e.N["s-sh"]=t["s-hn"],e.M=t):(n["s-sh"]=t["s-hn"],ft.push({M:t,N:n})),n["s-sr"]&&ft.map((t=>{C(t.N,n["s-sn"])&&(e=ft.find((t=>t.N===n)),e&&!t.M&&(t.M=e.M))}))}else ft.some((t=>t.N===n))||ft.push({N:n})}1===t.nodeType&&at(t)}},dt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=T(t)||"";return{slotNode:E(L(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(l),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)},pt=(t,n)=>{if(n&&!t.C&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.C=()=>{n["s-p"].splice(e-1,1),o()})))}},ht=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);pt(t,t.T);const e=()=>vt(t,n);if(!n)return O(e);queueMicrotask((()=>{e()}))},vt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.L&&(t.L=!1,jt(o,"connectedCallback",void 0,e)),t.R.length&&t.R.forEach((t=>t(e))),l=jt(o,"componentWillLoad",void 0,e)):l=jt(o,"componentWillUpdate",void 0,e),l=mt(l,(()=>jt(o,"componentWillRender",void 0,e))),mt(l,(()=>bt(t,o,n)))},mt=(t,n)=>yt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),yt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,bt=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=((t,n)=>{var e,o,l;const s=D(n),i=u.get(s);if(!a.document)return s;if(t=11===t.nodeType?t:a.document,i)if("string"==typeof i){let l,r=F.get(t=t.head||t);if(r||F.set(t,r=new Set),!r.has(s)){l=a.document.createElement("style"),l.textContent=i;const c=null!=(e=d.A)?e:R(a.document);if(null!=c&&l.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(h){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),v?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+=f),r&&r.add(s)}}else{let n=F.get(t);if(n||F.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}v?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s)}}return s})(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);$t(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>wt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},$t=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var o,l,s,i,r;const c=t.$hostElement$,u=t.o,f=t.F||U(null,null),p=(t=>t&&t.O===_)(n)?n:H(null,null,n);if(x=c.tagName,e&&p.m)for(const t of Object.keys(p.m))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(p.m[t]=c[t]);if(p.O=null,p.u|=4,t.F=p,p.k=f.k=c.shadowRoot||c,Q=!(!(1&u.u)||128&u.u),A=c["s-cr"],X=!1,ut(f,p,e),d.u|=1,tt){at(p.k);for(const t of ft){const n=t.N;if(!n["s-ol"]&&a.document){const t=a.document.createTextNode("");t["s-nr"]=n,dt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of ft){const n=t.N,r=t.M;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),r){const t=r.parentNode;let o=r.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(dt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=a.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,dt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(X&&N(p.k),d.u&=-2,ft.length=0,!Q&&!(1&u.u)&&c["s-cr"]){const t=p.k.__childNodes||p.k.childNodes;for(const n of t)if(n["s-hn"]!==x&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=a.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],dt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}A=void 0})(t,n,o)}catch(n){i(n,t.$hostElement$)}return null},wt=t=>{const n=t.$hostElement$,e=t.i,o=t.T;jt(e,"componentDidRender",void 0,n),64&t.u?jt(e,"componentDidUpdate",void 0,n):(t.u|=64,St(n),jt(e,"componentDidLoad",void 0,n),t.D(n),o||gt()),t.C&&(t.C(),t.C=void 0),512&t.u&&S((()=>ht(t,!1))),t.u&=-517},gt=()=>{S((()=>V(a,"appload",{detail:{namespace:"recipe-ui"}})))},jt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){i(t,o)}},St=t=>t.classList.add("hydrated"),Ot=(t,n,e,l)=>{const s=o(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(n),u=s.u,f=s.i;if(e=W(e,l.t[n][0]),!(8&u&&void 0!==c||e===c||Number.isNaN(c)&&Number.isNaN(e))){if(s.l.set(n,e),l.P){const t=l.P[n];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](e,c,n):s.R.push((()=>{s.i[o](e,c,n)})))}catch(t){i(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(e,c,n)&&!(16&u))return;16&u||ht(s,!1)}}},kt=(n,e,l)=>{var s,i;const r=n.prototype;{n.watchers&&!e.P&&(e.P=B(n.watchers)),n.deserializers&&!e.H&&(e.H=n.deserializers),n.serializers&&!e.U&&(e.U=n.serializers);const c=Object.entries(null!=(s=e.t)?s:{});if(c.map((([n,[s]])=>{if(31&s||2&l&&32&s){const{get:i,set:c}=t(r,n)||{};i&&(e.t[n][0]|=2048),c&&(e.t[n][0]|=4096),(1&l||!i)&&Object.defineProperty(r,n,{get(){{if(!(2048&e.t[n][0]))return((t,n)=>o(this).l.get(n))(0,n);const t=o(this),l=t?t.i:r;if(!l)return;return l[n]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,n,{set(t){const i=o(this);if(i){if(c)return void 0===(32&s?this[n]:i.$hostElement$[n])&&i.l.get(n)&&(t=i.l.get(n)),c.call(this,W(t,s)),void Ot(this,n,t=32&s?this[n]:i.$hostElement$[n],e);{if(!(1&l&&4096&e.t[n][0]))return Ot(this,n,t,e),void(1&l&&!i.i&&i.R.push((()=>{4096&e.t[n][0]&&i.i[n]!==i.l.get(n)&&(i.i[n]=t)})));const o=()=>{const o=i.i[n];!i.l.get(n)&&o&&i.l.set(n,o),i.i[n]=W(t,s),Ot(this,n,i.i[n],e)};i.i?o():i.R.push((()=>{o()}))}}}})}})),1&l){const t=new Map;r.attributeChangedCallback=function(n,l,s){d.jmp((()=>{var i;const u=t.get(n),f=o(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&s!==l){const o=f.i,r=null==(i=e.P)?void 0:i[n];null==r||r.forEach((e=>{const[[i,r]]=Object.entries(e);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,n)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(r,u);p||s==this[u]||h.get&&!h.set||(this[u]=s)}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.P)?i:{}),...c.filter((([t,n])=>31&n[0])).map((([n,e])=>{const o=e[1]||n;return t.set(o,n),o}))]))}}return n},Nt=async(t,n,e)=>{var o;let l;try{if(!(32&n.u)){if(n.u|=32,n.u&=-1025,e._){const s=((t,n)=>{var e;const o=t.h.replace(/-/g,"_"),l=t._;if(!l)return;const s=r.get(l);if(s)return s[o];const u=null!=(e=c.get(l))?e:0,f=[u>0?"s-retry="+u:"",""].filter(Boolean).join("&");
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
3
- return import(`./${l}.entry.js${f?"?"+f:""}`).then((t=>(c.delete(l),r.set(l,t),t[o])),(t=>{c.set(l,u+1),i(t,n.$hostElement$)}))})(e,n);if(s&&"then"in s){const t=()=>{};l=await s,t()}else l=s;if(!l)throw n.u&=-33,n.B=(null!=(o=n.B)?o:0)+1,n.B<3&&(n.u|=1024),Error(`Constructor for "${e.h}#${n.W}" was not found`);l.isProxied||(e.P=B(l.watchers),e.U=l.serializers,e.H=l.deserializers,kt(l,e,2),l.isProxied=!0);const u=()=>{};n.u|=8;try{new l(n)}catch(n){i(n,t)}n.u&=-9,n.u|=128,u(),4&e.u?n.L=!0:Et(n.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const n=D(e);if(!u.has(n)){const o=()=>{};((t,n,e)=>{let o=u.get(t);h&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,u.set(t,o)})(n,t,!!(1&e.u)),o()}}}const s=n.T,f=()=>ht(n,!0);s&&s["s-rc"]?s["s-rc"].push(f):f()}catch(e){i(e,t),n.C&&(n.C(),n.C=void 0),!n.D||1024&n.u||n.D(t)}},Et=(t,n)=>{jt(t,"connectedCallback",void 0,n)},Mt=(t,n)=>{jt(t,"disconnectedCallback",void 0,n||t)},Ct=(t,n={})=>{var e;if(!a.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],s=n.exclude||[],i=a.customElements,r=a.document.head,c=r.querySelector("meta[charset]"),u=a.document.createElement("style"),p=[];let h,v=!0;Object.assign(d,n),d.p=new URL(n.resourcesUrl||"./",a.document.baseURI).href;let m=!1;if(t.map((t=>{t[1].map((n=>{var e,r;const c={u:n[0],h:n[1],t:n[2],V:n[3]};4&c.u&&(m=!0),c.t=n[2],c.P=B(n[4]),c.U=null!=(e=n[5])?e:{},c.H=null!=(r=n[6])?r:{};const u=c.h,f=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,q:new Map};e.I=new Promise((t=>e.D=t)),t["s-p"]=[],t["s-rc"]=[],e.R=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,c),1&c.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else k.call(t,c)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),h&&(clearTimeout(h),h=null),v?p.push(this):d.jmp((()=>(t=>{if(!(1&d.u)){const n=o(t);if(!n)return;const e=n.o,l=()=>{};if(1&n.u)(null==n?void 0:n.i)?Et(n.i,t):1024&n.u?setTimeout((()=>Nt(t,n,e)),1e3):(null==n?void 0:n.I)&&n.I.then((()=>Et(n.i,t)));else{n.u|=1,12&e.u&&(t=>{if(!a.document)return;const n=t["s-cr"]=a.document.createComment("");n["s-cn"]=!0,dt(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){pt(n,n.T=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),Nt(t,n,e)}l()}})(this))))}disconnectedCallback(){d.jmp((()=>(async t=>{if(!(1&d.u)){const n=o(t);(null==n?void 0:n.i)?Mt(n.i,t):(null==n?void 0:n.I)&&n.I.then((()=>Mt(n.i,t)))}F.has(t)&&F.delete(t),t.shadowRoot&&F.has(t.shadowRoot)&&F.delete(t.shadowRoot)})(this))),S((()=>{var t;const n=o(this);if(!n)return;const e=p.findIndex((t=>t===this));e>-1&&p.splice(e,1),(null==(t=null==n?void 0:n.F)?void 0:t.k)instanceof Node&&!n.F.k.isConnected&&delete n.F.k}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.I}};c._=t[0],s.includes(u)||i.get(u)||(l.push(u),i.define(u,kt(f,c,1)))}))})),l.length>0&&(m&&(u.textContent+=f),u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=d.A)?e:R(a.document);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}v=!1,p.length?p.map((t=>t.connectedCallback())):d.jmp((()=>h=setTimeout(gt,30)))},Tt=t=>d.A=t;export{Ct as b,z as c,H as h,p,l as r,Tt as s}