PageSourceSearch

https://duckdash.lovable.app/assets/ToolPage-SpcTFAWt.js

js duckdash.lovable.app collected 2026-10-03 03:21:55 UTC 41,409 bytes, 24 lines download raw bytes

1import{k as G,r as g,s as W,j as e,q as K,g as U,X as Y,_ as J,u as O,$ as X,L as B,A as Z,e as $,b as ee,d as E}from"./index-9RpNC89m.js";import{S as te}from"./save-Iz8TWZJb.js";import{C as se}from"./clock-DR4hKIT7.js";import{C as ie}from"./copy-BFEtWKxh.js";import{C as z}from"./chevron-up-n_0jSiul.js";function k(s){return!s||!Array.isArray(s)?"":s.filter(i=>i==null?void 0:i.text).map(i=>`• ${i.text}`).join(`
2`)}function oe(s){return typeof s=="string"?s:Array.isArray(s)?k(s):s&&typeof s=="object"?JSON.stringify(s):String(s??"")}const ne={"messaging-framework":[{sourceSlug:"buyer-persona",sourceName:"Buyer Persona",extractions:[{sourcePath:"painPoints",targetFieldId:"supportingMessages",transform:k},{sourcePath:"keyMessages",targetFieldId:"coreMessage",transform:k}]}],"ad-copy":[{sourceSlug:"buyer-persona",sourceName:"Buyer Persona",extractions:[{sourcePath:"demographics",targetFieldId:"audience",transform:k},{sourcePath:"buyingTriggers",targetFieldId:"headlines",transform:k}]}],okrs:[{sourceSlug:"swot-analysis",sourceName:"SWOT Analysis",extractions:[{sourcePath:"opportunities",targetFieldId:"objective1",transform:k}]}],"landing-page":[{sourceSlug:"value-proposition",sourceName:"Value Proposition Canvas",extractions:[{sourcePath:"gainCreators",targetFieldId:"headline",transform:k},{sourcePath:"painRelievers",targetFieldId:"sections",transform:k}]}],"sostac-planner":[{sourceSlug:"swot-analysis",sourceName:"SWOT Analysis",extractions:[{sourcePath:"__swot_all__",targetFieldId:"situation",transform:s=>{if(!s||typeof s!="object")return"";const i=s;return["strengths","weaknesses","opportunities","threats"].map(a=>{const r=i[a],p=a.charAt(0).toUpperCase()+a.slice(1),c=Array.isArray(r)?r.filter(o=>o==null?void 0:o.text).map(o=>`  • ${o.text}`).join(`
3`):"";return c?`${p}:
4${c}`:""}).filter(Boolean).join(`
5
6`)}}]}]};function ae(s,i){if(i==="__swot_all__")return s;const n=i.split(".");let a=s;for(const r of n){if(a==null||typeof a!="object")return;a=a[r]}return a}function re(s,i,n,a=!0){const{workspace:r}=G(),[p,c]=g.useState([]),[o,f]=g.useState(!1),[T,N]=g.useState(!1);return g.useEffect(()=>{if(!a||!(r!=null&&r.id)||!s)return;const u=ne[s];if(!u||u.length===0){c([]);return}f(!0),N(!1);const y=[...new Set(u.map(m=>m.sourceSlug))];(async()=>{const{data:m}=await W.from("tool_data").select("tool_slug, data").eq("workspace_id",r.id).in("tool_slug",y);if(!m||m.length===0){c([]),f(!1);return}const b=new Map;for(const d of m)d.data&&typeof d.data=="object"&&b.set(d.tool_slug,d.data);const C=[];for(const d of u){const A=b.get(d.sourceSlug);if(A)for(const w of d.extractions){const v=i[w.targetFieldId];if(v&&v.trim().length>0)continue;const j=ae(A,w.sourcePath);if(j==null)continue;const P=w.transform?w.transform(j):oe(j);!P||P.trim().length===0||C.push({fieldId:w.targetFieldId,value:P,sourceToolName:d.sourceName,sourceToolSlug:d.sourceSlug})}}c(C),f(!1)})()},[r==null?void 0:r.id,s,a]),{suggestions:p,isLoading:o,dismissed:T,dismiss:()=>N(!0),applySuggestion:u=>{const y=p.find(m=>m.fieldId===u);y&&(n(y.fieldId,y.value),c(m=>m.filter(b=>b.fieldId!==u)))},applyAll:()=>{for(const u of p)(!i[u.fieldId]||i[u.fieldId].trim().length===0)&&n(u.fieldId,u.value);c([]),N(!0)}}}const le=({suggestions:s,dismissed:i,onApplyAll:n,onDismiss:a})=>{if(i||s.length===0)return null;const p=[...new Set(s.map(c=>c.sourceToolName))].join(" & ");return e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-xl px-4 py-3 mb-4 animate-fade-in",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-100 text-blue-600 flex items-center justify-center flex-shrink-0 mt-0.5",children:e.jsx(K,{size:14})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[e.jsxs("p",{className:"text-xs font-bold text-blue-900",children:["💡 Data found from ",p]}),e.jsx("p",{className:"font-arabic text-[9px] text-blue-400",dir:"rtl",children:"بيانات من أداة أخرى"})]}),e.jsxs("p",{className:"text-[11px] text-blue-700 leading-relaxed",children:["We can pre-fill ",s.length," empty field",s.length>
61?"s":""," with data from your ",p,". This won't overwrite anything."]}),e.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[e.jsxs("button",{onClick:n,className:"inline-flex items-center gap-1.5 text-[11px] font-semibold text-white bg-blue-600 hover:bg-blue-700 px-3 py-1.5 rounded-lg transition-colors shadow-sm",children:[e.jsx(U,{size:11}),"Apply ",s.length," Suggestion",s.length>1?"s":""]}),e.jsx("button",{onClick:a,className:"text-[11px] text-blue-500 hover:text-blue-700 px-2 py-1.5 rounded-lg hover:bg-blue-100 transition-colors",children:"Dismiss"})]})]}),e.jsx("button",{onClick:a,className:"p-1 rounded-lg hover:bg-blue-100 text-blue-400 hover:text-blue-600 transition-colors flex-shrink-0",children:e.jsx(Y,{size:14})})]})})};function t(s,i,n,a,r=1500){return{id:s,label:i,labelAr:n,prompt:i,promptAr:n,placeholder:a,maxChars:r}}function h(s){return{...s,output:()=>[]}}const H={"icp-builder":h({slug:"icp-builder",emoji:"🏢",name:"Ideal Customer Profile",nameAr:"بروفايل العميل المثالي",description:"Define your ideal B2B customer: company size, industry, decision makers, budget",descriptionAr:"حدد عميلك المثالي B2B: حجم الشركة، المجال، صناع القرار، والميزانية",fields:[t("companySize","Company Size & Type","حجم ونوع الشركة","What size companies are ideal? (startup, SMB, enterprise, revenue range)"),t("industry","Industry & Vertical","القطاع والمجال","What industries or verticals do you target?"),t("decisionMakers","Decision Makers","صناع القرار","Who are the buyers? Job titles, seniority, department"),t("buyingProcess","Buying Process","عملية الشراء","How do they evaluate and purchase? Timeline, stakeholders"),t("budget","Budget Range","نطاق الميزانية","Typical budget range for your solution",500),t("technographics","Tech Stack & Tools","الأدوات التقنية","What tools do they currently use?"),t("qualificationCriteria","Qualification Criteria","معايير التأهيل","What makes a lead qualified vs unqualified?")],guide:{what:"The Ideal Customer Profile defines the perfect company to sell to. It narrows your focus so marketing and sales target the right accounts.",whatAr:"بروفايل العميل المثالي يحدد الشركة المثالية اللي تبيع لها. يساعدك تركز جهود التسويق والمبيعات.",steps:["Define company size and industry","Identify decision makers and their roles","Map the buying process","Set qualification criteria"],example:{companySize:"SaaS companies, 50-500 employees, $5M-$50M ARR",industry:"B2B SaaS, FinTech, MarTech",decisionMakers:"VP Marketing, CMO, Head of Growth"},proTip:"Your ICP should be specific enough that your sales team can immediately tell if a lead fits or not."}}),"competitor-analysis":h({slug:"competitor-analysis",emoji:"⚔️",name:"Competitor Analysis",nameAr:"تحليل المنافسين",description:"Track competitors: positioning, pricing, strengths, weaknesses, content strategy",descriptionAr:"حلل منافسيك: التمركز، التسعير، نقاط القوة والضعف، واستراتيجية المحتوى",fields:[t("competitors","Key Competitors","المنافسون الرئيسيون","List top 3-5 competitors and their positioning"),t("strengths","Competitor Strengths","نقاط قوة المنافسين","What do they do well?"),t("weaknesses","Competitor Weaknesses","نقاط ضعف المنافسين","Where do they fall short?"),t("pricing","Pricing Comparison","مقارنة الأسعار","How do their prices compare?"),t("channels","Their Marketing Channels","قنواتهم التسويقية","Where do they advertise and create content?"),t("differentiation","Your Differentiation","تميّزك","What do you do that they can't?")],guide:{what:"Competitor Analysis maps the landscape so you can position yourself where competitors are weakest.",whatAr:"تحليل المنافسين يرسم خريطة السوق عشان تتمركز في المكان اللي منافسيك ضعاف فيه.",steps:["List your top competitors","Analyze strengths and weaknesses","Compare pricing","Find your unique angle"],example:{competitors:`1. HubSpot — all-in-one, expensive
72. Mailchimp — email-focused, limited CRM`,differentiation:"Arabic-first, built for MENA market"},proTip:"Don't just track features — study their messaging, landing pages, and ad copy too."}}),positioning:h({slug:"positioning",emoji:"📍",name:"Brand Positioning",nameAr:"تمركز البراند",description:"Define your target audience, category, key benefit, and brand personality",descriptionAr:"حدد جمهورك، الكاتيجوري، الميزة التنافسية، وشخصية البراند",fields:[t("targetAudience","Target Audience","الجمهور المستهدف","Who specifically is this positioning for?"),t("category","Market Category","الفئة السوقية","What category do you compete in?",500),t("keyBenefit","Key Benefit","الفائدة الرئيسية","The single most important benefit you deliver"),t("reasonToBelieve","Reason to Believe","سبب التصديق","Proof points, data, testimonials"),t("brandPersonality","Brand Personality","شخصية العلامة","If your brand were a person, how would you describe them?"),t("positioningStatement","Positioning Statement","بيان التمركز","For [target], [brand] is the [category] that [benefit] because [reason]")],guide:{what:"Brand Positioning defines how y
7ou want to be perceived in the market relative to competitors.",whatAr:"تمركز البراند يحدد كيف تبي السوق يشوفك مقارنة بالمنافسين.",steps:["Define your target audience","Choose your category","Articulate your key benefit","Write your positioning statement"],example:{positioningStatement:"For MENA marketing teams, DuckDash is the marketing OS that makes strategy execution bilingual and structured."},proTip:"A strong positioning statement should make your competitors' positioning feel incomplete."}}),"messaging-framework":h({slug:"messaging-framework",emoji:"💬",name:"Messaging Framework",nameAr:"فريمورك الرسائل التسويقية",description:"Core message, supporting messages by persona, elevator pitch, proof points",descriptionAr:"الرسالة الأساسية، رسائل لكل بيرسونا، الـ elevator pitch، ونقاط الإثبات",fields:[t("coreMessage","Core Message","الرسالة الأساسية","The one thing you want every audience to remember"),t("supportingMessages","Supporting Messages by Persona","رسائل داعمة حسب الشخصية","For each persona, what specific message resonates?"),t("elevatorPitch","Elevator Pitch (30 sec)","العرض السريع","Explain what you do in 30 seconds"),t("taglines","Tagline Options","خيارات الشعار","3-5 short tagline candidates"),t("proofPoints","Proof Points","نقاط الإثبات","Stats, testimonials, case studies"),t("toneGuidelines","Tone Guidelines","إرشادات النبرة","How should messages feel?")],guide:{what:"A Messaging Framework ensures everyone on your team communicates the same value consistently.",whatAr:"فريمورك الرسائل يضمن إن كل فريقك يتكلم بنفس القيمة وبشكل متسق.",steps:["Write your core message","Adapt per persona","Craft elevator pitch","List proof points"],example:{coreMessage:"The only marketing OS built for MENA teams — bilingual, structured, actionable.",elevatorPitch:"DuckDash helps marketing teams in MENA plan, execute, and measure their marketing with 35 guided tools — all in Arabic and English."},proTip:"Test your elevator pitch on someone outside your industry. If they get it, you nailed it."}}),"voice-tone":h({slug:"voice-tone",emoji:"🎙️",name:"Voice & Tone Guide",nameAr:"دليل التون والـ Voice",description:"Define brand personality, voice attributes, tone per channel, vocabulary guide",descriptionAr:"حدد شخصية البراند، صوته، التون حسب كل قناة، والمصطلحات المستخدمة",fields:[t("voiceAttributes","Voice Attributes","سمات الصوت","3-5 adjectives describing your brand voice"),t("doList","Do's — We Sound Like","نبدو هكذا","Example phrases we use"),t("dontList","Don'ts — We Never Sound Like","لا نبدو هكذا","Phrases and tones we avoid"),t("channelTone","Tone by Channel","النبرة حسب القناة","How tone shifts: Email vs Social vs Website vs Sales"),t("vocabulary","Key Vocabulary","المفردات الرئيسية","Words we always use and words we avoid")],guide:{what:"A Voice & Tone Guide ensures your brand sounds consistent everywhere.",whatAr:"دليل الصوت والنبرة يضمن إن براندك يتكلم بنفس الطريقة في كل مكان.",steps:["Define 3-5 voice attributes","Write do's and don'ts","Adjust tone per channel","Create vocabulary list"],example:{voiceAttributes:"Confident, Helpful, Direct, Warm, Expert",doList:`"Here's exactly how to do it" — "Let's break this down"`},proTip:"Read your copy out loud. If it doesn't sound like a real person talking, rewrite it."}}),okrs:h({slug:"okrs",emoji:"🎯",name:"Marketing OKRs",nameAr:"الـ OKRs التسويقية",description:"Set quarterly objectives and key results for your marketing team",descriptionAr:"حدد أهداف الربع ونتائج رئيسية قابلة للقياس لفريق التسويق",fields:[t("objective1","Objective 1","الهدف الأول","What do you want to achieve this quarter?"),t("keyResults1","Key Results for Obj 1","نتائج رئيسية للهدف 1","3 measurable results"),t("objective2","Objective 2","الهدف الثاني","Second quarterly objective"),t("keyResults2","Key Results for Obj 2","نتائج رئيسية للهدف 2","Measurable results"),t("initiatives","Key Initiatives","المبادرات الرئيسية","What projects will drive these results?"),t("timeline","Timeline & Milestones","الجدول الزمني","Key dates and checkpoints")],guide:{what:"Marketing OKRs align your team around measurable outcomes each quarter.",whatAr:"الـ OKRs التسويقية توحد فريقك حول نتائج قابلة للقياس كل ربع.",steps:["Set 2-3 ambitious objectives","Define 3 measurable key results each","List initiatives","Set timeline"],example:{objective1:"Become the #1 marketing resource for MENA startups",keyResults1:`1. 10K MAU
82. 40% W/W retention
93. 500 paid subscribers`},proTip:"If you can't measure it, it's not a Key Result — it's a wish."}}),"pricing-strategy":h({slug:"pricing-strategy",emoji:"💰",name:"Pricing Strategy",nameAr:"استراتيجية التسعير",description:"Value-based, competitive, and cost-plus pricing analysis",descriptionAr:"تحليل التسعير: حسب القيمة، المنافسة، والتكلفة",fields:[t("currentPricing","Current Pricing Model","نموذج التسعير الحالي","How do you price today?"),t("competitorPricing","Competitor Pricing","تسعير المنافسين","How do competitors price?"),t("valueMetric","Value Metric","مقياس القيمة","What unit do customers pay for?",500),t("tiers","Tier Design","تصميم الباقات","Describe your pricing tiers"),t("strategy","Pricing Strategy","الاستراتيجية","Penetration, premium, freemium, value-based?")],guide:{what:"Pricing Strategy helps you find the price that maximizes revenue while staying competitive.",whatAr:"استراتيجية التسعير تساعدك تلاقي السعر اللي يزيد الإيرادات ويبقى تنافسي.",steps:["Document current pricing","Research competitors","Identify value metric","Design tiers","Choose strategy"],example:{valueMetric:"Per workspace per month",tiers:"Free: 4 tools | Solo $19/mo: all 35 tools | Lifetime $149: forever"},proTip:"Price based on value created, not cost to deliver."}}),"gtm-planner":h({slug:"gtm-planner",emoji:"🚀",name:"Go-To-Market Plan",nameAr:"خطة Go-To-Market",description:"Launch strategy: timeline, channels, messaging, success metrics",descriptionAr:"خطة الإطلاق: التايملاين، القنوات، الرسائل، ومقاييس النجاح",f
9ields:[t("targetMarket","Target Market for Launch","السوق المستهدف للإطلاق","Who are you launching to first?"),t("channels","Launch Channels","قنوات الإطلاق","Which channels for launch?"),t("timeline","Launch Timeline","الجدول الزمني للإطلاق","Key milestones and dates"),t("messaging","Launch Messaging","رسائل الإطلاق","Core launch message, hooks, angles"),t("successMetrics","Success Metrics","مقاييس النجاح","How will you measure launch success?"),t("risks","Risks & Mitigation","المخاطر والتخفيف","What could go wrong?")],guide:{what:"A Go-To-Market Plan is your launch playbook — who, where, what message, and how to measure.",whatAr:"خطة الـ GTM هي دليل الإطلاق — مين تستهدف، وين، بأي رسالة، وكيف تقيس.",steps:["Define launch audience","Choose channels","Set timeline","Craft messaging","Define success metrics"],example:{targetMarket:"Marketing managers at MENA startups (Series A-B)",channels:"Product Hunt, LinkedIn, Twitter/X"},proTip:"Launch is not a moment — it's a campaign. Plan for 2+ weeks of sustained push."}}),"ad-copy":h({slug:"ad-copy",emoji:"✍️",name:"Ad Copy Workshop",nameAr:"ورشة كتابة الإعلانات",description:"Create ad copy variations for Meta, Google, LinkedIn using AIDA/PAS frameworks",descriptionAr:"اكتب نسخ إعلانية لميتا وجوجل ولينكدإن باستخدام AIDA/PAS",fields:[t("platform","Platform","المنصة","Which platform? (Meta, Google, LinkedIn, TikTok)",500),t("objective","Ad Objective","هدف الإعلان","Awareness, consideration, or conversion?",500),t("audience","Target Audience","الجمهور المستهدف","Who is this ad for?"),t("headlines","Headline Options (3-5)","خيارات العنوان","Short, punchy headlines"),t("bodyCopy","Body Copy Variations","نسخ النص","2-3 body copy versions"),t("cta","Call to Action","دعوة للإجراء","What action? (Learn More, Sign Up, Buy Now)",500)],guide:{what:"The Ad Copy Workshop helps you write high-converting ad copy using AIDA and PAS frameworks.",whatAr:"ورشة الإعلانات تساعدك تكتب نسخ إعلانية بتحويل عالي.",steps:["Choose platform and objective","Define audience","Write 3-5 headlines","Create body copy","Pick strongest CTA"],example:{headlines:`1. Stop guessing your marketing strategy
102. 35 tools. One OS. Zero confusion.`,cta:"Start Free →"},proTip:"Write 10 headlines, then pick the best 3. First ideas are rarely best."}}),"email-sequences":h({slug:"email-sequences",emoji:"📧",name:"Email Sequence Builder",nameAr:"بناء الإيميل سيكونس",description:"Design email sequences: welcome, nurture, launch, re-engagement",descriptionAr:"صمم تسلسلات الإيميل: ترحيب، nurture، إطلاق، واسترجاع",fields:[t("sequenceType","Sequence Type","نوع التسلسل","Welcome, nurture, launch, re-engagement?",500),t("emails","Email Outlines","مخططات الإيميلات","For each email: subject line, hook, CTA",3e3),t("timing","Send Timing","توقيت الإرسال","Delay between emails"),t("segmentation","Audience Segment","شريحة الجمهور","Who receives this? Entry trigger?")],guide:{what:"Email Sequences automate your communication — from welcoming signups to re-engaging churned users.",whatAr:"تسلسلات الإيميل تأتمت تواصلك — من الترحيب للاسترجاع.",steps:["Choose sequence type","Outline each email","Set timing","Define audience segment"],example:{sequenceType:"Welcome sequence",emails:`Email 1 (Day 0): Welcome + quick win
11Email 2 (Day 2): Feature walkthrough
12Email 3 (Day 5): Case study + CTA`},proTip:"The best email sequences feel like a helpful friend, not a sales robot."}}),"landing-page":h({slug:"landing-page",emoji:"📄",name:"Landing Page Planner",nameAr:"مخطط اللاندنج بيج",description:"Plan high-converting landing pages with copy framework and conversion checklist",descriptionAr:"خطط لاندنج بيج بتحوّل: الكوبي، الهيكل، وتشيكليست التحويل",fields:[t("headline","Hero Headline","العنوان الرئيسي","Main headline — clear benef
12it statement",500),t("subheadline","Sub-headline","العنوان الفرعي","Supporting detail, 1-2 sentences"),t("sections","Page Sections","أقسام الصفحة","List sections: Hero, Benefits, Social Proof, Pricing, FAQ, CTA"),t("socialProof","Social Proof","الدليل الاجتماعي","Testimonials, logos, stats"),t("cta","Primary CTA","الدعوة الرئيسية","Button text and destination",500),t("objections","Objection Handling","معالجة الاعتراضات","FAQ items addressing hesitations")],guide:{what:"The Landing Page Planner helps you structure a high-converting page before you build it.",whatAr:"مخطط اللاندنج بيج يساعدك تبني صفحة بتحويل عالي قبل ما تصممها.",steps:["Write compelling headline","Add sub-headline","Plan sections","Add social proof","Define CTA"],example:{headline:"Your marketing strategy, finally organized",cta:"Start Free — No credit card required"},proTip:"Every section should answer: 'Why should I care?' If it doesn't, cut it."}}),"social-planner":h({slug:"social-planner",emoji:"📱",name:"Social Media Planner",nameAr:"مخطط السوشيال ميديا",description:"Platform-specific content planning with optimal times and hashtag strategy",descriptionAr:"تخطيط محتوى لكل منصة: أفضل أوقات النشر واستراتيجية الهاشتاجات",fields:[t("platforms","Active Platforms","المنصات النشطة","Which platforms? Goals per platform"),t("pillars","Content Pillars","أعمدة المحتوى","3-5 content themes"),t("frequency","Posting Frequency","معدل النشر","How often per platform per week?"),t("bestTimes","Optimal Posting Times","أفضل أوقات النشر","Best days/times per platform"),t("hashtags","Hashtag Strategy","استراتيجية الهاشتاق","Core, trending, branded hashtags")],guide:{what:"The Social Media Planner helps you create a consistent, strategic presence across platforms.",whatAr:"مخطط السوشيال يساعدك تبني حضور متسق واستراتيجي.",steps:["Choose platforms","Define content pillars","Set frequency","Research best times","Build hashtag strategy"],example:{pillars:`1. Educational
132. Behind the scenes
143. Customer stories
154. Industry trends
165. Product updates`,frequency:"LinkedIn: 3x/week | Twitter: daily | Instagram: 4x/week"},proTip:"Pick 2-3 platforms and dominate them. You don't need to be everywhere."}}),"outreach-sequences":h({slug:"outreach-sequences",emoji:"📨",name:"Outreach Sequence Designer",nameAr:"تصميم رسائل الـ Outreach",description:"Multi-touch outreach: cold email, LinkedIn, follow-up cadences",descriptionAr:"صمم رسائل التواصل: cold email، لينكدإن، وجدول الفولو أب",fields:[t("targetProfile","Target Profile","الملف المستهدف","Who are you reaching out to?"),t("touchpoints","Touchpoint Sequence","تسلسل نقاط الاتصال","Email 1 → LinkedIn → Email 2 → etc."),t("templates","Message Templates","قوالب الرسائل","Template for each touchpoint",3e3),t("timing","Cadence","الإيقاع","Timing between each touchpoint")],guide:{what:"Outreach Sequences help you design multi-channel prospecting campaigns that get replies.",whatAr:"تصميم الـ Outreach يساعدك تبني حملات تواصل متعددة القنوات تجيب ردود.",steps:["Define target profile","Design touchpoint sequence","Write templates","Set cadence"],example:{touchpoints:`Day 1: Cold email
17Day 3: LinkedIn connect
18Day 5: Follow-up email
19Day 8: LinkedIn message
20Day 12: Break-up email`},proTip:"Personalize the first line of every message. Generic outreach gets ignored."}}),"sales-scripts":h({slug:"sales-scripts",emoji:"📋",name:"Sales Scripts & Objections",nameAr:"سكريبتات المبيعات",description:"Discovery call scripts, objection handling playbook, closing frameworks",descriptionAr:"سكريبتات الـ discovery call، الرد على الاعتراضات، وطرق الإغلاق",fields:[t("discoveryQuestions","Discovery Call Questions","أسئلة مكالمة الاكتشاف","10-15 questions to understand needs",3e3),t("demoScript","Demo Script Outline","مخطط سكريبت العرض","Key talking points, transitions"),t("objections","Objection Handling","معالجة الاعتراضات","Top 10 objections and responses",3e3),t("closingFramework","Closing Framework","إطار الإغلاق","How do you ask for the sale?")],guide:{what:"Sales Scripts give your team a proven playbook for discovery, demos, and closing.",whatAr:"سكريبتات المبيعات تعطي فريقك دليل مجرّب للمكالمات والعروض والإغلاق.",steps:["Write discovery questions","Outline demo script","List objections with responses","Define closing framework"],example:{discoveryQuestions:`1. What's your biggest marketing challenge?
212. How are you solving it now?
223. What would success look like in 90 days?`},proTip:"The best salespeople ask more questions than they answer."}}),"funnel-analytics":h({slug:"funnel-analytics",emoji:"🔀",name:"Funnel Analytics",nameAr:"تحليل الفانل",description:"Track conversion rates by funnel stage and identify bottlenecks",descriptionAr:"تابع معدلات التحويل في كل مرحلة من الفانل وحدد الاختناقات",fields:[t("stages","Fu
22nnel Stages","مراحل القمع","Define stages: Visitor → Lead → MQL → SQL → Customer"),t("currentRates","Current Conversion Rates","معدلات التحويل الحالية","Rate between each stage"),t("benchmarks","Industry Benchmarks","المعايير القياسية","Typical rates in your industry"),t("bottlenecks","Identified Bottlenecks","الاختناقات","Biggest drop-off points"),t("improvements","Improvement Plan","خطة التحسين","Changes to test at each bottleneck")],guide:{what:"Funnel Analytics helps you see exactly where prospects drop off and what to fix.",whatAr:"تحليل الفانل يوريك بالضبط وين العملاء المحتملين يطلعون وإيش تصلح.",steps:["Define funnel stages","Document conversion rates","Compare to benchmarks","Identify bottlenecks","Plan improvements"],example:{stages:"Visitor → Signup → Activated → Paid",currentRates:"Visitor→Signup: 3.2% | Signup→Activated: 45% | Activated→Paid: 8%"},proTip:"Fix the biggest bottleneck first. A 2x improvement at one stage beats small gains everywhere."}}),"weekly-review":h({slug:"weekly-review",emoji:"📝",name:"Weekly Review",nameAr:"المراجعة الأسبوعية",description:"Structured weekly review: what worked, learnings, next week priorities",descriptionAr:"مراجعة أسبوعية منظمة: إيه اشتغل، الدروس، وأولويات الأسبوع الجاي",fields:[t("wins","Wins This Week","إنجازات الأسبوع","What went well?"),t("misses","Misses & Challenges","التحديات","What didn't work?"),t("metrics","Key Metrics Update","تحديث المقاييس","KPIs vs targets"),t("learnings","Key Learnings","الدروس المستفادة","What to apply next week?"),t("nextWeek","Next Week Priorities","أولويات الأسبوع القادم","Top 3-5 priorities")],guide:{what:"The Weekly Review creates a habit of reflection and continuous improvement.",whatAr:"المراجعة الأسبوعية تبني عادة التأمل والتحسين المستمر لتسويقك.",steps:["List wins","Document misses","Update metrics","Extract learnings","Set next week priorities"],example:{wins:"Blog post got 2.5K views, 3 new leads from LinkedIn",misses:"Email open rate dropped to 18%",nextWeek:`1. A/B test subject lines
232. Publish case study
243. Launch retargeting`},proTip:"Do this every Friday at 4pm. Consistency turns a review into a growth engine."}})};function ce(s,i){return{slug:s,emoji:"🛠️",name:s,nameAr:s,description:`Complete the ${s}
24 for your marketing strategy.`,descriptionAr:"",fields:[{id:"content",label:"Your content",labelAr:"المحتوى",prompt:`Fill in your ${s}`,promptAr:"",placeholder:"Start writing here...",maxChars:2e3}],guide:{what:`Use this tool to build out your ${s} in the ${i} section.`,whatAr:"",steps:["Fill in the fields","Save your progress","Mark as done when complete"],example:{},proTip:"Done is better than perfect — fill in what you know today."},output:()=>[]}}const de=({tool:s,data:i,onChange:n})=>{const[a,r]=g.useState(null),p=s.output(i),c=Object.values(i).some(o=>typeof o=="string"&&o.trim().length>0);return e.jsxs("div",{className:"space-y-5",children:[s.customRender&&e.jsxs("div",{className:"lg:hidden bg-blue-50 border border-blue-100 rounded-xl p-3 flex items-center gap-2",children:[e.jsx("span",{className:"text-sm",children:"🖥️"}),e.jsx("p",{className:"text-xs text-blue-700 font-medium",children:"Best experienced on desktop for the full canvas view"})]}),!c&&!s.customRender&&e.jsxs("div",{className:"bg-white border-2 border-dashed border-stone-200 rounded-xl p-8 text-center",children:[e.jsx("p",{className:"text-2xl mb-2",children:"✏️"}),e.jsx("p",{className:"text-sm font-semibold text-stone-700",children:"Get started by filling in the first field below"}),e.jsx("p",{className:"text-xs text-stone-400 mt-1",children:"Your progress auto-saves as you type"}),e.jsx("p",{className:"font-arabic text-[10px] text-stone-400 mt-1",dir:"rtl",children:"ابدأ بملء الحقل الأول أدناه"})]}),s.customRender?e.jsx("div",{className:"bg-white border border-stone-200 rounded-xl p-5 shadow-card",children:s.customRender(i,n)}):s.fields.map(o=>{const f=i[o.id]??"";return e.jsxs("div",{className:"bg-white border border-stone-200 rounded-xl p-5 shadow-card",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{className:"text-xs font-bold text-stone-500 uppercase tracking-widest",children:o.label}),e.jsx("p",{className:"font-arabic text-[9px] text-stone-400 mt-0.5",dir:"rtl",children:o.labelAr}),e.jsx("p",{className:"text-sm font-semibold text-stone-900 mt-2",children:o.prompt}),e.jsx("p",{className:"font-arabic text-xs text-stone-400 mt-0.5",dir:"rtl",children:o.promptAr})]}),e.jsxs("div",{className:"relative",children:[e.jsx("textarea",{value:f,onChange:T=>n(o.id,T.target.value),placeholder:o.placeholder,maxLength:o.maxChars,rows:3,className:"w-full text-sm text-stone-800 border border-stone-200 rounded-lg px-3 py-2.5 bg-stone-50 resize-none focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors placeholder:text-stone-300"}),e.jsxs("p",{className:"text-right text-[10px] text-stone-300 mt-1",children:[f.length,"/",o.maxChars]})]})]},o.id)}),p.length>0&&e.jsxs("div",{className:"bg-emerald-50 border border-emerald-100 rounded-xl p-5",children:[e.jsx("p",{className:"text-xs font-bold text-primary uppercase tracking-widest mb-4",children:"✦ Auto-generated Output"}),p.map((o,f)=>e.jsxs("div",{className:f>0?"mt-4":"",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-stone-700",children:o.label}),e.jsx("p",{className:"font-arabic text-[9px] text-stone-400",dir:"rtl",children:o.labelAr})]}),e.jsxs("button",{onClick:()=>{navigator.clipboard.writeText(o.value),r(o.label),setTimeout(()=>r(null),2e3)},className:"flex items-center gap-1 text-[10px] text-stone-400 hover:text-primary transition-colors",children:[a===o.label?e.jsx($,{size:11}):e.jsx(ie,{size:11}),a===o.label?"Copied!":"Copy"]})]}),e.jsxs("p",{className:"text-sm text-stone-800 italic leading-relaxed bg-white rounded-lg px-3 py-2.5 border border-emerald-100",children:['"',o.value,'"']})]},f)),e.jsxs("button",{className:"mt-3 flex items-center gap-1.5 text-xs text-stone-400 hover:text-primary transition-colors",children:[e.jsx(K,{size:11})," Generate with AI ✦",e.jsx("span",{className:"text-[9px] opacity-60",children:"(coming soon)"})]})]})]})},ue=({tool:s})=>{const[i,n]=g.useState(!1),[a,r]=g.useState(!1);return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-white border border-stone-200 rounded-xl p-4 shadow-card",children:[e.jsx("p",{className:"text-xs font-bold text-stone-500 uppercase tracking-widest mb-2",children:"What is this?"}),e.jsx("p",{className:"text-sm text-stone-700 leading-relaxed",children:s.guide.what}),s.guide.whatAr&&e.jsx("p",{className:"font-arabic text-xs text-stone-400 mt-2",dir:"rtl",children:s.guide.whatAr})]}),e.jsxs("div",{className:"bg-white border border-stone-200 rounded-xl p-4 shadow-card",children:[e.jsx("p",{className:"text-xs font-bold text-stone-500 uppercase tracking-widest mb-2",children:"How to fill this"}),e.jsx("ol",{className:"space-y-1.5",children:s.guide.steps.map((p,c)=>e.jsxs("li",{className:"flex items-start gap-2 text-xs text-stone-600",children:[e.jsxs("span",{className:"font-mono text-stone-300 flex-shrink-0 mt-0.5",children:[c+1,"."]}),p]},c))})]}),Object.keys(s.guide.example).length>0&&e.jsxs("div",{className:"bg-white border border-stone-200 rounded-xl overflow-hidden shadow-card",children:[e.jsxs("button",{className:"w-full flex items-center justify-between px-4 py-3 text-xs font-bold text-stone-500 uppercase tracking-widest",onClick:()=>n(!i),children:[e.jsx("span",{children:"Example"}),i?e.jsx(z,{size:13}):e.jsx(E,{size:13})]}),i&&e.jsx("div",{className:"px-4 pb-4 space-y-2.5 border-t border-stone-100",children:Object.entries(s.guide.example).map(([p,c])=>e.jsxs("div",{className:"bg-stone-50 rounded-lg p-2.5",children:[e.jsx("p",{className:"text-[9px] font-semibold text-stone-400 uppercase mb-1",children:p}),e.jsxs("p",{className:"text-xs text-stone-700 italic",children:['"',c,'"']})]},p))})]}),e.jsxs("div",{className:"bg-white border border-stone-200 rounded-xl overflow-hidden shadow-card",children:[e.jsxs("button",{className:"w-full flex items-center justify-between px-4 py-3 text-xs font-bold text-stone-500 uppercase tracking-widest",onClick:()=>r(!a),children:[e.jsx("span",{children:"✦ Pro Tip"}),a?e.jsx(z,{size:13}):e.jsx(E,{size:13})]}),a&&e.jsx("div",{className:"px-4 pb-4 border-t border-stone-100",children:e.jsx("p",{className:"text-xs text-stone-600 leading-relaxed mt-3",children:s.guide.proTip})})]})]})};function ye({section:s}){const{toolSlug:i}=J(),{workspace:n,profile:a,subscription:r,isLoading:p}=G(),c=i?i.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" "):"Tool",o=i&&H[i]?H[i]:ce(c,s),[f,T]=g.useState(null);g.useEffect(()=>{i&&W.from("tools").select("is_free").eq("slug",i).maybeSingle().then(({data:l})=>{T((l==null?void 0:l.is_free)??!1)})},[i]);const N=(r==null?void 0:r.plan)??(a==null?void 0:a.plan)??"free",L=r==null?void 0:r.status,F=f===!1&&!(N!=="free"&&L!=="expired"&&L!=="suspended"),[u,y]=g.useState({}),[m,b]=g.useState("empty"),[C,d]=g.useState("idle"),[A,w]=g.useState(!1),v=g.useRef(null),j=re(i,u,(l,x)=>{q(l,x)},A);g.useEffect(()=>{!(n!=null&&n.id)||!i||(w(!1),(async()=>{const{data:l,error:x}=await W.from("tool_data").select("*").eq("workspace_id",n.id).eq("tool_slug",i).maybeSingle();if(x&&x.code!=="PGRST116"){console.error("[ToolPage] Failed to load data:",x),O.error("Couldn't load your saved work. Check your connection and refresh — editing is disabled to protect your data.");return}l&&(y(l.data??{}),b(l.status)),w(!0)})())},[n==null?void 0:n.id,i]);const P=g.useCallback(async(l,x)=>{if(!(n!=null&&n.id)||!i){console.warn("[ToolPage] Cannot save — missing workspace or toolSlug"),d("idle");return}d("saving");const S=Object.values(l).filter(R=>
24typeof R=="string"&&R.trim().length>0).length,M=o.fields.length||1,I=x==="done"?100:Math.round(S/M*100),{error:D}=await W.from("tool_data").upsert({workspace_id:n.id,tool_slug:i,data:l,status:x,progress_pct:I,updated_at:new Date().toISOString()},{onConflict:"workspace_id,tool_slug"});D?(console.error("[ToolPage] Save failed:",D),d("idle"),O.error("Couldn't save your changes — check your connection and try again.")):(d("saved"),setTimeout(()=>d("idle"),2500))},[n==null?void 0:n.id,i,o.fields.length]),q=(l,x)=>{if(!A)return;const S={...u,[l]:x};y(S);const M=m==="done"?"done":"in_progress";m==="empty"&&b("in_progress"),v.current&&clearTimeout(v.current),n!=null&&n.id&&i&&(v.current=setTimeout(()=>P(S,M),1e3))},Q=async()=>{if(!(n!=null&&n.id)||!i||!A)return;const l=m==="done"?"in_progress":"done";v.current&&clearTimeout(v.current),d("saving");const x=Object.values(u).filter(D=>typeof D=="string"&&D.trim().length>0).length,S=o.fields.length||1,M=l==="done"?100:Math.round(x/S*100),{error:I}=await W.from("tool_data").upsert({workspace_id:n.id,tool_slug:i,data:u,status:l,progress_pct:M,updated_at:new Date().toISOString()},{onConflict:"workspace_id,tool_slug"});if(I){console.error("[ToolPage] Mark as Done failed:",I),d("idle"),O.error("Couldn't update the tool status — check your connection and try again.");return}b(l),d("saved"),setTimeout(()=>d("idle"),2500)},_={empty:{label:"Not Started",color:"bg-stone-100 text-stone-400"},in_progress:{label:"In Progress",color:"bg-amber-50 text-amber-600"},done:{label:"Done ✓",color:"bg-emerald-50 text-primary"}}[m];return F?e.jsx(X,{toolName:o.name,toolEmoji:o.emoji}):e.jsxs("div",{className:"min-h-full pb-20 animate-fade-in",children:[e.jsx("div",{className:"px-4 sm:px-6 pt-4 sm:pt-5 pb-3 sm:pb-4 border-b border-stone-200 bg-white sticky top-0 z-10",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("nav",{className:"text-[10px] text-stone-400 mb-2 flex items-center gap-1.5 font-mono",children:[e.jsx(B,{to:"/os",className:"hover:text-stone-600 transition-colors",children:"Dashboard"}),e.jsx("span",{children:"/"}),e.jsx(B,{to:`/os/${s}`,className:"hover:text-stone-600 transition-colors capitalize",children:s}),e.jsx("span",{children:"/"}),e.jsx("span",{className:"text-stone-600",children:o.name})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(B,{to:`/os/${s}`,className:"p-1.5 rounded-lg hover:bg-stone-100 text-stone-400 hover:text-stone-600 transition-colors flex-shrink-0",children:e.jsx(Z,{size:15})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xl",children:o.emoji}),e.jsx("h1",{className:"text-base sm:text-lg font-bold text-stone-900",children:o.name}),e.jsx("p",{className:"font-arabic text-[10px] text-stone-400 hidden sm:block",dir:"rtl",children:o.nameAr}),e.jsx("span",{className:`text-[10px] font-semibold px-2 py-0.5 rounded-full ${_.color}`,children:_.label})]}),e.jsx("p",{className:"text-xs text-stone-500 mt-0.5 ml-8 sm:ml-10 truncate",children:o.description})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-8 sm:ml-0",children:[C==="saving"&&e.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-stone-400",children:[e.jsx(te,{size:10,className:"animate-pulse"})," Saving…"]}),C==="saved"&&e.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-primary font-medium",children:[e.jsx($,{size:10})," Saved"]}),e.jsxs("button",{onClick:Q,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${m==="done"?"bg-primary text-primary-foreground hover:opacity-90":"border border-stone-200 text-stone-600 hover:border-primary hover:text-primary"}`,children:[m==="done"?e.jsx(ee,{size:12}):e.jsx(se,{size:12}),m==="done"?"Completed ✓":"Mark as Done"]})]})]})]})}),e.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-4 sm:py-6",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx(le,{suggestions:j.suggestions,dismissed:j.dismissed,onApplyAll:j.applyAll,onDismiss:j.dismiss}),e.jsx(de,{tool:o,data:u,onChange:q})]}),e.jsx("div",{className:"w-72 xl:w-80 flex-shrink-0 hidden lg:block",children:e.jsxs("div",{className:"sticky top-24",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("p",{className:"text-xs font-bold text-stone-500 uppercase tracking-widest",children:"Guide"}),e.jsx("p",{className:"font-arabic text-[9px] text-stone-400",dir:"rtl",children:"دليل"})]}),e.jsx(ue,{tool:o})]})})]})})]})}export{ue as GuidePanel,H as TOOLS,de as TextBuilder,ye as default,ce as genericTool};

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.