import{a as S,f as k}from"./2.3.1_string2.js";import{_ as p,r as d,o as r,f as v,w as h,a as g,n as B,c as l,t as w,B as E,C as j,v as q,F as z,x as D,b as x,j as L,u as $}from"./2.3.1_index.js";import"./2.3.1_string.js";import{m as b}from"./2.3.1_shack.js";import{f as N,n as A}from"./2.3.1_veranda.js";const T={components:{},props:{new_tab:{default:!1,type:Boolean},text:{default:"",type:String},address:{default:"",type:String}},mounted(){console.log(this.$slots._)}},V=["target","href"],F={key:0},I={key:1};function G(e,f,s,i,a,t){const n=d("lounge");return r(),v(n,null,{default:h(({palette:o,style:u})=>[g("a",{target:s.new_tab?"_blank":"",class:"outer-link",href:s.address,style:B(Object.assign({},{color:o.button.color,transition:["color "+o.change_duration].join(", "),textDecoration:"underline"},u))},[this.$slots._!==1&&s.text.length===0?(r(),l("span",F,w(s.address),1)):this.$slots._!==1&&s.text.length>=1?(r(),l("span",I,w(s.text),1)):E(e.$slots,"default",{key:2},void 0,!0)],12,V)]),_:3})}const O=p(T,[["render",G],["__scopeId","data-v-4fce88a2"]]),U={components:{s_outer_button_link:O,s_outer_link:j,s_button:q},props:{affiliates:Array},methods:{furnish_string:S}},H=g("h2",{style:{textAlign:"center"}},"affiliate sources",-1),J={key:0,style:{textAlign:"center",height:"100%",paddingTop:"5px",boxSizing:"border-box"}};function K(e,f,s,i,a,t){const n=d("s_outer_button_link"),o=d("lounge");return r(),v(o,null,{default:h(({palette:u})=>[H,(r(!0),l(z,null,D(s.affiliates,c=>(r(),l("div",null,[x(n,{new_tab:!0,address:t.furnish_string(c,"link",""),text:t.furnish_string(c,"name",""),style:{}},null,8,["address","text"])]))),256)),s.affiliates.length===0?(r(),l("div",J," not found ")):L("",!0)]),_:1})}const ie=p(U,[["render",K]]);function ae(){try{let e;if(arguments.length===3?e=$(arguments[0],arguments[1],arguments[2]):arguments.length===2?e=$(arguments[0],arguments[1],""):arguments.length===1&&(e=arguments[0]),Array.isArray(e)===!0)return e;throw console.log(arguments),new Error("An array could not be furnished from the preceeding arguments.")}catch(e){console.log("exception:",e)}return[]}const M={components:{s_outer_link:j,s_button:q},props:["goodness"],methods:{furnish_array:k,furnish_string:S},computed:{goodness_certs(){return k(this,"goodness")}}},P={style:{display:"flex",justifyContent:"space-between",flexDirection:"column"}},Q=g("h3",{style:{margin:0,fontSize:".8em"}},"Goodness Certifications",-1),R={key:0},W=g("p",null,"Certification info for this product was not found.",-1),X=[W],Y={key:1};function Z(e,f,s,i,a,t){const n=d("s_outer_link"),o=d("s_button"),u=d("lounge");return r(),v(u,null,{default:h(({palette:c})=>[g("div",P,[Q,t.goodness_certs.length===0?(r(),l("div",R,X)):(r(),l("div",Y,[(r(!0),l(z,null,D(t.goodness_certs,_=>(r(),l("div",null,[x(o,{ref_for:!0,ref:"button",pressable:!0,boundaries:"3px 12px 3px",clicked:()=>{},styles:{inside:{}}},{default:h(()=>[x(n,{new_tab:!0,address:t.furnish_string(_,["links",0]),style:B({color:c[1]}),text:t.furnish_string(_,["show","text"],"")},null,8,["address","style","text"])]),_:2},1536)]))),256))]))])]),_:1})}const ue=p(M,[["render",Z]]);function C({ingredient:e}){try{return N(e.measures["biological activity"]["per recipe"].IU["fraction string"],!1)}catch{}return""}const ee=function({grove:e,by:f="mass + mass equivalents",direction:s="forward"}){if(!Array.isArray(e)){console.error("The 'grove' is not an array.",e);return}if(s==="backward")var i=-1,a=1;else var i=1,a=-1;e.sort((t,n)=>{if(f==="mass + mass equivalents"){var o=b({ingredient:t}),u=b({ingredient:n}),c=C({ingredient:t}),_=C({ingredient:n}),m=A({ingredient:t}).toLowerCase(),y=A({ingredient:n}).toLowerCase();if(o===""&&u===""){if(c==="")return i;if(_==="")return a;if(c>_)return i;if(c<_)return a;if(m==="")return i;if(y==="")return a;if(m>y)return i;if(m<y)return a}return o===""?i:u===""||o>u?a:o<u?i:0}else throw new Error("The sorting by string is not accounted for.")});for(let t=0;t<e.length;t++)try{const n=e[t].unites;Array.isArray(n)&&n.length>=1&&ee({grove:n,by:f})}catch(n){console.error(n)}};export{ie as a,ae as f,ue as g,ee as s};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 19580 characters]
