1import{aN as o}from"./index-KjAD5lCC.js";import"./vendor-query-CniT1WJL.js";import"./vendor-react-69GsFwrV.js";const f={equal_split:"Everyone wins the same",placed:"Placed winners (1st, 2nd, 3rd)",instant_win:"Instant win",combo:"Combination"},b={points:"Vida Points",store_credit:"VidaCredit",product:"Product"},g={proposed:"bg-amber-100 text-amber-700 border-amber-200",approved:"bg-vida-mint-soft text-vida-green-800 border-vida-green-800/15",issued:"bg-green-100 text-green-700 border-green-200",rejected:"bg-red-100 text-red-700 border-red-200",cancelled:"bg-muted text-ink-2 border-card-border",reversed:"bg-red-100 text-red-700 border-red-200"},h={proposed:"Awaiting approval",approved:"Approved",issued:"Issued",rejected:"Rejected",cancelled:"Cancelled",reversed:"Reversed"};function v(e){if(e.type==="free_shipping")return"free shipping";if(e.type==="percent"&&e.valueBps!=null){const t=e.valueBps/100;return`${Number.isInteger(t)?t:t.toFixed(1)}% off`}return e.type==="fixed"&&e.valueCents!=null?`$${(e.valueCents/100).toFixed(2)} off`:"a discount"}function w(e){const t=e.rewardType==="store_credit"?`$${((e.amountCents??0)/100).toFixed(2)} VidaCredit`:e.rewardType==="points"?`${e.points??0} Vida Points`:"a product";return e.count>1?`${e.count} winners of ${t} each`:`${e.label}: ${t}`}const d={sales_count:"Number of sales",sales_volume:"Sales revenue",new_customers:"New customers",signups:"Signups",product_push:"Push a product",giveaway:"Giveaway",live_event:"Live event",content_series:"Content series"},i={live_sale:"Live sale",code_drop:"Code drop",giveaway:"Giveaway",milestone_challenge:"Milestone challenge",product_focus:"Product focus",bundle_focus:"Bundle focus",launch:"Launch",evergreen:"Evergreen"},S={live_sale:"A time-boxed live stream sale with a clear start and end.",code_drop:"Share a discount or reward code with your audience.",giveaway:"Run a giveaway to grow reach and new followers.",milestone_challenge:"Hit a sales or signup milestone for a bonus.",product_focus:"Spotlight one product across your channels.",bundle_focus:"Promote a bundle or multi-product offer.",launch:"Coordinate a launch around a new product or drop.",evergreen:"An always-on promotion with no fixed end date."},u={tiktok:"TikTok",youtube:"YouTube",instagram:"Instagram",x:"X",facebook:"Facebook",discord:"Discord",email:"Email",blog:"Blog",other:"Other"},_=["tiktok","youtube","instagram","x","facebook","discord","email","blog","other"],C=["sales_count","sales_volume","new_customers","signups","product_push","giveaway","live_event","content_series"],y=["live_sale","code_drop","giveaway","milestone_challenge","product_focus","bundle_focus","launch","evergreen"],l={draft:"Draft",submitted:"Awaiting review",changes_requested:"Changes requested",approved:"Approved",scheduled:"Scheduled",live:"Live",paused:"Paused",completed:"Completed",settled:"Settled",denied:"Not approved",cancelled:"Cancelled"},T={draft:"bg-muted text-ink-2 border-card-border",submitted:"bg-amber-100 text-amber-700 border-amber-200",changes_requested:"bg-amber-100 text-amber-700 border-amber-200",approved:"bg-vida-mint-soft text-vida-green-800 border-vida-green-800/15",scheduled:"bg-vida-mint-soft text-vida-green-800 border-vida-green-800/15",live:"bg-green-100 text-green-700 border-green-200",paused:"bg-amber-100 text-amber-700 border-amber-200",completed:"bg-vida-mint-soft text-vida-green-800 border-vida-green-800/15",settled:"bg-green-100 text-green-700 border-green-200",denied:"bg-red-100 text-red-700 border-red-200",cancelled:"bg-red-100 text-red-700 border-red-200"},L={draft:"This plan is a draft. Finish it and submit it for review when you are ready.",submitted:"Your plan is with the VidaPeps team for review. We will be in touch soon.",changes_requested:"The VidaPeps team asked for a few changes. Update your plan and resubmit it.",approved:"Your plan is approved. Start it when you are ready to go live.",scheduled:"Your plan is approved and scheduled. Start it when your window opens.",live:"Your promotion is live. Mark it complete once your promotion window ends.",paused:"This promotion was paused by the VidaPeps team. Only the team can resume it.",completed:"This promotion is complete. Thanks for running it.",settled:"This promotion is complete and any approved incentives have been settled.",denied:"This plan was not approved. Reach out to the VidaPeps team if you have questions.",cancelled:"This promotion was cancelled."};function x(e){switch(e){case"draft":return{canEdit:!0,canSubmit:!0,
1canCancel:!0,canStart:!1,canComplete:!1,readOnly:!1};case"changes_requested":return{canEdit:!0,canSubmit:!0,canCancel:!0,canStart:!1,canComplete:!1,readOnly:!1};case"approved":case"scheduled":return{canEdit:!1,canSubmit:!1,canCancel:!1,canStart:!0,canComplete:!1,readOnly:!1};case"live":return{canEdit:!1,canSubmit:!1,canCancel:!1,canStart:!1,canComplete:!0,readOnly:!1};default:return{canEdit:!1,canSubmit:!1,canCancel:!1,canStart:!1,canComplete:!1,readOnly:!0}}}function a(e){return e.split(/[_-]/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function E(e){return d[e]??a(e)}function O(e){return i[e]??a(e)}function P(e){return u[e]??a(e)}function k(e){return l[e]??a(e)}function R(e){return{created:"Created",updated:"Updated",submitted:"Submitted for review",changes_requested:"Changes requested",approved:"Approved",denied:"Not approved",scheduled:"Scheduled",started:"Went live",paused:"Paused",resumed:"Resumed",completed:"Completed",settled:"Settled",cancelled:"Cancelled"}[e]??a(e)}function A(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function N(e,t){const r=n=>{const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleDateString("en-US",{month:"short",day:"numeric"})};return e&&t?`${r(e)} - ${r(t)}`:e?`Starts ${r(e)}`:t?`Ends ${r(t)}`:""}function $(e){const t=[];return e.goalSalesCount!=null&&t.push(`${e.goalSalesCount} sales`),e.goalRevenueCents!=null&&t.push(`$${(e.goalRevenueCents/100).toFixed(0)} revenue`),e.goalNewCustomers!=null&&t.push(`${e.goalNewCustomers} new customers`),e.goalClicks!=null&&t.push(`${e.goalClicks} clicks`),t.join(" · ")}const B="w-full rounded-xl border border-ink/15 bg-card px-3 py-2.5 text-base text-ink focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-white/15 dark:text-white";function D(e){return o(e)}function I(e){return e==null?"":(e/100).toFixed(2)}function F(e){const t=e.trim();if(!t)return null;const r=Number(t);return!Number.isInteger(r)||r<0?null:r}function q(){return["draft","changes_requested","submitted","approved","scheduled","live","paused","completed","settled","denied","cancelled"]}export{B as F,C as O,_ as P,b as R,T as S,y as T,k as a,F as b,S as c,D as d,f as e,N as f,$ as g,a as h,w as i,A as j,h as k,g as l,I as m,v as n,E as o,P as p,x as q,L as r,q as s,O as t,R as u};
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.