{
  "version": 3,
  "sources": ["../../src/app/ai/agents/evals2/scenarios/layout/centeredNavigation.eval.ts"],
  "sourcesContent": ["import { assert } from \"@framerjs/shared\"\nimport { DimensionType } from \"library/index.ts\"\nimport { agentEvalAsset } from \"../../harness/asset.ts\"\nimport { createEvalExportZipFixture } from \"../../harness/fixture.ts\"\nimport { getChildAt, getDescendantText, getFrame, getFrameChildAt } from \"../helpers.ts\"\nimport { layoutNodeIds } from \"./ids.ts\"\n\nevaluation(\n\t\"Navigation Icon Stays Centered Between Link Groups\",\n\tcreateEvalExportZipFixture(\"replay-centre-nav\", agentEvalAsset(\"centeredNavigation.fixture.zip\"), {\n\t\truntimeTarget: \"cli\",\n\t}),\n\t{\n\t\tid: \"centre-nav\",\n\t\trequestId: \"G8lGd7kl0\",\n\t\tmaxSteps: 3,\n\t},\n\t({ engine, report, tools }) => {\n\t\ttools.reportReplayChecks(report, {\n\t\t\trequestId: \"G8lGd7kl0\",\n\t\t})\n\t\tconst navigation = getFrame(engine, layoutNodeIds.navigationTarget)\n\t\tconst childIds = navigation.children.map(child => child.id)\n\t\tconst iconIndex = childIds.indexOf(layoutNodeIds.navigationCenterIcon)\n\t\tconst leftGroup = getFrameChildAt(navigation, iconIndex - 1)\n\t\tconst rightGroup = getFrameChildAt(navigation, iconIndex + 1)\n\n\t\treport.correctness.scored(\"uses stack layout\", () => {\n\t\t\texpect(navigation.layout).toBe(\"stack\")\n\t\t})\n\t\treport.correctness.scored(\"uses horizontal direction\", () => {\n\t\t\texpect(navigation.stackDirection).toBe(\"horizontal\")\n\t\t})\n\t\treport.correctness.scored(\"keeps the icon centered between two nav groups\", () => {\n\t\t\texpect(iconIndex).toBe(Math.floor(childIds.length / 2))\n\t\t})\n\t\treport.correctness.scored(\"uses flexible groups around the icon\", () => {\n\t\t\texpect(leftGroup?.widthType).toBe(DimensionType.FractionOfFreeSpace)\n\t\t\texpect(rightGroup?.widthType).toBe(DimensionType.FractionOfFreeSpace)\n\t\t})\n\n\t\treport.correctness.each(\"balances left links around the icon\", [\"Home\", \"Pricing\"], label => {\n\t\t\tconst leftGroup = getChildAt(navigation, iconIndex - 1)\n\t\t\tassert(leftGroup, \"Expected a left navigation group.\")\n\t\t\texpect(getDescendantText(leftGroup)).toContain(label)\n\t\t})\n\t\treport.correctness.each(\"balances right links around the icon\", [\"Docs\", \"Resources\"], label => {\n\t\t\tconst rightGroup = getChildAt(navigation, iconIndex + 1)\n\t\t\tassert(rightGroup, \"Expected a right navigation group.\")\n\t\t\texpect(getDescendantText(rightGroup)).toContain(label)\n\t\t})\n\t},\n)\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;AAAA,EACC;AAAA,EACA,2BAA2B,qBAAqB,eAAe,gCAAgC,GAAG;AAAA,IACjG,eAAe;AAAA,EAChB,CAAC;AAAA,EACD;AAAA,IACC,IAAI;AAAA,IACJ,WAAW;AAAA,IACX,UAAU;AAAA,EACX;AAAA,EACA,CAAC,EAAE,QAAQ,QAAQ,MAAM,MAAM;AAC9B,UAAM,mBAAmB,QAAQ;AAAA,MAChC,WAAW;AAAA,IACZ,CAAC;AACD,UAAM,aAAa,SAAS,QAAQ,cAAc,gBAAgB;AAClE,UAAM,WAAW,WAAW,SAAS,IAAI,WAAS,MAAM,EAAE;AAC1D,UAAM,YAAY,SAAS,QAAQ,cAAc,oBAAoB;AACrE,UAAM,YAAY,gBAAgB,YAAY,YAAY,CAAC;AAC3D,UAAM,aAAa,gBAAgB,YAAY,YAAY,CAAC;AAE5D,WAAO,YAAY,OAAO,qBAAqB,MAAM;AACpD,aAAO,WAAW,MAAM,EAAE,KAAK,OAAO;AAAA,IACvC,CAAC;AACD,WAAO,YAAY,OAAO,6BAA6B,MAAM;AAC5D,aAAO,WAA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