vendor: 6,054 bytes, lines 1-41
1import{c as E,Q as tt,r as c,V as _e,j as e,_ as de,$ as ke,a1 as st,a7 as at,a8 as rt,Y as nt,a2 as Ce,C as ee,B as b,N as C,L as H,h as O,k as it,I as J,a9 as q,a4 as Ae,y as ot,a as lt,v as ct,z as dt,o as F,l as ut,R as mt,i as ht,T as pt}from"./index-CFInJ2Cm.js";import{C as xt,D as gt}from"./download-Ckyr1WjU.js";import{E as le}from"./external-link-CcJBbFNB.js";import{L as X}from"./list-ordered-BjT5GuVX.js";import{H as Me}from"./hash-BX09wzCd.js";import{U as ft}from"./upload-BSaBFpm6.js";import{A as bt}from"./arrow-left-DMpg_5O9.js";import{L as V}from"./loader-circle-C0vPP4uO.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const yt=E("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const oe=E("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const jt=E("PencilLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}],["path",{d:"m15 5 3 3",key:"1w25hb"}]]);/** 17 * @license lucide-react v0.462.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const vt=E("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 22 * @license lucide-react v0.462.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const Se=E("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 27 * @license lucide-react v0.462.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const ce=E("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/** 32 * @license lucide-react v0.462.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const Pe=E("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** 37 * @license lucide-react v0.462.0 - ISC 38 * 39 * This source code is licensed under the ISC license. 40 * See the LICENSE file in the root directory of this source tree. 41 */const Z=E("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);var te="Checkbox",[Nt,Dt]=tt(te),[wt,ue]=Nt(te);function kt(s){const{__scopeCheckbox:n,checked:o,children:u,defaultChecked:m,disabled:i,form:x,name:T,onCheckedChange:S,required:y,value:I="on",internal_do_not_use_render:f}=s,[a,h]=nt({prop:o,defaultProp:m??!1,onChange:S,caller:te}),[j,w]=c.useState(null),[_,p]=c.useState(null),v=c.useRef(!1),D=j?!!x||!!j.closest("form"):!0,W={checked:a,disabled:i,setChecked:h,control:j,setControl:w,name:T,form:x,value:I,hasConsumerStoppedPropagationRef:v,required:y,defaultChecked:$(m)?!1:m,isFormControl:D,bubbleInput:_,setBubbleInput:p};return e.jsx(wt,{scope:n,...W,children:Ct(f)?f(W):u})}var Le="CheckboxTrigger",Re=c.forwardRef(({__scopeCheckbox:s,onKeyDown:n,onClick:o,...u},m)=>{const{control:i,value:x,disabled:T,checked:S,required:y,setControl:I,setChecked:f,hasConsumerStoppedPropagationRef:a,isFormControl:h,bubbleInput:j}=ue(Le,s),w=_e(m,I),_=c.useRef(S);return c.useEffect(()=>{const p=i==null?void 0:i.form;if(p){const v=()=>f(_.current);return p.addEventListener("reset",v),()=>p.removeEventListener("reset",v)}},[i,f]),e.jsx(de.button,{type:"button",role:"checkbox","aria-checked":$(S)?"mixed":S,"aria-required":y,"data-state":We(S),"data-disabled":T?"":void 0,disabled:T,value:x,...u,ref:w,onKeyDown:ke(n,p=>{p.key==="Enter"&&p.preventDefault()}),onClick:ke(o,p=>{f(v=>$(v)?!0:!v),j&&h&&(a.current=p.isPropagationStopped(),a.current||p.stopPropagation())})})});Re.displayName=Le;var me=c.forwardRef((s,n)=>{const{__scopeCheckbox:o,name:u,checked:m,defaultChecked:i,required:x,disabled:T,value:S,onCheckedChange:y,form:I,...f}=s;return e.jsx(kt,{__scopeCheckbox:o,checked:m,defaultChecked:i,disabled:T,required:x,onCheckedChange:y,name:u,form:I,value:S,internal_do_not_use_render:({isFormControl:a})=>e.jsxs(e.Fragment,{children:[e.jsx(Re,{...f,ref:n,__scopeCheckbox:o}),a&&e.jsx(De,{__scopeCheckbox:o})]})})});me.displayName=te;var $e="CheckboxIndicator",Ee=c.forwardRef((s,n)=>{const{__scopeCheckbox:o,forceMount:u,...m}=s,i=ue($e,o);return e.jsx(st,{present:u||$(i.checked)||i.checked===!0,children:e.jsx(de.span,{"data-state":We(i.checked),"data-disabled":i.disabled?"":void 0,...m,ref:n,style:{pointerEvents:"none",...s.style}})})});
41Ee.displayName=$e;var ze="CheckboxBubbleInput",De=c.forwardRef(({__scopeCheckbox:s,...n},o)=>{const{control:u,hasConsumerStoppedPropagationRef:m,checked:i,defaultChecked:x,required:T,disabled:S,name:y,value:I,form:f,bubbleInput:a,setBubbleInput:h}=ue(ze,s),j=_e(o,h),w=at(i),_=rt(u);c.useEffect(()=>{const v=a;if(!v)return;const D=window.HTMLInputElement.prototype,G=Object.getOwnPropertyDescriptor(D,"checked").set,se=!m.current;if(w!==i&&G){const U=new Event("click",{bubbles:se});v.indeterminate=$(i),G.call(v,$(i)?!1:i),v.dispatchEvent(U)}},[a,w,i,m]);const p=c.useRef($(i)?!1:i);return e.jsx(de.input,{type:"checkbox","aria-hidden":!0,defaultChecked:x??p.current,required:T,disabled:S,name:y,value:I,form:f,...n,tabIndex:-1,ref:j,style:{...n.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});De.displayName=ze;function Ct(s){return typeof s=="function"}function $(s){return s==="indeterminate"}function We(s){return $(s)?"indeterminate":s?"checked":"unchecked"}const Ge=c.forwardRef(({className:s,...n},o)=>e.jsx(me,{ref:o,className:Ce("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),...n,children:e.jsx(Ee,{className:Ce("flex items-center justify-center text-current"),children:e.jsx(ee,{className:"h-4 w-4"})})}));Ge.displayName=me.displayName;const L=[{id:"youtube",label:"YouTube",limit:5e3,note:"Full description with chapters"},{id:"podcast",label:"Podcast (Apple/Spotify)",limit:4e3,note:"Show notes, plain text"},{id:"instagram",label:"Instagram",limit:2200,note:"Caption + hashtags"},{id:"tiktok",label:"TikTok",limit:2200,note:"Short caption"},{id:"facebook",label:"Facebook",limit:3e3,note:"Post body"},{id:"linkedin",label:"LinkedIn",limit:3e3,note:"Professional post"},{id:"x",label:"X / Twitter",limit:280,note:"Single post"},{id:"blog",label:"Blog / Website",limit:8e3,note:"Long-form summary"}],Te="automagic:platforms";function Q(s,n){const o=s.trim();if(o.length<=n)return o;const u=o.slice(0,n),m=Math.max(u.lastIndexOf(". "),u.lastIndexOf(` 42`));if(m>n*.6)return u.slice(0,m+1).trim();const i=u.lastIndexOf(" ");return(i>0?u.slice(0,i):u).trim()}function he(s){if(!s)return"";const n=Math.floor(s/3600),o=Math.floor(s%3600/60),u=s%60;return n>0?`${n}:${String(o).padStart(2,"0")}:${String(u).padStart(2,"0")}`:`${o}:${String(u).padStart(2,"0")}`}function Oe(s){const n=[];for(const o of s.split(` 43`)){const m=o.trim().replace(/^[-â¢*]\s*/,"").match(/^(?:(\d{1,2}):)?(\d{1,2}):(\d{2})\s*[-ââ]?\s*(.+)$/);if(!m)continue;const x=(m[1]?parseInt(m[1],10):0)*3600+parseInt(m[2],10)*60+parseInt(m[3],10);n.push({seconds:x,stamp:he(x)||"0:00",title:m[4].trim()})}return n}function Ye(s){return s.map(n=>`${n.stamp} ${n.title}`).join(` 44`)}function Fe(s,n){return s.map(o=>`${o.stamp} ${o.title} â ${n}${n.includes("?")?"&":"?"}t=${o.seconds}s`).join(` 45`)}const Ie=/\b(?:(\d{1,2}):)?(\d{1,2}):(\d{2})\b/g;function St(s,n,o){return(s?parseInt(s,10)*3600:0)+parseInt(n,10)*60+parseInt(o,10)}function He({text:s,youtubeUrl:n}){const o=n.includes("?")?"&":"?",u=[];let m=0,i;for(Ie.lastIndex=0;(i=Ie.exec(s))!==null;){i.index>m&&u.push(s.slice(m,i.index));const x=St(i[1],i[2],i[3]);u.push(e.jsx("a",{href:`${n}${o}t=${x}s`,target:"_blank",rel:"noopener noreferrer",className:"text-primary font-mono underline underline-offset-2 hover:opacity-80",children:i[0]},`${i.index}-${x}`)),m=i.index+i[0].length}return u.push(s.slice(m)),e.jsx("div",{className:"whitespace-pre-wrap break-words text-sm leading-relaxed text-muted-foreground",children:u})}function k({value:s,label:n="Copy",className:o="",size:u="sm",iconOnly:m=!1}){const[i,x]=c.useState(!1);return e.jsxs(b,{type:"button",size:m?"icon":u,variant:"secondary",className:o,disabled:!s,"aria-label":`Copy: ${n}`,onClick:async()=>{try{await navigator.clipboard.writeText(s),x(!0),C.success("Copied to clipboard"),setTimeout(()=>x(!1),1600)}catch{C.error("Clipboard blocked by your browser")}},children:[i?e.jsx(ee,{className:"w-4 h-4"}):e.jsx(xt,{className:"w-4 h-4"}),!m&&e.jsx("span",{className:"ml-2 hidden sm:inline",children:i?"Copied":n})]})}function R(s){return s.split(` 46`).map(n=>{let o=n.replace(/[[(]\s*((?:\d{1,2}:)?\d{1,2}:\d{2})\s*[\])]/g,"$1").replace(/((?:\d{1,2}:)?\d{1,2}:\d{2})\s*(?:[-ââ|:â¢]+)\s*/g,"$1 ").trimEnd();const u=o.match(/^\s*(.+?)\s+((?:\d{1,2}:)?\d{1,2}:\d{2})\s*$/);return u&&!/^\s*(?:\d{1,2}:)?\d{1,2}:\d{2}/.test(o)&&(o=`${u[2]} ${u[1]}`),o.replace(/^\s*[-â¢*]\s+((?:\d{1,2}:)?\d{1,2}:\d{2})/,"$1")}).join(` 47`).trim()}const Tt={youtube_id:"w7dA7mS3i9I",youtube_url:"https://www.youtube.com/watch?v=w7dA7mS3i9I",title:"What's Next Wall Street â Episode 12
470",channel:"OptionsPlayers.com",thumbnail_url:"https://i.ytimg.com/vi/w7dA7mS3i9I/hqdefault.jpg",duration_seconds:2620,description_text:`Dave Mathews and Georgia Alfredas dive into the biggest stories rattling Wall Street, from exploding AI infrastructure to the surprisingly mixed bag of consumer sentiment, all while Dave broadcasts from the picturesque Aegean Sea. This episode of What's Next Wall Street brings in stock guru Greg of OptionsPlayers.com to demystify market movements and tackle the controversial Truth Social API. They expose the truth about whether $100,000/month for Trump's posts is a genuine trading edge or just a cash grab, and unveil how high-frequency trading firms exploit microsecond advantages. 48 49The show kicks off with Dave broadcasting live from Kalymnos, an island in the Aegean Sea, and sharing his ingenious use of ChatGPT to quickly learn Greek phrases from a local menu. Georgia, ever the "wallet whisperer," teases upcoming economic news. Dave highlights a busy week for economic data, including job openings, ADP private payrolls, and the critical monthly jobs report. Wall Street anticipates 85,000 new jobs in July and a slight uptick in unemployment to 4.3%, signaling intense investor scrutiny of every data point. 50 51Next, the duo dissects Amazon's massive $3 trillion market value milestone, fueled by AWS and the AI boom. Jeff Bezos's $4 billion stock sale sparks discussion, alongside Amazon CEO Andy Jassy's commitment of $220 billion to AI infrastructure. Dave emphasizes his local-first AI approach (crystallize.ai) as an energy-efficient and private alternative to hyperscalers. The conversation shifts to potential changes at the Federal Reserve, with new Fed Chair Kevin Warsh floating the idea of fewer rate-setting meetings to curb market "doom-scrolling." Georgia then delivers a mixed consumer report: sentiment is up 12% and inflation fears are cooling, but new car buyers are rolling nearly $7,000 of debt into new purchases, highlighting a dangerous financial trend. 52 53Georgia raises a critical security warning from Microsoft about Russian hackers using phony hotel Wi-Fi login pages (nicknamed "Cornflake" by Microsoft, not "Captive Crunch" as initially misreported). Dave explains the "man-in-the-middle" attack and strongly recommends using a VPN or, as a last resort, a phone hotspot for secure browsing, cautioning about potential data overage charges. Greg then joins to discuss his "secret sauce" trading strategy, a moving crossover he uses for hedging and day trading, emphasizing risk management over guaranteed wins. He also addresses the Truth Social API, dismissing its $100,000/month price tag as a legitimate trading advantage. Greg argues that high-frequency trading already dominates with physical proximity to exchanges and fiber-optic speed, rendering such social media feeds largely irrelevant for an edge. He stresses that true "insider" information is already known by thousands of people long before public release. 54 55The episode concludes with a thought-provoking segment on the exploding marijuana market. A new federal survey reveals more Americans use cannabis regularly than alcohol. Greg and Georgia discuss how this shift in consumer behavior could impact investors, noting companies like Constellation Brands investing in cannabis, while others like Diageo focus on premium spirits and non-alcoholic options. Greg warns against investing in over-the-counter (OTC) cannabis stocks, deeming them risky penny stocks. He predicts federal regulation will lead to black market growth due to high THC limits and increased competition from large alcohol and tobacco companies once cannabis is fully legalized. The hosts also touch on the rise of "mocktails" driven by social media trends and the generational divide in tech use and education, exemplified by professors catching students using AI to cheat on tests. The discussion wraps up with a lighthearted exchange about the difficulty of maintaining privacy in a hyper-connected world and Dave's search for Soju in Greece. 56 57What you'll need: 58* ChatGPT (for quick language learning) 59* VPN service (for secure hotel Wi-Fi) 60* Phone with hotspot capabilities - Watch out for extra fees! 61* OptionsPlayers.com (for trading education) 62* Krystalize.AI - a local and private Mac AI Agent for your Macbook M-Series 63 64Key takeaways:
65* AI infrastructure is a major market driver, with Amazon committing billions. 66* Local-first AI solutions like crystallize.ai offer private, energy-efficient alternatives to hyperscalers. 67* Consumer sentiment is improving, but car buyers are incurring significant rollover debt. 68* Hotel Wi-Fi poses serious security risks from "man-in-the-middle" attacks; use a VPN. 69* Truth Social API's $100,000/month cost is unlikely to provide a genuine trading edge against sophisticated high-frequency trading. 70* The growing regular use of marijuana by Americans signals a significant consumer shift. 71* Investing in OTC cannabis stocks is generally discouraged due to high risk and lack of regulation. 72* Mocktails are trending, driven by social media "Instagrammable" culture. 73* AI is making cheating easier, prompting educators to innovate new anti-cheating methods. 74 75Chapters: 760:00 Introduction: Dave's Greek Island & AI Gadgets 771:05 Georgia: The Wallet Whisperer & Dad Jokes 781:22 Dave's ChatGPT Greek Menu Hack 792:39 Introducing Stock Guru Greg Krell & OptionsPlayers.com 803:22 Wall Street's Economic Main Character Watch: Job Reports Ahead 814:20 Amazon's $3 Trillion Milestone & AI Infrastructure Spend 825:18 Hyperscalers vs. Local AI: crystallize.ai 836:11 Fed's Potential Meeting Reduction & Market Volatility 847:15 Consumer Sentiment & the Danger of New Car Debt 859:02 Microsoft's Hotel Wi-Fi Security Warning: The Cornflake Attack 8610:10 Man-in-the-Middle Attacks & VPNs for Hotel Wi-Fi Security 8712:06 OptionsPlayers.com: Trading Community & Greg's Secret Sauce 8815:00 Truth Social API: Is $100K/Month for an Edge Worth It? 8918:08 High-Frequency Trading & Market Manipulation 9023:38 The Myth of Insider Trading Edge 9126:00 The Rise of Tech-Heavy Cars & Scooters 9228:03 AI Models Escaping Sandboxes: Anthropic & OpenAI 9330:30 Anthropic's Guard Rails & AI Cheating 9434:15 The Marijuana vs. Alcohol Shift: Investor Implications 9535:53 Mocktails, Social Media & Cannabis Investing Risks 9639:50 Cannabis Regulation, Black Markets & Industry Ownership 9742:58 Conclusion & Call to Action 98 99Don't forget to like this video, subscribe to our channel, and ring the notification bell to stay updated with What's Next Wall Street! For more in-depth analysis and trading strategies, visit optionsplayers.com.`,title_suggestions:["Wall Street's Wild Week: AI, Amazon, Fed & $100K Truth Social API","Hotel Wi-Fi Hacking & AI Cheaters: Wall Street's Tech Troubles","Marijuana vs. Alcohol: The Next Big Investor Buzz?","Is $100,000 for Trump's Tweets a Trading Edge? Greg Krell Explains","AI Goes Rogue & Car Debt Soars: What's Next Wall Street?"],tags:["what's next wall street","optionsplayers.com","dave matthews","georgia alfred","greg krell","wall street news","ai infrastructure","amazon stock","aws","jeff bezos","andy jassy","crystallize.ai","federal reserve","fed meetings","consumer sentiment","car debt","hotel wifi security","vpn","man-in-the-middle attack","truth social api","high frequency trading","insider trading","marijuana stocks","cannabis market","constellation brands","diageo","mocktails","ai in education","ai cheating","economy news"],hashtags:["#WhatsNextWallStreet","#AITrading","#MarketAnalysis","#InvestmentStrategy","#TechTrends"],chapters_text:`0:00 Introduction: Dave's Greek Island & AI Gadgets 1001:05 Georgia: The Wallet Whisperer & Dad Jokes 1011:22 Dave's ChatGPT Greek Menu Hack 1022:39 Introducing Stock Guru Greg Krell & OptionsPlayers.com 1033:22 Wall Street's Economic Main Character Watch: Job Reports Ahead 1044:20 Amazon's $3 Trillion Milestone & AI Infrastructure Spend 1055:18 Hyperscalers vs. Local AI: crystallize.ai 1066:11 Fed's Potential Meeting Reduction & Market Volatility 1077:15 Consumer Sentiment & the Danger of New Car Debt 1089:02 Microsoft's Hotel Wi-Fi Security Warning: The Cornflake Attack 10910:10 Man-in-the-Middle Attacks & VPNs for Hotel Wi-Fi Security 11012:06 OptionsPlayers.com: Trading Community & Greg's Secret Sauce 11115:00 Truth Social API: Is $100K/Month for an Edge Worth It? 11218:08 High-Frequency Trading & Market Manipulation 11323:38 The Myth of Insider Trading Edge 11426:00 The Rise of Tech-Heavy Cars & Scooters 11528:03 AI Models Escaping Sandboxes: Anthropic & OpenAI 11630:30 Anthropic's Guard Rails & AI Cheating 11734:15 The Marijuana vs. Alcohol Shift: Investor Implications 11835:53 Mocktails, Social Media & Cannabis Investing Risks 11939:50 Cannabis Regulation, Black Markets & Industry Ownership 12042:58 Conclusion & Call to Action`},It=[{icon:ft,title:"Upload your video to YouTube â keep it private",body:"Publish it as Private or Unlisted first. Nothing goes public until you say so, and nothing you run here is ever posted to CRQ.com."},{icon:yt,title:"Paste the URL into the field so we can analyze it",body:"We pull the details and the full spoken script, then write a punchy, chronological description with real timecodes."},{icon:jt,title:"Edit, save, then paste it in before going public",body:"Tune the copy, pick a title, grab the tags and chapters, and drop it into your video's description. Then flip it to public."}];function K(){C.info("Create a free account to save your work",{action:{label:"Sign in",onClick:()=>{window.location.href="/auth?redirect=/automagic"}}})}function _t(){const s=Tt,[n,o]=c.useState(s.description_text),[u,m]=c.useState(["youtube","x"]),[i,x]=c.useState({}),[T,S]=c.useState(0),y=c.useMemo(()=>Oe(s.chapters_text),[s.chapters_text]);function I(a){m(h=>h.includes(a)?h.filter(j=>j!==a):[...h,a]),x(h=>{var j;return h[a]?h:{...h,[a]:Q(R(n),((j=L.find(w=>w.id===a))==null?void 0:j.limit)??5e3)}})}function f(){o(s.description_text),x({}),C.success("Demo reset")}return e.jsxs("div",{className:"min-h-screen",children:[e.jsx("header",{className:"border-b border-border gradient-surface",children:e.jsxs("div",{className:"container mx-auto px-4 py-5 flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"w-10 h-10 shrink-0 rounded-lg gradient-warm flex items-center justify-center",children:e.jsx(Z,{className:"w-5 h-5 text-primary-foreground"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"font-display text-lg sm:text-xl font-bold text-foreground leading-tight",children:"Automagic YouTube Description & Title Generator Studio"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"These videos do not get posted to CRQ.com"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{asChild:!0,size:"sm",children:e.jsx(H,{to:"/auth?redirect=/automagic",children:"Sign in / Create account"})}),e.jsx(b,{asChild:!0,variant:"ghost",size:"sm",children:e.jsx(H,{to:"/",children:"Library"})})]})]})}),e.jsxs("main",{className:"container mx-auto px-4 py-8 space-y-10",children:[e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"max-w-3xl space-y-3",children:[e.jsxs(O,{variant:"secondary",className:"gap-1",children:[e.jsx(it,{className:"w-3.5 h-3.5"})," Members' studio"]}),e.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold leading-tight",children:"Turn your own YouTube video into a ready-to-paste description, title, chapters and tags."}),e.jsx("p",{className:"text-muted-foreground",children:"Upload your video to YouTube but keep it private. Paste the URL into the field below so we can analyze it. Then edit, save and paste the information into your video before making it public."})]}),e.jsx("ol",{className:"grid gap-4 md:grid-cols-3",children:It.map((a,h)=>e.jsxs("li",{className:"rounded-xl border border-border bg-card p-5 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-7 h-7 rounded-md gradient-warm flex items-center justify-center text-primary-foreground text-xs font-bold",children:h+1}),e.jsx(a.icon,{className:"w-4 h-4 text-primary"})]}),e.jsx("h3",{className:"font-display font-bold text-sm",children:a.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a.body})]},a.title))})]}),e.jsxs("section",{className:"rounded-xl border border-border bg-card p-4 sm:p-6 space-y-3",children:[e.jsx("h2",{className:"font-display text-lg font-bold",children:"Paste a YouTube URL"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(J,{readOnly:!0,onFocus:K,onClick:K,placeholder:"https://www.youtube.com/watch?v=...",className:"bg-secondary cursor-pointer","aria-label":"Paste a YouTube URL (sign in required)"}),e.jsx(b,{asChild:!0,className:"shrink-0",children:e.jsxs(H,{to:"/auth?redirect=/automagic",children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),"Sign in to generate"]})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"1 credit per generation. Re-opening anything you've already generated is always free."})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-xl font-bold",children:"Example below:"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Real output from a members' run. Everything here works â switch destinations, trim to length, edit the text, copy it. Saving is the only thing that needs an account."})]}),e.jsxs(b,{variant:"secondary",size:"sm",onClick:f,children:[e.jsx(vt,{className:"w-4 h-4 mr-2"}),"Reset demo"]})]}),e.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 p-4 sm:p-6 border-b border-border",children:[e.jsxs("div",{className:"flex gap-3 min-w-0",children:[e.jsx("img",{src:s.thumbnail_url,alt:`${s.title} thumbnail`,loading:"lazy",className:"w-24 sm:w-32 aspect-video object-cover rounded-md border border-border"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-display text-base sm:text-lg font-bold",children:s.title}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.channel," ⢠",he(s.duration_seconds)]}),e.jsxs("a",{href:s.youtube_url,target:"_blank",rel:"noreferrer",className:"text-xs text-primary inline-flex items-center gap-1 mt-1 hover:underline",children:["Open on YouTube ",e.jsx(le,{className:"w-3 h-3"})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 ml-auto",children:[e.jsx(k,{value:R(n),label:"Copy for YouTube"}),e.jsxs(b,{size:"sm",variant:"secondary",onClick:K,children:[e.jsx(oe,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:"Save"})]})]})]}),e.jsxs("div",{className:"p-4 sm:p-6 space-y-6",children:[e.jsx(q,{value:n,onChange:a=>o(a.target.value),rows:16,className:"bg-secondary font-mono text-sm leading-relaxed","aria-label":"Demo description â editable"}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[n.length.toLocaleStr
120ing()," characters ",n.length>5e3&&"â YouTube's limit is 5,000"]}),e.jsx("span",{children:"Edits stay in your browser until you sign in."})]}),e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("h4",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(X,{className:"w-4 h-4 text-primary"})," Preview â timecodes YouTube will link"]}),e.jsx(He,{text:R(n),youtubeUrl:s.youtube_url})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Where are you posting this?"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Every site caps length differently. Flip one on and you get an editable, length-counted box."})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:L.map(a=>{const h=u.includes(a.id);return e.jsxs(b,{type:"button",size:"sm",variant:h?"default":"secondary",onClick:()=>I(a.id),"aria-pressed":h,title:`${a.note} â ${a.limit.toLocaleString()} characters`,children:[h&&e.jsx(ee,{className:"w-3.5 h-3.5 mr-1.5"}),a.label,e.jsx("span",{className:"ml-1.5 text-[11px] opacity-70 font-mono",children:a.limit.toLocaleString()})]},a.id)})}),L.filter(a=>u.includes(a.id)).map(a=>{const h=i[a.id]??Q(R(n),a.limit),j=h.length>a.limit;return e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"font-display font-bold text-sm",children:a.label}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[a.note," ⢠limit ",a.limit.toLocaleString()," characters"]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(b,{size:"sm",variant:"secondary",onClick:()=>x(w=>({...w,[a.id]:Q(R(n),a.limit)})),children:[e.jsx(ce,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:"Fill from description"})]}),e.jsx(k,{value:h,label:`Copy for ${a.label}`,iconOnly:!0}),e.jsxs(b,{size:"sm",onClick:K,"aria-label":`Save ${a.label} version (sign in required)`,children:[e.jsx(oe,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:"Save"})]})]})]}),e.jsx(q,{value:h,onChange:w=>x(_=>({..._,[a.id]:w.target.value})),rows:a.limit<=300?3:10,className:"bg-secondary font-mono text-sm leading-relaxed","aria-label":`${a.label} description`}),e.jsxs("p",{className:`text-xs ${j?"text-destructive":"text-muted-foreground"}`,children:[h.length.toLocaleString()," / ",a.limit.toLocaleString()," characters",j&&` â ${(h.length-a.limit).toLocaleString()} over the limit`]})]},a.id)})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("h4",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(X,{className:"w-4 h-4 text-primary"})," Chapters"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{value:Ye(y),label:"Copy for YouTube"}),e.jsx(k,{value:Fe(y,s.youtube_url),label:"Copy links",iconOnly:!0})]})]}),e.jsx("ul",{className:"space-y-1 max-h-72 overflow-auto pr-1",children:y.map((a,h)=>e.jsx("li",{className:"text-xs",children:e.jsxs("a",{href:`${s.youtube_url}&t=${a.seconds}s`,target:"_blank",rel:"noopener noreferrer",className:"group flex items-start gap-2 rounded px-1 py-0.5 hover:bg-secondary transition-colors",children:[e.jsx("span",{className:"font-mono text-primary shrink-0",children:a.stamp}),e.jsx("span",{className:"text-muted-foreground group-hover:text-foreground",children:a.title})]})},h))})]}),e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("h4",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(Pe,{className:"w-4 h-4 text-primary"})," Title ideas"]}),e.jsx(k,{value:s.title_suggestions.join(` 121`),label:"Copy all",iconOnly:!0})]}),e.jsx("ul",{className:"space-y-2",children:s.title_suggestions.map((a,h)=>e.jsx("li",{children:e.jsxs("button",{onClick:()=>S(h),className:`w-full text-left rounded-md px-3 py-2 text-sm transition-colors ${h===T?"bg-primary/15 border border-primary":"bg-secondary/60 border border-transparent hover:bg-secondary"}`,children:[a,e.jsxs("span",{className:`ml-2 text-[11px] font-mono ${a.length>100?"text-destructive":"text-muted-foreground"}`,children:[a.length,"/100"]})]})},a))}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Pick a favourite â members keep the chosen title with the video."})]}),e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("h4",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(Ae,{className:"w-4 h-4 text-primary"})," Tags"]}),e.jsx(k,{value:s.tags.join(", "),iconOnly:!0})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.tags.map(a=>e.jsx(O,{variant:"secondary",className:"text-xs",children:a},a))})]}),e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("h4",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(Me,{className:"w-4 h-4 text-primary"})," Hashtags"]}),e.jsx(k,{value:s.hashtags.join(" "),iconOnly:!0})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.hashtags.map(a=>e.jsx(O,{className:"text-xs",children:a},a))})]})]})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-border gradient-surface p-6 text-center space-y-3",children:[e.jsx("h2",{className:"font-display text-xl font-bold",children:"Ready to run your own video?"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-xl mx-auto",children:"Create a free account to save every version, keep a private history of your descriptions, and re-open them any time at no extra cost."}),e.jsx(b,{asChild:!0,size:"lg",children:e.jsxs(H,{to:"/auth?redirect=/automagic",children:[e.jsx(Z,{className:"w-4 h-4 mr-2"}),"Get started free"]})})]})]})]})}function Wt(){var ve,Ne,we;const{user:s,loading:n}=ot(),{balance:o,refresh:u}=lt(),m=ct();dt({title:s?"Automagic â YouTube description generator":"Automagic â YouTube description, title & chapter generator",description:s?"Members-only tool that turns any YouTube video into a punchy, chronological description.":"Paste a private YouTube URL and get a punchy, chronological description with chapters, titles, tags and per-platform versions. See a live example.",canonicalPath:"/automagic",noindex:!!s});const[i,x]=c.useState(""),[T,S]=c.useState(""),[y,I]=c.useState(!1),[f,a
121]=c.useState([]),[h,j]=c.useState(!0),[w,_]=c.useState(null),[p,v]=c.useState(""),[D,W]=c.useState(!1),[G,se]=c.useState(""),[U,qe]=c.useState(!1),[pe,Ue]=c.useState(""),ae=c.useRef(null),[A,Be]=c.useState(()=>{try{const t=localStorage.getItem(Te),r=t?JSON.parse(t):null;if(Array.isArray(r)&&r.length)return r}catch{}return["youtube"]}),[xe,Y]=c.useState({}),[ge,re]=c.useState({}),[fe,be]=c.useState(null),[ye,Ve]=c.useState(!0);c.useEffect(()=>{try{localStorage.setItem(Te,JSON.stringify(A))}catch{}},[A]);function Ke(t){Be(r=>r.includes(t)?r.length>1?r.filter(d=>d!==t):r:[...r,t])}c.useEffect(()=>{if(!s)return;let t=!1;return(async()=>{j(!0);const{data:r,error:d}=await F.from("automagic_items").select("id, youtube_id, youtube_url, title, channel, thumbnail_url, duration_seconds, description_text, title_suggestions, tags, hashtags, chapters_text, platform_variants, created_at, updated_at").order("created_at",{ascending:!1});t||(d?C.error("Could not load your saved descriptions"):a(r??[]),j(!1))})(),()=>{t=!0}},[s]);const l=c.useMemo(()=>f.find(t=>t.id===w)??null,[f,w]),ne=!!l&&p!==(l.description_text??""),je=c.useMemo(()=>{const t=G.trim().toLowerCase();return t?f.filter(r=>{var d,g;return[r.title,r.channel,r.description_text,(d=r.tags)==null?void 0:d.join(" "),(g=r.hashtags)==null?void 0:g.join(" ")].filter(Boolean).some(N=>String(N).toLowerCase().includes(t))}):f},[f,G]);function Je(t){_(t.id),v(t.description_text??"");const r=t.platform_variants??{};re(r),Y(r),setTimeout(()=>{var d;return(d=ae.current)==null?void 0:d.scrollIntoView({behavior:"smooth",block:"start"})},50)}async function ie(t=!1){const r=t?(l==null?void 0:l.youtube_url)??"":i;if(!r.trim()){C.error("Paste a YouTube URL first");return}I(!0),t&&(v(""),Y({}));try{const{data:d,error:g}=await F.functions.invoke("automagic-generate",{body:{youtube_url:r,regenerate:t,tone:T.trim()||void 0,platforms:A,include_chapters:ye,transcript_override:pe.trim()||void 0}});if(g){const P=g==null?void 0:g.context;let B=g.message;try{const z=P&&typeof P.json=="function"?await P.json():null;if((z==null?void 0:z.error)==="INSUFFICIENT_CREDITS"){C.error("You're out of credits",{action:{label:"Buy credits",onClick:()=>m("/buy-credits")}});return}z!=null&&z.error&&(B=z.error)}catch{}C.error(B||"Generation failed");return}const N=d==null?void 0:d.item;if(!N){C.error("No description came back");return}a(P=>[N,...P.filter(B=>B.id!==N.id)]),_(N.id),v(N.description_text??"");const M=N.platform_variants??{};re(M),Y(M),x(""),u(),C.success(d!=null&&d.cached?"Loaded your saved description":"Description ready"),setTimeout(()=>{var P;return(P=ae.current)==null?void 0:P.scrollIntoView({behavior:"smooth",block:"start"})},50)}finally{I(!1)}}async function Qe(){if(!l)return;W(!0);const{error:t}=await F.from("automagic_items").update({description_text:p}).eq("id",l.id);if(W(!1),t){C.error("Could not save");return}a(r=>r.map(d=>d.id===l.id?{...d,description_text:p}:d)),C.success("Saved")}async function Xe(t){var g;if(!l)return;be(t);const r={...ge,[t]:xe[t]??""},{error:d}=await F.from("automagic_items").update({platform_variants:r}).eq("id",l.id);if(be(null),d){C.error("Could not save");return}re(r),a(N=>N.map(M=>M.id===l.id?{...M,platform_variants:r}:M)),C.success(`Saved for ${((g=L.find(N=>N.id===t))==null?void 0:g.label)??t}`)}async function Ze(t){const{error:r}=await F.from("automagic_items").delete().eq("id",t.id);if(r){C.error("Could not delete");return}a(d=>d.filter(g=>g.id!==t.id)),w===t.id&&(_(null),v("")),C.success("Deleted")}function et(){if(!l)return;const t=(l.title||"youtube-description").replace(/[\\/:*?"<>|]+/g," ").slice(0,80),r=new Blob([p],{type:"text/plain;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(r),d.download=`${t} - Description.txt`,d.click(),URL.revokeObjectURL(d.href)}return n?e.jsx("div",{className:"min-h-screen"}):s?e.jsxs("div",{className:"min-h-screen",children:[e.jsx("header",{className:"border-b border-border gradient-surface",children:e.jsxs("div",{className:"container mx-auto px-4 py-5 flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"w-10 h-10 shrink-0 rounded-lg gradient-warm flex items-center justify-center",children:e.jsx(Z,{className:"w-5 h-5 text-primary-foreground"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"font-display text-lg sm:text-xl font-bold text-foreground leading-tight",children:"Automagic Youtube Description & Title Generator Studio"}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:"These videos do not get posted to CRQ.com"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(O,{variant:"secondary",className:"gap-1",children:[e.jsx(ut,{className:"w-3.5 h-3.5"})," ",o]}),e.jsx(b,{asChild:!0,variant:"ghost",size:"sm",children:e.jsxs(H,{to:"/",children:[e.jsx(bt,{className:"w-4 h-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Library"})]})})]})]})}),e.jsxs("main",{className:"container mx-auto px-4 py-6 space-y-8",children:[e.jsxs("section",{className:"rounded-xl border border-border bg-card p-4 sm:p-6 space-y-3",children:[e.jsx("h2",{className:"font-display text-lg font-bold",children:"Paste a YouTube URL"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"We pull the details and full spoken script, then write a punchy, chronological description that's ready for the socials. Videos processed here stay private â they never appear in the CRQ public library."}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Use the subtitles option auto-sync to get the subtitle data from YouTube faster. You can publish your video as Unlisted or for a future date, so you can keep it private until the description is added."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(J,{value:i,onChange:t=>x(t.target.value),onKeyDown:t=>{t.key==="Enter"&&!y&&ie(!1)},placeholder:"https://www.youtube.com/watch?v=...",className:"bg-secondary"}),e.jsxs(b,{onClick:()=>ie(!1),disabled:y,className:"shrink-0",children:[y?e.jsx(V,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Z,{className:"w-4 h-4 mr-2"}),y?"Workingâ¦":"Generate"]})]}),e.jsx(J,{value:T,onChange:t=>S(t.target.value),placeholder:"Optional: tone or angle (e.g. 'beginner friendly, high energy')",className:"bg-secondary"}),e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Where are you posting this?"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Each site caps description length differently. We write copy for the destinations you pick and nothing else â the first one you select is your main description, and every other pick gets its own editable, savable box below."}),e.jsx("div",{className:"flex flex-wrap gap-2",children:L.map(t=>{const r=A.includes(t.id);return e.jsxs(b,{type:"button",size:"sm",variant:r?"default":"secondary",onClick:()=>Ke(t.id),"aria-pressed":r,title:`${t.note}
121 â ${t.limit.toLocaleString()} characters`,children:[r&&e.jsx(ee,{className:"w-3.5 h-3.5 mr-1.5"}),t.label,e.jsx("span",{className:"ml-1.5 text-[11px] opacity-70 font-mono",children:t.limit.toLocaleString()})]},t.id)})})]}),e.jsxs("label",{className:"flex items-start gap-3 rounded-lg border border-border bg-secondary/40 p-3 cursor-pointer",children:[e.jsx(Ge,{checked:ye,onCheckedChange:t=>Ve(t===!0),className:"mt-0.5"}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block text-sm font-medium text-foreground",children:"Include chapters with timelines for YouTube"}),e.jsx("span",{className:"block text-xs text-muted-foreground",children:"Adds a timestamped chapter list (starting at 0:00) that YouTube turns into clickable chapters. Leave it off for a clean, timestamp-free description."})]})]}),e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx("button",{type:"button",onClick:()=>qe(t=>!t),className:"text-sm font-medium text-primary underline underline-offset-4",children:U?"Hide":"Captions not ready? Paste your own script"}),U&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:`Paste the spoken script here and we'll use it instead of pulling captions from YouTube. Timestamps in any common format work (0:09, [0:09], "Name (0:09)", or subtitle files) and keep your chapter timings accurate.`}),e.jsx(q,{value:pe,onChange:t=>Ue(t.target.value),rows:8,placeholder:`Georgia (00:09) 122Hello and welcome to the showâ¦`,className:"bg-secondary font-mono text-xs"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"1 credit per generation. Re-opening a saved description is always free."})]}),l&&e.jsxs("section",{ref:ae,className:"rounded-xl border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 p-4 sm:p-6 border-b border-border",children:[e.jsxs("div",{className:"flex gap-3 min-w-0",children:[l.thumbnail_url&&e.jsx("img",{src:l.thumbnail_url,alt:l.title??"Video thumbnail",loading:"lazy",className:"w-24 sm:w-32 aspect-video object-cover rounded-md border border-border"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"font-display text-lg font-bold truncate",children:l.title||l.youtube_id}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:[l.channel,he(l.duration_seconds)].filter(Boolean).join(" ⢠")}),e.jsxs("a",{href:l.youtube_url,target:"_blank",rel:"noreferrer",className:"text-xs text-primary inline-flex items-center gap-1 mt-1 hover:underline",children:["Open on YouTube ",e.jsx(le,{className:"w-3 h-3"})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 ml-auto",children:[e.jsx(k,{value:R(p),label:"Copy for YouTube"}),e.jsx(k,{value:p,label:"Copy raw",iconOnly:!0}),e.jsxs(b,{size:"sm",variant:"secondary",onClick:et,"aria-label":"Download as text file",children:[e.jsx(gt,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:"Download"})]}),e.jsxs(b,{size:"sm",variant:"secondary",onClick:()=>ie(!0),disabled:y,"aria-label":"Regenerate description",children:[y?e.jsx(V,{className:"w-4 h-4 animate-spin"}):e.jsx(mt,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:"Regenerate"})]}),e.jsxs(b,{size:"sm",onClick:Qe,disabled:!ne||D,"aria-label":"Save edits",children:[D?e.jsx(V,{className:"w-4 h-4 animate-spin"}):e.jsx(Se,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:ne?"Save":"Saved"})]})]})]}),e.jsxs("div",{className:"p-4 sm:p-6 space-y-6",children:[e.jsx(q,{value:p,onChange:t=>v(t.target.value),rows:18,className:"bg-secondary font-mono text-sm leading-relaxed","aria-label":"Generated YouTube description"}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-muted-foreground",children:[(()=>{const t=L.find(d=>d.id===A[0])??L[0],r=p.length>t.limit;return e.jsxs("span",{className:r?"text-destructive":void 0,children:[t.label," version â ",p.length.toLocaleString()," / ",t.limit.toLocaleString()," characters",r&&` â ${(p.length-t.limit).toLocaleStr
122ing()} over the limit`]})})(),ne&&e.jsx("span",{className:"text-primary",children:"Unsaved changes"})]}),e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("h3",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(X,{className:"w-4 h-4 text-primary"})," Preview â timecodes YouTube will link"]}),e.jsx(He,{text:R(p),youtubeUrl:l.youtube_url}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:'"Copy for YouTube" cleans up every timecode (no brackets, no dashes, stamp first on the line) so YouTube turns each one into a clickable chapter link the moment you paste it into the description field.'})]}),A.length>1&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("h3",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(ce,{className:"w-4 h-4 text-primary"})," Versions by destination"]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Edit any box and hit Save â each version is stored with this video."})]}),L.filter(t=>A.includes(t.id)&&t.id!==A[0]).map(t=>{const r=xe[t.id]??"",d=r.length>t.limit,g=r!==(ge[t.id]??"");return e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"font-display font-bold text-sm",children:t.label}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[t.note," ⢠limit ",t.limit.toLocaleString()," characters"]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(b,{size:"sm",variant:"secondary",onClick:()=>Y(N=>({...N,[t.id]:Q(R(p),t.limit)})),children:[e.jsx(ce,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:"Fill from description"})]}),e.jsx(k,{value:r,label:`Copy for ${t.label}`,iconOnly:!0}),e.jsxs(b,{size:"sm",onClick:()=>Xe(t.id),disabled:!g||fe===t.id,"aria-label":`Save ${t.label} version`,children:[fe===t.id?e.jsx(V,{className:"w-4 h-4 animate-spin"}):e.jsx(Se,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 hidden sm:inline",children:g?"Save":"Saved"})]})]})]}),e.jsx(q,{value:r,onChange:N=>Y(M=>({...M,[t.id]:N.target.value})),rows:t.limit<=300?3:10,placeholder:`Your ${t.label} version â click "Fill from description" to start from the main text.`,className:"bg-secondary font-mono text-sm leading-relaxed","aria-label":`${t.label} description`}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[e.jsxs("span",{className:d?"text-destructive":"text-muted-foreground",children:[r.length.toLocaleString()," / ",t.limit.toLocaleString()," characters",d&&` â ${(r.length-t.limit).toLocaleString()} over the limit`]}),g&&e.jsx("span",{className:"text-primary",children:"Unsaved changes"})]})]},t.id)})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.chapters_text&&(()=>{var d;const t=Oe(l.chapters_text),r=t.length>=3&&((d=t[0])==null?void 0:d.seconds)===0;return e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("h3",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(X,{className:"w-4 h-4 text-primary"})," Chapters"]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(k,{value:t.length?Ye(t):l.chapters_text,label:"Copy for YouTube"}),t.length>0&&e.jsx(k,{value:Fe(t,l.youtube_url),label:"Copy links"})]})]}),t.length>0?e.jsx("ul",{className:"space-y-1",children:t.map((g,N)=>e.jsx("li",{className:"text-xs",children:e.jsxs("a",{href:`${l.youtube_url}${l.youtube_url.includes("?")?"&":"?"}t=${g.seconds}s`,target:"_blank",rel:"noopener noreferrer",className:"group flex items-start gap-2 rounded px-1 py-0.5 hover:bg-secondary transition-colors",children:[e.jsx("span",{className:"font-mono text-primary shrink-0",children:g.stamp}),e.jsx("span",{className:"text-muted-foreground group-hover:text-foreground",children:g.title}),e.jsx(le,{className:"w-3 h-3 mt-0.5 shrink-0 opacity-0 group-hover:opacity-60"})]})},N))}):e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-muted-foreground font-mono",children:l.chapters_text}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:r?"Paste these into your description â YouTube turns them into clickable chapters automatically.":"YouTube needs at least 3 chapters and the first one must start at 0:00 to render a chapter list."})]})})(),((ve=l.title_suggestions)==null?void 0:ve.length)>0&&e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3 md:col-span-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("h3",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(Pe,{className:"w-4 h-4 text-primary"})," Title ideas"]}),e.jsx(k,{value:l.title_suggestions.join(` 123`),label:"Copy all"})]}),e.jsx("ul",{className:"space-y-2",children:l.title_suggestions.map((t,r)=>e.jsxs("li",{className:"flex items-start gap-3 rounded-md bg-secondary/60 px-3 py-2",children:[e.jsxs("span",{className:"flex-1 min-w-0 text-base leading-snug text-foreground break-words",children:[t,e.jsxs("span",{className:`ml-2 text-[11px] font-mono ${t.length>100?"text-destructive":"text-muted-foreground"}`,children:[t.length,"/100"]})]}),e.jsx(k,{value:t,label:t,iconOnly:!0,className:"shrink-0"})]},r))})]}),((Ne=l.tags)==null?void 0:Ne.length)>0&&e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("h3",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(Ae,{className:"w-4 h-4 text-primary"})," Tags"]}),e.jsx(k,{value:l.tags.join(", ")})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.tags.map(t=>e.jsx(O,{variant:"secondary",className:"text-xs",children:t},t))})]}),((we=l.hashtags)==null?void 0:we.length)>0&&e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("h3",{className:"font-display font-bold text-sm flex items-center gap-2",children:[e.jsx(Me,{className:"w-4 h-4 text-primary"})," Hashtags"]}),e.jsx(k,{value:l.hashtags.join(" ")})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.hashtags.map(t=>e.jsx(O,{className:"text-xs",children:t},t))})]})]})]})]}),e.jsxs("section",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("h2",{className:"font-display text-lg font-bold",children:["Your descriptions ",e.jsxs("span",{className:"text-muted-foreground font-normal text-sm",children:["(",f.length,")"]})]}),e.jsxs("div",{className:"relative w-full sm:w-72",children:[e.jsx(ht,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(J,{value:G,onChange:t=>se(t.target.value),placeholder:"Search your descriptionsâ¦",className:"pl-10 bg-secondary"})]})]}),h?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}):je.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:f.length===0?"N
123othing here yet â paste a YouTube URL above to get started.":"No matches."}):e.jsx("ul",{className:"space-y-2",children:je.map(t=>e.jsxs("li",{className:`flex items-center gap-3 rounded-lg border p-3 transition-colors ${t.id===w?"border-primary bg-secondary/60":"border-border bg-card hover:bg-secondary/40"}`,children:[t.thumbnail_url&&e.jsx("img",{src:t.thumbnail_url,alt:"",loading:"lazy",className:"w-20 aspect-video object-cover rounded border border-border shrink-0 hidden sm:block"}),e.jsxs("button",{className:"min-w-0 flex-1 text-left",onClick:()=>Je(t),children:[e.jsx("p",{className:"font-medium text-sm truncate",children:t.title||t.youtube_id}),e.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[new Date(t.created_at).toLocaleString()," ",t.channel?`⢠${t.channel}`:""]})]}),e.jsx(k,{value:t.description_text??"",label:"Copy"}),e.jsx(b,{size:"sm",variant:"ghost",onClick:()=>Ze(t),"aria-label":`Delete description for ${t.title??t.youtube_id}`,children:e.jsx(pt,{className:"w-4 h-4 text-destructive"})})]},t.id))})]})]})]}):e.jsx(_t,{})}export{Wt as default};
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.