1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6756],{4671:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/budtender",function(){return a(5579)}])},5579:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return u}});var s=a(7458),i=a(3701),n=a.n(i),l=a(2983),o=a(3780);let r=["Sleep","Calm","Relief","Focusâ¢Create","Socialâ¢Joy","Sensual","Balance"],d=["Sleepy","Racy","Foggy","Munchies"],c=["Flower","Pre-Roll","Vape","Edible","Tincture","Beverage","Topical"];function u(){let[e,t]=(0,l.useState)("potomac-penthouse"),[i,u]=(0,l.useState)("MD"),[p,h]=(0,l.useState)("Calm"),[f,x]=(0,l.useState)([]),[g,m]=(0,l.useState)("Vape"),[j,y]=(0,l.useState)("Evening"),[v,b]=(0,l.useState)("Low"),[S,C]=(0,l.useState)(1),[w,T]=(0,l.useState)(""),[k,N]=(0,l.useState)([]),[_,O]=(0,l.useState)([]),[A,z]=(0,l.useState)([]),[P,D]=(0,l.useState)(""),[E,L]=(0,l.useState)(""),[F,R]=(0,l.useState)(""),[I,Z]=(0,l.useState)(""),[B,J]=(0,l.useState)(""),M=e=>x(f.includes(e)?f.filter(t=>t!==e):[...f,e]),U=async()=>{let t={storeCode:e,limit:5};w?t.sku=w:(t.effect_family=p,t.base_form=g);let a=await fetch("/api/v1/attach/suggestions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),s=await a.json();O((null==s?void 0:s.suggestions)||[])},V=async()=>{let t=await fetch("/api/v1/match",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({goals:[p],avoid:f,form:g,daypart:j,thcComfort:v,state:i,storeCode:e})}),a=await t.json();N((null==a?void 0:a.results)||[]),await U()},G=async()=>{var t;let a=await fetch("/api/v1/receipts/draft",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:P||void 0,storeCode:e,context:{goal:p,avoidList:f,form:g,daypart:j,thc:v,lane:S,state:i},items:A})}),s=await a.json(),n=null==s?void 0:null===(t=s.draft)||void 0===t?void 0:t.id;n&&(D(n),J("Saved draft: ".concat(n)))},H=async()=>{if(!E)return;let e=await fetch("/api/v1/receipts/draft?id=".concat(encodeURIComponent(E)));if(e.ok){let a=await e.json();D(a.draft.id),t(a.draft.storeCode),z(a.draft.items||[]),J("Loaded: ".concat(a.draft.id))}},W=async()=>{if(!F||0===A.length){J("Add items and receipt hash");return}let t=0;for(let a of A)(await fetch("/api/v1/reviews/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({storeCode:e,receipt_hash:F,sku:a.sku,rating:5,effectFelt:p,userId:"demo-user"})})).ok&&t++;J("Submitted ".concat(t,"/").concat(A.length))},K=async()=>{let{default:t}=await a.e(7658).then(a.t.bind(a,7658,19)),s=P||"demo-rid",i=await t.toDataURL("https://sol.md/verify?rid=".concat(s)),n=window.open("","_blank");if(!n)return;let l='<html><head><title>SOL Receipt</title></head><body style="font-family:system-ui;padding:16px"><h2>Receipt â '.concat(e,"</h2><p><strong>Effect:</strong> ").concat(p," <strong>Lane:</strong> ").concat(S," <strong>When:</strong> ").concat(j,"</p><hr/><h3>Items</h3><p><img src='").concat(i,"' style='width:140px;height:140px;border:1px solid #eee;padding:4px;border-radius:8px' /></p><ul>").concat(A.map(e=>"<li><strong>".concat(e.sku,"</strong> â ").concat(e.because||"","</li>")).join(""),'</ul><p style="font-size:12px;color:#666">21+ only. Not medical advice. Effects vary.</p></body></html>');n.document.write(l),n.document.close(),n.focus(),n.print()},X=async()=>{let e=await fetch("/api/v1/pos/because",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:A,maxLen:160})}),t=await e.json();Z((null==t?void 0:t.because)||"")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n(),{children:(0,s.jsx)("meta",{name:"robots",content:"noindex, follow"})}),(0,s.jsxs)("main",{style:{fontFamily:"Inter, system-ui",padding:24,maxWidth:1100,margin:"0 auto"},children:[(0,s.jsx)("h1",{children:"Budtender Co-Pilot"}),(0,s.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:8},children:[(0,s.jsx)("input",{value:e,onChange:e=>t(e.target.value),placeholder:"Store code"})," ",["MD","DC","VA","PA","NJ"].map(e=>(0,s.jsx)(o.Af,{label:e,selected:i===e,onToggle:()=>u(e)},e))]}),(0,s.jsxs)("div",{className:"grid",style:{gridTemplateColumns:"1fr 1fr 1fr"}
1,children:[(0,s.jsxs)(o.Zb,{title:"Intent",children:[r.map(e=>(0,s.jsx)(o.Af,{label:e,selected:p===e,onToggle:()=>h(e)},e)),(0,s.jsx)("div",{style:{marginTop:8},children:["Morning","Day","Evening"].map(e=>(0,s.jsx)(o.Af,{label:e,selected:j===e,onToggle:()=>y(e)},e))})]}),(0,s.jsx)(o.Zb,{title:"Avoid",children:d.map(e=>(0,s.jsx)(o.Af,{label:e,selected:f.includes(e),onToggle:()=>M(e)},e))}),(0,s.jsxs)(o.Zb,{title:"Form/Comfort",children:[c.map(e=>(0,s.jsx)(o.Af,{label:e,selected:g===e,onToggle:()=>m(e)},e)),(0,s.jsx)("div",{style:{marginTop:8},children:["Low","Medium","High"].map(e=>(0,s.jsx)(o.Af,{label:e,selected:v===e,onToggle:()=>b(e)},e))}),(0,s.jsx)(o.Ut,{value:S,onChange:C})]})]}),(0,s.jsxs)("div",{style:{display:"flex",gap:8,marginTop:12},children:[(0,s.jsx)("input",{value:w,onChange:e=>T(e.target.value),placeholder:"Base SKU (optional)"}),(0,s.jsx)(o.zx,{onClick:V,children:"Get Recs"}),(0,s.jsx)(o.zx,{variant:"gold",onClick:U,children:"Get Attach"}),(0,s.jsx)(o.zx,{variant:"outline",onClick:K,children:"Print"})]}),(0,s.jsxs)("div",{className:"grid",style:{gridTemplateColumns:"1fr 1fr",marginTop:12},children:[(0,s.jsx)(o.Zb,{title:"Top Matches",children:(0,s.jsx)("div",{className:"grid",style:{gridTemplateColumns:"repeat(auto-fit, minmax(260px, 1fr))"},children:k.map(e=>(0,s.jsxs)("div",{className:"card",children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsxs)("strong",{children:[e.effect_family," ⢠Lane ",e.dose_lane]}),(0,s.jsx)(o.Dk,{score:e.sol_score})]}),(0,s.jsx)(o.Mr,{text:e.because}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,s.jsx)(o.zx,{variant:"outline",onClick:()=>z([...A,{sku:e.sku,because:e.because}]),children:"Add"})})]},e.sku))})}),(0,s.jsx)(o.Zb,{title:"Attach Suggestions",children:(0,s.jsx)("div",{className:"grid",style:{gridTemplateColumns:"repeat(auto-fit, minmax(260px, 1fr))"},children:_.map(e=>{var t;return(0,s.jsxs)("div",{className:"card",children:[(0,s.jsxs)("strong",{children:[e.effect," ⢠",e.form]}),(0,s.jsxs)("p",{children:["SKU: ",e.sku," | Lane ",null!==(t=e.lane)&&void 0!==t?t:"â"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("em",{children:"Because:"})," ",e.because]}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,s.jsx)(o.zx,{variant:"outline",onClick:()=>z([...A,{sku:e.sku,because:e.because}]),children:"Add"})})]},e.sku)})})})]}),(0,s.jsxs)("div",{className:"grid",style:{gridTemplateColumns:"1fr 1fr",marginTop:12},children:[(0,s.jsxs)(o.Zb,{title:"Draft",children:[(0,s.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,s.jsx)(o.zx,{variant:"outline",onClick:G,children:"Save Draft"}),(0,s.jsx)("input",{value:E,onChange:e=>L(e.target.value),placeholder:"Draft ID"}),(0,s.jsx)(o.zx,{variant:"outline",onClick:H,children:"Load"})]}),(0,s.jsx)("p",{style:{fontSize:12},children:B})]}),(0,s.jsxs)(o.Zb,{title:"Finalize",children:[(0,s.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,s.jsx)("input",{value:F,onChange:e=>R(e.target.value),placeholder:"Receipt Hash"}),(0,s.jsx)(o.zx,{variant:"gold",onClick:W,children:"Finalize to Verified"})]}),(0,s.jsxs)("div",{style:{display:"grid",gap:8,marginTop:8},children:[(0,s.jsx)(o.zx,{variant:"outline",onClick:X,children:"Generate POS Because"}),(0,s.jsx)("textarea",{readOnly:!0,value:I,style:{width:"100%",minHeight:80}})]})]})]}),(0,s.jsx)(o.Zb,{title:"Staged Items",children:0===A.length?(0,s.jsx)("p",{children:"None"}):(0,s.jsx)("ul",{children:A.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{children:e.sku})," â ",e.because||""]},e.sku))})})]})]})}},3701:function(e,t,a){e.exports=a(4427)}},function(e){e.O(0,[1033,3780,2888,9774,179],function(){return e(e.s=4671)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.