PageSourceSearch

https://dashboard.distribute.you/_next/static/chunks/12ujt~q2-w1~g.js

js distribute.you collected 2026-10-06 10:08:00 UTC 35,305 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,953688,e=>{"use strict";var t=e.i(942151),a=e.i(94884);let n=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,56l-96,88L32,56Z",opacity:"0.2"}),t.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,144H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM208.58,62,128,135.86,47.42,62ZM216,194H40a2,2,0,0,1-2-2V69.64l86,78.78a6,6,0,0,0,8.1,0L218,69.64V192A2,2,0,0,1,216,194Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-10.28,8L128,138.57,42.28,60ZM216,196H40a4,4,0,0,1-4-4V65.09L125.3,147a4,4,0,0,0,5.4,0L220,65.09V192A4,4,0,0,1,216,196Z"}))]]),l=t.forwardRef((e,l)=>t.createElement(a.default,{ref:l,...e,weights:n}));l.displayName="EnvelopeSimpleIcon",e.s(["EnvelopeSimpleIcon",0,l],953688)},407022,e=>{"use strict";var t=e.i(327477),a=e.i(942151);let n=a.forwardRef(function({title:e,titleId:t,...n},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))});e.s(["BrandLogo",0,function({domain:e,logoUrl:l,size:s=24,className:r,fallbackClassName:i}){let[o,c]=(0,a.useState)(null),d=l?.trim()?l:null,u=e?`https://img.logo.dev/${e}?token=pk_J1iY4__HSfm9acHjR8FibA`:null,m=d&&o!==d?d:u;return m&&o!==m?(0,t.jsx)("img",{src:m,alt:e??"",width:s,height:s,className:r||"rounded",onError:()=>c(m)}):(0,t.jsx)(n,{className:i||r,style:{width:s,height:s}})}],407022)},319777,e=>{"use strict";var t=e.i(942151),a=e.i(94884);let n=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216
1Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216
1Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),l=t.forwardRef((e,l)=>t.createElement(a.default,{ref:l,...e,weights:n}));l.displayName="FileTextIcon",e.s(["FileTextIcon",0,l],319777)},762019,e=>{"use strict";var t=e.i(327477),a=e.i(942151),n=e.i(674879),l=e.i(243241);let s=new Set(["Victory","Sol","Herald","Epiphany","Triumph","Zenith","Summit","Glory","Aurora","Bounty","Jubilee","Radiance","Apex","Laurel","Harvest","Eureka","Halo","Crown","Pinnacle","Ascent","Bliss","Splendor","Fortune","Valor","Anthem","Beacon","Comet","Dawn","Elation","Encore","Euphoria","Fanfare","Flourish","Gala","Gleam","Golden","Grace","Honor","Horizon","Jackpot","Joy","Jubilation","Lumen","Luster","Majesty","Marvel","Meridian","Miracle","Nova","Oasis","Opulence","Ovation","Paragon","Plenty","Prism","Prodigy","Rapture","Regal","Rise","Rhapsody","Riches","Soar"]);var r=e.i(875994),i=e.i(911246),o=e.i(348193),c=e.i(303850),d=e.i(705387),u=e.i(525005);let m=e=>null==e?"—":(0,o.formatUsdAdaptive)(e);function p({tip:e,children:a}){return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[a,(0,t.jsx)(c.InfoTooltip,{tip:e,placement:"bottom"})]})}function h({paths:e,open:n,setOpen:s,gainHeadline:r,selected:i,onToggleSelected:o,onStateRate:c,onStateLifetimeRevenue:d}){let[g,b]=(0,a.useState)(!1),y=g?e:e.slice(0,20),j=r?3:4;return(0,t.jsxs)("div",{className:"k-card overflow-hidden",children:[(0,t.jsx)("div",{className:"k-scroll overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-[13px] sm:min-w-[640px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"k-line-subtle border-b",children:[(0,t.jsx)("th",{className:"k-label w-10 px-3 py-2.5 pl-4 text-left font-normal",children:(0,t.jsx)("span",{className:"sr-only",children:"Selected"})}),(0,t.jsx)("th",{className:"k-label px-3 py-2.5 text-left font-normal",children:"Path"}),!r&&(0,t.jsx)("th",{className:"k-label hidden px-3 py-2.5 text-right font-normal sm:table-cell",children:(0,t.jsx)(p,{tip:u.EXPECTED_COST_PER_CLIENT_TIP,children:"Cost per paying client"})}),(0,t.jsx)("th",{className:"k-label px-3 py-2.5 pr-4 text-right font-normal",children:(0,t.jsx)(p,{tip:u.EXPECTED_ROI_TIP,children:r?"Return":"ROI"})})]})}),(0,t.jsx)("tbody",{children:y.map(e=>{let a=n===e.combinationKey,p=i?.has(e.combinationKey)??!1,h=(0,u.roiUnavailableLabel)(e.roiUnavailableReason);return[(0,t.jsxs)("tr",{"aria-expanded":a,onClick:()=>s(a?null:e.combinationKey),className:`k-row cursor-pointer ${p?"bg-[var(--accent-soft)]":""} ${a?"":"k-line-subtle border-b"}`,children:[(0,t.jsx)("td",{className:"px-3 py-2 pl-4",children:(0,t.jsx)("button",{type:"button","aria-pressed":p,"aria-label":p?"Untick this path":"Tick this path",disabled:!o,onClick:t=>{t.stopPropagation(),o?.(e.combinationKey,!p)},className:"-m-1 inline-flex h-6 w-6 items-center justify-center",children:(0,t.jsx)("span",{"aria-hidden":!0,className:`inline-flex h-4 w-4 items-center justify-center rounded-[4px] border text-[10px] text-white ${p?"border-[var(--accent)] bg-[var(--accent)]":"border-[var(--line-strong)]"}`,children:p?"✓":""})})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(f,{path:e})}),!r&&(0,t.jsx)("td",{className:"k-fg2 hidden px-3 py-2 text-right tabular-nums sm:table-cell",children:m(e.costPerPayingClientUsd)}),(0,t.jsx)("td",{className:`whitespace-nowrap px-3 py-2 pr-4 text-right align-top font-semibold tabular-nums ${(0,l.roiIsGood)(e.roi)?"text-[var(--run)]":""}`,title:h??void 0,children:(0,l.formatRoi)(e.roi)})]},e.combinationKey),a?(0,t.jsx)("tr",{className:"k-line-subtle border-b",children:(0,t.jsx)("td",{colSpan:j,className:"p-0",children:(0,t.jsx)(x,{path:e,onStateRate:c,onStateLifetimeRevenue:d})})},`${e.combinationKey}-detail`):null]})})]})}),e.length>y.length&&(0,t.jsxs)("div",{className:"k-fg3 flex items-center justify-between px-4 py-2.5 text-[12px] tabular-nums",children:[(0,t.jsxs)("span",{children:[y.length," of ",e.length]}),(0,t.jsxs)("button",{type:"button",className:"k-btn-ghost h-6 px-2 text-[12px]",onClick:()=>b(!0),children:["Show ",e.length-y.length," more"]})]})]})}function f({path:e}){let a=(0,u.pathLinks)(e),n=(0,r.useAcquisitionChannels)();return(0,t.jsx)("span",{className:"inline-flex flex-wrap items-center gap-x-1.5 gap-y-1",children:a.map((e,a)=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-x-1.5",children:[a>0&&(0,t.jsx)("span",{className:"k-fg3",children:"→"}),"channel"===e.kind?(0,t.jsx)(g,{name:e.name,def:n.find(t=>t.featureSlug===e.slug),notRun:!1===e.managed}):(0,t.jsx)("span",{children:e.label})]},a))})}function g({name:e,def:a,notRun:n,compact:l=!1}){return(0,t.jsxs)("span",{className:`k-chip ${n?"k-fg3":""}`,style:l?{fontSize:11,height:18,gap:4,padding:"0 5px"}:void 0,title:n?"We don't run this channel yet":void 0,children:[a&&(0,t.jsx)(i.AcquisitionChannelMark,{def:a,size:"xs",dimmed:n}),e]})}function x({path:e,onStateRate:a,onStateLifetimeRevenue:n}){let s=(0,u.roiUnavailableLabel)(e.roiUnavailableReason);return(0,t.jsxs)("div",{className:"k-inset space-y-3 px-4 pb-4 pt-1",children:[(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full min-w-[640px] text-[12px]",children:[(0,t.jsx)("thead",{className:"k-fg3 text-left",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"py-1.5 pr-3 font-medium",children:"Leg"}),(0,t.jsx)("th",{className:"py-1.5 pr-3 font-medium",children:"Rate kept"}),(0,t.jsx)("th",{className:"py-1.5 pr-3 font-medium",children:"Source"}),(0,t.jsx)("th",{className:"py-1.5 pr-3 font-medium",children:"Worked by"}),(0,t.jsx)("th",{className:"py-1.5 text-right font-medium",children:(0,t.jsx)(p,{tip:u.EXPECTED_COST_PER_CLIENT_TIP,children:"Cost per paying client"})})]})}),(0,t.jsx)("tbody",{children:e.legs.map(e=>(0,t.jsx)(b,{leg:e,onStateRate:a},e.legKey))})]})}),(0,t.jsxs)("dl",{className:"grid grid-cols-2 gap-x-6 gap-y-1 text-[12px] sm:grid-cols-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"k-fg3",children:"From entry to paying client"}),(0,t.jsx)("dd",{className:"tabular-nums",children:(0,u.formatRatePct)(e.entryToPayingClientPct)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"k-fg3",children:"Lifetime revenue kept"}),(0,t.jsx)("dd",{className:"tabular-nums",children:n?(0,t.jsx)(j,{value:e.lifetimeRevenueUsd,onSave:n}):m(e.lifetimeRevenueUsd)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"k-fg3",children:"Cost per paying client"}),(0,t.jsx)("dd",{className:"tabular-nums",children:m(e.costPerPayingClientUsd)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"k-fg3",children:"ROI"}),(0,t.jsx)("dd",{className:"tabular-nums",children:s??(0,l.formatRoi)(e.roi)})]})]})]})}function b({leg:e,onStateRate:a}){let n=e.fromStep?.label??"Start",l=e.rateInputs,{measured:s}=l??{measured:null},{ratePct:r,toReached:i,fromReached:o}=s??{},c=l?[null!=r?`measured ${(0,u.formatRatePct)(r)} (${i??0} of ${o??0})`:null,null!=l.customerStatedPct?`stated ${(0,u.formatRatePct)(l.customerStatedPct)}`:null,null!=l.fleetMedian.ratePct?`median ${(0,u.formatRatePct)(l.fleetMedian.ratePct)} over ${l.fleetMedian.brandCount} brands`:null,null!=l.industryDefaultPct?`benchmark ${(0,u.formatRatePct)(l.industryDefaultPct)}
1`:null].filter(Boolean).join(" · "):null,d="human"!==e.workedBy||e.channel?.name?e.channel?.name?`${e.channel.name}${null!=e.costPerOutcomeUsd?` \xb7 ${m(e.costPerOutcomeUsd)} each`:""}`:"No channel priced":"Your team",p=(0,u.costSourceLabel)(e.costSource);return(0,t.jsxs)("tr",{className:"border-t border-[var(--line-subtle)] align-top",children:[(0,t.jsxs)("td",{className:"py-1.5 pr-3",children:[n," ",(0,t.jsx)("span",{className:"k-fg3",children:"→"})," ",e.toStep.label]}),(0,t.jsx)("td",{className:"py-1.5 pr-3 tabular-nums",children:e.fromStep?a?(0,t.jsx)(y,{leg:e,onStateRate:a}):(0,u.formatRatePct)(e.conversionRatePct):"—"}),(0,t.jsxs)("td",{className:"py-1.5 pr-3",children:[(0,t.jsx)("div",{children:e.fromStep?(0,u.rateSourceLabel)(e.rateSource):"Entry"}),c&&(0,t.jsx)("div",{className:"k-fg3 text-[11px]",children:c})]}),(0,t.jsxs)("td",{className:"py-1.5 pr-3",children:[(0,t.jsx)("div",{children:d}),p&&(0,t.jsxs)("div",{className:"k-fg3 text-[11px]",title:e.channel?.costBenchmarkSource??void 0,children:[p,e.channel?.managed===!1?" · not run by us yet":""]})]}),(0,t.jsx)("td",{className:"py-1.5 text-right tabular-nums",children:m(e.costPerPayingClientUsd)})]})}function y({leg:e,onStateRate:n}){let l=null==e.conversionRatePct?"":String((0,d.roundLegRatePct)(e.conversionRatePct)),[s,r]=(0,a.useState)(l),[i,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),m=s.trim()!==l;async function p(){let t=(0,d.parseRateInput)(s);if(void 0===t)return void u(d.LEG_RATE_RULE);o(!0),u(null);try{await n(e,t)}catch(e){console.error("[offer-sales-paths] rate save failed",e),u("Could not save. Try again.")}finally{o(!1)}}return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("input",{className:"k-input h-6 w-12 px-1.5 text-right tabular-nums",inputMode:"decimal",value:s,onChange:e=>{r(e.target.value),u(null)},onKeyDown:e=>{"Enter"===e.key&&m&&p()},"aria-label":`Conversion rate from ${e.fromStep?.label??"start"} to ${e.toStep.label}, in percent`,disabled:i}),(0,t.jsx)("span",{className:"k-fg3",children:"%"}),m&&(0,t.jsx)("button",{type:"button",className:"k-btn h-6 px-2 text-[11.5px]",onClick:()=>void p(),disabled:i,children:i?"Saving...":"Save"}),c&&(0,t.jsx)("span",{className:"w-full text-[11px] text-[var(--data-rose)]",children:c})]})}function j({value:e,onSave:n}){let l=null==e?"":String(Math.round(e)),[s,r]=(0,a.useState)(l),[i,o]=(0,a.useState)(!1),[c,d]=(0,a.useState)(null),u=s.trim()!==l;async function m(){let e=s.trim().replace(/^\$/,"").replace(/,/g,"");if(!/^\d+$/.test(e)||0>=Number(e))return void d("Whole dollars, above 0.");o(!0),d(null);try{await n(Number(e))}catch(e){console.error("[offer-sales-paths] lifetime revenue save failed",e),d("Could not save. Try again.")}finally{o(!1)}}return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("span",{className:"k-fg3",children:"$"}),(0,t.jsx)("input",{className:"k-input h-6 w-20 px-1.5 text-right tabular-nums",inputMode:"numeric",value:s,onChange:e=>{r(e.target.value),d(null)},onKeyDown:e=>{"Enter"===e.key&&u&&m()},"aria-label":"Lifetime revenue of one client, in dollars",disabled:i}),u&&(0,t.jsx)("button",{type:"button",className:"k-btn h-6 px-2 text-[11.5px]",onClick:()=>void m(),disabled:i,children:i?"Saving...":"Save"}),c&&(0,t.jsx)("span",{className:"w-full text-[11px] text-[var(--data-rose)]",children:c})]})}e.s(["ChannelChip",0,g,"ExpectedLabel",0,p,"OfferSalesPaths",0,function({data:e,pending:l,failed:s,intro:r="Every way the ticked legs reach a paying client, best return first. Open one to see why.",bare:i=!1,gainHeadline:o=!1,selected:c,onToggleSelected:d,onStateRate:m,onStateLifetimeRevenue:p}){let[f,g]=(0,a.useState)(null),x=e?.paths??[];return(0,t.jsxs)("section",{children:[!i&&(0,t.jsx)(n.SectionTitle,{count:e?x.length:null,children:"Sales paths"}),!i&&r&&(0,t.jsx)("p",{className:"k-fg2 -mt-1 mb-3 text-[13px]",children:r}),l?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(n.Shimmer,{className:"h-12 rounded-[10px]"}),(0,t.jsx)(n.Shimmer,{className:"h-12 rounded-[10px]"})]}):s&&!e?(0,t.jsx)(n.EmptyNote,{children:"Could not read this offer's sales paths."}):e&&(0,u.salesPathsEmptyReason)(e.status)?(0,t.jsx)(n.EmptyNote,{children:(0,u.salesPathsEmptyReason)(e.status)}):(0,t.jsx)(h,{paths:x,open:f,setOpen:g,gainHeadline:o,selected:c,onToggleSelected:d,onStateRate:m,onStateLifetimeRevenue:p})]})},"PathAvatar",0,function({name:e,size:a}){let n=s.has(e)?`/sales-path-avatars/${e.toLowerCase()}.jpg`:null;return n?(0,t.jsx)("img",{src:n,alt:"",width:a,height:a,className:"shrink-0 rounded-full",style:{width:a,height:a}}):(console.error(`[offer-sales-paths] no avatar drawn for sales path "${e}": add one under public/sales-path-avatars`),(0,t.jsx)("span",{"aria-hidden":!0,style:{width:a,height:a},className:"k-inset k-fg2 inline-flex shrink-0 items-center justify-center rounded-full text-[12px] font-semibold",children:e.slice(0,1)}
1))}],762019)},721700,e=>{"use strict";var t=e.i(151162);e.s(["campaignKey",0,function(e,t){return`${e}:${t}`},"campaignTag",0,function(e){return e.reactive&&e.fromKey?`Reactive on ${(0,t.stepPlural)(e.fromKey,e.fromLabel??e.fromKey).toLowerCase()}`:"Daily Proactive"},"campaignsOfOffer",0,function(e,t,a){let n=new Map;for(let e of t)for(let t of e.legs)n.has(t.legKey)||n.set(t.legKey,t);let l=[];for(let t of e){if(t.selectedPathCount<=0||"customer"===t.operatedBy)continue;let e=n.get(t.legKey);if(!e){console.error("[offer-campaigns] a served campaign names a leg no listed path has",t);continue}l.push({featureSlug:t.channelSlug,legKey:t.legKey,name:t.campaignName,channelName:t.channelName,managed:t.managed,reactive:t.reactive,fromKey:e.fromStep?.key??null,fromLabel:e.fromStep?.label??null,toLabel:e.toStep.label,roi:t.roi,roiUnavailable:a(t.roiUnavailableReason)})}return l},"sortCampaigns",0,function(e,t){let a=e=>null!=e.roi&&Number.isFinite(e.roi)?e.roi:-1/0;return[...e].sort((e,n)=>Number(t(n))-Number(t(e))||Number(e.reactive)-Number(n.reactive)||a(n)-a(e))}])},797135,e=>{"use strict";let t={iconBg:"bg-purple-50",iconText:"text-purple-600"},a={conversation:{glyph:"hand-waving",tone:t},website_visit:{glyph:"cursor-click",tone:t},meeting_booked:{glyph:"calendar-plus",tone:t},meeting_attended:{glyph:"users-three",tone:t},signup:{glyph:"identification-badge",tone:t},form_submitted:{glyph:"clipboard",tone:t},paid_client:{glyph:"currency-dollar",tone:t},purchase:{glyph:"shopping-bag-open",tone:t},booking_call:{glyph:"phone-call",tone:t}},n={positive_reply:"conversation",website_visit:"website_visit",meeting_booked:"meeting_booked",meeting_attended:"meeting_attended",signup:"signup",form_submission:"form_submitted",sale:"paid_client"};function l(e){return e?a[r(e)]??null:null}let s={form_filled:"form_submitted",lead_form_submitted:"form_submitted"};function r(e){return s[e]??e}e.s(["STEP_KEY_FOR_LEAD_STAGE",0,n,"canonicalStepKey",0,r,"stepMarkFor",0,l,"stepMarkForLeadStage",0,function(e){return e?l(n[e]):null}])},198736,871303,e=>{"use strict";var t=e.i(172833);class a extends Error{channelStartRefusal=!0;constructor(e){super(e),this.name="ChannelStartRefusal"}}function n(e,t){return 404===e?`${t} cannot be turned on here yet. It has nothing to run for this outcome.`:null}function l(e,t){if(400!==e&&409!==e||!t||"string"!=typeof t.reason||"string"!=typeof t.error)return null;let a=t.error.trim();return a?a.slice(0,400):null}function s(e){return e?.trim()||null}e.s(["ChannelStartRefusal",0,a,"channelWriteErrorMessage",0,function(e,a){var n;let l=e?.status,s=e?.body,r=(0,t.campaignStartRefusalMessage)("number"==typeof l?l:null,s&&"object"==typeof s?s:null);if(r)return r;if(!0===e?.channelStartRefusal){let t=e.message;if("string"==typeof t&&t.trim())return t.trim().slice(0,400)}let i=e?.status;return n="number"==typeof i?i:null,"pause"===a?403===n?"You do not have access to this campaign.":404===n?"This campaign no longer exists.":"We could not pause this channel. Try again in a moment.":400===n?"We could not start this channel. It may not be ready to run for this outcome yet.":402===n?"Your credit balance is too low to start a channel. Top up and try again.":403===n?"You do not have access to this brand's campaigns.":"We could not start this channel. Try again in a moment."},"fundedPairRefusalMessage",0,l,"ladderStartRefusalMessage",0,n,"startableWorkflowDynastySlug",0,s],198736);var r=e.i(994327);async function i({brandId:e,offerId:t,featureSlug:l,legKey:o,channelName:c,legLabel:d,brandName:u}){let m=s((await (0,r.getWorkflowProjectionLadder)({featureSlug:l,brandId:e,offerId:t,leg:o}).catch(e=>{let t=e instanceof r.ApiError?n(e.status,c):null;if(t)throw new a(t);throw e})).recommendedWorkflowDynastySlug);if(!m)throw new a(`${c} is not ready for this outcome yet, so there is nothing to start.`);let[{feature:p},h]=await Promise.all([(0,r.getFeature)(l),(0,r.prefillFeatureInputs)(l,[e],t)]),f=(0,r.prefillToStringMap)(h.prefilled),g={};for(let e of p.inputs??[]){let t=f[e.key]?.trim();t&&(g[e.key]=t)}await (0,r.startCampaign)({name:`${u} — ${d??o} (${c})`,brandId:e,featureSlug:l,featureInputs:g,workflowDynastySlug:m,offerId:t,legKey:o})}async function o(e){await (0,r.startFundedPair)(e).catch(e=>{let t=e instanceof r.ApiError?l(e.status,e.body):null;if(t)throw new a(t);throw e})}e.s(["createCampaignForPair",0,i,"startReactiveCampaign",0,o],871303)},580224,e=>{"use strict";var t=e.i(327477),a=e.i(942151),n=e.i(614806),l=e.i(360684),s=e.i(310715),r=e.i(83574),i=e.i(994327),o=e.i(433471),c=e.i(243241),d=e.i(721700),u=e.i(198736),m=e.i(871303),p=e.i(226659),h=e.i(875994),f=e.i(187314),g=e.i(525005),x=e.i(762019),b=e.i(674879);function y({campaign:e,className:a="",compact:n=!1}){let l=(0,h.useAcquisitionChannels)().find(t=>t.featureSlug===e.featureSlug);return(0,t.jsxs)("span",{className:`k-fg2 inline-flex items-center ${n?"gap-1 whitespace-nowrap text-[11px]":"flex-wrap gap-1.5"} ${a}`,children:[e.fromLabel&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:e.fromLabel}),(0,t.jsx)("span",{className:"k-fg3",children:"→"})]}),(0,t.jsx)(x.ChannelChip,{name:e.channelName,def:l,notRun:!1===e.managed,compact:n}),(0,t.jsx)("span",{className:"k-fg3",children:"→"}),(0,t.jsx)("span",{children:e.toLabel})]})}function j({brandId:e,offerId:n,campaign:l,mission:s,replaces:r,budget:i,budgetPeriod:o,budgetPending:u,budgetError:m}){let[p,h]=(0,a.useState)(null);(0,a.useEffect)(()=>h(null),[s?.running]),(0,a.useEffect)(()=>{l.name||console.error("[offer-campaigns] features-service served no campaignName",l)},[l]);let f=p??s?.running??!1;return(0,t.jsxs)("tr",{className:`k-row k-line-subtle h-12 border-b last:border-b-0 ${f?"bg-[
1color-mix(in_oklab,var(--run)_9%,transparent)]":""}`,children:[(0,t.jsx)("td",{className:"px-3 py-2 pl-4",children:(0,t.jsxs)("span",{className:"flex items-center gap-2.5",children:[l.name&&(0,t.jsx)(x.PathAvatar,{name:l.name,size:28}),(0,t.jsx)("span",{className:"font-semibold",children:l.name??l.channelName})]})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(y,{campaign:l})}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)("span",{className:"k-chip",children:(0,d.campaignTag)(l)})}),(0,t.jsx)("td",{className:`px-3 py-2 text-right font-semibold tabular-nums ${(0,c.roiIsGood)(l.roi)?"text-[var(--run)]":""}`,title:l.roiUnavailable??void 0,children:(0,c.formatRoi)(l.roi)}),(0,t.jsx)("td",{className:"px-3 py-2 text-right",children:(0,t.jsx)(v,{brandId:e,offerId:n,campaign:l,mission:s,on:f,setPressed:h,replaces:r})}),(0,t.jsx)("td",{className:"px-3 py-2 pr-4 text-right",children:(0,t.jsx)(k,{brandId:e,offerId:n,campaign:l,budget:i,period:o,pending:u,error:m})})]})}function v({brandId:e,offerId:l,campaign:o,mission:c,on:d,setPressed:h,replaces:f}){let g=(0,r.useQueryClient)(),x=(0,s.useAuthQuery)(["brand",e],()=>(0,i.getBrand)(e)),[y,j]=(0,a.useState)(!1),[N,k]=(0,a.useState)(!1),[w,S]=(0,a.useState)(null),E=(0,a.useRef)(null),C=(0,a.useRef)(null),[M,P]=(0,a.useState)(null);if((0,a.useEffect)(()=>{if(!y)return;let e=e=>{let t=e.target;E.current?.contains(t)||C.current?.contains(t)||j(!1)},t=()=>j(!1);return document.addEventListener("mousedown",e),document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t)}},[y]),!1===o.managed)return(0,t.jsx)("span",{title:"We charge nothing until we launch this channel.",children:(0,t.jsx)(b.StateDot,{running:!1,label:"Not run yet"})});let R=async()=>{j(!1),S(null);let t=!d;h(t),k(!0);try{c?await (0,i.setCampaignStatus)(c.row.campaign.id,t?"activate":"stop",{brandId:e,featureSlug:o.featureSlug}):o.reactive?await (0,m.startReactiveCampaign)({brandId:e,offerId:l,featureSlug:o.featureSlug,legKey:o.legKey}):await (0,m.createCampaignForPair)({brandId:e,offerId:l,featureSlug:o.featureSlug,legKey:o.legKey,channelName:o.channelName,legLabel:o.fromLabel?`${o.fromLabel} → ${o.toLabel}`:o.toLabel,brandName:x.data?.brand?.name??x.data?.brand?.domain??"Brand"}),(0,p.invalidateCampaignMoney)(g)}catch(e){console.error("[offer-campaigns] status change failed",{campaign:o,err:e}),h(null),S((0,u.channelWriteErrorMessage)(e,t?"start":"pause"))}finally{k(!1)}},A=!d&&f;return(0,t.jsxs)("div",{ref:E,className:"relative inline-flex flex-col items-end",children:[(0,t.jsxs)("button",{type:"button","aria-haspopup":"menu","aria-expanded":y,disabled:N,onClick:e=>(e=>{if(y)return j(!1);let t=e.getBoundingClientRect(),a=window.innerWidth-t.right;P(window.innerHeight-t.bottom<140?{bottom:window.innerHeight-t.top+4,right:a}:{top:t.bottom+4,right:a}),j(!0)})(e.currentTarget),className:"k-btn gap-1.5",children:[(0,t.jsx)(b.StateDot,{running:d,label:d?"On":"Off",hold:d?null:c?.paymentHold??null}),(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10","aria-hidden":!0,className:"k-fg3",children:(0,t.jsx)("path",{d:"M2.5 4l2.5 2.5L7.5 4",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})]}),y&&M&&(0,n.createPortal)((0,t.jsxs)("div",{ref:C,role:"menu",style:M,className:"k-popover fixed z-50 w-[240px] p-1 text-left",children:[A&&(0,t.jsxs)("p",{className:"k-fg2 px-2 pb-1 pt-1.5 text-[12px]",children:["Your plan moves here from ",f.name??f.channelName,", which turns off."]}),(0,t.jsx)("button",{type:"button",role:"menuitem",className:"k-row w-full rounded-[6px] px-2 py-1.5 text-left text-[13px]",onClick:R,children:d?"Turn off":A?"Turn on instead":"Turn on"})]}),document.getElementById("v2-portal")??document.body),w&&(0,t.jsx)("span",{className:"mt-1 max-w-[220px] text-[11.5px] text-[var(--data-rose)]",children:w})]})}function N(e,t,a){if(null===t)return"Not set";let n=`${(0,o.fmtDailyBudgetUsd)(t)}/${a}`;return e.reactive?`Up to ${n}`:n}function k({brandId:e,offerId:n,campaign:l,budget:s,period:r,pending:i,error:o}){let[c,d]=(0,a.useState)(!1);if(i)return(0,t.jsx)(b.Shimmer,{className:"ml-auto h-4 w-20 rounded"});if(o||null===r)return(0,t.jsx)("span",{className:"k-fg3 text-[12px]",children:"Could not load"});if(!1===l.managed)return(0,t.jsx)("span",{className:"k-fg4",children:"—"});let u=s?.period??r,m=N(l,s?.budgetCents??null,u),p=s?.budgetCents??null;return"day"!==r||s&&!s.budgetable?(0,t.jsx)("span",{className:"tabular-nums",children:m}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button","aria-haspopup":"dialog",onClick:()=>d(!0),className:"k-btn gap-1.5 tabular-nums",children:[(0,t.jsx)("span",{className:null===p?"k-fg3":"",children:m}),(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10","aria-hidden":!0,
1className:"k-fg3",children:(0,t.jsx)("path",{d:"M2.5 4l2.5 2.5L7.5 4",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})]}),c&&(0,t.jsx)(w,{brandId:e,offerId:n,campaign:l,budget:s,unit:u,onClose:()=>d(!1)})]})}function w({brandId:e,offerId:s,campaign:o,budget:c,unit:d,onClose:u}){let m=(0,r.useQueryClient)(),[h,f]=(0,a.useState)(c?.budgetCents?String(Math.round(c.budgetCents/100)):""),[g,b]=(0,a.useState)(d),{mutate:y,isPending:j,error:v}=(0,l.useMutation)({mutationFn:t=>(0,i.saveOfferCampaignBudget)(e,s,{featureSlug:o.featureSlug,legKey:o.legKey,budgetCents:100*t},g),onSuccess:t=>{m.setQueryData(["offerCampaignBudgets",e,s],t),(0,p.invalidateCampaignMoney)(m),u()},onError:e=>console.error("[offer-campaigns] budget save failed",{campaign:o,err:e})});(0,a.useEffect)(()=>{let e=e=>{"Escape"!==e.key||j||u()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[u,j]);let N=function(e){let t=e.trim().replace(/^\$/,"").replace(/,/g,"");if(!/^\d+$/.test(t))return null;let a=Number(t);return a>0?a:null}(h),k=g===d&&c?.minimumCents?Math.ceil(c.minimumCents/100):null,S=""===h.trim()?null:null===N?"Type a whole number of dollars.":null!==k&&N<k?`This channel needs at least $${k.toLocaleString("en-US")} a ${g}.`:null,E=null!==N&&null===S,C=v instanceof i.ApiError?v.status:null,M="month"===g?o.reactive?"Monthly max":"Monthly budget":o.reactive?"Daily max":"Daily budget";if("u"<typeof document)return null;let P=document.getElementById("v2-portal")??document.body;return(0,n.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-[60] flex items-start justify-center bg-[#1010121f] px-3 pt-[12vh]",onMouseDown:()=>!j&&u(),children:(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"v2-campaign-budget-title",className:"k-popover flex w-full max-w-[400px] flex-col overflow-hidden text-left",onMouseDown:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-[var(--line-subtle)] px-4",children:[o.name&&(0,t.jsx)(x.PathAvatar,{name:o.name,size:20}),(0,t.jsx)("span",{id:"v2-campaign-budget-title",className:"k-label",children:o.name??o.channelName}),(0,t.jsx)("button",{type:"button","aria-label":"Close",className:"k-btn-ghost ml-auto h-7 w-7 justify-center p-0",onClick:u,disabled:j,children:"×"})]}),(0,t.jsxs)("form",{className:"px-4 py-4",onSubmit:e=>{e.preventDefault(),E&&!j&&y(N)},children:[(0,t.jsx)("label",{htmlFor:"v2-campaign-budget-input",className:"k-label block",children:M}),(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"k-fg2",children:o.reactive?"Up to $":"$"}),(0,t.jsx)("input",{id:"v2-campaign-budget-input",autoFocus:!0,inputMode:"numeric",value:h,onChange:e=>f(e.target.value),placeholder:"50","aria-invalid":null!==S,className:`k-input w-[120px] px-2.5 tabular-nums ${S?"shadow-[inset_0_0_0_1px_var(--data-rose)]":""}`}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Budget period",className:"flex items-center gap-1",children:["day","month"].map(e=>(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":g===e,onClick:()=>b(e),className:g===e?"k-btn-strong":"k-btn-ghost",children:["/ ",e]},e))})]}),(0,t.jsx)("p",{className:`mt-1.5 text-[12px] leading-[18px] ${S?"text-[var(--data-rose)]":"k-fg3"}`,children:S??(o.reactive?`We spend this much a ${g} at most, only when leads reach this step.`:`We spend up to this much a ${g} on this campaign.`)}),null!==v&&(0,t.jsx)("p",{role:"alert",className:"mt-3 text-[13px] text-[var(--data-rose)]",children:400===C?"This amount is not allowed for this channel.":"We could not save this budget. Try again in a moment."}),(0,t.jsxs)("div",{className:"mt-5 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:u,disabled:j,className:"k-btn-ghost",children:"Cancel"}),(0,t.jsx)("button",{type:"submit",disabled:!E||j,className:`k-btn-accent ${j?"cursor-wait":"disabled:cursor-not-allowed disabled:opacity-40"}`,children:j?"Saving...":"Save"})]})]})]})}),P)}e.s(["CampaignLeg",0,y,"OfferCampaigns",0,function({orgId:e,brandId:n,offerId:l,campaigns:r,pending:o}){let{missions:c}=(0,f.useMissions)(e,n,{allOffers:!0}),u=(0,a.useMemo)(()=>{let e=new Map;for(let t of c){let a=t.row.campaign;a.offerId===l&&a.featureSlug&&a.legKey&&e.set((0,d.campaignKey)(a.featureSlug,a.legKey),t)}return e},[c,l]),m=e=>u.get((0,d.campaignKey)(e.featureSlug,e.legKey))?.running??!1,p=(0,a.useMemo)(()=>(0,d.sortCampaigns)(r,m),[r,u]),h=p.find(e=>!e.reactive&&m(e))??null,y=(0,s.useAuthQuery)(["offerCampaignBudgets",n,l],()=>(0,i.getOfferCampaignBudgets)(n,l)),v=(0,a.useMemo)(()=>{let e=new Map;for(let t of y.data?.items??[])e.set((0,d.campaignKey)(t.featureSlug,t.legKey),t);return e},[y.data]);return(0,t.jsxs)("section",{children:[(0,t.jsx)(b.SectionTitle,{count:o?null:r.length,children:"Campaigns"}),(0,t.jsx)("p",{className:"k-fg2 -mt-1 mb-3 text-[13px]",children:"One proactive campaign at a time. Reactive ones follow its leads."}),o?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(b.Shimmer,{className:"h-10 rounded-[10px]"}),(0,t.jsx)(b.Shimmer,{className:"h-10 rounded-[10px]"})]}):0===r.length?(0,t.jsx)("div",{className:"k-card",children:(0,t.jsx)(b.EmptyNote,{children:"No campaign yet. Tick the legs and channels this offer sells through."})}):(0,t.jsx)("div",{className:"k-card overflow-hidden",children:(0,t.jsx)("div",{className:"k-scroll overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full min-w-[880px] text-[13px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"k-line-subtle border-b",children:[(0,t.jsx)("th",{className:"k-label px-3 py-2.5 pl-4 text-left font-normal",children:"Campaign"}),(0,t.jsx)("th",{className:"k-label px-3 py-2.5 text-left font-normal",children:"Works"}),(0,t.jsx)("th",{className:"k-label px-3 py-2.5 text-left font-normal",children:"Type"}),(0,t.jsx)("th",{className:"k-label px-3 py-2.5 text-right font-normal",children:(0,t.jsx)(x.ExpectedLabel,{tip:g.EXPECTED_ROI_TIP,children:"ROI"})}),(0,t.jsx)("th",{className:"k-label w-[150px] px-3 py-2.5 text-right font-normal",children:"Status"}),(0,t.jsx)("th",{className:"k-label w-[170px] px-3 py-2.5 pr-4 text-right font-normal",children:"Budget"})]})}),(0,t.jsx)("tbody",{children:p.map(e=>{let a=(0,d.campaignKey)(e.featureSlug,e.legKey);return(0,t.jsx)(j,{brandId:n,offerId:l,campaign:e,mission:u.get(a)??null,replaces:!e.reactive&&h&&h!==e?h:null,budget:v.get(a)??null,budgetPeriod:y.data?.period??null,budgetPending:!y.isFetchedAfterMount&&!y.data,budgetError:y.isError&&!y.data},a)})})]})})})]})},"budgetLabel",0,N])}]);

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.