{
  "version": 3,
  "sources": ["guide-tours.js"],
  "sourcesContent": ["// ─────────────────────────────────────────────────────────────────────────\n// The first-visit walkthroughs of the Foundation and the question set.\n//\n// The report has had one since 2026-09-23 (report-tour.js), and its brief said\n// to extend the format once it was accepted. These are the two steps before\n// the report, where a new customer decides whether to keep going: read the\n// Foundation and approve it, then read the questions and lock them in. Nobody\n// is on a call with them for either, so this is that voice, once.\n//\n// Same machinery and the same rules as the report's: startTour() drives them\n// (report-tour.js), one stop at a time over the real page, Skip on every stop,\n// once per person (a preference scope each, cross-device), and \"Walk me\n// through this\" replays it. A stop whose element is not on the page is\n// dropped, so a viewer who cannot approve never hears about the approve\n// button. The copy is plain words for someone who has never heard of AI\n// visibility, and every sentence describes what this product does for them.\n//\n// These functions are pure: given what the page knows, they return the stops.\n// ─────────────────────────────────────────────────────────────────────────\nimport { CRAWL } from \"/account/config.js\";\n\nexport const FOUNDATION_TOUR_SCOPE = \"tour:foundation\";\nexport const QUESTIONS_TOUR_SCOPE = \"tour:questions\";\n\nconst REPLAY = \"Walk me through this, at the top of the page, replays this guide.\";\n\n/* The chapter's row in the contents rail when it is showing (a desktop), else\n   the chapter's own kicker line, which is always on the page. */\nconst chapter = (idx) => [`.chapter-toc__list [data-toc='${idx}']`, \"#chapter-stage .chapter-kicker\"];\n\n/**\n * @param {object}  o\n * @param {string}  o.id          the audit id, for the link to the questions\n * @param {string}  [o.status]    foundation_status: pending_review | changes_requested\n *                                | proposals_ready | decided | approved\n * @param {boolean} [o.questionsReady] the question set is published\n * @param {object}  [o.chapters]  { overview, buyers, competitors } → the chapter's\n *                                index in the page; a missing key leaves that stop out\n */\nexport function foundationTourStops({ id, status = \"pending_review\", questionsReady = false, chapters = {} } = {}) {\n  const enc = encodeURIComponent(String(id || \"\"));\n  const has = (k) => Number.isInteger(chapters[k]);\n  const stops = [\n    has(\"overview\") && {\n      key: \"overview\",\n      route: \"#chapter-overview\",\n      anchor: chapter(chapters.overview),\n      eyebrow: \"Your Foundation\",\n      title: \"The map everything else is built from\",\n      body: \"Before we can measure how AI talks about you, we have to agree on your market: who buys from you, who you're compared against, and what they care about. We built this from your website and public sources, so it will be mostly right, and wrong in a few places only you can spot.\",\n      explore: \"Use Contents or Next to move through the chapters. The whole read takes about five minutes.\",\n    },\n    has(\"buyers\") && {\n      key: \"buyers\",\n      route: \"#chapter-buyers\",\n      anchor: chapter(chapters.buyers),\n      eyebrow: \"Who buys this\",\n      title: \"The people your questions are written for\",\n      body: \"These are the people who evaluate and sign for what you sell. Every question we put to AI is written from one of their points of view, so a buyer who is missing or wrong here means questions that miss too.\",\n      explore: \"Check each role and what they care about, and look for anyone we left out.\",\n    },\n    has(\"competitors\") && {\n      key: \"competitors\",\n      route: \"#chapter-competitors\",\n      anchor: chapter(chapters.competitors),\n      eyebrow: \"Who you're compared against\",\n      title: \"The companies AI weighs you against\",\n      body: \"When a buyer asks AI for a recommendation, these are the names it chooses between. Your report measures how often you're picked over them.\",\n      explore: \"Missing the rival you lose deals to, or listed one that isn't really a competitor? That is the most useful note you can leave.\",\n    },\n  ];\n\n  if (status === \"pending_review\") {\n    stops.push(\n      {\n        key: \"feedback\",\n        anchor: [\"#appr-fb\"],\n        eyebrow: \"Tell us what's off\",\n        title: \"Leave a note on anything that reads wrong\",\n        body: \"Click any buyer, competitor or feature to note it, or use Feedback for anything else. Send your notes and we rebuild the foundation from them, usually in about 15 minutes, as many rounds as it takes.\",\n      },\n      {\n        key: \"approve\",\n        anchor: [\"#appr-approve\", \"#endorse\"],\n        eyebrow: \"When it reads right\",\n        title: \"Approve it, and your questions come next\",\n        body: \"Approving is free. We write your buyer questions from this foundation, about 30 minutes, and you read every one before anything runs. Nothing runs and nothing is charged until you choose to lock them in.\",\n        foot: REPLAY,\n      },\n    );\n  } else if (status === \"approved\") {\n    stops.push(questionsReady\n      ? {\n          key: \"questions\",\n          anchor: [\"#approval-bar\"],\n          eyebrow: \"What's next\",\n          title: \"Your questions are ready\",\n          body: \"We wrote your buyer questions from this foundation. Reading them is free, and nothing runs until you lock them in.\",\n          cta: { label: \"See your questions\", href: `/account/query-explorer/?id=${enc}` },\n          foot: REPLAY,\n        }\n      : {\n          key: \"writing\",\n          anchor: [\"#approval-bar\"],\n          eyebrow: \"What's next\",\n          title: \"Your questions are being written\",\n          body: \"We're writing your buyer questions from this foundation, about 30 minutes. This page updates itself when they're ready, and we'll email you too.\",\n          foot: REPLAY,\n        });\n  } else {\n    stops.push({\n      key: \"status\",\n      anchor: [\"#approval-bar\"],\n      eyebrow: \"Where things stand\",\n      title: \"We're working on your notes\",\n      body: \"Your notes are with us and the foundation is being rebuilt from them. This panel always says what's happening and whether anything needs you.\",\n      foot: REPLAY,\n    });\n  }\n  return stops.filter(Boolean);\n}\n\n/**\n * @param {object}  o\n * @param {string}  o.id         the audit id\n * @param {string}  [o.stage]    open (not ordered) | ordered (card saved, not locked)\n *                               | running (locked in, crawl underway)\n * @param {boolean} [o.byBuyer]  the page shows the buyers panel\n */\nexport function questionsTourStops({ id, stage = \"open\", byBuyer = true } = {}) {\n  const enc = encodeURIComponent(String(id || \"\"));\n  const price = CRAWL.single.label;\n  const stops = [\n    {\n      key: \"set\",\n      anchor: [\".doc-hero__title\"],\n      eyebrow: \"Your questions\",\n      title: \"The questions your buyers ask AI\",\n      body: \"We wrote these from the foundation you approved. Each one is something a real buyer would type into ChatGPT, Claude, Gemini or Perplexity. When we run them, your report shows how often AI names you in the answer.\",\n      explore: \"Reading them is free, and it's the best way to judge whether the report will measure the right things.\",\n    },\n    byBuyer && {\n      key: \"buyers\",\n      anchor: [\".chapter-toc__list .toc-item:nth-of-type(2)\", \".chapter-toc__handle\", \"#qxp-p0 .doc-section__title\"],\n      eyebrow: \"Grouped by who's asking\",\n      title: \"One set for each of your buyers\",\n      body: \"Each buyer from your foundation gets their own questions, because a CFO and an engineer ask AI very different things.\",\n      explore: \"Pick a buyer from the Personas list to read just theirs.\",\n    },\n  ];\n  if (stage === \"running\") {\n    stops.push({\n      key: \"running\",\n      anchor: [\".qxl-bar\"],\n      eyebrow: \"What's happening\",\n      title: \"Your questions are being run now\",\n      body: \"Every question is going to all four AI engines, and a person reads every answer. Your report lands in your account within 72 hours, and we'll email you when it does.\",\n      cta: { label: \"Track it\", href: `/account/crawl/?id=${enc}` },\n      foot: REPLAY,\n    });\n  } else {\n    stops.push(\n      {\n        key: \"shape\",\n        anchor: [\".qxl-step:has(.qxl-notebtn--general)\", \".qxl-notebtn--general\", \".qxl-notebtn\"],\n        eyebrow: \"Want changes?\",\n        title: \"Suggest them, and we fine-tune the set\",\n        body: stage === \"ordered\"\n          ? \"Suggest a change on any question, leave a general note, or upload your own list. Send your changes and we fine-tune the set from them before anything runs.\"\n          : `Suggest a change on any question, leave a general note, or upload your own list, and we fine-tune the set from it. These tools open when you order, which costs $0 today: the ${price} is charged only when your report is delivered.`,\n      },\n      {\n        key: \"lockin\",\n        anchor: [\".qxl-bar\"],\n        eyebrow: \"When they read right\",\n        title: \"Lock them in to start your report\",\n        body: `Locking in starts the run: every question goes to ChatGPT, Claude, Gemini and Perplexity, and your report lands within 72 hours. ${price}, charged only when the report is in your account.`,\n        foot: REPLAY,\n      },\n    );\n  }\n  return stops.filter(Boolean);\n}\n"],
  "mappings": "AAmBA,OAAS,SAAAA,MAAa,qBAEf,aAAM,sBAAwB,kBACxB,qBAAuB,iBAEpC,MAAMC,EAAS,oEAITC,EAAWC,GAAQ,CAAC,iCAAiCA,CAAG,KAAM,gCAAgC,EAW7F,gBAAS,oBAAoB,CAAE,GAAAC,EAAI,OAAAC,EAAS,iBAAkB,eAAAC,EAAiB,GAAO,SAAAC,EAAW,CAAC,CAAE,EAAI,CAAC,EAAG,CACjH,MAAMC,EAAM,mBAAmB,OAAOJ,GAAM,EAAE,CAAC,EACzCK,EAAOC,GAAM,OAAO,UAAUH,EAASG,CAAC,CAAC,EACzCC,EAAQ,CACZF,EAAI,UAAU,GAAK,CACjB,IAAK,WACL,MAAO,oBACP,OAAQP,EAAQK,EAAS,QAAQ,EACjC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,MAAO,mCACP,KAAM,uNACN,QAAS,wGACX,EACAE,GAAW,CACT,IAAK,SACL,OAAQ,CAAC,8CAA+C,uBAAwB,6BAA6B,EAC7G,QAAS,0BACT,MAAO,kCACP,KAAM,wHACN,QAAS,0DACX,CACF,EACA,OAAID,IAAU,UACZD,EAAM,KAAK,CACT,IAAK,UACL,OAAQ,CAAC,UAAU,EACnB,QAAS,mBACT,MAAO,mCACP,KAAM,wKACN,IAAK,CAAE,MAAO,WAAY,KAAM,sBAAsBH,CAAG,EAAG,EAC5D,KAAMP,CACR,CAAC,EAEDU,EAAM,KACJ,CACE,IAAK,QACL,OAAQ,CAAC,uCAAwC,wBAAyB,cAAc,EACxF,QAAS,gBACT,MAAO,yCACP,KAAMC,IAAU,UACZ,8JACA,iLAAiLE,CAAK,iDAC5L,EACA,CACE,IAAK,SACL,OAAQ,CAAC,UAAU,EACnB,QAAS,uBACT,MAAO,oCACP,KAAM,oIAAoIA,CAAK,qDAC/I,KAAMb,CACR,CACF,EAEKU,EAAM,OAAO,OAAO,CAC7B",
  "names": ["CRAWL", "REPLAY", "chapter", "idx", "id", "status", "questionsReady", "chapters", "enc", "has", "k", "stops", "stage", "byBuyer", "price"]
}
