{"version":3,"sources":["../src/components/data/usChoropleth/usStates.ts","../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/fsum.js","../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/index.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/math.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/noop.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/stream.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/identity.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/area.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/bounds.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/centroid.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/context.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/measure.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/string.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/index.js","../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/index.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/identity.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/transform.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/bbox.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/reverse.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/feature.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/stitch.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/mesh.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/merge.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/bisect.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/neighbors.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/untransform.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/quantize.js","../node_modules/.pnpm/topojson-client@3.1.0/node_modules/topojson-client/src/index.js","../node_modules/.pnpm/us-atlas@3.0.1/node_modules/us-atlas/states-albers-10m.json","../src/components/data/usChoropleth/usStateShapes.ts","../src/index.ts","../src/components/actions/Button.tsx","../src/components/actions/overflowRowContext.ts","../src/components/actions/IconButton.tsx","../src/components/actions/Popover.tsx","../src/kits/layerStack.tsx","../src/components/actions/SegmentedControl.tsx","../src/components/actions/CopyButton.tsx","../src/kits/clipboard.ts","../src/components/actions/useHoverPopover.ts","../src/components/feedback/hoverIntent.ts","../src/components/surfaces/AnchoredPopover.tsx","../src/components/textExposure.ts","../src/components/surfaces/Card.tsx","../src/components/surfaces/Collapsible.tsx","../src/components/surfaces/Drawer.tsx","../src/kits/useClosingAnimation.ts","../src/kits/inertWhen.ts","../src/kits/useLastOpenValue.ts","../src/components/surfaces/Modal.tsx","../src/components/surfaces/ScreenHead.tsx","../src/components/surfaces/EditableTitle.tsx","../src/components/feedback/Tooltip.tsx","../src/components/feedback/useTooltip.tsx","../src/components/layout/PanelRow.tsx","../src/components/layout/CardGrid.tsx","../src/components/loading/LoadingRegion.tsx","../src/components/loading/JobTray.tsx","../src/kits/cornerStack.tsx","../src/components/loading/ProgressBar.tsx","../src/components/loading/PhasedProgress.tsx","../src/components/loading/Skeleton.tsx","../src/components/loading/ReservedSkeleton.tsx","../src/components/loading/Spinner.tsx","../src/components/navigation/SidebarNav.tsx","../src/components/navigation/Topbar.tsx","../src/kits/useIsNarrow.ts","../src/kits/useResponsiveRail.ts","../src/kits/overlayLayout.ts","../src/components/navigation/DockedSidePanel.tsx","../src/kits/useResizableWidth.ts","../src/components/navigation/AppShell.tsx","../src/components/navigation/FlytedeskBrand.tsx","../src/components/navigation/Tabs.tsx","../src/components/feedback/Avatar.tsx","../src/components/feedback/Banner.tsx","../src/components/feedback/Badge.tsx","../src/components/feedback/EmptyState.tsx","../src/components/feedback/Flag.tsx","../src/components/feedback/KeyHint.tsx","../src/components/feedback/StatusIndicator.tsx","../src/components/feedback/Tag.tsx","../src/components/feedback/Toast.tsx","../src/components/feedback/ToastProvider.tsx","../src/components/data/AnimNum.tsx","../src/components/data/TrendChart.tsx","../src/components/useMeasuredWidth.ts","../src/components/data/SegmentedMeter.tsx","../src/kits/files.ts","../src/components/data/chartInternal.tsx","../src/components/data/DonutChart.tsx","../src/components/data/BarList.tsx","../src/components/data/FunnelChart.tsx","../src/components/data/Clamp.tsx","../src/components/data/CsiBadge.tsx","../src/components/data/DataTable.tsx","../src/components/data/FilterBar.tsx","../src/components/forms/NumberInput.tsx","../src/components/forms/field.tsx","../src/components/useLatest.ts","../src/components/forms/DatePicker.tsx","../src/components/forms/Textarea.tsx","../src/components/forms/listbox.ts","../src/components/data/MiddleEllipsis.tsx","../src/components/data/InfoButton.tsx","../src/components/data/StatGrid.tsx","../src/components/data/StatTile.tsx","../src/components/data/CodeBlock.tsx","../src/components/data/Markdown.tsx","../src/components/data/markdownEscape.ts","../src/components/data/Meter.tsx","../src/components/data/Pagination.tsx","../src/components/data/RelativeTime.tsx","../src/components/data/ScoreMeter.tsx","../src/components/actions/inlinePanel.tsx","../src/components/data/SortMenu.tsx","../src/components/data/StepList.tsx","../src/components/data/VirtualList.tsx","../src/components/data/EntityRow.tsx","../src/components/data/TransferList.tsx","../src/components/forms/Input.tsx","../src/components/forms/SearchField.tsx","../src/components/data/FactList.tsx","../src/components/data/USChoropleth.tsx","../src/components/data/usChoropleth/mapBox.ts","../src/components/data/usChoropleth/model.ts","../src/components/data/usChoropleth/useUsStateShapes.ts","../src/components/data/index.ts","../src/components/data/ReferenceList.tsx","../src/components/forms/Checkbox.tsx","../src/components/forms/Radio.tsx","../src/components/forms/Switch.tsx","../src/components/forms/Select.tsx","../src/components/forms/TimePicker.tsx","../src/components/forms/Slider.tsx","../src/components/forms/RangeSlider.tsx","../src/components/forms/Dropzone.tsx","../src/components/forms/FileGrid.tsx","../src/components/forms/MarkdownEditor.tsx","../src/components/forms/CodeEditor.tsx","../src/components/forms/RadioGroup.tsx","../src/components/forms/Fieldset.tsx","../src/components/platform/AccountMenu.tsx","../src/kits/sessionContext.tsx","../src/components/platform/AppSwitcher.tsx","../src/components/platform/AppearanceMenu.tsx","../src/kits/appearance.ts","../src/components/platform/AppearanceProvider.tsx","../src/components/platform/ApiSpecBrowser.tsx","../src/components/platform/ProfilePage.tsx","../src/components/platform/SessionScreen.tsx","../src/components/platform/RoadmapTimeline.tsx","../src/kits/session.ts","../src/kits/runtime.ts","../src/components/platform/ComingSoon.tsx","../src/components/platform/Gate.tsx","../src/components/platform/ModeSwitch.tsx","../src/components/planner/ChannelMeta.tsx","../src/components/planner/SaturationDistribution.tsx","../src/components/planner/MixGap.tsx","../src/components/planner/ChannelContribution.tsx","../src/components/planner/BudgetReallocator.tsx","../src/components/planner/SurroundSound.tsx","../src/components/planner/Importance.tsx","../src/components/planner/PreferenceMeter.tsx","../src/components/chat/AgentChatPanel.tsx","../src/components/chat/chatEngine.ts","../src/components/chat/chatStore.ts","../src/components/chat/ChatTranscript.tsx","../src/components/chat/ChatTurn.tsx","../src/components/chat/ChatComposer.tsx","../src/components/chat/ChatSessionBar.tsx","../src/components/chat/QueryResultCard.tsx","../src/components/chat/CsvCard.tsx","../src/kits/exports/exportState.ts","../src/kits/exports/exportJob.ts","../src/components/files/FileViewer.tsx","../src/components/files/FileBrowser.tsx","../src/kits/sessionAdapter.ts","../src/kits/query.ts","../src/kits/queryUrl.ts","../src/kits/mockJobs.ts","../src/kits/versions.ts","../src/kits/documentTitle.ts","../src/kits/chatTransport/deadline.ts","../src/kits/chatTransport/chatAdapter.ts","../src/kits/chatTransport/useChatThreads.ts","../src/kits/exports/downloadExport.ts","../src/kits/exports/useExportJobs.ts","../src/kits/exports/ExportTray.tsx"],"sourcesContent":["/** A state (or DC) with the FIPS code the US map geometry (us-atlas) identifies it by. `code` is its\n *  USPS postal abbreviation, the key a caller names it by. */\nexport interface UsState {\n  fips: string;\n  code: string;\n  name: string;\n}\n\nexport const US_STATES: readonly UsState[] = [\n  { fips: \"01\", code: \"AL\", name: \"Alabama\" },\n  { fips: \"02\", code: \"AK\", name: \"Alaska\" },\n  { fips: \"04\", code: \"AZ\", name: \"Arizona\" },\n  { fips: \"05\", code: \"AR\", name: \"Arkansas\" },\n  { fips: \"06\", code: \"CA\", name: \"California\" },\n  { fips: \"08\", code: \"CO\", name: \"Colorado\" },\n  { fips: \"09\", code: \"CT\", name: \"Connecticut\" },\n  { fips: \"10\", code: \"DE\", name: \"Delaware\" },\n  { fips: \"11\", code: \"DC\", name: \"District of Columbia\" },\n  { fips: \"12\", code: \"FL\", name: \"Florida\" },\n  { fips: \"13\", code: \"GA\", name: \"Georgia\" },\n  { fips: \"15\", code: \"HI\", name: \"Hawaii\" },\n  { fips: \"16\", code: \"ID\", name: \"Idaho\" },\n  { fips: \"17\", code: \"IL\", name: \"Illinois\" },\n  { fips: \"18\", code: \"IN\", name: \"Indiana\" },\n  { fips: \"19\", code: \"IA\", name: \"Iowa\" },\n  { fips: \"20\", code: \"KS\", name: \"Kansas\" },\n  { fips: \"21\", code: \"KY\", name: \"Kentucky\" },\n  { fips: \"22\", code: \"LA\", name: \"Louisiana\" },\n  { fips: \"23\", code: \"ME\", name: \"Maine\" },\n  { fips: \"24\", code: \"MD\", name: \"Maryland\" },\n  { fips: \"25\", code: \"MA\", name: \"Massachusetts\" },\n  { fips: \"26\", code: \"MI\", name: \"Michigan\" },\n  { fips: \"27\", code: \"MN\", name: \"Minnesota\" },\n  { fips: \"28\", code: \"MS\", name: \"Mississippi\" },\n  { fips: \"29\", code: \"MO\", name: \"Missouri\" },\n  { fips: \"30\", code: \"MT\", name: \"Montana\" },\n  { fips: \"31\", code: \"NE\", name: \"Nebraska\" },\n  { fips: \"32\", code: \"NV\", name: \"Nevada\" },\n  { fips: \"33\", code: \"NH\", name: \"New Hampshire\" },\n  { fips: \"34\", code: \"NJ\", name: \"New Jersey\" },\n  { fips: \"35\", code: \"NM\", name: \"New Mexico\" },\n  { fips: \"36\", code: \"NY\", name: \"New York\" },\n  { fips: \"37\", code: \"NC\", name: \"North Carolina\" },\n  { fips: \"38\", code: \"ND\", name: \"North Dakota\" },\n  { fips: \"39\", code: \"OH\", name: \"Ohio\" },\n  { fips: \"40\", code: \"OK\", name: \"Oklahoma\" },\n  { fips: \"41\", code: \"OR\", name: \"Oregon\" },\n  { fips: \"42\", code: \"PA\", name: \"Pennsylvania\" },\n  { fips: \"44\", code: \"RI\", name: \"Rhode Island\" },\n  { fips: \"45\", code: \"SC\", name: \"South Carolina\" },\n  { fips: \"46\", code: \"SD\", name: \"South Dakota\" },\n  { fips: \"47\", code: \"TN\", name: \"Tennessee\" },\n  { fips: \"48\", code: \"TX\", name: \"Texas\" },\n  { fips: \"49\", code: \"UT\", name: \"Utah\" },\n  { fips: \"50\", code: \"VT\", name: \"Vermont\" },\n  { fips: \"51\", code: \"VA\", name: \"Virginia\" },\n  { fips: \"53\", code: \"WA\", name: \"Washington\" },\n  { fips: \"54\", code: \"WV\", name: \"West Virginia\" },\n  { fips: \"55\", code: \"WI\", name: \"Wisconsin\" },\n  { fips: \"56\", code: \"WY\", name: \"Wyoming\" },\n];\n\n/** Every code a map value can name: the 50 states and DC, in state-name order (the order the map's arrow\n *  keys and its table walk them). */\nexport const US_STATE_CODES: readonly string[] = US_STATES.map((state) => state.code);\n\nconst CODES = new Set(US_STATE_CODES);\n\n/** Whether `code` is one of `US_STATE_CODES`. A consumer whose data also carries territories or blanks\n *  filters with this before passing values, rather than keeping its own copy of the list. */\nexport function isUsStateCode(code: string | null | undefined): code is string {\n  return code != null && CODES.has(code);\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nexport function fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n","export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {blur, blur2, blurImage} from \"./blur.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median, medianIndex} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as mode} from \"./mode.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileIndex, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as rank} from \"./rank.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","function streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n}\n","export default x => x;\n","import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n    areaRingSum = new Adder(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n    areaSum.add(abs(areaRingSum));\n    areaRingSum = new Adder();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum = new Adder();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop,\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = sqrt(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n","import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, tau);\n        break;\n      }\n    }\n  },\n  result: noop\n};\n","import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: noop,\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = noop;\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum = new Adder();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n  constructor(digits) {\n    this._append = digits == null ? append : appendRound(digits);\n    this._radius = 4.5;\n    this._ = \"\";\n  }\n  pointRadius(_) {\n    this._radius = +_;\n    return this;\n  }\n  polygonStart() {\n    this._line = 0;\n  }\n  polygonEnd() {\n    this._line = NaN;\n  }\n  lineStart() {\n    this._point = 0;\n  }\n  lineEnd() {\n    if (this._line === 0) this._ += \"Z\";\n    this._point = NaN;\n  }\n  point(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._append`M${x},${y}`;\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._append`L${x},${y}`;\n        break;\n      }\n      default: {\n        this._append`M${x},${y}`;\n        if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n          const r = this._radius;\n          const s = this._;\n          this._ = \"\"; // stash the old string so we can cache the circle path fragment\n          this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n          cacheRadius = r;\n          cacheAppend = this._append;\n          cacheCircle = this._;\n          this._ = s;\n        }\n        this._ += cacheCircle;\n        break;\n      }\n    }\n  }\n  result() {\n    const result = this._;\n    this._ = \"\";\n    return result.length ? result : null;\n  }\n}\n\nfunction append(strings) {\n  let i = 1;\n  this._ += strings[0];\n  for (const j = strings.length; i < j; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  const d = Math.floor(digits);\n  if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  if (d !== cacheDigits) {\n    const k = 10 ** d;\n    cacheDigits = d;\n    cacheAppend = function append(strings) {\n      let i = 1;\n      this._ += strings[0];\n      for (const j = strings.length; i < j; ++i) {\n        this._ += Math.round(arguments[i] * k) / k + strings[i];\n      }\n    };\n  }\n  return cacheAppend;\n}\n","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n  let digits = 3,\n      pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      stream(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    stream(object, projectionStream(pathArea));\n    return pathArea.result();\n  };\n\n  path.measure = function(object) {\n    stream(object, projectionStream(pathMeasure));\n    return pathMeasure.result();\n  };\n\n  path.bounds = function(object) {\n    stream(object, projectionStream(pathBounds));\n    return pathBounds.result();\n  };\n\n  path.centroid = function(object) {\n    stream(object, projectionStream(pathCentroid));\n    return pathCentroid.result();\n  };\n\n  path.projection = function(_) {\n    if (!arguments.length) return projection;\n    projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n    return path;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  path.digits = function(_) {\n    if (!arguments.length) return digits;\n    if (_ == null) digits = null;\n    else {\n      const d = Math.floor(_);\n      if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n      digits = d;\n    }\n    if (context === null) contextStream = new PathString(digits);\n    return path;\n  };\n\n  return path.projection(projection).digits(digits).context(context);\n}\n","export {default as geoArea} from \"./area.js\";\nexport {default as geoBounds} from \"./bounds.js\";\nexport {default as geoCentroid} from \"./centroid.js\";\nexport {default as geoCircle} from \"./circle.js\";\nexport {default as geoClipAntimeridian} from \"./clip/antimeridian.js\";\nexport {default as geoClipCircle} from \"./clip/circle.js\";\nexport {default as geoClipExtent} from \"./clip/extent.js\"; // DEPRECATED! Use d3.geoIdentity().clipExtent(…).\nexport {default as geoClipRectangle} from \"./clip/rectangle.js\";\nexport {default as geoContains} from \"./contains.js\";\nexport {default as geoDistance} from \"./distance.js\";\nexport {default as geoGraticule, graticule10 as geoGraticule10} from \"./graticule.js\";\nexport {default as geoInterpolate} from \"./interpolate.js\";\nexport {default as geoLength} from \"./length.js\";\nexport {default as geoPath} from \"./path/index.js\";\nexport {default as geoAlbers} from \"./projection/albers.js\";\nexport {default as geoAlbersUsa} from \"./projection/albersUsa.js\";\nexport {default as geoAzimuthalEqualArea, azimuthalEqualAreaRaw as geoAzimuthalEqualAreaRaw} from \"./projection/azimuthalEqualArea.js\";\nexport {default as geoAzimuthalEquidistant, azimuthalEquidistantRaw as geoAzimuthalEquidistantRaw} from \"./projection/azimuthalEquidistant.js\";\nexport {default as geoConicConformal, conicConformalRaw as geoConicConformalRaw} from \"./projection/conicConformal.js\";\nexport {default as geoConicEqualArea, conicEqualAreaRaw as geoConicEqualAreaRaw} from \"./projection/conicEqualArea.js\";\nexport {default as geoConicEquidistant, conicEquidistantRaw as geoConicEquidistantRaw} from \"./projection/conicEquidistant.js\";\nexport {default as geoEqualEarth, equalEarthRaw as geoEqualEarthRaw} from \"./projection/equalEarth.js\";\nexport {default as geoEquirectangular, equirectangularRaw as geoEquirectangularRaw} from \"./projection/equirectangular.js\";\nexport {default as geoGnomonic, gnomonicRaw as geoGnomonicRaw} from \"./projection/gnomonic.js\";\nexport {default as geoIdentity} from \"./projection/identity.js\";\nexport {default as geoProjection, projectionMutator as geoProjectionMutator} from \"./projection/index.js\";\nexport {default as geoMercator, mercatorRaw as geoMercatorRaw} from \"./projection/mercator.js\";\nexport {default as geoNaturalEarth1, naturalEarth1Raw as geoNaturalEarth1Raw} from \"./projection/naturalEarth1.js\";\nexport {default as geoOrthographic, orthographicRaw as geoOrthographicRaw} from \"./projection/orthographic.js\";\nexport {default as geoStereographic, stereographicRaw as geoStereographicRaw} from \"./projection/stereographic.js\";\nexport {default as geoTransverseMercator, transverseMercatorRaw as geoTransverseMercatorRaw} from \"./projection/transverseMercator.js\";\nexport {default as geoRotation} from \"./rotation.js\";\nexport {default as geoStream} from \"./stream.js\";\nexport {default as geoTransform} from \"./transform.js\";\n","export default function(x) {\n  return x;\n}\n","import identity from \"./identity.js\";\n\nexport default function(transform) {\n  if (transform == null) return identity;\n  var x0,\n      y0,\n      kx = transform.scale[0],\n      ky = transform.scale[1],\n      dx = transform.translate[0],\n      dy = transform.translate[1];\n  return function(input, i) {\n    if (!i) x0 = y0 = 0;\n    var j = 2, n = input.length, output = new Array(n);\n    output[0] = (x0 += input[0]) * kx + dx;\n    output[1] = (y0 += input[1]) * ky + dy;\n    while (j < n) output[j] = input[j], ++j;\n    return output;\n  };\n}\n","import transform from \"./transform.js\";\n\nexport default function(topology) {\n  var t = transform(topology.transform), key,\n      x0 = Infinity, y0 = x0, x1 = -x0, y1 = -x0;\n\n  function bboxPoint(p) {\n    p = t(p);\n    if (p[0] < x0) x0 = p[0];\n    if (p[0] > x1) x1 = p[0];\n    if (p[1] < y0) y0 = p[1];\n    if (p[1] > y1) y1 = p[1];\n  }\n\n  function bboxGeometry(o) {\n    switch (o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(bboxGeometry); break;\n      case \"Point\": bboxPoint(o.coordinates); break;\n      case \"MultiPoint\": o.coordinates.forEach(bboxPoint); break;\n    }\n  }\n\n  topology.arcs.forEach(function(arc) {\n    var i = -1, n = arc.length, p;\n    while (++i < n) {\n      p = t(arc[i], i);\n      if (p[0] < x0) x0 = p[0];\n      if (p[0] > x1) x1 = p[0];\n      if (p[1] < y0) y0 = p[1];\n      if (p[1] > y1) y1 = p[1];\n    }\n  });\n\n  for (key in topology.objects) {\n    bboxGeometry(topology.objects[key]);\n  }\n\n  return [x0, y0, x1, y1];\n}\n","export default function(array, n) {\n  var t, j = array.length, i = j - n;\n  while (i < --j) t = array[i], array[i++] = array[j], array[j] = t;\n}\n","import reverse from \"./reverse.js\";\nimport transform from \"./transform.js\";\n\nexport default function(topology, o) {\n  if (typeof o === \"string\") o = topology.objects[o];\n  return o.type === \"GeometryCollection\"\n      ? {type: \"FeatureCollection\", features: o.geometries.map(function(o) { return feature(topology, o); })}\n      : feature(topology, o);\n}\n\nfunction feature(topology, o) {\n  var id = o.id,\n      bbox = o.bbox,\n      properties = o.properties == null ? {} : o.properties,\n      geometry = object(topology, o);\n  return id == null && bbox == null ? {type: \"Feature\", properties: properties, geometry: geometry}\n      : bbox == null ? {type: \"Feature\", id: id, properties: properties, geometry: geometry}\n      : {type: \"Feature\", id: id, bbox: bbox, properties: properties, geometry: geometry};\n}\n\nexport function object(topology, o) {\n  var transformPoint = transform(topology.transform),\n      arcs = topology.arcs;\n\n  function arc(i, points) {\n    if (points.length) points.pop();\n    for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) {\n      points.push(transformPoint(a[k], k));\n    }\n    if (i < 0) reverse(points, n);\n  }\n\n  function point(p) {\n    return transformPoint(p);\n  }\n\n  function line(arcs) {\n    var points = [];\n    for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points);\n    if (points.length < 2) points.push(points[0]); // This should never happen per the specification.\n    return points;\n  }\n\n  function ring(arcs) {\n    var points = line(arcs);\n    while (points.length < 4) points.push(points[0]); // This may happen if an arc has only two points.\n    return points;\n  }\n\n  function polygon(arcs) {\n    return arcs.map(ring);\n  }\n\n  function geometry(o) {\n    var type = o.type, coordinates;\n    switch (type) {\n      case \"GeometryCollection\": return {type: type, geometries: o.geometries.map(geometry)};\n      case \"Point\": coordinates = point(o.coordinates); break;\n      case \"MultiPoint\": coordinates = o.coordinates.map(point); break;\n      case \"LineString\": coordinates = line(o.arcs); break;\n      case \"MultiLineString\": coordinates = o.arcs.map(line); break;\n      case \"Polygon\": coordinates = polygon(o.arcs); break;\n      case \"MultiPolygon\": coordinates = o.arcs.map(polygon); break;\n      default: return null;\n    }\n    return {type: type, coordinates: coordinates};\n  }\n\n  return geometry(o);\n}\n","export default function(topology, arcs) {\n  var stitchedArcs = {},\n      fragmentByStart = {},\n      fragmentByEnd = {},\n      fragments = [],\n      emptyIndex = -1;\n\n  // Stitch empty arcs first, since they may be subsumed by other arcs.\n  arcs.forEach(function(i, j) {\n    var arc = topology.arcs[i < 0 ? ~i : i], t;\n    if (arc.length < 3 && !arc[1][0] && !arc[1][1]) {\n      t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t;\n    }\n  });\n\n  arcs.forEach(function(i) {\n    var e = ends(i),\n        start = e[0],\n        end = e[1],\n        f, g;\n\n    if (f = fragmentByEnd[start]) {\n      delete fragmentByEnd[f.end];\n      f.push(i);\n      f.end = end;\n      if (g = fragmentByStart[end]) {\n        delete fragmentByStart[g.start];\n        var fg = g === f ? f : f.concat(g);\n        fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg;\n      } else {\n        fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n      }\n    } else if (f = fragmentByStart[end]) {\n      delete fragmentByStart[f.start];\n      f.unshift(i);\n      f.start = start;\n      if (g = fragmentByEnd[start]) {\n        delete fragmentByEnd[g.end];\n        var gf = g === f ? f : g.concat(f);\n        fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf;\n      } else {\n        fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n      }\n    } else {\n      f = [i];\n      fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f;\n    }\n  });\n\n  function ends(i) {\n    var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1;\n    if (topology.transform) p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; });\n    else p1 = arc[arc.length - 1];\n    return i < 0 ? [p1, p0] : [p0, p1];\n  }\n\n  function flush(fragmentByEnd, fragmentByStart) {\n    for (var k in fragmentByEnd) {\n      var f = fragmentByEnd[k];\n      delete fragmentByStart[f.start];\n      delete f.start;\n      delete f.end;\n      f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; });\n      fragments.push(f);\n    }\n  }\n\n  flush(fragmentByEnd, fragmentByStart);\n  flush(fragmentByStart, fragmentByEnd);\n  arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) fragments.push([i]); });\n\n  return fragments;\n}\n","import {object} from \"./feature.js\";\nimport stitch from \"./stitch.js\";\n\nexport default function(topology) {\n  return object(topology, meshArcs.apply(this, arguments));\n}\n\nexport function meshArcs(topology, object, filter) {\n  var arcs, i, n;\n  if (arguments.length > 1) arcs = extractArcs(topology, object, filter);\n  else for (i = 0, arcs = new Array(n = topology.arcs.length); i < n; ++i) arcs[i] = i;\n  return {type: \"MultiLineString\", arcs: stitch(topology, arcs)};\n}\n\nfunction extractArcs(topology, object, filter) {\n  var arcs = [],\n      geomsByArc = [],\n      geom;\n\n  function extract0(i) {\n    var j = i < 0 ? ~i : i;\n    (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom});\n  }\n\n  function extract1(arcs) {\n    arcs.forEach(extract0);\n  }\n\n  function extract2(arcs) {\n    arcs.forEach(extract1);\n  }\n\n  function extract3(arcs) {\n    arcs.forEach(extract2);\n  }\n\n  function geometry(o) {\n    switch (geom = o, o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(geometry); break;\n      case \"LineString\": extract1(o.arcs); break;\n      case \"MultiLineString\": case \"Polygon\": extract2(o.arcs); break;\n      case \"MultiPolygon\": extract3(o.arcs); break;\n    }\n  }\n\n  geometry(object);\n\n  geomsByArc.forEach(filter == null\n      ? function(geoms) { arcs.push(geoms[0].i); }\n      : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) arcs.push(geoms[0].i); });\n\n  return arcs;\n}\n","import {object} from \"./feature.js\";\nimport stitch from \"./stitch.js\";\n\nfunction planarRingArea(ring) {\n  var i = -1, n = ring.length, a, b = ring[n - 1], area = 0;\n  while (++i < n) a = b, b = ring[i], area += a[0] * b[1] - a[1] * b[0];\n  return Math.abs(area); // Note: doubled area!\n}\n\nexport default function(topology) {\n  return object(topology, mergeArcs.apply(this, arguments));\n}\n\nexport function mergeArcs(topology, objects) {\n  var polygonsByArc = {},\n      polygons = [],\n      groups = [];\n\n  objects.forEach(geometry);\n\n  function geometry(o) {\n    switch (o.type) {\n      case \"GeometryCollection\": o.geometries.forEach(geometry); break;\n      case \"Polygon\": extract(o.arcs); break;\n      case \"MultiPolygon\": o.arcs.forEach(extract); break;\n    }\n  }\n\n  function extract(polygon) {\n    polygon.forEach(function(ring) {\n      ring.forEach(function(arc) {\n        (polygonsByArc[arc = arc < 0 ? ~arc : arc] || (polygonsByArc[arc] = [])).push(polygon);\n      });\n    });\n    polygons.push(polygon);\n  }\n\n  function area(ring) {\n    return planarRingArea(object(topology, {type: \"Polygon\", arcs: [ring]}).coordinates[0]);\n  }\n\n  polygons.forEach(function(polygon) {\n    if (!polygon._) {\n      var group = [],\n          neighbors = [polygon];\n      polygon._ = 1;\n      groups.push(group);\n      while (polygon = neighbors.pop()) {\n        group.push(polygon);\n        polygon.forEach(function(ring) {\n          ring.forEach(function(arc) {\n            polygonsByArc[arc < 0 ? ~arc : arc].forEach(function(polygon) {\n              if (!polygon._) {\n                polygon._ = 1;\n                neighbors.push(polygon);\n              }\n            });\n          });\n        });\n      }\n    }\n  });\n\n  polygons.forEach(function(polygon) {\n    delete polygon._;\n  });\n\n  return {\n    type: \"MultiPolygon\",\n    arcs: groups.map(function(polygons) {\n      var arcs = [], n;\n\n      // Extract the exterior (unique) arcs.\n      polygons.forEach(function(polygon) {\n        polygon.forEach(function(ring) {\n          ring.forEach(function(arc) {\n            if (polygonsByArc[arc < 0 ? ~arc : arc].length < 2) {\n              arcs.push(arc);\n            }\n          });\n        });\n      });\n\n      // Stitch the arcs into one or more rings.\n      arcs = stitch(topology, arcs);\n\n      // If more than one ring is returned,\n      // at most one of these rings can be the exterior;\n      // choose the one with the greatest absolute area.\n      if ((n = arcs.length) > 1) {\n        for (var i = 1, k = area(arcs[0]), ki, t; i < n; ++i) {\n          if ((ki = area(arcs[i])) > k) {\n            t = arcs[0], arcs[0] = arcs[i], arcs[i] = t, k = ki;\n          }\n        }\n      }\n\n      return arcs;\n    }).filter(function(arcs) {\n      return arcs.length > 0;\n    })\n  };\n}\n","export default function(a, x) {\n  var lo = 0, hi = a.length;\n  while (lo < hi) {\n    var mid = lo + hi >>> 1;\n    if (a[mid] < x) lo = mid + 1;\n    else hi = mid;\n  }\n  return lo;\n}\n","import bisect from \"./bisect.js\";\n\nexport default function(objects) {\n  var indexesByArc = {}, // arc index -> array of object indexes\n      neighbors = objects.map(function() { return []; });\n\n  function line(arcs, i) {\n    arcs.forEach(function(a) {\n      if (a < 0) a = ~a;\n      var o = indexesByArc[a];\n      if (o) o.push(i);\n      else indexesByArc[a] = [i];\n    });\n  }\n\n  function polygon(arcs, i) {\n    arcs.forEach(function(arc) { line(arc, i); });\n  }\n\n  function geometry(o, i) {\n    if (o.type === \"GeometryCollection\") o.geometries.forEach(function(o) { geometry(o, i); });\n    else if (o.type in geometryType) geometryType[o.type](o.arcs, i);\n  }\n\n  var geometryType = {\n    LineString: line,\n    MultiLineString: polygon,\n    Polygon: polygon,\n    MultiPolygon: function(arcs, i) { arcs.forEach(function(arc) { polygon(arc, i); }); }\n  };\n\n  objects.forEach(geometry);\n\n  for (var i in indexesByArc) {\n    for (var indexes = indexesByArc[i], m = indexes.length, j = 0; j < m; ++j) {\n      for (var k = j + 1; k < m; ++k) {\n        var ij = indexes[j], ik = indexes[k], n;\n        if ((n = neighbors[ij])[i = bisect(n, ik)] !== ik) n.splice(i, 0, ik);\n        if ((n = neighbors[ik])[i = bisect(n, ij)] !== ij) n.splice(i, 0, ij);\n      }\n    }\n  }\n\n  return neighbors;\n}\n","import identity from \"./identity.js\";\n\nexport default function(transform) {\n  if (transform == null) return identity;\n  var x0,\n      y0,\n      kx = transform.scale[0],\n      ky = transform.scale[1],\n      dx = transform.translate[0],\n      dy = transform.translate[1];\n  return function(input, i) {\n    if (!i) x0 = y0 = 0;\n    var j = 2,\n        n = input.length,\n        output = new Array(n),\n        x1 = Math.round((input[0] - dx) / kx),\n        y1 = Math.round((input[1] - dy) / ky);\n    output[0] = x1 - x0, x0 = x1;\n    output[1] = y1 - y0, y0 = y1;\n    while (j < n) output[j] = input[j], ++j;\n    return output;\n  };\n}\n","import bbox from \"./bbox.js\";\nimport untransform from \"./untransform.js\";\n\nexport default function(topology, transform) {\n  if (topology.transform) throw new Error(\"already quantized\");\n\n  if (!transform || !transform.scale) {\n    if (!((n = Math.floor(transform)) >= 2)) throw new Error(\"n must be ≥2\");\n    box = topology.bbox || bbox(topology);\n    var x0 = box[0], y0 = box[1], x1 = box[2], y1 = box[3], n;\n    transform = {scale: [x1 - x0 ? (x1 - x0) / (n - 1) : 1, y1 - y0 ? (y1 - y0) / (n - 1) : 1], translate: [x0, y0]};\n  } else {\n    box = topology.bbox;\n  }\n\n  var t = untransform(transform), box, key, inputs = topology.objects, outputs = {};\n\n  function quantizePoint(point) {\n    return t(point);\n  }\n\n  function quantizeGeometry(input) {\n    var output;\n    switch (input.type) {\n      case \"GeometryCollection\": output = {type: \"GeometryCollection\", geometries: input.geometries.map(quantizeGeometry)}; break;\n      case \"Point\": output = {type: \"Point\", coordinates: quantizePoint(input.coordinates)}; break;\n      case \"MultiPoint\": output = {type: \"MultiPoint\", coordinates: input.coordinates.map(quantizePoint)}; break;\n      default: return input;\n    }\n    if (input.id != null) output.id = input.id;\n    if (input.bbox != null) output.bbox = input.bbox;\n    if (input.properties != null) output.properties = input.properties;\n    return output;\n  }\n\n  function quantizeArc(input) {\n    var i = 0, j = 1, n = input.length, p, output = new Array(n); // pessimistic\n    output[0] = t(input[0], 0);\n    while (++i < n) if ((p = t(input[i], i))[0] || p[1]) output[j++] = p; // non-coincident points\n    if (j === 1) output[j++] = [0, 0]; // an arc must have at least two points\n    output.length = j;\n    return output;\n  }\n\n  for (key in inputs) outputs[key] = quantizeGeometry(inputs[key]);\n\n  return {\n    type: \"Topology\",\n    bbox: box,\n    transform: transform,\n    objects: outputs,\n    arcs: topology.arcs.map(quantizeArc)\n  };\n}\n","export {default as bbox} from \"./bbox.js\";\nexport {default as feature} from \"./feature.js\";\nexport {default as mesh, meshArcs} from \"./mesh.js\";\nexport {default as merge, mergeArcs} from \"./merge.js\";\nexport {default as neighbors} from \"./neighbors.js\";\nexport {default as quantize} from \"./quantize.js\";\nexport {default as transform} from \"./transform.js\";\nexport {default as untransform} from \"./untransform.js\";\n","{\"type\":\"Topology\",\"bbox\":[-57.66491068874468,12.97635452036684,957.5235629133763,606.5694262668667],\"transform\":{\"scale\":[0.010151986255883769,0.005935990077365771],\"translate\":[-57.66491068874468,12.97635452036684]},\"objects\":{\"states\":{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"MultiPolygon\",\"arcs\":[[[0]],[[1,2,3,4,5]]],\"id\":\"01\",\"properties\":{\"name\":\"Alabama\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]]],\"id\":\"02\",\"properties\":{\"name\":\"Alaska\"}},{\"type\":\"Polygon\",\"arcs\":[[62,63,64,65,66]],\"id\":\"04\",\"properties\":{\"name\":\"Arizona\"}},{\"type\":\"Polygon\",\"arcs\":[[67,68,69,70,71,72]],\"id\":\"08\",\"properties\":{\"name\":\"Colorado\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82,83,-4]]],\"id\":\"12\",\"properties\":{\"name\":\"Florida\"}},{\"type\":\"Polygon\",\"arcs\":[[84,85,86,87,-83,-3]],\"id\":\"13\",\"properties\":{\"name\":\"Georgia\"}},{\"type\":\"Polygon\",\"arcs\":[[88,89,90,91,92]],\"id\":\"18\",\"properties\":{\"name\":\"Indiana\"}},{\"type\":\"Polygon\",\"arcs\":[[93,94,95,-70]],\"id\":\"20\",\"properties\":{\"name\":\"Kansas\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[103,104]]],\"id\":\"23\",\"properties\":{\"name\":\"Maine\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[105]],[[106]],[[107,108,109,110,111,112,113,114]]],\"id\":\"25\",\"properties\":{\"name\":\"Massachusetts\"}},{\"type\":\"Polygon\",\"arcs\":[[115,116,117,118,119]],\"id\":\"27\",\"properties\":{\"name\":\"Minnesota\"}},{\"type\":\"Polygon\",\"arcs\":[[120,121,122,123,124,125,126,127]],\"id\":\"34\",\"properties\":{\"name\":\"New Jersey\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[128]],[[129]],[[130,131,132,-86,133]]],\"id\":\"37\",\"properties\":{\"name\":\"North Carolina\"}},{\"type\":\"Polygon\",\"arcs\":[[134,-120,135,136]],\"id\":\"38\",\"properties\":{\"name\":\"North Dakota\"}},{\"type\":\"Polygon\",\"arcs\":[[-71,-96,137,138,139,140]],\"id\":\"40\",\"properties\":{\"name\":\"Oklahoma\"}},{\"type\":\"Polygon\",\"arcs\":[[141,142,-123,143,144,145,146]],\"id\":\"42\",\"properties\":{\"name\":\"Pennsylvania\"}},{\"type\":\"Polygon\",\"arcs\":[[147,-136,-119,148,149,150]],\"id\":\"46\",\"properties\":{\"name\":\"South Dakota\"}},{\"type\":\"Polygon\",\"arcs\":[[-140,151,152,153,154]],\"id\":\"48\",\"properties\":{\"name\":\"Texas\"}},{\"type\":\"Polygon\",\"arcs\":[[-151,155,-68,156,157,158]],\"id\":\"56\",\"properties\":{\"name\":\"Wyoming\"}},{\"type\":\"Polygon\",\"arcs\":[[-114,159,160,161]],\"id\":\"09\",\"properties\":{\"name\":\"Connecticut\"}},{\"type\":\"Polygon\",\"arcs\":[[162,163,164,165,166,167,168,-138,-95,169]],\"id\":\"29\",\"properties\":{\"name\":\"Missouri\"}},{\"type\":\"Polygon\",\"arcs\":[[170,-146,171,172,173]],\"id\":\"54\",\"properties\":{\"name\":\"West Virginia\"}},{\"type\":\"Polygon\",\"arcs\":[[174,175,176,-93,177,-164]],\"id\":\"17\",\"properties\":{\"name\":\"Illinois\"}},{\"type\":\"Polygon\",\"arcs\":[[-72,-141,-155,178,-66]],\"id\":\"35\",\"properties\":{\"name\":\"New Mexico\"}},{\"type\":\"Polygon\",\"arcs\":[[-169,179,180,181,-152,-139]],\"id\":\"05\",\"properties\":{\"name\":\"Arkansas\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[182]],[[183]],[[184]],[[185]],[[186]],[[187]],[[188]],[[189,190,-63,191]]],\"id\":\"06\",\"properties\":{\"name\":\"California\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[-128,192]],[[-144,-122,193,194]]],\"id\":\"10\",\"properties\":{\"name\":\"Delaware\"}},{\"type\":\"Polygon\",\"arcs\":[[195,196]],\"id\":\"11\",\"properties\":{\"name\":\"District of Columbia\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[197]],[[198]],[[199]],[[200]],[[201]],[[202]],[[203]],[[204]]],\"id\":\"15\",\"properties\":{\"name\":\"Hawaii\"}},{\"type\":\"Polygon\",\"arcs\":[[-118,205,-175,-163,206,-149]],\"id\":\"19\",\"properties\":{\"name\":\"Iowa\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[-178,-92,207,-174,208,209,-165]],[[210,-167]]],\"id\":\"21\",\"properties\":{\"name\":\"Kentucky\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[211,212]],[[213]],[[-145,-195,214,215,216,217,-196,218,-172]]],\"id\":\"24\",\"properties\":{\"name\":\"Maryland\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[219]],[[220]],[[221]],[[222]],[[223]],[[224]],[[225]],[[226]],[[227,228,-90]],[[229]],[[230,231]]],\"id\":\"26\",\"properties\":{\"name\":\"Michigan\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[232]],[[233]],[[234]],[[235]],[[-181,236,-6,237,238]]],\"id\":\"28\",\"properties\":{\"name\":\"Mississippi\"}},{\"type\":\"Polygon\",\"arcs\":[[239,-137,-148,-159,240]],\"id\":\"30\",\"properties\":{\"name\":\"Montana\"}},{\"type\":\"Polygon\",\"arcs\":[[241,-104,242,-109,243]],\"id\":\"33\",\"properties\":{\"name\":\"New Hampshire\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[244]],[[245]],[[246,-126]],[[247]],[[248]],[[249,250,-115,-162,251,-124,-143]]],\"id\":\"36\",\"properties\":{\"name\":\"New York\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[252]],[[253]],[[-229,254,-147,-171,-208,-91]]],\"id\":\"39\",\"properties\":{\"name\":\"Ohio\"}},{\"type\":\"Polygon\",\"arcs\":[[255,256,257,-190,258]],\"id\":\"41\",\"properties\":{\"name\":\"Oregon\"}},{\"type\":\"Polygon\",\"arcs\":[[-168,-211,-166,-210,259,-134,-85,-2,-237,-180]],\"id\":\"47\",\"properties\":{\"name\":\"Tennessee\"}},{\"type\":\"Polygon\",\"arcs\":[[260,-157,-73,-65,261]],\"id\":\"49\",\"properties\":{\"name\":\"Utah\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[-216,262]],[[263,-212]],[[-173,-219,-197,-218,264,-131,-260,-209]]],\"id\":\"51\",\"properties\":{\"name\":\"Virginia\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[273]],[[274]],[[275,-256,276]]],\"id\":\"53\",\"properties\":{\"name\":\"Washington\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[277]],[[278]],[[279]],[[280]],[[281]],[[282]],[[283]],[[284]],[[285]],[[286]],[[287,-232,288,-176,-206,-117]]],\"id\":\"55\",\"properties\":{\"name\":\"Wisconsin\"}},{\"type\":\"Polygon\",\"arcs\":[[-150,-207,-170,-94,-69,-156]],\"id\":\"31\",\"properties\":{\"name\":\"Nebraska\"}},{\"type\":\"Polygon\",\"arcs\":[[-133,289,-87]],\"id\":\"45\",\"properties\":{\"name\":\"South Carolina\"}},{\"type\":\"Polygon\",\"arcs\":[[-276,290,-241,-158,-261,291,-257]],\"id\":\"16\",\"properties\":{\"name\":\"Idaho\"}},{\"type\":\"Polygon\",\"arcs\":[[-258,-292,-262,-64,-191]],\"id\":\"32\",\"properties\":{\"name\":\"Nevada\"}},{\"type\":\"Polygon\",\"arcs\":[[292,-244,-108,-251]],\"id\":\"50\",\"properties\":{\"name\":\"Vermont\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[293]],[[294]],[[295]],[[296]],[[297]],[[298]],[[299]],[[-182,-239,300,-153]]],\"id\":\"22\",\"properties\":{\"name\":\"Louisiana\"}},{\"type\":\"MultiPolygon\",\"arcs\":[[[-111,301]],[[302]],[[303]],[[-160,-113,304]]],\"id\":\"44\",\"properties\":{\"name\":\"Rhode Island\"}}]},\"nation\":{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"MultiPolygon\",\"arcs\":[[[0]],[[83,4,237,300,153,178,66,191,258,276,290,239,134,115,287,230,288,176,88,227,254,141,249,292,241,104,242,109,301,111,304,160,251,124,246,126,192,120,193,214,262,216,264,131,289,87]],[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[105]],[[106]],[[128]],[[129]],[[182]],[[183]],[[184]],[[185]],[[186]],[[187]],[[188]],[[197]],[[198]],[[199]],[[200]],[[201]],[[202]],[[203]],[[204]],[[212,263]],[[213]],[[219]],[[220]],[[221]],[[222]],[[223]],[[224]],[[225]],[[226]],[[229]],[[232]],[[233]],[[234]],[[235]],[[244]],[[245]],[[247]],[[248]],[[252]],[[253]],[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[273]],[[274]],[[277]],[[278]],[[279]],[[280]],[[281]],[[282]],[[283]],[[284]],[[285]],[[286]],[[293]],[[294]],[[295]],[[296]],[[297]],[[298]],[[299]],[[302]],[[303]]]}]}},\"arcs\":[[[69506,80772],[380,-157],[7,-84],[101,130],[-57,89],[-74,-43],[-256,100],[-101,-35]],[[68880,62501],[-7,-46],[1414,-189],[1042,-124],[1847,-308],[396,-61]],[[73572,61773],[70,469],[326,1939],[906,5571],[62,59],[-19,125],[95,129],[64,485],[82,222],[132,204],[41,265],[67,105],[-46,398],[134,66],[87,117],[-60,183],[-141,178],[-78,187],[35,181],[6,285],[-28,289],[-92,408],[70,398],[-3,146],[146,260],[52,384],[-38,200],[20,139],[-32,271],[22,258],[-42,80],[37,340],[156,271],[91,397]],[[75694,76782],[-1690,351],[-1190,211],[-1182,171],[-870,144],[24,123],[-67,390],[174,280],[45,157],[254,224],[34,165],[-79,476],[74,193],[89,89],[-101,97],[-35,248],[-81,121],[59,51],[-94,99]],[[71058,80372],[-260,157],[-344,138],[-239,26],[45,-129],[86,72],[239,-124],[16,-113],[-189,-303],[-123,-105],[-67,-290],[44,-199],[-29,-297],[-54,-152],[-142,-85],[-95,167],[22,122],[-71,405],[12,507],[-45,224],[-105,29],[0,-120],[-145,-111],[-105,62],[-33,-66],[-117,89]],[[69359,80276],[-134,-1892],[-235,-3167],[-52,-748],[28,-1877],[54,-5177],[39,-2880],[26,-1662],[-109,-102],[-96,-270]],[[15941,90739],[47,-223],[44,31],[-91,192]],[[15442,93819],[42,-103],[61,69],[-2,-172],[161,-206],[65,-149],[-24,-118],[125,-104],[-52,383],[56,-94],[91,167],[61,-77],[-34,266],[-96,-86],[21,114],[-138,-53],[-22,160],[-134,106],[-181,-103]],[[15046,95861],[118,-96],[59,144],[-121,21],[-56,-69]],[[14874,94754],[65,-192],[169,-201],[102,16],[39,195],[12,-197],[-32,-217],[89,-105],[62,78],[103,-23],[-54,-154],[151,129],[-76,-123],[164,31],[-6,121],[73,-20],[100,-147],[76,287],[-61,-38],[-7,239],[131,-34],[-74,268],[-171,-105],[62,163],[-90,160],[-146,117],[126,37],[-146,104],[-35,115],[-45,-119],[22,-151],[-141,441],[-92,126],[-105,34],[128,-263],[-55,-17],[72,-272],[-209,417],[-96,-196],[-2,-257],[-109,-143],[6,-104]],[[14854,96003],[119,-221],[61,63],[-150,199],[-30,-41]],[[14435,96805],[71,-113],[-3,201],[-68,-88]],[[12752,97824],[9,-151],[50,124],[-59,27]],[[12678,97489],[67,-76],[-9,284],[-62,-20],[4,-188]],[[12397,97795],[79,-153],[-37,-93],[62,-101],[107,47],[-29,107],[-182,193]],[[12157,97232],[72,-101],[166,95],[-15,134],[-78,-137],[-13,286],[-67,-120],[-52,93],[-13,-250]],[[12330,92853],[20,-148],[159,-124],[-98,298],[-81,-26]],[[11676,97411],[39,-75],[105,122],[-77,52],[-67,-99]],[[11421,97611],[92,-25],[-51,170],[-41,-145]],[[12196,86075],[110,-33],[3,101],[-113,-68]],[[11193,98205],[7,-58],[201,186],[-53,52],[-155,-180]],[[10074,98386],[132,-10],[-14,76],[-118,-66]],[[9884,98128],[28,-56],[93,143],[-78,113],[-43,-200]],[[9682,98209],[113,-63],[74,186],[-177,16],[-10,-139]],[[10033,90043],[198,78],[97,-139],[133,6],[96,-81],[10,159],[78,-4],[46,160],[9,450],[-177,9],[-80,127],[-69,-160],[-79,-22],[-242,-381],[-20,-202]],[[8760,99025],[201,-102],[44,40],[207,-329],[81,99],[18,-87],[-104,-66],[-43,-110],[68,-138],[186,-32],[-15,119],[68,60],[68,-133],[63,124],[-181,237],[211,-121],[-7,104],[-91,97],[-133,39],[-116,210],[-179,-40],[-91,90],[-160,62],[-95,-123]],[[10675,82812],[212,-149],[259,-225],[359,-268],[208,-116],[258,-84],[179,32],[3,186],[-78,336],[32,183],[188,49],[135,-11],[107,107],[84,-50],[90,95],[111,-270],[174,40],[-34,-143],[-119,-104],[-125,45],[27,-218],[-102,-299],[-65,-31],[-31,-168],[101,-102],[79,236],[-30,174],[135,305],[80,-38],[-150,-350],[42,-213],[90,-120],[-80,-103],[-217,52],[-362,-286],[11,-172],[-42,-387],[-325,-737],[-149,-171],[-58,-196],[-145,-222],[101,-35],[57,-159],[54,-421],[247,104],[311,-10],[225,-224],[99,-195],[58,-394],[60,-252],[230,-468],[124,-140],[155,74],[134,-81],[172,-212],[165,-284],[130,-88],[129,133],[238,-92],[95,-123],[169,-392],[73,-5],[239,172],[18,100],[-124,170],[9,164],[76,21],[36,-151],[89,-111],[39,-154],[107,159],[10,262],[103,77],[76,-154],[171,-50],[267,120],[-63,180],[15,104],[188,61],[-39,166],[196,58],[50,-112],[143,-13],[16,65],[234,-168],[186,129],[46,-33],[77,145],[36,-63],[150,172],[144,34],[71,-53],[278,-28],[134,149],[130,66],[89,-35],[179,-246],[166,-87],[551,444],[124,25],[1418,12234],[190,47],[10,-122],[203,99],[84,-245],[227,-110],[4,366],[81,102],[140,60],[56,170],[488,525],[126,408],[191,-431],[94,-51],[20,-175],[-40,-232],[66,-31],[-47,-166],[141,-156],[148,-261],[221,220],[16,190],[72,162],[106,-8],[172,209],[90,202],[189,83],[249,287],[-21,71],[168,240],[75,170],[120,154],[207,362],[194,296],[-17,181],[140,-19],[14,241],[121,28],[67,249],[100,-76],[255,139],[134,-28],[163,80],[44,114],[138,-54],[87,232],[-10,219],[60,227],[143,342],[-50,542],[-96,348],[-67,-105],[-46,75],[-181,-461],[66,-185],[-64,-302],[-87,-260],[-74,-60],[126,281],[34,394],[-31,143],[-124,16],[-143,-77],[-105,-175],[23,-170],[-52,-334],[-1,316],[-43,99],[27,150],[-112,-62],[-45,-134],[24,-199],[-48,-275],[15,-216],[-61,230],[44,113],[-91,164],[-86,-215],[-101,-7],[-30,-132],[44,-187],[80,-60],[-58,-170],[83,-8],[-191,-138],[-25,-161],[-107,-53],[-138,-197],[-246,-69],[-17,-242],[-74,-272],[-79,-23],[-12,-118],[219,58],[-197,-160],[-63,12],[-197,-273],[-56,-280],[-14,125],[-202,37],[-118,-282],[-218,-386],[-127,-421],[-122,-123],[-27,93],[136,181],[38,204],[156,360],[128,533],[-132,-48],[-62,-149],[-84,1],[-99,114],[-52,-307],[-111,-222],[-48,110],[-114,-66],[-46,-158],[-33,119],[-95,-53],[-7,89],[133,14],[132,153],[58,1],[130,346],[-120,172],[-65,3],[-42,154],[-132,-181],[-66,30],[-218,-176],[-178,-190],[-18,-114],[-174,-184],[-149,-44],[-131,-111],[-217,-96],[-195,-143],[33,-152],[61,18],[-66,-341],[9,-235],[-56,319],[-180,249],[-233,14],[-225,-109],[45,-181],[-124,91],[-378,-50],[-106,16],[-520,275],[-130,306],[42,-206],[75,-155],[63,-18],[-114,-134],[-235,-23],[60,-74],[-91,-38],[36,-191],[-147,213],[-200,-177],[-79,43],[77,-189],[-140,182],[18,139],[-225,153],[14,-275],[61,16],[238,-222],[-52,-153],[-98,142],[43,-170],[-167,120],[-82,-68],[187,-179],[-137,77],[-85,-183],[36,-225],[-119,271],[-49,-239],[-30,256],[-69,86],[-49,-100],[-80,202],[-155,53],[54,-382],[-81,19],[-55,417],[100,20],[-67,366],[85,-174],[66,194],[-57,288],[133,221],[-78,173],[-83,21],[-49,-271],[-26,268],[-72,47],[-193,-61],[-106,186],[31,-165],[-51,-198],[-4,275],[-110,-27],[14,416],[-118,-191],[43,157],[-154,355],[-34,20],[-54,-246],[-11,222],[-55,6],[-96,278],[-121,28],[-42,-91],[-70,163],[-63,8],[-94,-123],[32,-226],[144,-94],[201,-416],[-51,12],[-148,203],[-148,-173],[58,-357],[110,-270],[43,-434],[-59,-226],[143,-114],[236,-345],[75,178],[75,43],[82,-148],[254,89],[-245,-157],[-133,-173],[129,-322],[98,-94],[-71,-54],[-93,156],[-33,201],[-181,9],[-69,-64],[-137,170],[-49,181],[-117,56],[-117,218],[40,161],[-55,1],[-171,314],[31,150],[-189,301],[66,136],[-91,263],[-158,25],[83,47],[-18,182],[-278,203],[13,145],[-154,94],[-17,467],[38,-73],[125,26],[142,115],[46,137],[-46,163],[-111,177],[-89,7],[-65,157],[24,152],[-87,322],[-105,104],[-104,2],[-167,132],[7,119],[-95,44],[7,143],[-126,-77],[-56,304],[-130,-26],[7,168],[-79,-51],[-148,237],[92,-55],[-4,206],[-99,261],[-140,18],[-143,251],[-72,-133],[-137,326],[-23,-91],[-80,128],[12,136],[-101,-74],[-95,40],[-76,182],[155,167],[-162,174],[-21,142],[-59,-166],[-5,187],[-85,-70],[-28,88],[-262,72],[-27,251],[-96,114],[72,-316],[-108,-54],[-96,146],[-155,135],[-73,160],[-141,-94],[-175,196],[-122,-30],[86,-328],[-111,-5],[-67,296],[-97,212],[-62,-41],[27,166],[-91,-84],[-45,172],[-96,-64],[2,-270],[-45,-80],[-49,103],[52,124],[-12,221],[-127,31],[-84,-269],[-73,76],[74,152],[-166,152],[82,55],[43,164],[-116,-146],[-125,154],[-223,-68],[-121,89],[-18,84],[-138,62],[-89,-60],[-27,-222],[119,-83],[89,-232],[319,-170],[161,27],[77,247],[29,-326],[197,-30],[156,-328],[167,-282],[214,-226],[286,-107],[156,5],[-66,263],[52,123],[18,-196],[128,51],[88,147],[29,-84],[-149,-228],[110,-343],[266,-358],[125,-86],[260,-267],[118,87],[8,-256],[135,-318],[136,-147],[168,-260],[74,-747],[79,-59],[-57,-145],[48,-302],[170,-263],[22,-219],[-42,8],[-424,300],[-153,-250],[32,-281],[-120,168],[-47,221],[52,293],[-84,115],[-66,-54],[-111,-471],[-127,-245],[-81,191],[-51,-152],[-103,-107],[11,-156],[-186,185],[-249,181],[-20,100],[-164,122],[-65,-154],[79,-145],[12,-260],[-80,-424],[52,-138],[108,-127],[-113,-637],[-84,-319],[-48,23],[-19,190],[-80,-6],[-160,138],[-230,33],[-171,-99],[-7,-258],[-68,-89],[-93,-324],[-95,-85],[-51,-143],[78,-106],[-157,-17],[179,-244],[5,-205],[-59,-151],[79,-31],[-86,-254],[-43,121],[-68,-32],[0,-240],[-86,-117],[-3,-116],[72,-86],[-50,-94],[-93,29],[21,-165],[125,-7],[-79,-221],[165,10],[-22,-218],[51,-173],[369,-634],[-1,-135],[124,-392],[88,-131],[104,-36],[136,97],[126,269],[99,-9],[149,-193],[162,-313],[81,71],[153,31],[160,-46],[150,-336],[-38,-433],[4,-196],[-83,-234],[-79,-48],[48,-139],[123,64],[80,-131],[14,-141],[-118,-296],[-74,185],[-95,-39],[-176,110],[-138,172],[-105,254],[-4,-237],[-91,-210],[-51,57],[83,169],[-76,-7],[-105,-152],[-275,-47],[-212,91],[-384,-319],[-59,-223],[43,-158],[-74,-195],[-40,-223],[76,60],[118,-183],[-56,-103],[-284,-198],[-165,-283],[-4,-109]],[[8131,99405],[170,-218],[19,-146],[90,-89],[116,59],[-30,-111],[66,-167],[169,-61],[90,94],[-45,168],[-220,115],[-117,211],[-337,186],[29,-41]],[[8483,94388],[117,58],[-45,83],[-72,-141]],[[7690,99248],[115,-18],[13,144],[-120,-45],[-8,-81]],[[8324,93559],[119,-32],[-70,110],[-49,-78]],[[7260,99402],[111,-86],[-4,130],[-97,42],[-10,-86]],[[9073,85044],[82,-289],[23,154],[214,247],[170,-101],[111,166],[-7,167],[156,236],[273,203],[-86,173],[-177,-76],[-129,242],[-40,-211],[-144,-347],[-144,-241],[-78,-48],[-147,95],[-80,-120],[3,-250]],[[6374,99403],[99,-80],[51,59],[-60,96],[-90,-75]],[[7988,88764],[78,-103],[-11,129],[204,374],[-177,-152],[-94,-248]],[[5678,99277],[107,94],[93,-16],[110,136],[185,96],[-217,-19],[-244,-168],[-34,-123]],[[5065,99087],[161,47],[356,-23],[-4,-141],[103,-89],[69,166],[-126,114],[38,114],[-177,44],[-154,-54],[-266,-178]],[[4678,98790],[94,108],[-57,122],[-56,-57],[19,-173]],[[4597,99098],[134,-43],[-3,92],[-110,44],[-21,-93]],[[4199,99135],[142,-179],[46,-182],[107,30],[-49,180],[139,41],[-33,164],[-83,-57],[-186,76],[-83,-73]],[[3893,98832],[254,11],[35,-137],[64,76],[-80,190],[-77,21],[-45,-103],[-151,-58]],[[3705,98464],[133,37],[37,197],[-113,200],[-52,-176],[69,19],[-74,-277]],[[2703,97629],[93,9],[33,99],[-101,71],[-25,-179]],[[2214,97770],[118,120],[86,361],[-87,-256],[-117,-225]],[[1666,96970],[161,-15],[70,-133],[31,91],[-238,180],[-24,-123]],[[183,94948],[150,-16],[-12,216],[-138,-200]],[[3,93989],[97,-21],[195,194],[72,315],[-72,-107],[-48,47],[-122,-62],[-49,-294],[-73,-72]],[[25124,95090],[81,-118],[51,81],[-51,118],[-81,-81]],[[25034,95023],[14,-161],[-46,-173],[92,49],[55,249],[-115,36]],[[24855,94663],[14,-76],[95,94],[3,250],[-112,-268]],[[24158,93842],[17,-68],[85,176],[-102,-108]],[[24110,93691],[33,-161],[142,12],[12,158],[-80,94],[-107,-103]],[[24024,95001],[0,-142],[132,-88],[66,85],[-25,152],[-95,166],[-7,-170],[-71,-3]],[[23894,94360],[61,-318],[-63,-29],[7,-201],[181,-50],[182,317],[134,63],[103,138],[166,313],[-134,-41],[-16,137],[77,-81],[139,130],[20,194],[78,-104],[28,94],[-17,286],[53,-91],[72,293],[-8,132],[-123,47],[-102,-29],[52,-130],[-141,-80],[-37,-261],[-58,78],[28,178],[-83,-21],[-48,-206],[-88,-9],[184,397],[57,-93],[90,178],[-71,-22],[68,159],[-88,20],[-187,-257],[-92,-329],[-95,67],[-24,-129],[137,-203],[-117,-158],[-235,-176],[49,-97],[-18,-246],[-64,209],[-57,-69]],[[23676,94551],[100,-32],[-46,118],[-54,-86]],[[23442,93359],[39,-143],[94,-32],[70,128],[-28,-204],[-68,-59],[50,-123],[246,1],[93,-56],[130,212],[202,195],[-91,178],[-141,25],[-6,124],[-99,-11],[-90,114],[-45,-119],[6,641],[-54,147],[-77,-120],[-68,-291],[-1,-247],[-56,-4],[-106,-356]],[[22874,91471],[120,122],[34,132],[50,-65],[159,-33],[16,107],[173,287],[60,227],[-112,-215],[-88,-62],[55,162],[118,142],[86,314],[-178,553],[-43,18],[-62,-238],[37,-251],[-86,-125],[-96,-243],[-14,-143],[-169,-454],[-60,-235]],[[22808,92958],[68,-314],[174,116],[89,-32],[39,206],[202,624],[104,595],[8,134],[-73,-59],[-251,-492],[-203,-158],[60,-14],[-4,-233],[-73,-67],[18,-224],[-72,57],[-86,-139]],[[22770,93146],[15,-154],[118,129],[4,281],[-86,61],[14,-185],[-65,-132]],[[22337,92395],[-24,-198],[61,-128],[-39,-153],[85,100],[98,-88],[58,-146],[164,133],[210,16],[45,154],[-74,88],[86,54],[122,380],[-103,94],[-235,-169],[43,242],[-34,181],[-81,-17],[-131,-193],[-45,15],[-102,-276],[-104,-89]],[[17580,91326],[38,-191],[142,-287],[94,-372],[66,151],[-184,481],[47,59],[-203,159]],[[17539,90713],[44,-321],[78,-154],[-4,287],[-41,296],[-77,-108]],[[19970,66387],[65,-52],[134,60],[171,-33],[6,-131],[139,-165],[38,-233],[-51,-496],[-150,-33],[-122,-91],[-42,-247],[80,-216],[53,-417],[-85,-155],[84,-202],[-29,-178],[185,-31],[25,-104],[149,-244],[71,-56],[45,-484],[69,-46],[6,-591],[57,-59],[-30,-272],[220,-292],[71,-289],[185,-59],[135,-93],[206,-263],[58,-158],[-50,-197],[-81,-92],[-160,-384],[-89,-60],[42,-268],[-61,-264],[18,-68],[-40,-416],[-121,-252],[-31,-281],[-69,-170],[59,-487]],[[21130,57818],[83,-258],[-59,-105],[129,-83],[31,-125],[24,-629],[-18,-338],[-54,-333],[96,-444],[-46,-175],[-1,-237],[36,-162],[-7,-200],[47,-176],[63,-57],[-82,-300],[39,-317],[-19,-239],[42,-54],[221,-26],[87,-54],[106,38],[3,84],[238,28],[87,297],[-21,59],[113,209],[153,14],[218,-544],[43,-39],[86,-746],[104,-1007],[147,-1305]],[[23019,50594],[855,279],[1774,548],[1962,566],[1594,421],[51,38],[1476,375],[1017,243]],[[31748,53064],[-508,6249],[-181,2264],[-472,5802],[-144,1799],[-450,5498]],[[29993,74676],[-1790,-441],[-864,-222],[-1155,-307],[-3138,-3103],[-450,-441],[-2897,-2988],[58,-202],[4,-258],[96,-94],[113,-233]],[[32975,37767],[867,205],[1496,317],[1947,389],[392,90],[819,151],[1448,238],[300,36],[1037,155]],[[41281,39348],[927,129],[1118,143],[1295,149],[-144,3845]],[[44477,43614],[-168,4810],[-101,2730],[-57,1687],[-89,2368]],[[44062,55209],[-1157,-141],[-535,-85]],[[42370,54983],[-2357,-301],[-1165,-181],[-211,-43],[-1901,-326],[-1175,-218],[-11,-32],[-1061,-214],[-1347,-285],[-1394,-319]],[[31748,53064],[115,-1438],[55,-594],[196,-2424],[2,-431],[139,-1699],[139,-1549],[425,-5250],[42,-454],[114,-1458]],[[85919,97958],[89,-224],[40,97],[-83,167],[-46,-40]],[[85736,98213],[57,-143],[52,81],[-109,62]],[[85214,98724],[354,-394],[52,85],[-304,347],[-102,-38]],[[83862,99608],[105,-374],[302,-372],[157,-255],[104,-106],[301,142],[41,160],[112,109],[-305,274],[-30,-81],[-193,68],[-12,84],[-321,322],[-255,116],[-6,-87]],[[83457,99810],[252,-176],[-36,182],[-212,75],[-4,-81]],[[83145,99811],[34,-123],[81,-1],[-13,152],[-102,-28]],[[82261,91868],[41,48],[195,645],[193,133],[47,-69],[103,43],[-160,144],[-215,-201],[-193,-580],[-11,-163]],[[81555,99934],[106,-66],[40,63],[-143,68],[-3,-65]],[[76646,81241],[191,-195],[-26,165],[-145,109],[-20,-79]],[[75694,76782],[53,244],[101,173],[20,257],[64,242],[99,133],[2615,-305],[707,-77],[1759,-212],[-32,100],[85,210],[3,234],[97,230],[232,-75],[21,-453],[-6,-326],[-114,-328],[5,-510],[98,7],[29,-197],[105,-2],[60,95],[119,-19],[179,128],[129,-25],[221,56],[93,-74],[91,39]],[[82527,76327],[36,36],[4,375],[44,293],[58,141],[119,776],[251,1112],[123,398],[40,274],[258,818],[312,873],[211,562],[634,1338],[323,573],[142,446],[-104,217],[-4,385],[84,492],[75,297],[158,439],[328,796],[265,849],[122,430],[251,649],[14,109],[183,505],[206,797],[70,853],[3,479],[28,685],[6,680],[71,925],[-7,675],[-39,-205],[-75,-65],[-84,129],[-36,318],[-41,102],[16,171],[-41,146],[7,255],[48,245],[43,40],[-41,187],[-70,102],[28,114],[140,-170],[156,-818],[-17,414],[-179,782],[-37,280],[-360,866],[-154,258],[-26,-33],[298,-616],[41,-183],[17,-377],[-207,-8],[-239,140],[-155,196],[-143,-108],[-124,79],[-39,143],[-355,176],[-139,-134],[-83,-202],[10,-425],[52,-37],[-138,-441],[-94,-133],[0,-111],[-97,-223],[-68,-40],[-63,-264],[-122,24],[-96,-307],[-179,-55],[-342,-270],[-118,201],[-157,-372],[-146,-452],[-131,-756],[-99,-298],[-101,-160],[-224,-187],[-16,-142],[-106,19],[34,134],[-94,61],[-113,-560],[-102,-144],[106,-95],[76,111],[31,-533],[-32,-276],[-67,-30],[6,-268],[-80,35],[-103,170],[97,463],[-196,152],[-21,169],[-25,-241],[-52,-152],[-150,-272],[-235,-527],[-87,-288],[-232,-547],[-286,-491],[-131,-333],[90,137],[96,-120],[107,-306],[162,-617],[80,-89],[58,-296],[-60,-231],[-155,-32],[65,358],[-169,-59],[39,-121],[-76,-326],[-286,-163],[28,207],[-70,108],[115,108],[86,-11],[110,334],[-59,156],[0,266],[-154,83],[40,272],[-52,60],[-38,-351],[-129,-295],[-85,-98],[-64,-231],[4,-515],[-56,-204],[-69,-524],[61,-19],[24,301],[58,281],[60,8],[-19,-271],[-62,-90],[70,-263],[99,-853],[-3,-602],[-58,-205],[-3,-184],[-93,-75],[16,-143],[-91,-337],[63,-229],[-175,-321],[13,-106],[-67,-166],[-72,7],[2,-272],[-47,-34],[-333,3],[-96,205],[-93,-308],[-17,-189],[-163,-54],[-28,-203],[-105,-268],[-153,-32],[-44,-136],[-183,-118],[-27,-363],[-46,-212],[-80,-4],[-172,-141],[-111,-213],[-8,-103],[-121,-259],[-104,-122],[-212,-159],[-291,-175],[-196,-205],[-189,89],[-57,82],[-222,-49],[5,113],[-166,264],[85,309],[-22,109],[-166,-2],[-40,-79],[-156,105],[-236,362],[-43,8],[-358,482],[17,-196],[-76,-25],[-133,289],[-248,46],[102,141],[17,124],[116,48],[391,-385],[168,-312],[20,39],[-143,302],[-490,503],[-364,-278],[-135,2],[-113,116],[-107,-290],[-61,-329],[47,-200],[24,341],[58,291],[55,61],[57,-140],[-9,-275],[-145,-364],[-90,-135],[-164,-57],[-111,-112],[-131,-208],[-193,-120],[-165,-198],[-211,-190],[-247,-167],[-443,-201],[-279,-71],[-519,6],[-225,54],[-318,135],[-444,236],[-213,81],[-54,-22],[-419,231]],[[73572,61773],[398,-68],[802,-177],[1113,-230]],[[75885,61298],[1265,-269],[-2,-21],[918,-243]],[[78066,60765],[-3,232],[-194,300],[-36,220],[-91,144],[-35,245],[45,177],[210,221],[115,2],[175,301],[166,132],[108,-80],[154,75],[78,344],[80,76],[109,259],[57,339],[111,145],[87,228],[96,128],[95,301],[60,-7],[210,259],[148,78],[192,242],[149,465],[128,124],[48,-32],[120,94],[136,266],[148,138],[-32,309],[79,135],[119,37],[8,216],[97,124],[72,-31],[27,212],[122,136],[172,38],[92,135],[165,136],[3,270],[85,143],[-15,76],[115,135],[6,201],[46,137],[-17,171],[79,183],[-38,88],[114,174],[166,36],[191,304],[-15,117],[217,519],[-53,184],[90,189],[27,271],[103,78],[108,-71],[170,185],[79,6]],[[83114,71024],[83,17],[-17,218],[-81,122],[-74,-32],[-23,167],[66,8],[-91,225],[-142,-37],[-3,188],[70,4],[-34,221],[-101,206],[-120,-9],[74,143],[55,-32],[21,276],[-51,276],[-152,40],[-10,94],[119,-52],[49,67],[-139,619],[35,293],[-7,324],[-39,4],[-78,298],[-58,25],[1,455],[-125,185],[134,46],[27,-89],[30,262],[-45,391],[-1,266],[40,114]],[[68755,36530],[95,123],[115,-36],[-31,139],[272,45],[228,-135],[292,-294],[170,-224]],[[69896,36148],[1702,-293],[1620,-318],[17,245]],[[73235,35782],[263,3703],[109,1630],[113,1885],[177,2707]],[[73897,45707],[-117,230],[114,214],[16,126],[-44,233],[145,35],[-49,183],[30,207],[-129,-14],[-151,90],[-309,416],[-138,-143],[-105,-18],[-216,89],[-30,162],[107,534],[-124,327],[-180,146],[-52,446],[-133,249],[-95,-57],[-63,57],[-25,213],[-84,256],[22,287],[-14,226],[-45,97],[-137,85],[-10,127],[-127,-193],[-122,30],[-177,-186],[-13,-271],[-145,-198],[-34,127],[81,24],[-126,210],[-104,-34],[58,116],[-23,145],[-111,49],[3,288],[41,139],[-141,61],[-13,246],[-101,22],[16,-203],[-121,81],[-61,-67],[-93,-279],[-106,24],[-71,171],[-220,189],[-42,413],[-96,81],[-76,-206],[-66,1],[-329,-305],[-124,-2],[-98,150],[-155,-246],[-49,172],[69,169],[-26,211],[-103,33],[-35,-283],[-250,142],[-139,-167],[-49,132],[68,320],[-59,134],[-150,-72]],[[68662,51678],[-138,-393],[145,22],[-95,-83],[81,-233],[-62,-228],[124,-130],[2,-128],[-71,72],[56,-194],[67,-46],[-111,-249],[86,-356],[34,111],[41,-142],[51,102],[67,-349],[44,-37],[71,-304],[-22,-107],[136,-145],[-13,-129],[51,-389],[40,-114],[121,-134],[23,-319],[-109,-297],[47,-375],[-120,-115],[-4,-265],[-112,-174],[-26,-229],[102,-215],[-61,-156],[31,-312],[78,-41],[-96,-1779],[-120,-2504],[-168,-3209],[-77,-1575]],[[44477,43614],[1074,114],[1741,156],[977,74],[1091,66],[1033,52],[1067,44],[1496,43],[1519,20],[1435,-5]],[[55910,44178],[176,351],[108,38],[24,92],[154,30],[41,-133],[143,40],[-22,108],[113,141],[-82,133],[23,117],[73,-54],[-24,179],[-122,-71],[-25,229],[-96,83],[-61,342],[-73,14],[2,139],[97,154],[17,119],[101,98],[84,211],[77,-28],[-36,158],[19,198],[93,121],[40,225],[79,23],[72,131],[84,-58],[44,99],[121,7],[-25,138],[8,1969],[18,2539],[0,689],[25,2987]],[[57180,55736],[-1580,26],[-1748,2],[-1700,-30],[-1265,-39],[-1541,-77],[-1058,-66],[-400,-35],[-1413,-101],[-1205,-95],[-1208,-112]],[[98249,17157],[80,-70],[-28,138],[-52,-68]],[[98072,17379],[-8,-281],[189,209],[-58,185],[-123,-113]],[[97911,16723],[18,-160],[74,213],[-92,-53]],[[97504,17360],[72,-41],[41,118],[-113,-77]],[[97633,18829],[27,-143],[42,237],[-69,-94]],[[97421,17896],[20,-151],[117,-211],[42,177],[116,210],[-35,153],[-96,90],[-81,-41],[-26,-244],[-57,17]],[[97299,17401],[37,-249],[-19,-265],[74,19],[-9,490],[-83,5]],[[95336,23105],[-232,-159],[-36,-337],[-289,-340],[-94,-273],[-24,-533],[-45,-55],[-155,-812],[-357,-2014],[-279,-1518],[-390,-2000]],[[93435,15064],[106,-102],[-19,-103],[161,66],[69,236],[72,26],[25,-300],[-22,-239],[-56,-114],[90,-153],[88,109],[121,-29],[-57,-208],[-129,-118],[-23,-98],[62,-393],[103,-289],[215,-367],[-86,-199],[78,-262],[102,-201],[-3,-209],[-127,-19],[30,-139],[-64,-64],[37,-148],[-54,-24],[60,-356],[-109,-124],[22,-308],[44,-151],[-22,-115],[72,-143],[47,-222],[55,-55],[-79,-1065],[670,-3350],[232,26],[52,-40],[67,478],[52,185],[245,141],[229,-362],[85,-25],[85,-134],[4,-114],[84,-76],[211,-78],[-38,-198],[51,-92],[287,-11],[45,94],[334,223],[169,285],[151,59],[307,1702],[219,1163],[221,1226],[62,68],[-57,166],[111,182],[-56,110],[80,460],[134,-9],[3,-69],[140,190],[236,-19],[64,-97],[116,336],[-121,120],[87,211],[87,84],[27,197],[-44,253],[112,164],[97,217],[120,74],[49,-111],[-16,-155],[117,33],[100,-43],[163,283],[162,408],[103,76],[71,368],[-202,774],[-115,150],[-106,-280],[-129,172],[96,148],[-39,172],[-65,-11],[-41,220],[-129,50],[30,103],[112,77],[-86,245],[-98,-108],[-66,-161],[-106,210],[-70,-167],[-5,217],[-40,69],[-4,256],[-96,7],[-82,216],[-46,-67],[-14,323],[-100,-58],[-28,-136],[-110,98],[50,203],[-46,269],[74,74],[-182,149],[-145,-34],[-144,-295],[16,-110],[104,-144],[-56,-122],[-37,147],[-46,-141],[-180,271],[57,128],[-9,155],[109,174],[10,148],[-84,309],[5,141],[91,145],[10,231],[-79,75],[-65,-257],[-15,-196],[-117,-94],[-59,-192],[57,-203],[-130,-74],[-39,-101],[-89,115],[-52,-360],[34,-170],[-68,-183],[-68,327],[-81,-73],[-98,173],[121,218],[10,161],[-57,107],[-17,252],[17,239],[-32,42],[33,302],[92,-20],[-59,124],[76,128],[-21,170],[-153,63],[-30,263],[-83,44],[18,189],[-55,59],[-9,-300],[-56,-24],[-65,179],[-7,-219],[-90,74],[29,165],[-67,161],[-4,172],[-90,-131],[12,155],[-63,141],[-84,-49],[22,217],[-89,-140],[-38,342],[-132,220],[-66,-251],[-92,26],[-72,313],[-76,-2],[-48,213],[-92,7],[-55,218],[55,246],[-32,123],[-84,-58],[-118,189],[-17,141],[70,194],[-72,232],[34,96],[-171,178],[-39,367],[44,88],[-21,358],[-41,275],[-42,61]],[[97059,29277],[86,40],[166,-94],[91,-102],[34,-256],[148,288],[-63,194],[-169,63],[-249,-65],[-44,-68]],[[96137,29538],[104,-48],[63,-339],[126,-264],[72,19],[57,186],[119,62],[34,-154],[43,270],[-412,219],[-82,201],[-124,-152]],[[91476,26056],[1287,-471]],[[92763,25585],[762,-279],[1095,-426],[50,-205],[103,-27],[-37,-194],[66,-153],[117,7],[21,-220],[147,-172],[139,33],[42,-65]],[[95268,23884],[166,635],[165,84],[48,-167],[96,71],[-47,334],[-46,-28],[-202,266],[-73,54],[62,78],[-48,256],[-73,69],[-48,201],[93,186],[-84,49],[41,238],[84,9],[15,-132],[79,-64],[74,128],[139,12],[101,117],[36,139],[165,243],[2,304],[-68,51],[107,137],[193,33],[86,243],[0,171],[144,150],[167,12],[137,-47],[63,51],[89,-194],[240,-257],[21,-94],[-116,-427],[-58,136],[-51,-309],[-57,-162],[-102,-68],[-59,119],[-96,-52],[78,-111],[233,56],[170,282],[165,481],[84,430],[-3,287],[-32,216],[-17,-326],[-73,-38],[-266,234],[-77,104],[-152,41],[-140,190],[-58,240],[-216,156],[-197,459],[-232,256],[20,-97],[184,-204],[181,-414],[4,-160],[-90,-352],[47,-90],[-171,-68],[29,189],[-63,-8],[15,204],[-78,-23],[17,118],[-162,97],[-3,418],[-129,140],[-129,49]],[[95592,29215],[-113,-592],[-111,-14]],[[95368,28609],[-67,-111]],[[95301,28498],[-83,-129],[-122,-56],[-86,-431],[-65,50],[-72,-467],[-660,339]],[[94213,27804],[-11,-57],[-1533,618],[0,132],[-77,54],[-16,-148],[-313,124],[-772,279]],[[91491,28806],[-53,-123],[38,-2627]],[[52912,9721],[1223,21],[1539,2],[319,-5],[-7,-1454],[141,115],[157,-61],[145,165],[44,112],[82,653],[34,78],[106,812],[-26,198],[18,202],[76,138],[154,141],[149,26],[33,-62],[226,39],[62,185],[325,13],[244,43],[61,221],[19,205],[223,-14],[264,-119],[2,-175],[161,-82],[11,-58],[208,-70],[45,70],[289,-16],[390,297],[138,-22],[1,165],[-92,22],[-18,122],[86,95],[222,-56],[80,172],[-16,187],[162,488],[147,-115],[-61,-255],[63,-150],[84,30],[226,-67],[86,137],[-5,212],[76,118],[97,-25],[46,112],[225,13],[-11,109],[134,269],[120,-52],[-5,245],[116,-102],[91,67],[86,-86],[180,-71],[162,-261],[233,-287],[134,-112],[70,17],[14,191],[90,93],[-28,88],[58,151],[180,-37],[86,-85],[42,101],[636,-124],[167,84],[93,257],[150,92],[73,-119],[105,-43],[75,57],[183,18],[135,-87],[-142,201],[-161,113],[-137,205],[-192,132],[-72,128],[-407,263],[-123,113],[-157,72],[-146,123],[-291,327],[-193,275],[-224,370],[-212,394],[-25,102],[-243,528],[-174,323],[-143,148],[-134,298],[-57,39],[-150,284],[-114,115],[-312,472],[128,301]],[[60864,18223],[-118,-155],[-150,131],[-15,240],[-139,-22],[49,2243],[-52,35],[-30,190],[-134,-8],[-53,188],[-78,-38],[-42,125],[-137,80],[-102,153],[-86,264],[-24,242],[-129,186],[-23,301],[11,243],[173,17],[198,424],[8,213],[-71,242],[-91,180],[-6,386],[42,311],[-71,113],[46,193],[29,348],[-35,173],[19,197],[-61,347],[115,124],[275,419],[34,131],[322,24],[55,70],[55,228],[111,143],[260,124],[210,245],[92,495],[97,141],[175,154],[214,341],[244,98],[254,554],[72,272],[-32,252],[10,362],[62,117],[-14,134],[47,182]],[[62450,30375],[-839,69],[-1825,125],[-1493,72],[-1805,50],[-1333,18],[-1150,-4]],[[54005,30705],[16,-4613],[4,-2277],[-56,-226],[-201,-197],[-104,-15],[-74,-174],[-44,-222],[-151,-351],[40,-174],[284,-359],[109,-279],[32,-439]],[[53860,21379],[-15,-392],[31,-176],[-62,-519],[-5,-421],[-104,-173],[-103,-396],[-13,-332],[-81,-380],[31,-236],[-31,-351],[38,-289],[-65,-274],[-1,-718],[-22,-172],[5,-512],[-38,-298],[20,-664],[-191,-825],[-54,-434],[-65,-167],[-16,-333],[-44,-78],[-63,-368],[48,-420],[-44,-305],[25,-378],[-27,-350],[68,-302],[16,-208],[-55,-153],[-56,-475],[-91,-438],[16,-121]],[[89327,39227],[55,-243]],[[89382,38984],[46,-332],[56,-164]],[[89484,38488],[117,-230],[99,-39],[183,-201],[-3,-299],[273,-539],[107,-95],[46,-194],[69,-4],[79,-188],[-108,-175],[-135,-86],[-65,-152],[-139,-115],[-71,-207],[-159,-14],[-43,-138],[-40,-328],[-64,-77],[-155,34],[-76,-434],[14,-349],[60,-4],[83,-427],[-179,-316],[-5,-77],[147,-249],[67,-205],[-29,-80],[127,-335],[41,-463],[86,-240],[89,-79]],[[89900,32183],[731,443],[723,388],[31,4],[-1,426],[-90,825]],[[91294,34269],[-22,127]],[[91272,34396],[-201,199],[13,281],[-43,239]],[[91041,35115],[17,143],[124,44],[91,-99],[245,83],[7,-151],[86,556],[4,698],[32,827],[44,568],[-37,307],[-158,926],[-125,488],[-158,248],[-120,321],[-104,535],[-68,532],[-94,241],[-110,89],[-71,-19],[-2,-240],[50,-462],[-14,-176],[-141,-69],[-109,28],[-10,-74],[-141,57],[-28,132],[-98,-203],[-210,-106],[-117,-189],[-35,42],[-159,-181],[-56,-123],[-129,-37],[-35,-304],[18,-154],[-86,-78]],[[89344,39315],[-17,-88]],[[90812,53263],[126,18],[105,211],[24,151],[-98,5],[-5,-151],[-152,-234]],[[90718,56718],[28,-212],[721,-869],[-18,-831],[-39,-437],[-172,-615],[61,90],[147,522],[34,449],[23,962],[-146,80],[-260,282],[-379,579]],[[80100,54078],[536,-89],[349,-82],[599,-113],[233,-77],[725,-132],[1372,-389],[1757,-544],[2781,-937],[187,-92],[1636,-588]],[[90275,51035],[176,697],[141,454],[150,401],[149,313],[332,797],[-58,-26],[-222,-529],[-74,-129],[-83,-5],[-133,-540],[-160,-466],[-64,-56],[8,-135],[-71,-277],[-116,-219],[-162,12],[-8,-122],[-91,93],[63,182],[120,119],[64,-57],[30,241],[333,861],[20,151],[-144,-162],[-9,-123],[-142,-283],[-79,-12],[42,207],[105,95],[-206,-12],[-249,-309],[-97,-6],[160,273],[69,33],[60,176],[-197,174],[-200,-171],[185,240],[-38,60],[-460,-182],[170,188],[144,24],[-36,78],[-150,80],[-60,233],[-88,105],[-117,36],[-75,-94],[-110,16],[-126,-367],[-20,-196],[46,-282],[-36,-32],[-60,279],[17,252],[87,287],[110,256],[-23,116],[59,95],[251,-124],[210,-234],[82,137],[303,-310],[201,-72],[101,104],[16,138],[-54,285],[45,168],[76,554],[54,-62],[0,-387],[-45,-493],[69,-195],[-43,-45],[161,-140],[137,109],[157,433],[-3,160],[82,274],[-39,100],[43,167],[-58,205],[-208,101],[-131,434],[-21,271],[-66,38],[6,132],[-110,207],[-173,-22],[-185,80],[-268,-2],[-115,-114],[-126,-342],[192,-79],[18,-159],[-167,144],[-81,-9],[-48,128],[81,166],[72,265],[-248,-70],[-84,62],[-139,-65],[-208,-29],[-165,-106],[7,94],[130,163],[134,-31],[443,191],[301,-13],[85,209],[-84,402],[8,169],[-70,242],[-311,517],[-366,-251],[35,207],[171,127],[249,59],[196,-340],[227,-151],[21,-256],[75,22],[44,206],[65,81],[115,-25],[-87,-220],[149,61],[49,241],[-93,301],[-106,80],[-109,506],[-13,244],[-117,-25],[-25,-262],[-76,-39],[40,263],[-99,60],[293,114],[138,-548],[123,-368],[129,-301],[221,-670],[68,41],[-147,333],[-349,927],[-135,531],[-41,304],[-50,-207],[-249,-99],[-169,44],[-450,298],[-293,321],[-173,332],[-223,328],[-183,340],[-229,579],[-113,469],[-105,1016],[1,231],[-87,8],[-34,-105],[-299,-5],[-368,167],[-263,284]],[[86724,62866],[-1511,-1858],[-243,-316],[-670,-814],[-351,101],[-1669,418],[-14,-449],[-335,-578],[-169,291],[-41,-400],[-1214,209],[-672,126],[-335,47],[-184,97],[-33,-103],[-61,201],[-94,4],[-405,404],[-81,136],[-18,-79],[-558,462]],[[75885,61298],[-8,-920],[129,-185],[29,81],[182,-53],[119,-214],[-41,-202],[48,-95],[-34,-119],[42,-140],[134,-177],[40,-169],[100,-48],[85,-168],[510,-137],[58,-183],[133,-135],[49,-115],[69,14],[80,-287],[97,-35],[37,-145],[136,-127],[159,23],[44,-73],[87,-342],[-18,-278],[80,-35],[63,91],[52,-130],[5,-188],[235,-312],[77,122],[-8,244],[98,29],[155,-248],[74,-330],[188,-234],[76,0],[37,-110],[133,-5],[45,157],[168,-97],[161,-749],[180,-264],[153,53],[-70,-281],[56,-238],[-41,-216],[32,-250]],[[42801,8880],[996,142],[1716,212],[1618,163],[1025,87],[1347,97],[975,53],[1364,57],[1070,30]],[[53860,21379],[-1176,-19],[-1704,-63],[-1678,-104],[-1053,-81],[-1941,-172],[-861,-91],[-1135,-132],[-1325,-171],[-754,-107]],[[42233,20439],[81,-1667],[182,-3639],[103,-1962],[21,-506],[181,-3785]],[[57180,55736],[16,1928]],[[57196,57664],[63,768],[311,3486],[-16,2185],[-20,4584]],[[57534,68687],[-64,84],[-123,-237],[-110,40],[-25,-87],[-94,17],[-122,-255],[-136,63],[-131,-178],[-93,-285],[-147,-10],[-153,-278],[-183,-89],[-96,321],[-229,47],[-254,-51],[-29,-198],[-281,181],[-79,-29],[6,140],[-87,-18],[-79,86],[-169,-185],[-11,98],[-88,-20],[-56,101],[-149,-29],[-139,128],[11,172],[-94,87],[-105,-87],[-60,228],[-61,90],[-147,-344],[-143,13],[-48,-187],[-85,6],[-105,-123],[83,-146],[-166,-80],[-29,228],[-131,97],[-59,-173],[-104,82],[-60,-81],[-39,-305],[-164,-11],[15,242],[-191,296],[-19,311],[-138,-40],[-60,-248],[73,-148],[-22,-200],[-57,-93],[-86,201],[-147,-40],[-69,204],[-98,-2],[-67,-88],[7,-239],[-74,-63],[-94,81],[-82,-63],[14,-153],[-80,-109],[-100,-24],[-54,149],[-220,339],[-59,30],[-215,-191],[74,-349],[-47,-67],[-103,43],[-111,-51],[-53,-307],[56,-174],[-60,-96],[-86,152],[-239,-88],[-116,-91],[-103,281],[-127,73],[-162,-340],[-129,-66],[-79,117],[-123,26],[-90,-125],[-186,-92],[-130,-162],[-115,69],[-172,-91],[-94,14],[-30,-472],[-302,-483],[-36,302],[-80,10],[-137,-164],[-114,-16],[-40,159],[-176,-36],[-102,-162],[-243,-529],[-92,-103],[-101,65],[184,-7472],[-971,-73],[-958,-83],[-957,-93],[-1113,-123],[-1335,-159]],[[42286,56906],[84,-1923]],[[80162,33015],[286,-310],[257,-381],[40,-212],[100,55],[187,-296],[250,-320]],[[81282,31551],[105,1028],[1440,-432],[450,-151],[1240,-396],[1144,-390],[328,-123],[934,-316],[970,-352],[616,-236],[159,178],[72,276],[129,-91],[173,175],[-12,152],[93,50],[76,510],[-38,55],[98,129],[115,286],[114,-27],[44,124],[135,-64],[46,66],[80,-66],[14,110],[93,137]],[[89484,38488],[-155,-66],[-121,23],[-145,124],[-90,179],[-72,272]],[[88901,39020],[-741,273],[-1263,453],[-798,273],[-1789,577],[-1573,492]],[[82737,41088],[-631,189],[-1120,318],[-334,-3491]],[[80652,38104],[-490,-5089]],[[42034,24047],[29,-8],[63,-1279],[107,-2321]],[[54005,30705],[-235,-3],[7,255],[117,188],[-8,290],[-88,45],[31,284],[122,1],[29,285],[48,113],[-43,222],[-77,50],[15,348],[-67,133],[-6,282],[-146,317],[3,240],[151,196],[98,383],[-23,137],[74,115]],[[54007,34586],[-91,30],[-49,-126],[-118,40],[-56,-183],[-119,-217],[39,-146],[-65,-81],[-121,-22],[-6,-123],[-164,-116],[-93,49],[-29,-154],[-243,-49],[-128,-146],[-13,-141],[-142,-87],[-180,2],[-37,72],[-267,-51],[-106,56],[-173,-31],[-87,-76],[-77,36],[-23,159],[-103,179],[-138,16],[-151,-225],[-207,-213],[-336,-295],[-48,-198],[-851,-41],[-1377,-85],[-1237,-95],[-1756,-158],[-221,-33],[-1034,-116],[-1487,-191],[-1051,-146]],[[41662,31680],[103,-2136],[112,-2227],[157,-3270]],[[57534,68687],[49,-29],[4,180],[149,87],[36,120],[111,-131],[134,86],[78,-154],[111,151],[38,-72],[111,66],[26,2051]],[[58381,71042],[47,3919],[46,31],[81,245],[130,123],[69,272],[101,180],[-14,108],[53,228],[-62,335],[42,169],[179,187],[-43,138],[94,115],[75,295],[-44,194],[131,144],[43,362],[98,-45],[10,398],[60,224],[-96,90],[83,234],[-76,199],[30,242],[-120,323],[-1,180],[-116,213],[8,157],[-90,102],[-22,133],[51,79],[36,297],[-114,210],[-12,206],[102,145],[-8,324],[66,260],[-82,204],[57,130],[-157,250],[-124,486],[-130,181],[170,484]],[[58932,83793],[1,44],[-317,3],[-256,140],[-959,776],[-122,140],[-70,179],[-93,32],[23,-123],[181,-323],[151,-62],[53,-154],[139,23],[-101,-177],[-376,186],[-79,-18],[138,-363],[28,-266],[-8,-241],[-118,-88],[-114,97],[-108,329],[-94,52],[-88,-160],[-90,274],[60,105],[-68,180],[72,165],[141,52],[-40,178],[78,63],[-3,479],[-114,71],[-283,451],[-116,-58],[-12,289],[40,86],[274,-362],[240,-392],[106,-79],[26,-182],[156,79],[-140,204],[-431,510],[-192,311],[-221,304],[-279,470],[-112,29],[-730,746],[-521,413],[-230,207],[-215,230],[-172,227],[-104,244],[-375,358],[-318,424],[-188,301],[-234,462],[-84,280],[-194,444],[-146,455],[-171,640],[-131,728],[-46,663],[18,664],[35,341],[99,678],[82,437],[109,751],[71,847],[-48,-155],[-34,-479],[-158,-1115],[-168,-56],[125,-85],[-160,-842],[-21,-347],[10,-849],[84,-898],[119,-588],[141,-481],[98,-225],[73,-282],[61,-113],[-17,-156],[96,-278],[130,-122],[276,-692],[120,-54],[58,-173],[110,-5],[270,-388],[313,-186],[-24,-289],[-254,247],[-78,129],[-125,17],[-50,-353],[-130,2],[-68,439],[44,133],[-27,120],[-268,378],[-182,-97],[-18,-142],[-232,195],[-121,172],[151,119],[222,-206],[-2,268],[-46,74],[-279,749],[-76,-8],[-49,-193],[-148,28],[-31,-60],[-225,31],[-76,-41],[-45,124],[84,105],[186,-48],[-31,209],[49,158],[226,177],[-139,474],[-92,457],[-9,145],[-89,344],[-192,171],[-76,-62],[98,-65],[24,-191],[-55,-11],[-192,284],[-41,160],[171,57],[187,-122],[55,20],[-52,1027],[-51,673],[-25,10],[60,751],[56,213],[5,275],[66,4],[196,800],[-63,151],[37,478],[39,70],[144,39],[7,115],[89,-57],[9,404],[-265,7],[-1,64],[-198,101],[1,255],[-147,-41],[-7,-83],[-147,-59],[-48,-182],[-73,-16],[-132,-321],[-222,-47],[-85,-109],[-172,-29],[-165,49],[-123,-60],[-23,95],[-74,-104],[-143,65],[-206,-98],[-171,-252],[-2,-109],[-101,28],[-155,-251],[-64,33],[-177,-166],[-171,61],[-168,-345],[-69,-28],[-68,-152],[-135,43],[-151,-162],[-144,-64],[-87,58],[-56,-116],[42,-190],[-69,-187],[-86,-62],[-8,-306],[-43,-138],[-12,-260],[-61,-84],[-50,-373],[-118,-146],[17,-102],[-113,-111],[7,-150],[-73,-169],[-62,-26],[40,-256],[-17,-229],[30,-94],[-25,-282],[-108,-89],[7,-121],[-86,-53],[68,-80],[61,-558],[-95,-56],[40,-247],[-83,-195],[-94,-111],[-72,53],[-57,-130],[-71,14],[-125,-302],[-206,-271],[-41,-249],[7,-183],[-71,-113],[15,-153],[-117,-60],[-46,-271],[-68,-81],[-54,-230],[-241,-195],[-161,-371],[14,-123],[-111,-336],[27,-151],[-56,-136],[61,-89],[-98,-61],[-40,-141],[29,-123],[-94,-101],[4,-125],[-103,-84],[-6,-301],[-47,-91],[-21,-240],[-46,-6],[-53,-293],[-58,-9],[-19,-321],[-62,-480],[-171,-254],[20,-82],[-54,-202],[-149,-138],[-18,-110],[-234,-254],[-86,-352],[-176,-86],[-38,-147],[-167,-101],[37,-121],[-41,-237],[-53,218],[-38,-95],[3,-229],[-97,-42],[-82,-362],[-113,-103],[-113,51],[-23,-127],[-59,80],[-255,19],[-133,-116],[-144,-63],[-151,32],[-84,-89],[-149,80],[-126,-41],[-121,-219],[-88,-1],[-138,-146],[-78,23],[-103,381],[-198,-89],[-100,113],[-49,-44],[-243,120],[-18,175],[-90,123],[-12,161],[-56,10],[-13,175],[-77,91],[-93,619],[-71,9],[-68,349],[65,78],[-98,183],[-160,49],[-40,175],[-178,238],[-41,272],[-219,-52],[-105,22],[-91,-164],[-185,-103],[-76,-114],[-58,-199],[-101,-151],[-169,-39],[-148,-144],[-113,-269],[-92,-93],[-263,-105],[-310,-380],[-209,-532],[-142,-44],[-109,-218],[-122,-160],[-128,-276],[-31,-368],[-76,-198],[-113,-423],[10,-193],[-37,-296],[50,-126],[14,-359],[-117,-486],[-170,-370],[20,-106],[-57,-593],[-43,-139],[-89,-35],[-50,-300],[-106,-18],[-80,-233],[-78,-44],[-115,-212],[-82,0],[-246,-262],[2,-129],[-277,-438],[-67,-368],[-78,-142],[-225,-235],[-154,-497],[-113,-115],[-29,-204],[-90,-123],[-141,-50],[-221,-300],[-58,-301],[-60,-92],[-29,-230],[-118,-454],[-125,-150],[-75,49],[-65,-146]],[[34864,73972],[-133,-198],[-59,-270],[46,-66],[31,-328],[2231,404],[959,159],[1106,174],[1140,164],[1239,164],[174,-3992],[200,-3715],[346,-7858],[72,-1713],[70,9]],[[41662,31680],[-381,7668]],[[32975,37767],[-804,-183],[-1599,-394],[-902,-254],[357,-3817]],[[30027,33119],[178,-1913],[83,-825],[611,-6643]],[[30899,23738],[43,-573],[133,-1424],[422,108],[121,74],[790,192],[142,7],[561,150],[1012,230],[30,31],[911,211],[2140,455],[76,29],[1288,260],[526,96],[25,-24],[1804,311],[1111,176]],[[94213,27804],[219,1303],[118,899],[-64,48],[54,245],[-36,112]],[[94504,30411],[-147,-4],[-111,132],[-103,34],[-69,111],[-83,-56],[-39,142],[-264,232],[-115,-18],[-139,172],[-48,-49],[-163,75],[-24,98],[-109,-41],[-233,173],[-30,-177],[-124,417],[-61,2],[-95,292],[-88,-43],[-111,242],[-45,-23],[-126,148],[0,181],[-167,109],[-122,238],[-40,-40],[-71,148]],[[91777,32906],[-10,-101],[-165,-285],[338,-583],[-154,-265],[-122,-1234],[-173,-1632]],[[55131,41927],[1908,27],[910,-34],[913,-65],[484,-24],[846,-76],[1110,-122],[616,-91],[86,228],[96,29],[18,148],[94,162],[59,2],[12,186],[71,98],[110,12]],[[62464,42407],[-68,144],[-64,415],[5,418],[36,351],[140,408],[-43,196],[35,152],[118,164],[-1,246],[227,364],[97,88],[71,223],[82,20],[117,338],[351,385],[205,326],[96,620],[-49,138],[62,207],[44,281],[142,203],[67,-30],[148,-373],[249,143],[102,8],[245,246],[-10,199],[-141,308],[69,300],[-18,171],[-109,284],[-47,398],[-78,169],[-39,403],[44,259],[145,202],[61,168],[130,153],[73,20],[80,172],[50,-5],[116,190],[126,-1],[-80,166],[43,135],[91,42],[94,-149],[117,183],[74,23],[148,217],[-9,105],[90,28],[65,133],[129,93],[1,189],[75,150],[-76,64],[15,175],[150,363],[40,187],[-19,169],[-92,54],[-45,175],[108,138],[6,197],[170,440],[2,158],[184,175],[27,-137],[-92,-169],[85,12],[117,188],[17,121],[104,-21]],[[66869,55082],[61,60],[-48,460],[-64,162],[115,121],[-88,61],[-51,174],[80,183],[-63,152],[-43,236],[-54,24],[-132,-244],[-84,73],[-56,458]],[[66442,57002],[-57,153],[-63,-132]],[[66322,57023],[29,-154],[-32,-126],[-118,-25],[-41,110],[66,204]],[[66226,57032],[39,83],[-40,161],[71,210],[-43,163],[-130,4],[3,121],[142,133],[-88,130],[-194,-29],[-16,64],[164,200],[51,198],[-147,190],[-35,319],[-47,7]],[[65956,58986],[-1152,143],[92,-374],[142,-206],[21,-177],[162,-190],[70,-173],[24,-330],[-36,-166],[-116,-79],[-26,-281],[-1731,168],[-2103,161],[-1452,86],[-1388,59],[-1267,37]],[[55910,44178],[-65,-109],[-103,-17],[-25,-100],[38,-260],[-137,-227],[16,-163],[-147,-164],[5,-79],[-102,-88],[-136,-598],[-12,-138],[65,-47],[-18,-175],[-42,132],[-111,1],[-5,-219]],[[77907,47475],[115,37],[203,-183],[136,-72],[14,-509],[24,-64],[146,-41],[21,-100],[-47,-325],[-88,-330],[109,-202],[-16,-220],[66,-321],[122,-240],[69,128],[71,0],[72,177],[-33,150],[73,87],[104,-307],[95,61],[-46,-147],[16,-167],[-105,-272],[106,-85],[-46,-312],[94,-207],[19,-193],[173,-12],[-3,-277],[163,-323],[109,200],[81,2],[116,-187],[79,-22],[48,-188],[76,-71],[89,-306],[196,-440],[93,-73],[-5,-231],[46,-141],[-69,-113],[50,-191],[-17,-164],[49,-100],[-41,-143],[85,-65],[6,-224],[-35,-400],[39,-104],[-11,-213],[55,-367],[44,-78],[17,-223],[-51,-318],[4,-270],[-78,-230],[-79,-126],[38,-176],[184,-140]],[[82737,41088],[184,1962],[75,-66],[70,-211],[107,-184],[43,6],[42,-237],[162,-253],[50,-262],[111,-20],[142,56],[199,-699],[-9,-124],[113,49],[-69,78],[232,188],[158,10],[172,-60],[45,-165],[-41,-112],[82,-12],[51,-225],[154,34],[116,-339],[121,15],[197,247],[104,-88],[196,-3],[10,114],[-72,54],[45,175],[165,148],[60,138],[34,340],[66,28]],[[85852,41670],[-38,138],[-64,638],[-1014,-979],[58,423],[-93,406],[39,40],[-46,196],[71,97],[-228,605],[42,41],[-64,230],[-40,-58],[-130,347],[-21,-98],[-93,211],[-88,506],[-247,-265],[-66,248],[-42,365],[17,163],[-50,14],[-89,558],[5,122],[-142,361],[-298,-88],[-142,-328],[-205,-94],[-41,472],[34,157],[-63,322],[-95,220],[49,132],[-86,133],[-127,462],[41,84],[-88,473],[-105,228],[-198,576],[-47,224],[19,97],[-62,166],[66,160],[87,47],[-162,295],[7,108],[84,-14],[-20,105],[-274,411],[-83,-206],[-68,51],[-237,375],[-104,116],[-176,-176],[-25,186],[72,125],[-77,146],[-356,239],[-181,219],[-274,-328],[-72,271],[-55,24],[-173,295],[-203,74],[-222,-267],[-113,16],[-176,-318],[-16,-213],[-120,-127],[110,-174],[-81,-71]],[[79273,50584],[-264,-18],[-38,-123],[-145,-87],[-64,-126],[-98,-11],[-117,-422],[-159,-200],[-8,-133],[-102,-46],[-58,-114],[47,-213],[-95,-40],[-81,-252],[-133,-162],[-58,-161],[56,-37],[-23,-246],[56,-122],[-11,-200],[-54,-100],[-17,-296]],[[62464,42407],[68,-49],[12,-427],[-76,-159],[89,-266],[167,-125],[105,-7],[102,-135],[33,-375],[-7,-172],[153,-386],[58,-70],[21,-440],[-14,-223],[-79,-221],[-88,-32],[-129,-279],[57,-253],[33,-409],[118,-100],[76,42],[117,-132],[199,-8],[134,-60],[101,-205],[214,-62],[75,-169],[112,-98],[2,-354],[25,-214],[56,-133],[145,-154],[42,-403],[-22,-209],[31,-165],[-46,-145],[-7,-287],[-93,-144],[-297,-235],[-72,-196],[19,-173],[-97,-205],[-132,-121],[-40,-106],[-128,-104],[1,-141]],[[63502,34098],[930,-94],[1346,-114],[759,-72],[1095,-166],[515,-58]],[[68147,33594],[13,412],[-32,326],[74,350],[112,292],[129,251],[9,111],[122,511],[31,248],[150,435]],[[68662,51678],[-51,242],[-97,126],[-56,194],[62,330],[134,208],[-29,170],[-342,127],[-137,216],[-81,-80],[-111,163],[-51,405],[134,294],[50,201],[-47,301],[-151,35],[-159,-176],[-183,-65],[-137,-155],[-228,-122],[-121,28],[-141,245],[-35,185],[-72,125],[-32,267],[88,140]],[[34864,73972],[-1680,-335],[-1475,-315],[-129,1713],[-1587,-359]],[[65956,58986],[30,122],[142,231],[-55,78],[-71,-71],[-88,67],[7,127],[110,143],[-133,66],[-52,180],[-110,84],[-54,-63],[-77,88],[-3,186],[65,129],[112,-66],[9,133],[-175,209],[91,137],[-11,131],[-133,-164],[-88,56],[-10,170],[59,146],[-60,242],[-28,-238],[-92,0],[-85,190],[-13,143],[80,25],[29,-139],[79,98],[-50,312],[-98,44],[27,152],[96,8],[51,149],[-75,99],[102,171],[-62,100],[-72,-60],[-60,68],[-52,359],[-152,-43],[-25,181]],[[65061,62966],[114,160],[5,169],[-157,197],[-148,115],[-33,-190],[-75,12],[49,227],[17,268],[-28,105],[-82,-2],[-9,-278],[-87,273],[43,117],[129,-8],[20,100],[-71,152],[-72,27],[-16,-218],[-63,74],[9,212],[86,293],[-74,211],[51,190],[-24,94],[-138,148],[8,186],[-65,25],[12,-180],[-143,29],[46,221],[-41,104],[-122,61],[-20,238],[-111,-133],[-46,115],[86,119],[131,-16],[-31,177],[-138,-94],[-78,111],[13,104],[147,97],[-27,206],[-181,58],[53,146],[-69,59],[-39,-139],[-123,119],[19,80],[128,99],[-103,236],[58,202],[103,100],[-282,66],[1,182],[52,78],[90,-51],[67,161],[-108,67],[-129,-177],[-122,124],[172,186],[13,119],[-171,129],[91,247],[-89,238],[120,-63],[5,-174],[74,89],[-7,165],[-130,63],[72,136],[96,-60],[43,-229],[55,83],[-143,311],[4,200],[84,229],[55,-194],[45,63],[-83,196],[17,290],[-30,55],[-148,-26],[-30,126],[148,162],[-70,238]],[[63736,70773],[-1462,104],[-504,29],[-2150,89],[-1239,47]],[[13284,60870],[104,59],[154,243],[128,138],[67,310],[-46,127],[-78,-116],[-161,-89],[-26,-132],[34,-236],[-119,-103],[-57,-201]],[[13043,62541],[57,11],[104,480],[186,479],[-142,26],[-102,-244],[-103,-752]],[[12100,58185],[117,62],[-12,96],[-110,-35],[5,-123]],[[11421,60871],[95,16],[146,289],[-91,11],[-115,-121],[-35,-195]],[[11257,57627],[165,169],[115,35],[102,191],[118,65],[65,-104],[121,113],[-93,114],[-188,-43],[-118,53],[-260,-196],[24,-195],[-51,-202]],[[10630,57649],[146,40],[237,-5],[-20,155],[105,92],[-14,156],[-290,57],[-71,-124],[-93,-371]],[[10292,57356],[175,-64],[78,233],[-104,-13],[-149,-156]],[[8891,24760],[762,401],[603,299],[325,123],[156,103],[651,316],[410,182],[596,310],[1528,762],[1194,543],[459,198]],[[15575,27997],[-631,4183],[-205,1395],[-309,2029],[-425,2726],[-120,846],[1130,2903],[659,1703],[1490,3831],[1527,3937],[1213,3121],[1226,3147]],[[19970,66387],[-4489,-908],[20,-358],[-74,-273],[-100,39],[40,-513],[-27,-85],[79,-175],[16,-538],[-31,-444],[-215,-922],[-136,-262],[-62,-238],[-116,-124],[-84,-354],[-140,-256],[-83,-86],[-107,-236],[-120,-347],[-148,-192],[-25,148],[-145,18],[-254,-256],[-14,-135],[77,-86],[23,-135],[-38,-409],[-92,-383],[-81,-90],[-319,-95],[-124,71],[-71,-161],[-144,-97],[-238,-318],[-73,-38],[-129,-238],[-38,-440],[-141,-325],[-37,-10],[-94,-263],[-153,-222],[-198,-97],[-77,49],[-140,-150],[-145,-28],[-209,-297],[-228,-153],[-288,-103],[-310,-63],[-28,-312],[-204,-323],[142,-379],[-26,-266],[99,-302],[-32,-247],[-40,-30],[163,-554],[20,-302],[-135,-217],[-49,50],[-148,-251],[-47,-187],[98,-272],[41,-285],[-41,-201],[-160,-120],[-119,-407],[-62,-375],[-183,-239],[-28,-170],[11,-274],[-164,-487],[-2,-460],[-102,-133],[-48,-394],[-102,-372],[-143,-224],[-88,-377],[26,-244],[-5,-418],[61,-269],[-51,-116],[111,-154],[40,150],[143,-153],[152,-516],[-49,-535],[-88,-228],[-87,54],[-226,-115],[-135,-298],[-106,-463],[-52,-29],[-17,-231],[-50,-116],[10,-207],[98,-396],[-25,-321],[14,-172],[-84,-205],[136,-596],[29,-365],[199,-25],[6,309],[-46,88],[-32,265],[16,189],[152,153],[117,332],[50,9],[53,240],[77,27],[-81,-242],[-11,-329],[22,-309],[-108,-269],[27,-114],[-130,-184],[89,-213],[-2,-234],[-107,-70],[-36,-230],[114,-5],[16,-111],[116,44],[85,-94],[-28,-256],[-130,-217],[-186,51],[-66,324],[61,169],[-82,40],[-44,123],[79,230],[-97,-98],[3,247],[-97,6],[-34,-148],[-127,-274],[-84,2],[-99,-280],[-35,-200],[-84,-157],[-92,-72],[-83,117],[-55,-72],[153,-363],[52,-180],[-27,-292],[46,-116],[-51,-197],[-71,-2],[29,-218],[-44,-386],[-162,-325],[-102,-271],[-117,-669],[-225,-632],[-82,-332],[2,-147],[123,-208],[18,-136],[-37,-911],[22,-351],[69,-278],[148,-352],[0,-209],[43,-298],[-35,-175],[35,-421],[-71,-162],[-6,-191],[-104,-471],[-61,-98],[-1,-299],[-107,-164],[-198,-630],[61,-185],[10,-310],[-28,-197],[97,-276],[150,-313],[330,-589],[183,-390],[107,-357],[-50,-128],[51,-334],[140,-276],[207,-738],[41,-414],[-5,-777],[-44,-7],[-72,-226],[145,-348],[67,-409]],[[89344,39315],[-17,-88]],[[89382,38984],[-112,180],[-15,218],[98,102],[-10,332],[237,450],[101,78],[129,382],[-6,193],[72,361],[165,214],[41,235],[262,366],[108,57],[67,-85],[108,497],[131,779]],[[90758,43343],[-583,219],[-512,160],[-668,-4059],[-94,-643]],[[87032,42793],[106,-278],[268,311],[-174,459]],[[87232,43285],[-14,-228],[-81,-162],[-105,-102]],[[35766,96281],[15,-144],[179,-286],[82,-15],[69,-280],[121,-168],[14,-226],[-82,-164],[-69,-255],[-15,-226],[32,-191],[79,-62],[224,147],[30,102],[167,144],[112,154],[88,-20],[192,102],[418,337],[295,407],[100,216],[-17,427],[183,-8],[55,184],[-5,187],[171,268],[188,152],[-17,187],[-331,507],[-322,284],[-152,60],[-192,-19],[-135,221],[-119,81],[-76,138],[-110,55],[-110,214],[6,107],[-98,315],[-148,208],[-115,-197],[-170,-169],[-160,-85],[-85,-322],[70,-824],[-76,-539],[-64,-38],[-54,-455],[-183,-466],[15,-45]],[[34406,91804],[72,-328],[154,-99],[97,106],[150,419],[187,-96],[128,-117],[199,69],[0,53],[205,214],[36,129],[236,119],[35,277],[-139,261],[-187,118],[-106,-31],[-230,175],[-158,30],[-137,-134],[-46,-638],[-88,-67],[-67,80],[-197,-162],[-99,-188],[-45,-190]],[[34402,93280],[264,-283],[71,101],[-14,227],[-114,-15],[-166,67],[-41,-97]],[[33645,91867],[153,-106],[194,64],[126,196],[58,207],[-60,170],[-149,95],[-123,17],[-91,-454],[-108,-189]],[[33124,91117],[114,-264],[-14,-189],[554,147],[76,-113],[35,137],[164,43],[203,-59],[130,81],[-63,180],[-132,168],[-157,68],[-458,-206],[-330,60],[-122,-53]],[[31100,89295],[319,-28],[226,-428],[104,-47],[93,317],[181,378],[-9,267],[131,181],[29,-187],[88,8],[-34,208],[62,194],[121,208],[-123,138],[-116,-64],[-118,69],[-144,-175],[-192,-37],[-275,51],[-57,-273],[-81,-117],[-27,-166],[-85,-151],[-2,-199],[-91,-147]],[[27948,87541],[10,-131],[81,-123],[32,-160],[360,-322],[100,90],[49,-98],[178,-9],[110,69],[116,269],[-7,149],[-77,204],[4,343],[-121,214],[-121,129],[-64,-52],[-267,-43],[-135,-234],[-203,-129],[-45,-166]],[[26988,88208],[30,-141],[198,-232],[52,-175],[85,-29],[-17,406],[-174,115],[-94,321],[-91,-137],[11,-128]],[[62450,30375],[-20,166],[57,157],[-17,193],[180,186],[87,216],[-179,491],[14,357],[55,286],[9,220],[75,81],[93,550],[196,193],[359,131],[105,270],[38,226]],[[55131,41927],[24,-92],[-64,-194],[-90,-69],[-78,-210],[78,-151],[-8,-365],[52,-54],[-41,-232],[20,-125],[-69,-142],[11,-305],[-35,-256],[66,-99],[-110,-15],[-33,-388],[66,26],[20,-131],[-115,-83],[41,-469],[-137,-64],[20,-153],[-58,-112],[-43,124],[-71,-147],[25,-105],[-58,-182],[31,-69],[-33,-211],[80,-420],[-57,-53],[-96,-341],[54,-254],[-165,-88],[7,-157],[-76,-38],[8,-251],[-124,-194],[-22,-211],[54,-56],[-74,-303],[-80,-166],[4,-188],[58,-177],[-25,-145],[-81,-26]],[[73897,45707],[119,-187],[113,159],[149,72],[152,-108],[59,-120],[65,61],[22,167],[149,51],[79,102],[42,188],[109,220],[61,328],[252,83],[154,-98],[214,71],[39,118],[108,87],[30,140],[187,75],[74,-235],[156,-108],[99,85],[179,25],[155,195],[72,-131],[167,-25],[37,-190],[95,-116],[28,-123],[88,-22],[137,-152],[146,630],[75,71],[131,-9],[223,282],[45,182]],[[79273,50584],[-584,1209],[-157,122],[-164,194],[-273,395],[23,287],[-93,166],[-140,153],[32,179],[-25,164],[-150,158],[-178,54],[-82,303],[4,149],[-102,38],[-189,153],[-192,215],[-190,52],[-192,208],[-42,95]],[[76579,54878],[-21,75],[-526,89],[-982,182],[-531,74],[-324,10],[-303,36],[-515,140],[-609,86],[-356,33],[-535,23],[-310,39],[-95,90],[-50,-65],[-926,192],[-548,92],[-756,144],[0,-118],[-393,1],[93,519],[-29,173],[-1387,166],[-827,87],[-207,56]],[[66322,57023],[-96,9]],[[89393,45821],[-90,33]],[[89303,45854],[-29,-300],[100,4],[19,263]],[[89139,45236],[-20,-259],[63,-66],[132,451],[-175,-126]],[[90758,43343],[1,502],[-23,60],[-49,870],[-48,291]],[[90639,45066],[-635,369],[-57,193]],[[89947,45628],[-86,-70],[-119,59],[-105,254],[-68,-2],[-24,-186],[16,-243],[91,-130],[-123,-18],[62,-254],[-127,17],[-64,133],[-30,-281],[153,-148],[-146,-154],[46,-397],[-77,108],[-48,386],[-93,-197],[63,-102],[-88,-166],[-48,296],[50,76],[-10,156],[-58,-21],[-93,113],[-56,-22],[-146,-251],[-261,-586],[118,-87],[-75,-232],[-1,-159],[64,-98],[51,68],[61,-111],[22,113],[134,-16],[117,50],[-127,-182],[-110,-8],[-106,-95],[-124,-214],[-16,97],[-83,-35],[12,194],[-46,-11],[-18,-335],[70,-336],[107,117],[39,-83],[-67,-365],[-54,-36],[-85,188],[-74,13],[28,154],[-70,80],[-16,-344],[54,-416],[67,201],[131,-10],[52,-123],[-55,-164],[43,-200],[-94,63],[26,289],[-66,-51],[-13,-241],[-101,-179],[45,-474],[49,-295],[82,-187],[183,-48],[-64,-51],[69,-268],[-62,2],[21,-420],[-200,154],[-17,167],[117,149],[-63,70],[-165,387],[-57,-84],[22,-191],[-56,-74],[-19,330],[62,91],[-24,163],[-76,-295],[-94,-16],[83,282],[-75,181],[77,46],[-137,293],[-104,-18],[-14,-84],[-154,-61],[120,236],[205,159],[19,304],[95,130],[-117,194],[55,239],[-59,10],[-22,192],[61,75],[-86,311],[76,143],[12,177],[64,224],[32,331],[61,160],[221,296],[-23,264],[-86,7],[43,126],[76,-100],[55,40],[-25,155],[44,149],[147,260],[-22,81],[67,277],[-202,-174],[-56,-197],[-49,47],[12,188],[-105,-78],[-64,-187],[-76,-80],[-151,-26],[-212,65],[-28,-163],[-127,-262],[71,385],[-151,-94],[-118,-178],[-113,-348],[-287,436],[-83,-61],[-85,-361],[31,-287],[146,-377]],[[87148,43931],[-21,-145],[133,-222],[-28,-279]],[[87032,42793],[-58,-98],[-184,-22],[-6,-133],[-181,-107],[-212,20],[-116,-137],[-2,-240],[56,-201],[-140,-86],[-73,-148],[-81,41],[-183,-12]],[[72376,19856],[67,-9],[39,130],[375,129],[-83,211],[-132,-33],[-266,-428]],[[71033,20248],[123,104],[-12,121],[-115,-102],[4,-123]],[[70925,21159],[19,-326],[43,-121],[-3,-187],[103,3],[51,546],[-100,163],[-113,-78]],[[70780,20656],[76,-41],[-20,182],[-56,-141]],[[70569,21819],[78,44],[14,191],[-92,-235]],[[70356,23024],[27,-79],[111,61],[18,289],[-57,6],[-84,-143],[-15,-134]],[[70242,23544],[52,-156],[65,57],[-78,144],[-39,-45]],[[69268,21380],[125,190],[-41,80],[-84,-270]],[[69896,36148],[165,-256],[144,-313],[170,-897],[180,-557],[73,-415],[49,-481],[15,-927],[-61,-761],[-49,-365],[-106,-446],[-226,-656],[-179,-738],[-80,-223],[-48,-254],[11,-130],[93,-282],[33,-286],[-86,-570],[-101,-318],[121,-259],[107,-519],[97,-386],[16,-294],[-16,-236],[26,-327],[-72,-301],[21,-227],[218,-175],[18,-112],[-21,-520],[136,-26],[61,-252],[104,95],[96,-59],[71,-403],[92,-177],[75,-376],[117,-112],[22,123],[-118,213],[93,246],[-110,348],[66,-78],[20,244],[-36,29],[-19,348],[53,237],[54,-15],[69,-479],[-55,-11],[51,-313],[66,-78],[-17,555],[-72,159],[-13,195],[80,30],[162,-734],[-2,-716],[-63,-444],[18,-140],[231,-376],[99,-71],[176,0],[174,-157],[-17,-107],[-190,-20],[-84,-138],[-72,-340],[54,-242],[87,-103],[94,-315],[-121,-98],[337,-17],[30,-168],[360,261],[159,159],[70,-81],[132,-8],[185,75],[154,246],[47,210],[316,6],[178,218],[134,-7],[208,187],[159,-54],[205,295],[-42,98],[107,296],[75,114],[105,383],[-214,-132],[-74,166],[43,82],[-4,216],[93,169],[122,59],[46,185],[30,317],[47,113],[-31,467],[28,207],[22,766],[-48,41],[-80,251],[-131,25],[-50,191],[-6,661],[-146,111],[12,161],[-235,72],[-105,297],[5,545],[-32,109],[94,281],[99,86],[47,-122],[37,117],[116,44],[86,108],[52,-65],[135,-428],[109,-109],[-50,-156],[67,-453],[37,159],[121,-229],[-128,-71],[142,-24],[74,-233],[126,-63],[202,-177],[26,-120],[164,-137],[210,133],[96,108],[129,379],[88,182],[63,339],[62,516],[150,605],[93,800],[99,453],[157,448],[-51,208],[-6,461],[38,172],[-41,610],[-113,256],[-61,-10],[-62,156],[-9,-215],[-59,-76],[119,-301],[-128,-53],[-145,173],[-23,152],[72,187],[-82,3],[-51,184],[29,275],[-57,398],[-217,184],[-80,326],[37,576],[-84,104],[16,231],[-109,286],[-89,75],[-12,177],[-63,50],[-76,335],[46,177],[-47,42]],[[75446,35165],[-1481,426],[-730,191]],[[64918,13379],[106,-237],[496,-525],[39,0],[216,-347],[159,-157],[35,32],[148,-118],[-35,110],[-179,324],[2,98],[-128,196],[-335,265],[-149,189],[141,48],[-310,277],[-100,1],[-106,-156]],[[63336,18545],[380,-342],[205,-132],[159,-269],[99,-222],[86,-97],[177,-76],[85,45],[158,-106],[151,-26],[245,-256],[185,-369],[200,-37],[89,-182],[44,-229],[181,-234],[152,-286],[122,-94],[103,-195],[111,-311],[344,-378],[303,-126],[270,-16],[136,107],[15,126],[-155,105],[-215,22],[37,166],[-169,193],[-150,334],[-73,36],[-19,245],[-84,74],[-7,120],[-80,123],[-13,192],[-108,194],[-36,542],[57,268],[93,-299],[199,-391],[147,-162],[-6,88],[-131,242],[-52,210],[152,-298],[140,-81],[149,34],[130,-33],[252,133],[21,127],[154,50],[64,101],[29,196],[100,146],[39,151],[102,155],[92,23],[43,321],[170,47],[231,-67],[131,-165],[63,17],[57,199],[104,100],[105,-3],[35,-159],[80,-4],[66,130],[9,-230],[-49,-167],[83,-78],[45,96],[-19,186],[98,70],[160,-365],[177,-133],[302,-416],[64,59],[331,-199],[129,14],[319,-35],[160,-52],[326,-343],[125,-63],[169,-11],[168,-78],[-98,295],[10,368],[31,216],[-41,72],[75,165],[117,-60],[222,120],[175,-195],[74,-4],[71,253],[198,-140],[49,-241],[254,-53],[34,-134],[150,-18],[34,93],[-29,335],[69,383],[25,306],[-155,41],[-34,223],[193,-58],[47,103],[118,48],[-58,163],[143,199],[71,-11],[127,113],[26,-124],[88,96],[15,-218],[-92,-180],[84,30],[207,-96],[87,36],[97,279],[100,81],[-41,222],[-75,81],[-157,-91],[-168,88],[-183,-98],[-208,80],[-150,-43],[-332,157],[-65,107],[-181,-178],[-70,86],[-65,-228],[-69,37],[-80,-84],[-49,108],[26,201],[-76,122],[83,339],[-66,81],[-140,-112],[-24,-96],[-125,-99],[-152,-260],[-241,-124],[-69,36],[-225,-139],[-68,53],[-218,7],[-112,254],[-78,258],[-50,36],[-180,-43],[-124,72],[-32,183],[-211,-120],[-226,37],[-121,102],[-63,149],[-36,452],[-81,0],[-19,103],[-125,80],[-32,176],[-68,24],[6,146],[-62,38],[29,197],[-151,-138],[-20,-130],[74,-82],[37,-313],[74,2],[68,-298],[-27,-138],[-67,-22],[-83,263],[-217,-64],[24,183],[-66,168],[-16,187],[-158,128],[-65,-28],[-28,-397],[-54,-100],[-54,110],[19,396],[-166,206],[-119,440],[-88,416],[15,63],[-92,249],[-94,382],[-198,572],[38,136]],[[67974,23591],[-114,-32],[-129,-224],[50,-493],[54,-167],[-82,-182],[-86,169],[-127,12],[-69,-90],[11,-222],[71,-124],[23,-160],[-69,-234],[51,18],[22,-184],[-80,-134],[61,-109],[-55,-138],[-152,-161],[-92,17],[-57,-134],[-151,59],[-71,-118],[86,-188],[-54,-211],[-230,-125],[-74,56],[-138,-136],[-51,69],[-151,-144],[-150,29],[-14,111],[-198,-126],[-54,51],[-119,-78],[-390,-326],[-1620,-572],[-86,-384],[-109,-256],[-135,-31],[-25,-119],[-92,89],[-43,-124]],[[69164,80888],[196,-33],[-82,124],[-114,-91]],[[68657,80846],[107,-58],[252,112],[-163,6],[-196,-60]],[[68245,81011],[181,-55],[-144,109],[-37,-54]],[[67912,80966],[144,-14],[-40,127],[-104,-113]],[[65061,62966],[1584,-168],[1108,-142],[1127,-155]],[[69359,80276],[-202,212],[-65,-75],[-85,58],[-39,-93],[-124,-4],[-157,76],[-130,-126],[-10,94],[-204,-101],[-305,137],[-389,297],[15,-181],[-72,-89],[-94,100],[77,180],[-164,206],[-45,270],[-146,35]],[[67220,81272],[-88,12],[-98,-170],[-59,-224],[18,-200],[-113,-243],[-7,-175],[-152,-191],[-92,-189],[-41,-288],[-68,-96],[36,-250],[-13,-162],[48,-101],[70,-587],[47,-197],[-48,-27],[-1305,147],[-1188,115],[-1100,90],[134,-162],[-9,-119],[-115,-235],[63,-177],[-111,-206],[2,-125],[128,12],[104,-63],[17,-145],[-143,-320],[60,-135],[61,236],[71,15],[10,-120],[-84,-179],[-13,-332],[123,-43],[77,-121],[-31,-104],[-117,52],[-64,-100],[34,-125],[132,120],[54,-39],[-3,-350],[76,-122],[150,-28],[21,-85],[-192,4],[41,-315],[132,-18],[158,-263],[-20,-164],[206,-232],[-166,-151],[60,-70],[59,103],[108,-201],[54,-231],[-86,-75],[1,209],[-207,-14],[-10,-247],[263,-174],[54,81],[42,-153],[-18,-167],[80,16],[72,-151],[-178,-75],[-20,-199],[50,-71],[-55,-109],[-65,72],[-168,-176],[23,-165],[196,148],[19,-57],[-179,-213],[137,-267],[-46,-88],[-40,155],[-126,96],[-70,-208],[128,-205],[41,-137],[-192,-51],[-14,-265],[30,-127],[131,-181],[-40,-333],[-91,-5],[14,201],[-35,100],[-120,-99],[81,-291]],[[25191,4391],[1222,445],[1212,407],[994,341],[998,311],[2207,658],[728,200],[1157,300],[1795,442],[1116,254],[1171,251],[1418,281],[1225,222],[1144,194],[1223,183]],[[30899,23738],[-109,-106],[-18,-168],[-112,-206],[17,-160],[-119,-426],[-100,-136],[-47,149],[-114,-20],[5,165],[-104,206],[69,225],[-54,31],[-124,-124],[-50,40],[-137,-83],[-24,58],[-179,82],[-56,-229],[-183,54],[-78,-62],[-126,64],[-116,-82],[-79,-159],[-67,-22],[-129,116],[-76,292],[-122,-161],[-49,51],[-71,-106],[-172,-55],[-84,-98],[-105,44],[-110,208],[18,179],[-57,60],[-50,-162],[-162,-264],[-17,-185],[41,-100],[-89,-324],[55,-57],[1,-227],[-40,-82],[-22,-300],[-160,-245],[-163,97],[-8,-139],[-135,-221],[-28,-332],[84,-18],[28,-377],[-92,-161],[19,-80],[-89,-80],[-13,-248],[-106,-278],[-49,-294],[30,-252],[-51,-260],[56,-237],[-106,-35],[77,-292],[-124,-203],[-110,-271],[-55,27],[-17,167],[-84,54],[-134,229],[-97,49],[-81,-63],[-42,181],[-126,100],[-105,-232],[-47,-216],[-137,-44],[38,-167],[-21,-136],[107,-77],[15,-202],[-72,-226],[136,-253],[137,43],[46,-104],[-43,-222],[50,-62],[-84,-184],[-11,-203],[71,-171],[-81,-136],[28,-156],[107,12],[3,-362],[58,-17],[58,-211],[9,-196],[93,-185],[-16,-222],[82,-9],[106,-504],[-51,-103],[-100,-1],[-76,87],[-221,-106],[-23,-161],[44,-94],[-104,-163],[-121,127],[1,-318],[-135,-162],[-67,-220],[53,-216],[-84,-232],[-71,-15],[-26,-304],[-115,-372],[-72,-101],[-77,-437],[-122,-75],[-155,-207],[-15,-186],[-252,-447],[170,-13],[-59,-117],[3,-163],[-60,-128],[104,-119],[-43,-245],[38,-149],[-124,-260],[-2,-244],[-69,-134],[-132,-553],[-25,-25],[474,-3787]],[[92968,16433],[-28,-214],[75,-267],[2,-294],[-87,-84],[88,-34],[115,-325],[115,156],[149,-51],[38,-256]],[[95336,23105],[-71,511],[3,268]],[[92763,25585],[-178,-247],[-58,-278],[-6,-275],[83,-104],[25,-163],[-59,-150],[17,-265],[-53,-83],[-27,-432],[32,-230],[-55,-173],[-15,-443],[-44,-119],[-5,-248],[65,-142],[-17,-389],[115,-321],[-21,-327],[82,-438],[-49,-125],[77,-417],[-107,-343],[1,-193],[-49,-107],[26,-207],[187,-190],[132,-86],[-16,-102],[147,-185],[60,-277],[88,-145],[-60,-185],[55,-65],[-32,-250],[-65,-79],[-122,-316],[62,-158],[1,-303],[58,-218],[-109,-241],[39,-133]],[[94259,30777],[16,-81],[139,-125],[-101,193],[-54,13]],[[94010,31176],[83,-93],[-47,166],[-36,-73]],[[91272,34396],[57,203],[-100,332],[-188,184]],[[86010,23729],[65,-193],[-5,156],[-60,37]],[[85877,23714],[49,-155],[56,-2],[-105,157]],[[81282,31551],[171,-230],[306,-532],[101,-266],[159,-216],[143,-129],[36,-245],[64,-142],[6,-176],[191,-247],[85,-209],[-33,-214],[-162,-397],[-139,-71],[-30,-300],[-108,-20],[26,-264],[-93,-436],[355,-325],[301,-251],[225,-138],[407,-109],[203,-91],[206,-42],[362,5],[189,163],[209,106],[209,-235],[438,-195],[132,21],[129,-43],[67,-106],[166,-128],[137,-185],[75,-297],[298,-536],[184,-26],[89,-96],[30,-191],[-24,-284],[-123,-562],[-125,-89],[40,-185],[77,-62],[23,101],[102,-175],[-32,-132],[-130,-112],[-113,90],[4,-152],[-95,-84],[-85,29],[-24,-261],[45,-403],[103,-55],[110,-181],[-15,-156],[219,-341],[128,-127],[113,-294],[45,-344],[314,-859],[331,-759],[240,-340],[118,-254],[99,-38],[110,-170],[159,38],[68,-63],[540,-182],[290,-114],[413,-204],[811,-371]],[[90152,17663],[56,344],[-21,322],[86,96],[-13,253],[55,578],[163,283],[55,262],[-29,233],[87,350],[-3,121],[-76,241],[4,574],[51,50],[53,349],[85,197],[-1,206],[93,166],[-49,557],[29,192],[53,37],[11,-221],[108,-57],[29,140],[111,197],[127,1001],[190,1589],[-1,141],[71,192]],[[91777,32906],[-23,153],[-101,185],[20,260],[-77,24],[78,174],[71,-327],[98,-15],[18,-144],[207,-164],[9,-116],[143,45],[-10,-130],[93,70],[213,-3],[118,-144],[-7,-145],[160,-52],[436,-197],[216,-158],[218,-373],[151,-415],[179,-143],[-91,309],[118,134],[118,-14],[37,-101],[117,187],[200,-302],[-1,-93],[150,-89],[-1,98],[-344,472],[-398,593],[-259,324],[-289,329],[-416,554],[-232,238],[-154,105],[-39,-33],[-354,349],[-358,112],[-246,290],[-2,-130],[-131,58],[-76,-169],[22,-144],[-64,-99]],[[76665,35383],[90,-78],[-29,133],[-61,-55]],[[76474,35258],[-5,-239],[90,37],[-85,202]],[[75446,35165],[21,96],[121,51],[76,-76],[173,183],[287,124],[127,191],[115,67],[117,-160],[25,-159],[94,160],[111,-32],[1,98],[201,295],[238,125],[183,-221],[173,-73],[91,-140],[282,-270],[129,61],[319,-65],[213,-341],[219,-497],[225,-398],[62,-21],[357,-458],[174,-105],[582,-585]],[[12669,9647],[108,15],[52,185],[-35,171],[65,175],[135,74],[197,-76],[73,51],[252,529],[6,212],[52,305],[-14,364],[-52,203],[21,128],[-68,457],[109,209],[276,294],[141,78],[56,138],[125,62],[116,-63],[127,39],[334,-121],[85,-114],[92,-10],[107,102],[324,24],[178,217],[103,0],[164,210],[10,262],[81,24],[93,-108],[218,66],[65,84],[77,-78],[276,-49],[99,-74],[110,79],[59,178],[154,73],[307,31],[81,-106],[164,-18],[180,-75],[259,22],[205,53],[97,-150],[89,-40],[116,126],[367,25],[194,110],[202,-96],[44,-63],[1301,537],[1831,740]],[[22477,15058],[37,321],[108,434],[103,25],[30,160],[108,55],[58,129],[-6,270],[68,282],[-181,345],[-32,174],[-61,55],[-189,404],[-176,645],[-140,259],[-97,111],[-37,157],[18,187],[-231,496],[-225,137],[-208,542],[-28,134],[-135,136],[-14,217],[-58,98],[52,262],[-70,120],[62,176],[116,-33],[62,216],[120,23],[-19,144],[70,49],[25,163],[-83,175],[-76,28],[36,266],[-123,370],[-28,176],[-64,10],[-34,187],[-891,6782]],[[20344,29945],[-965,-370],[-1406,-558],[-315,-116],[-819,-351],[-826,-368],[-438,-185]],[[8891,24760],[-103,-269],[-48,-279],[36,-246],[-32,-298],[25,-314],[63,-403],[160,-458],[19,-325],[-47,-96],[1,-228],[-61,-49],[11,-412],[254,-509],[112,-406],[96,-226],[86,-298],[-8,-147],[125,-117],[141,-268],[161,-401],[266,-871],[264,-1048],[157,-761],[125,-443],[36,-220],[141,-558],[100,-638],[97,-228],[245,-852],[107,-483],[32,-281],[69,-268],[14,-228],[42,-61],[126,-540],[35,-266],[-36,-133],[80,-259],[37,-263],[-14,-161],[104,-70],[35,-110],[40,-404],[-24,-441],[26,-34],[96,314],[66,81],[7,-125],[173,-4],[43,118],[95,-68],[69,47],[134,-106]],[[76579,54878],[704,-150],[28,11],[996,-234],[1339,-335],[13,-89],[486,-108],[-45,105]],[[25159,31686],[238,100],[2765,805],[30,27],[1083,301],[752,200]],[[23019,50594],[40,-393],[386,-3395],[213,-1895],[827,-7291],[133,-1140],[498,-4382],[43,-412]],[[90639,45066],[-114,645],[-46,106],[-99,-29],[-68,171],[-79,409],[-28,513],[42,151],[-91,444],[50,26],[-78,489],[-89,187],[29,184],[-12,216],[-87,298],[-116,68],[-30,120],[-27,-248],[-130,-347],[-15,-289],[29,-155],[-21,-251],[34,-757],[117,-595],[-40,-100],[121,-104],[65,-242],[-53,-134],[-83,18],[127,-232]],[[89393,45821],[-48,170],[-42,-137]],[[87148,43931],[-114,109],[-75,-59],[11,186],[-65,403],[-6,179],[126,388],[196,-93],[123,-130],[56,-147],[65,80],[-4,249],[142,168],[18,161],[234,118],[132,-59],[79,87],[27,-81],[152,-25],[40,137],[129,114],[53,151],[86,20],[113,144],[132,30],[210,154],[1,221],[-86,112],[66,463],[-49,148],[91,46],[-108,140],[-215,-142],[-54,112],[-185,-433],[-225,-133],[-213,-329],[-69,-11],[-43,-139],[-95,-67],[4,102],[203,228],[168,327],[117,126],[104,8],[123,343],[96,106],[157,-62],[57,102],[199,8],[-84,197],[65,73],[77,-79],[77,211],[41,224],[-17,309],[-131,-166],[-152,-96],[-35,154],[148,267],[60,23],[-237,181],[52,113],[130,-82],[21,248],[83,-70],[118,131],[56,146],[-19,335],[-69,-30],[-99,242],[-121,-212],[-196,-127],[-112,-126],[5,-162],[-106,-202],[-137,76],[-36,100],[-80,-128],[-116,1],[-34,-73],[-117,167],[82,82],[185,-47],[116,147],[57,-10],[28,-210],[90,319],[-1,180],[54,92],[106,-9],[207,228],[33,210],[164,-72],[48,-109],[79,120],[-50,-275],[100,-56],[66,53],[259,49],[131,-134],[48,61],[143,538],[163,455],[80,287]],[[14862,6382],[74,-321],[94,-198],[34,192],[-43,213],[83,114],[-146,108],[-101,-10],[5,-98]],[[15406,1954],[23,-124],[84,180],[-102,38],[-5,-94]],[[15419,1242],[35,-30],[74,424],[-70,-175],[-39,-219]],[[15303,1766],[52,-72],[38,176],[-91,66],[1,-170]],[[15041,3040],[217,-393],[42,-164],[85,2],[0,229],[80,259],[-85,20],[-50,-89],[-212,227],[124,29],[36,161],[3,263],[-31,54],[-3,338],[115,-252],[57,222],[73,77],[-12,314],[-73,159],[-67,-75],[-15,-298],[-121,24],[24,-103],[-73,-172],[62,-284],[2,-190],[-92,-29],[-86,-329]],[[15092,837],[197,290],[-144,-111],[-53,-179]],[[14901,1109],[101,-37],[-11,104],[-90,-67]],[[15060,0],[83,139],[-90,-41],[7,-98]],[[14646,1390],[52,-76],[102,50],[51,235],[84,71],[-52,-259],[244,-242],[60,35],[160,276],[-122,109],[20,233],[-44,189],[-67,50],[-34,241],[-92,-29],[-49,-193],[-162,-77],[-95,-176],[-56,-437]],[[14656,1030],[70,51],[83,244],[-153,-295]],[[23764,3862],[-308,2316],[-212,1520],[-374,2878],[-370,2808],[-64,290],[82,238],[33,488],[-89,247],[15,411]],[[12669,9647],[-176,-120],[-59,-167],[-69,68],[-63,-67],[-132,107],[-46,-46],[-71,-291],[-48,-51],[-121,130],[111,-417],[71,-389],[70,-510],[37,210],[-68,308],[-52,442],[91,47],[-8,-268],[34,-190],[53,107],[111,-181],[-33,-413],[78,-104],[162,-98],[-67,-161],[-51,67],[-143,23],[-108,-231],[35,-238],[7,-374],[63,50],[-16,125],[197,-118],[191,-2],[-40,-114],[-166,-162],[16,-147],[-133,-115],[-56,52],[-11,302],[-93,21],[101,-504],[37,-409],[14,-443],[-76,-311],[71,-718],[23,-785],[-52,-120],[12,-182],[-72,-233],[-77,-128],[-17,-312],[67,-497],[-17,-293],[49,-31],[161,-495],[-71,-237],[119,25],[111,150],[210,440],[136,192],[53,-4],[168,268],[-19,57],[159,222],[169,129],[233,70],[141,198],[223,89],[46,130],[212,102],[153,-121],[114,236],[15,163],[181,49],[-30,84],[61,107],[-29,187],[56,5],[45,-155],[-55,-143],[24,-125],[188,-35],[0,104],[-94,69],[24,183],[135,-166],[-12,334],[-83,-5],[38,213],[-2,211],[54,96],[-133,11],[-15,137],[-105,70],[-49,191],[-119,203],[-19,-72],[120,-324],[-89,16],[-138,337],[-148,163],[-293,474],[-136,337],[181,110],[197,-53],[78,-97],[-303,66],[-78,-130],[344,-596],[201,-153],[162,-6],[61,-226],[119,-187],[146,-158],[51,22],[7,-324],[89,181],[-42,619],[-94,-54],[40,165],[-46,205],[-2,245],[-92,84],[-25,117],[67,85],[-77,125],[-76,258],[10,78],[-89,183],[18,140],[-123,208],[-98,-311],[89,-284],[-102,94],[-68,180],[11,166],[103,173],[-61,24],[-78,228],[-75,-208],[-49,-382],[85,-84],[36,-189],[-143,212],[-1,244],[-58,140],[76,-17],[22,234],[131,141],[108,-199],[65,-9],[163,-369],[7,-96],[100,246],[62,-176],[163,-37],[27,-512],[-30,-388],[132,-67],[-94,-242],[125,-216],[21,-300],[99,-105],[110,-351],[134,-43],[24,-198],[-59,-108],[-76,-336],[42,-223],[-24,-175],[-84,-40],[-60,131],[17,234],[77,311],[-114,-327],[-62,-44],[-6,-200],[50,-236],[109,-28],[72,109],[72,-107],[-30,-166],[-119,-209],[-43,-184],[25,-119],[-166,30],[-38,-202],[55,-176],[107,5],[60,81],[19,172],[96,32],[11,-365],[89,23],[46,-94],[-74,-258],[8,-220],[64,-118],[-50,-123],[-90,-26],[-133,85],[62,-130],[-82,-88],[23,-251],[-70,-161],[83,-139],[-97,-80],[125,-187],[942,460],[493,255],[749,337],[735,342],[1027,463],[1251,539],[1349,560],[1684,671]],[[68914,22457],[20,-269],[174,29],[-99,338],[-95,-98]],[[68290,23143],[62,-57],[22,205],[-84,-148]],[[63207,16893],[34,-273],[63,-21],[-19,246],[-78,48]],[[63131,17383],[115,-121],[-23,124],[-92,-3]],[[62931,17215],[183,-183],[-24,205],[-134,46],[-25,-68]],[[62774,17559],[121,-235],[6,63],[-127,172]],[[62791,17080],[85,170],[-74,18],[-11,-188]],[[62728,16857],[189,-134],[70,174],[69,-120],[17,143],[-85,38],[-90,170],[-170,-271]],[[62735,17769],[88,-67],[169,-299],[76,96],[-160,124],[32,111],[-90,22],[-107,133],[-8,-120]],[[62419,17032],[80,-64],[-1,145],[-79,-81]],[[60864,18223],[114,93],[188,-53],[371,-286],[97,-7],[453,-451],[64,74],[191,-186],[95,-207],[81,31],[125,-111],[141,251],[-65,254],[-124,266],[56,211],[-91,165],[-48,239],[72,45],[223,-260],[22,-178],[244,329],[263,103]],[[67974,23591],[-46,200],[6,261],[-293,143],[-1,230],[-104,261],[-50,281],[-59,147],[-26,323],[23,104],[-62,172],[64,97],[122,-6],[31,-179],[140,-232],[81,-61],[41,-296],[152,-460],[262,-249],[56,117],[-10,-170],[55,-328],[131,-381],[24,-333],[68,5],[113,-126],[3,-254],[73,-149],[116,-28],[12,303],[-74,-12],[3,511],[-108,135],[-19,179],[-69,180],[35,137],[-64,140],[24,82],[-93,125],[-50,170],[-56,404],[-151,600],[-76,899],[77,341],[-8,193],[-187,318],[-99,879],[29,265],[50,158],[8,338],[-101,404],[-20,455],[-79,272],[-48,559],[65,299],[-25,132],[67,232],[-40,130],[20,158],[84,206],[2,211],[50,201],[102,179],[-11,298],[-43,363],[56,470]],[[86724,62866],[-293,292],[-156,271],[-186,463],[-122,454],[-82,220],[-73,434],[-10,489],[18,309],[-88,217],[-139,179],[-23,332],[-119,4],[-105,85],[-85,-108],[-96,142],[-44,253],[87,17],[5,107],[-198,277],[-40,185],[-206,258],[-81,-103],[-66,150],[119,41],[-12,201],[-149,218],[-35,141],[-140,51],[-122,132],[-50,165],[-46,-48],[-207,361],[-65,-52],[-82,123],[-29,-99],[-89,30],[-10,143],[128,241],[-42,287],[-178,228],[-119,103],[-24,-133],[-142,-94],[-84,152],[99,72],[108,165],[-76,241],[-151,239],[-83,62],[-70,205],[43,56]],[[23764,3862],[1427,529]],[[25159,31686],[-900,-304],[-373,-158],[-328,-88],[-455,-160],[-1702,-617],[-1057,-414]],[[90152,17663],[759,-342],[827,-305],[1230,-583]],[[68478,81607],[101,196],[44,242],[-12,424],[-71,256],[53,-491],[-17,-291],[-98,-336]],[[67590,81695],[275,-427],[-59,263],[111,185],[-101,177],[-25,-152],[-188,26],[-13,-72]],[[67119,83759],[120,-47],[-63,146],[-57,-99]],[[65722,85543],[62,-82],[83,194],[-59,51],[-86,-163]],[[65368,85634],[275,84],[-133,37],[-142,-121]],[[64997,85816],[172,-79],[21,53],[-186,85],[-7,-59]],[[62472,83979],[171,-172],[155,9],[269,254],[-98,125],[-2,132],[-151,54],[-366,-331],[22,-71]],[[67220,81272],[-116,129],[-60,-15],[-109,197],[-6,124],[-83,61],[27,129],[-199,-36],[-70,157],[45,220],[123,19],[89,-92],[-21,196],[103,140],[180,-70],[33,-303],[-18,-133],[162,-196],[17,-149],[218,138],[-112,123],[4,112],[106,44],[30,197],[99,-57],[71,-279],[109,68],[-17,183],[-95,14],[-75,153],[156,-28],[-22,99],[-245,128],[134,176],[76,-81],[-46,200],[-161,-103],[-74,190],[2,326],[-61,25],[-53,-278],[-73,6],[-8,300],[-252,50],[128,111],[3,107],[-165,-144],[90,178],[-81,56],[95,218],[139,21],[85,141],[50,256],[248,-51],[122,97],[11,-98],[151,280],[72,-153],[182,341],[56,230],[123,-108],[49,129],[-164,72],[-11,107],[113,-1],[-46,177],[-80,-69],[-70,237],[18,228],[-153,-99],[-3,-127],[-71,-97],[-202,478],[-103,146],[130,-487],[63,-76],[-12,-177],[63,-85],[-14,-166],[-74,-68],[-51,282],[-115,20],[-156,-315],[-247,-113],[-70,-139],[-399,-64],[-78,54],[-323,507],[-309,410],[-27,-164],[-86,-45],[23,-147],[-91,-318],[-93,-137],[-96,280],[10,-251],[-81,-175],[-84,218],[-95,-36],[-51,77],[-86,-61],[22,190],[-79,156],[-22,177],[-57,-15],[-30,190],[-58,-36],[-142,166],[-21,208],[-109,-43],[10,-149],[-208,-310],[-74,50],[-185,-53],[-72,-101],[-138,-9],[-157,-88],[-115,-185],[82,-55],[46,-194],[142,200],[45,-79],[5,224],[100,49],[-32,-340],[-171,-197],[-4,-138],[-77,-14],[-55,138],[-90,52],[5,-135],[-66,28],[78,-227],[-76,-126],[-196,181],[-76,-258],[-67,34],[-54,-383],[-185,11],[39,-112],[4,-281],[-226,-36],[-222,177],[-53,-18],[-1,-166],[50,-138],[46,49],[-9,-195],[-114,-18],[-92,81],[-66,-63],[-11,133],[-261,250],[-42,-104],[-122,62],[65,199],[128,18],[-62,103],[60,201],[141,-78],[-57,110],[47,62],[-226,36],[-178,173],[-138,40],[-571,-171],[-248,-125],[-406,-308],[-165,-97],[-285,-116],[-230,-6],[-98,53],[-250,-14],[-515,148],[-184,182]],[[95592,29215],[-93,200],[-84,-312],[-51,-295],[-35,41],[85,503],[-94,39],[2,118],[-97,21],[57,-491],[-9,-165],[95,-265]],[[95164,29555],[-30,-368],[40,-17],[41,273],[-51,112]],[[94994,30830],[25,-283],[79,270],[-104,13]],[[95301,28498],[6,151],[-60,167],[-48,-240],[-205,-230],[57,371],[-96,31],[78,62],[52,269],[-66,66],[75,148],[34,232],[-46,423],[-221,142],[-138,179],[-206,192],[-13,-50]]]}\n","import { geoPath } from \"d3-geo\";\nimport { feature } from \"topojson-client\";\nimport type { GeometryCollection, Topology } from \"topojson-specification\";\nimport atlas from \"us-atlas/states-albers-10m.json\";\nimport { US_STATES } from \"./usStates\";\n\nexport interface StateShape {\n  code: string;\n  name: string;\n  /** SVG path data in the map's coordinate space (mapBox.ts). */\n  path: string;\n}\n\nconst topology = atlas as unknown as Topology<{ states: GeometryCollection }>;\nconst toPath = geoPath();\n\n/** Every state's shape, from us-atlas's TopoJSON (Census cartographic boundaries). This module carries\n *  ~80 KB of geometry plus topojson-client and d3-geo, so it is only ever imported dynamically\n *  (useUsStateShapes): a page that never shows the map never downloads it. A feature the state table\n *  does not know is a broken pairing of atlas and table and fails loudly. */\nexport const STATE_SHAPES: readonly StateShape[] = feature(topology, topology.objects.states).features.map(\n  (state) => {\n    const known = US_STATES.find((candidate) => candidate.fips === String(state.id));\n    if (!known) throw new Error(`The map has a state the table does not: ${String(state.id)}`);\n    const path = toPath(state);\n    if (!path) throw new Error(`The map has no outline for ${known.name}`);\n    return { code: known.code, name: known.name, path };\n  },\n);\n","export * from \"./components/actions\";\nexport * from \"./components/surfaces\";\nexport * from \"./components/layout\";\nexport * from \"./components/loading\";\nexport * from \"./components/navigation\";\nexport * from \"./components/feedback\";\nexport * from \"./components/data\";\nexport * from \"./components/forms\";\nexport * from \"./components/platform\";\nexport * from \"./components/planner\";\nexport * from \"./components/chat\";\nexport * from \"./components/files\";\n\nexport * from \"./kits\";\n\n// \"Flag\" is exported by both components/feedback (the callout UI component) and\n// kits/session (the feature-flag record interface) — an explicit export of the\n// component here resolves the `export *` ambiguity in the component's favor, and\n// the kit's type is still reachable under a distinct name.\nexport { Flag } from \"./components/feedback\";\nexport type { Flag as SessionFlag } from \"./kits/session\";\n","import * as React from \"react\";\n\nconst VARIANTS: Record<string, string> = {\n  primary: \"fd-btn-primary\",\n  brandSoft: \"fd-btn-brandsoft\",\n  secondary: \"fd-btn-secondary\",\n  ghost: \"fd-btn-ghost\",\n  danger: \"fd-btn-danger\",\n  link: \"fd-btn-link\",\n};\n\n/**\n * The one action primitive. Primary is a gradient; everything else is flat.\n * Never more than one primary per view.\n */\ninterface ButtonOwnProps {\n  children?: React.ReactNode;\n  /** primary = the one action. brandSoft = marketing CTA at >=19px/700 only (AA large-text). */\n  variant?: \"primary\" | \"brandSoft\" | \"secondary\" | \"ghost\" | \"danger\" | \"link\";\n  size?: \"sm\" | \"md\" | \"lg\";\n  /** Phosphor icon name, leading, e.g. \"plus\" */\n  icon?: string;\n  /** Phosphor icon name, trailing */\n  trailingIcon?: string;\n  /** The site's signature inset-circle arrow. Use on hero CTAs only. */\n  arrow?: boolean;\n  /** Label stays put; a spinner replaces the leading icon. */\n  loading?: boolean;\n  block?: boolean;\n  /** When `disabled` (or `loading`), stay in the tab order instead of going natively\n   *  `disabled`: renders `aria-disabled=\"true\"` only while actually disabled/loading (never\n   *  the `disabled` attribute), keeps the `:focus-visible` ring, and swallows\n   *  click/Enter/Space — including never letting a click bubble to an ancestor's own\n   *  handler — without ever submitting a form. Use whenever a button's disabled state can\n   *  flip while it holds focus (e.g. a controlled panel re-seeding mid-edit) — a native\n   *  `disabled` drops focus to `<body>` the instant it applies, and nothing can intercept or\n   *  redirect that. Once enabled again, this behaves exactly like a plain button: no\n   *  `aria-disabled` attribute at all. */\n  focusableWhenDisabled?: boolean;\n  disabled?: boolean;\n}\n\n/** `as=\"a\"` takes anchor props (href, target, rel); a plain button refuses them. */\nexport type ButtonProps =\n  | (ButtonOwnProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"disabled\"> & { as?: \"button\"; href?: never; target?: never; rel?: never })\n  | (ButtonOwnProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"children\"> & { as: \"a\" });\n\nexport function Button({\n  children,\n  variant = \"primary\",\n  size = \"md\",\n  icon,\n  trailingIcon,\n  arrow = false,\n  loading = false,\n  disabled = false,\n  focusableWhenDisabled = false,\n  block = false,\n  as = \"button\",\n  className = \"\",\n  onClick,\n  onKeyDown,\n  ...rest\n}: ButtonProps) {\n  const Tag = as as React.ElementType;\n  const inert = (disabled || loading) && focusableWhenDisabled;\n  const cls = [\n    \"fd-btn\",\n    VARIANTS[variant] || VARIANTS.primary,\n    size === \"sm\" ? \"fd-btn-sm\" : size === \"lg\" ? \"fd-btn-lg\" : \"\",\n    block ? \"fd-btn-block\" : \"\",\n    loading ? \"fd-btn-loading\" : \"\",\n    className,\n  ].filter(Boolean).join(\" \");\n\n  return (\n    <Tag\n      className={cls}\n      disabled={Tag === \"button\" ? (disabled || loading) && !focusableWhenDisabled : undefined}\n      // aria-disabled is only ever rendered while the button is actually disabled/loading —\n      // never while enabled, matching the native `disabled` attribute a plain button renders\n      // instead. A focusableWhenDisabled button never goes natively `disabled` (so it stays\n      // in the tab order), so this attribute is the only way assistive tech and tests can\n      // read that same disabled/loading state on it.\n      aria-disabled={disabled || loading ? \"true\" : undefined}\n      aria-busy={loading ? \"true\" : undefined}\n      onClick={\n        inert\n          ? (e: React.MouseEvent<HTMLElement>) => {\n              // Swallowed exactly like a native disabled button: the click never runs the\n              // caller's own onClick, and stopPropagation keeps it from reaching an\n              // ancestor's onClick either — a native disabled button never dispatches a click\n              // at all, so nothing ever bubbles from it. This is also what protects a real\n              // Enter/Space, with no separate keydown-level guard needed: a native <button>'s\n              // own default activation behaviour for both keys is to dispatch this exact\n              // click event, so preventing its default action (which would otherwise submit\n              // a form) and stopping its propagation here covers mouse and keyboard\n              // activation alike.\n              e.preventDefault();\n              e.stopPropagation();\n            }\n          : (onClick as React.MouseEventHandler<HTMLElement> | undefined)\n      }\n      onKeyDown={onKeyDown as React.KeyboardEventHandler<HTMLElement> | undefined}\n      {...rest}\n    >\n      {icon && !loading ? <i className={\"ph ph-\" + icon} aria-hidden=\"true\" /> : null}\n      {loading ? <span className=\"fd-spinner\" aria-hidden=\"true\" /> : null}\n      <span>{children}</span>\n      {trailingIcon && !arrow ? <i className={\"ph ph-\" + trailingIcon} aria-hidden=\"true\" /> : null}\n      {arrow ? (\n        <span className=\"fd-btn-arrow\" aria-hidden=\"true\">\n          <i className=\"ph ph-arrow-right\" />\n        </span>\n      ) : null}\n    </Tag>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * True for anything rendered inside an anchored list that collapses a row of compact,\n * icon-only bar controls into a stacked menu (Topbar's \"More actions\" popover today —\n * any future consumer with the same shape gets it too, without a second, per-consumer\n * copy of \"what this icon means\" ever having to exist).\n *\n * A control that is legitimately icon-only in a dense bar (IconButton) reads this to\n * switch to a full labelled row instead — same component, same `label` prop it already\n * carries for its accessible name, just a second presentation of it. Defaults to\n * `false`: normal, dense-bar rendering everywhere this isn't provided.\n */\nexport const OverflowRowContext = React.createContext(false);\n\n/** True when this component is rendered inside an overflow row list (see OverflowRowContext). */\nexport const useOverflowRow = (): boolean => React.useContext(OverflowRowContext);\n","import * as React from \"react\";\nimport { useOverflowRow } from \"./overflowRowContext\";\n\n/** A square action carrying only a Phosphor glyph. Always needs a label for a11y. */\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n  /** Phosphor icon name, e.g. \"dots-three-vertical\" */\n  icon: string;\n  /** Accessible name, also the title tooltip. Required. */\n  label: string;\n  size?: \"sm\" | \"md\" | \"lg\";\n  /** \"ghost\" and \"outline\" are quiet: no fill, the glyph carries the tone. \"solid\" is a\n   *  filled button in the tone's colour — for the one action on a surface that has to be\n   *  found at a glance, like the add/remove button on every row of a transfer list. \"soft\"\n   *  is the same idea with a lighter, less saturated fill and a visibly darker border\n   *  drawn around it, for a caller that wants the button to read as a button without the\n   *  full-saturation \"solid\" look — only \"ok\" and \"danger\" tones are defined for it. */\n  variant?: \"ghost\" | \"outline\" | \"solid\" | \"soft\";\n  /** What the action does. On \"solid\"/\"soft\" it picks the fill; on \"ghost\"/\"outline\" it\n   *  tints the glyph. \"neutral\" is the default look of each variant, which for \"solid\" is\n   *  the brand fill (\"soft\" has no neutral fill — pass \"ok\" or \"danger\"). Every tone has\n   *  hover, pressed and focus states and is legible in both themes — the fills are the\n   *  --btn-solid-* / --btn-soft-* tokens, measured against light and dark grounds. */\n  tone?: \"neutral\" | \"ok\" | \"danger\";\n  round?: boolean;\n  disabled?: boolean;\n  className?: string;\n}\n\nexport function IconButton({\n  icon,\n  label,\n  size = \"md\",\n  variant = \"ghost\",\n  tone = \"neutral\",\n  round = false,\n  disabled = false,\n  className = \"\",\n  ...rest\n}: IconButtonProps) {\n  // Inside Topbar's \"More actions\" list (or any consumer providing the same context),\n  // this control is the one place a bar's icon-only presentation stops being correct —\n  // a phone user can't hover a title tooltip, and the aria-label is invisible until a\n  // screen reader reaches it. Same component, same `label`, just also shown as text.\n  const overflowRow = useOverflowRow();\n  const cls = [\n    \"fd-btn-icon\",\n    variant === \"outline\" ? \"fd-btn-icon-outline\" : variant === \"solid\" ? \"fd-btn-icon-solid\" : variant === \"soft\" ? \"fd-btn-icon-soft\" : \"\",\n    tone !== \"neutral\" ? \"is-\" + tone : \"\",\n    size === \"sm\" ? \"fd-btn-icon-sm\" : size === \"lg\" ? \"fd-btn-icon-lg\" : \"\",\n    round ? \"fd-btn-icon-round\" : \"\",\n    overflowRow ? \"fd-btn-icon-row\" : \"\",\n    className,\n  ].filter(Boolean).join(\" \");\n\n  return (\n    <button type=\"button\" className={cls} aria-label={label} title={label} disabled={disabled} {...rest}>\n      <i className={\"ph ph-\" + icon} aria-hidden=\"true\" />\n      {overflowRow ? <span className=\"fd-btn-icon-row-label\">{label}</span> : null}\n    </button>\n  );\n}\n","import * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { IconButton } from \"./IconButton\";\nimport { StackedLayerProvider, isWithinLayerTree, useStackedLayer, useLayerZIndex } from \"../../kits/layerStack\";\n\nexport type Placement = \"bottom-start\" | \"bottom-end\" | \"bottom-center\" | \"top-start\" | \"top-end\" | \"top-center\";\n\nexport interface PopoverProps {\n  open?: boolean;\n  anchorRef: React.RefObject<HTMLElement>;\n  /** The element whose own clicks open and close this popover, when that is more than\n   *  the anchor — a form field's label toggles it too, but the surface is positioned\n   *  against the input box alone. A pointerdown inside it is not an \"outside\" press, so\n   *  the toggle it is about to run is not undone by a dismissal a moment earlier.\n   *  Defaults to `anchorRef`. */\n  triggerRef?: React.RefObject<HTMLElement>;\n  onClose?: () => void;\n  placement?: Placement;\n  offset?: number;\n  /** `true`: exactly the anchor's width. `\"min\"`: at least the anchor's width, growing\n   *  with content past it (a select whose options are wider than its box). */\n  matchWidth?: boolean | \"min\";\n  width?: number;\n  minWidth?: number;\n  maxHeight?: number;\n  /** Standard content padding on the body. The header and footer own their own. */\n  padded?: boolean;\n  role?: string;\n  label?: string;\n  closeOnOutside?: boolean;\n  closeOnEscape?: boolean;\n  returnFocus?: boolean;\n  className?: string;\n  style?: React.CSSProperties;\n  /** DS-51: the standard header — this title and a Close button (labelled \"Close\", calls\n   *  `onClose`), with the header's own padding. A `header` given as well renders beneath\n   *  the title row inside the same pinned region. The title also names the surface when no\n   *  `label` is given. */\n  title?: string;\n  /** Pinned above the body and never scrolled away: a back link, a title, a segmented\n   *  toggle, a search field. */\n  header?: React.ReactNode;\n  /** Pinned below the body and never scrolled away: the Add / Apply / Confirm action and\n   *  any summary beside it. */\n  footer?: React.ReactNode;\n  /** The body — the one region of the surface that scrolls. */\n  children?: React.ReactNode;\n  /** DOM id of the surface, so a trigger can point at it with aria-controls. */\n  id?: string;\n  /** Pointer and focus events on the surface itself, for a popover opened by hover or focus\n   *  (see useHoverPopover). */\n  onPointerEnter?: React.PointerEventHandler<HTMLElement>;\n  onPointerLeave?: React.PointerEventHandler<HTMLElement>;\n  onBlur?: React.FocusEventHandler<HTMLElement>;\n}\n\nexport interface PopoverPosition {\n  left: number;\n  width: number | undefined;\n  minWidth: number | undefined;\n  top: number | null;\n  bottom: number | null;\n  maxH: number;\n  /** The widest the layer may be: the viewport less its margins. A fixed `width`, a\n   *  `minWidth` or an anchor-matched width wider than the screen is capped to this, so the\n   *  surface — and the action in its footer — never runs past the viewport edge. */\n  maxW: number;\n  side: \"top\" | \"bottom\";\n  anchorWidth: number;\n}\n\nconst MARGIN = 8;\nconst parsePlacement = (p?: string): { side: \"top\" | \"bottom\"; align: string } => {\n  const [side, align = \"start\"] = String(p || \"bottom-start\").split(\"-\");\n  return { side: side === \"top\" ? \"top\" : \"bottom\", align };\n};\n\nconst samePosition = (a: PopoverPosition | null, b: PopoverPosition | null): boolean => {\n  if (!a || !b) return a === b;\n  return (\n    a.left === b.left && a.top === b.top && a.bottom === b.bottom && a.width === b.width &&\n    a.minWidth === b.minWidth && a.maxH === b.maxH && a.maxW === b.maxW && a.side === b.side && a.anchorWidth === b.anchorWidth\n  );\n};\n\n/** The regions of an anchored layer that scroll internally — the popover body, and a list\n *  (a Menu's items, a Select's options) that shrinks inside it. */\nconst SCROLL_REGIONS = \".fd-pop-body, .fd-pop-list\";\n\n/** The pinned regions of a popover surface: they never give up height. */\nconst PINNED_REGIONS = \":scope > .fd-pop-header, :scope > .fd-pop-footer\";\n\n/** The least height the body is left with. Below this a list shows a sliver — or nothing\n *  — between a tall header and footer, which reads as an empty picker. When the room\n *  beside the anchor cannot hold the pinned regions plus this much body, the layer moves\n *  (see usePopoverPosition) rather than squeezing the body further. A body whose whole\n *  content is shorter than this only needs its content. */\nexport const POPOVER_BODY_MIN = 96;\n\nexport interface LayerSize {\n  width: number;\n  /** The height the layer wants: every region at its natural size, nothing scrolled. */\n  height: number;\n  /** The part of `height` that can never scroll: the header, the footer and the surface border. */\n  pinned: number;\n}\n\n/**\n * How big a rendered layer WANTS to be, as opposed to how big it currently is.\n *\n * A layer already clamped to the room below its anchor measures exactly that room, which\n * says nothing about whether it would have fit — so its own box can't decide the side.\n * What it would need is its full content height (the surface's own scrollHeight, which\n * includes a header and footer pushed past a too-small cap, plus its border) and\n * everything its scroll regions are hiding. None of that depends on the cap the layer is\n * currently laid out under, so re-fitting from it converges in one step instead of\n * oscillating.\n *\n * Every read is a LAYOUT size (offsetHeight / clientHeight / scrollHeight), never a\n * getBoundingClientRect box. The surface opens with a scale-in animation (`fd-pop-in`), and\n * a transformed box mid-animation reports the header and footer a few percent off their\n * settled size, differently on every open. Layout sizes ignore transforms, so the fit is\n * the same on the first frame of the animation as after it, and the same on every open.\n *\n * Returns zeros for a layer that has not been laid out (jsdom, or before the first\n * frame), which the caller reads as \"not measured yet\".\n */\nexport function measureLayer(el: HTMLElement | null): LayerSize {\n  if (!el || !el.offsetHeight) return { width: el ? el.offsetWidth : 0, height: 0, pinned: 0 };\n  let hidden = 0;\n  el.querySelectorAll<HTMLElement>(SCROLL_REGIONS).forEach((r) => {\n    hidden += Math.max(0, r.scrollHeight - r.clientHeight);\n  });\n  let pinned = 0;\n  el.querySelectorAll<HTMLElement>(PINNED_REGIONS).forEach((r) => { pinned += r.offsetHeight; });\n  const border = Math.max(0, el.offsetHeight - el.clientHeight);\n  const content = Math.max(el.scrollHeight, el.clientHeight);\n  return { width: el.offsetWidth, height: content + border + hidden, pinned: pinned + border };\n}\n\n/**\n * Fixed-position layer geometry for an anchored surface. Flips side when the\n * preferred one doesn't fit, clamps to the viewport, and re-measures continuously\n * while open.\n *\n * Continuously, on an animation frame, rather than on scroll and resize events: those\n * two cover an anchor that moves because the PAGE moved, and miss every other reason an\n * anchor moves. The one that broke this was a row inside a virtualized list — rows are\n * positioned by a CSS transform off their index, so re-sorting the list slides a row to\n * a new slot with no scroll, no resize and no layout event of any kind, and a popover\n * anchored to it simply stayed behind. Re-measuring per frame costs one\n * getBoundingClientRect on one element for as long as a popover is open, and state is\n * only set when the geometry actually changed (see samePosition), so a stationary anchor\n * causes no re-renders at all.\n *\n * The side is chosen from the layer's real size once `layerRef` has rendered (see\n * measureLayer): it flips when what it needs does not fit on the preferred side and the\n * other side has more room. Until then — the first frame, before there is anything to\n * measure — `estHeight` stands in, and only a nearly-exhausted side (under 180px) flips,\n * so a small layer of unknown size is not thrown to the far side on a guess. The real\n * width replaces `estWidth` the same way, which is what keeps an end- or center-aligned\n * layer of content width lined up with its anchor.\n *\n * The same per-frame measurement is what re-fits the layer when its CONTENT changes size\n * while open — a picker stepping from a short search header to a tall header plus a\n * footer. No event announces that either, and the next frame sees the new header and\n * footer heights: the side is re-chosen from the new need, and when even the pinned\n * regions plus POPOVER_BODY_MIN of body fit on neither side, the layer slides over its\n * anchor to the far viewport edge instead of collapsing the body (see measureLayer and\n * the `beside` branch). The height is never capped past the real room, so the surface\n * itself never overflows the viewport.\n *\n * The same loop is what notices the anchor being REMOVED — a virtualized row scrolled\n * out of the mounted band, a menu item deleted — and reports it through `onDetach`, so\n * an anchored layer can never end up pinned to an element that no longer exists.\n */\nexport function usePopoverPosition(\n  open: boolean,\n  anchorRef: React.RefObject<HTMLElement>,\n  opts?: Partial<PopoverProps> & {\n    estHeight?: number;\n    estWidth?: number;\n    onDetach?: () => void;\n    /** The rendered layer, so its real size replaces the estimates once it exists. */\n    layerRef?: React.RefObject<HTMLElement>;\n  }\n): PopoverPosition | null {\n  const o = opts || {};\n  const { side: wantSide, align } = parsePlacement(o.placement);\n  const [pos, setPos] = React.useState<PopoverPosition | null>(null);\n  const posRef = React.useRef<PopoverPosition | null>(null);\n  const detachRef = React.useRef<(() => void) | undefined>(o.onDetach);\n  detachRef.current = o.onDetach;\n  const layerRef = o.layerRef;\n\n  React.useLayoutEffect(() => {\n    if (!open || !anchorRef || !anchorRef.current) { posRef.current = null; setPos(null); return; }\n    const calc = () => {\n      const el = anchorRef.current;\n      if (!el) return;\n      const r = el.getBoundingClientRect();\n      const offset = o.offset == null ? 8 : o.offset;\n      const layer = measureLayer(layerRef ? layerRef.current : null);\n      const vh = window.innerHeight;\n      const need = layer.height || Math.min(o.estHeight || 300, 180);\n      const below = vh - r.bottom - offset - MARGIN;\n      const above = r.top - offset - MARGIN;\n      let side = wantSide;\n      if (side === \"bottom\" && below < need && above > below) side = \"top\";\n      else if (side === \"top\" && above < need && below > above) side = \"bottom\";\n      // The most the layer may ever be: the viewport less its margins, or a caller's cap.\n      const ceiling = Math.min(vh - 2 * MARGIN, o.maxHeight != null ? o.maxHeight : Infinity);\n      // The least it can be and still work: header + footer + a usable body. An unmeasured\n      // layer has no regions to go on, so it asks for a small fixed floor.\n      const floor = Math.min(\n        ceiling,\n        layer.height ? layer.pinned + Math.min(POPOVER_BODY_MIN, layer.height - layer.pinned) : Math.min(need, 140),\n      );\n      const room = side === \"top\" ? above : below;\n      // Beside the anchor when the floor fits there. When it fits on neither side — a tall\n      // header and footer next to a mid-screen anchor on a short viewport — the layer slides\n      // over the anchor toward the far viewport edge, just far enough to be whole: squeezing\n      // the body to nothing, or letting the footer run past the screen, are both worse.\n      const beside = room >= floor;\n      const edge = beside ? 0 : Math.max(MARGIN, vh - MARGIN - Math.min(need, ceiling));\n      const top = side === \"bottom\" ? (beside ? r.bottom + offset : edge) : null;\n      const bottom = side === \"top\" ? (beside ? vh - r.top + offset : edge) : null;\n      const maxH = beside ? room : vh - MARGIN - edge;\n      // Width is bounded by the viewport the same way height is: a 420px picker on a 375px\n      // phone is 359px wide, not 420px hanging off the right edge along with its Add button.\n      const maxW = Math.max(0, window.innerWidth - 2 * MARGIN);\n      const exact = o.matchWidth === true;\n      const width = exact ? r.width : Math.max(o.width || 0, o.minWidth || 0, o.matchWidth === \"min\" ? r.width : 0);\n      const w = Math.min(maxW, exact || o.width ? width : Math.max(layer.width, width) || o.estWidth || 260);\n      let left = align === \"end\" ? r.right - w : align === \"center\" ? r.left + r.width / 2 - w / 2 : r.left;\n      left = Math.max(MARGIN, Math.min(left, window.innerWidth - w - MARGIN));\n      const next: PopoverPosition = {\n        left, width: exact ? r.width : undefined, minWidth: o.minWidth,\n        top, bottom, maxH, maxW, side, anchorWidth: r.width,\n      };\n      if (samePosition(posRef.current, next)) return;\n      posRef.current = next;\n      setPos(next);\n    };\n    calc();\n    if (typeof requestAnimationFrame !== \"function\") return;\n    let raf = 0;\n    const tick = () => {\n      const el = anchorRef.current;\n      // A detached anchor still answers getBoundingClientRect — with all zeros, which\n      // would silently teleport the layer to the top-left corner. Bail before measuring.\n      if (!el || !el.isConnected) { detachRef.current && detachRef.current(); return; }\n      calc();\n      raf = requestAnimationFrame(tick);\n    };\n    raf = requestAnimationFrame(tick);\n    return () => cancelAnimationFrame(raf);\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [open, o.placement, o.offset, o.matchWidth, o.width, o.minWidth, o.maxHeight, o.estHeight]);\n\n  return pos;\n}\n\nconst capWidth = (value: number | undefined, max: number): number | undefined =>\n  value == null ? undefined : Math.min(value, max);\n\n/** Renders an anchored layer into document.body, out of every clipping and stacking\n *  context between it and its anchor. */\nexport const portal = (node: React.ReactElement): React.ReactElement => {\n  if (typeof document !== \"undefined\") return createPortal(node, document.body);\n  return node;\n};\n\n/**\n * An anchored floating surface: menus, pickers, disclosure panels, meters.\n * Owns placement, dismissal, focus return — and its own layout, which is the one rule\n * every popover shares: THE SURFACE NEVER SCROLLS.\n *\n * It is always three stacked regions: an optional `header`, the body (`children`), and\n * an optional `footer`. Header and footer are pinned; the body is the only thing that\n * scrolls, and it shrinks to whatever height is left once they are laid out. The surface\n * is capped by the real room between the anchor and the viewport edge (or `maxHeight`, if\n * that is smaller) and flips to the other side when it doesn't fit, so the footer is\n * never the thing that gets cut off.\n *\n * This is structural rather than advice because the failure it prevents is structural:\n * a surface that scrolls as a whole takes its Apply button below the fold with it, and a\n * scrolling list inside a scrolling surface is two nested scrollbars. Anything inside\n * the body that owns a scroll region of its own (a Menu, a Select's options) is laid out\n * to shrink into the body rather than overflow it — see `.fd-pop-body` in\n * components.css — so there is only ever one scrollbar.\n */\nexport function Popover({\n  open, anchorRef, triggerRef, onClose, placement = \"bottom-start\", offset = 8,\n  matchWidth = false, width, minWidth, maxHeight, padded = false,\n  role = \"dialog\", label, closeOnOutside = true, closeOnEscape = true,\n  returnFocus = true, className = \"\", style, title, header, footer, children,\n  id, onPointerEnter, onPointerLeave, onBlur,\n}: PopoverProps) {\n  const ref = React.useRef<HTMLDivElement>(null);\n  const titleId = React.useId();\n  // An anchor that leaves the DOM closes the layer rather than orphaning it — the case\n  // this exists for is a popover opened from a row of a virtualized list, whose row is\n  // unmounted the moment it scrolls out of the mounted band.\n  const pos = usePopoverPosition(!!open, anchorRef, {\n    placement, offset, matchWidth, width, minWidth, maxHeight, estHeight: maxHeight || 320,\n    onDetach: onClose, layerRef: ref,\n  });\n  // MP-248: one layer in the shared stack (kits/layerStack.tsx) owns Escape and focus\n  // return. A popover opened from inside another one (DatePicker's calendar in FilterBar's\n  // date panel) is its child there, so Escape closes the inner one first even though both\n  // surfaces are siblings under document.body.\n  const layer = useStackedLayer({ active: !!open, containerRef: ref, onEscape: closeOnEscape ? onClose : undefined, returnFocus });\n  // MP-268: visual stacking derived from that same layer's ownership — see useLayerZIndex.\n  const zIndex = useLayerZIndex(layer);\n\n  React.useEffect(() => {\n    if (!open) return;\n    const away = (e: PointerEvent) => {\n      if (!closeOnOutside) return;\n      const target = e.target as Node;\n      // MP-248: a click inside this popover's own DOM, or inside anything opened from\n      // inside it (a Modal opened from the popover's content, a submenu, and so on), is\n      // not \"outside\" — read from the layer stack's real ownership, not a class name.\n      if (isWithinLayerTree(layer, target)) return;\n      const trigger = (triggerRef || anchorRef).current;\n      if (trigger && trigger.contains(target)) return;\n      onClose && onClose();\n    };\n    document.addEventListener(\"pointerdown\", away, true);\n    return () => document.removeEventListener(\"pointerdown\", away, true);\n  }, [open, closeOnOutside, onClose, anchorRef, triggerRef, layer]);\n\n  if (!open || !pos) return null;\n  return portal(\n    <StackedLayerProvider layer={layer}>\n        <div\n          ref={ref}\n          id={id}\n          role={role}\n          aria-label={label}\n          aria-labelledby={title != null && label == null ? titleId : undefined}\n          onPointerEnter={onPointerEnter}\n          onPointerLeave={onPointerLeave}\n          onBlur={onBlur}\n          className={[\"fd-pop\", pos.side === \"top\" ? \"is-up\" : \"\", className].filter(Boolean).join(\" \")}\n          style={{\n            position: \"fixed\", left: pos.left,\n            top: pos.top == null ? \"auto\" : pos.top,\n            bottom: pos.bottom == null ? \"auto\" : pos.bottom,\n            width: matchWidth === true ? pos.width : width,\n            // CSS lets min-width win over max-width, so every minimum is capped to the viewport too.\n            minWidth: capWidth(\n              matchWidth === \"min\" ? Math.max(pos.anchorWidth, minWidth || 0) : minWidth || (matchWidth ? undefined : 200),\n              pos.maxW,\n            ),\n            // The surface never runs past the viewport edge, whatever fixed `width` a caller asked\n            // for: pos.maxW is the viewport less its margins, and `left` is clamped against it.\n            maxWidth: pos.maxW,\n            // Size to content by default — cap only at real available room between the\n            // anchor and the viewport edge (pos.maxH, computed by usePopoverPosition).\n            // A caller-supplied `maxHeight` narrows that further (e.g. a long menu that\n            // should scroll well before it reaches the viewport edge); it must never\n            // widen past pos.maxH, which is why it's still Math.min'd against it. There\n            // is intentionally no arbitrary default here — an unrequested cap would clip\n            // ordinary content that simply happens to be taller than some fixed number.\n            maxHeight: maxHeight != null ? Math.min(maxHeight, pos.maxH) : pos.maxH,\n            transformOrigin: pos.side === \"top\" ? \"bottom center\" : \"top center\",\n            // Last, and always: a caller's `style` (Select, DatePicker, TimePicker all pass\n            // one) must never be able to clobber the computed layer — that silent override\n            // via object-spread order is exactly how the Select listbox (130) ended up\n            // fixed below the Popover (140) it opens from. zIndex is never a caller concern.\n            ...style,\n            zIndex,\n          } as React.CSSProperties}\n        >\n          {title != null || header != null ? (\n            <div className=\"fd-pop-header\">\n              {title != null ? (\n                <div className=\"fd-pop-title-row\">\n                  <h2 className=\"fd-pop-title\" id={titleId}>{title}</h2>\n                  <IconButton icon=\"x\" label=\"Close\" size=\"sm\" onClick={onClose} />\n                </div>\n              ) : null}\n              {header}\n            </div>\n          ) : null}\n          <div className={[\"fd-pop-body\", padded ? \"fd-pop-padded\" : \"\"].filter(Boolean).join(\" \")}>{children}</div>\n          {footer != null ? <div className=\"fd-pop-footer\">{footer}</div> : null}\n        </div>\n    </StackedLayerProvider>\n  );\n}\n\nexport interface MenuItem {\n  id?: string;\n  label?: React.ReactNode;\n  icon?: string;\n  description?: React.ReactNode;\n  meta?: React.ReactNode;\n  /** A key HINT. Renders a cap, binds nothing. */\n  shortcut?: React.ReactNode;\n  /** Present (true/false) makes the row a menuitemradio with a check column. */\n  checked?: boolean;\n  disabled?: boolean;\n  submenu?: MenuItem[];\n  /** A secondary action pinned to the row (e.g. delete). Rendered as a sibling button, so it is keyboard-reachable and does not nest inside the row button. */\n  trailingAction?: { icon?: string; label: string; danger?: boolean; closeOnSelect?: boolean; onSelect?: (item: MenuItem) => void };\n  onSelect?: (item: MenuItem) => void;\n  kind?: \"separator\" | \"section\" | \"custom\";\n  render?: () => React.ReactNode;\n}\n\nexport interface MenuProps {\n  items: MenuItem[];\n  onSelect?: (item: MenuItem) => void;\n  onClose?: () => void;\n  autoFocus?: boolean;\n  header?: React.ReactNode;\n  footer?: React.ReactNode;\n  className?: string;\n}\n\nconst isItem = (it: MenuItem | null | undefined): boolean =>\n  !!it && it.kind !== \"separator\" && it.kind !== \"section\" && it.kind !== \"custom\" && !it.disabled;\n\n/**\n * A keyboard-complete menu list. Items may be:\n *   {id,label,icon,description,meta,shortcut,checked,disabled,submenu,onSelect}\n *   {kind:\"separator\"} · {kind:\"section\",label} · {kind:\"custom\",render}\n * `shortcut` is a HINT — it renders a cap and binds nothing.\n *\n * `header` and `footer` are pinned and only the items scroll: the whole menu is one\n * shrinkable frame, so inside a Popover body a search header stays put while a long list\n * scrolls beneath it, instead of the header scrolling away with the items.\n */\nexport function Menu({ items = [], onSelect, onClose, autoFocus = true, className = \"\", footer, header }: MenuProps) {\n  const listRef = React.useRef<HTMLDivElement>(null);\n  const [active, setActive] = React.useState(() => items.findIndex(isItem));\n  const [openSub, setOpenSub] = React.useState<number | null>(null);\n  const subAnchor = React.useRef<HTMLElement | null>(null);\n  const typed = React.useRef<{ s: string; t: number }>({ s: \"\", t: 0 });\n\n  React.useEffect(() => { if (autoFocus && listRef.current) listRef.current.focus({ preventScroll: true }); }, [autoFocus]);\n\n  const move = (dir: number) => {\n    setActive((a) => {\n      let i = a;\n      for (let n = 0; n < items.length; n++) {\n        i = (i + dir + items.length) % items.length;\n        if (isItem(items[i])) return i;\n      }\n      return a;\n    });\n  };\n\n  const choose = (it: MenuItem | null | undefined, i: number) => {\n    if (!it || it.disabled) return;\n    if (it.submenu && it.submenu.length) {\n      subAnchor.current = (listRef.current && listRef.current.querySelector('[data-i=\"' + i + '\"]')) as HTMLElement | null;\n      setOpenSub(i);\n      return;\n    }\n    it.onSelect && it.onSelect(it);\n    onSelect && onSelect(it);\n    onClose && onClose();\n  };\n\n  const onKey = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    if (e.key === \"ArrowDown\") { e.preventDefault(); move(1); }\n    else if (e.key === \"ArrowUp\") { e.preventDefault(); move(-1); }\n    else if (e.key === \"Home\") { e.preventDefault(); setActive(items.findIndex(isItem)); }\n    else if (e.key === \"End\") { e.preventDefault(); for (let i = items.length - 1; i >= 0; i--) if (isItem(items[i])) { setActive(i); break; } }\n    else if (e.key === \"Enter\" || e.key === \" \") { e.preventDefault(); choose(items[active], active); }\n    else if (e.key === \"ArrowRight\") { const it = items[active]; if (it && it.submenu) { e.preventDefault(); choose(it, active); } }\n    else if (e.key === \"ArrowLeft\") { if (openSub != null) { e.preventDefault(); setOpenSub(null); } }\n    else if (e.key.length === 1 && /\\S/.test(e.key)) {\n      const now = Date.now();\n      typed.current = { s: (now - typed.current.t < 700 ? typed.current.s : \"\") + e.key.toLowerCase(), t: now };\n      const hit = items.findIndex((it) => isItem(it) && String(it.label || \"\").toLowerCase().startsWith(typed.current.s));\n      if (hit >= 0) setActive(hit);\n    }\n  };\n\n  const sub = openSub != null ? items[openSub] : null;\n\n  return (\n    <React.Fragment>\n      <div className=\"fd-menu-frame\">\n        {header != null ? <div className=\"fd-menu-header\">{header}</div> : null}\n        <div\n          ref={listRef} tabIndex={-1} role=\"menu\" onKeyDown={onKey}\n          className={[\"fd-pop-list\", \"fd-menu\", className].filter(Boolean).join(\" \")}\n        >\n          {items.map((it, i) => {\n            if (!it) return null;\n            if (it.kind === \"separator\") return <div key={\"s\" + i} className=\"fd-menu-sep\" role=\"separator\" />;\n            if (it.kind === \"section\") return <div key={\"h\" + i} className=\"fd-pop-group\" role=\"presentation\">{it.label}</div>;\n            if (it.kind === \"custom\") return <div key={\"c\" + i} className=\"fd-menu-custom\">{it.render ? it.render() : null}</div>;\n            const on = !!it.checked;\n            const row = (\n              <button\n                type=\"button\" key={it.id || (it.label as React.Key) || i} data-i={i}\n                role={it.checked != null ? \"menuitemradio\" : \"menuitem\"}\n                aria-checked={it.checked != null ? on : undefined}\n                aria-haspopup={it.submenu ? \"menu\" : undefined}\n                aria-expanded={it.submenu ? openSub === i : undefined}\n                aria-disabled={it.disabled || undefined}\n                className={[\"fd-opt\", \"fd-menu-item\", i === active ? \"is-active\" : \"\", on ? \"is-selected\" : \"\"].filter(Boolean).join(\" \")}\n                onMouseEnter={() => { setActive(i); if (openSub != null && openSub !== i) setOpenSub(null); }}\n                onClick={() => choose(it, i)}\n              >\n                {it.icon ? <span className=\"fd-menu-icon\"><i className={\"ph ph-\" + it.icon} aria-hidden=\"true\" /></span> : null}\n                <span className=\"fd-menu-text\">\n                  <span className=\"fd-opt-label\">{it.label}</span>\n                  {it.description ? <span className=\"fd-opt-desc\">{it.description}</span> : null}\n                </span>\n                {it.meta ? <span className=\"fd-opt-meta\">{it.meta}</span> : null}\n                {it.shortcut ? <span className=\"fd-menu-shortcut\" aria-hidden=\"true\">{it.shortcut}</span> : null}\n                {it.submenu ? <i className=\"ph ph-caret-right fd-menu-more\" aria-hidden=\"true\" /> : null}\n                {it.checked != null ? <span className=\"fd-opt-check\">{on ? <i className=\"ph ph-check\" aria-hidden=\"true\" /> : null}</span> : null}\n              </button>\n            );\n            const ta = it.trailingAction;\n            if (!ta) return row;\n            return (\n              <div key={it.id || (it.label as React.Key) || i} className=\"fd-menu-row\" onMouseEnter={() => setActive(i)}>\n                {row}\n                <button\n                  type=\"button\" className={[\"fd-menu-row-act\", ta.danger ? \"is-danger\" : \"\"].filter(Boolean).join(\" \")}\n                  aria-label={ta.label} title={ta.label}\n                  onClick={(e) => { e.stopPropagation(); ta.onSelect && ta.onSelect(it); if (ta.closeOnSelect !== false) { onClose && onClose(); } }}\n                >\n                  <i className={\"ph ph-\" + (ta.icon || \"trash\")} aria-hidden=\"true\" />\n                </button>\n              </div>\n            );\n          })}\n        </div>\n        {footer != null ? <div className=\"fd-menu-footer\">{footer}</div> : null}\n      </div>\n      {sub && sub.submenu ? (\n        <Popover\n          open anchorRef={{ current: subAnchor.current }} placement=\"bottom-start\" offset={-6}\n          minWidth={200} maxHeight={320} label={sub.label as string | undefined} onClose={() => setOpenSub(null)}\n          className=\"fd-menu-sub\"\n        >\n          <Menu items={sub.submenu} onSelect={(it) => { onSelect && onSelect(it); onClose && onClose(); }} onClose={() => setOpenSub(null)} />\n        </Popover>\n      ) : null}\n    </React.Fragment>\n  );\n}\n\nexport interface MenuButtonProps extends Omit<MenuProps, \"onClose\" | \"autoFocus\"> {\n  label?: React.ReactNode;\n  icon?: string;\n  trailingIcon?: string | null;\n  placement?: Placement;\n  variant?: \"chip\" | \"ghost\";\n  size?: \"sm\" | \"md\";\n  disabled?: boolean;\n  title?: string;\n  ariaLabel?: string;\n  width?: number;\n  minWidth?: number;\n  maxHeight?: number;\n  children?: React.ReactNode;\n}\n\n/**\n * Trigger + menu in one: a compact chip that opens an anchored Menu.\n * Used for model pickers, row overflow actions, view switchers.\n */\nexport function MenuButton({\n  label, icon, trailingIcon = \"caret-down\", items = [], onSelect, placement = \"top-end\",\n  variant = \"chip\", size = \"sm\", disabled, title, ariaLabel, width, minWidth = 220, maxHeight = 380,\n  className = \"\", children, header, footer,\n}: MenuButtonProps) {\n  const [open, setOpen] = React.useState(false);\n  const ref = React.useRef<HTMLButtonElement>(null);\n  return (\n    <React.Fragment>\n      <button\n        type=\"button\" ref={ref} disabled={disabled} title={title}\n        aria-label={ariaLabel} aria-haspopup=\"menu\" aria-expanded={open}\n        onClick={() => setOpen((v) => !v)}\n        className={[\"fd-menubtn\", \"fd-menubtn-\" + variant, size === \"md\" ? \"is-md\" : \"\", open ? \"is-open\" : \"\", className].filter(Boolean).join(\" \")}\n      >\n        {icon ? <i className={\"ph ph-\" + icon} aria-hidden=\"true\" /> : null}\n        {children != null ? children : <span className=\"fd-menubtn-label\">{label}</span>}\n        {trailingIcon ? <i className={\"ph ph-\" + trailingIcon + \" fd-menubtn-caret\"} aria-hidden=\"true\" /> : null}\n      </button>\n      <Popover\n        open={open} anchorRef={ref} placement={placement} onClose={() => setOpen(false)}\n        width={width} minWidth={minWidth} maxHeight={maxHeight} role=\"menu\" label={(ariaLabel || label) as string | undefined}\n      >\n        <Menu items={items} header={header} footer={footer} onSelect={onSelect} onClose={() => setOpen(false)} />\n      </Popover>\n    </React.Fragment>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * MP-248: the one stack every overlay joins: Drawer, Modal, each Popover-based surface, the\n * off-canvas rail, and the inline menus and tips. The invariant: a key press acts on the\n * innermost layer only. Escape goes to the innermost layer. Tab is kept inside the innermost\n * TRAPPING layer, whose focus scope is its own DOM plus the DOM of every layer opened from\n * inside it, portaled or not.\n *\n * \"Opened from inside\" is React ownership, not DOM ancestry or timing. Each layer's parent is\n * the nearest layer above it in the component tree, read from context (which crosses a\n * portal, where the DOM does not). So a child always ranks above its parent, even when both\n * open in the same commit and the child's effects run first. Layers with the same parent rank\n * in the order they opened.\n *\n * One keydown handler serves the whole stack. It is attached to `document` for both phases:\n * the capture phase notes which layer is innermost before any handler can close it, and the\n * bubble phase acts, so an element that stops an Escape (an inline editor cancelling its own\n * edit) keeps it from every layer.\n */\n\nconst FOCUSABLE_SELECTOR =\n  'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable]:not([contenteditable=\"false\"])';\n\nexport interface StackedLayerOptions {\n  /** Whether the layer is in the stack: it owns a stacking slot (z-index) and gets focus back when it leaves. */\n  active: boolean;\n  /** The layer is leaving (its exit animation is playing) but still on screen. It keeps its stacking slot so the\n   *  exit paints where the layer was, yet it is no longer the layer a key press is for: it does not take Escape\n   *  or trap Tab, which go to the layer beneath. Default false. */\n  exiting?: boolean;\n  /** The layer's own root element: what counts as inside it for focus. */\n  containerRef: React.RefObject<HTMLElement | null>;\n  /** A modal layer: while it is the innermost trapping layer, Tab and Shift+Tab stay inside\n   *  it and the layers opened from it, and focus moves into it when it opens. */\n  trap?: boolean;\n  /** Called when Escape is pressed while this is the innermost layer. A layer without one\n   *  still takes the press, so it never reaches a layer beneath. */\n  onEscape?: () => void;\n  /** When the layer closes while holding focus (or loses focus with its DOM), focus goes back\n   *  to the element that held it when the layer opened. Default true. */\n  returnFocus?: boolean;\n}\n\n/** A layer in the stack. Pass it to `StackedLayerProvider` around what the layer renders, so\n *  anything opened from inside belongs to it. */\nexport interface StackedLayer {\n  readonly parent: StackedLayer | null;\n}\n\ninterface Layer extends StackedLayer {\n  readonly parent: Layer | null;\n  options: StackedLayerOptions;\n  /** When it opened, from a counter that only goes up; 0 while closed. */\n  order: number;\n  /** What held focus just before the layer opened. */\n  opener: HTMLElement | null;\n  /** The layer whose DOM `opener` sat in when this layer opened (a button in another dialog), if any. */\n  openerOwner: Layer | null;\n}\n\nconst LayerContext = React.createContext<Layer | null>(null);\n\nconst openLayers = new Set<Layer>();\nlet lastOrder = 0;\nlet pendingEscape: { event: KeyboardEvent; layer: Layer | null } | null = null;\n/** MP-248: the layer whose `close()` bookkeeping most recently ran, so a sibling layer\n *  opening in the very same commit — a menu item that closes its own menu and opens a\n *  Modal in one click — can inherit its opener. `document.activeElement` becomes\n *  `document.body` the instant the previously-focused element's DOM leaves, which happens\n *  before the new layer's own opener capture runs. Cleared the moment a layer opens\n *  (consumed or not), so it never answers for an unrelated, later capture. */\nlet lastClosed: Layer | null = null;\n\n/** A real, focusable opener: never `null`, never `document.body` — body is not a place\n *  focus should ever be returned to, and it is exactly what a removed element's DOM leaves\n *  behind as `document.activeElement` — and still attached to the document. */\nfunction isOpener(el: HTMLElement | null): el is HTMLElement {\n  return !!el && el !== document.body && el.isConnected;\n}\n\n/** Walks the just-closed sibling's own opener chain when the freshly captured opener is\n *  missing or was `document.body`: the element that opened the new layer sat inside a layer\n *  that closed in this same commit, so that layer's own recorded opener is the right answer. */\nfunction inheritedOpener(): HTMLElement | null {\n  let l = lastClosed;\n  lastClosed = null;\n  for (; l; l = l.parent) if (isOpener(l.opener)) return l.opener;\n  return null;\n}\n\n/** The layer's position: its open ancestors' orders, outermost first, then its own. */\nfunction rank(layer: Layer): number[] {\n  const path: number[] = [];\n  for (let l: Layer | null = layer; l; l = l.parent) if (l.order > 0) path.push(l.order);\n  return path.reverse();\n}\n\nfunction compareRank(a: number[], b: number[]): number {\n  for (let i = 0; i < Math.min(a.length, b.length); i++) if (a[i] !== b[i]) return a[i]! - b[i]!;\n  return a.length - b.length;\n}\n\nfunction innermost(where: (layer: Layer) => boolean = () => true): Layer | null {\n  let top: Layer | null = null;\n  let topRank: number[] = [];\n  for (const layer of openLayers) {\n    if (!where(layer)) continue;\n    const r = rank(layer);\n    if (!top || compareRank(r, topRank) > 0) { top = layer; topRank = r; }\n  }\n  return top;\n}\n\n/** A layer a key press can be for: every layer in the stack except one that is leaving. */\nfunction isLive(layer: Layer): boolean {\n  return !layer.options.exiting;\n}\n\nfunction isOwnedBy(layer: Layer, owner: Layer): boolean {\n  for (let l = layer.parent; l; l = l.parent) if (l === owner) return true;\n  return false;\n}\n\n/** The DOM a layer's focus scope covers: its own root and those of the open layers it owns. */\nfunction scopeOf(layer: Layer): HTMLElement[] {\n  const roots: HTMLElement[] = [];\n  for (const l of [layer, ...Array.from(openLayers).filter((o) => isOwnedBy(o, layer))]) {\n    const node = l.options.containerRef.current;\n    if (node) roots.push(node);\n  }\n  return roots;\n}\n\nfunction contains(roots: HTMLElement[], node: Node | null): boolean {\n  return !!node && roots.some((root) => root.contains(node));\n}\n\n/** Every focusable element in `roots`, once each, in document order. */\nfunction focusablesIn(roots: HTMLElement[]): HTMLElement[] {\n  const found = new Set<HTMLElement>();\n  for (const root of roots) root.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR).forEach((el) => found.add(el));\n  return Array.from(found).sort((a, b) => (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));\n}\n\nfunction focusInto(layer: Layer): void {\n  const container = layer.options.containerRef.current;\n  if (!container) return;\n  (focusablesIn([container])[0] ?? container).focus({ preventScroll: true });\n}\n\nfunction onKeydownCapture(e: KeyboardEvent): void {\n  if (e.key === \"Escape\") pendingEscape = { event: e, layer: innermost(isLive) };\n}\n\nfunction onKeydown(e: KeyboardEvent): void {\n  if (e.key === \"Escape\") {\n    const pending = pendingEscape;\n    pendingEscape = null;\n    // A layer that closed itself while the press was on its way has already handled it.\n    if (!pending || pending.event !== e || !pending.layer || pending.layer.order === 0) return;\n    pending.layer.options.onEscape?.();\n    return;\n  }\n  if (e.key === \"Tab\" && !e.defaultPrevented) keepTabInside(e);\n}\n\nfunction keepTabInside(e: KeyboardEvent): void {\n  const trap = innermost((layer) => isLive(layer) && !!layer.options.trap);\n  if (!trap || !trap.options.containerRef.current) return;\n  const scope = scopeOf(trap);\n  const items = focusablesIn(scope);\n  if (items.length === 0) {\n    e.preventDefault();\n    return;\n  }\n  const first = items[0]!;\n  const last = items[items.length - 1]!;\n  const current = document.activeElement;\n  const outside = !contains(scope, current);\n  // Inside the scope and not at its edge, the browser's own Tab order already stays inside.\n  if (e.shiftKey ? outside || current === first : outside || current === last) {\n    e.preventDefault();\n    (e.shiftKey ? last : first).focus();\n  }\n}\n\nfunction open(layer: Layer): void {\n  if (openLayers.size === 0) {\n    document.addEventListener(\"keydown\", onKeydownCapture, true);\n    document.addEventListener(\"keydown\", onKeydown);\n  }\n  openLayers.add(layer);\n  layer.order = ++lastOrder;\n  lastClosed = null;\n  zIndexVersion++;\n  notifyZIndexListeners();\n}\n\nfunction close(layer: Layer): void {\n  openLayers.delete(layer);\n  layer.order = 0;\n  lastClosed = layer;\n  if (openLayers.size === 0) {\n    document.removeEventListener(\"keydown\", onKeydownCapture, true);\n    document.removeEventListener(\"keydown\", onKeydown);\n    pendingEscape = null;\n  }\n  zIndexVersion++;\n  notifyZIndexListeners();\n}\n\n// MP-268: visual stacking is derived from the very same ownership the stack already uses for\n// Escape and Tab — see `useLayerZIndex` below for why.\n/** How far a layer's z-index sits above its parent's — also the spacing between two open\n *  layers that share a parent (siblings stack by open order, oldest lowest). */\nexport const LAYER_STEP = 10;\n/** The z-index a root layer (no parent) claims: `(index + 1) * ROOT_STEP`, where `index` is\n *  its position among the currently-open root layers, oldest first. Static, always-mounted\n *  page chrome (a sticky header, the off-canvas rail's own resting z-index) must stay under\n *  this, so no page z-index can ever outrank an overlay. */\nexport const ROOT_STEP = 100;\n/** Guaranteed to sit above any z-index this mechanism can ever compute — see\n *  TransferList.tsx's drag-ghost use. Not part of the layer tree; nothing derives from it. */\nexport const OVERLAY_CEILING = 10000;\n\nconst zIndexListeners = new Set<() => void>();\nconst notifyZIndexListeners = (): void => { zIndexListeners.forEach((listener) => listener()); };\nconst subscribeZIndex = (listener: () => void): (() => void) => {\n  zIndexListeners.add(listener);\n  return () => { zIndexListeners.delete(listener); };\n};\n/** A cheap, ever-changing token: `useSyncExternalStore` only needs *a* new value to know to\n *  re-read, never a value anything computes FROM. */\nlet zIndexVersion = 0;\nconst getZIndexVersion = (): number => zIndexVersion;\n\n/** Every layer currently open that shares `layer`'s parent (root layers share the \"parent\"\n *  of `null`), oldest first — the pool `layer` is ranked within for its own z-index slot. */\nfunction openSiblingsOf(layer: Layer): Layer[] {\n  const siblings: Layer[] = [];\n  for (const l of openLayers) if (l.parent === layer.parent) siblings.push(l);\n  return siblings.sort((a, b) => a.order - b.order);\n}\n\n/** The z-index for an OPEN layer, derived purely from the tree: a layer's slot is always\n *  `LAYER_STEP` (or more, for a later-opened sibling) above its parent's real, just-computed\n *  slot — never a second, independently-timed mechanism that can disagree with the rank\n *  `rank()`/`compareRank()` already give it for focus and Escape. A root layer's slot instead\n *  comes from its position among the other currently-open root layers (rule 2 below), which\n *  is what keeps an old, still-open root overlay from outranking one opened after it, and\n *  what keeps the numbers bounded (a slot depends on how many are open AT ONCE, never on how\n *  many have ever opened).\n *\n *  MP-268: reading `layer.parent` directly — set once, at creation, from the SAME React\n *  context `useStackedLayer` already establishes ownership from — means a child's slot never\n *  depends on which of it or its parent's `useLayoutEffect` (registration) commits first: the\n *  ownership fact is already known during render, before either layer's effect has run.\n */\nfunction computeZIndex(layer: Layer): number {\n  const path: Layer[] = [];\n  for (let l: Layer | null = layer; l; l = l.parent) path.push(l);\n  path.reverse(); // outermost ancestor first, `layer` itself last\n  let z = 0;\n  for (const l of path) {\n    const siblings = openSiblingsOf(l);\n    const index = Math.max(0, siblings.indexOf(l));\n    z = l.parent === null ? (index + 1) * ROOT_STEP : z + LAYER_STEP + index;\n  }\n  return z;\n}\n\n/** The z-index `layer` should render at right now — 0 while it is closed (nothing should be\n *  positioning off it then). Re-renders whenever any layer anywhere opens or closes, since\n *  a sibling or a parent opening/closing can change this layer's own slot. */\nexport function useLayerZIndex(layer: StackedLayer): number {\n  React.useSyncExternalStore(subscribeZIndex, getZIndexVersion, getZIndexVersion);\n  const l = layer as Layer;\n  return l.order > 0 ? computeZIndex(l) : 0;\n}\n\n/** Test-only escape hatch: forces every currently-open layer closed and the shared order\n *  counter back to zero. Production code never needs this. */\nexport const __resetLayerStackForTests = (): void => {\n  openLayers.clear();\n  lastOrder = 0;\n  pendingEscape = null;\n  lastClosed = null;\n  notifyZIndexListeners();\n};\n\n/** Runs after the closed layer's DOM is gone. Focus is only moved when the layer took it\n *  with it (or still holds it, for a layer whose DOM stays mounted); focus the user already\n *  put somewhere else is left there. When the opener is gone too (it lived in a layer that\n *  closed in the same commit, or its row was removed), the nearest owner still open takes\n *  focus, else the opener of the nearest owner that closed with it. */\n/** Where focus goes back to when `layer` closes. Normally its `opener`. An opener that sat inside another layer\n *  which has since left, or is leaving (a dialog button that closed its dialog and opened this one in the same\n *  click), is leaving the page with it: that layer's own return target is used instead, however many layers deep. */\nfunction returnTarget(layer: Layer): HTMLElement | null {\n  let { opener, openerOwner: owner } = layer;\n  while (owner && (owner.order === 0 || owner.options.exiting)) {\n    opener = owner.opener;\n    owner = owner.openerOwner;\n  }\n  return opener;\n}\n\nfunction returnFocus(layer: Layer): void {\n  if (layer.options.returnFocus === false) return;\n  const current = document.activeElement;\n  const container = layer.options.containerRef.current;\n  const lost = !current || current === document.body || (!!container && container.contains(current));\n  if (!lost) return;\n  for (let l: Layer | null = layer; l; l = l.parent) {\n    if (l !== layer && l.order > 0) { focusInto(l); return; }\n    const target = returnTarget(l);\n    if (isOpener(target)) { target.focus({ preventScroll: true }); return; }\n  }\n}\n\n/** Joins the stack while `active`. Returns the layer, for `StackedLayerProvider`. */\nexport function useStackedLayer(options: StackedLayerOptions): StackedLayer {\n  const parent = React.useContext(LayerContext);\n  const [layer] = React.useState<Layer>(() => ({ parent, options, order: 0, opener: null, openerOwner: null }));\n  const { active, exiting = false } = options;\n  // The opener is read before this commit touches the DOM: an `autoFocus` field inside the\n  // layer, or a child layer's own effects, can move focus before this layer's effects run.\n  React.useInsertionEffect(() => {\n    if (!active) return;\n    const current = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n    layer.opener = isOpener(current) ? current : inheritedOpener();\n    layer.openerOwner = layer.opener ? innermost((l) => !!l.options.containerRef.current?.contains(layer.opener)) : null;\n  }, [active, layer]);\n  React.useLayoutEffect(() => { layer.options = options; });\n  React.useLayoutEffect(() => {\n    if (!active) return;\n    open(layer);\n    return () => close(layer);\n  }, [active, layer]);\n  // A trapping layer pulls focus in when it opens, and again when it is back after an exit that was cancelled.\n  React.useLayoutEffect(() => {\n    if (active && !exiting && layer.options.trap && !contains(scopeOf(layer), document.activeElement)) focusInto(layer);\n  }, [active, exiting, layer]);\n  React.useEffect(() => {\n    if (!active) return;\n    return () => returnFocus(layer);\n  }, [active, layer]);\n  // A layer that starts leaving gives focus back at once, not when its exit animation has finished.\n  React.useEffect(() => {\n    if (active && exiting) returnFocus(layer);\n  }, [active, exiting, layer]);\n  return layer;\n}\n\n/** Makes `layer` the owner of every layer opened from inside `children`, across portals. */\nexport function StackedLayerProvider({ layer, children }: { layer: StackedLayer; children: React.ReactNode }): React.ReactElement {\n  return <LayerContext.Provider value={layer as Layer}>{children}</LayerContext.Provider>;\n}\n\n/** MP-248: whether `node` lies within `layer`'s own DOM, or the DOM of anything opened from\n *  inside it — any layer it owns, portaled or not. For outside-click dismissal, which must\n *  not fire for a click that landed inside a further layer this one opened (a Modal opened\n *  from a Popover's own content) — the stack's real ownership, not a component's own class\n *  name, which only ever recognised its own kind of layer. */\nexport function isWithinLayerTree(layer: StackedLayer, node: Node | null): boolean {\n  return contains(scopeOf(layer as Layer), node);\n}\n","\n/** Two to four mutually exclusive views — density, date range, light/dark. */\nexport interface SegmentedControlProps {\n  options: Array<string | { value: string; label: string }>;\n  value?: string;\n  onChange?: (value: string) => void;\n  /** Names the group. Each button already names itself from its own text, so the\n   *  buttons were never the gap — the GROUP was: two segmented controls in one\n   *  toolbar both announce as an unnamed group of buttons. There is no visible\n   *  `label` prop because this control is used inline next to the thing it\n   *  switches (a density toggle beside a table, a range toggle beside a chart),\n   *  where a stacked field label would be wrong; aria-label is what names it.\n   *  The rest spread below already forwarded this to the DOM — what was missing\n   *  was any typed way for a caller to pass it. */\n  \"aria-label\"?: string;\n  className?: string;\n}\n\nexport function SegmentedControl({ options = [], value, onChange, className = \"\", ...rest }: SegmentedControlProps) {\n  return (\n    <div className={[\"fd-seg\", className].filter(Boolean).join(\" \")} role=\"group\" {...rest}>\n      {options.map((o) => {\n        const v = typeof o === \"string\" ? o : o.value;\n        const label = typeof o === \"string\" ? o : o.label;\n        return (\n          <button key={v} type=\"button\" aria-pressed={v === value}\n            onClick={onChange ? () => onChange(v) : undefined}>\n            {label}\n          </button>\n        );\n      })}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { COPIED_FEEDBACK_MS, useCopyToClipboard } from \"../../kits/clipboard\";\nimport { IconButton, type IconButtonProps } from \"./IconButton\";\n\nexport interface CopyButtonProps extends Omit<IconButtonProps, \"icon\" | \"label\" | \"onClick\"> {\n  /** The text put on the clipboard. */\n  text: string;\n  /** Accessible name. Default `Copy <text>`; pass one when the text is long or opaque. */\n  label?: string;\n}\n\n/**\n * An IconButton that copies `text`. It confirms a copy that landed with a check glyph for\n * `COPIED_FEEDBACK_MS`, and reports one the browser refused with a warning glyph for the same\n * time; both are announced politely, so a screen reader hears what happened. The accessible\n * name stays \"Copy ...\" throughout.\n */\nexport function CopyButton({ text, label, ...rest }: CopyButtonProps) {\n  const [copied, copy] = useCopyToClipboard();\n  const [failed, setFailed] = React.useState(false);\n  const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  React.useEffect(() => () => { if (timer.current) clearTimeout(timer.current); }, []);\n\n  const onClick = async () => {\n    const ok = await copy(text);\n    if (timer.current) clearTimeout(timer.current);\n    setFailed(!ok);\n    if (!ok) timer.current = setTimeout(() => setFailed(false), COPIED_FEEDBACK_MS);\n  };\n  const shownFailed = failed && !copied;\n\n  return (\n    <>\n      <IconButton\n        {...rest}\n        icon={copied ? \"check\" : shownFailed ? \"warning\" : \"copy\"}\n        label={label ?? `Copy ${text}`}\n        tone={copied ? \"ok\" : shownFailed ? \"danger\" : rest.tone}\n        onClick={onClick}\n      />\n      <span className=\"fd-sr-only\" role=\"status\" aria-live=\"polite\">\n        {copied ? \"Copied\" : shownFailed ? \"Copy failed\" : \"\"}\n      </span>\n    </>\n  );\n}\n","import * as React from \"react\";\n\n/** How long a control shows \"copied\" after a successful copy. */\nexport const COPIED_FEEDBACK_MS = 1600;\n\n/** The legacy path for a browser (or an insecure context) with no async clipboard API, or one\n *  that refuses it: select a hidden textarea and ask the document to copy the selection.\n *  Selecting moves focus into the textarea, so focus goes back to where it was, or a keyboard\n *  user who pressed a Copy button would be dropped onto the page. */\nfunction copyThroughSelection(text: string): boolean {\n  const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n  const field = document.createElement(\"textarea\");\n  field.value = text;\n  field.style.position = \"fixed\";\n  field.style.opacity = \"0\";\n  document.body.appendChild(field);\n  try {\n    field.select();\n    return document.execCommand(\"copy\");\n  } catch {\n    return false;\n  } finally {\n    field.remove();\n    previouslyFocused?.focus();\n  }\n}\n\n/**\n * Puts `text` on the clipboard. Resolves `true` when it landed and `false` when the browser\n * refused every route, so a caller confirms only what really happened.\n */\nexport async function copyToClipboard(text: string): Promise<boolean> {\n  if (navigator.clipboard && navigator.clipboard.writeText) {\n    try {\n      await navigator.clipboard.writeText(text);\n      return true;\n    } catch {\n      // Denied (no permission, no user gesture): the selection route may still work.\n    }\n  }\n  return copyThroughSelection(text);\n}\n\n/**\n * `[copied, copy]`: `copy(text)` writes the clipboard (see `copyToClipboard`) and `copied` is\n * true for `COPIED_FEEDBACK_MS` after a copy that succeeded, for a \"Copied\" label or a check\n * icon. A repeat copy restarts that window, and unmounting clears it.\n */\nexport function useCopyToClipboard(): [boolean, (text: string) => Promise<boolean>] {\n  const [copied, setCopied] = React.useState(false);\n  const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const mounted = React.useRef(true);\n  React.useEffect(() => {\n    mounted.current = true;\n    return () => {\n      mounted.current = false;\n      if (timer.current) clearTimeout(timer.current);\n    };\n  }, []);\n  const copy = React.useCallback(async (text: string) => {\n    const ok = await copyToClipboard(text);\n    // A copy that settles after the component is gone has nothing left to show.\n    if (ok && mounted.current) {\n      setCopied(true);\n      if (timer.current) clearTimeout(timer.current);\n      timer.current = setTimeout(() => setCopied(false), COPIED_FEEDBACK_MS);\n    }\n    return ok;\n  }, []);\n  return [copied, copy];\n}\n","import * as React from \"react\";\nimport { useHoverIntent, isMouse } from \"../feedback/hoverIntent\";\nimport type { PopoverProps } from \"./Popover\";\n\n/** Mouse rest time before the panel opens: a pointer sweeping across the page does not\n *  flash panels, a pointer resting on the trigger opens one. */\nexport const HOVER_POPOVER_OPEN_DELAY_MS = 150;\n\nexport interface UseHoverPopoverOptions {\n  /** Mouse rest time before hover opens the panel. */\n  openDelayMs?: number;\n}\n\nexport interface HoverPopoverApi {\n  /** Spread on the trigger, with `triggerRef` as its ref. Adds the hover, focus and tap\n   *  handlers plus aria-expanded / aria-controls / aria-haspopup. */\n  triggerProps: React.HTMLAttributes<HTMLElement> & {\n    \"aria-expanded\": boolean;\n    \"aria-controls\": string;\n    \"aria-haspopup\": \"dialog\";\n  };\n  triggerRef: React.RefObject<any>;\n  /** Spread on `<Popover>` (give it a `label`): open state, anchor, close, id and the\n   *  pointer / focus handlers that keep it open while the pointer or focus is on it. */\n  popoverProps: Pick<\n    PopoverProps,\n    \"open\" | \"anchorRef\" | \"onClose\" | \"id\" | \"returnFocus\" | \"onPointerEnter\" | \"onPointerLeave\" | \"onBlur\"\n  >;\n  open: boolean;\n}\n\n/**\n * useHoverPopover: opens a `Popover` on mouse hover and keyboard focus as well as on tap, for\n * explanations too big for a Tooltip.\n *\n * It is `useHoverIntent` (the logic behind `useTooltip`: mouse-only hover, `:focus-visible`\n * focus, tap toggle, a close grace delay so the pointer can cross onto the panel) plus the\n * Popover wiring: Escape and outside press come from Popover itself, and hover or focus\n * opening never moves focus (`returnFocus` is off, so Escape leaves focus on the trigger).\n * Blur to anything outside the trigger and the panel closes it.\n */\nexport function useHoverPopover({ openDelayMs = HOVER_POPOVER_OPEN_DELAY_MS }: UseHoverPopoverOptions = {}): HoverPopoverApi {\n  const id = React.useId();\n  const panelId = id + \"-panel\";\n  const triggerRef = React.useRef<HTMLElement>(null);\n  const intent = useHoverIntent({\n    openDelayMs,\n    isInside: (n) => !!n && (!!triggerRef.current?.contains(n) || !!(n as Element).closest?.(\"#\" + CSS.escape(panelId))),\n  });\n  const open = intent.open !== null;\n  const b = intent.bind(id);\n\n  return {\n    open,\n    triggerRef,\n    triggerProps: {\n      ...b,\n      \"aria-expanded\": open,\n      \"aria-controls\": panelId,\n      \"aria-haspopup\": \"dialog\",\n    },\n    popoverProps: {\n      open,\n      anchorRef: triggerRef,\n      onClose: intent.hide,\n      id: panelId,\n      returnFocus: false,\n      onPointerEnter: (e) => { if (isMouse(e)) intent.enterSurface(); },\n      onPointerLeave: (e) => { if (isMouse(e)) intent.leaveSurface(); },\n      onBlur: (e) => {\n        const to = e.relatedTarget as Node | null;\n        if (to && (e.currentTarget.contains(to) || triggerRef.current?.contains(to))) return;\n        intent.hide();\n      },\n    },\n  };\n}\n","import * as React from \"react\";\n\n/** How long a hover surface survives the pointer leaving its target: long enough to cross the\n *  gap onto the surface itself, which is what keeps one the reader is still reading open. */\nexport const CLOSE_DELAY_MS = 120;\n\nexport type OpenReason = \"hover\" | \"focus\" | \"tap\";\n\nexport interface Open {\n  id: string;\n  reason: OpenReason;\n  anchor: Element;\n}\n\n/** The handlers that make an element a hover / focus / tap target. Spread them on any element,\n *  an SVG `<path>` included: they read the element from the event, so no wrapper is needed. */\nexport interface TooltipBinding {\n  onPointerEnter: (e: React.PointerEvent<Element>) => void;\n  onPointerLeave: (e: React.PointerEvent<Element>) => void;\n  onPointerUp: (e: React.PointerEvent<Element>) => void;\n  onFocus: (e: React.FocusEvent<Element>) => void;\n  onBlur: (e: React.FocusEvent<Element>) => void;\n}\n\nexport const isMouse = (e: React.PointerEvent) => e.pointerType === \"mouse\";\n\nexport interface HoverIntentOptions {\n  /** Mouse rest time before hover opens. 0 (default) opens at once. */\n  openDelayMs?: number;\n  /** A blur whose focus moved to this node does not close a focus-opened surface. */\n  isInside?: (node: Node | null) => boolean;\n}\n\nexport interface HoverIntent {\n  open: Open | null;\n  hide: () => void;\n  /** The pointer is on the surface itself: keep it open. */\n  enterSurface: () => void;\n  /** The pointer left the surface itself: close after the grace delay. */\n  leaveSurface: () => void;\n  bind: (id: string) => TooltipBinding;\n}\n\n/**\n * The hover-intent behaviour shared by `useTooltip` and `useHoverPopover`: mouse-only hover\n * (optional open delay, a close grace delay so the pointer can cross onto the surface),\n * `:focus-visible` keyboard focus (so a mouse click that focuses a target does not pin it open),\n * and tap for touch and pen (a second tap closes). One surface is open at a time and moves from\n * target to target. Hover never overrides a stronger reason on the same target.\n */\nexport function useHoverIntent({ openDelayMs = 0, isInside }: HoverIntentOptions = {}): HoverIntent {\n  const [open, setOpen] = React.useState<Open | null>(null);\n  const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  // The target keyboard focus is on, so a hover surface that ends hands itself back to it.\n  const focused = React.useRef<Open | null>(null);\n\n  const cancelTimer = React.useCallback(() => {\n    if (timer.current) { clearTimeout(timer.current); timer.current = null; }\n  }, []);\n  const hide = React.useCallback(() => { cancelTimer(); focused.current = null; setOpen(null); }, [cancelTimer]);\n  const show = (id: string, anchor: Element, reason: OpenReason) => { cancelTimer(); setOpen({ id, anchor, reason }); };\n  const hover = (id: string, anchor: Element) => {\n    cancelTimer();\n    const go = () => setOpen((o) => (o && o.id === id && o.reason !== \"hover\" ? o : { id, anchor, reason: \"hover\" }));\n    if (openDelayMs > 0) timer.current = setTimeout(() => { timer.current = null; go(); }, openDelayMs);\n    else go();\n  };\n  const hideSoon = () => {\n    cancelTimer();\n    timer.current = setTimeout(() => {\n      timer.current = null;\n      setOpen((o) => (o && o.reason === \"hover\" ? focused.current : o));\n    }, CLOSE_DELAY_MS);\n  };\n  React.useEffect(() => cancelTimer, [cancelTimer]);\n\n  const bind = (id: string): TooltipBinding => ({\n    onPointerEnter: (e) => { if (isMouse(e)) hover(id, e.currentTarget); },\n    onPointerLeave: (e) => { if (isMouse(e)) hideSoon(); },\n    onPointerUp: (e) => {\n      if (isMouse(e)) return;\n      if (open && open.id === id && open.reason === \"tap\") hide();\n      else show(id, e.currentTarget, \"tap\");\n    },\n    onFocus: (e) => {\n      const target = e.target as Element;\n      let keyboard = true;\n      try { keyboard = target.matches(\":focus-visible\"); } catch { /* engines without :focus-visible: treat focus as keyboard */ }\n      if (keyboard) {\n        focused.current = { id, anchor: e.currentTarget, reason: \"focus\" };\n        show(id, e.currentTarget, \"focus\");\n      }\n    },\n    onBlur: (e) => {\n      if (isInside && isInside(e.relatedTarget as Node | null)) return;\n      if (focused.current && focused.current.id === id) focused.current = null;\n      if (open && open.reason === \"focus\" && open.id === id) hide();\n    },\n  });\n\n  return { open, hide, enterSurface: cancelTimer, leaveSurface: hideSoon, bind };\n}\n","import * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { StackedLayerProvider, useStackedLayer, useLayerZIndex } from \"../../kits/layerStack\";\n\n/* MP-212: moved from media-planner's `apps/web/src/planner/screenKit.tsx` (behaviour\n   unchanged) — a wide popover anchored to the element that opened it: fixed-positioned\n   from the trigger's rect, flipped above when there isn't room below, clamped inside the\n   viewport. Originally built for the school-mix budget reallocator. */\n\nexport interface AnchoredPopoverProps {\n  rect: DOMRect | null;\n  width?: number;\n  onClose: () => void;\n  children: React.ReactNode;\n}\n\nexport function AnchoredPopover({ rect, width = 620, onClose, children }: AnchoredPopoverProps) {\n  const ref = React.useRef<HTMLDivElement>(null);\n  // MP-248: a layer in the shared stack (kits/layerStack.tsx) — Escape closes it only while\n  // nothing opened from inside it is still open, and never the Drawer or Modal around it.\n  const layer = useStackedLayer({ active: !!rect, containerRef: ref, onEscape: onClose });\n  // MP-268: was a fixed 150 — the same per-type-constant pattern that let a Modal paint\n  // under its Drawer elsewhere; derived from the same ownership as Escape/focus instead, so\n  // it can never drift out of order with whatever it opened from or opened inside it.\n  const zIndex = useLayerZIndex(layer);\n  // Purely derived from the `width` prop (and the viewport size at render time) —\n  // no need to mirror it into its own state via an effect, which only added an\n  // extra render every time `width` changed.\n  const w = Math.min(width, window.innerWidth - 32);\n  const [h, setH] = React.useState(0);\n\n  React.useLayoutEffect(() => {\n    if (!ref.current) return;\n    const measure = () => setH(ref.current ? ref.current.getBoundingClientRect().height : 0);\n    measure();\n    if (typeof ResizeObserver !== \"function\") return;\n    const ro = new ResizeObserver(measure);\n    ro.observe(ref.current);\n    return () => ro.disconnect();\n  }, [w, children]);\n\n  React.useEffect(() => {\n    const away = (e: MouseEvent) => {\n      if (ref.current && !ref.current.contains(e.target as Node)) onClose();\n    };\n    const t = setTimeout(() => document.addEventListener(\"pointerdown\", away), 0);\n    return () => {\n      clearTimeout(t);\n      document.removeEventListener(\"pointerdown\", away);\n    };\n  }, [onClose]);\n\n  if (!rect) return null;\n  const GAP = 8;\n  const PAD = 16;\n  const below = window.innerHeight - rect.bottom;\n  const up = h > 0 && below < h + GAP && rect.top > below;\n  const left = Math.max(PAD, Math.min(rect.right - w, window.innerWidth - w - PAD));\n  const rawTop = up ? rect.top - GAP - h : rect.bottom + GAP;\n  const top =\n    h > 0 ? Math.max(PAD, Math.min(rawTop, window.innerHeight - h - PAD)) : rect.bottom + GAP;\n\n  return ReactDOM.createPortal(\n    <div\n      ref={ref}\n      role=\"dialog\"\n      aria-label=\"Reallocate budget\"\n      style={{\n        position: \"fixed\",\n        left,\n        top,\n        width: w,\n        zIndex,\n        maxHeight: `calc(100vh - ${PAD * 2}px)`,\n        overflowY: \"auto\",\n        background: \"var(--surface)\",\n        border: \"1px solid var(--border)\",\n        borderRadius: 12,\n        boxShadow: \"var(--e-3)\",\n        padding: 16,\n      }}\n    >\n      <StackedLayerProvider layer={layer}>{children}</StackedLayerProvider>\n    </div>,\n    document.body,\n  );\n}\n","import type * as React from \"react\";\n\n/**\n * MP-141's kit-wide truncation rule (see the comment above `.fd-stat` in\n * components.css): an identifier may ellipsize only if it exposes its full text.\n * This is the one mechanism every component with an ellipsizable label/title slot\n * uses to honor that — never truncate without exposure, and never four separate\n * copies of the same \"is this a plain string?\" check.\n *\n * When `content` is a plain string or number, that value IS the element's full\n * text, so it becomes the native `title` (a browser tooltip on hover/focus/long-\n * press, with no extra markup or JS). When it's anything else — an element, a\n * fragment, `undefined` — there's no single string to expose: the caller passed a\n * node that already carries its own text and/or its own tooltip (e.g. `EntityRow`'s\n * `titleIcon`, wrapped together with the title in the kit's own `Tooltip`, deliberately\n * NOT a native `title` so it isn't truncated to a browser tooltip). In that case this\n * returns `undefined` and the caller renders no `title` at all, exactly as before —\n * this helper only ever ADDS exposure for the plain-string case, never removes an\n * existing one.\n */\nexport function truncationTitle(content: React.ReactNode): string | undefined {\n  if (typeof content !== \"string\" && typeof content !== \"number\") return undefined;\n  const text = String(content);\n  return text === \"\" ? undefined : text;\n}\n","import * as React from \"react\";\nimport { truncationTitle } from \"../textExposure\";\n\n/**\n * The container. White, 12px radius, hairline border, low soft shadow, and a\n * divider under the header — that divider is the signature detail on flytedesk.com.\n */\nexport interface CardProps {\n  title?: React.ReactNode;\n  /** Right-aligned control in the header — usually an IconButton or a link Button. */\n  action?: React.ReactNode;\n  footer?: React.ReactNode;\n  children?: React.ReactNode;\n  elevation?: \"flat\" | \"rest\" | \"raised\";\n  hoverable?: boolean;\n  /** Set false to let children run edge to edge (tables, images). */\n  padded?: boolean;\n  /** MP-271: renders the dashed draft/placeholder treatment — an unsaved or\n   *  not-yet-created item shown alongside real ones (SMS-12's local-draft audience\n   *  card is the first consumer). The dash uses `--border-strong`, an existing\n   *  token also used elsewhere for a \"more emphatic than the hairline default\"\n   *  border, so light, dark and `[data-contrast=\"high\"]` all resolve it correctly\n   *  with no new colour. */\n  draft?: boolean;\n  /** Renders the card as a real `<a>` (keeps `hoverable`'s lift, adds real\n   *  hover/focus-visible/press states, MP-271). Takes precedence over `onClick`.\n   *  Review (comment 2920, finding 3): when either `href` or `onClick` is set, `action`\n   *  and `footer` are rendered OUTSIDE the `<a>`/`<button>` (as ordinary siblings, via\n   *  `.fd-card-shell`) rather than inside it — an interactive Card can never nest another\n   *  interactive element, whatever `action`/`footer` contain. */\n  href?: string;\n  /** Renders the card as a real `<button type=\"button\">` when there's no `href`\n   *  (MP-271) — never a `<div onClick>`, so it's reachable by Tab and activates on\n   *  both Enter and Space for free, and gets the kit's global `:focus-visible`\n   *  ring (styles/foundations.css) without this component drawing its own. Same\n   *  `action`/`footer`-stay-outside rule as `href` above applies here too. */\n  onClick?: (e: React.MouseEvent<HTMLElement>) => void;\n  /** Passed through to the root element. A Card rendered inside CardGrid does NOT need this\n   *  set — CardGrid (MP-271) wraps each item in its own `<div role=\"listitem\">` rather than\n   *  setting `role` on the card itself; set this only when Card is used outside CardGrid and\n   *  needs a specific ARIA role of its own. */\n  role?: string;\n  tabIndex?: number;\n  className?: string;\n}\n\nexport function Card({\n  title,\n  action,\n  footer,\n  children,\n  elevation = \"rest\",\n  hoverable = false,\n  padded = true,\n  draft = false,\n  href,\n  onClick,\n  role,\n  tabIndex,\n  className = \"\",\n  ...rest\n}: CardProps) {\n  const interactive = href != null || onClick != null;\n  const cls = [\n    \"fd-card\",\n    elevation === \"flat\" ? \"fd-card-flat\" : elevation === \"raised\" ? \"fd-card-raised\" : \"\",\n    hoverable ? \"fd-card-hoverable\" : \"\",\n    draft ? \"fd-card-draft\" : \"\",\n    interactive ? \"fd-card-interactive\" : \"\",\n    className,\n  ].filter(Boolean).join(\" \");\n\n  // Review (comment 2920, finding 3): an interactive Card (href/onClick) never puts `action`\n  // or `footer` inside the `<a>`/`<button>` — that was the only path that could ever render a\n  // real interactive element nested inside another one. The title (plain text/nodes, never\n  // itself interactive) is the only header content that still lives inside the link/button.\n  const titleOnlyHead = title ? (\n    <div className=\"fd-card-head\">\n      {/* MP-141: title min-width floor + ellipsis is MP-120's own intentional\n       * contract (Card.test.tsx) — untouched here. This only adds the missing\n       * exposure: a plain-string title becomes its own native `title` so the\n       * full text is still reachable once it's clipped. */}\n      <span className=\"fd-card-head-title\" title={truncationTitle(title)}>{title}</span>\n      {!interactive && action}\n    </div>\n  ) : null;\n  const body = padded ? <div className=\"fd-card-body\">{children}</div> : children;\n  const foot = footer ? <div className=\"fd-card-foot\">{footer}</div> : null;\n\n  if (interactive) {\n    const inner = href != null ? (\n      <a href={href} onClick={onClick} className={cls} role={role} tabIndex={tabIndex} {...rest}>\n        {titleOnlyHead}\n        {body}\n      </a>\n    ) : (\n      <button type=\"button\" onClick={onClick} className={cls} role={role} tabIndex={tabIndex} {...rest}>\n        {titleOnlyHead}\n        {body}\n      </button>\n    );\n    return (\n      <div className=\"fd-card-shell\">\n        {inner}\n        {action ? <div className=\"fd-card-shell-action\">{action}</div> : null}\n        {foot}\n      </div>\n    );\n  }\n  return (\n    <div className={cls} role={role} tabIndex={tabIndex} {...rest}>\n      {titleOnlyHead}\n      {body}\n      {foot}\n    </div>\n  );\n}\n\nexport interface CardRowProps {\n  label: React.ReactNode;\n  children?: React.ReactNode;\n  className?: string;\n}\n\nexport function CardRow({ label, children, className = \"\" }: CardRowProps) {\n  return (\n    <div className={[\"fd-card-row\", className].filter(Boolean).join(\" \")}>\n      <span className=\"fd-card-row-label\">{label}</span>\n      <span className=\"fd-card-row-value\">{children}</span>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * The system's main density valve: a large, calm trigger row that opens a panel.\n * Prefer this over tabs or a second page when a screen has more than it can show.\n */\nexport interface CollapsibleProps {\n  title: React.ReactNode;\n  subtitle?: React.ReactNode;\n  /** Right-aligned status — a Badge or CsiBadge. */\n  badge?: React.ReactNode;\n  /** Phosphor icon name shown in a soft brand chip on the left. */\n  icon?: string;\n  /** Controls drawn in the header row at its right, outside the trigger button: their own tab stops, and pressing one never opens or closes the section. */\n  actions?: React.ReactNode;\n  defaultOpen?: boolean;\n  /** Pass with onToggle for controlled use. */\n  open?: boolean;\n  onToggle?: (open: boolean) => void;\n  children?: React.ReactNode;\n  className?: string;\n}\n\nexport function Collapsible({\n  title,\n  subtitle,\n  badge,\n  icon,\n  actions,\n  defaultOpen = false,\n  open,\n  onToggle,\n  children,\n  className = \"\",\n  ...rest\n}: CollapsibleProps) {\n  const [internal, setInternal] = React.useState(defaultOpen);\n  const isOpen = open === undefined ? internal : open;\n  const toggle = () => {\n    if (open === undefined) setInternal(!isOpen);\n    if (onToggle) onToggle(!isOpen);\n  };\n  const trigger = (\n    <button type=\"button\" className=\"fd-coll-trigger\" aria-expanded={isOpen} onClick={toggle}>\n      {icon ? (\n        <span className=\"fd-coll-caret\" style={{ background: \"var(--brand-soft)\", color: \"var(--brand)\", transform: \"none\" }}>\n          <i className={\"ph ph-\" + icon} aria-hidden=\"true\" />\n        </span>\n      ) : null}\n      <span style={{ flex: 1, minWidth: 0 }}>\n        <span className=\"fd-coll-title\" style={{ display: \"block\" }}>{title}</span>\n        {subtitle ? <span className=\"fd-coll-sub\" style={{ display: \"block\" }}>{subtitle}</span> : null}\n      </span>\n      {badge ? <span className=\"fd-coll-badge\">{badge}</span> : null}\n      <span className=\"fd-coll-caret\"><i className=\"ph ph-caret-down\" aria-hidden=\"true\" /></span>\n    </button>\n  );\n  return (\n    <div className={[\"fd-coll\", className].filter(Boolean).join(\" \")} data-open={isOpen ? \"true\" : \"false\"} {...rest}>\n      {actions ? (\n        <div className=\"fd-coll-head\">\n          {trigger}\n          <div className=\"fd-coll-actions\">{actions}</div>\n        </div>\n      ) : (\n        trigger\n      )}\n      <div className=\"fd-coll-panel\"><div><div className=\"fd-coll-content\">{children}</div></div></div>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { truncationTitle } from \"../textExposure\";\nimport { useClosingAnimation, PANEL_EXIT_MS } from \"../../kits/useClosingAnimation\";\nimport { inertWhen } from \"../../kits/inertWhen\";\nimport { useLastOpenValue } from \"../../kits/useLastOpenValue\";\nimport { StackedLayerProvider, useStackedLayer, useLayerZIndex, LAYER_STEP } from \"../../kits/layerStack\";\n\n/** A right-side panel for detail and editing without losing the list behind it.\n *  MP-248: always modal (declares `aria-modal=\"true\"`), so it is a trapping layer in the\n *  shared layer stack (kits/layerStack.tsx): Tab/Shift+Tab stay inside it and whatever is\n *  opened from inside it, focus returns to its trigger on close, and Escape closes it only\n *  when nothing opened from inside it is still open. */\nexport interface DrawerProps {\n  open?: boolean;\n  title?: React.ReactNode;\n  onClose?: () => void;\n  /** Plain content, or a render function receiving `close` — call it to ask the app to close (it calls `onClose` at once; the exit animation plays when the app sets `open` false). */\n  footer?: React.ReactNode | ((close: () => void) => React.ReactNode);\n  /** The drawer's content owns the whole panel: no header bar and no body padding, and the panel is the\n   *  full viewport height. For content that already has its own header and close control (a chat panel).\n   *  `title` is then only the dialog's accessible name; Escape, scrim click and focus handling are unchanged. */\n  bare?: boolean;\n  /** The dialog's accessible name. A bare Drawer has no header to name it, so it takes `label`, else `title` when that is\n   *  a string; a bare Drawer with neither (a node `title`, no `label`) is an unnamed dialog and warns in development. */\n  label?: string;\n  /** Plain content, or (like `footer`) a render function receiving `close`. */\n  children?: React.ReactNode | ((close: () => void) => React.ReactNode);\n  className?: string;\n}\n\nexport function Drawer({ open = true, title: titleNow, label: labelNow, onClose, footer: footerNow, bare = false, children: childrenNow, className = \"\", ...rest }: DrawerProps) {\n  const asideRef = React.useRef<HTMLElement>(null);\n  const { closing, close, rendered, exiting } = useClosingAnimation(!!open, onClose, PANEL_EXIT_MS);\n  // DS-26: an exit the parent started still shows what was on screen, not the content the parent has since cleared.\n  const { title, label, children, footer } = useLastOpenValue({ title: titleNow, label: labelNow, children: childrenNow, footer: footerNow }, !!open);\n  // The layer stays in the stack for the whole exit, so the exit keeps its stacking slot; `exiting` releases its keys.\n  const layer = useStackedLayer({ active: rendered, exiting, containerRef: asideRef, trap: true, onEscape: onClose ? close : undefined });\n  // MP-268: visual stacking derived from that same layer's ownership (kits/layerStack.tsx) —\n  // a Drawer opened directly from the page ranks among the other currently-open root layers\n  // by open order; one opened from inside some other overlay stacks LAYER_STEP above THAT\n  // layer's own real slot instead, however many levels deep, and always above it regardless\n  // of which of the two committed first. A Menu or Select opened from inside this Drawer\n  // reads this same real number back off `layer` — via StackedLayerProvider below — never a\n  // second, independently-timed constant.\n  const zIndex = useLayerZIndex(layer);\n  const titleId = React.useId();\n  const accessibleName = bare ? label ?? (typeof title === \"string\" ? title : undefined) : label;\n  const unnamed = !!open && bare && !accessibleName;\n  React.useEffect(() => {\n    if (process.env.NODE_ENV !== \"production\" && unnamed) console.warn(\"Drawer: a bare Drawer has no header to name it. Pass `label`, or a string `title`, so the dialog has an accessible name.\");\n  }, [unnamed]);\n  if (!rendered) return null;\n  /* Portalled to <body> on purpose. Rendered inline, the drawer's position:fixed resolves\n     against the nearest transformed ancestor — the animated screen wrapper — so it stretched\n     to the full scroll height of the page (5000px+) instead of the viewport. */\n  return createPortal(\n    <StackedLayerProvider layer={layer}>\n      {/* The scrim sits directly under its own drawer, whatever layer that drawer landed\n          on — not a fixed constant, so it can't drift out of order with it either. */}\n      <div className={\"fd-scrim\" + (closing ? \" is-closing\" : \"\")} style={{ display: \"block\", zIndex: zIndex - LAYER_STEP }} onClick={close} {...inertWhen(closing)} />\n      <aside ref={asideRef} className={[\"fd-drawer\", bare ? \"is-bare\" : \"\", closing ? \"is-closing\" : \"\", className].filter(Boolean).join(\" \")} role=\"dialog\" aria-modal=\"true\" aria-label={accessibleName} aria-labelledby={bare || label ? undefined : titleId} {...rest} style={{ zIndex }} {...inertWhen(closing)}>\n        {bare ? null : (\n          <div className=\"fd-card-head\" style={{ flex: \"none\" }}>\n            {/* MP-141: same exposure rule as Card's header — see Card.tsx. */}\n            <span id={titleId} className=\"fd-card-head-title\" title={truncationTitle(title)}>{title}</span>\n            {onClose ? <button type=\"button\" className=\"fd-btn-icon\" aria-label=\"Close\" onClick={close}><i className=\"ph ph-x\" /></button> : null}\n          </div>\n        )}\n        <div style={bare ? { flex: \"1 1 auto\", minHeight: 0, display: \"flex\", flexDirection: \"column\" } : { flex: \"1 1 auto\", minHeight: 0, overflow: \"auto\", padding: 20 }}>{typeof children === \"function\" ? children(close) : children}</div>\n        {footer ? <div className=\"fd-card-foot\" style={{ flex: \"none\" }}>{typeof footer === \"function\" ? footer(close) : footer}</div> : null}\n      </aside>\n    </StackedLayerProvider>,\n    document.body\n  );\n}\n","import * as React from \"react\";\n\n/** How long a panel-sized overlay (the Drawer, and AppShell's docked side panel) takes to leave, in ms. The one\n *  source for both: their `.is-closing` animations in styles/components.css run a hair longer (220ms) so the\n *  unmount never cuts the last frame short. */\nexport const PANEL_EXIT_MS = 210;\n\n/** The exit lifecycle of a controlled overlay. The app's `open` is the truth; the exit animation is only visual.\n *  - `close` (Escape, scrim, a close button, the render-function `close`) calls `onClose` at once and does nothing\n *    else. The app answers by setting `open` false; if it ignores the close, `open` stays true and nothing animates.\n *  - When `open` turns false the overlay is flagged `closing` and stays mounted (`rendered`) for `durationMs`, then\n *    leaves. `exiting` is that part of the exit: the overlay is still on screen but no longer the one in charge, so\n *    it releases its key handling and keeps its stacking slot (see `exiting` in kits/layerStack.tsx).\n *  - `open` turning true during the exit cancels it: the overlay is simply open again.\n *  DS-48: deferring `onClose` until the animation ended let a re-open inside that window be overwritten by the late\n *  `onClose`, so the person's click was lost. */\nexport function useClosingAnimation(open: boolean, onClose: (() => void) | undefined, durationMs: number) {\n  const [exiting, setExiting] = React.useState(false);\n  const [wasOpen, setWasOpen] = React.useState(open);\n\n  // `open` changed: decided while rendering, not in an effect, so the overlay is never unmounted for the one\n  // commit between the parent closing it and its exit starting.\n  if (open !== wasOpen) {\n    setWasOpen(open);\n    setExiting(!open);\n  }\n\n  React.useEffect(() => {\n    if (!exiting) return;\n    const timer = setTimeout(() => setExiting(false), durationMs);\n    return () => clearTimeout(timer);\n  }, [exiting, durationMs]);\n\n  const close = React.useCallback(() => {\n    if (onClose && open) onClose();\n  }, [onClose, open]);\n  return { closing: exiting, close, rendered: open || exiting, exiting };\n}\n","/** Props that make an element and everything in it inert while `on`: it takes no pointer events, cannot be focused\n *  or tabbed into, and is hidden from assistive tech. React 18's types do not know `inert`; the attribute itself\n *  works on every supported browser, and React 18 passes it through as given. */\nexport function inertWhen(on: boolean): Record<string, string> {\n  return on ? { inert: \"\" } : {};\n}\n","import * as React from \"react\";\n\n/** What an overlay should render while it leaves. Apps bind `open` to the data the overlay's content needs\n *  (`open={subject !== null}`), so when the parent closes it, that content is already gone, and the exit\n *  animation would play an emptied box. While `open` this returns `value` as it is; once `open` is false it\n *  returns the value of the last render that was open, so the exit shows what was on screen. */\nexport function useLastOpenValue<T>(value: T, open: boolean): T {\n  const lastOpen = React.useRef(value);\n  React.useLayoutEffect(() => {\n    if (open) lastOpen.current = value;\n  });\n  return open ? value : lastOpen.current;\n}\n","import * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useClosingAnimation } from \"../../kits/useClosingAnimation\";\nimport { inertWhen } from \"../../kits/inertWhen\";\nimport { useLastOpenValue } from \"../../kits/useLastOpenValue\";\nimport { StackedLayerProvider, useStackedLayer, useLayerZIndex, LAYER_STEP } from \"../../kits/layerStack\";\n\n/** A focused decision on a scrim. Max 560px, 760 with `wide` for data. Escape closes.\n *  MP-212/MP-248: a trapping layer in the shared layer stack (kits/layerStack.tsx):\n *  Tab/Shift+Tab stay inside the dialog box and whatever is opened from inside it, focus\n *  returns to the opener on close, and Escape closes it only when nothing opened from inside\n *  it is still open. Opened from inside a Drawer (or another Modal), it is that layer's child,\n *  so it is the one that traps Tab while it is open. */\nexport interface ModalProps {\n  open?: boolean;\n  title?: React.ReactNode;\n  description?: React.ReactNode;\n  onClose?: () => void;\n  /** Plain content, or a render function receiving `close` — call it to ask the app to close (it calls `onClose` at once; the exit animation plays when the app sets `open` false). */\n  footer?: React.ReactNode | ((close: () => void) => React.ReactNode);\n  /** 760px — for tables and side-by-side comparisons. */\n  wide?: boolean;\n  children?: React.ReactNode;\n  className?: string;\n}\n\nexport function Modal({ open = true, title: titleNow, description: descriptionNow, onClose, footer: footerNow, wide = false, children: childrenNow, className = \"\", ...rest }: ModalProps) {\n  const boxRef = React.useRef<HTMLDivElement>(null);\n  const { closing, close, rendered, exiting } = useClosingAnimation(!!open, onClose, 190);\n  // DS-26: an exit the parent started still shows what was on screen, not the content the parent has since cleared.\n  const { title, description, children, footer } = useLastOpenValue({ title: titleNow, description: descriptionNow, children: childrenNow, footer: footerNow }, !!open);\n  // The layer stays in the stack for the whole exit, so the exit keeps its stacking slot; `exiting` releases its keys.\n  const layer = useStackedLayer({ active: rendered, exiting, containerRef: boxRef, trap: true, onEscape: onClose ? close : undefined });\n  // MP-268: visual stacking derived from that same layer's ownership (kits/layerStack.tsx) —\n  // a Modal opened in the same commit as its Drawer always resolves above it now, because\n  // this reads `layer.parent`, set from React context during render, not a second,\n  // separately-timed registration.\n  const zIndex = useLayerZIndex(layer);\n  if (!rendered) return null;\n  /* Portalled for the same reason as Drawer: inline, the fixed-position scrim resolves\n     against the nearest transformed ancestor rather than the viewport. */\n  return createPortal(\n    <StackedLayerProvider layer={layer}>\n        <div\n          className={\"fd-scrim\" + (closing ? \" is-closing\" : \"\")}\n          style={{ zIndex: zIndex - LAYER_STEP }}\n          {...inertWhen(closing)}\n          onClick={onClose ? (e: React.MouseEvent<HTMLDivElement>) => { if (e.target === e.currentTarget) close(); } : undefined}\n        >\n          <div\n            ref={boxRef}\n            className={[\"fd-modal\", closing ? \"is-closing\" : \"\", wide ? \"fd-modal-wide\" : \"\", className].filter(Boolean).join(\" \")}\n            role=\"dialog\"\n            aria-modal=\"true\"\n            aria-label={typeof title === \"string\" ? title : undefined}\n            {...rest}\n          >\n            {title ? (\n              <div className=\"fd-modal-head\">\n                <span style={{ flex: 1, minWidth: 0 }}>\n                  <span className=\"fd-modal-title\" style={{ display: \"block\" }}>{title}</span>\n                  {description ? <span className=\"fd-body-sm fd-secondary\" style={{ display: \"block\", marginTop: 6 }}>{description}</span> : null}\n                </span>\n                {onClose ? <button type=\"button\" className=\"fd-btn-icon\" aria-label=\"Close\" onClick={close}><i className=\"ph ph-x\" /></button> : null}\n              </div>\n            ) : null}\n            <div className=\"fd-modal-body\">{children}</div>\n            {footer ? <div className=\"fd-modal-foot\">{typeof footer === \"function\" ? footer(close) : footer}</div> : null}\n          </div>\n        </div>\n    </StackedLayerProvider>,\n    document.body\n  );\n}\n","import * as React from \"react\";\n\n/* MP-212: moved from media-planner's `apps/web/src/planner/screenKit.tsx` — the page-header\n   idiom (kicker, title, lede) every full-screen planner route rendered at its top.\n   DS-39: a toolbar row (start left, end right) above the title; the former `actions` prop IS\n   `toolbarEnd` (one concept, one prop). `title` accepts an `EditableTitle`. */\n\nexport interface ScreenHeadProps {\n  kicker?: string;\n  title: React.ReactNode;\n  lede?: string;\n  /** Left of the toolbar row: navigation, small status indicators. */\n  toolbarStart?: React.ReactNode;\n  /** Right of the toolbar row: buttons and switches. */\n  toolbarEnd?: React.ReactNode;\n}\n\nexport function ScreenHead({ kicker, title, lede, toolbarStart, toolbarEnd }: ScreenHeadProps) {\n  return (\n    <div\n      style={{\n        display: \"flex\",\n        flexDirection: \"column\",\n        gap: \"var(--s-8)\",\n        marginBottom: \"var(--s-4)\",\n      }}\n    >\n      {toolbarStart || toolbarEnd ? (\n        <div className=\"fd-screenhead-toolbar\">\n          {toolbarStart ? <div className=\"fd-screenhead-toolbar-start\">{toolbarStart}</div> : null}\n          {toolbarEnd ? <div className=\"fd-screenhead-toolbar-end\">{toolbarEnd}</div> : null}\n        </div>\n      ) : null}\n      {kicker ? <span className=\"fd-overline fd-muted\">{kicker}</span> : null}\n      <h1 className=\"fd-h1\" style={{ margin: 0 }}>\n        {title}\n      </h1>\n      {lede ? (\n        <p className=\"fd-body fd-secondary\" style={{ margin: 0, maxWidth: \"70ch\" }}>\n          {lede}\n        </p>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Tooltip } from \"../feedback/Tooltip\";\n\n/* DS-39: heading text that becomes a text field in place. Renders inside ScreenHead's h1 (or\n   any heading), inheriting its font so the layout does not move when editing starts. */\n\nexport interface EditableTitleProps {\n  value: string;\n  /** Called with the new value on Enter or blur, only when it differs from `value`. */\n  onChange: (value: string) => void;\n  /** Accessible name of the edit control. Required. */\n  label: string;\n  /** Shown muted when the value is empty. */\n  placeholder?: string;\n  maxLength?: number;\n  /** Plain text, no edit affordance. */\n  readOnly?: boolean;\n  /** With `readOnly`: why it cannot be edited, shown as a tooltip. */\n  readOnlyReason?: string;\n}\n\nexport function EditableTitle({\n  value,\n  onChange,\n  label,\n  placeholder,\n  maxLength,\n  readOnly,\n  readOnlyReason,\n}: EditableTitleProps) {\n  const [editing, setEditing] = React.useState(false);\n  const [draft, setDraft] = React.useState(value);\n  const inputRef = React.useRef<HTMLInputElement>(null);\n  const buttonRef = React.useRef<HTMLButtonElement>(null);\n  const refocus = React.useRef(false);\n\n  React.useEffect(() => {\n    if (editing) {\n      // select() alone does not move focus in every browser.\n      inputRef.current?.focus();\n      inputRef.current?.select();\n    } else if (refocus.current) {\n      refocus.current = false;\n      buttonRef.current?.focus();\n    }\n  }, [editing]);\n\n  if (readOnly) {\n    const text = value || <span className=\"fd-muted\">{placeholder}</span>;\n    // A reason becomes the title's accessible description (Tooltip) and the title a tab stop,\n    // so a keyboard or screen-reader user reaches it; a `title` attribute reaches only a mouse.\n    return readOnlyReason ? (\n      <Tooltip label={readOnlyReason}>\n        <span className=\"fd-edtitle fd-edtitle-readonly\" tabIndex={0}>\n          {text}\n        </span>\n      </Tooltip>\n    ) : (\n      <span className=\"fd-edtitle fd-edtitle-readonly\">{text}</span>\n    );\n  }\n\n  const start = () => {\n    setDraft(value);\n    setEditing(true);\n  };\n  const finish = (keep: boolean, restoreFocus: boolean) => {\n    refocus.current = restoreFocus;\n    setEditing(false);\n    if (keep && draft !== value) onChange(draft);\n  };\n\n  if (editing) {\n    return (\n      <input\n        ref={inputRef}\n        className=\"fd-edtitle fd-edtitle-input\"\n        aria-label={label}\n        value={draft}\n        placeholder={placeholder}\n        maxLength={maxLength}\n        onChange={(e) => setDraft(e.target.value)}\n        onBlur={() => finish(true, false)}\n        onKeyDown={(e) => {\n          // The Enter that confirms an IME composition is not \"keep\".\n          if (e.key === \"Enter\" && !e.nativeEvent.isComposing) {\n            e.preventDefault();\n            finish(true, true);\n          } else if (e.key === \"Escape\") {\n            e.preventDefault();\n            setDraft(value);\n            finish(false, true);\n          }\n        }}\n      />\n    );\n  }\n\n  return (\n    <button\n      ref={buttonRef}\n      type=\"button\"\n      className=\"fd-edtitle fd-edtitle-btn\"\n      aria-label={label + \": \" + (value || placeholder || \"empty\") + \". Edit\"}\n      onClick={start}\n      onKeyDown={(e) => {\n        if (e.key === \"F2\") {\n          e.preventDefault();\n          start();\n        }\n      }}\n    >\n      {value ? value : <span className=\"fd-muted\">{placeholder}</span>}\n      <i className=\"ph ph-pencil-simple fd-edtitle-pencil\" aria-hidden=\"true\" />\n    </button>\n  );\n}\n","import * as React from \"react\";\nimport { useTooltip, type TooltipPlacement } from \"./useTooltip\";\n\n/** A short clarification on hover, focus or tap. Never the only place information lives. */\nexport interface TooltipProps {\n  label: React.ReactNode;\n  placement?: TooltipPlacement;\n  children?: React.ReactNode;\n  className?: string;\n}\n\n/**\n * Tooltip — the kit's one tooltip, for any trigger that can sit inside a `<span>`.\n *\n * Three ways in, because a tooltip reachable only by a mouse hides its text from\n * everyone else: hover (mouse only), keyboard focus (`:focus-visible`, so a mouse click\n * that happens to focus a button does not pin a tip open) and tap (touch or pen — there is\n * no hover on a touchscreen, so a tap toggles it). Escape and a press anywhere else\n * dismiss it; the pointer can move from the trigger onto the tip without it closing.\n *\n * The text is the trigger's accessible DESCRIPTION, not just a visual: a visually hidden\n * copy is always in the document and the trigger points at it with aria-describedby, so a\n * screen reader announces it on focus whether or not the bubble is showing at that\n * instant. The trigger is the single child element when there is one (it receives the\n * attribute); otherwise the wrapper does.\n *\n * The behaviour itself is `useTooltip`, which also anchors a tip to an element that cannot\n * be wrapped (an SVG shape). The bubble is portaled to document.body and positioned with the\n * same anchored-layer geometry as Popover (flip, clamp, follow a moving anchor), because a\n * tooltip drawn inside its trigger's box is clipped by the first `overflow: hidden` ancestor —\n * which in a fixed-width table cell or a list row is all of them.\n */\nexport function Tooltip({ label, placement = \"top\", children, className = \"\" }: TooltipProps) {\n  const id = React.useId();\n  const descId = id + \"-desc\";\n  const tip = useTooltip({ placement, className });\n\n  const described = React.isValidElement<{ \"aria-describedby\"?: string }>(children)\n    ? React.cloneElement(children, {\n      \"aria-describedby\": [children.props[\"aria-describedby\"], descId].filter(Boolean).join(\" \"),\n    })\n    : children;\n\n  return (\n    <span\n      className=\"fd-tooltip-anchor\"\n      aria-describedby={React.isValidElement(children) ? undefined : descId}\n      {...tip.bind(id, label)}\n    >\n      {described}\n      <span id={descId} hidden>{label}</span>\n      {tip.bubble}\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport { portal, usePopoverPosition } from \"../actions/Popover\";\nimport { useStackedLayer, useLayerZIndex } from \"../../kits/layerStack\";\nimport { useHoverIntent, isMouse, type Open, type TooltipBinding } from \"./hoverIntent\";\n\nexport type { TooltipBinding };\n\nexport type TooltipPlacement = \"top\" | \"bottom\";\n\nexport interface UseTooltipOptions {\n  placement?: TooltipPlacement;\n  /** Extra class names on the bubble. */\n  className?: string;\n}\n\nexport interface TooltipApi {\n  /** Props for one target. `id` names it for as long as it exists: one per target, stable across renders.\n   *  Call it in the same render as `useTooltip`, for every target: the bubble says what the labels bound in\n   *  THAT render say, so a target bound later (in an effect, a callback or a child) shows an empty tip. */\n  bind: (id: string, label: React.ReactNode) => TooltipBinding;\n  /** The bubble, or null while nothing is open. Render it once, beside the targets, never inside an `<svg>`. */\n  bubble: React.ReactNode;\n  /** The `id` of the target the tip is on, or null. */\n  activeId: string | null;\n}\n\ninterface BubbleProps {\n  open: Open;\n  labels: ReadonlyMap<string, React.ReactNode>;\n  placement: TooltipPlacement;\n  className: string;\n  onHide: () => void;\n  onEnter: () => void;\n  onLeave: () => void;\n}\n\n/** One open tip. Mounted per target (keyed by it), so a tip that moves from one shape to the next\n *  measures against the new anchor instead of keeping the old one's geometry. */\nfunction TooltipBubble({ open, labels, placement, className, onHide, onEnter, onLeave }: BubbleProps) {\n  const anchorRef = React.useRef(open.anchor as HTMLElement);\n  const bubbleRef = React.useRef<HTMLSpanElement>(null);\n  const pos = usePopoverPosition(true, anchorRef, {\n    placement: placement === \"bottom\" ? \"bottom-center\" : \"top-center\",\n    offset: 8, estHeight: 40, estWidth: 160, layerRef: bubbleRef, onDetach: onHide,\n  });\n  // MP-248: a layer in the shared stack (kits/layerStack.tsx), so Escape hides a tip before\n  // it reaches the Drawer or Modal the target sits in. A tip never holds focus, so it has\n  // none to return.\n  const layer = useStackedLayer({ active: true, containerRef: bubbleRef, onEscape: onHide, returnFocus: false });\n  // MP-268: stacks above a real ancestor overlay's z-index when the target lives inside one.\n  const zIndex = useLayerZIndex(layer);\n\n  React.useEffect(() => {\n    const away = (e: PointerEvent) => {\n      const t = e.target as Node;\n      if (open.anchor.contains(t)) return;\n      if (bubbleRef.current && bubbleRef.current.contains(t)) return;\n      onHide();\n    };\n    document.addEventListener(\"pointerdown\", away, true);\n    return () => document.removeEventListener(\"pointerdown\", away, true);\n  }, [open.anchor, onHide]);\n\n  if (!pos) return null;\n  return portal(\n    <span\n      ref={bubbleRef}\n      role=\"tooltip\"\n      className={[\"fd-tooltip\", pos.side === \"bottom\" ? \"is-below\" : \"\", className].filter(Boolean).join(\" \")}\n      style={{ left: pos.left, top: pos.top == null ? \"auto\" : pos.top, bottom: pos.bottom == null ? \"auto\" : pos.bottom, zIndex }}\n      onPointerEnter={(e) => { if (isMouse(e)) onEnter(); }}\n      onPointerLeave={(e) => { if (isMouse(e)) onLeave(); }}\n    >\n      {labels.get(open.id)}\n    </span>,\n  );\n}\n\n/**\n * useTooltip: the kit's tooltip behaviour for any element, an SVG shape included.\n *\n * `Tooltip` wraps its trigger in a `<span>`, which cannot sit between an `<svg>` and a\n * `<path>`. This hook is the same behaviour without the wrapper: spread `bind(id, label)` on\n * each target and render `bubble` once beside them. One tip is open at a time and moves from\n * target to target, so fifty states share one bubble rather than mounting fifty.\n *\n * Three ways in, because a tooltip reachable only by a mouse hides its text from everyone\n * else: hover (mouse only), keyboard focus (`:focus-visible`, so a mouse click that happens\n * to focus a target does not pin a tip open) and tap (touch or pen, which have no hover; a\n * second tap closes it). Escape and a press anywhere else dismiss it, and the pointer can\n * move from the target onto the tip without it closing.\n *\n * It does not describe its target (`aria-describedby`): `Tooltip` adds that for its one\n * trigger, while a shape's label is its own accessible name, so the caller names the target\n * and the tip only repeats it.\n */\nexport function useTooltip({ placement = \"top\", className = \"\" }: UseTooltipOptions = {}): TooltipApi {\n  const intent = useHoverIntent();\n  const { open } = intent;\n\n  // The labels of THIS render's bindings. A fresh object every render, filled by `bind` and read by the bubble\n  // (a child, rendered after the caller has bound its targets), so the bubble always says what the latest\n  // props say and nothing is kept between renders to prune or to go stale.\n  const labels = new Map<string, React.ReactNode>();\n  const bind = (id: string, label: React.ReactNode): TooltipBinding => {\n    labels.set(id, label);\n    return intent.bind(id);\n  };\n\n  const bubble = open ? (\n    <TooltipBubble\n      key={open.id}\n      open={open}\n      labels={labels}\n      placement={placement}\n      className={className}\n      onHide={intent.hide}\n      onEnter={intent.enterSurface}\n      onLeave={intent.leaveSurface}\n    />\n  ) : null;\n\n  return { bind, bubble, activeId: open ? open.id : null };\n}\n","import * as React from \"react\";\n\nexport interface PanelRowProps extends React.HTMLAttributes<HTMLDivElement> {\n  /** Exactly two panels. */\n  children: [React.ReactNode, React.ReactNode];\n}\n\n/**\n * DS-54 — two equal panels side by side that stack to one column when the row's OWN container is\n * narrower than 560px (two 272px panels and a 16px gap), following the container, not the viewport.\n * The root is the size container and the panels sit in a grid inside it, like `StatGrid`.\n * `CardGrid` does not fit: its `auto-fill` tracks leave empty columns in a wide container, so two\n * panels would not be equal halves. `StatGrid` does not fit: it is for StatTiles and steps at the\n * tile floor. `className` and native div attributes go on the root.\n */\nexport function PanelRow({ className = \"\", children, ...rest }: PanelRowProps) {\n  return (\n    <div className={[\"fd-panel-row\", className].filter(Boolean).join(\" \")} {...rest}>\n      <div className=\"fd-panel-row-panels\">{children}</div>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * MP-271 — a responsive grid for a dashboard's worth of `Card`s (SMS-12's saved-audiences\n * page is the first consumer; media-planner's own dashboards are the reason this lives here\n * rather than in sms-app — R-9 forbids a UI-generic layout primitive living in a single app).\n *\n * Column count follows the CONTAINER's own width, not the viewport: `repeat(auto-fill,\n * minmax(...))` recomputes how many tracks fit as soon as the grid's own box changes width,\n * which is exactly \"container width\" without needing a `container-type` wrapper or a\n * `@container` query — the grid element already sizes itself off its parent, the same as any\n * other block box. `--card-grid-min` (default 280px) is the floor a card may shrink to before\n * a track drops; two 280px cards plus the gap don't fit in a 375px-wide content column, so\n * that width is always exactly one column (a `minCardWidth` wider than the container clamps to\n * the container: the track floor is `min(100%, var(--card-grid-min))`, MP-299), and a typical ~1280px desktop content column fits\n * four (see CardGrid.browser.test.tsx for the measured counts this rests on, including the\n * container-vs-viewport regression case added under review comment 2920 finding 1: a fixed-\n * width container nested inside a differently-sized real viewport still shows the container's\n * own column count, which a `@media` breakpoint on `.fd-card-grid` could never do).\n *\n * Equal-height rows fall out of the grid's own default `align-items: stretch` (restated below\n * for clarity, not because the default would otherwise fail): every item in a row stretches to\n * that row's tallest item, so cards with different amounts of content still form a level row —\n * no per-card height prop, no JS measurement.\n *\n * Gaps reuse the spacing scale's own existing `fd-gap-*` utility classes (styles/layoutUtilities,\n * SMS-7) rather than a new one-off `gap` value: `gap` on a grid container is exactly the same\n * property `fd-gap-*` already sets on a flex container, so extending that vocabulary to grids\n * costs nothing new and keeps \"the medium gap\" meaning one token everywhere it's used.\n *\n * List semantics (review comment 2920 finding 2): the grid itself is `role=\"list\"`, and every\n * item WRAPS in a plain `<div role=\"listitem\">`, rather than cloning `role` onto the child's own\n * props. Wrapping instead of cloning is deliberate: `React.cloneElement` on a child whose type is\n * `React.Fragment` silently drops an added `role` prop (Fragments only accept `key`/`children`),\n * so cloning left a Fragment child with NO listitem semantics at all and no warning either. A\n * wrapper element needs no such prop-cloning heuristic, and it works identically no matter what\n * the child is — an element, a Fragment, a string, a number — because it never inspects or\n * touches the child's own props. Two behaviours fall out on top of \"wrap by default\":\n *   - Fragments are flattened first (recursively), so `<><Card/><Card/></>` as one CardGrid\n *     child becomes TWO listitems, not one listitem wrapping a Fragment.\n *   - A child that already sets its own `role` opts out of being a listitem at all (left\n *     unwrapped, exactly where React put it) — e.g. an inline empty-state message that should\n *     span every column rather than sit inside the list structure. This is the one case where\n *     \"leave it alone\" (the old cloning behaviour) is still correct, since wrapping it would\n *     just move the opt-out problem one level down.\n * The wrapper needs a stylesheet counterpart (`.fd-card-grid > [role=\"listitem\"]`, components.css)\n * so the wrapper — now the actual grid item — passes the row's stretched height through to its\n * one real child, the same way `.fd-card`'s own internal flex column already passes extra height\n * down to `.fd-card-foot`.\n */\nexport interface CardGridProps {\n  children?: React.ReactNode;\n  /** The width, in px, a card may shrink to before a column drops. Default 280 is tuned so a\n   *  375px-wide content column (a phone) is always exactly one column and a ~1280px desktop\n   *  content column fits four — see the file doc comment. A value wider than the container\n   *  collapses to one full-width column rather than overflowing it. */\n  minCardWidth?: number;\n  /** One of the spacing scale's named tiers (styles/tokens.css's `--s-*`), same vocabulary as\n   *  `fd-gap-*` (SMS-7). Applies to both the row and column gap. */\n  gap?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n  className?: string;\n  style?: React.CSSProperties;\n}\n\n/** Recursively flattens Fragment children into their own children, dropping null/undefined/\n *  boolean children along the way (React.Children.forEach already skips those). A Fragment's\n *  own `key` (if it carried one, e.g. from a keyed map of Fragments) does not need to survive\n *  onto its children individually — each of THEM keeps whatever key it already has. */\nfunction flattenFragments(children: React.ReactNode): React.ReactNode[] {\n  const out: React.ReactNode[] = [];\n  React.Children.forEach(children, (child) => {\n    if (child === null || child === undefined || typeof child === \"boolean\") return;\n    if (React.isValidElement(child) && child.type === React.Fragment) {\n      const fragmentChildren = (child.props as { children?: React.ReactNode }).children;\n      out.push(...flattenFragments(fragmentChildren));\n      return;\n    }\n    out.push(child);\n  });\n  return out;\n}\n\nexport function CardGrid({ children, minCardWidth = 280, gap = \"lg\", className = \"\", style }: CardGridProps) {\n  const items = flattenFragments(children);\n  return (\n    <div\n      role=\"list\"\n      className={[\"fd-card-grid\", \"fd-gap-\" + gap, className].filter(Boolean).join(\" \")}\n      style={{ [\"--card-grid-min\" as string]: minCardWidth + \"px\", ...style }}\n    >\n      {items.map((child, i) => {\n        if (React.isValidElement(child)) {\n          const existingRole = (child.props as { role?: string }).role;\n          // Already has its own role: leave it exactly where React put it, out of the list\n          // structure (see the file doc comment's \"opt out\" case).\n          if (existingRole) return child;\n          return (\n            <div role=\"listitem\" key={child.key ?? i}>\n              {child}\n            </div>\n          );\n        }\n        return (\n          <div role=\"listitem\" key={i}>\n            {child}\n          </div>\n        );\n      })}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * The async contract for one region of a screen. Four states, one component:\n * loading (skeleton), refreshing (previous data stays visible, dimmed and inert),\n * ready, empty/error.\n */\nexport interface LoadingRegionProps {\n  state?: \"loading\" | \"refreshing\" | \"ready\" | \"empty\" | \"error\";\n  /** What to show before first data. Mirror the ready layout. */\n  skeleton?: React.ReactNode;\n  children?: React.ReactNode;\n  /** Announced to screen readers while busy. */\n  label?: string;\n  error?: string;\n  onRetry?: () => void;\n  className?: string;\n}\n\nexport function LoadingRegion({\n  state = \"ready\",\n  skeleton,\n  children,\n  label = \"Loading\",\n  error,\n  onRetry,\n  className = \"\",\n  ...rest\n}: LoadingRegionProps) {\n  if (state === \"empty\" || state === \"error\") {\n    return (\n      <div className={[\"fd-empty\", className].filter(Boolean).join(\" \")} {...rest}>\n        <span className=\"fd-empty-icon\">\n          <i className={state === \"error\" ? \"ph ph-warning\" : \"ph ph-tray\"} aria-hidden=\"true\" />\n        </span>\n        <span className=\"fd-empty-title\">{state === \"error\" ? \"That didn't load\" : \"Nothing here yet\"}</span>\n        <span className=\"fd-empty-body\">{error || \"Data will appear here once it exists.\"}</span>\n        {onRetry ? <button type=\"button\" className=\"fd-btn fd-btn-secondary\" onClick={onRetry}>Try again</button> : null}\n      </div>\n    );\n  }\n  if (state === \"loading\") {\n    return (\n      <div className={className} role=\"status\" aria-busy=\"true\" aria-label={label} {...rest}>\n        <span className=\"fd-sr\">{label}</span>\n        {skeleton}\n      </div>\n    );\n  }\n  const stale = state === \"refreshing\";\n  return (\n    <div className={[stale ? \"fd-stale-region\" : \"\", className].filter(Boolean).join(\" \")}\n      aria-busy={stale ? \"true\" : undefined} {...rest}>\n      <div className={stale ? \"fd-stale\" : \"fd-arrived\"}>{children}</div>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Button } from \"../actions/Button\";\nimport { CornerStackPortal } from \"../../kits/cornerStack\";\nimport { ProgressBar } from \"./ProgressBar\";\n\nexport type JobCardStatus = \"active\" | \"done\" | \"failed\";\n\nexport interface JobAction {\n  label: string;\n  onClick: () => void;\n  /** Phosphor icon name, e.g. \"download-simple\" */\n  icon?: string;\n}\n\n/** One background job's whole state, exactly as the server would persist and return it —\n *  JobTray never keeps its own copy, so the same `jobs` array renders identically the\n *  instant after a page refresh as it did before. */\nexport interface Job {\n  id: string;\n  title: React.ReactNode;\n  note?: React.ReactNode;\n  status: JobCardStatus;\n  /** 0-100. Omit while `status` is \"active\" for an indeterminate bar. Ignored otherwise. */\n  progress?: number;\n  /** e.g. \"1,200 of 5,000 imported\" — shown under the bar while active. */\n  progressNote?: React.ReactNode;\n  /** The done state's call to action, e.g. { label: \"Download\", onClick, icon: \"download-simple\" }. */\n  action?: JobAction;\n  /** Shown next to the action once done, e.g. \"Kept for 24 hours\". */\n  doneNote?: React.ReactNode;\n  /** Required content once `status` is \"failed\". */\n  failureReason?: React.ReactNode;\n}\n\nexport interface JobTrayProps {\n  jobs: Job[];\n  /** Called with the job's id when its dismiss control is used. */\n  onDismiss: (id: string) => void;\n  className?: string;\n}\n\nfunction textOf(node: React.ReactNode): string {\n  if (typeof node === \"string\" || typeof node === \"number\") return String(node);\n  return \"\";\n}\n\nfunction announcementFor(job: Job): string {\n  const title = textOf(job.title) || \"Job\";\n  if (job.status === \"done\") return title + \": done\";\n  if (job.status === \"failed\") return title + \": failed\" + (job.failureReason ? \", \" + textOf(job.failureReason) : \"\");\n  return title + \": in progress\";\n}\n\n/**\n * A stack of background-job cards — exports, syncs, anything that outlives the screen that\n * started it. Entirely props-driven: no client-only timers, so a job the server persisted\n * renders in the right state (including mid-progress) the moment the page loads, refresh or\n * not. Sits in the shared bottom-right corner stack, so a toast stacks above it, never over it.\n */\nexport function JobTray({ jobs, onDismiss, className = \"\" }: JobTrayProps) {\n  const [announcement, setAnnouncement] = React.useState(\"\");\n  const prevStatuses = React.useRef<Record<string, JobCardStatus>>({});\n\n  React.useEffect(() => {\n    let next = \"\";\n    for (const job of jobs) {\n      if (prevStatuses.current[job.id] !== job.status) {\n        next = announcementFor(job);\n      }\n    }\n    const map: Record<string, JobCardStatus> = {};\n    for (const job of jobs) map[job.id] = job.status;\n    prevStatuses.current = map;\n    // Only status transitions are announced (never a raw percent), so the live region\n    // stays quiet during a determinate job's steady progress ticks.\n    if (next) setAnnouncement(next);\n  }, [jobs]);\n\n  if (jobs.length === 0) return null;\n\n  return (\n    <CornerStackPortal slot=\"jobs\">\n      <div className={[\"fd-job-tray\", className].filter(Boolean).join(\" \")}>\n        <span className=\"fd-sr\" role=\"status\" aria-live=\"polite\">{announcement}</span>\n        {jobs.map((job) => (\n          <JobCard key={job.id} job={job} onDismiss={onDismiss} />\n        ))}\n      </div>\n    </CornerStackPortal>\n  );\n}\n\nfunction JobCard({ job, onDismiss }: { job: Job; onDismiss: (id: string) => void }) {\n  const title = textOf(job.title) || \"Job\";\n  return (\n    <div className={[\"fd-job-card\", \"fd-job-card--\" + job.status].filter(Boolean).join(\" \")}>\n      <div className=\"fd-job-card-head\">\n        <span className=\"fd-job-card-title\">{job.title}</span>\n        <button\n          type=\"button\"\n          className=\"fd-btn-icon fd-btn-icon-sm\"\n          aria-label={\"Dismiss \" + title}\n          onClick={() => onDismiss(job.id)}\n        >\n          <i className=\"ph ph-x\" aria-hidden=\"true\" />\n        </button>\n      </div>\n      {job.note ? <span className=\"fd-job-card-note fd-secondary\">{job.note}</span> : null}\n\n      {job.status === \"active\" ? (\n        <div className=\"fd-job-card-progress\">\n          <ProgressBar value={job.progress} aria-label={title} />\n          {job.progressNote ? <span className=\"fd-job-card-note fd-secondary\">{job.progressNote}</span> : null}\n        </div>\n      ) : null}\n\n      {job.status === \"done\" ? (\n        <div className=\"fd-job-card-done\">\n          {job.action ? (\n            <Button variant=\"secondary\" size=\"sm\" icon={job.action.icon} onClick={job.action.onClick}>\n              {job.action.label}\n            </Button>\n          ) : null}\n          {job.doneNote ? <span className=\"fd-job-card-done-note fd-secondary\">{job.doneNote}</span> : null}\n        </div>\n      ) : null}\n\n      {job.status === \"failed\" ? (\n        <div className=\"fd-job-card-failed\" role=\"alert\">\n          <i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />\n          <span>{job.failureReason}</span>\n        </div>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { OVERLAY_CEILING, ROOT_STEP } from \"./layerStack\";\n\n/**\n * The one bottom-right corner every floating surface shares. A fixed box cannot know what\n * else is fixed to the same corner, so two surfaces that each pin themselves there land on\n * top of each other; instead each renders into its own slot of this single stack, and the\n * stack lays the slots out one above the next.\n *\n * The slots do not share a layer. The toasts are fixed at OVERLAY_CEILING: a message about what a\n * person just did is read over everything. The jobs slot sits just under the first overlay layer:\n * above the page, below every menu, popover, dialog and drawer, so a menu that opens over the bottom\n * of the page is never hidden by the tray, and the tray never covers one.\n *\n * The slots are fixed, so they take no room in the page and would cover whatever scrolls\n * beneath it. While the job tray is showing it therefore publishes how far it reaches up from\n * the viewport's bottom edge as `--fd-corner-stack-inset` on the document element, and the\n * app shell's content scroller adds that to its bottom padding: the last of the content can\n * always be scrolled clear of it.\n */\n\n/** The custom property carrying the job tray's reach up from the viewport bottom (0px when it is not showing). The toasts\n *  stack above it, and the page scrolls clear of it; the toasts, which leave on their own, add no padding. */\nexport const CORNER_STACK_INSET_PROPERTY = \"--fd-corner-stack-inset\";\n\n/** The jobs slot's layer: above the page, below the first overlay layer (a root layer claims ROOT_STEP and up). */\nconst JOBS_LAYER = ROOT_STEP - 1;\n\n/** Bottom to top: a surface earlier in this list sits closer to the corner. */\nconst SLOTS = [\"jobs\", \"toasts\"] as const;\nexport type CornerStackSlot = (typeof SLOTS)[number];\n\nconst references = new Map<CornerStackSlot, number>();\nlet host: HTMLElement | null = null;\nlet jobsObserver: ResizeObserver | null = null;\nconst slotElements = new Map<CornerStackSlot, HTMLElement>();\nconst SLOT_LAYERS: Record<CornerStackSlot, number> = { jobs: JOBS_LAYER, toasts: OVERLAY_CEILING };\n\nfunction createHost(): HTMLElement {\n  const stack = document.createElement(\"div\");\n  stack.className = \"fd-corner-stack\";\n  for (const slot of SLOTS) {\n    const element = document.createElement(\"div\");\n    element.className = \"fd-corner-stack-slot\";\n    element.dataset.cornerStackSlot = slot;\n    element.style.zIndex = String(SLOT_LAYERS[slot]);\n    stack.appendChild(element);\n    slotElements.set(slot, element);\n  }\n  document.body.appendChild(stack);\n  const jobs = slotElements.get(\"jobs\")!;\n  publishInset(jobs);\n  // An empty slot has no height, so the inset follows the jobs appearing, growing and leaving.\n  if (typeof ResizeObserver === \"function\") {\n    jobsObserver = new ResizeObserver(() => publishInset(jobs));\n    jobsObserver.observe(jobs);\n  }\n  return stack;\n}\n\nfunction publishInset(jobs: HTMLElement): void {\n  const height = jobs.offsetHeight;\n  const inset = height > 0 ? height + parseFloat(getComputedStyle(jobs).bottom) : 0;\n  document.documentElement.style.setProperty(CORNER_STACK_INSET_PROPERTY, `${inset}px`);\n}\n\nfunction acquire(slot: CornerStackSlot): HTMLElement {\n  host ??= createHost();\n  references.set(slot, (references.get(slot) ?? 0) + 1);\n  return slotElements.get(slot)!;\n}\n\nfunction release(slot: CornerStackSlot): void {\n  const remaining = (references.get(slot) ?? 1) - 1;\n  if (remaining > 0) references.set(slot, remaining);\n  else references.delete(slot);\n  if (references.size === 0 && host) {\n    jobsObserver?.disconnect();\n    jobsObserver = null;\n    document.documentElement.style.removeProperty(CORNER_STACK_INSET_PROPERTY);\n    host.remove();\n    host = null;\n    slotElements.clear();\n  }\n}\n\n/** A layout effect where there is a document (the slot is in place before the first paint), and a\n *  plain effect on a server, where React warns about a layout effect that can never run. */\nconst useSlotEffect = typeof document === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\n/** The element that is `slot` in the shared corner stack, or null until the first commit\n *  (there is no document to hold the stack while rendering on a server). The stack exists\n *  only while a surface is using it. */\nexport function useCornerStackSlot(slot: CornerStackSlot): HTMLElement | null {\n  const [element, setElement] = React.useState<HTMLElement | null>(null);\n  useSlotEffect(() => {\n    setElement(acquire(slot));\n    return () => {\n      release(slot);\n      setElement(null);\n    };\n  }, [slot]);\n  return element;\n}\n\n/** Renders `children` into `slot` of the shared corner stack. */\nexport function CornerStackPortal({ slot, children }: { slot: CornerStackSlot; children?: React.ReactNode }) {\n  const element = useCornerStackSlot(slot);\n  return element ? createPortal(children, element) : null;\n}\n\n/** DS-29: the width of a docked side panel, published on the document element while it shows so the stack\n *  sits beside it (over the content) instead of over the panel and its composer. */\nexport const CORNER_STACK_OFFSET_PROPERTY = \"--fd-corner-stack-offset\";\n\n/** DS-29: set on the document element while a side-panel sheet (the overlay-breakpoint panel) is open. The sheet\n *  covers the screen and its composer sits at the bottom, so the jobs slot is hidden until the sheet closes. */\nexport const SHEET_OPEN_ATTRIBUTE = \"data-fd-sheet-open\";\n\n/** Publishes `element`'s rendered width as the stack's right offset for as long as it is mounted. */\nexport function usePublishCornerStackOffset(ref: React.RefObject<HTMLElement | null>, active: boolean): void {\n  useSlotEffect(() => {\n    const el = ref.current;\n    if (!active || !el) return;\n    const root = document.documentElement;\n    const publish = () => root.style.setProperty(CORNER_STACK_OFFSET_PROPERTY, `${el.getBoundingClientRect().width}px`);\n    publish();\n    // jsdom has no ResizeObserver (as in the stack's own inset above); the width is then published once.\n    const observer = typeof ResizeObserver === \"function\" ? new ResizeObserver(publish) : null;\n    observer?.observe(el);\n    return () => {\n      observer?.disconnect();\n      root.style.removeProperty(CORNER_STACK_OFFSET_PROPERTY);\n    };\n  }, [ref, active]);\n}\n\n/** Marks the document while a side-panel sheet is open. */\nexport function useSheetOpenMark(active: boolean): void {\n  useSlotEffect(() => {\n    if (!active) return;\n    document.documentElement.setAttribute(SHEET_OPEN_ATTRIBUTE, \"\");\n    return () => document.documentElement.removeAttribute(SHEET_OPEN_ATTRIBUTE);\n  }, [active]);\n}\n","/** Determinate or indeterminate bar for a known long job — uploads, exports, plan builds. */\nexport interface ProgressBarProps {\n  /** 0-100. Omit for indeterminate. */\n  value?: number;\n  /** Shown above the bar, and the bar's accessible name. */\n  label?: string;\n  /** The bar's accessible name when its surroundings already show what it measures, so no label is shown. */\n  \"aria-label\"?: string;\n  showValue?: boolean;\n  className?: string;\n}\n\nexport function ProgressBar({\n  value,\n  label,\n  \"aria-label\": ariaLabel = label,\n  showValue = false,\n  className = \"\",\n  ...rest\n}: ProgressBarProps) {\n  const indeterminate = value === undefined || value === null;\n  const pct = indeterminate ? 0 : Math.max(0, Math.min(100, value));\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 8 }}>\n      {label || showValue ? (\n        <div className=\"fd-row\" style={{ justifyContent: \"space-between\", gap: 12 }}>\n          {label ? <span className=\"fd-label-lg\">{label}</span> : <span />}\n          {showValue && !indeterminate ? <span className=\"fd-num fd-secondary\">{pct}%</span> : null}\n        </div>\n      ) : null}\n      <div className={[\"fd-progress\", indeterminate ? \"fd-progress-indeterminate\" : \"\"].filter(Boolean).join(\" \")}\n        role=\"progressbar\" aria-valuenow={indeterminate ? undefined : pct}\n        aria-valuemin={0} aria-valuemax={100} aria-label={ariaLabel} {...rest}>\n        <div className=\"fd-progress-fill\" style={indeterminate ? undefined : { width: pct + \"%\" }} />\n      </div>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nexport type PhaseStatus = \"pending\" | \"active\" | \"done\" | \"failed\";\n\nexport interface Phase {\n  id: string;\n  label: React.ReactNode;\n  status: PhaseStatus;\n  /** e.g. \"importing 1,200 of 5,000\" */\n  count?: React.ReactNode;\n}\n\nexport interface PhasedProgressProps {\n  /** Ordered start to finish; render order is the order given. */\n  phases: Phase[];\n  /** Shown once the run has reached a terminal state (a phase failed, or the last is done). */\n  summary?: React.ReactNode;\n  className?: string;\n}\n\nconst ICON: Record<PhaseStatus, string> = {\n  pending: \"ph-circle\",\n  active: \"ph-circle-notch fd-phase-spin\",\n  done: \"ph-check-circle\",\n  failed: \"ph-x-circle\",\n};\n\nfunction textOf(node: React.ReactNode): string {\n  if (typeof node === \"string\" || typeof node === \"number\") return String(node);\n  return \"\";\n}\n\n/**\n * A named sequence of steps for one long server-side job (reading a source, importing rows,\n * loading a warehouse, done or failed) — entirely props-driven, so it renders correctly from\n * persisted state after a refresh, mid-run or finished. Reuse `JobTray` beside it when the\n * job also needs a dismissible card in a corner tray; use this on its own for a screen that\n * already owns the layout, such as a Sync button's inline detail.\n */\nexport function PhasedProgress({ phases, summary, className = \"\" }: PhasedProgressProps) {\n  const [announcement, setAnnouncement] = React.useState(\"\");\n  const prevStatuses = React.useRef<Record<string, PhaseStatus>>({});\n\n  React.useEffect(() => {\n    let next = \"\";\n    for (const phase of phases) {\n      if (prevStatuses.current[phase.id] !== phase.status) {\n        const label = textOf(phase.label) || \"Phase\";\n        next = label + \": \" + phase.status;\n      }\n    }\n    const map: Record<string, PhaseStatus> = {};\n    for (const phase of phases) map[phase.id] = phase.status;\n    prevStatuses.current = map;\n    // Phase transitions are announced; count updates within an active phase are not, so the\n    // live region doesn't fire on every row imported.\n    if (next) setAnnouncement(next);\n  }, [phases]);\n\n  const terminal = phases.some((p) => p.status === \"failed\") || (phases.length > 0 && phases[phases.length - 1]!.status === \"done\");\n\n  return (\n    <div className={[\"fd-phased-progress\", className].filter(Boolean).join(\" \")}>\n      <span className=\"fd-sr\" role=\"status\" aria-live=\"polite\">{announcement}</span>\n      <ol className=\"fd-phase-list\">\n        {phases.map((phase) => (\n          <li key={phase.id} className={\"fd-phase fd-phase-\" + phase.status}>\n            <i className={\"ph \" + ICON[phase.status]} aria-hidden=\"true\" />\n            <span className=\"fd-phase-label\">{phase.label}</span>\n            {phase.count ? <span className=\"fd-phase-count fd-secondary\">{phase.count}</span> : null}\n          </li>\n        ))}\n      </ol>\n      {terminal && summary ? <div className=\"fd-phase-summary\">{summary}</div> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * The shape data will occupy, shown before the first payload lands.\n * Skeletons mirror the real layout so nothing shifts on arrival.\n */\nexport interface SkeletonProps {\n  w?: number | string;\n  h?: number | string;\n  shape?: \"block\" | \"text\" | \"circle\" | \"card\";\n  radius?: string;\n  style?: React.CSSProperties;\n  className?: string;\n}\n\nexport function Skeleton({ w = \"100%\", h = 16, shape = \"block\", radius, style, className = \"\", ...rest }: SkeletonProps) {\n  const cls = [\n    \"fd-skel\",\n    shape === \"circle\" ? \"fd-skel-circle\" : shape === \"text\" ? \"fd-skel-text\" : shape === \"card\" ? \"fd-skel-card\" : \"fd-skel-block\",\n    className\n  ].filter(Boolean).join(\" \");\n  return <span aria-hidden=\"true\" className={cls}\n    style={{ display: \"block\", width: w, height: typeof h === \"number\" ? h + \"px\" : h, borderRadius: radius, ...style }} {...rest} />;\n}\n\nexport interface SkeletonTextProps {\n  lines?: number;\n  /** Per-line widths, cycled. Ragged widths read as text; equal widths read as a bug. */\n  width?: string[];\n  size?: number;\n  gap?: number;\n  className?: string;\n}\n\nexport function SkeletonText({ lines = 3, width = [\"100%\", \"92%\", \"64%\"], size = 15, gap = 8, className = \"\" }: SkeletonTextProps) {\n  return (\n    <span aria-hidden=\"true\" className={className} style={{ display: \"flex\", flexDirection: \"column\", gap: gap + \"px\" }}>\n      {Array.from({ length: lines }).map((_, i) => (\n        <span key={i} className=\"fd-skel fd-skel-text\"\n          style={{ display: \"block\", height: size + \"px\", width: width[i % width.length] }} />\n      ))}\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport { Skeleton } from \"./Skeleton\";\nimport { inertWhen } from \"../../kits/inertWhen\";\n\n/**\n * A skeleton exactly as large as the content it stands in for. `children` is that content's own\n * layout (or its fullest case), really laid out so the box takes its size at every width, yet\n * never seen, focused, clicked or read out: it is `visibility: hidden`, `inert` and\n * `aria-hidden`. A skeleton block covers it edge to edge, so the region holds its final space\n * from the first paint and nothing below it moves when the real content replaces it.\n *\n * Like Skeleton it announces nothing: pair it with a LoadingRegion (or another role=\"status\"\n * wrapper) so the busy state still reaches a screen reader. The sheen, reduced-motion pulse and\n * both themes are the skeleton block's own.\n */\nexport interface ReservedSkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n  /** The content to reserve space for. Rendered, but never shown or reachable. */\n  children: React.ReactNode;\n  /** The skeleton block's shape, as on Skeleton. */\n  shape?: \"block\" | \"card\";\n  /** Override the shape's default border radius. */\n  radius?: string;\n}\n\nexport function ReservedSkeleton({ children, shape = \"block\", radius, className = \"\", ...rest }: ReservedSkeletonProps) {\n  return (\n    <div className={[\"fd-skel-reserve\", className].filter(Boolean).join(\" \")} {...rest}>\n      <div className=\"fd-skel-reserve-content\" aria-hidden=\"true\" {...inertWhen(true)}>\n        {children}\n      </div>\n      <Skeleton className=\"fd-skel-reserve-cover\" shape={shape} radius={radius} w=\"auto\" h=\"auto\" />\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/** A small indeterminate indicator. For inline waits only — never over a whole page. */\nexport interface SpinnerProps {\n  size?: \"sm\" | \"md\" | \"lg\";\n  label?: string;\n  className?: string;\n  style?: React.CSSProperties;\n}\n\nexport function Spinner({ size = \"md\", label = \"Loading\", className = \"\", style, ...rest }: SpinnerProps) {\n  return (\n    <span role=\"status\" aria-label={label}\n      className={[\"fd-spinner\", size === \"lg\" ? \"fd-spinner-lg\" : \"\", className].filter(Boolean).join(\" \")}\n      style={style} {...rest} />\n  );\n}\n","import * as React from \"react\";\nimport { truncationTitle } from \"../textExposure\";\n\n/**\n * The app's 264px left rail. Grouped items under overline headers; the active item\n * takes a soft blue fill and deep blue label. Collapses off-canvas below 1024px.\n */\nexport interface SidebarNavItem {\n  value: string;\n  label: string;\n  /** Phosphor icon name */\n  icon: string;\n  count?: number;\n  /** Count still loading — shows a small skeleton instead of a number. */\n  loading?: boolean;\n  /** Member lacks the permission — shows a lock marker. Still navigable; the screen explains. */\n  locked?: boolean;\n  /** Designed but the backend is not wired — shows a construction marker. Still navigable;\n   *  the screen renders inert behind a coming-soon banner. */\n  preview?: boolean;\n}\n\nexport interface SidebarNavProps {\n  brand?: React.ReactNode;\n  groups: Array<{ label?: string; items: SidebarNavItem[] }>;\n  current?: string;\n  onNavigate?: (value: string) => void;\n  footer?: React.ReactNode;\n  /** Mobile: slides the off-canvas rail in. */\n  open?: boolean;\n  className?: string;\n}\n\n/* Title-attribute tip rather than the Tooltip component: these sit inside a button, and a\n   focusable tooltip trigger nested in a button is invalid and steals the click. */\nfunction Tip({ label, children }: { label: string; children?: React.ReactNode }) {\n  return <span title={label} style={{ display: \"inline-flex\", flex: \"none\" }}>{children}</span>;\n}\n\nexport const SidebarNav = React.forwardRef<HTMLElement, SidebarNavProps>(function SidebarNav(\n  { brand, groups = [], current, onNavigate, footer, open = false, className = \"\", ...rest },\n  ref,\n) {\n  return (\n    <nav\n      ref={ref}\n      // -1: never in the normal tab order, but a target for useResponsiveRail's focus\n      // trap to fall back on if the rail happens to render with no focusable item at all.\n      tabIndex={-1}\n      className={[\"fd-side\", className].filter(Boolean).join(\" \")}\n      data-open={open ? \"true\" : \"false\"}\n      {...rest}\n    >\n      {brand ? <div style={{ height: \"var(--topbar-h)\", display: \"flex\", alignItems: \"center\", padding: \"0 18px\", borderBottom: \"1px solid var(--border)\", flex: \"none\", overflow: \"hidden\" }}>{brand}</div> : null}\n      <div style={{ flex: 1, overflow: \"auto\", padding: \"4px 10px 18px\" }}>\n        {groups.map((g, gi) => (\n          <div key={gi}>\n            {g.label ? <div className=\"fd-side-group\">{g.label}</div> : null}\n            <div className=\"fd-stack\" style={{ gap: 2 }}>\n              {g.items.map((it) => (\n                <button key={it.value} type=\"button\" className=\"fd-side-item\"\n                  aria-current={current === it.value ? \"page\" : undefined}\n                  onClick={onNavigate ? () => onNavigate(it.value) : undefined}>\n                  <span className=\"fd-side-item-icon\"><i className={\"ph ph-\" + it.icon} aria-hidden=\"true\" /></span>\n                  <span style={{ flex: 1, minWidth: 0, overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }} title={truncationTitle(it.label)}>{it.label}</span>\n                  {/* A preview item is navigable — the screen renders inert behind a banner — so it\n                      gets a marker rather than being hidden or disabled. */}\n                  {it.preview ? <Tip label=\"Designed, backend not wired yet\"><i className=\"ph ph-traffic-cone\" style={{ fontSize: 13, color: \"var(--warn-solid)\", flex: \"none\" }} /></Tip> : null}\n                  {it.locked ? <Tip label=\"You do not have permission for this\"><i className=\"ph ph-lock-simple\" style={{ fontSize: 13, color: \"var(--text-muted)\", flex: \"none\" }} /></Tip> : null}\n                  {it.count !== undefined ? <span className=\"fd-side-item-count\">{it.count}</span> : null}\n                  {it.loading ? <span className=\"fd-skel fd-skel-text\" style={{ width: 22, height: 11, marginLeft: \"auto\" }} /> : null}\n                </button>\n              ))}\n            </div>\n          </div>\n        ))}\n      </div>\n      {footer ? <div style={{ borderTop: \"1px solid var(--border)\", padding: 14, flex: \"none\" }}>{footer}</div> : null}\n    </nav>\n  );\n});\n","import * as React from \"react\";\nimport { Popover } from \"../actions/Popover\";\nimport { OverflowRowContext } from \"../actions/overflowRowContext\";\nimport { truncationTitle } from \"../textExposure\";\nimport { useIsNarrow } from \"../../kits/useIsNarrow\";\n\n/** 60px app header: breadcrumb left, actions right, and a 2px route loader along its top edge. */\nexport interface TopbarProps {\n  /** A non-last crumb with `onClick` calls it (via `preventDefault`) instead of following\n   *  `href` — for a crumb that needs to run a side effect (e.g. clearing some selection)\n   *  before/instead of navigating. `href` still works on its own for a plain link crumb;\n   *  the two aren't mutually exclusive, but `onClick` wins when both are present. */\n  crumbs?: Array<{ label: string; href?: string; onClick?: () => void }>;\n  /** Rendered last, after any `overflowActions` — the one control every screen needs to\n   *  keep directly reachable (typically the account menu). Never collapses, at any width. */\n  actions?: React.ReactNode;\n  /** Secondary controls (an assistant launcher, a version badge, appearance/dev-tools\n   *  toggles, undo — whatever a screen needs beside `actions`). Rendered inline, in the\n   *  same spot `actions` used to hold everything, on a viewport wider than\n   *  `overflowBreakpoint`. At or under it, they collapse into a single \"More actions\"\n   *  menu instead of pushing the rest of the bar past the screen edge. Decided once\n   *  here, so every Topbar consumer gets it without re-solving it per screen. */\n  overflowActions?: React.ReactNode;\n  /** Viewport width (px) at or under which `overflowActions` collapses into the \"More\n   *  actions\" menu. Default 640 — comfortably covers 320/375/430 phone widths without\n   *  touching any tablet or desktop layout above it. */\n  overflowBreakpoint?: number;\n  /** Shows the indeterminate route loader on the top edge. */\n  loading?: boolean;\n  /** Mobile menu handler — renders the hamburger. */\n  onMenu?: () => void;\n  className?: string;\n}\n\nexport function Topbar({\n  crumbs = [],\n  actions,\n  overflowActions,\n  overflowBreakpoint = 640,\n  loading = false,\n  onMenu,\n  className = \"\",\n  ...rest\n}: TopbarProps) {\n  const narrow = useIsNarrow(overflowBreakpoint);\n  const [moreOpen, setMoreOpen] = React.useState(false);\n  const moreRef = React.useRef<HTMLButtonElement>(null);\n\n  return (\n    <header className={[\"fd-topbar\", narrow ? \"is-narrow\" : \"\", className].filter(Boolean).join(\" \")} {...rest}>\n      {onMenu ? <button type=\"button\" className=\"fd-btn-icon\" aria-label=\"Menu\" onClick={onMenu}><i className=\"ph ph-list\" /></button> : null}\n      <nav className=\"fd-crumb\" aria-label=\"Breadcrumb\">\n        {crumbs.map((c, i) => (\n          <React.Fragment key={i}>\n            {i > 0 ? <i className=\"ph ph-caret-right\" style={{ fontSize: 11, opacity: .6 }} aria-hidden=\"true\" /> : null}\n            {i === crumbs.length - 1 ? (\n              // MP-141: the current crumb mixes a static route label with (usually) a\n              // user-entered campaign name and is single-line by design — exposure,\n              // not wrapping, is the fix here, same rule as every other identifier.\n              <span className=\"fd-crumb-current\" title={truncationTitle(c.label)}>{c.label}</span>\n            ) : (\n              <a\n                href={c.href || \"#\"}\n                onClick={\n                  c.onClick\n                    ? (e) => {\n                        e.preventDefault();\n                        c.onClick!();\n                      }\n                    : undefined\n                }\n              >\n                {c.label}\n              </a>\n            )}\n          </React.Fragment>\n        ))}\n      </nav>\n      {overflowActions != null ? (\n        narrow ? (\n          <>\n            <button\n              type=\"button\"\n              ref={moreRef}\n              className=\"fd-btn-icon\"\n              aria-label=\"More actions\"\n              aria-haspopup=\"dialog\"\n              aria-expanded={moreOpen}\n              onClick={() => setMoreOpen((v) => !v)}\n            >\n              <i className=\"ph ph-dots-three-vertical\" aria-hidden=\"true\" />\n            </button>\n            <Popover\n              open={moreOpen}\n              anchorRef={moreRef}\n              onClose={() => setMoreOpen(false)}\n              placement=\"bottom-end\"\n              padded\n              label=\"More actions\"\n              className=\"fd-topbar-overflow\"\n            >\n              <div className=\"fd-stack fd-topbar-overflow-list\">\n                {/* MP-117 — every control queued here (Ask, a version badge,\n                 * Appearance, Dev tools, Undo, or anything else a screen collapses)\n                 * renders as one row: consistent height/spacing (`.fd-topbar-overflow-\n                 * list`'s own child rule in components.css), and — for a control that\n                 * is otherwise icon-only in the dense bar (IconButton) — its visible\n                 * label too, via OverflowRowContext. One mechanism, no per-app or\n                 * per-control duplicate \"menu row\" markup. */}\n                <OverflowRowContext.Provider value={true}>{overflowActions}</OverflowRowContext.Provider>\n              </div>\n            </Popover>\n          </>\n        ) : (\n          overflowActions\n        )\n      ) : null}\n      {actions}\n      {loading ? <span className=\"fd-topload\" aria-hidden=\"true\" /> : null}\n    </header>\n  );\n}\n","import * as React from \"react\";\n\n/** True while the viewport is at or under `breakpoint` px. Read synchronously on first\n *  render, so there is no post-mount flash between a wide and a narrow layout. */\nexport function useIsNarrow(breakpoint: number): boolean {\n  const [narrow, setNarrow] = React.useState(\n    () =>\n      typeof window !== \"undefined\" &&\n      typeof window.matchMedia === \"function\" &&\n      window.matchMedia(`(max-width: ${breakpoint}px)`).matches,\n  );\n  React.useEffect(() => {\n    if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return;\n    const mq = window.matchMedia(`(max-width: ${breakpoint}px)`);\n    const apply = () => setNarrow(mq.matches);\n    apply();\n    mq.addEventListener(\"change\", apply);\n    return () => mq.removeEventListener(\"change\", apply);\n  }, [breakpoint]);\n  return narrow;\n}\n","import * as React from \"react\";\nimport { useStackedLayer, type StackedLayer } from \"./layerStack\";\nimport { useIsNarrow } from \"./useIsNarrow\";\nimport { OVERLAY_BREAKPOINT } from \"./overlayLayout\";\n\n/**\n * MP-214: the responsive-rail behaviour every app-level shell was hand-rolling (and, in\n * sms-app's case, already diverging on — see the SMS-5 architecture-gate review). Owns:\n *\n * - overlay-vs-docked detection at `breakpoint` (default `OVERLAY_BREAKPOINT`, matching the CSS in\n *   components.css's `.fd-side` media query, pinned equal by overlayLayout.test.tsx);\n * - the rail's open/closed state, forced closed on entry to overlay and forced open on\n *   return to docked (matching the desktop-collapse behaviour PlannerShell already had);\n * - Escape-to-close while the overlay is open, and a trapping layer in the shared layer stack\n *   (layerStack.tsx) — Tab/Shift+Tab wrap inside the rail and whatever is opened from inside\n *   it, and focus returns to whatever was focused before the overlay opened;\n * - a body scroll lock while the overlay is open, so the page behind a full-height\n *   off-canvas rail can't scroll.\n *\n * `initialOpen`/`onPersist` are the seam for a desktop-only persisted preference (e.g. a\n * `usePref`-backed value) — this hook never persists anything itself, and never reads or\n * writes storage, so it stays usable in an app with no such preference at all.\n */\nexport interface UseResponsiveRailOptions {\n  /** Max-width (px) at which the rail becomes an overlay. Must match the CSS breakpoint\n   *  the consumer's `SidebarNav` styling uses — default `OVERLAY_BREAKPOINT`. */\n  breakpoint?: number;\n  /** The rail's open state on first render while docked (desktop). Ignored while the\n   *  initial viewport is already in overlay range — an overlay always starts closed. */\n  initialOpen?: boolean;\n  /** Called with the new open state whenever it changes *while docked* — the hook's only\n   *  hook into persistence. Never called for an overlay open/close, which is transient by\n   *  design (mirrors PlannerShell's `railPref`, which never persists a mobile toggle). */\n  onPersist?: (open: boolean) => void;\n}\n\nexport interface UseResponsiveRailResult {\n  /** Whether the rail is currently visible/expanded. */\n  open: boolean;\n  /** True below `breakpoint` — the rail renders as a scrimmed overlay instead of a\n   *  docked column. */\n  overlay: boolean;\n  /** Attach to the rail's root DOM node (e.g. `SidebarNav`'s forwarded ref) — required for\n   *  the focus trap and initial-focus behaviour while the overlay is open. */\n  navRef: React.RefObject<HTMLElement>;\n  /** The rail's layer. Wrap the rail's content in `StackedLayerProvider` with it, so a menu\n   *  opened from inside the rail belongs to the rail's focus scope. */\n  layer: StackedLayer;\n  /** Flips `open`. Wire directly to `Topbar`'s `onMenu` — works at every width the rail is\n   *  shown at, docked or overlay, never a no-op. */\n  toggle: () => void;\n  /** Closes the rail. Never persists, even while docked — for the scrim's onClick and\n   *  Escape, where the value is a transient dismissal rather than a stated preference. */\n  close: () => void;\n  /** Sets `open` directly. Persists via `onPersist` only while docked, same rule as\n   *  `toggle`. */\n  setOpen: (open: boolean) => void;\n}\n\nexport function useResponsiveRail(options: UseResponsiveRailOptions = {}): UseResponsiveRailResult {\n  const { breakpoint = OVERLAY_BREAKPOINT, initialOpen = true, onPersist } = options;\n  const navRef = React.useRef<HTMLElement>(null);\n\n  const overlay = useIsNarrow(breakpoint);\n  const [open, setOpenRaw] = React.useState(() => (overlay ? false : initialOpen));\n\n  const setOpen = React.useCallback(\n    (value: boolean) => {\n      setOpenRaw(value);\n      if (!overlay) onPersist?.(value);\n    },\n    [overlay, onPersist],\n  );\n  const toggle = React.useCallback(() => setOpen(!open), [open, setOpen]);\n  // Dismissal (scrim click, Escape) is never a stated desktop preference — only setOpen\n  // (from toggle, or an app calling it directly) persists.\n  const close = React.useCallback(() => setOpenRaw(false), []);\n\n  // Entering overlay always closes; returning to docked always re-opens — the same behaviour\n  // PlannerShell's own effect already had (a desktop toggle collapse is a deliberate choice, not\n  // a persisted state this hook needs to restore on return).\n  const lastOverlay = React.useRef(overlay);\n  React.useEffect(() => {\n    if (lastOverlay.current === overlay) return;\n    lastOverlay.current = overlay;\n    setOpenRaw(!overlay);\n  }, [overlay]);\n\n  const layer = useStackedLayer({ active: overlay && open, containerRef: navRef, trap: true, onEscape: close });\n\n  React.useEffect(() => {\n    if (!overlay || !open) return;\n    const previousOverflow = document.body.style.overflow;\n    document.body.style.overflow = \"hidden\";\n    return () => {\n      document.body.style.overflow = previousOverflow;\n    };\n  }, [overlay, open]);\n\n  return { open, overlay, navRef, layer, toggle, close, setOpen };\n}\n","import { useIsNarrow } from \"./useIsNarrow\";\n\n/** Max-width (px) at and below which the app shell's side rail is an overlay instead of a\n *  docked column. The one definition: `useResponsiveRail`, `AppShell` and `useOverlayLayout`\n *  read it, and an app that changes layout at the same width imports it instead of copying\n *  the number. `.fd-side`'s media query in styles/components.css is the CSS twin of this\n *  value (CSS cannot read it), pinned equal by overlayLayout.test.tsx. */\nexport const OVERLAY_BREAKPOINT = 1024;\n\n/** True while the layout is in overlay mode (the viewport is at or under\n *  `OVERLAY_BREAKPOINT`). Read synchronously on first render, so there is no flash. */\nexport function useOverlayLayout(): boolean {\n  return useIsNarrow(OVERLAY_BREAKPOINT);\n}\n","import * as React from \"react\";\nimport { useClosingAnimation, PANEL_EXIT_MS } from \"../../kits/useClosingAnimation\";\nimport { inertWhen } from \"../../kits/inertWhen\";\nimport { useLastOpenValue } from \"../../kits/useLastOpenValue\";\nimport { usePublishCornerStackOffset } from \"../../kits/cornerStack\";\nimport { useResizableWidth, type ResizableWidthOptions } from \"../../kits/useResizableWidth\";\n\n/** Arrow keys move the panel's edge this far. */\nconst KEY_STEP = 24;\n\nexport interface DockedSidePanelProps extends ResizableWidthOptions {\n  open: boolean;\n  children: React.ReactNode;\n}\n\n/** The panel AppShell docks to the right of its content, under the Topbar (AppShell.tsx owns where). It spans\n *  the height it is given and scrolls independently. It enters and leaves with the same exit lifecycle as the Drawer\n *  (`useClosingAnimation`): its outer box animates `width` (`.fd-sidepanel` keyframes) while the inner box keeps\n *  the full width, so the content slides instead of rewrapping. It is a plain box, not a landmark: what the app puts\n *  in it (AgentChatPanel is an `aside`) is the landmark, so there are never two nested. Its left edge is a\n *  keyboard- and pointer-operable resize handle. Pointer capture keeps a drag with the handle however\n *  fast or far the pointer moves, over iframes included.\n *\n *  A panel that is already open when it mounts (a page load with the panel remembered open, the window crossing the\n *  overlay breakpoint) appears at once; only an open after it has been closed slides in. The exit keeps showing the\n *  children it had while open, so an app that clears them as it closes the panel sees the panel slide out intact. */\nexport function DockedSidePanel({ open, children: childrenNow, ...widthOptions }: DockedSidePanelProps) {\n  const { closing, rendered } = useClosingAnimation(open, undefined, PANEL_EXIT_MS);\n  const children = useLastOpenValue(childrenNow, open);\n  const [animateEnter, setAnimateEnter] = React.useState(!open);\n  if (!open && !animateEnter) setAnimateEnter(true);\n  const { width, setWidth } = useResizableWidth(widthOptions);\n  const drag = React.useRef<{ startX: number; startWidth: number } | null>(null);\n  const [resizing, setResizing] = React.useState(false);\n  const boxRef = React.useRef<HTMLDivElement>(null);\n  // DS-29: the corner stack (job tray, toasts) sits beside this panel, never over its composer.\n  usePublishCornerStackOffset(boxRef, rendered);\n  if (!rendered) return null;\n\n  const onPointerDown = (e: React.PointerEvent<HTMLDivElement>) => {\n    e.preventDefault();\n    e.currentTarget.setPointerCapture(e.pointerId);\n    drag.current = { startX: e.clientX, startWidth: width };\n    setResizing(true);\n  };\n  const onPointerMove = (e: React.PointerEvent<HTMLDivElement>) => {\n    if (drag.current) setWidth(drag.current.startWidth + (drag.current.startX - e.clientX));\n  };\n  const endDrag = () => {\n    drag.current = null;\n    setResizing(false);\n  };\n  const onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    const next = { ArrowLeft: width + KEY_STEP, ArrowRight: width - KEY_STEP, Home: widthOptions.minWidth, End: widthOptions.maxWidth }[e.key];\n    if (next === undefined) return;\n    e.preventDefault();\n    setWidth(next);\n  };\n\n  return (\n    <div\n      ref={boxRef}\n      className={[\"fd-sidepanel\", animateEnter ? \"is-entering\" : \"\", closing ? \"is-closing\" : \"\", resizing ? \"is-resizing\" : \"\"].filter(Boolean).join(\" \")}\n      data-open={open ? \"true\" : \"false\"}\n      style={{ width }}\n      {...inertWhen(!open)}\n    >\n      <div className=\"fd-sidepanel-inner\" style={{ width }}>\n        <div\n          className=\"fd-sidepanel-grip\"\n          role=\"separator\"\n          aria-orientation=\"vertical\"\n          aria-label=\"Resize panel\"\n          aria-valuemin={widthOptions.minWidth}\n          aria-valuemax={widthOptions.maxWidth}\n          aria-valuenow={width}\n          tabIndex={0}\n          onPointerDown={onPointerDown}\n          onPointerMove={onPointerMove}\n          onPointerUp={endDrag}\n          onPointerCancel={endDrag}\n          onKeyDown={onKeyDown}\n        />\n        {children}\n      </div>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nexport interface ResizableWidthOptions {\n  /** The width (px) when the app owns it. Omit for an internal width that starts at `defaultWidth`. */\n  width?: number;\n  defaultWidth: number;\n  minWidth: number;\n  maxWidth: number;\n  /** Called with each new clamped width a person's resize asks for: an app saves it here, and in controlled\n   *  mode it is the only way the width moves. */\n  onChange?: (width: number) => void;\n}\n\n/** DS-26: the width of a resizable panel, kept in one place. Controlled when `width` is given, otherwise\n *  internal; either way the shown width is clamped to `[minWidth, maxWidth]` and `setWidth` clamps what it is\n *  asked for and reports only a real change. */\nexport function useResizableWidth({ width, defaultWidth, minWidth, maxWidth, onChange }: ResizableWidthOptions) {\n  const clamp = React.useCallback((w: number) => Math.max(minWidth, Math.min(maxWidth, w)), [minWidth, maxWidth]);\n  const [internal, setInternal] = React.useState(defaultWidth);\n  const shown = clamp(width ?? internal);\n  const setWidth = React.useCallback(\n    (requested: number) => {\n      const next = clamp(requested);\n      if (next === shown) return;\n      if (width === undefined) setInternal(next);\n      onChange?.(next);\n    },\n    [clamp, shown, width, onChange],\n  );\n  return { width: shown, setWidth };\n}\n","import * as React from \"react\";\nimport { SidebarNav, type SidebarNavItem } from \"./SidebarNav\";\nimport { Topbar, type TopbarProps } from \"./Topbar\";\nimport { useResponsiveRail } from \"../../kits/useResponsiveRail\";\nimport { OVERLAY_BREAKPOINT } from \"../../kits/overlayLayout\";\nimport { StackedLayerProvider } from \"../../kits/layerStack\";\nimport { Drawer } from \"../surfaces/Drawer\";\nimport { useSheetOpenMark } from \"../../kits/cornerStack\";\nimport { DockedSidePanel } from \"./DockedSidePanel\";\n\n/**\n * MP-221: the Topbar + SidebarNav + useResponsiveRail composition every flytedesk app\n * shell hand-assembled — the full-height flex column, the rail/content flex row, the\n * scrim, the overlay-close-on-navigate wiring and the centered, max-width content\n * column — lived three times over (media-planner's PlannerShell, sms-app's Shell, and\n * this package's own SidebarNav docs demo, which told every new app to copy it). The\n * design of this API reads BOTH real compositions (PlannerShell.tsx, Shell.tsx): a\n * plain \"app passes nav items + identity + actions\" shape covers everything the two\n * shared, and each of PlannerShell's app-specific extras (the command palette,\n * TestModeBar/RolePreviewBar, the assistant panel, Dev tools) stays out of it, reached\n * instead through `banner` and `sidePanel`, or rendered around AppShell entirely.\n *\n * `useResponsiveRail` itself (overlay-vs-docked detection, Escape, focus trap/return,\n * body scroll lock) is still exported on its own — AppShell only owns wiring it to a real\n * SidebarNav/Topbar/scrim so no app has to re-wire it by hand, including providing the\n * rail's layer around SidebarNav so a menu opened in the rail is inside its focus scope.\n */\n\n/** DS-26: the one side panel an AppShell manages (an agent chat, a detail pane). Wide screens dock it under the\n *  Topbar beside the content; at and below the rail's overlay breakpoint it is a bare `Drawer` sheet, so an app\n *  never branches on the viewport for it. The app owns whether it is open and, if it wants to remember it, the width. */\nexport interface AppShellSidePanel {\n  open: boolean;\n  /** Asked with `false` when a person closes the sheet (Escape, scrim). Open it by setting `open`. */\n  onOpenChange: (open: boolean) => void;\n  /** Names the sheet dialog. The docked panel is a plain box: its children (AgentChatPanel is an `aside`) are its landmark. */\n  label: string;\n  children: React.ReactNode;\n  /** The docked width in px when the app owns it; the panel then moves only as the app passes back what\n   *  `onWidthChange` reported. Omit for a width the panel keeps itself. */\n  width?: number;\n  /** The docked width before a person resizes it. Default 420. */\n  defaultWidth?: number;\n  /** Resize floor and ceiling in px. Default 340 and 760. */\n  minWidth?: number;\n  maxWidth?: number;\n  /** Called with each new width a person's resize produces, for an app to save. */\n  onWidthChange?: (width: number) => void;\n}\n\nconst DEFAULT_PANEL_WIDTH = 420;\nconst DEFAULT_PANEL_MIN_WIDTH = 340;\nconst DEFAULT_PANEL_MAX_WIDTH = 760;\n\nexport interface AppShellProps {\n  /** Rendered in SidebarNav's fixed-height brand row (e.g. FlytedeskBrand/FlytedeskMark,\n   *  optionally wrapped in a \"go home\" button — that wrapping is app behaviour, not\n   *  something AppShell can supply generically). */\n  brand?: React.ReactNode;\n  /** SidebarNav's groups. */\n  navGroups: Array<{ label?: string; items: SidebarNavItem[] }>;\n  /** The active item's value, matched against each item's own `value`. */\n  currentNav?: string;\n  /** Called with an item's value when it's clicked. AppShell closes the rail itself\n   *  first when it's an overlay — an app never has to remember that half of the wiring. */\n  onNavigate: (value: string) => void;\n  /** SidebarNav's footer slot (e.g. media-planner's \"Jump to… ⌘K\" trigger). */\n  navFooter?: React.ReactNode;\n  /** The rail's open state on first render while docked — the seam for an app's own\n   *  persisted desktop preference (e.g. a `usePref`-backed value). Ignored while the\n   *  initial viewport is already in overlay range, which always starts closed. */\n  initialNavOpen?: boolean;\n  /** Called with the new open state whenever it changes while docked — an app's hook\n   *  into persisting `initialNavOpen`. Never called for a transient overlay open/close. */\n  onNavOpenChange?: (open: boolean) => void;\n  /** Max-width (px) at which the rail becomes a scrimmed overlay instead of a docked\n   *  column. Must match the design system's own `.fd-side` breakpoint (default `OVERLAY_BREAKPOINT`)\n   *  unless an app's own CSS overrides that breakpoint too. */\n  railBreakpoint?: number;\n  /** Topbar's breadcrumbs. */\n  crumbs?: TopbarProps[\"crumbs\"];\n  /** Shows Topbar's route-loading indicator along its top edge. */\n  loading?: boolean;\n  /** Topbar's never-collapsing slot — the one control every screen needs to keep\n   *  directly reachable, typically the AccountMenu. */\n  actions: React.ReactNode;\n  /** Topbar's slot that collapses into a \"More actions\" menu under `overflowBreakpoint`\n   *  (an assistant launcher, AppearanceMenu, a version badge, Dev tools, undo, …). */\n  overflowActions?: React.ReactNode;\n  overflowBreakpoint?: number;\n  /** A full-width band rendered above the rail/content row, outside the scrollable\n   *  content column — e.g. a test-mode or role-preview banner. Omit for none. */\n  banner?: React.ReactNode;\n  /** The managed side panel (see `AppShellSidePanel`). Omit for none. */\n  sidePanel?: AppShellSidePanel;\n  /** Max width of the centered content column: a px number, or `\"none\"` for a\n   *  full-width app whose pages fill the space beside the sidebar (SMS-50). Default\n   *  1440 — the value most flytedesk app shells use. */\n  contentMaxWidth?: number | \"none\";\n  /** The shell's own height. Default `\"100vh\"`, correct for the real, top-level use\n   *  every app mounts this at. A demo or preview embedding AppShell inside a bounded\n   *  container (this package's own docs site) passes e.g. `\"100%\"` instead. */\n  height?: string | number;\n  /** Extra class name on the content column (e.g. media-planner's container-query\n   *  class for its own responsive grids). */\n  contentClassName?: string;\n  className?: string;\n  /** The routed screen content, rendered inside the padded, centered content column. */\n  children: React.ReactNode;\n}\n\nexport function AppShell({\n  brand,\n  navGroups,\n  currentNav,\n  onNavigate,\n  navFooter,\n  initialNavOpen = true,\n  onNavOpenChange,\n  railBreakpoint = OVERLAY_BREAKPOINT,\n  crumbs,\n  loading,\n  actions,\n  overflowActions,\n  overflowBreakpoint,\n  banner,\n  sidePanel,\n  contentMaxWidth = 1440,\n  height = \"100vh\",\n  contentClassName = \"\",\n  className = \"\",\n  children,\n}: AppShellProps) {\n  const rail = useResponsiveRail({\n    breakpoint: railBreakpoint,\n    initialOpen: initialNavOpen,\n    onPersist: onNavOpenChange,\n  });\n\n  useSheetOpenMark(Boolean(sidePanel?.open) && rail.overlay);\n\n  return (\n    <div\n      className={[\"fd-app-shell\", className].filter(Boolean).join(\" \")}\n      style={{ display: \"flex\", flexDirection: \"column\", height, overflow: \"hidden\" }}\n    >\n      {banner}\n      <div style={{ display: \"flex\", flex: 1, minWidth: 0, minHeight: 0, overflow: \"hidden\" }}>\n        <StackedLayerProvider layer={rail.layer}>\n          <SidebarNav\n            ref={rail.navRef}\n            brand={brand}\n            groups={navGroups}\n            current={currentNav}\n            open={rail.open}\n            footer={navFooter}\n            onNavigate={(value) => {\n              onNavigate(value);\n              if (rail.overlay) rail.close();\n            }}\n          />\n        </StackedLayerProvider>\n        {rail.overlay && rail.open ? (\n          <button type=\"button\" className=\"fd-nav-scrim\" aria-label=\"Close navigation\" onClick={rail.close} />\n        ) : null}\n\n        <div style={{ flex: 1, display: \"flex\", flexDirection: \"column\", minWidth: 0, minHeight: 0 }}>\n          <Topbar\n            crumbs={crumbs}\n            loading={loading}\n            onMenu={rail.toggle}\n            overflowActions={overflowActions}\n            overflowBreakpoint={overflowBreakpoint}\n            actions={actions}\n          />\n          <div style={{ flex: 1, display: \"flex\", minWidth: 0, minHeight: 0 }}>\n            <div\n              className={[\"fd-app-shell-content\", contentClassName].filter(Boolean).join(\" \")}\n              style={{\n                flex: 1,\n                minWidth: 0,\n                // MP-298: positioned so absolutely positioned content inside (a chart's `.fd-sr` data\n                // table) is contained and clipped by this scroller, never stretching the document.\n                position: \"relative\",\n                overflowY: \"auto\",\n                maxWidth: contentMaxWidth,\n                margin: \"0 auto\",\n                width: \"100%\",\n                boxSizing: \"border-box\",\n              }}\n            >\n              {children}\n            </div>\n            {/* DS-26: where the side panel sits. This one slot is the whole placement decision: below the\n                Topbar, beside the content, full remaining height. Beside the Topbar instead (from the\n                window's top edge) would be this element moving up to the row that holds the rail. */}\n            {sidePanel && !rail.overlay ? (\n              <DockedSidePanel\n                open={sidePanel.open}\n                width={sidePanel.width}\n                defaultWidth={sidePanel.defaultWidth ?? DEFAULT_PANEL_WIDTH}\n                minWidth={sidePanel.minWidth ?? DEFAULT_PANEL_MIN_WIDTH}\n                maxWidth={sidePanel.maxWidth ?? DEFAULT_PANEL_MAX_WIDTH}\n                onChange={sidePanel.onWidthChange}\n              >\n                {sidePanel.children}\n              </DockedSidePanel>\n            ) : null}\n          </div>\n        </div>\n\n        {sidePanel && rail.overlay ? (\n          <Drawer bare open={sidePanel.open} label={sidePanel.label} onClose={() => sidePanel.onOpenChange(false)}>\n            {sidePanel.children}\n          </Drawer>\n        ) : null}\n      </div>\n    </div>\n  );\n}\n","/** The real flytedesk wordmark. A genuinely transparent-background SVG (verified —\n *  every non-ink pixel is alpha:0, not painted white; the old PNG's \"white-bg\"\n *  filename was misleading, it was transparent too) drawn in a fixed dark navy\n *  (#052E4A) — it has no light/white colorway of its own. SVG over the old PNG for\n *  real infinite scalability, not a fixed-resolution raster stretched or downsampled\n *  per size variant. Dark-theme visibility is handled in CSS (.fd-brand-mark),\n *  not by shipping a second asset — see that rule's comment. */\nconst LOGO_SRC =\n  \"https://cdn.prod.website-files.com/69a96def413819b7db64de8c/69ac8ec2ed84b986a5fb76dc_Logo%20(dark)%202.svg\";\n\nexport interface FlytedeskMarkProps {\n  size?: \"sm\" | \"md\" | \"lg\";\n  className?: string;\n}\n\n/** Just the flytedesk logo, no label — for contexts too small for a stacked brand\n *  (a collapsed rail, a favicon-sized corner mark). */\nexport function FlytedeskMark({ size = \"md\", className = \"\", ...rest }: FlytedeskMarkProps) {\n  return (\n    <span className={[\"fd-brand-mark\", size !== \"md\" ? \"fd-brand-mark-\" + size : \"\", className].filter(Boolean).join(\" \")} {...rest}>\n      <img src={LOGO_SRC} alt=\"flytedesk\" />\n    </span>\n  );\n}\n\nexport interface FlytedeskBrandProps {\n  /** The consuming app's name, shown under the logo — e.g. \"Media Planner\", \"Admin\". */\n  appName: string;\n  size?: \"sm\" | \"md\" | \"lg\";\n  className?: string;\n}\n\n/** The flytedesk logo stacked over the app's name — meant to drop straight into\n *  SidebarNav's `brand` slot in every flytedesk app. */\nexport function FlytedeskBrand({ appName, size = \"md\", className = \"\", ...rest }: FlytedeskBrandProps) {\n  return (\n    <span className={[\"fd-brand\", size !== \"md\" ? \"fd-brand-\" + size : \"\", className].filter(Boolean).join(\" \")} {...rest}>\n      <FlytedeskMark size={size} />\n      <span className=\"fd-overline fd-muted\">{appName}</span>\n    </span>\n  );\n}\n\n/**\n * MP-221: the Flytedesk favicon — the exact `.ico` media-planner and sms-app both\n * shipped as a byte-identical copy in `apps/web/public/favicon.ico` (SMS-5 gate\n * review) — now ships as a real file in this package, at `assets/favicon.ico`\n * (`\"./assets/*\"` in package.json's `exports`). A Vite app resolves it with the same\n * `?url` suffix it already uses for any other imported asset, then installs it with\n * this helper instead of hand-writing the `<link rel=\"icon\">` DOM code per app:\n *\n *   import favicon from \"@flytedan/flytebot-design-system/assets/favicon.ico?url\";\n *   import { installFlytedeskFavicon } from \"@flytedan/flytebot-design-system\";\n *\n *   installFlytedeskFavicon(favicon); // once, e.g. at the top of main.tsx\n *\n * Takes the resolved URL rather than resolving it itself: asset URL resolution is the\n * consuming app's own bundler's job (Vite rewrites the import at build time to a\n * hashed, content-addressed path), not something this package can do on an app's\n * behalf without bundling a copy of every app's Vite config.\n */\nexport function installFlytedeskFavicon(url: string): void {\n  if (typeof document === \"undefined\") return;\n  let link = document.querySelector<HTMLLinkElement>(\"link[rel~='icon']\");\n  if (!link) {\n    link = document.createElement(\"link\");\n    link.rel = \"icon\";\n    document.head.appendChild(link);\n  }\n  link.href = url;\n}\n","import * as React from \"react\";\n\n/** Width, in px, of the edge fade (styles/components.css `.fd-tabs`): a tab revealed by scrolling is\n *  kept this far inside the strip's edge, so it is never left sitting under a fade. */\nconst FADE_WIDTH = 32;\n\nexport interface TabItem {\n  value: string;\n  label: string;\n  count?: number;\n  /** `attention` colours the count as work that is waiting. Without it the count is neutral. */\n  tone?: \"attention\";\n}\n\n/**\n * Places within one screen. Underline only — no pill tabs in the product.\n * Tabs that do not fit scroll sideways, fading the edge that has more, with the active tab kept in view.\n */\nexport interface TabsProps {\n  tabs: Array<string | TabItem>;\n  value?: string;\n  onChange?: (value: string) => void;\n  className?: string;\n}\n\nexport function Tabs({ tabs = [], value, onChange, className = \"\", ...rest }: TabsProps) {\n  const strip = React.useRef<HTMLDivElement>(null);\n  const [more, setMore] = React.useState({ start: false, end: false });\n\n  const measure = React.useCallback(() => {\n    const el = strip.current;\n    if (!el) return;\n    const start = el.scrollLeft > 1;\n    const end = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;\n    setMore((m) => (m.start === start && m.end === end ? m : { start, end }));\n  }, []);\n\n  React.useLayoutEffect(() => {\n    const el = strip.current;\n    measure();\n    if (!el || typeof ResizeObserver === \"undefined\") return;\n    const observer = new ResizeObserver(measure);\n    observer.observe(el);\n    return () => observer.disconnect();\n  }, [measure, tabs]);\n\n  /** Scrolls the active tab just inside the strip's edges (clear of the fades); a no-op when it already is. */\n  const revealActive = React.useCallback(() => {\n    const el = strip.current;\n    const active = el?.querySelector<HTMLElement>('[aria-selected=\"true\"]');\n    if (!el || !active || el.scrollWidth <= el.clientWidth) return;\n    const box = el.getBoundingClientRect();\n    const tab = active.getBoundingClientRect();\n    if (tab.left < box.left + FADE_WIDTH) el.scrollLeft += tab.left - box.left - FADE_WIDTH;\n    else if (tab.right > box.right - FADE_WIDTH) el.scrollLeft += tab.right - box.right + FADE_WIDTH;\n    measure();\n  }, [measure]);\n\n  React.useLayoutEffect(revealActive, [value, revealActive]);\n\n  // A count arriving after the first paint widens the tabs before the active one and pushes it out of\n  // view without the value changing, so a tab resizing reveals the active tab again. Keyed on the tab\n  // values, not the array, so a parent re-render never re-reveals over a person's own scrolling.\n  const tabKeys = tabs.map((t) => (typeof t === \"string\" ? t : t.value)).join(\",\");\n  React.useLayoutEffect(() => {\n    const el = strip.current;\n    if (!el || typeof ResizeObserver === \"undefined\") return;\n    const observer = new ResizeObserver(revealActive);\n    for (const tab of Array.from(el.children)) observer.observe(tab);\n    return () => observer.disconnect();\n  }, [tabKeys, revealActive]);\n\n  return (\n    <div ref={strip} className={[\"fd-tabs\", className].filter(Boolean).join(\" \")} role=\"tablist\" onScroll={measure}\n      data-more-start={more.start ? \"true\" : undefined} data-more-end={more.end ? \"true\" : undefined} {...rest}>\n      {tabs.map((t) => {\n        const item: TabItem = typeof t === \"string\" ? { value: t, label: t } : t;\n        return (\n          <button key={item.value} type=\"button\" role=\"tab\" className=\"fd-tab\" aria-selected={item.value === value}\n            onClick={onChange ? () => onChange(item.value) : undefined}>\n            {item.label}\n            {item.count !== undefined ? (\n              <span className={\"fd-badge \" + (item.tone === \"attention\" ? \"fd-badge-warning\" : \"fd-badge-neutral\")}\n                style={{ height: 20, padding: \"0 7px\" }}>{item.count}</span>\n            ) : null}\n          </button>\n        );\n      })}\n    </div>\n  );\n}\n","\n/** A person or organisation mark. Initials on a soft brand tint when no image exists. */\nexport interface AvatarProps {\n  name?: string;\n  src?: string;\n  size?: \"sm\" | \"md\" | \"lg\";\n  className?: string;\n}\n\nexport function Avatar({ name = \"\", src, size = \"md\", className = \"\", ...rest }: AvatarProps) {\n  const initials = name.split(/\\s+/).filter(Boolean).slice(0, 2).map((w) => w[0]).join(\"\").toUpperCase();\n  return (\n    <span className={[\"fd-avatar\", size === \"sm\" ? \"fd-avatar-sm\" : size === \"lg\" ? \"fd-avatar-lg\" : \"\", className].filter(Boolean).join(\" \")}\n      title={name || undefined} {...rest}>\n      {src ? <img src={src} alt={name} /> : initials || <i className=\"ph ph-user\" aria-hidden=\"true\" />}\n    </span>\n  );\n}\n\nexport interface AvatarStackProps {\n  people: Array<string | { name: string; src?: string }>;\n  size?: \"sm\" | \"md\" | \"lg\";\n  max?: number;\n  className?: string;\n}\n\nexport function AvatarStack({ people = [], size = \"sm\", max = 4, className = \"\" }: AvatarStackProps) {\n  const shown = people.slice(0, max);\n  const rest = people.length - shown.length;\n  return (\n    <span className={[\"fd-avatar-stack\", className].filter(Boolean).join(\" \")}>\n      {shown.map((p, i) => <Avatar key={i} name={typeof p === \"string\" ? p : p.name} src={typeof p === \"string\" ? undefined : p.src} size={size} />)}\n      {rest > 0 ? <Avatar name={\"+\" + rest} size={size} /> : null}\n    </span>\n  );\n}\n","import * as React from \"react\";\n\n/* MP-212: moved from media-planner's `apps/web/src/planner/screenKit.tsx` (behaviour\n   unchanged) — the Card-body-level \"this failed, here's why, here's a Retry\" idiom that\n   was previously copy-pasted across several planner screens (MP-72/MP-73), then\n   consolidated into a single local export there. media-planner is not the only app that\n   needs it, so it now lives in the design system as the one shared implementation. */\n\nexport type BannerTone = \"info\" | \"ok\" | \"warn\" | \"danger\";\n\nconst BANNER_TONE_STYLE: Record<BannerTone, { fill: string; border: string; text: string }> = {\n  info: { fill: \"var(--info-fill)\", border: \"var(--info-border)\", text: \"var(--info-text)\" },\n  ok: { fill: \"var(--ok-fill)\", border: \"var(--ok-border)\", text: \"var(--ok-text)\" },\n  warn: { fill: \"var(--warn-fill)\", border: \"var(--warn-border)\", text: \"var(--warn-text)\" },\n  danger: {\n    fill: \"var(--danger-fill)\",\n    border: \"var(--danger-border)\",\n    text: \"var(--danger-text)\",\n  },\n};\n\nexport interface BannerProps {\n  tone?: BannerTone;\n  title: React.ReactNode;\n  detail?: React.ReactNode;\n  actions?: React.ReactNode;\n  /** A Banner reporting a failure (danger) is a live-region announcement that interrupts\n   *  and announces immediately (`role=\"alert\"`); every other tone — warn, info, ok —\n   *  announces politely once idle (`role=\"status\"`), since a static warning or advisory\n   *  banner isn't urgent enough to talk over whatever the user is doing. Defaults by\n   *  tone; a caller can still override either way. */\n  role?: \"alert\" | \"status\";\n}\n\nexport function Banner({ tone = \"info\", title, detail, actions, role }: BannerProps) {\n  const t = BANNER_TONE_STYLE[tone];\n  const liveRole = role || (tone === \"danger\" ? \"alert\" : \"status\");\n  return (\n    <div\n      role={liveRole}\n      style={{\n        display: \"flex\",\n        alignItems: \"flex-start\",\n        flexWrap: \"wrap\",\n        gap: \"var(--s-12)\",\n        padding: \"var(--s-12) var(--s-16)\",\n        borderRadius: \"var(--r-md)\",\n        background: t.fill,\n        border: `1px solid ${t.border}`,\n      }}\n    >\n      <div\n        style={{\n          display: \"flex\",\n          flexDirection: \"column\",\n          gap: \"var(--s-4)\",\n          flex: \"1 1 200px\",\n          minWidth: 0,\n        }}\n      >\n        <span className=\"fd-label-lg\" style={{ color: t.text }}>\n          {title}\n        </span>\n        {detail ? (\n          <span className=\"fd-body-sm\" style={{ color: t.text, opacity: 0.9 }}>\n            {detail}\n          </span>\n        ) : null}\n      </div>\n      {actions ? (\n        <div style={{ display: \"flex\", gap: \"var(--s-8)\", flexWrap: \"wrap\" }}>{actions}</div>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nconst TONES: Record<string, string> = { neutral: \"fd-badge-neutral\", info: \"fd-badge-info\", success: \"fd-badge-success\", warning: \"fd-badge-warning\", danger: \"fd-badge-danger\", live: \"fd-badge-live\", approved: \"fd-badge-approved\", count: \"fd-badge-count\" };\n\n/**\n * A pill of state. Badges never carry actions — if it is clickable it is a Tag.\n *\n * Extends HTMLAttributes so a consumer can pass `title`, `aria-*`, `style` or any other\n * plain span attribute straight through, the same rest-prop passthrough every other kit\n * component follows — a caller that needs one of those never has reason to hand-roll the\n * markup instead of using the component.\n */\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n  children?: React.ReactNode;\n  /** live = the site's blue gradient \"Active\". approved = its mint pill. count = the blue number chip. */\n  tone?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"live\" | \"approved\" | \"count\";\n  dot?: boolean;\n  /** Phosphor icon name */\n  icon?: string;\n  className?: string;\n}\n\nexport function Badge({ children, tone = \"neutral\", dot = false, icon, className = \"\", ...rest }: BadgeProps) {\n  return (\n    <span className={[\"fd-badge\", TONES[tone] || TONES.neutral, className].filter(Boolean).join(\" \")} {...rest}>\n      {dot ? <span className=\"fd-badge-dot\" aria-hidden=\"true\" /> : null}\n      {icon ? <i className={\"ph ph-\" + icon} aria-hidden=\"true\" /> : null}\n      {children}\n    </span>\n  );\n}\n","import * as React from \"react\";\n\n/** Says what will appear here, and offers exactly one button. */\nexport interface EmptyStateProps {\n  /** Phosphor icon name */\n  icon?: string;\n  title: React.ReactNode;\n  children?: React.ReactNode;\n  action?: React.ReactNode;\n  className?: string;\n}\n\nexport function EmptyState({ icon = \"tray\", title, children, action, className = \"\", ...rest }: EmptyStateProps) {\n  return (\n    <div className={[\"fd-empty\", className].filter(Boolean).join(\" \")} {...rest}>\n      <span className=\"fd-empty-icon\"><i className={\"ph ph-\" + icon} aria-hidden=\"true\" /></span>\n      <span className=\"fd-empty-title\">{title}</span>\n      {children ? <span className=\"fd-empty-body\">{children}</span> : null}\n      {action}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * A callout with a fixed structure: statement, then cost, then two actions.\n * A flag without a number and a choice is not a flag — use plain body copy.\n */\nexport interface FlagProps {\n  /** What is true. \"Ohio State is Weak.\" */\n  statement: React.ReactNode;\n  /** What it costs to fix. \"+$4,200 reaches Adequate.\" Rendered bold. */\n  cost?: React.ReactNode;\n  /** Two Buttons — the fix and the dismissal. */\n  actions?: React.ReactNode;\n  tone?: \"info\" | \"success\" | \"warning\" | \"danger\";\n  className?: string;\n}\n\nexport function Flag({ statement, cost, actions, tone = \"warning\", className = \"\", ...rest }: FlagProps) {\n  return (\n    <div className={[\"fd-flag\", \"fd-flag-\" + tone, className].filter(Boolean).join(\" \")} role=\"status\" {...rest}>\n      <span className=\"fd-flag-text\">\n        {statement}\n        {cost ? <> <span className=\"fd-flag-cost\">{cost}</span></> : null}\n      </span>\n      {actions ? <span className=\"fd-flag-actions\">{actions}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nconst IS_MAC = typeof navigator !== \"undefined\" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent || \"\");\n\nconst GLYPH: Record<string, string> = {\n  mod: IS_MAC ? \"⌘\" : \"Ctrl\", cmd: \"⌘\", meta: \"⌘\", ctrl: IS_MAC ? \"⌃\" : \"Ctrl\",\n  alt: IS_MAC ? \"⌥\" : \"Alt\", opt: \"⌥\", option: \"⌥\", shift: \"⇧\",\n  enter: \"↵\", return: \"↵\", esc: \"Esc\", escape: \"Esc\", tab: \"⇥\", space: \"Space\",\n  backspace: \"⌫\", delete: \"⌦\", up: \"↑\", down: \"↓\", left: \"←\", right: \"→\", slash: \"/\",\n};\n\n/** A key hint that binds NOTHING — register the real shortcut separately. */\nexport interface KeyHintProps { keys: string; size?: \"sm\" | \"md\"; tone?: \"quiet\" | \"solid\"; className?: string }\n\n/**\n * A key hint. Renders a label and binds NOTHING — register the real shortcut\n * separately, or the cap and the binding drift apart.\n */\nexport function KeyHint({ keys, size = \"md\", tone = \"quiet\", className = \"\", ...rest }: KeyHintProps) {\n  const parts = String(keys || \"\").split(\"+\").map((p) => p.trim()).filter(Boolean);\n  const cls = [\"fd-keyhint\", size === \"sm\" ? \"fd-keyhint-sm\" : \"\", tone === \"solid\" ? \"fd-keyhint-solid\" : \"\", className].filter(Boolean).join(\" \");\n  return (\n    <span className={cls} aria-hidden=\"true\" {...rest}>\n      {parts.map((p, i) => {\n        const k = p.toLowerCase();\n        const glyph = GLYPH[k] || (p.length === 1 ? p.toUpperCase() : p);\n        return <kbd key={i}>{glyph}</kbd>;\n      })}\n    </span>\n  );\n}\n\n/** The platform modifier as text, for prose: \"⌘\" or \"Ctrl\". */\nexport function modifierLabel(): string { return GLYPH.mod; }\n/** True when the event carries the platform's primary modifier. */\nexport function hasModifier(e: KeyboardEvent | React.KeyboardEvent): boolean { return IS_MAC ? e.metaKey : e.ctrlKey; }\n","import * as React from \"react\";\nimport { Popover } from \"../actions/Popover\";\nimport { useHoverPopover } from \"../actions/useHoverPopover\";\n\nconst TONES: Record<string, string> = { success: \"fd-status-success\", warning: \"fd-status-warning\", danger: \"fd-status-danger\" };\n\n/** A small status chip for a screen header that explains itself in a titled panel. */\nexport interface StatusIndicatorProps {\n  /** The painted text, e.g. \"5 rules\" or \"Do-not-call\". */\n  label: string;\n  /** What the status is right now, e.g. \"screened\". With it the accessible name is\n   *  \"<label>: <status>\"; without it the name is the label alone. */\n  status?: string;\n  /** Phosphor icon name, leading. */\n  icon?: string;\n  /** Colours the chip. Never a pressed state. */\n  tone?: \"neutral\" | \"success\" | \"warning\" | \"danger\";\n  /** Shows a spinner in the icon slot and marks the chip busy. The chip keeps its size. */\n  loading?: boolean;\n  /** The panel's title (Popover `title`: the title plus a Close button). */\n  panelTitle: string;\n  /** The panel body: what the status means. */\n  children?: React.ReactNode;\n  className?: string;\n}\n\n/**\n * StatusIndicator (DS-51): a status chip that is not a toggle. It opens a Popover on hover,\n * keyboard focus or tap (useHoverPopover, DS-50) and exposes aria-haspopup=\"dialog\" and\n * aria-expanded; it never sets aria-pressed.\n */\nexport function StatusIndicator({\n  label, status, icon, tone = \"neutral\", loading = false, panelTitle, children, className = \"\",\n}: StatusIndicatorProps) {\n  const hp = useHoverPopover();\n  return (\n    <>\n      <button\n        type=\"button\"\n        ref={hp.triggerRef}\n        {...hp.triggerProps}\n        className={[\"fd-status\", TONES[tone], className].filter(Boolean).join(\" \")}\n        aria-label={status ? label + \": \" + status : undefined}\n        aria-busy={loading || undefined}\n      >\n        {loading ? (\n          <span className=\"fd-status-icon\" aria-hidden=\"true\"><span className=\"fd-spinner\" /></span>\n        ) : icon ? (\n          <span className=\"fd-status-icon\" aria-hidden=\"true\"><i className={\"ph ph-\" + icon} /></span>\n        ) : null}\n        <span className=\"fd-status-label\">{label}</span>\n      </button>\n      <Popover {...hp.popoverProps} title={panelTitle} padded width={320}>{children}</Popover>\n    </>\n  );\n}\n","import * as React from \"react\";\n\n// Badge's \"live\" / \"approved\" / \"count\" tones carry their own gradients and bespoke\n// height/padding, not just color — that's a pill treatment, not a toggle-chip one, so\n// Tag only takes the flat, token-only tones that drop in as background/border/color.\nconst TONES: Record<string, string> = { info: \"fd-tag-info\", success: \"fd-tag-success\", warning: \"fd-tag-warning\", danger: \"fd-tag-danger\" };\n\n/** A clickable chip — filters, selected campuses, applied channels. */\nexport interface TagProps {\n  children?: React.ReactNode;\n  icon?: string;\n  selected?: boolean;\n  /** Colors the chip once selected — e.g. a favoured (\"success\") or excluded (\"danger\") toggle. No effect while unselected. */\n  tone?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\";\n  onRemove?: () => void;\n  onClick?: () => void;\n  /** MP-282: a native tooltip for the chip's full text — the same full text that is\n   *  already the button's accessible name (its text content), so this only helps a\n   *  sighted mouse user whose chip a caller (FilterBar, scoped to `.fd-filterbar .fd-tag`\n   *  in components.css) has visually truncated with an ellipsis. Harmless, and invisible,\n   *  on a chip nobody truncates. */\n  title?: string;\n  /** The chip's accessible name, when its painted text is not a faithful name for it. FilterBar\n   *  sets it to the chip's whole text: the painted text is split into a shrinkable head and a\n   *  fixed tail (MiddleEllipsis), and a browser computing a name from content puts a space between\n   *  two block-level flex items, reading \"Pol itical\" — an explicit name is the whole value. */\n  \"aria-label\"?: string;\n  className?: string;\n}\n\nexport function Tag({ children, icon, selected = false, tone = \"neutral\", onRemove, onClick, className = \"\", ...rest }: TagProps) {\n  return (\n    <button type=\"button\" className={[\"fd-tag\", selected ? TONES[tone] : null, className].filter(Boolean).join(\" \")}\n      aria-pressed={selected} onClick={onClick} {...rest}>\n      {icon ? <i className={\"ph ph-\" + icon} aria-hidden=\"true\" /> : null}\n      {/* MP-282: a plain text child has nothing of its own to hang `text-overflow:\n         ellipsis` off — only a block-level (a flex item counts, per Tag's own\n         `display: inline-flex` blockifying it) box can truncate. Wrapping it here, always,\n         costs nothing outside FilterBar (no rule targets `.fd-tag-label` except scoped\n         under `.fd-filterbar` in components.css), and is what lets FilterBar's chips\n         truncate without every OTHER Tag caller (RoadmapTimeline, ApiSpecBrowser) opting\n         into anything. */}\n      <span className=\"fd-tag-label\">{children}</span>\n      {onRemove ? (\n        <span className=\"fd-tag-remove\" role=\"button\" aria-label=\"Remove\"\n          onClick={(e) => { e.stopPropagation(); onRemove(); }}><i className=\"ph ph-x\" /></span>\n      ) : null}\n    </button>\n  );\n}\n","import * as React from \"react\";\n\nconst ICON: Record<string, { i: string; bg: string }> = {\n  success: { i: \"check\", bg: \"var(--ok-solid)\" },\n  error: { i: \"x\", bg: \"var(--danger-solid)\" },\n  info: { i: \"info\", bg: \"var(--info-solid)\" },\n  loading: { i: \"\", bg: \"var(--n-500)\" },\n};\n\n/** Confirmation of something that already happened. Bottom-right, 5s, undo where reversible. */\nexport interface ToastProps {\n  title: React.ReactNode;\n  children?: React.ReactNode;\n  tone?: \"success\" | \"error\" | \"info\" | \"loading\";\n  onUndo?: () => void;\n  onDismiss?: () => void;\n  className?: string;\n}\n\nexport function Toast({ title, children, tone = \"success\", onUndo, onDismiss, className = \"\", ...rest }: ToastProps) {\n  const ic = ICON[tone] || ICON.info;\n  return (\n    <div className={[\"fd-toast\", className].filter(Boolean).join(\" \")} role=\"status\" {...rest}>\n      <span className=\"fd-toast-icon\" style={{ background: ic.bg }} aria-hidden=\"true\">\n        {tone === \"loading\" ? <span className=\"fd-spinner\" style={{ width: 12, height: 12, borderWidth: 2, color: \"#fff\" }} /> : <i className={\"ph ph-\" + ic.i} />}\n      </span>\n      <span className=\"fd-toast-body\">\n        <span className=\"fd-toast-title\" style={{ display: \"block\" }}>{title}</span>\n        {children ? <span className=\"fd-secondary\" style={{ display: \"block\", marginTop: 2 }}>{children}</span> : null}\n        {onUndo ? <button type=\"button\" className=\"fd-btn fd-btn-link\" style={{ marginTop: 8 }} onClick={onUndo}>Undo</button> : null}\n      </span>\n      {onDismiss ? <button type=\"button\" className=\"fd-btn-icon fd-btn-icon-sm\" aria-label=\"Dismiss\" onClick={onDismiss}><i className=\"ph ph-x\" /></button> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { CornerStackPortal } from \"../../kits/cornerStack\";\nimport { Toast, type ToastProps } from \"./Toast\";\n\n/** How long a toast stays when `show` is not told otherwise — `Toast`'s own convention. */\nexport const DEFAULT_TOAST_DURATION_MS = 5000;\n\nexport interface ToastOptions {\n  /** The toast's icon and accent. Default \"success\": a toast confirms what already happened. */\n  tone?: ToastProps[\"tone\"];\n  /** Milliseconds before it dismisses itself; 0 keeps it until its close button is clicked.\n   *  Default `DEFAULT_TOAST_DURATION_MS`. */\n  duration?: number;\n}\n\nexport interface ToastApi {\n  /** Shows a toast in the bottom-right corner stack, above any job tray. Stable across renders. */\n  show: (title: React.ReactNode, options?: ToastOptions) => void;\n}\n\ninterface ToastItem {\n  id: number;\n  title: React.ReactNode;\n  tone: ToastProps[\"tone\"];\n}\n\nconst ToastContext = React.createContext<ToastApi | null>(null);\n\n/**\n * Hosts the app's toasts: a stack in the shared bottom-right corner (`CornerStackPortal`), oldest on top, that any descendant adds\n * to through `useToast().show`. `Toast` is only the presentation; this owns the queue and the\n * auto-dismiss timers. Mount one near the root, inside the theme.\n */\nexport function ToastProvider({ children }: { children?: React.ReactNode }) {\n  const [items, setItems] = React.useState<ToastItem[]>([]);\n  const timers = React.useRef(new Map<number, ReturnType<typeof setTimeout>>());\n  const nextId = React.useRef(1);\n\n  const dismiss = React.useCallback((id: number) => {\n    setItems((current) => current.filter((item) => item.id !== id));\n    const timer = timers.current.get(id);\n    if (timer !== undefined) {\n      clearTimeout(timer);\n      timers.current.delete(id);\n    }\n  }, []);\n\n  const show = React.useCallback(\n    (title: React.ReactNode, options: ToastOptions = {}) => {\n      const { tone = \"success\", duration = DEFAULT_TOAST_DURATION_MS } = options;\n      const id = nextId.current++;\n      setItems((current) => [...current, { id, title, tone }]);\n      if (duration > 0) timers.current.set(id, setTimeout(() => dismiss(id), duration));\n    },\n    [dismiss],\n  );\n\n  React.useEffect(() => {\n    const pending = timers.current;\n    return () => {\n      pending.forEach(clearTimeout);\n      pending.clear();\n    };\n  }, []);\n\n  const api = React.useMemo<ToastApi>(() => ({ show }), [show]);\n\n  return (\n    <ToastContext.Provider value={api}>\n      {children}\n      {/* Always mounted, so a toast added to it is announced: a live region is only reliably\n          read out when it exists before its content does. */}\n      <CornerStackPortal slot=\"toasts\">\n        <div className=\"fd-toast-region\" aria-live=\"polite\">\n          {items.map((item) => (\n            <Toast key={item.id} title={item.title} tone={item.tone} onDismiss={() => dismiss(item.id)} />\n          ))}\n        </div>\n      </CornerStackPortal>\n    </ToastContext.Provider>\n  );\n}\n\n/** The app's toast host (see `ToastProvider`). Throws outside one. */\nexport function useToast(): ToastApi {\n  const api = React.useContext(ToastContext);\n  if (!api) throw new Error(\"useToast must be used inside a <ToastProvider>\");\n  return api;\n}\n","import * as React from \"react\";\n\n/* MP-212: moved from media-planner's `apps/web/src/planner/screenKit.tsx` (behaviour\n   unchanged, including reduced-motion handling) — eases a numeric value toward its\n   latest target over `duration`ms, used anywhere a stat updates live (reallocation\n   previews, table aggregates after a mutation). */\n\nexport interface AnimNumProps {\n  value: number;\n  format?: (value: number) => React.ReactNode;\n  duration?: number;\n}\n\n/** True when the browser can't be relied on to run the easing to completion, so the\n *  figure has to land on its target immediately instead. Two cases:\n *  - the document is hidden — requestAnimationFrame does not fire in a background\n *    tab, so an animation started there would freeze on the value it started FROM;\n *  - the user asked for reduced motion, which the design system honours everywhere\n *    else (tokens.css's prefers-reduced-motion block). */\nfunction shouldSkipEasing(): boolean {\n  if (typeof document !== \"undefined\" && document.hidden) return true;\n  return window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches ?? false;\n}\n\nexport function AnimNum({ value, format, duration = 550 }: AnimNumProps) {\n  const [display, setDisplay] = React.useState(value);\n  const prev = React.useRef(value);\n\n  React.useEffect(() => {\n    const from = prev.current;\n    const to = value;\n    prev.current = to;\n    if (from === to || !isFinite(from) || !isFinite(to) || shouldSkipEasing()) {\n      setDisplay(to);\n      return;\n    }\n    let raf = 0;\n    const t0 = performance.now();\n    const step = (t: number) => {\n      const k = Math.min(1, (t - t0) / duration);\n      const eased = 1 - Math.pow(1 - k, 3);\n      setDisplay(from + (to - from) * eased);\n      if (k < 1) raf = requestAnimationFrame(step);\n    };\n    raf = requestAnimationFrame(step);\n    // A number that is WRONG is far worse than a number that didn't animate, so the\n    // target is committed unconditionally once the easing window has passed — timers\n    // still fire when rAF has been suspended mid-flight (tab hidden, page frozen).\n    const land = setTimeout(() => setDisplay(to), duration + 80);\n    return () => {\n      cancelAnimationFrame(raf);\n      clearTimeout(land);\n      setDisplay(to);\n    };\n  }, [value, duration]);\n\n  return <>{format ? format(display) : Math.round(display).toLocaleString()}</>;\n}\n","import * as React from \"react\";\nimport { LoadingRegion } from \"../loading/LoadingRegion\";\nimport { Skeleton } from \"../loading/Skeleton\";\nimport { useMeasuredWidth } from \"../useMeasuredWidth\";\nimport { ChartDataTable, ChartLegend, chartColor, formatCompact, type ChartState } from \"./chartInternal\";\n\nexport interface TrendSeries {\n  id: string;\n  label: string;\n  /** One value per shared category, in the same order as `categories`. */\n  values: number[];\n  /** Defaults to the categorical ramp in order. */\n  color?: string;\n}\n\nexport interface TrendChartProps {\n  /** The shared x-axis, e.g. dates or week labels. */\n  categories: string[];\n  series: TrendSeries[];\n  /** Accessible name for the chart as a whole, e.g. \"Sends over time\". Required. */\n  label: string;\n  /** Value formatter for axis ticks, point tooltips and the data table. */\n  valueFormat?: (n: number) => string;\n  /** Plot height in px. Width is always fluid (100% of the container); the SVG is drawn in\n   *  real pixels at the container's measured width, so text never scales with the card. */\n  height?: number;\n  /** Number of horizontal gridlines (excluding the zero baseline). */\n  yTicks?: number;\n  state?: ChartState;\n  error?: string;\n  onRetry?: () => void;\n  className?: string;\n}\n\n/** The width the plot is drawn at until the container has been measured (first paint, and any\n *  environment with no layout engine, e.g. jsdom). */\nconst INITIAL_WIDTH = 600;\nconst MARGIN = { top: 16, right: 16, bottom: 28, left: 46 };\n/** Axis-label metrics at the stylesheet's 10px `.fd-trend-axis-label`: an average glyph is about\n *  0.6em wide. Used only to decide how many x labels fit and how far the plot must stay clear of\n *  the SVG's edges; the labels themselves are ordinary SVG text. */\nconst AXIS_CHAR_PX = 6;\nconst AXIS_LABEL_GAP_PX = 12;\n/** The point tip's average glyph width at the stylesheet's 11px `.fd-trend-tip`. */\nconst TIP_CHAR_PX = 6.6;\n\nfunction niceMax(max: number): number {\n  if (max <= 0) return 1;\n  const magnitude = Math.pow(10, Math.floor(Math.log10(max)));\n  const residual = max / magnitude;\n  const step = residual > 5 ? 10 : residual > 2 ? 5 : residual > 1 ? 2 : 1;\n  return step * magnitude;\n}\n\n/** A point tip is centred on its point, unless that would run past the SVG's own edge: then it is\n *  anchored to start (or end) at the point instead, so the whole sentence stays readable. */\nfunction tipAnchor(tip: { x: number; text: string }, width: number): \"start\" | \"middle\" | \"end\" {\n  const half = (tip.text.length * TIP_CHAR_PX) / 2;\n  if (tip.x - half < 0) return \"start\";\n  if (tip.x + half > width) return \"end\";\n  return \"middle\";\n}\n\n/**\n * TrendChart — a multi-series line chart over a shared category axis, with gridlines,\n * axis labels and per-point tooltips. Colour comes only from `--chart-1..8` (MP-210):\n * those tokens are identical across light, dark and high-contrast, so the lines need no\n * theme-specific code; axis lines, gridlines and labels use the theme-aware `--border`\n * and `--text-muted` tokens instead of a fixed grey.\n *\n * The SVG itself is decorative (`role=\"img\"`, one accessible name for the whole\n * picture) — the actual accessible interface is the keyboard-reachable legend below it\n * (hover or focus a series to highlight its line and read its tooltip) plus the\n * visually-hidden data table, which carries every value a sighted user can read off the\n * lines. See chartInternal.tsx for both pieces, shared with the other three charts.\n */\nexport function TrendChart({\n  categories,\n  series,\n  label,\n  valueFormat = formatCompact,\n  height = 240,\n  yTicks = 4,\n  state = \"ready\",\n  error,\n  onRetry,\n  className = \"\",\n}: TrendChartProps) {\n  const [activeId, setActiveId] = React.useState<string | null>(null);\n  const [pointTip, setPointTip] = React.useState<{ x: number; y: number; text: string } | null>(null);\n\n  const isEmpty = state === \"ready\" && (!categories.length || !series.length || series.every((s) => !s.values.length));\n  const effectiveState: ChartState = isEmpty ? \"empty\" : state;\n\n  // Drawn in real pixels at the plot's measured width (viewBox === rendered size), so its text is\n  // never scaled by the card it sits in: a fixed-unit viewBox stretched to the container\n  // multiplies every font size by container / viewBox (SMS-50).\n  const [plotRef, VBW] = useMeasuredWidth(INITIAL_WIDTH);\n  const VBH = height;\n\n  // The x labels are centred on their points, so the first and last must have half a label of\n  // clearance to the SVG's edge or they are cut off (the last date used to end in \"…-3(\").\n  const longestCategoryPx = categories.reduce((n, c) => Math.max(n, c.length), 0) * AXIS_CHAR_PX;\n  const margin = {\n    ...MARGIN,\n    left: Math.max(MARGIN.left, Math.ceil(longestCategoryPx / 2) + 2),\n    right: Math.max(MARGIN.right, Math.ceil(longestCategoryPx / 2) + 2),\n  };\n  const plotW = VBW - margin.left - margin.right;\n  const plotH = VBH - margin.top - margin.bottom;\n\n  const allValues = series.flatMap((s) => s.values.filter((v) => Number.isFinite(v)));\n  const rawMax = allValues.length ? Math.max(...allValues, 0) : 0;\n  const maxValue = niceMax(rawMax || 1);\n  const stepX = categories.length > 1 ? plotW / (categories.length - 1) : 0;\n\n  const xAt = (i: number) => margin.left + (categories.length > 1 ? i * stepX : plotW / 2);\n  const yAt = (v: number) => margin.top + plotH - (v / maxValue) * plotH;\n\n  // As many x labels as fit side by side with a gap between them, evenly thinned; the last\n  // category is always labelled, and the labels before it are dropped instead if they would\n  // touch it.\n  const labelSlotPx = longestCategoryPx + AXIS_LABEL_GAP_PX;\n  const maxLabels = Math.max(1, Math.floor((plotW + AXIS_LABEL_GAP_PX) / labelSlotPx));\n  const tickEvery = Math.max(1, Math.ceil(categories.length / maxLabels));\n  const lastIndex = categories.length - 1;\n  const showsXLabel = (i: number) =>\n    i === lastIndex || (i % tickEvery === 0 && (lastIndex - i) * stepX >= labelSlotPx);\n\n  return (\n    <div className={[\"fd-trend\", className].filter(Boolean).join(\" \")}>\n      <LoadingRegion\n        state={effectiveState}\n        label={label + \" — loading\"}\n        error={error}\n        onRetry={onRetry}\n        skeleton={\n          <div className=\"fd-trend-skel\" style={{ height }}>\n            <Skeleton h={height} radius=\"var(--r-md)\" />\n          </div>\n        }\n      >\n        <div className=\"fd-trend-plot\" ref={plotRef} style={{ height: VBH }}>\n          <svg\n            className=\"fd-trend-svg\"\n            viewBox={`0 0 ${VBW} ${VBH}`}\n            role=\"img\"\n            aria-label={label}\n          >\n            {Array.from({ length: yTicks + 1 }).map((_, i) => {\n              const v = (maxValue / yTicks) * i;\n              const y = yAt(v);\n              return (\n                <g key={i}>\n                  <line x1={margin.left} x2={VBW - margin.right} y1={y} y2={y} className=\"fd-trend-grid\" />\n                  <text x={margin.left - 8} y={y} className=\"fd-trend-axis-label\" textAnchor=\"end\" dominantBaseline=\"middle\">\n                    {valueFormat(v)}\n                  </text>\n                </g>\n              );\n            })}\n            <line x1={margin.left} x2={margin.left} y1={margin.top} y2={VBH - margin.bottom} className=\"fd-trend-axis\" />\n            <line x1={margin.left} x2={VBW - margin.right} y1={VBH - margin.bottom} y2={VBH - margin.bottom} className=\"fd-trend-axis\" />\n            {categories.map((c, i) => (\n              showsXLabel(i) ? (\n                <text key={i} x={xAt(i)} y={VBH - margin.bottom + 18} className=\"fd-trend-axis-label\" textAnchor=\"middle\">\n                  {c}\n                </text>\n              ) : null\n            ))}\n            {series.map((s, si) => {\n              const color = chartColor(si, s.color);\n              const dim = activeId != null && activeId !== s.id;\n              const points = s.values.map((v, i) => `${xAt(i)},${yAt(v)}`).join(\" \");\n              return (\n                <g key={s.id} className={dim ? \"is-dim\" : \"\"} style={{ opacity: dim ? 0.28 : 1 }}>\n                  <polyline points={points} fill=\"none\" stroke={color} strokeWidth={2.5} className=\"fd-trend-line\" />\n                  {s.values.map((v, i) => {\n                    const text = `${s.label} — ${categories[i]}: ${valueFormat(v)}`;\n                    const show = () => setPointTip({ x: xAt(i), y: yAt(v), text });\n                    const hide = () => setPointTip(null);\n                    return (\n                      <circle\n                        key={i}\n                        cx={xAt(i)}\n                        cy={yAt(v)}\n                        r={dim ? 2.5 : 3.5}\n                        fill={color}\n                        className=\"fd-trend-dot\"\n                        tabIndex={0}\n                        role=\"img\"\n                        aria-label={text}\n                        onMouseEnter={show}\n                        onMouseLeave={hide}\n                        onFocus={show}\n                        onBlur={hide}\n                      />\n                    );\n                  })}\n                </g>\n              );\n            })}\n            {pointTip ? (\n              <g transform={`translate(${pointTip.x},${pointTip.y - 12})`} className=\"fd-trend-tip\" aria-hidden=\"true\">\n                <text textAnchor={tipAnchor(pointTip, VBW)} y={-4}>{pointTip.text}</text>\n              </g>\n            ) : null}\n          </svg>\n        </div>\n\n        <ChartLegend\n          activeKey={activeId}\n          onActivate={setActiveId}\n          items={series.map((s, i) => ({\n            key: s.id,\n            label: s.label,\n            color: chartColor(i, s.color),\n            detail: `${s.label} — latest ${valueFormat(s.values[s.values.length - 1] ?? 0)}`,\n          }))}\n        />\n\n        <ChartDataTable\n          caption={label}\n          columns={[\"\", ...series.map((s) => s.label)]}\n          rows={categories.map((c, i) => [c, ...series.map((s) => valueFormat(s.values[i] ?? 0))])}\n        />\n      </LoadingRegion>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * The content-box width, in px, of whichever element the returned callback ref is attached to,\n * kept current by a ResizeObserver; `fallback` until it has been measured.\n *\n * It is a callback ref (state holding the element), not a ref object, because the element may\n * not exist when the component first mounts: a chart inside a LoadingRegion only renders its\n * plot once its state is \"ready\". An effect keyed on a ref object would run once, find null,\n * and never measure; keyed on the element, it runs whenever the element appears or is replaced.\n * With no ResizeObserver (jsdom), or an element with no layout (width 0), the width stays at\n * `fallback`.\n */\nexport function useMeasuredWidth(fallback: number): [(element: HTMLElement | null) => void, number] {\n  const [element, setElement] = React.useState<HTMLElement | null>(null);\n  const [width, setWidth] = React.useState(fallback);\n  React.useLayoutEffect(() => {\n    if (!element || typeof ResizeObserver === \"undefined\") return;\n    const measure = () => {\n      const measured = Math.round(element.getBoundingClientRect().width);\n      if (measured > 0) setWidth(measured);\n    };\n    measure();\n    const observer = new ResizeObserver(measure);\n    observer.observe(element);\n    return () => observer.disconnect();\n  }, [element]);\n  return [setElement, width];\n}\n","import * as React from \"react\";\nimport { formatBytes } from \"../../kits/files.js\";\nimport { truncationTitle } from \"../textExposure\";\n\nconst VARIANT_FILL: Record<string, string> = {\n  brand: \"var(--brand)\",\n  neutral: \"var(--n-400)\",\n  quiet: \"var(--n-300)\",\n  ok: \"var(--ok-solid)\",\n  warn: \"var(--warn-solid)\",\n  danger: \"var(--danger-solid)\",\n  info: \"var(--info-solid)\",\n};\nconst CHART = [\"var(--chart-1)\", \"var(--chart-2)\", \"var(--chart-3)\", \"var(--chart-4)\", \"var(--chart-5)\", \"var(--chart-6)\", \"var(--chart-7)\", \"var(--chart-8)\"];\n\nconst compact = (n: number): string => {\n  if (n == null || isNaN(n)) return \"\";\n  const a = Math.abs(n);\n  if (a >= 1e9) return (n / 1e9).toFixed(a >= 1e10 ? 0 : 1).replace(/\\.0$/, \"\") + \"B\";\n  if (a >= 1e6) return (n / 1e6).toFixed(a >= 1e7 ? 0 : 1).replace(/\\.0$/, \"\") + \"M\";\n  if (a >= 1e3) return (n / 1e3).toFixed(a >= 1e4 ? 0 : 1).replace(/\\.0$/, \"\") + \"k\";\n  return String(Math.round(n));\n};\n\nexport const meterFormats = {\n  count: (n: number) => n.toLocaleString(),\n  compact,\n  bytes: formatBytes,\n  percentOf: (total: number) => (n: number) => (total ? Math.round((n / total) * 100) : 0) + \"%\",\n};\n\nexport interface MeterSegmentInput {\n  id?: string;\n  label: string;\n  value: number;\n  variant?: \"brand\" | \"neutral\" | \"quiet\" | \"ok\" | \"warn\" | \"danger\" | \"info\";\n  /** Any CSS colour; overrides variant. Defaults to the chart ramp in order. */\n  color?: string;\n}\n\nexport interface SegmentedMeterProps {\n  total: number;\n  segments: MeterSegmentInput[];\n  label?: string;\n  /** Value formatter. meterFormats.compact | .count | .bytes */\n  format?: (n: number) => string;\n  height?: number;\n  legend?: boolean;\n  showTotal?: boolean;\n  showPercent?: boolean;\n  remainderLabel?: string;\n  onClick?: () => void;\n  className?: string;\n  /** Base id for the meter's aria-labelledby target; falls back to React.useId(). */\n  id?: string;\n}\n\n/**\n * A capacity bar split into categories — a context window, a disk quota, a budget\n * burn-down, a rate limit. Deliberately free of any AI vocabulary: it takes a total\n * and labelled segments, and reports the remainder as free space.\n *\n * A zero or missing total reports 0%, never NaN%.\n */\nexport function SegmentedMeter({\n  total = 0,\n  segments = [],\n  label,\n  format = compact,\n  height = 6,\n  legend = false,\n  showTotal = true,\n  showPercent = true,\n  remainderLabel = \"Free\",\n  onClick,\n  className = \"\",\n  id,\n}: SegmentedMeterProps) {\n  const safeTotal = Number(total) > 0 ? Number(total) : 0;\n  const items = segments.filter((s) => s && Number(s.value) > 0);\n  const used = items.reduce((n, s) => n + Number(s.value), 0);\n  const pct = safeTotal ? Math.min(100, Math.round((used / safeTotal) * 100)) : 0;\n  const w = (v: number) => (safeTotal ? Math.max(0, Math.min(100, (Number(v) / safeTotal) * 100)) : 0);\n  const fill = (s: MeterSegmentInput, i: number) => s.color || (s.variant ? VARIANT_FILL[s.variant] : undefined) || CHART[i % CHART.length];\n  const generatedId = React.useId();\n  const uid = id || generatedId;\n\n  return (\n    <div className={[\"fd-segmeter\", className].filter(Boolean).join(\" \")} onClick={onClick}>\n      {(label || showTotal) ? (\n        <div className=\"fd-segmeter-head\">\n          {label ? <span className=\"fd-segmeter-label\" id={uid + \"-l\"}>{label}</span> : <span />}\n          {showTotal ? (\n            <span className=\"fd-segmeter-total fd-tabular\">\n              {format(used)}<span className=\"fd-segmeter-sep\"> / </span>{safeTotal ? format(safeTotal) : \"—\"}\n              {showPercent ? <span className=\"fd-segmeter-pct\"> ({pct}%)</span> : null}\n            </span>\n          ) : null}\n        </div>\n      ) : null}\n      <div\n        className=\"fd-segmeter-rail\"\n        style={{ height }}\n        role=\"meter\"\n        aria-labelledby={label ? uid + \"-l\" : undefined}\n        aria-label={label ? undefined : \"Usage\"}\n        aria-valuenow={used}\n        aria-valuemin={0}\n        aria-valuemax={safeTotal || 100}\n        aria-valuetext={format(used) + \" of \" + (safeTotal ? format(safeTotal) : \"unknown\") + \" — \" + pct + \"%\"}\n      >\n        {items.map((s, i) => (\n          <span\n            key={s.id || s.label || i}\n            className=\"fd-segmeter-seg\"\n            style={{ width: w(s.value) + \"%\", background: fill(s, i), transitionDelay: (i * 40) + \"ms\" }}\n            title={s.label + \" · \" + format(s.value)}\n          />\n        ))}\n      </div>\n      {legend ? (\n        <ul className=\"fd-segmeter-legend\">\n          {items.map((s, i) => (\n            <li key={s.id || s.label || i}>\n              <span className=\"fd-segmeter-dot\" style={{ background: fill(s, i) }} aria-hidden=\"true\" />\n              {/* MP-141: dense-legend identifier — a native `title` exposes the full\n               * label; the adjacent bar segment already has its own (label + value). */}\n              <span className=\"fd-segmeter-key\" title={truncationTitle(s.label)}>{s.label}</span>\n              <span className=\"fd-segmeter-val fd-tabular\">{format(s.value)}</span>\n            </li>\n          ))}\n          {safeTotal && used < safeTotal ? (\n            <li className=\"is-remainder\">\n              <span className=\"fd-segmeter-dot is-empty\" aria-hidden=\"true\" />\n              <span className=\"fd-segmeter-key\" title={truncationTitle(remainderLabel)}>{remainderLabel}</span>\n              <span className=\"fd-segmeter-val fd-tabular\">{format(safeTotal - used)}</span>\n            </li>\n          ) : null}\n        </ul>\n      ) : null}\n    </div>\n  );\n}\n\nexport interface QuotaRowProps { label: React.ReactNode; percent: number; note?: React.ReactNode; tone?: \"brand\" | \"ok\" | \"warn\" | \"danger\"; className?: string }\n\n/**\n * One quota line: name, an optional reset note, a percentage and a bar.\n * Rate limits, plan allowances, storage tiers.\n */\nexport function QuotaRow({ label, percent = 0, note, tone, className = \"\" }: QuotaRowProps) {\n  const p = Math.max(0, Math.min(100, Math.round(Number(percent) || 0)));\n  const auto = p >= 90 ? \"danger\" : p >= 70 ? \"warn\" : \"brand\";\n  return (\n    <div className={[\"fd-quota\", className].filter(Boolean).join(\" \")}>\n      <div className=\"fd-quota-head\">\n        <span className=\"fd-quota-label\">{label}</span>\n        {note ? <span className=\"fd-quota-note\">{note}</span> : null}\n        <span className=\"fd-quota-pct fd-tabular\">{p}%</span>\n      </div>\n      <div className=\"fd-quota-rail\" role=\"meter\" aria-label={typeof label === \"string\" ? label : undefined} aria-valuenow={p} aria-valuemin={0} aria-valuemax={100}>\n        <span className=\"fd-quota-fill\" style={{ width: p + \"%\", background: VARIANT_FILL[tone || auto] }} />\n      </div>\n    </div>\n  );\n}\n","/**\n * File intake helpers — generic, no chat vocabulary.\n * Nothing here touches the DOM event lifecycle: extractors REPORT what they found,\n * the host decides whether to consume the event.\n *\n * Shared by the forms group and the chat kit — promoted to a top-level shared kit\n * since multiple component groups depend on it.\n */\n\n/* Shared file helpers for the forms group and the chat kit. Every component that\n   handles a file speaks this Attachment shape — one type, not three. */\n/** The host library's file shape. Use it for every file everywhere. */\nexport interface Attachment {\n  id: string;\n  name: string;\n  size: number;\n  mime: string;\n  url: string;\n  /** Local preview while uploading. */\n  blobUrl?: string;\n  /** Non-null and < 100 means uploading. */\n  progress?: number | null;\n  thumb?: { url: string };\n  /** Failed upload. Takes priority over progress. */\n  error?: string;\n  /** Free-text replacement for the size line, e.g. \"6 lines · pasted\". */\n  meta?: string;\n  /** Present only before upload; strip it before sending. */\n  file?: File;\n}\n\nexport interface FileRejection { file: File; reason: \"type\" | \"size\"; message: string }\n\nexport function formatBytes(n: number): string {\n  if (n == null || isNaN(n)) return \"\";\n  if (n < 1024) return n + \" B\";\n  const u = [\"KB\", \"MB\", \"GB\", \"TB\"];\n  let v = n / 1024, i = 0;\n  while (v >= 1024 && i < u.length - 1) { v /= 1024; i++; }\n  return (v < 10 ? v.toFixed(1) : Math.round(v)) + \" \" + u[i];\n}\n\nexport function extensionOf(name: string): string {\n  const m = /\\.([A-Za-z0-9]+)$/.exec(name || \"\");\n  return m ? m[1].toLowerCase() : \"\";\n}\n\nconst ICON_BY_EXT: Record<string, string> = {\n  pdf: \"file-pdf\", doc: \"file-doc\", docx: \"file-doc\", rtf: \"file-doc\",\n  xls: \"file-xls\", xlsx: \"file-xls\", csv: \"file-csv\", tsv: \"file-csv\",\n  ppt: \"file-ppt\", pptx: \"file-ppt\",\n  zip: \"file-zip\", gz: \"file-zip\", tar: \"file-zip\", rar: \"file-zip\",\n  js: \"file-js\", jsx: \"file-js\", ts: \"file-ts\", tsx: \"file-ts\",\n  json: \"brackets-curly\", html: \"file-html\", css: \"file-css\", md: \"file-md\",\n  py: \"file-py\", sql: \"database\", sh: \"terminal\", txt: \"file-text\", log: \"file-text\",\n};\n\n/** Phosphor icon name for a file: type first, extension second. */\nexport function iconForMime(mime?: string, name?: string): string {\n  const m = (mime || \"\").toLowerCase();\n  if (m.startsWith(\"image/\")) return \"image\";\n  if (m.startsWith(\"video/\")) return \"video\";\n  if (m.startsWith(\"audio/\")) return \"music-notes\";\n  const byExt = ICON_BY_EXT[extensionOf(name || \"\")];\n  if (byExt) return byExt;\n  if (m === \"application/pdf\") return \"file-pdf\";\n  if (m.startsWith(\"text/\")) return \"file-text\";\n  return \"file\";\n}\n\nexport function isImage(mime?: string, name?: string): boolean {\n  if ((mime || \"\").toLowerCase().startsWith(\"image/\")) return true;\n  return [\"png\", \"jpg\", \"jpeg\", \"gif\", \"webp\", \"avif\", \"svg\", \"bmp\"].includes(extensionOf(name || \"\"));\n}\n\n/** accept-attribute semantics: \".png,image/*,text/plain\" */\nexport function acceptMatches(file: File, accept?: string): boolean {\n  if (!accept) return true;\n  const mime = (file.type || \"\").toLowerCase();\n  const name = (file.name || \"\").toLowerCase();\n  return accept.split(\",\").map((s) => s.trim().toLowerCase()).filter(Boolean).some((rule) => {\n    if (rule.startsWith(\".\")) return name.endsWith(rule);\n    if (rule.endsWith(\"/*\")) return mime.startsWith(rule.slice(0, -1));\n    return mime === rule;\n  });\n}\n\n/** Split a FileList against accept + size. Rejections carry a reason string, never a silent drop. */\nexport function filterFiles(\n  files: FileList | File[],\n  opts?: { accept?: string; maxFileSize?: number },\n): { accepted: File[]; rejected: FileRejection[] } {\n  const o = opts || {};\n  const accepted: File[] = [], rejected: FileRejection[] = [];\n  Array.from(files || []).forEach((file) => {\n    if (!acceptMatches(file, o.accept)) { rejected.push({ file, reason: \"type\", message: (file.name || \"This file\") + \" isn't an accepted type.\" }); return; }\n    if (o.maxFileSize && file.size > o.maxFileSize) { rejected.push({ file, reason: \"size\", message: (file.name || \"This file\") + \" is \" + formatBytes(file.size) + \" — the limit is \" + formatBytes(o.maxFileSize) + \".\" }); return; }\n    accepted.push(file);\n  });\n  return { accepted, rejected };\n}\n\n/** Human name for a synthesised paste file: \"Pasted text (380 lines).txt\" */\nexport function pastedTextName(text: string): string {\n  const lines = text.split(\"\\n\").length;\n  if (lines === 1) return \"Pasted text (\" + text.length.toLocaleString() + \" characters).txt\";\n  return \"Pasted text (\" + lines.toLocaleString() + \" lines).txt\";\n}\n\nfunction makeTextFile(text: string, name: string): File {\n  const type = \"text/plain\";\n  try {\n    return new File([text], name, { type });\n  } catch {\n    const blob = new Blob([text], { type }) as File;\n    Object.assign(blob, { name, lastModified: Date.now() });\n    return blob;\n  }\n}\n\n/** Legacy jQuery-style event shape — some hosts still normalise paste events this way. */\ntype ClipboardEventLike = ClipboardEvent & { originalEvent?: ClipboardEvent };\n\n/**\n * What a paste is carrying, in one pass. NEVER calls preventDefault — it returns\n * `source: null` when nothing was produced, so the host can let the event fall\n * through. That is what makes it reusable in any input.\n */\nexport function extractClipboardFiles(\n  event: ClipboardEvent,\n  opts?: { largePasteThreshold?: number; accept?: string; maxFileSize?: number; name?: string },\n): { files: File[]; source: \"files\" | \"text\" | null; rejected: FileRejection[]; text?: string } {\n  const o = opts || {};\n  const threshold = o.largePasteThreshold == null ? 4000 : o.largePasteThreshold;\n  const evt = event as ClipboardEventLike;\n  const dt = event && (evt.clipboardData || (evt.originalEvent && evt.originalEvent.clipboardData));\n  if (!dt) return { files: [], source: null, rejected: [] };\n\n  const raw = Array.from(dt.files || []);\n  const fromItems: File[] = raw.length\n    ? raw\n    : Array.from(dt.items || [])\n        .filter((i) => i.kind === \"file\")\n        .map((i) => i.getAsFile())\n        .filter((f): f is File => f !== null);\n\n  if (fromItems.length) {\n    const { accepted, rejected } = filterFiles(fromItems, o);\n    return { files: accepted, source: accepted.length ? \"files\" : null, rejected };\n  }\n\n  const text = dt.getData ? dt.getData(\"text/plain\") : \"\";\n  if (threshold > 0 && text && text.length > threshold) {\n    const file = makeTextFile(text, o.name || pastedTextName(text));\n    const { accepted, rejected } = filterFiles([file], { accept: o.accept, maxFileSize: o.maxFileSize });\n    return { files: accepted, source: accepted.length ? \"text\" : null, rejected, text };\n  }\n  return { files: [], source: null, rejected: [] };\n}\n\nlet attachmentSeq = 0;\n/**\n * Local, immediately-renderable stand-in for a file being uploaded.\n * Shape is the host library's file type — id/name/size/mime/url/progress/thumb/error.\n */\nexport function toAttachment(file: File, extra?: Partial<Attachment>): Attachment {\n  const url = typeof URL !== \"undefined\" && URL.createObjectURL ? URL.createObjectURL(file) : \"\";\n  const image = isImage(file.type, file.name);\n  const base: Attachment = {\n    id: \"att_\" + (++attachmentSeq) + \"_\" + Date.now().toString(36),\n    name: file.name || \"file\",\n    size: file.size || 0,\n    mime: file.type || \"application/octet-stream\",\n    url,\n    blobUrl: url,\n    progress: null,\n    thumb: image && url ? { url } : undefined,\n    file,\n  };\n  return Object.assign(base, extra || {});\n}\n\nexport function revokeAttachment(att: Attachment): void {\n  try { if (att && att.blobUrl) URL.revokeObjectURL(att.blobUrl); } catch { /* noop */ }\n}\n\n/**\n * Namespace export — `const { formatBytes } = window.<Namespace>.FileKit;`\n */\nexport const FileKit = {\n  formatBytes,\n  extensionOf,\n  iconForMime,\n  isImage,\n  acceptMatches,\n  filterFiles,\n  pastedTextName,\n  extractClipboardFiles,\n  toAttachment,\n  revokeAttachment,\n};\n","import * as React from \"react\";\nimport { Tooltip } from \"../feedback/Tooltip\";\nimport { meterFormats } from \"./SegmentedMeter\";\n\n/**\n * Shared internals for the chart family (TrendChart, DonutChart, BarList, FunnelChart —\n * MP-210). Not exported from the package: every chart draws its own SVG, but the colour\n * ramp, number formatting, the visually-hidden text-alternative table and the\n * keyboard-reachable legend are the same mechanism everywhere, so they live once here\n * instead of four times.\n */\n\n/** The kit's one categorical ramp for data series. Every chart cycles through these\n *  eight tokens and only these — never an ad-hoc colour — so a chart is correct in\n *  light, dark and high-contrast without any theme-specific code of its own. */\nexport const CHART_RAMP = [\n  \"var(--chart-1)\", \"var(--chart-2)\", \"var(--chart-3)\", \"var(--chart-4)\",\n  \"var(--chart-5)\", \"var(--chart-6)\", \"var(--chart-7)\", \"var(--chart-8)\",\n];\n\nexport function chartColor(index: number, override?: string): string {\n  return override || CHART_RAMP[index % CHART_RAMP.length];\n}\n\nexport const formatCompact = meterFormats.compact;\nexport const formatCount = meterFormats.count;\n\n/** A `+NN%` / `-NN%` formatter for rates that can go either way — never used for a\n *  magnitude, which is always non-negative and uses formatCompact/formatCount instead. */\nexport function formatPercent(n: number, digits = 0): string {\n  if (n == null || Number.isNaN(n)) return \"—\";\n  return n.toFixed(digits) + \"%\";\n}\n\nexport interface ChartDataTableProps {\n  /** Announced as the table's own name — always start with what the chart shows. */\n  caption: string;\n  columns: string[];\n  rows: Array<Array<React.ReactNode>>;\n}\n\n/**\n * The text alternative every chart in this family ships alongside its SVG: a real\n * `<table>`, visually hidden by an `.fd-sr` clip on a wrapping `<div>` (never `display: none`,\n * which would also hide it from assistive tech). The clip cannot sit on the `<table>` itself:\n * browsers ignore width/height on a table, so it would render full size and stretch the page. A screen reader user gets the same\n * numbers a sighted user reads off the chart, in the one format that was always going\n * to be more useful than a paragraph of prose: a table.\n */\nexport function ChartDataTable({ caption, columns, rows }: ChartDataTableProps) {\n  return (\n    <div className=\"fd-sr\">\n    <table>\n      <caption>{caption}</caption>\n      <thead>\n        <tr>\n          {columns.map((c, i) => (\n            <th key={i} scope=\"col\">{c}</th>\n          ))}\n        </tr>\n      </thead>\n      <tbody>\n        {rows.map((r, i) => (\n          <tr key={i}>\n            {r.map((cell, j) => (j === 0 ? <th key={j} scope=\"row\">{cell}</th> : <td key={j}>{cell}</td>))}\n          </tr>\n        ))}\n      </tbody>\n    </table>\n    </div>\n  );\n}\n\nexport interface ChartLegendItem {\n  key: string;\n  label: React.ReactNode;\n  color: string;\n  /** Plain-text detail shown in the tooltip bubble and read by assistive tech, e.g.\n   *  \"Delivered — 1,204,338 (62%)\". */\n  detail: string;\n  muted?: boolean;\n}\n\nexport interface ChartLegendProps {\n  items: ChartLegendItem[];\n  activeKey?: string | null;\n  onActivate?: (key: string | null) => void;\n  className?: string;\n  /** Default true. False when the chart shows its own detail popover for the active item\n   *  (DonutChart): the row then carries the detail as its accessible name instead of a\n   *  second bubble that would take its own Escape. */\n  bubble?: boolean;\n}\n\n/**\n * The one legend every chart in this family uses: a row of real `<button>`s, each\n * wrapped in the kit's `Tooltip` (hover, keyboard focus, and tap all open the same\n * bubble — see Tooltip.tsx). Hovering or focusing an item reports itself via\n * `onActivate` so the chart can highlight the matching series/segment; leaving reports\n * `null`. Nothing here is decorative — every swatch has a name and a value behind it.\n */\nexport function ChartLegend({ items, activeKey, onActivate, className = \"\", bubble = true }: ChartLegendProps) {\n  if (!items.length) return null;\n  return (\n    <ul className={[\"fd-chart-legend\", className].filter(Boolean).join(\" \")}>\n      {items.map((it) => {\n        const isActive = activeKey == null || activeKey === it.key;\n        const button = (\n          <button\n            type=\"button\"\n            aria-label={bubble ? undefined : it.detail}\n            className={[\"fd-chart-legend-item\", it.muted || !isActive ? \"is-dim\" : \"\"].filter(Boolean).join(\" \")}\n            onFocus={() => onActivate && onActivate(it.key)}\n            onBlur={() => onActivate && onActivate(null)}\n            onMouseEnter={() => onActivate && onActivate(it.key)}\n            onMouseLeave={() => onActivate && onActivate(null)}\n          >\n            <span className=\"fd-chart-legend-swatch\" style={{ background: it.color }} aria-hidden=\"true\" />\n            <span className=\"fd-chart-legend-label\">{it.label}</span>\n          </button>\n        );\n        return (\n          <li key={it.key}>\n            {bubble ? <Tooltip label={it.detail}>{button}</Tooltip> : button}\n          </li>\n        );\n      })}\n    </ul>\n  );\n}\n\nexport type ChartState = \"loading\" | \"refreshing\" | \"ready\" | \"empty\" | \"error\";\n","import * as React from \"react\";\nimport { useStackedLayer, isWithinLayerTree } from \"../../kits/layerStack\";\nimport { LoadingRegion } from \"../loading/LoadingRegion\";\nimport { Skeleton } from \"../loading/Skeleton\";\nimport { ChartDataTable, ChartLegend, chartColor, formatCompact, formatPercent, type ChartState } from \"./chartInternal\";\n\nexport interface DonutSegment {\n  id: string;\n  label: string;\n  value: number;\n  /** Defaults to the categorical ramp in order. */\n  color?: string;\n  /** \"quiet\" draws the slice in the system's quiet colour (as SegmentedMeter's `variant: \"quiet\"`), so a\n   *  remainder such as \"No year\" reads as background. An explicit `color` wins. */\n  variant?: \"quiet\";\n}\n\nexport interface DonutChartProps {\n  segments: DonutSegment[];\n  /** Accessible name for the chart, e.g. \"Vendor source\". Required. */\n  label: string;\n  /** Diameter in px. The ring is always fluid up to this size (100% of a narrower\n   *  container), never wider. */\n  size?: number;\n  thickness?: number;\n  /** Big number in the centre. Defaults to the segment total. */\n  centerLabel?: string;\n  centerSubLabel?: string;\n  valueFormat?: (n: number) => string;\n  state?: ChartState;\n  error?: string;\n  onRetry?: () => void;\n  className?: string;\n}\n\nconst QUIET_FILL = \"var(--n-300)\";\n\nfunction segmentColor(index: number, seg: DonutSegment): string {\n  return seg.color || (seg.variant === \"quiet\" ? QUIET_FILL : chartColor(index));\n}\n\n/**\n * DonutChart — segments drawn as concentric `stroke-dasharray` arcs (no path/arc maths\n * needed for a ring), a centre label, and a keyboard-reachable legend. Colour comes only\n * from `--chart-1..8` (MP-210), which render identically in light, dark and high\n * contrast, so the ring needs no theme-specific code.\n *\n * Matches the operator's reference front end (PLN-2 SMS-20): a ring with a percentage\n * in the centre and a legend of `label · pct% · count` rows below it (vendor source,\n * blocked-number breakdown).\n */\nexport function DonutChart({\n  segments,\n  label,\n  size = 160,\n  thickness = 22,\n  centerLabel,\n  centerSubLabel,\n  valueFormat = formatCompact,\n  state = \"ready\",\n  error,\n  onRetry,\n  className = \"\",\n}: DonutChartProps) {\n  const [activeId, setActiveId] = React.useState<string | null>(null);\n  const ringRef = React.useRef<HTMLDivElement>(null);\n  const items = segments.filter((s) => Number(s.value) > 0);\n  const total = items.reduce((n, s) => n + Number(s.value), 0);\n  const isEmpty = state === \"ready\" && (!items.length || total <= 0);\n  const effectiveState: ChartState = isEmpty ? \"empty\" : state;\n\n  const r = (size - thickness) / 2;\n  const cx = size / 2;\n  const cy = size / 2;\n  const circumference = 2 * Math.PI * r;\n\n  let cumulative = 0;\n  const arcs = items.map((s, i) => {\n    const fraction = total ? Number(s.value) / total : 0;\n    const dash = fraction * circumference;\n    const offset = cumulative;\n    cumulative += dash;\n    return { seg: s, i, dash, offset, fraction };\n  });\n\n  const dominant = items.length\n    ? items.reduce((best, s) => (Number(s.value) > Number(best.value) ? s : best), items[0])\n    : null;\n  const centerBig = centerLabel != null ? centerLabel : (dominant ? formatPercent(Math.round((Number(dominant.value) / (total || 1)) * 100)) : \"—\");\n  const centerSmall = centerSubLabel != null ? centerSubLabel : (dominant ? dominant.label : undefined);\n\n  const active = arcs.find((a) => a.seg.id === activeId) || null;\n\n  // DS-53: the detail opens inside the ring's own hole (see `.fd-donut-pop-surface`), so it is\n  // bounded by the ring's box. It is a layer of the shared stack (kits/layerStack), like the Popover\n  // it replaced: Escape goes to the innermost layer only, and a press inside anything opened over it\n  // is not an outside press. Focus is never moved, so none is returned.\n  const layer = useStackedLayer({ active: activeId != null, containerRef: ringRef, onEscape: () => setActiveId(null), returnFocus: false });\n  React.useEffect(() => {\n    if (!activeId) return;\n    const onDown = (e: PointerEvent) => {\n      const t = e.target as Node;\n      if (isWithinLayerTree(layer, t) || ringRef.current?.contains(t)) return;\n      if ((t as Element).closest?.(\".fd-chart-legend-item\")) return;\n      setActiveId(null);\n    };\n    document.addEventListener(\"pointerdown\", onDown);\n    return () => document.removeEventListener(\"pointerdown\", onDown);\n  }, [activeId, layer]);\n\n  return (\n    <div className={[\"fd-donut\", className].filter(Boolean).join(\" \")}>\n      <LoadingRegion\n        state={effectiveState}\n        label={label + \" — loading\"}\n        error={error}\n        onRetry={onRetry}\n        skeleton={\n          <div style={{ width: `min(100%, ${size}px)`, aspectRatio: \"1 / 1\" }}>\n            <Skeleton shape=\"circle\" w=\"100%\" h=\"100%\" />\n          </div>\n        }\n      >\n        <div className=\"fd-donut-body\">\n          <div ref={ringRef} className=\"fd-donut-ring\" style={{ width: `min(100%, ${size}px)`, aspectRatio: \"1 / 1\" }}>\n            <svg viewBox={`0 0 ${size} ${size}`} role=\"img\" aria-label={label} width=\"100%\" height=\"100%\">\n              <circle cx={cx} cy={cy} r={r} fill=\"none\" stroke=\"var(--surface-3)\" strokeWidth={thickness} />\n              {arcs.map(({ seg, i, dash, offset }) => {\n                const color = segmentColor(i, seg);\n                const dim = activeId != null && activeId !== seg.id;\n                return (\n                  <circle\n                    key={seg.id}\n                    cx={cx}\n                    cy={cy}\n                    r={r}\n                    fill=\"none\"\n                    stroke={color}\n                    strokeWidth={dim ? thickness - 4 : thickness}\n                    strokeDasharray={`${dash} ${circumference - dash}`}\n                    strokeDashoffset={-offset}\n                    transform={`rotate(-90 ${cx} ${cy})`}\n                    aria-hidden=\"true\"\n                    onPointerEnter={(e) => { if (e.pointerType !== \"touch\") setActiveId(seg.id); }}\n                    onPointerLeave={(e) => { if (e.pointerType !== \"touch\") setActiveId(null); }}\n                    onClick={() => setActiveId(seg.id)}\n                    style={{ opacity: dim ? 0.35 : 1, transition: \"stroke-width var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease)\" }}\n                  />\n                );\n              })}\n            </svg>\n            {active ? (\n              <div className=\"fd-donut-pop-surface\" role=\"tooltip\">\n                <div className=\"fd-donut-pop\">\n                  <strong>{active.seg.label}</strong>\n                  <div className=\"fd-tabular\">\n                    {valueFormat(active.seg.value)} · {formatPercent(Math.round(active.fraction * 100))}\n                  </div>\n                </div>\n              </div>\n            ) : null}\n            <div className=\"fd-donut-center\" hidden={active != null}>\n              <span className=\"fd-donut-center-big fd-tabular\">{centerBig}</span>\n              {centerSmall ? <span className=\"fd-donut-center-small\">{centerSmall}</span> : null}\n            </div>\n          </div>\n\n          <ChartLegend\n            activeKey={activeId}\n            onActivate={setActiveId}\n            bubble={false}\n            className=\"fd-donut-legend\"\n            items={items.map((s, i) => {\n              const pct = total ? Math.round((Number(s.value) / total) * 100) : 0;\n              return {\n                key: s.id,\n                label: <>{s.label}{\" \"}<span className=\"fd-donut-legend-value\">{formatPercent(pct)} · {valueFormat(s.value)}</span></>,\n                color: segmentColor(i, s),\n                // The row's accessible name (ChartLegend bubble={false}): it must contain the row's visible\n                // text, label then percent, so a person who speaks what they see reaches the row.\n                detail: `${s.label} ${formatPercent(pct)} · ${valueFormat(s.value)}`,\n              };\n            })}\n          />\n        </div>\n\n        <ChartDataTable\n          caption={label}\n          columns={[\"Segment\", \"Value\", \"Percent\"]}\n          rows={items.map((s) => [s.label, valueFormat(s.value), formatPercent(total ? Math.round((Number(s.value) / total) * 100) : 0)])}\n        />\n      </LoadingRegion>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Tooltip } from \"../feedback/Tooltip\";\nimport { LoadingRegion } from \"../loading/LoadingRegion\";\nimport { SkeletonText } from \"../loading/Skeleton\";\nimport { truncationTitle } from \"../textExposure\";\nimport { ChartDataTable, chartColor, formatCompact, formatPercent, type ChartState } from \"./chartInternal\";\n\nexport interface BarListRow {\n  id: string;\n  label: string;\n  value: number;\n  /** Defaults to the categorical ramp in order. */\n  color?: string;\n}\n\nexport interface BarListProps {\n  rows: BarListRow[];\n  /** Accessible name for the whole list, e.g. \"Largest states\". Required. */\n  label: string;\n  valueFormat?: (n: number) => string;\n  /** Percent is computed against this. Defaults to the sum of every row's value. */\n  total?: number;\n  /** How a row's share of `total` (a fraction, 0 to 1) is written: the row, its label and the data table. Defaults to whole percents. */\n  shareFormat?: (share: number) => string;\n  /** Sort descending by value before rendering. Default true — this IS a ranking. */\n  sort?: boolean;\n  /** Cap the number of rows drawn (after sorting). */\n  maxRows?: number;\n  barHeight?: number;\n  state?: ChartState;\n  error?: string;\n  onRetry?: () => void;\n  className?: string;\n}\n\n/** The default share text: a whole percent. */\nconst wholePercent = (share: number) => formatPercent(Math.round(share * 100));\n\n/**\n * BarList — ranked rows with a label, a proportional bar, a value and a percent, the\n * shape the reference front end draws for \"Largest states\" / \"Vendor source by count\"\n * (PLN-2 SMS-20).\n *\n * Each bar is scaled against the *largest* row (so the top row is always full width and\n * the rest read relative to it, matching the reference), while the percent shown next to\n * the value is computed against `total` (the sum of every row, by default) — the two\n * numbers answer different questions and both matter. Not built on `Meter`: `Meter`\n * stacks segments of one whole into a single bar, but a bar list draws one independent,\n * fully proportional bar per row, which is a different shape than `Meter` produces.\n * Reused from it instead: the same chart colour ramp and formatters (`chartInternal`,\n * itself built on `SegmentedMeter`'s `meterFormats`) and the same row-composition idiom\n * as `SegmentedMeter`'s legend rows (swatch, label, value).\n *\n * Every row is a real `<button>` wrapped in the kit's `Tooltip`, so the ranking is\n * keyboard-reachable and each row's full detail is available as a tooltip even though\n * the same numbers are already printed inline.\n */\nexport function BarList({\n  rows,\n  label,\n  valueFormat = formatCompact,\n  total,\n  shareFormat = wholePercent,\n  sort = true,\n  maxRows,\n  barHeight = 10,\n  state = \"ready\",\n  error,\n  onRetry,\n  className = \"\",\n}: BarListProps) {\n  const ordered = React.useMemo(() => {\n    const list = sort ? [...rows].sort((a, b) => Number(b.value) - Number(a.value)) : rows;\n    return maxRows ? list.slice(0, maxRows) : list;\n  }, [rows, sort, maxRows]);\n\n  const isEmpty = state === \"ready\" && ordered.every((r) => !(Number(r.value) > 0));\n  const effectiveState: ChartState = isEmpty ? \"empty\" : state;\n\n  const maxValue = ordered.reduce((m, r) => Math.max(m, Number(r.value) || 0), 0) || 1;\n  // Compute the default total from every row, before sort and slice; maxRows only limits what's drawn.\n  const effectiveTotal = total != null ? total : rows.reduce((n, r) => n + (Number(r.value) || 0), 0);\n\n  return (\n    <div className={[\"fd-barlist\", className].filter(Boolean).join(\" \")}>\n      <LoadingRegion\n        state={effectiveState}\n        label={label + \" — loading\"}\n        error={error}\n        onRetry={onRetry}\n        skeleton={<SkeletonText lines={Math.min(rows.length || 4, 6)} size={barHeight + 18} gap={10} />}\n      >\n        <ol className=\"fd-barlist-list\" aria-label={label}>\n          {ordered.map((r, i) => {\n            const value = Number(r.value) || 0;\n            const barPct = Math.max(0, Math.min(100, (value / maxValue) * 100));\n            const share = effectiveTotal ? value / effectiveTotal : 0;\n            const color = chartColor(i, r.color);\n            const detail = `${r.label} — ${valueFormat(value)} (${shareFormat(share)})`;\n            return (\n              <li key={r.id} className=\"fd-barlist-row\">\n                <Tooltip label={detail}>\n                  <button type=\"button\" className=\"fd-barlist-btn\">\n                    <span className=\"fd-barlist-label\" title={truncationTitle(r.label)}>{r.label}</span>\n                    <span className=\"fd-barlist-track\" style={{ height: barHeight }}>\n                      <svg viewBox=\"0 0 100 10\" preserveAspectRatio=\"none\" role=\"img\" aria-label={detail}>\n                        <rect x={0} y={0} width={100} height={10} rx={3} className=\"fd-barlist-rail\" />\n                        <rect x={0} y={0} width={barPct} height={10} rx={3} fill={color} />\n                      </svg>\n                    </span>\n                    <span className=\"fd-barlist-value fd-tabular\">{valueFormat(value)}</span>\n                    <span className=\"fd-barlist-pct fd-tabular\">{shareFormat(share)}</span>\n                  </button>\n                </Tooltip>\n              </li>\n            );\n          })}\n        </ol>\n\n        <ChartDataTable\n          caption={label}\n          columns={[\"\", \"Value\", \"Percent\"]}\n          rows={ordered.map((r) => {\n            const value = Number(r.value) || 0;\n            const share = effectiveTotal ? value / effectiveTotal : 0;\n            return [r.label, valueFormat(value), shareFormat(share)];\n          })}\n        />\n      </LoadingRegion>\n    </div>\n  );\n}\n","import { Tooltip } from \"../feedback/Tooltip\";\nimport { LoadingRegion } from \"../loading/LoadingRegion\";\nimport { SkeletonText } from \"../loading/Skeleton\";\nimport { truncationTitle } from \"../textExposure\";\nimport { ChartDataTable, chartColor, formatCompact, formatPercent, type ChartState } from \"./chartInternal\";\n\nexport interface FunnelStep {\n  id: string;\n  label: string;\n  value: number;\n}\n\nexport interface FunnelChartProps {\n  /** In order, first to last — e.g. Sent, Delivered, Clicked, Opted-out. */\n  steps: FunnelStep[];\n  /** Accessible name for the whole funnel, e.g. \"Send funnel\". Required. */\n  label: string;\n  valueFormat?: (n: number) => string;\n  barHeight?: number;\n  state?: ChartState;\n  error?: string;\n  onRetry?: () => void;\n  className?: string;\n}\n\n/**\n * FunnelChart — ordered steps drawn as a tapering stack (Sent -> Delivered -> Clicked ->\n * Opted-out, the reference front end's own shape, PLN-2 SMS-20), each reporting its\n * value, its step rate (conversion from the step before it) and its percent of the\n * first step. Each step's label (name, value, rates) sits above its own bar. Colour comes only from `--chart-1..8` (MP-210), one per step in order.\n *\n * Every step is a real `<button>` wrapped in the kit's `Tooltip`, keyboard-reachable\n * exactly like `BarList`'s rows — a funnel is a ranked, ordered list before it is a\n * picture, so it gets the same interaction.\n */\nexport function FunnelChart({\n  steps,\n  label,\n  valueFormat = formatCompact,\n  barHeight = 44,\n  state = \"ready\",\n  error,\n  onRetry,\n  className = \"\",\n}: FunnelChartProps) {\n  const isEmpty = state === \"ready\" && (!steps.length || !(Number(steps[0]?.value) > 0));\n  const effectiveState: ChartState = isEmpty ? \"empty\" : state;\n\n  const first = Number(steps[0]?.value) || 0;\n  const pctOfFirst = steps.map((s) => (first ? Math.max(0, Math.min(100, (Number(s.value) / first) * 100)) : 0));\n  const maxPct = Math.max(1, ...pctOfFirst);\n\n  return (\n    <div className={[\"fd-funnel\", className].filter(Boolean).join(\" \")}>\n      <LoadingRegion\n        state={effectiveState}\n        label={label + \" — loading\"}\n        error={error}\n        onRetry={onRetry}\n        skeleton={<SkeletonText lines={Math.min(steps.length || 4, 6)} size={barHeight} gap={4} />}\n      >\n        <ol className=\"fd-funnel-list\" aria-label={label}>\n          {steps.map((s, i) => {\n            const value = Number(s.value) || 0;\n            const prev = i > 0 ? Number(steps[i - 1].value) || 0 : null;\n            const stepRate = prev != null ? (prev ? (value / prev) * 100 : 0) : null;\n            const pctFirst = pctOfFirst[i];\n            const topPct = pctFirst;\n            const bottomPct = i < steps.length - 1 ? pctOfFirst[i + 1] : pctFirst;\n            const widthPct = (Math.max(topPct, bottomPct) / maxPct) * 100;\n            const insetTop = widthPct ? ((Math.max(topPct, bottomPct) - topPct) / Math.max(topPct, bottomPct)) * 50 : 0;\n            const insetBottom = widthPct ? ((Math.max(topPct, bottomPct) - bottomPct) / Math.max(topPct, bottomPct)) * 50 : 0;\n            const color = chartColor(i);\n            const detail = `${s.label} — ${valueFormat(value)} · ${formatPercent(Math.round(pctFirst))} of ${steps[0]?.label || \"first step\"}` +\n              (stepRate != null ? ` · ${formatPercent(Math.round(stepRate))} of ${steps[i - 1].label}` : \"\");\n            return (\n              <li key={s.id} className=\"fd-funnel-row\">\n                <Tooltip label={detail}>\n                  <button type=\"button\" className=\"fd-funnel-btn\">\n                    <span className=\"fd-funnel-meta\">\n                      <span className=\"fd-funnel-label\" title={truncationTitle(s.label)}>{s.label}</span>\n                      <span className=\"fd-funnel-value fd-tabular\">{valueFormat(value)}</span>\n                      <span className=\"fd-funnel-rates fd-tabular\">\n                        {stepRate != null ? <span>{formatPercent(Math.round(stepRate))} step rate</span> : null}\n                        <span>{formatPercent(Math.round(pctFirst))} of first</span>\n                      </span>\n                    </span>\n                    <span className=\"fd-funnel-shape-wrap\" style={{ height: barHeight }}>\n                      <span\n                        className=\"fd-funnel-shape\"\n                        role=\"img\"\n                        aria-label={detail}\n                        style={{\n                          width: widthPct + \"%\",\n                          background: color,\n                          clipPath: `polygon(${insetTop}% 0, ${100 - insetTop}% 0, ${100 - insetBottom}% 100%, ${insetBottom}% 100%)`,\n                        }}\n                      />\n                    </span>\n                  </button>\n                </Tooltip>\n              </li>\n            );\n          })}\n        </ol>\n\n        <ChartDataTable\n          caption={label}\n          columns={[\"Step\", \"Value\", \"Step rate\", \"Percent of first\"]}\n          rows={steps.map((s, i) => {\n            const value = Number(s.value) || 0;\n            const prev = i > 0 ? Number(steps[i - 1].value) || 0 : null;\n            const stepRate = prev != null ? (prev ? (value / prev) * 100 : 0) : null;\n            return [\n              s.label,\n              valueFormat(value),\n              stepRate != null ? formatPercent(Math.round(stepRate)) : \"—\",\n              formatPercent(Math.round(pctOfFirst[i])),\n            ];\n          })}\n        />\n      </LoadingRegion>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nexport interface ClampProps {\n  children?: React.ReactNode;\n  /** With maxChars, pass the raw string instead of children. */\n  text?: string;\n  maxChars?: number;\n  maxHeight?: number;\n  moreLabel?: string;\n  lessLabel?: string;\n  onToggle?: (open: boolean) => void;\n  className?: string;\n}\n\n/**\n * Height- or character-clamped content with a Show more control.\n * The control is a real button, always in the DOM when the content overflows.\n */\nexport function Clamp({\n  children, text, maxChars, maxHeight = 320,\n  moreLabel = \"Show more\", lessLabel = \"Show less\",\n  onToggle, className = \"\",\n}: ClampProps) {\n  const [open, setOpen] = React.useState(false);\n  const [overflows, setOverflows] = React.useState(false);\n  const bodyRef = React.useRef<HTMLDivElement>(null);\n\n  const charClamped = React.useMemo(() => {\n    if (open || !maxChars || typeof text !== \"string\" || text.length <= maxChars) return null;\n    const cut = text.slice(0, maxChars);\n    const at = cut.lastIndexOf(\" \");\n    return (at > maxChars * 0.6 ? cut.slice(0, at) : cut).trimEnd() + \"…\";\n  }, [text, maxChars, open]);\n\n  React.useLayoutEffect(() => {\n    const node = bodyRef.current;\n    if (maxChars || !node || !maxHeight) return;\n    const measure = () => {\n      const el = bodyRef.current;\n      if (el) setOverflows(el.scrollHeight > maxHeight + 24);\n    };\n    measure();\n    const RO = typeof ResizeObserver !== \"undefined\" ? ResizeObserver : null;\n    if (!RO) return;\n    const ro = new RO(measure);\n    ro.observe(node);\n    return () => ro.disconnect();\n  }, [maxHeight, maxChars, children, text]);\n\n  const clamped = maxChars ? !!charClamped : overflows && !open;\n  const toggle = () => { setOpen((v) => { onToggle && onToggle(!v); return !v; }); };\n\n  return (\n    <div className={[\"fd-clamp\", clamped ? \"is-clamped\" : \"\", className].filter(Boolean).join(\" \")}>\n      <div className=\"fd-clamp-body\" ref={bodyRef} style={!maxChars && clamped ? { maxHeight } : undefined}>\n        {maxChars ? (charClamped != null ? charClamped : (text != null ? text : children)) : children}\n      </div>\n      {(maxChars ? (charClamped != null || open) : overflows) ? (\n        <button type=\"button\" className=\"fd-clamp-more\" onClick={toggle} aria-expanded={open}>\n          <i className={\"ph ph-caret-\" + (open ? \"up\" : \"down\")} aria-hidden=\"true\" />\n          {open ? lessLabel : moreLabel}\n        </button>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nconst BANDS: Record<string, { n: number; label: string }> = {\n  weak: { n: 1, label: \"Weak\" },\n  adequate: { n: 2, label: \"Adequate\" },\n  strong: { n: 3, label: \"Strong\" },\n  dominant: { n: 4, label: \"Dominant\" },\n};\n\n/** CRP is a derived float (e.g. 151.63707315984357) — never render it raw. One decimal\n *  matches every other CRP display in this library (BudgetReallocator, ChannelContribution). */\nfunction formatCrp(crp: number): string {\n  return crp.toFixed(1);\n}\n\nexport interface CsiMeterProps {\n  band: \"weak\" | \"adequate\" | \"strong\" | \"dominant\";\n  size?: number;\n  width?: number;\n  gap?: number;\n}\n\nexport function CsiMeter({ band = \"weak\", size = 4, width = 5, gap = 2 }: CsiMeterProps) {\n  const n = (BANDS[band] || BANDS.weak).n;\n  return (\n    <span className=\"fd-meter\" style={{ gap: gap + \"px\" }} aria-hidden=\"true\">\n      {[1, 2, 3, 4].map((i) => (\n        <span\n          key={i}\n          className={\"fd-meter-seg\" + (i <= n ? \" is-on\" : \"\")}\n          style={{ width: width + \"px\", height: size + \"px\" }}\n        />\n      ))}\n    </span>\n  );\n}\n\n/**\n * Campus Saturation Index — the product's signature encoding. Four ordered bands\n * in a reserved teal ramp that appears nowhere else: blue is interaction, teal is\n * saturation. Never color-only — the band name and a 4-segment meter always ship\n * with the fill.\n */\nexport interface CsiBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n  band: \"weak\" | \"adequate\" | \"strong\" | \"dominant\";\n  /** Cost per reachable person. Internal surfaces only — never client-facing. */\n  crp?: number;\n  size?: \"compact\" | \"medium\";\n  /** The \"will become\" state while a reallocation is being dragged: 70% opacity, dashed edge. */\n  preview?: boolean;\n  /** Amber dot marking a Weak campus that can be fixed. */\n  alert?: boolean;\n}\n\nexport function CsiBadge({ band = \"weak\", crp, size = \"compact\", preview = false, alert = false, className = \"\", ...rest }: CsiBadgeProps) {\n  const b = BANDS[band] || BANDS.weak;\n  return (\n    <span\n      className={[\"fd-csi\", \"fd-csi-\" + b.n, size === \"medium\" ? \"fd-csi-medium\" : \"fd-csi-compact\", preview ? \"fd-csi-preview\" : \"\", className].filter(Boolean).join(\" \")}\n      {...rest}\n    >\n      {alert ? <span className=\"fd-badge-dot\" style={{ background: \"var(--csi-alert)\" }} aria-label=\"Fixable\" /> : null}\n      <CsiMeter band={band} size={size === \"medium\" ? 11 : 9} width={size === \"medium\" ? 4 : 3} />\n      {b.label}\n      {crp !== undefined && crp !== null ? <span className=\"fd-csi-crp\">{formatCrp(crp)}</span> : null}\n    </span>\n  );\n}\n\nexport interface CsiHeroProps {\n  band: \"weak\" | \"adequate\" | \"strong\" | \"dominant\";\n  crp?: number;\n  label?: string;\n  className?: string;\n}\n\nexport function CsiHero({ band = \"weak\", crp, label, className = \"\" }: CsiHeroProps) {\n  const b = BANDS[band] || BANDS.weak;\n  const mark = \"var(--csi-\" + b.n + \"-mark)\";\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 10 }}>\n      <span className=\"fd-csi-hero-num\" style={{ color: mark }}>\n        {crp !== undefined && crp !== null ? formatCrp(crp) : \"\"}\n      </span>\n      <span className=\"fd-label-lg\" style={{ color: \"var(--text-2)\" }}>{label || b.label}</span>\n      <span className=\"fd-meter\" style={{ gap: 3, color: mark, width: 120 } as React.CSSProperties}>\n        {[1, 2, 3, 4].map((i) => (\n          <span key={i} className={\"fd-meter-seg\" + (i <= b.n ? \" is-on\" : \"\")} style={{ height: 6, flex: 1 }} />\n        ))}\n      </span>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { useMeasuredWidth } from \"../useMeasuredWidth\";\nimport { IconButton } from \"../actions/IconButton\";\n\n/** The widest the table's own container may be, in px, and still stack its rows as cards: the kit's\n *  `--bp-sm`, the same `max-width: 640px` its other narrow layouts use. It is the container's width,\n *  not the window's, so a table in a narrow column stacks on a wide screen too. */\nconst STACK_MAX_WIDTH = 640;\n\n/** What a column becomes when the table is narrow (640px or less), where each row is a compact card instead of a table row:\n *  `primary` is on the card's title line, `secondary` in its muted meta line (labelled with the\n *  column's label), `hidden` is left out. */\nexport type DataTablePhoneRole = \"primary\" | \"secondary\" | \"hidden\";\n\n/**\n * The product's dense read surface. Sticky overline header, hairline rows, no zebra,\n * numbers right-aligned and tabular. Renders its own skeleton rows so the table\n * never collapses while data is in flight. At 640px wide or less (its own width, not the window's) each row becomes a compact card.\n */\n/** A column's heading: plain text, or any node (a title with secondary text, say) together with\n *  `labelText`, its plain-text name, which the sort control's aria-label needs. */\nexport type DataTableColumnLabel =\n  | { label: string; labelText?: undefined }\n  | { label: React.ReactNode; labelText: string };\n\nexport type DataTableColumn = DataTableColumnLabel & {\n  key: string;\n  /** Right-aligned tabular figures. Never center a number. */\n  numeric?: boolean;\n  /** Keeps this column's values on one line, in the table cell and in the phone card's meta line, so a value\n   *  like \"FOIA 2025-26\" never breaks at its hyphen. A table too narrow for it scrolls sideways in its own wrapper. */\n  noWrap?: boolean;\n  /** Set widths explicitly; auto layout shifts as data arrives. */\n  width?: string;\n  sortable?: boolean;\n  /** The column's role in the stacked-card layout, at a table width of 640px or less. At least one column must be `primary`. */\n  phone: DataTablePhoneRole;\n  render?: (row: any) => React.ReactNode;\n  /** The phone card's form of this column's value, for when `render`'s is too long for a card (a reason that\n   *  would crowd the meta line, say). Only the stacked card uses it; the table cell always uses `render`. */\n  phoneRender?: (row: any) => React.ReactNode;\n};\n/** One row's own action: an icon button that acts on that row (a download, say) and never opens it. */\nexport interface DataTableRowAction {\n  /** Phosphor icon name, as IconButton takes it. */\n  icon: string;\n  /** The button's accessible name and tooltip, e.g. \"Download original file\". */\n  label: string;\n  onClick: () => void;\n  disabled?: boolean;\n}\n\nexport interface DataTableProps {\n  columns: DataTableColumn[];\n  rows: any[];\n  compact?: boolean;\n  /** Keys (row[rowKey]) of every selected row; each gets aria-selected and the selected styling. */\n  selectedIds?: ReadonlyArray<string | number>;\n  /** Per-row title (native tooltip), e.g. \"Click to add to / remove from filter\". */\n  rowTitle?: (row: any) => string;\n  onRowClick?: (row: any) => void;\n  /** A control of each row's own. In the table it is the last cell of the row (under a visually hidden\n   *  \"Actions\" header); in a phone card it is a button beside the card, not inside the card's own button.\n   *  It is reachable by Tab, named by its label, and never triggers `onRowClick`. Return null for a row with\n   *  no action. */\n  rowAction?: (row: any) => DataTableRowAction | null;\n  rowKey?: string;\n  /** First load: nothing on screen yet, so skeleton rows are drawn. */\n  loading?: boolean;\n  /** A re-query (sort, filter, page) while the PREVIOUS rows are still rendered. Dims them,\n   *  makes them inert and shows an \"Updating…\" pill, so nobody acts on superseded data. */\n  refreshing?: boolean;\n  skeletonRows?: number;\n  sort?: { key: string; dir: \"asc\" | \"desc\" };\n  onSort?: (key: string) => void;\n  className?: string;\n}\n\n/** The button of one row's action (the larger touch target in a phone card). Its click stops here so a table row's `onRowClick` never sees it. */\nfunction RowActionButton({ action, size }: { action: DataTableRowAction; size: \"sm\" | \"md\" }) {\n  return (\n    <IconButton icon={action.icon} label={action.label} size={size} disabled={action.disabled}\n      onClick={(e) => { e.stopPropagation(); action.onClick(); }} />\n  );\n}\n\nfunction RowActionCell({ action }: { action: DataTableRowAction | null }) {\n  return <td className=\"fd-table-action\">{action ? <RowActionButton action={action} size=\"sm\" /> : null}</td>;\n}\n\nconst cellOf = (c: DataTableColumn, row: any): React.ReactNode => (c.render ? c.render(row) : row[c.key]);\n/** The class a column's cell (and its phone-card meta item) carries: `is-num` for `numeric`, `fd-table-nowrap` for `noWrap`. */\nconst cellClassOf = (c: DataTableColumn): string | undefined =>\n  [c.numeric ? \"is-num\" : \"\", c.noWrap ? \"fd-table-nowrap\" : \"\"].filter(Boolean).join(\" \") || undefined;\n\n/** The same value in a phone card: `phoneRender` when the column has one, else what the table cell shows. */\nconst cardCellOf = (c: DataTableColumn, row: any): React.ReactNode => (c.phoneRender ? c.phoneRender(row) : cellOf(c, row));\n\n/** A row (table row or card) that acts on click: reachable by Tab and activated by Enter or Space,\n *  but only when the key lands on the row itself, never on a control inside it. */\nfunction rowInteraction(row: any, onRowClick: DataTableProps[\"onRowClick\"]) {\n  if (!onRowClick) return {};\n  return {\n    tabIndex: 0,\n    \"data-clickable\": \"true\",\n    onClick: () => onRowClick(row),\n    onKeyDown: (e: React.KeyboardEvent) => {\n      if (e.target !== e.currentTarget || (e.key !== \"Enter\" && e.key !== \" \")) return;\n      e.preventDefault();\n      onRowClick(row);\n    },\n  };\n}\n\ntype SortButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n  column: DataTableColumn;\n  sort: DataTableProps[\"sort\"];\n  onSort: (key: string) => void;\n};\n\n/** The sort toggle of one sortable column: its header in the table, a button of the sort bar in cards. */\nfunction SortButton({ column, sort, onSort, ...rest }: SortButtonProps) {\n  return (\n    <button type=\"button\" onClick={() => onSort(column.key)} {...rest}>\n      {column.label}\n      {sort && sort.key === column.key ? <i className={\"ph fd-caret ph-caret-\" + (sort.dir === \"asc\" ? \"up\" : \"down\")} /> : null}\n    </button>\n  );\n}\n\nexport function DataTable({\n  columns = [], rows = [], compact = false, selectedIds, rowTitle, onRowClick, rowAction, rowKey = \"id\",\n  loading = false, refreshing = false, skeletonRows = 6, sort, onSort, className = \"\", ...rest\n}: DataTableProps) {\n  if (columns.length && !columns.some((c) => c.phone === \"primary\")) {\n    throw new Error(\"DataTable: no column has phone: \\\"primary\\\", so a stacked card would have no title line.\");\n  }\n  const [measureHost, hostWidth] = useMeasuredWidth(STACK_MAX_WIDTH + 1);\n  const stacked = hostWidth <= STACK_MAX_WIDTH;\n  /* `loading` is the first load: no rows exist, so draw skeletons.\n     `refreshing` is a re-query (sort, filter, page) where the OLD rows are still on screen —\n     they must read as not-current, or the user acts on data the server has already superseded.\n     Reuses the design system's documented stale tier (skeleton.css: fd-stale-region + fd-stale,\n     dimmed, inert, with a sheen) and adds only the explicit label that tier lacks. */\n  const stale = refreshing && !loading;\n  const isSelected = (r: any) => !!selectedIds?.includes(r[rowKey]);\n  /* The overlay lives in a host OUTSIDE .fd-table-wrap on purpose. The wrap carries\n     overflow:auto for wide tables, which makes it the nearest scrollport — so a sticky pill\n     inside it can never stick to the page's real scroller and scrolled straight off screen.\n     The host has no overflow, so sticky resolves against .fd-scroll as intended.\n     Rendered unconditionally so toggling stale causes no layout shift. */\n  return (\n    <div className=\"fd-table-host\" ref={measureHost}>\n      <div className={[\"fd-table-wrap\", stacked ? \"fd-table-wrap-stacked\" : \"\", className].filter(Boolean).join(\" \")}\n        aria-busy={loading || refreshing ? \"true\" : undefined} {...rest}>\n        {stacked ? (\n          <StackedRows columns={columns} rows={rows} rowKey={rowKey} loading={loading} stale={stale}\n            skeletonRows={skeletonRows} sort={sort} onSort={onSort} rowTitle={rowTitle}\n            onRowClick={onRowClick} rowAction={rowAction} isSelected={isSelected} />\n        ) : (\n          <table className={[\"fd-table\", compact ? \"fd-table-compact\" : \"\"].filter(Boolean).join(\" \")}>\n            <thead>\n              <tr>\n                {columns.map((c) => (\n                  <th key={c.key} scope=\"col\" style={{ width: c.width }}\n                    className={[c.numeric ? \"is-num\" : \"\", sort && sort.key === c.key ? \"is-sorted\" : \"\"].filter(Boolean).join(\" \")}\n                    aria-sort={sort && sort.key === c.key ? (sort.dir === \"asc\" ? \"ascending\" : \"descending\") : undefined}>\n                    {c.sortable && onSort ? <SortButton column={c} sort={sort} onSort={onSort} /> : c.label}\n                  </th>\n                ))}\n                {rowAction ? <th scope=\"col\" className=\"fd-table-action-head\"><span className=\"fd-sr-only\">Actions</span></th> : null}\n              </tr>\n            </thead>\n            <tbody className={stale ? \"fd-stale\" : undefined}>\n              {loading\n                ? Array.from({ length: skeletonRows }).map((_, i) => (\n                  <tr key={i}>\n                    {columns.map((c) => (\n                      <td key={c.key} className={cellClassOf(c)}>\n                        <span className=\"fd-skel fd-skel-text\" style={{ display: \"inline-block\", height: 13, width: c.numeric ? 52 : (i % 3 === 0 ? \"72%\" : \"88%\") }} />\n                      </td>\n                    ))}\n                    {rowAction ? <td className=\"fd-table-action\" /> : null}\n                  </tr>\n                ))\n                : rows.map((r) => (\n                  <tr key={r[rowKey]} aria-selected={isSelected(r) ? \"true\" : undefined}\n                    title={rowTitle ? rowTitle(r) : undefined} {...rowInteraction(r, onRowClick)}>\n                    {columns.map((c) => (\n                      <td key={c.key} className={cellClassOf(c)}>\n                        {cellOf(c, r)}\n                      </td>\n                    ))}\n                    {rowAction ? <RowActionCell action={rowAction(r)} /> : null}\n                  </tr>\n                ))}\n            </tbody>\n          </table>\n        )}\n      </div>\n      {stale ? (\n        <div className=\"fd-table-stale\">\n          <span className=\"fd-table-stale-pill\" role=\"status\"><span className=\"fd-spinner\" aria-hidden=\"true\" /> Updating…</span>\n        </div>\n      ) : null}\n    </div>\n  );\n}\n\ninterface StackedRowsProps extends Pick<DataTableProps, \"columns\" | \"rows\" | \"sort\" | \"onSort\" | \"rowTitle\" | \"onRowClick\" | \"rowAction\"> {\n  rowKey: string;\n  loading: boolean;\n  stale: boolean;\n  skeletonRows: number;\n  isSelected: (row: any) => boolean;\n}\n\n/** The phone layout of DataTable: a sort bar (the table's headers are gone) over one compact card per\n *  row, at most a title line and a two-line meta line. */\nfunction StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort, onSort, rowTitle, onRowClick, rowAction, isSelected }: StackedRowsProps) {\n  const sortable = onSort ? columns.filter((c) => c.sortable) : [];\n  const primary = columns.filter((c) => c.phone === \"primary\");\n  const secondary = columns.filter((c) => c.phone === \"secondary\");\n  return (\n    <>\n      {onSort && sortable.length ? (\n        <div className=\"fd-dt-sort\" role=\"group\" aria-label=\"Sort by\">\n          {sortable.map((c) => {\n            const active = sort?.key === c.key;\n            return (\n              <SortButton key={c.key} column={c} sort={sort} onSort={onSort} aria-pressed={active}\n                aria-label={active ? `${c.labelText === undefined ? c.label : c.labelText}, ${sort!.dir === \"asc\" ? \"ascending\" : \"descending\"}` : undefined} />\n            );\n          })}\n        </div>\n      ) : null}\n      <div className={stale ? \"fd-dt-cards fd-stale\" : \"fd-dt-cards\"}>\n        {loading\n          ? Array.from({ length: skeletonRows }).map((_, i) => (\n            <div key={i} className=\"fd-dt-item\">\n              <div className=\"fd-dt-card\">\n                <span className=\"fd-skel fd-skel-text\" style={{ display: \"block\", height: 14, width: i % 3 === 0 ? \"55%\" : \"70%\" }} />\n                {secondary.length ? <span className=\"fd-skel fd-skel-text\" style={{ display: \"block\", height: 12, width: \"40%\" }} /> : null}\n              </div>\n            </div>\n          ))\n          : rows.map((r) => {\n            const selected = isSelected(r);\n            const action = rowAction ? rowAction(r) : null;\n            const semantics = onRowClick\n              ? { role: \"button\", \"aria-pressed\": selected }\n              : { \"aria-current\": selected ? (\"true\" as const) : undefined };\n            return (\n              <div key={r[rowKey]} className=\"fd-dt-item\">\n                <div className=\"fd-dt-card\" title={rowTitle ? rowTitle(r) : undefined}\n                  data-selected={selected ? \"true\" : undefined} {...semantics} {...rowInteraction(r, onRowClick)}>\n                  <div className=\"fd-dt-card-title\">\n                    {primary.map((c) => <span key={c.key} className={c.numeric ? \"is-num\" : undefined}>{cardCellOf(c, r)}</span>)}\n                  </div>\n                  {secondary.length ? (\n                    <div className=\"fd-dt-card-meta\">\n                      {secondary.map((c) => (\n                        <span key={c.key} className={cellClassOf(c)}>\n                          <span className=\"fd-dt-card-label\">{c.label}</span> {cardCellOf(c, r)}\n                        </span>\n                      ))}\n                    </div>\n                  ) : null}\n                </div>\n                {action ? <div className=\"fd-dt-action\"><RowActionButton action={action} size=\"md\" /></div> : null}\n              </div>\n            );\n          })}\n      </div>\n    </>\n  );\n}\n","import * as React from \"react\";\nimport { Button } from \"../actions/Button\";\nimport { ReservedSkeleton } from \"../loading/ReservedSkeleton\";\nimport { SegmentedControl } from \"../actions/SegmentedControl\";\nimport { Tag } from \"../feedback/Tag\";\nimport { Badge } from \"../feedback/Badge\";\nimport { Banner } from \"../feedback/Banner\";\nimport { NumberInput } from \"../forms/NumberInput\";\nimport { DatePicker } from \"../forms/DatePicker\";\nimport { Textarea } from \"../forms/Textarea\";\nimport { Popover, Menu, type MenuItem } from \"../actions/Popover\";\nimport { useListboxNav, useListboxScrollIntoView } from \"../forms/listbox\";\nimport { useLatest } from \"../useLatest\";\nimport { MiddleEllipsis } from \"./MiddleEllipsis\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { Tooltip } from \"../feedback/Tooltip\";\n\nexport interface FilterFieldOption {\n  value: string;\n  label: string;\n}\n\ninterface FilterFieldBase {\n  /** Filter id — the key this field reads/writes in `filters` and reports through\n   *  onFilterChange/onFilterRemove. Matches useServerTable's setFilter(id, value). */\n  key: string;\n  /** Human label shown in the \"add filter\" list and on the field's chip, where it names the kind\n   *  ahead of the value (\"Label: value\") unless the field has an `icon` to name it. */\n  label: string;\n  /** Phosphor icon name (e.g. \"megaphone\") drawn before the chip's text, so a chip reads as\n   *  its kind at a glance. It names the kind for a sighted reader, so a chip with an icon and a\n   *  value paints that value alone; its accessible name and tooltip stay the full \"Label: value\". */\n  icon?: string;\n  /** DS-55: gives the field's chip a small help button beside it. `summary` is one line saying what\n   *  the help explains; it shows in a Tooltip on hover and focus and is the button's description.\n   *  Pressing the button calls FilterBar's `onFieldHelp(key, button)`; FilterBar draws no help content. */\n  help?: FilterFieldHelp;\n}\n\nexport interface FilterFieldHelp {\n  summary: string;\n}\n\nexport interface FilterFieldText extends FilterFieldBase {\n  type: \"text\";\n  placeholder?: string;\n}\n\nexport interface FilterFieldSelect extends FilterFieldBase {\n  type: \"select\";\n  options: FilterFieldOption[];\n}\n\n/** A filter whose value is set from outside FilterBar, by a link or the host's own state (MP-312). Its\n *  chip paints `valueLabel` and carries an x that removes it; the chip opens no picker, and the field\n *  is never offered in the Filter menu, so a person can neither add nor edit it. The value in\n *  `filters` is whatever the host set (any non-empty string); the label is the host's to provide, and\n *  so are loading and error states (pass a placeholder label until the real one is known). */\nexport interface FilterFieldFixed extends FilterFieldBase {\n  type: \"fixed\";\n  /** What the chip paints for the value, e.g. a sheet's name. */\n  valueLabel: string;\n}\n\n/** Include/exclude, shared by every field whose value is a set of options. */\nexport type FilterOperator = \"in\" | \"notIn\";\n\nexport interface FilterMultiSelectValue {\n  operator: FilterOperator;\n  values: FilterFieldOption[];\n}\n\nexport interface FilterResolveMatch {\n  token: string;\n  value: string;\n  label: string;\n}\n\nexport interface FilterResolveResult {\n  matched: FilterResolveMatch[];\n  unmatched: string[];\n}\n\nexport interface FilterFieldMultiSelect extends FilterFieldBase {\n  type: \"multiSelect\";\n  /** Sync option list — filtered client-side by the typed query. Omit when `loadOptions`\n   *  is given; the two are mutually exclusive (async wins if both are somehow set). */\n  options?: FilterFieldOption[];\n  /** Async option source for long lists (schools, imports, …), called ~300ms after the\n   *  last keystroke with the current query (possibly \"\") and an AbortSignal that fires\n   *  once a newer query has superseded this call — pass it straight to `fetch`/whatever\n   *  transport does the lookup so a superseded request is actually cancelled, not just\n   *  ignored on arrival. A rejection (that isn't the abort itself) renders as a visible\n   *  error with a Retry action; it is never folded into \"no matches\", since a search\n   *  that FAILED is a different thing to tell the user than a search that found\n   *  nothing. */\n  loadOptions?: (query: string, signal: AbortSignal) => Promise<FilterFieldOption[]>;\n  /** Paste-a-list as a second input mode for THIS SAME field — search and paste both\n   *  build one FilterMultiSelectValue for one dimension, so a school found by typing and\n   *  a school found by pasting a list land as two entries in the same set instead of two\n   *  separate filters that would AND together. Presence of `resolve` is what turns on\n   *  the Search/Paste mode switch; omit it for a search-only field. Never called with an\n   *  empty token list, and tokens are de-duplicated before the call. */\n  resolve?: (tokens: string[]) => Promise<FilterResolveResult>;\n  placeholder?: string;\n  /** What the panel says when the field has nothing to pick at all: its option list\n   *  (`options`, or what `loadOptions` returns for the empty query) is empty and nothing\n   *  has been typed, e.g. \"No contact lists yet.\" It replaces the generic \"No matches\",\n   *  which would wrongly suggest a search came up short. The field stays in the Filter\n   *  menu and the text is announced through the panel's status region. Once the user types\n   *  and nothing matches, \"No matches\" still shows. Omit it for the generic text. */\n  emptyText?: string;\n  /** Placeholder for the paste textarea, when `resolve` is given. Falls back to `placeholder`. */\n  pastePlaceholder?: string;\n  /** Restrict which operators this field's toggle offers, e.g. `[\"in\"]` for a dimension\n   *  that only ever means \"is any of\" and never \"is none of\" — a single-operator list\n   *  hides the toggle entirely and that operator applies unconditionally, so an app can\n   *  express an \"any\"/\"is\"-only dimension exactly rather than showing a switch with\n   *  nothing to switch to. Defaults to both `[\"in\", \"notIn\"]`. */\n  operators?: FilterOperator[];\n  /** The most values one selection may hold, e.g. the server's own limit on an id list.\n   *  validateFilterValue rejects a larger selection, search stops offering new options\n   *  once the limit is reached, and a pasted list that would exceed it is refused with a\n   *  visible error instead of being applied. Must be a whole number of at least 1;\n   *  FilterBar throws a clear, field-naming error in development if it isn't. No limit\n   *  when omitted. */\n  maxValues?: number;\n}\n\nexport interface FilterRangeValue {\n  min?: number;\n  max?: number;\n}\n\nexport interface FilterFieldRange extends FilterFieldBase {\n  type: \"range\";\n  /** Bounds enforced on each stepper/typed value — NOT the same as the filter's own\n   *  min/max VALUE (FilterRangeValue), which is what the user is narrowing to. */\n  min?: number;\n  max?: number;\n  step?: number;\n  /** Requires whole numbers for both bounds. Off by default, the same opt-in NumberInput\n   *  itself takes — a range field with a whole-number step (e.g. 10) may still want\n   *  decimal bounds, so this is a deliberate choice, not inferred from `step`. */\n  integer?: boolean;\n  minLabel?: string;\n  maxLabel?: string;\n  minPlaceholder?: string;\n  maxPlaceholder?: string;\n}\n\nexport type FilterDateValue =\n  | { kind: \"withinDays\"; days: number }\n  | { kind: \"between\"; from: string; to: string };\n\nexport interface FilterFieldDate extends FilterFieldBase {\n  type: \"date\";\n  /** Default days shown the first time \"within the last N days\" is picked — shown, not\n   *  written: nothing is set until the user changes it or confirms it. Must be a whole\n   *  number from 1 to `maxDays`; FilterBar throws a clear, field-naming error in\n   *  development if it isn't. */\n  defaultDays?: number;\n  /** Upper bound enforced on the \"within the last N days\" input. Default 3650 (ten\n   *  years), which is also a hard ceiling: a larger maxDays is treated as 3650 by\n   *  validateFilterValue and the Days input, in production as well as development. Must\n   *  be a whole number from 1 to 3650; FilterBar throws a clear, field-naming error in\n   *  development if it isn't. */\n  maxDays?: number;\n}\n\n/** A declared filter field. Add a variant here (and a branch below) for a new value\n *  picker. text/select keep their original bare-string value shape unchanged, so an\n *  existing consumer needs no migration; every other variant's value is a small typed\n *  object of its own (see FilterValue). */\nexport type FilterField =\n  | FilterFieldText\n  | FilterFieldSelect\n  | FilterFieldFixed\n  | FilterFieldMultiSelect\n  | FilterFieldRange\n  | FilterFieldDate;\n\n/** The value shape a given declared field reads/writes, so a consumer can type its own\n *  `filters` record precisely instead of `Record<string, unknown>` — e.g.\n *  `Record<\"schools\", FilterValue<typeof schoolsField>>`. */\nexport type FilterValue<F extends FilterField> = F extends FilterFieldText\n  ? string\n  : F extends FilterFieldSelect | FilterFieldFixed\n    ? string\n    : F extends FilterFieldMultiSelect\n      ? FilterMultiSelectValue\n      : F extends FilterFieldRange\n        ? FilterRangeValue\n        : F extends FilterFieldDate\n          ? FilterDateValue\n          : never;\n\nexport interface FilterBarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"onChange\"> {\n  /** Every filter a consumer can add. Order here is the order in the \"add filter\" list. */\n  fields: FilterField[];\n  /** DS-55: fires with the field's key when the help button on a selected chip whose field has `help`\n   *  is pressed, with the pressed button element as the second argument so the app can anchor its help to it\n   *  and return focus to it (Safari and Firefox on macOS do not focus a clicked button, so the app cannot\n   *  read it from document.activeElement). The app opens its own help for that filter; the press does nothing else. */\n  onFieldHelp?: (key: string, button: HTMLButtonElement) => void;\n  /** The applied filters, and the single source of truth for them: FilterBar keeps no\n   *  copy. Straight off useServerTable — a value of undefined/\"\"/false reads as \"not set\",\n   *  same convention that hook already uses for activeFilterCount. multiSelect/range/\n   *  date values are objects instead (see isFieldSet). Every edit, and every paste that\n   *  settles later, is computed from this prop as it stands at that moment; a panel seeds\n   *  itself from it when it opens, and follows it if it changes while open. */\n  filters: Record<string, unknown>;\n  /** Fires on every value edit. Maps 1:1 onto useServerTable's setFilter(id, value).\n   *  FilterBar only ever calls this with a COMPLETE, valid value for the field — an\n   *  emptied selection, a one-sided date range, an invalid numeric range, number text\n   *  that isn't a valid value, or a cleared bound go through onFilterRemove (or nothing,\n   *  when the filter isn't set) instead.\n   *\n   *  FilterBar is a controlled component: apply this to your state synchronously, so the\n   *  next render passes the new `filters`. Never apply it inside `startTransition` or\n   *  after a delay; React's rule for controlled inputs applies here too. Number fields\n   *  emit on every keystroke that leaves them valid, so defer the EXPENSIVE work instead:\n   *  debounce the request this triggers, or read the filters through useDeferredValue. A\n   *  host that keeps filters in the URL keeps them in memory as the source of truth and\n   *  syncs the URL from that. */\n  onFilterChange: (key: string, value: unknown) => void;\n  /** Fires when a chip's × is clicked, or when an edit leaves a field with no valid\n   *  value; never for a key that isn't set in `filters`. Maps 1:1 onto useServerTable's\n   *  clearFilter(id). Apply it synchronously, exactly like onFilterChange. */\n  onFilterRemove: (key: string) => void;\n  /** Which edge the \"add filter\" popover aligns to. Default \"left\" — the trigger sits\n   *  at the start of the bar, so its menu opens under its left edge. */\n  align?: \"left\" | \"right\";\n  /** Controls that sit at the bar's right edge, in a column of their own: a date range, an\n   *  export button. They are laid out beside the Filter button and the chips and stay put\n   *  however many chips wrap (they top-align to the Filter button, never to the chips), and\n   *  drop below the chips on a row of their own, still right-aligned, when the bar is too\n   *  narrow to hold them all on one line. */\n  actions?: React.ReactNode;\n  /** Shows a \"Clear all\" button, right after the Filter button (under it when the main column is too narrow to hold both), while any filter is applied; it never\n   *  shows without one. Fires once, with no arguments: the host clears every filter in a\n   *  single update (applied synchronously, like onFilterChange/onFilterRemove), so FilterBar\n   *  never fans one click out into a removal per filter. */\n  onClearAll?: () => void;\n  /** Shows the number of applied conditions on the Filter button (each selected option of a\n   *  multiSelect counts, every other applied filter counts once), and nothing at zero. Off by\n   *  default. With every field applied there is nothing left to add, so the button, which\n   *  normally goes away then, stays disabled while it carries a count. */\n  showActiveCount?: boolean;\n  /** True while the field options are still arriving (`fields` has nothing in it yet). The bar holds\n   *  its whole layout instead of collapsing and then growing: the Filter button's place is reserved\n   *  by a skeleton exactly the button's size, the chips area keeps its height, and `actions` stay\n   *  live where they are. Announced as busy; no filter can be opened or edited until it is false. */\n  loading?: boolean;\n  /** What a screen reader hears while `loading`. */\n  loadingLabel?: string;\n  className?: string;\n}\n\ntype Panel = { kind: \"add\" } | { kind: \"edit\"; key: string } | null;\n\n/** Panel surface widths, named once rather than repeated per render call — passed\n *  straight to Popover's own `width` prop, the same way Select passes its own\n *  `minWidth={260}`. */\nconst PANEL_WIDTH = { multiSelect: 280, range: 240, date: 300 } as const;\n\n/** Everything in an option row that is not its label: popover + row padding, the checkbox\n *  icon and its gap, and a scrollbar. */\nconst OPTION_CHROME = 88;\n\nlet measureCtx: CanvasRenderingContext2D | null | undefined;\n/** The one-line pixel width of `text` in the font `el` (a rendered option label) paints with, at\n *  the weight of a SELECTED row (`--w-semibold`, wider than the unselected one): a row that\n *  fits unselected must still fit once it is picked. */\nfunction textWidth(text: string, el: Element): number {\n  if (measureCtx === undefined) measureCtx = document.createElement(\"canvas\").getContext(\"2d\");\n  if (!measureCtx) return 0;\n  const cs = getComputedStyle(el);\n  const weight = getComputedStyle(document.documentElement).getPropertyValue(\"--w-semibold\").trim();\n  measureCtx.font = `${cs.fontStyle} ${weight} ${cs.fontSize} ${cs.fontFamily}`;\n  return measureCtx.measureText(text).width;\n}\n\n/** Same \"is this filter set\" rule as useServerTable's activeFilterCount, so a value this\n *  component didn't just write (e.g. restored from a URL) still renders as a chip. Only\n *  correct for text/select's bare-string values — see isFieldSet for the per-type rule\n *  every variant (including these two) is actually checked against. */\nconst isSet = (v: unknown): boolean => !(v == null || v === \"\" || v === false);\n\n/** Which operators a multiSelect field's toggle offers — every field gets both unless it\n *  restricts itself. */\nfunction operatorsFor(field: FilterFieldMultiSelect): FilterOperator[] {\n  return field.operators && field.operators.length ? field.operators : [\"in\", \"notIn\"];\n}\n\n/** Whether `value` counts as \"this filter is active\", per field type — this is also the\n *  definition of \"valid\", since FilterBar never lets an incomplete value reach `filters`\n *  in the first place. A multiSelect value is set only once it holds at least one\n *  option; a range is set once either bound is present; a between-dates value is set\n *  only once BOTH sides are present (a one-sided between is not a real range yet). */\nfunction isFieldSet(field: FilterField, value: unknown): boolean {\n  switch (field.type) {\n    case \"text\":\n    case \"select\":\n    case \"fixed\":\n      return isSet(value);\n    case \"multiSelect\": {\n      const v = value as FilterMultiSelectValue | undefined;\n      return !!v && Array.isArray(v.values) && v.values.length > 0;\n    }\n    case \"range\": {\n      const v = value as FilterRangeValue | undefined;\n      return !!v && (v.min != null || v.max != null);\n    }\n    case \"date\": {\n      const v = value as FilterDateValue | undefined;\n      if (!v) return false;\n      return v.kind === \"withinDays\" ? v.days != null : !!(v.from && v.to);\n    }\n  }\n}\n\n/** How many conditions are applied: each selected option of a multiSelect counts, every other\n *  applied filter counts once. Only fields FilterBar was given count, since only they have a chip. */\nfunction activeFilterCount(fields: FilterField[], filters: Record<string, unknown>): number {\n  let total = 0;\n  for (const field of fields) {\n    const value = filters[field.key];\n    if (!isFieldSet(field, value)) continue;\n    total += field.type === \"multiSelect\" ? (value as FilterMultiSelectValue).values.length : 1;\n  }\n  return total;\n}\n\nexport type FilterValidation = { ok: true } | { ok: false; reason: string };\n\n/** The ceiling on \"within the last N days\", whatever a field's own maxDays says. */\nconst MAX_WITHIN_DAYS = 3650;\n\n/** A date field's effective Days limit: its maxDays (default 3650), never above 3650. */\nfunction effectiveMaxDays(field: FilterFieldDate): number {\n  return Math.min(field.maxDays ?? MAX_WITHIN_DAYS, MAX_WITHIN_DAYS);\n}\n\n/** A real calendar date written as YYYY-MM-DD. */\nfunction isIsoDate(v: unknown): v is string {\n  if (typeof v !== \"string\" || !/^\\d{4}-\\d{2}-\\d{2}$/.test(v)) return false;\n  const d = new Date(v + \"T00:00:00Z\");\n  return !Number.isNaN(d.getTime()) && d.toISOString().slice(0, 10) === v;\n}\n\nconst isOption = (o: unknown): o is FilterFieldOption =>\n  !!o && typeof (o as FilterFieldOption).value === \"string\" && typeof (o as FilterFieldOption).label === \"string\";\n\n/**\n * The one place every field kind's rules live. Pure, with no state, so FilterBar's own\n * commit function, a consumer's code (e.g. to disable a submit button) and a test can\n * all call it on any candidate value:\n * - text: a string.\n * - select: one of the field's own option values.\n * - fixed: nothing; its value is the host's, so no edit is valid.\n * - multiSelect: `{ operator, values }` with at least one `{ value, label }` option, no\n *   more than the field's `maxValues`, and an operator the field allows.\n * - date, withinDays: a whole number of days from 1 to the field's maxDays, which is\n *   itself capped at 3650.\n * - date, between: two real YYYY-MM-DD dates, `from` on or before `to`.\n * - range: at least one bound; each present bound a finite number within the field's\n *   min/max, and a whole number when `field.integer` is set; min ≤ max when both are set.\n */\nexport function validateFilterValue(field: FilterField, value: unknown): FilterValidation {\n  switch (field.type) {\n    case \"text\":\n      return typeof value === \"string\" ? { ok: true } : { ok: false, reason: \"Enter text\" };\n    case \"fixed\":\n      return { ok: false, reason: \"This filter is set from outside and cannot be edited\" };\n    case \"select\":\n      return field.options.some((o) => o.value === value) ? { ok: true } : { ok: false, reason: \"Pick one of the options\" };\n    case \"multiSelect\": {\n      const v = value as FilterMultiSelectValue | undefined;\n      if (!v || !Array.isArray(v.values) || v.values.length === 0) {\n        return { ok: false, reason: \"Select at least one value\" };\n      }\n      if (!v.values.every(isOption)) return { ok: false, reason: \"Each value needs a value and a label\" };\n      if (field.maxValues != null && v.values.length > field.maxValues) {\n        return { ok: false, reason: \"Select at most \" + field.maxValues + \" values\" };\n      }\n      if (!operatorsFor(field).includes(v.operator)) {\n        return { ok: false, reason: \"That operator isn't allowed for \" + field.label };\n      }\n      return { ok: true };\n    }\n    case \"range\": {\n      const v = value as FilterRangeValue | undefined;\n      if (!v || (v.min == null && v.max == null)) {\n        return { ok: false, reason: \"Enter at least one bound\" };\n      }\n      const lo = field.min ?? -Infinity;\n      const hi = field.max ?? Infinity;\n      for (const n of [v.min, v.max]) {\n        if (n == null) continue;\n        if (typeof n !== \"number\" || !Number.isFinite(n)) return { ok: false, reason: \"Enter a number\" };\n        if (field.integer && !Number.isInteger(n)) return { ok: false, reason: \"Enter a whole number\" };\n        if (n < lo) return { ok: false, reason: \"Must be ≥ \" + lo };\n        if (n > hi) return { ok: false, reason: \"Must be ≤ \" + hi };\n      }\n      if (v.min != null && v.max != null && v.min > v.max) {\n        return { ok: false, reason: \"Must be ≥ \" + v.min };\n      }\n      return { ok: true };\n    }\n    case \"date\": {\n      const v = value as FilterDateValue | undefined;\n      if (!v) return { ok: false, reason: \"Pick a date value\" };\n      if (v.kind === \"withinDays\") {\n        const maxDays = effectiveMaxDays(field);\n        if (v.days == null) return { ok: false, reason: \"Enter a number of days\" };\n        if (!Number.isInteger(v.days)) return { ok: false, reason: \"Enter a whole number\" };\n        if (v.days < 1) return { ok: false, reason: \"Must be ≥ 1\" };\n        if (v.days > maxDays) return { ok: false, reason: \"Must be ≤ \" + maxDays };\n        return { ok: true };\n      }\n      if (v.kind !== \"between\") return { ok: false, reason: \"Pick a date value\" };\n      if (!v.from || !v.to) return { ok: false, reason: \"Pick both dates\" };\n      if (!isIsoDate(v.from) || !isIsoDate(v.to)) return { ok: false, reason: \"Dates must be YYYY-MM-DD\" };\n      if (v.from > v.to) return { ok: false, reason: \"The start date must be on or before the end date\" };\n      return { ok: true };\n    }\n  }\n}\n\n/** Whether `candidate` represents \"nothing entered\" for this field kind: the UI-level\n *  distinction (separate from validity) between a value that should be REMOVED (or never\n *  written in the first place) and one that should be held back as invalid. text/select\n *  never auto-remove: an empty string is itself a legal value for them. */\nfunction isEmptyCandidate(field: FilterField, candidate: unknown): boolean {\n  return field.type !== \"text\" && field.type !== \"select\" && !isFieldSet(field, candidate);\n}\n\n/** Guards a field's own definition, not a value a user typed: `defaultDays`, `maxDays`\n *  and `maxValues` are constants an app hard-codes, so a bad one is a programming error\n *  to catch in development. Production relies on validateFilterValue, which enforces the\n *  same limits on every value, so a bad constant can never crash a real user's page nor\n *  let an out-of-contract value through. */\nfunction assertValidFieldDefinition(field: FilterField): void {\n  if (field.type === \"multiSelect\" && field.maxValues != null && (!Number.isInteger(field.maxValues) || field.maxValues < 1)) {\n    throw new Error(\n      'FilterBar: multiSelect field \"' + field.key + '\" has an invalid maxValues (' + field.maxValues + ') — must be a whole number of at least 1.',\n    );\n  }\n  if (field.type !== \"date\") return;\n  const defaultDays = field.defaultDays ?? 30;\n  const maxDays = field.maxDays ?? MAX_WITHIN_DAYS;\n  if (!Number.isInteger(maxDays) || maxDays < 1 || maxDays > MAX_WITHIN_DAYS) {\n    throw new Error(\n      'FilterBar: date field \"' + field.key + '\" has an invalid maxDays (' + field.maxDays + ') — must be a whole number from 1 to ' + MAX_WITHIN_DAYS + '.',\n    );\n  }\n  if (!Number.isInteger(defaultDays) || defaultDays < 1 || defaultDays > maxDays) {\n    throw new Error(\n      'FilterBar: date field \"' + field.key + '\" has an invalid defaultDays (' + field.defaultDays + ') — must be a whole number from 1 to maxDays (' + maxDays + ').',\n    );\n  }\n}\n\n/** Whether the chip's value text is several option labels joined (a multiSelect of two; three or\n *  more read \"N selected\"), whose end belongs to a different option than its start. */\nfunction joinsLabels(field: FilterField, value: unknown): boolean {\n  return field.type === \"multiSelect\" && (value as FilterMultiSelectValue | undefined)?.values.length === 2;\n}\n\n/** The chip's value text, per field type — the single place that formats every variant's\n *  value into the \"Label: <this>\" chip, so the chip-list render and the \"editing\" render\n *  never drift into two different formats for the same field. */\nfunction chipLabel(field: FilterField, value: unknown): string {\n  switch (field.type) {\n    case \"text\":\n      return String(value ?? \"\");\n    case \"fixed\":\n      return field.valueLabel;\n    case \"select\": {\n      const chosen = field.options.find((o) => o.value === value);\n      return chosen ? chosen.label : String(value ?? \"\");\n    }\n    case \"multiSelect\": {\n      const v = value as FilterMultiSelectValue | undefined;\n      if (!v || !v.values.length) return \"\";\n      const prefix = v.operator === \"notIn\" ? \"Not \" : \"\";\n      return v.values.length <= 2\n        ? prefix + v.values.map((o) => o.label).join(\", \")\n        : prefix + v.values.length + \" selected\";\n    }\n    case \"range\": {\n      const v = value as FilterRangeValue | undefined;\n      if (!v) return \"\";\n      if (v.min != null && v.max != null) return v.min + \"–\" + v.max;\n      if (v.min != null) return \"≥ \" + v.min;\n      if (v.max != null) return \"≤ \" + v.max;\n      return \"\";\n    }\n    case \"date\": {\n      const v = value as FilterDateValue | undefined;\n      if (!v) return \"\";\n      if (v.kind === \"withinDays\") return \"Last \" + v.days + \" day\" + (v.days === 1 ? \"\" : \"s\");\n      // isFieldSet already requires both sides before a \"date\" chip is ever rendered.\n      return v.from + \" → \" + v.to;\n    }\n  }\n}\n\n/** The include/exclude toggle shared by every multiSelect field that allows both\n *  operators — a per-field operator, rendered as an explicit two-target choice\n *  (SortMenu/DatePicker's own idiom in this kit) rather than a single toggle button\n *  someone has to click and then re-read to confirm which state they landed in. Not\n *  rendered at all when a field restricts itself to one operator. */\nfunction OperatorToggle({\n  operator,\n  onChange,\n  label,\n}: {\n  operator: FilterOperator;\n  onChange: (operator: FilterOperator) => void;\n  label: string;\n}) {\n  return (\n    <SegmentedControl\n      aria-label={label + \" — include or exclude\"}\n      options={[\n        { value: \"in\", label: \"Is any of\" },\n        { value: \"notIn\", label: \"Is none of\" },\n      ]}\n      value={operator}\n      onChange={(v) => onChange(v as FilterOperator)}\n    />\n  );\n}\n\n/**\n * MultiSelectPanel — the searchable, keyboard-accessible combobox+listbox for the\n * multiSelect variant, plus (when the field declares `resolve`) a Paste-a-list mode for\n * the SAME value. Owns its own Popover (viewport clamping, nested-layer handling,\n * Escape, focus return) rather than a hand-rolled floating span.\n *\n * Follows the WAI-ARIA combobox pattern: the input carries `role=\"combobox\"` and drives a\n * `role=\"listbox\"` of `role=\"option\"` rows via `aria-activedescendant`. The option rows\n * are plain (non-tabbable) elements, not buttons — Tab never lands on one, only the arrow\n * keys move the active row — and the panel stays open across a pick, since closing on\n * every one would make selecting the 40th of 2,600 schools forty reopens.\n */\nfunction MultiSelectPanel({\n  field,\n  value,\n  anchorRef,\n  onCommit,\n  onClose,\n}: {\n  field: FilterFieldMultiSelect;\n  value: FilterMultiSelectValue | undefined;\n  anchorRef: React.RefObject<HTMLElement>;\n  onCommit: (candidate: FilterMultiSelectValue) => FilterValidation;\n  onClose: () => void;\n}) {\n  const allowedOps = operatorsFor(field);\n  // MP-243: an operator chosen before any value exists has nowhere to live in `value`\n  // (there is no committed value yet) — this draft holds it so the choice survives until\n  // the first pick, instead of silently reverting to allowedOps[0].\n  const [draftOperator, setDraftOperator] = React.useState<FilterOperator>(value?.operator ?? allowedOps[0]);\n  const operator = allowedOps.length === 1 ? allowedOps[0] : (value?.operator ?? draftOperator);\n  // The selection is the `filters` prop itself; this panel keeps no copy of it.\n  const selected = value?.values ?? [];\n  // MP-243: read at settle time by an async paste, which must merge into the selection and\n  // apply the operator as the props stand when it resolves, not as they stood when the\n  // resolve() call started.\n  const selectedRef = useLatest(selected);\n  const operatorRef = useLatest(operator);\n  // MP-243: an async paste that resolves after this panel has already unmounted — the\n  // chip was removed, or the panel was closed — must not apply its result at all; without\n  // this, a resolve settling late could resurrect a value the user already dismissed. The\n  // effect body itself sets this true (not just useRef's initial value) so it recovers\n  // correctly from React's dev-mode double-invoke of mount effects (StrictMode runs\n  // mount -> cleanup -> mount once on every real mount): without the assignment here, that\n  // synchronous cleanup-then-remount would leave this permanently false on a component\n  // that is actually still mounted, silently dropping every paste result forever.\n  const mountedRef = React.useRef(true);\n  React.useEffect(() => {\n    mountedRef.current = true;\n    return () => { mountedRef.current = false; };\n  }, []);\n\n  // The draft follows every operator the panel applies, so emptying the selection leaves\n  // the toggle showing the operator it showed a moment before.\n  const commit = (nextValues: FilterFieldOption[], nextOperator: FilterOperator = operatorRef.current): FilterValidation => {\n    setDraftOperator(nextOperator);\n    return onCommit({ operator: nextOperator, values: nextValues });\n  };\n\n  // Choosing an operator with nothing selected yet only updates the draft — there is no\n  // candidate to hand to onCommit yet. Once something is selected, the toggle applies\n  // immediately.\n  const setOperator = (op: FilterOperator) => {\n    if (selectedRef.current.length > 0) commit(selectedRef.current, op);\n    else setDraftOperator(op);\n  };\n\n  const [mode, setMode] = React.useState<\"search\" | \"paste\">(\"search\");\n  const [query, setQuery] = React.useState(\"\");\n  const [asyncState, setAsyncState] = React.useState<{ options: FilterFieldOption[] | null; loading: boolean; error: boolean }>(\n    { options: null, loading: !!field.loadOptions, error: false },\n  );\n  const [retryTick, setRetryTick] = React.useState(0);\n  const inputRef = React.useRef<HTMLInputElement>(null);\n  const listRef = React.useRef<HTMLSpanElement>(null);\n  const listId = React.useId();\n  // MP-243: the latest loadOptions lives in a ref, read only from inside the effect — an\n  // app that re-declares its `fields` array (a fresh loadOptions closure) every render\n  // does not retrigger a fetch. Only the query (or a Retry) does.\n  const loadOptionsRef = useLatest(field.loadOptions);\n\n  React.useEffect(() => {\n    inputRef.current?.focus();\n  }, []);\n\n  React.useEffect(() => {\n    const load = loadOptionsRef.current;\n    if (!load) return;\n    const controller = new AbortController();\n    setAsyncState((s) => ({ options: s.options, loading: true, error: false }));\n    const t = setTimeout(() => {\n      load(query, controller.signal)\n        .then((opts) => {\n          if (controller.signal.aborted) return;\n          setAsyncState({ options: opts, loading: false, error: false });\n        })\n        .catch((err) => {\n          if (controller.signal.aborted || (err && (err as { name?: string }).name === \"AbortError\")) return;\n          // MP-243: a rejection is a visible error with a retry — never folded into \"No\n          // matches\", which would tell the user their search found nothing when it\n          // actually never ran.\n          setAsyncState({ options: null, loading: false, error: true });\n        });\n    }, 300);\n    return () => { clearTimeout(t); controller.abort(); };\n  }, [query, retryTick, loadOptionsRef]);\n\n  const options = field.loadOptions\n    ? (asyncState.options ?? [])\n    : (field.options ?? []).filter((o) => o.label.toLowerCase().includes(query.toLowerCase()));\n  // The panel only ever widens while open, so typing in Search (which filters the list)\n  // never makes it jump.\n  const [panelWidth, setPanelWidth] = React.useState<number>(PANEL_WIDTH.multiSelect);\n  // DS-42: no fixed cap; the Popover's viewport clamp is the only upper bound.\n  // DS-40: measured in the option rows' own font, after they render; the functional update\n  // keeps the previous width unless the new one is larger, so no state is set during render.\n  // Keyed on the labels, not the options array (a fresh array on every render), so a render\n  // that changes nothing measured does not re-measure.\n  const optionsRef = useLatest(options);\n  const labelsKey = options.map((o) => o.label).join(\"\\u0000\");\n  // DS-44: the two toggles share one row, so the panel is at least as wide as that row at its\n  // natural size (each toggle keeps its width); a viewport too narrow for it wraps the second\n  // toggle whole onto its own line instead. The popover mounts its content a render after this\n  // panel, so the row is measured when its element attaches (before paint), and a ResizeObserver on\n  // the toggles re-measures whenever one changes size (the web font loading, a zoom).\n  const toggleRowRef = React.useRef<HTMLSpanElement | null>(null);\n  const toggleObserver = React.useRef<ResizeObserver | null>(null);\n  const fitToggles = React.useCallback(() => {\n    const row = toggleRowRef.current;\n    const surface = row?.closest<HTMLElement>(\"[role=dialog]\");\n    if (!row || !surface) return;\n    const toggles = Array.from(row.children) as HTMLElement[];\n    const gap = parseFloat(getComputedStyle(row).columnGap) || 0;\n    // Used widths (fractional), not offsetWidth: that rounds, and a toggle half a pixel over would wrap.\n    const used = (el: HTMLElement) => parseFloat(getComputedStyle(el).width);\n    const natural = toggles.reduce((n, t) => n + used(t), 0) + gap * Math.max(0, toggles.length - 1);\n    const wanted = Math.ceil(natural + used(surface) - used(row));\n    setPanelWidth((w) => Math.max(w, wanted));\n  }, []);\n  const attachToggleRow = React.useCallback((row: HTMLSpanElement | null) => {\n    toggleObserver.current?.disconnect();\n    toggleObserver.current = null;\n    toggleRowRef.current = row;\n    if (!row) return;\n    fitToggles();\n    // jsdom has no ResizeObserver; every real browser does.\n    if (typeof ResizeObserver === \"undefined\") return;\n    toggleObserver.current = new ResizeObserver(fitToggles);\n    for (const toggle of Array.from(row.children)) toggleObserver.current.observe(toggle);\n  }, [fitToggles]);\n  React.useLayoutEffect(() => {\n    const measure = () => {\n      const label = document.getElementById(listId)?.querySelector(\".fd-opt-label\");\n      if (!label) return;\n      const widest = optionsRef.current.reduce((m, o) => Math.max(m, textWidth(o.label, label)), 0);\n      const wanted = Math.max(PANEL_WIDTH.multiSelect, Math.ceil(widest + OPTION_CHROME));\n      setPanelWidth((w) => Math.max(w, wanted));\n    };\n    measure();\n    // A web font that finishes loading after the first measure changes every width\n    // (jsdom has no FontFaceSet).\n    let live = true;\n    document.fonts?.ready.then(() => { if (live) measure(); });\n    return () => { live = false; };\n  }, [labelsKey, listId, optionsRef]);\n  const showLoading = !!field.loadOptions && asyncState.loading;\n  const showError = !!field.loadOptions && asyncState.error;\n  // MP-243: aria-expanded/aria-controls must agree with what actually renders — the real\n  // `role=\"listbox\"` element (carrying `listId`) only exists once there are options to\n  // show it for, not merely \"not loading and not errored\" (that state also covers \"no\n  // matches\", which renders plain text, not a listbox).\n  const hasListbox = !showLoading && !showError && options.length > 0;\n\n  const isSelected = (o: FilterFieldOption) => selected.some((s) => s.value === o.value);\n  const atLimit = field.maxValues != null && selected.length >= field.maxValues;\n  const toggle = (o: FilterFieldOption) => {\n    const current = selectedRef.current;\n    const on = current.some((s) => s.value === o.value);\n    if (!on && field.maxValues != null && current.length >= field.maxValues) return;\n    commit(on ? current.filter((s) => s.value !== o.value) : [...current, o]);\n  };\n\n  // Active-index math, Home/End and scroll-into-view come from the same module Select's\n  // own combobox uses.\n  const nav = useListboxNav({ count: options.length, onSelect: (i) => toggle(options[i]) });\n  useListboxScrollIntoView(nav.active, listRef, hasListbox);\n  React.useEffect(() => {\n    nav.setActive(0);\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [query, options.length]);\n\n  const activeId = hasListbox && options[nav.active] ? listId + \"-opt-\" + nav.active : undefined;\n  // MP-243: one always-mounted live region for the search panel's loading/empty/error\n  // states, so a screen reader is told about a state CHANGE (text mutating inside a node\n  // that was already there) rather than missing an announcement because the node itself\n  // was just mounted for the first time.\n  const liveMessage = showLoading\n    ? \"Loading…\"\n    : showError\n      ? \"Couldn't load options.\"\n      : options.length === 0\n        ? (query === \"\" && field.emptyText) || \"No matches\"\n        : atLimit\n          ? \"Limit reached: at most \" + field.maxValues + \" values\"\n          : \"\";\n\n  // Paste-a-list mode — same value, a different way to build it.\n  const [pasteText, setPasteText] = React.useState(\"\");\n  const [pasteLoading, setPasteLoading] = React.useState(false);\n  const [unmatchedTokens, setUnmatchedTokens] = React.useState<string[]>([]);\n  const [pasteError, setPasteError] = React.useState<string | null>(null);\n  const pasteWrapRef = React.useRef<HTMLSpanElement>(null);\n\n  React.useEffect(() => {\n    if (mode === \"paste\") pasteWrapRef.current?.querySelector<HTMLTextAreaElement>(\"textarea\")?.focus();\n  }, [mode]);\n\n  const doResolve = () => {\n    if (!field.resolve) return;\n    // A resolve already in flight is never restarted: the textarea stays reachable (see\n    // busy below) so Ctrl+Enter's keydown still fires while busy, and this guard is\n    // what keeps that from firing the resolver a second time.\n    if (pasteLoading) return;\n    // MP-243: de-duplicate pasted tokens before resolving — pasting the same name twice\n    // should not ask the resolver about it twice, or match it twice over.\n    const tokens = Array.from(new Set(pasteText.split(/[\\n,]/).map((t) => t.trim()).filter(Boolean)));\n    if (!tokens.length) return;\n    setPasteLoading(true);\n    setPasteError(null);\n    field\n      .resolve(tokens)\n      .then((result) => {\n        // MP-243: the panel unmounts the moment its chip is removed or its Popover closes\n        // (both cases un-render MultiSelectPanel) — a resolve settling after that point is\n        // discarded outright rather than applied to a field that's no longer being edited.\n        if (!mountedRef.current) return;\n        setPasteLoading(false);\n        setUnmatchedTokens(result.unmatched);\n        // Merge onto the selection and operator as they stand WHEN THE RESOLVE SETTLES\n        // (both read from refs), not what was captured when the paste started — an\n        // in-flight paste must never resurrect a tag the user removed, or apply an\n        // operator the user has since changed away from, while it was resolving.\n        const merged = new Map(selectedRef.current.map((s) => [s.value, s] as const));\n        for (const m of result.matched) merged.set(m.value, { value: m.value, label: m.label });\n        if (field.maxValues != null && merged.size > field.maxValues) {\n          // Refused whole, not truncated: silently dropping part of a pasted list would\n          // hide which entries were left out. The text stays for the user to trim.\n          setPasteError(\"This filter allows at most \" + field.maxValues + \" values; adding this list would make \" + merged.size + \".\");\n          return;\n        }\n        const applied = commit(Array.from(merged.values()));\n        // A list FilterBar refused to apply (e.g. the field's definition changed while it\n        // resolved) keeps its text, with the reason, for the user to fix and resolve again.\n        if (!applied.ok) {\n          setPasteError(applied.reason);\n          return;\n        }\n        setPasteText(\"\");\n      }, (err) => {\n        // A rejection from the resolver only. Passed as then()'s second argument, not a\n        // trailing catch(), so an error thrown while applying the result (e.g. by the\n        // app's own onFilterChange) propagates instead of being shown as a failed lookup.\n        if (!mountedRef.current) return;\n        setPasteLoading(false);\n        setPasteError(err instanceof Error ? err.message : \"Could not resolve the pasted list.\");\n      });\n  };\n\n  const header = (\n    <span className=\"fd-stack fd-gap-sm\">\n      {/* DS-44: both toggles share one row, operator first. */}\n      <span ref={attachToggleRow} className=\"fd-row fd-wrap fd-gap-sm fd-filterbar-toggles\">\n        {allowedOps.length > 1 ? (\n          <OperatorToggle operator={operator} onChange={setOperator} label={field.label} />\n        ) : null}\n        {field.resolve ? (\n          <SegmentedControl\n            aria-label={field.label + \" — search or paste a list\"}\n            options={[{ value: \"search\", label: \"Search\" }, { value: \"paste\", label: \"Paste a list\" }]}\n            value={mode}\n            onChange={(m) => setMode(m as \"search\" | \"paste\")}\n          />\n        ) : null}\n      </span>\n      {mode === \"search\" ? (\n        <span className=\"fd-pop-search\">\n          <i className=\"ph ph-magnifying-glass\" aria-hidden=\"true\" />\n          <input\n            ref={inputRef}\n            role=\"combobox\"\n            aria-expanded={hasListbox}\n            aria-controls={hasListbox ? listId : undefined}\n            aria-autocomplete=\"list\"\n            aria-activedescendant={activeId}\n            aria-label={field.label}\n            value={query}\n            placeholder={field.placeholder || \"Search…\"}\n            onChange={(e) => setQuery(e.target.value)}\n            onKeyDown={(e) => {\n              if (e.key === \"ArrowDown\") { e.preventDefault(); nav.move(1); }\n              else if (e.key === \"ArrowUp\") { e.preventDefault(); nav.move(-1); }\n              else if (e.key === \"Home\") { e.preventDefault(); nav.first(); }\n              else if (e.key === \"End\") { e.preventDefault(); nav.last(); }\n              else if (e.key === \"Enter\") { e.preventDefault(); nav.activate(); }\n            }}\n          />\n        </span>\n      ) : null}\n    </span>\n  );\n\n  const body =\n    mode === \"paste\" ? (\n      <span className=\"fd-stack fd-gap-sm\" ref={pasteWrapRef}>\n        <Textarea\n          aria-label={field.label + \" — paste a list\"}\n          rows={4}\n          placeholder={field.pastePlaceholder || field.placeholder || \"Paste names, one per line or comma-separated\"}\n          value={pasteText}\n          // Natively `disabled` would drop focus to <body> the instant a resolve starts,\n          // exactly like the Resolve button's own bug above. Textarea's `busy` capability\n          // keeps the field focused and its own Ctrl+Enter keydown reachable (guarded\n          // against a second resolve in doResolve above), gives it a visible busy look from\n          // the shared field tokens, and tells assistive tech a request is in flight.\n          busy={pasteLoading}\n          onChange={(e) => setPasteText(e.target.value)}\n          onKeyDown={(e) => {\n            if (e.key === \"Enter\" && (e.metaKey || e.ctrlKey)) { e.preventDefault(); doResolve(); }\n          }}\n        />\n        {pasteError ? <Banner tone=\"danger\" title=\"Couldn't resolve the list\" detail={pasteError} /> : null}\n        {unmatchedTokens.length > 0 ? (\n          <Banner tone=\"warn\" title={unmatchedTokens.length + \" didn't match\"} detail={unmatchedTokens.join(\", \")} />\n        ) : null}\n        {selected.length > 0 ? (\n          <span className=\"fd-stack fd-gap-xs\">\n            <span className=\"fd-body-sm fd-muted\">{selected.length} matched</span>\n            <span className=\"fd-row fd-wrap fd-gap-xs\">\n              {selected.map((v) => (\n                <Tag key={v.value} onRemove={() => commit(selectedRef.current.filter((s) => s.value !== v.value))}>{v.label}</Tag>\n              ))}\n            </span>\n          </span>\n        ) : null}\n      </span>\n    ) : (\n      <span className=\"fd-stack fd-gap-sm\">\n        {/* MP-243: always mounted, with one fixed role, so a screen reader hears each\n           state CHANGE (loading, \"No matches\", an error, the value limit) as new text in\n           a live region it already knows about. Swapping the role would make assistive\n           tech treat it as a different region and can drop the announcement. */}\n        <span\n          className={\"fd-row fd-gap-xs\" + (liveMessage && !showError ? \" fd-muted\" : \"\")}\n          role=\"status\"\n        >\n          {showLoading ? <span className=\"fd-spinner\" aria-hidden=\"true\" /> : null}\n          {liveMessage ? <span className=\"fd-body-sm\">{liveMessage}</span> : null}\n        </span>\n        {showError ? (\n          <Button size=\"sm\" variant=\"secondary\" onClick={() => setRetryTick((n) => n + 1)}>Retry</Button>\n        ) : null}\n        {hasListbox ? (\n          <span id={listId} role=\"listbox\" aria-label={field.label} aria-multiselectable=\"true\" ref={listRef} className=\"fd-pop-list\">\n            {options.map((o, i) => {\n              const on = isSelected(o);\n              const blocked = !on && atLimit;\n              return (\n                <div\n                  key={o.value}\n                  id={listId + \"-opt-\" + i}\n                  data-i={i}\n                  role=\"option\"\n                  tabIndex={-1}\n                  aria-selected={on}\n                  aria-disabled={blocked ? \"true\" : undefined}\n                  className={[\"fd-opt\", i === nav.active ? \"is-active\" : \"\", on ? \"is-selected\" : \"\"].filter(Boolean).join(\" \")}\n                  onMouseEnter={() => nav.setActive(i)}\n                  onClick={() => toggle(o)}\n                >\n                  <i className={\"fd-filterbar-opt-check ph \" + (on ? \"ph-check-square is-checked\" : \"ph-square\")} aria-hidden=\"true\" />\n                  <span className=\"fd-opt-label\">{o.label}</span>\n                </div>\n              );\n            })}\n          </span>\n        ) : null}\n      </span>\n    );\n\n  // Resolve stays focusable (never natively `disabled`) even while loading or empty, so it\n  // never loses focus out from under a keyboard user — a natively disabled control that\n  // held focus drops it to <body> the instant it becomes disabled, and there is no way to\n  // reject that with preventDefault the way a click/keydown handler can. Button's own\n  // focusableWhenDisabled capability is exactly this: aria-disabled instead of disabled,\n  // the focus ring kept, activation swallowed.\n  const resolveDisabled = pasteLoading || !pasteText.trim();\n  const footer =\n    mode === \"paste\" ? (\n      <Button\n        size=\"sm\"\n        variant=\"secondary\"\n        disabled={resolveDisabled}\n        focusableWhenDisabled\n        onClick={doResolve}\n      >\n        {pasteLoading ? \"Resolving…\" : \"Resolve\"}\n      </Button>\n    ) : undefined;\n\n  return (\n    <Popover open anchorRef={anchorRef} onClose={onClose} placement=\"bottom-start\" offset={6}\n      width={panelWidth} label={field.label} header={header} footer={footer} padded={mode === \"paste\"}>\n      {body}\n    </Popover>\n  );\n}\n\n/** Which of a panel's NumberInputs are showing invalid text right now. Each input reports\n *  through its onValidityChange (`report(name)`), because NumberInput never passes invalid\n *  text to onChange. A report that flips a field's validity re-renders the panel (so Done\n *  follows it) and calls `onFlip`, so the panel can re-apply what it now shows.\n *  `allValid()` reads a ref, so it is already current inside the very event that flipped\n *  it, before any re-render. */\nfunction useTextValidity(onFlip: () => void) {\n  const invalidRef = React.useRef(new Set<string>());\n  const [, rerender] = React.useReducer((n: number) => n + 1, 0);\n  const onFlipRef = useLatest(onFlip);\n  const record = (name: string, valid: boolean): boolean => {\n    const invalid = invalidRef.current;\n    if (valid !== invalid.has(name)) return false;\n    if (valid) invalid.delete(name);\n    else invalid.add(name);\n    rerender();\n    return true;\n  };\n  return {\n    allValid: () => invalidRef.current.size === 0,\n    report: (name: string) => (valid: boolean) => {\n      if (record(name, valid)) onFlipRef.current();\n    },\n    /** For an input that is about to unmount: it has nothing left to show. */\n    forget: (name: string) => { record(name, true); },\n    /** For a panel that is about to remount every input: each reports afresh on mount. */\n    reset: () => {\n      if (invalidRef.current.size === 0) return;\n      invalidRef.current.clear();\n      rerender();\n    },\n  };\n}\n\n/** What a panel that keeps its own draft applies for the value it is showing: the value\n *  itself when the panel's text is valid and the value passes validateFilterValue, and\n *  otherwise `undefined`, which FilterBar's commit treats exactly like a cleared field (it\n *  removes the filter if set). Such a panel never leaves an older value applied behind\n *  one it is showing but cannot apply. */\nfunction applicable<T>(field: FilterField, candidate: T | undefined, textValid: boolean): T | undefined {\n  if (!textValid || candidate === undefined) return undefined;\n  return validateFilterValue(field, candidate).ok ? candidate : undefined;\n}\n\n/** Structural equality for filter values (plain objects, arrays and primitives). A key\n *  whose value is undefined counts as absent, so `{ min: 5 }` equals `{ min: 5, max: undefined }`. */\nfunction sameValue(a: unknown, b: unknown): boolean {\n  if (a === b) return true;\n  if (typeof a !== \"object\" || typeof b !== \"object\" || a === null || b === null) return false;\n  if (Array.isArray(a) !== Array.isArray(b)) return false;\n  const left = a as Record<string, unknown>;\n  const right = b as Record<string, unknown>;\n  for (const key of new Set([...Object.keys(left), ...Object.keys(right)])) {\n    if (!sameValue(left[key], right[key])) return false;\n  }\n  return true;\n}\n\n/** Keeps a panel that holds its own draft in step with the `filters` prop while it is\n *  open. A panel seeds its draft from the prop when it opens; after that, whenever the\n *  field's value in `filters` changes to anything other than what the panel applies (the\n *  app reset its filters, or restored older ones from the URL), `reseed` replaces the draft\n *  with it. A host that applies the panel's own emissions hands back a value equal to what\n *  the panel applies, so those never re-seed it. A layout effect, so the panel never paints\n *  a draft that disagrees with the prop. */\nfunction useReseedFromProps<T>(value: T | undefined, applies: () => T | undefined, reseed: (next: T | undefined) => void) {\n  const seen = React.useRef(value);\n  React.useLayoutEffect(() => {\n    if (seen.current === value) return;\n    seen.current = value;\n    if (!sameValue(value, applies())) reseed(value);\n  }, [value, applies, reseed]);\n}\n\n/** A re-seed remounts a panel's inputs by changing their `key` (see `useReseedFromProps`\n *  callers below), which is what lets an input whose value the app is overriding show the\n *  new value even mid-edit — but remounting destroys the old DOM node, so the browser\n *  drops focus to `<body>` if that node happened to be focused. This restores it: a panel\n *  wraps each remounting input in its own persistent (never-remounted, never-keyed)\n *  wrapper `<span>` and hands this hook a `{name: wrapperRef}` map. A panel calls\n *  `capture()` synchronously inside its `reseed` callback, before bumping the key that\n *  triggers the remount, to record WHICH wrapper currently contains focus; once the\n *  remount lands, a layout effect (so it runs before the browser paints) queries that same\n *  wrapper — scoped to it alone, never `document.getElementById` — for its (freshly\n *  remounted) focusable control and focuses it. Scoping the lookup to the panel's own\n *  wrapper, rather than a page-global id search, is what keeps this correct even when a\n *  host page happens to render its own element sharing whatever id the field's own input\n *  carries. */\nfunction usePreserveFocusAcrossRemount(seed: number, fields: Record<string, React.RefObject<HTMLElement>>) {\n  const pendingName = React.useRef<string | null>(null);\n  const fieldsRef = useLatest(fields);\n  const capture = () => {\n    const active = document.activeElement;\n    pendingName.current = null;\n    if (!(active instanceof HTMLElement)) return;\n    for (const [name, ref] of Object.entries(fieldsRef.current)) {\n      if (ref.current?.contains(active)) { pendingName.current = name; break; }\n    }\n  };\n  React.useLayoutEffect(() => {\n    const name = pendingName.current;\n    if (!name) return;\n    pendingName.current = null;\n    fieldsRef.current[name]?.current?.querySelector<HTMLElement>(\"input,textarea,select,button\")?.focus();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [seed]);\n  return capture;\n}\n\n/** A range panel's draft for a `filters` value. */\nconst rangeDraft = (value: FilterRangeValue | undefined): FilterRangeValue => ({ min: value?.min, max: value?.max });\n\n/** RangePanel — min/max NumberInputs for the range variant. Seeds its draft of the two\n *  bounds from `value` when it opens (and again if `value` changes underneath it; see\n *  useReseedFromProps), and after every change to a bound's value or to either field's\n *  validity it hands `onCommit` what the panel now shows: the {min, max} it displays when\n *  both fields hold valid text and the combination is valid, otherwise `undefined`\n *  (unset). So typing a max below the min, or leaving \"abc\" in one bound while stepping the\n *  other, removes the filter until the panel shows a valid range again, and an Escape or\n *  outside click never leaves an earlier range applied. Done is disabled whenever either\n *  field's text or the combination is invalid. */\nfunction RangePanel({\n  field,\n  value,\n  anchorRef,\n  onCommit,\n  onClose,\n}: {\n  field: FilterFieldRange;\n  value: FilterRangeValue | undefined;\n  anchorRef: React.RefObject<HTMLElement>;\n  onCommit: (candidate: FilterRangeValue | undefined) => FilterValidation;\n  onClose: () => void;\n}) {\n  const [draft, setDraft] = React.useState<FilterRangeValue>(() => rangeDraft(value));\n  // The inputs' key: a re-seed remounts them, so they show the new draft even while one\n  // has focus, and report their validity afresh.\n  const [seed, setSeed] = React.useState(0);\n  // Unique per FilterBar instance (React.useId, like MultiSelectPanel's listId above) —\n  // never derived from field.key, which a host page can share with an element of its own\n  // (e.g. its own \"<fieldKey>-max\" input), causing the label and the focus-preserving\n  // remount below to resolve to the wrong element entirely.\n  const minId = React.useId();\n  const maxId = React.useId();\n  const minWrapRef = React.useRef<HTMLSpanElement>(null);\n  const maxWrapRef = React.useRef<HTMLSpanElement>(null);\n  const preserveFocus = usePreserveFocusAcrossRemount(seed, { min: minWrapRef, max: maxWrapRef });\n  // MP-243: each bound's change merges into the draft as it stands right now, read from\n  // this ref, not from the render the NumberInput's onChange closed over; a held stepper\n  // on one bound would otherwise re-apply a stale copy of the other bound. Written only in\n  // event handlers and effects.\n  const draftRef = React.useRef(draft);\n  const shown = (): FilterRangeValue | undefined => {\n    const { min, max } = draftRef.current;\n    return applicable(field, min == null && max == null ? undefined : { min, max }, validity.allValid());\n  };\n  const publish = () => { onCommit(shown()); };\n  const validity = useTextValidity(publish);\n  useReseedFromProps(value, shown, (next) => {\n    preserveFocus();\n    draftRef.current = rangeDraft(next);\n    setDraft(draftRef.current);\n    validity.reset();\n    setSeed((n) => n + 1);\n  });\n  const draftMin = draft.min;\n  const draftMax = draft.max;\n\n  const isEmpty = draftMin == null && draftMax == null;\n  const validation: FilterValidation = isEmpty ? { ok: true } : validateFilterValue(field, { min: draftMin, max: draftMax });\n  const comboError = !isEmpty && !validation.ok ? validation.reason : undefined;\n  const doneDisabled = !validity.allValid() || !!comboError;\n\n  const apply = (patch: FilterRangeValue) => {\n    const next = { ...draftRef.current, ...patch };\n    draftRef.current = next;\n    setDraft(next);\n    publish();\n  };\n\n  // Done can be tabbed to while enabled and then flip to disabled underneath the user — a\n  // reseed from the host (see useReseedFromProps above; FilterBar is a controlled component\n  // and a host applies its changes synchronously) can invalidate the draft while focus is\n  // still on Done. Button's focusableWhenDisabled keeps that focus in place instead of\n  // dropping it to <body> the way a native `disabled` would.\n\n  return (\n    <Popover open anchorRef={anchorRef} onClose={onClose} placement=\"bottom-start\" offset={6}\n      width={PANEL_WIDTH.range} label={field.label}\n      footer={\n        <Button size=\"sm\" variant=\"secondary\" disabled={doneDisabled} focusableWhenDisabled onClick={onClose}>\n          Done\n        </Button>\n      }>\n      <span className=\"fd-stack fd-gap-sm\">\n        <span ref={minWrapRef}>\n          <NumberInput\n            key={\"min-\" + seed}\n            id={minId}\n            label={field.minLabel || \"At least\"}\n            value={draftMin ?? \"\"}\n            min={field.min}\n            max={field.max}\n            step={field.step}\n            integer={field.integer}\n            placeholder={field.minPlaceholder}\n            onChange={(e) => apply({ min: e.target.value })}\n            onValidityChange={validity.report(\"min\")}\n          />\n        </span>\n        <span ref={maxWrapRef}>\n          <NumberInput\n            key={\"max-\" + seed}\n            id={maxId}\n            label={field.maxLabel || \"At most\"}\n            value={draftMax ?? \"\"}\n            min={field.min}\n            max={field.max}\n            step={field.step}\n            integer={field.integer}\n            error={comboError}\n            placeholder={field.maxPlaceholder}\n            onChange={(e) => apply({ max: e.target.value })}\n            onValidityChange={validity.report(\"max\")}\n          />\n        </span>\n      </span>\n    </Popover>\n  );\n}\n\n/** A date panel's draft for a `filters` value: the mode, the Days shown (the field's\n *  default when there is no withinDays value), and the between dates. */\nfunction dateDraft(field: FilterFieldDate, value: FilterDateValue | undefined) {\n  return {\n    kind: value?.kind ?? \"withinDays\",\n    days: value?.kind === \"withinDays\" ? value.days : (field.defaultDays ?? 30),\n    between: value?.kind === \"between\" ? { from: value.from, to: value.to } : { from: \"\", to: \"\" },\n  };\n}\n\n/** DatePanel — \"within the last N days\" or \"between two dates\". Seeds its draft from\n *  `value` when it opens (and again if `value` changes underneath it; see\n *  useReseedFromProps). A withinDays draft shows a default the FIRST time, but that default\n *  is only WRITTEN once the user confirms it — by editing the days field or by clicking\n *  Done — never merely by opening the panel and looking at it. Clearing the days field\n *  shows empty (not the default reappearing). Once the user edits Days, the panel applies\n *  what the field shows after every change to its value or its validity: the typed number\n *  while the text is valid, and `undefined` (unset) while it is not, so typing 9999 into a\n *  field capped at 3650 removes the filter rather than leaving 999 applied behind the\n *  error. Done is disabled while the Days text is invalid. Switching modes always hands\n *  onCommit `undefined` for the mode being left, which FilterBar's single choke point turns\n *  into a removal, so whatever the OTHER mode had committed is discarded structurally, in\n *  both directions. */\nfunction DatePanel({\n  field,\n  value,\n  anchorRef,\n  onCommit,\n  onClose,\n}: {\n  field: FilterFieldDate;\n  value: FilterDateValue | undefined;\n  anchorRef: React.RefObject<HTMLElement>;\n  onCommit: (candidate: FilterDateValue | undefined) => FilterValidation;\n  onClose: () => void;\n}) {\n  const maxDays = effectiveMaxDays(field);\n  const [initial] = React.useState(() => dateDraft(field, value));\n  const [kind, setKind] = React.useState<\"withinDays\" | \"between\">(initial.kind);\n  // Days is its own draft, separate from the committed FilterDateValue shape — a cleared\n  // field needs to show as empty, and FilterDateValue's own `days` is never optional (a\n  // committed withinDays value always has a real day count).\n  const [daysDraft, setDaysDraft] = React.useState<number | undefined>(initial.days);\n  // MP-243: read when the Days field's validity flips, which NumberInput reports from a\n  // layout effect after the render its onChange closed over. Written only in event\n  // handlers and effects.\n  const daysRef = React.useRef(daysDraft);\n  // Whether the Days shown are applied: true when they came from a withinDays value or the\n  // user has edited them, false while they are the untouched default.\n  const daysConfirmed = React.useRef(value?.kind === \"withinDays\");\n  const [between, setBetween] = React.useState<{ from: string; to: string }>(initial.between);\n  // The inputs' key: a re-seed remounts them, so they show the new draft even while one\n  // has focus, and report their validity afresh.\n  const [seed, setSeed] = React.useState(0);\n  // Unique per FilterBar instance — see the matching comment in RangePanel above.\n  const daysId = React.useId();\n  const daysWrapRef = React.useRef<HTMLSpanElement>(null);\n  const preserveFocus = usePreserveFocusAcrossRemount(seed, { days: daysWrapRef });\n\n  const shownWithinDays = (): FilterDateValue | undefined => {\n    const days = daysRef.current;\n    return applicable<FilterDateValue>(field, days == null ? undefined : { kind: \"withinDays\", days }, validity.allValid());\n  };\n  const validity = useTextValidity(() => {\n    daysConfirmed.current = true;\n    onCommit(shownWithinDays());\n  });\n  const applies = (): FilterDateValue | undefined => {\n    if (kind === \"between\") {\n      return applicable<FilterDateValue>(field, between.from && between.to ? { kind: \"between\", ...between } : undefined, true);\n    }\n    return daysConfirmed.current ? shownWithinDays() : undefined;\n  };\n  useReseedFromProps(value, applies, (next) => {\n    preserveFocus();\n    const d = dateDraft(field, next);\n    setKind(d.kind);\n    daysRef.current = d.days;\n    daysConfirmed.current = next?.kind === \"withinDays\";\n    setDaysDraft(d.days);\n    setBetween(d.between);\n    validity.reset();\n    setSeed((n) => n + 1);\n  });\n\n  const applyWithinDays = (days: number | undefined) => {\n    daysRef.current = days;\n    daysConfirmed.current = true;\n    setDaysDraft(days);\n    onCommit(shownWithinDays());\n  };\n\n  const applyBetween = (from: string, to: string) => {\n    setBetween({ from, to });\n    onCommit(applicable<FilterDateValue>(field, from && to ? { kind: \"between\", from, to } : undefined, true));\n  };\n\n  const switchKind = (next: \"withinDays\" | \"between\") => {\n    if (next === kind) return;\n    setKind(next);\n    if (next === \"between\") {\n      setBetween({ from: \"\", to: \"\" });\n      validity.forget(\"days\");\n    } else {\n      const { days } = dateDraft(field, undefined);\n      daysRef.current = days;\n      daysConfirmed.current = false;\n      setDaysDraft(days);\n    }\n    onCommit(undefined);\n  };\n\n  const doneDisabled = kind === \"withinDays\" && !validity.allValid();\n  // Button's focusableWhenDisabled means `confirm` below is only ever invoked while\n  // enabled — Button itself swallows click/Enter/Space while doneDisabled, so it never\n  // needs its own doneDisabled check. Same reasoning as RangePanel's Done above: a reseed\n  // from the host can flip doneDisabled while Done holds focus, and this keeps that focus\n  // in place instead of dropping it to <body> the way a native `disabled` would.\n  const confirm = () => {\n    // Done is the confirmation a withinDays draft (including an untouched default) needs\n    // before it applies. A between draft only ever reaches here already applied or\n    // already unset (applyBetween and switchKind hand onCommit every change), so there is\n    // nothing left to do for it.\n    if (kind === \"withinDays\") {\n      const shown = shownWithinDays();\n      if (shown) onCommit(shown);\n    }\n    onClose();\n  };\n\n  return (\n    <Popover open anchorRef={anchorRef} onClose={onClose} placement=\"bottom-start\" offset={6}\n      width={PANEL_WIDTH.date} label={field.label}\n      footer={\n        <Button size=\"sm\" variant=\"secondary\" disabled={doneDisabled} focusableWhenDisabled onClick={confirm}>\n          Done\n        </Button>\n      }>\n      <span className=\"fd-stack fd-gap-sm\">\n        <SegmentedControl\n          aria-label={field.label + \" — relative or between dates\"}\n          options={[\n            { value: \"withinDays\", label: \"Within last N days\" },\n            { value: \"between\", label: \"Between dates\" },\n          ]}\n          value={kind}\n          onChange={(k) => switchKind(k as \"withinDays\" | \"between\")}\n        />\n        {kind === \"withinDays\" ? (\n          <span ref={daysWrapRef}>\n            <NumberInput key={\"days-\" + seed} id={daysId} label=\"Days\" min={1} max={maxDays} step={1} integer value={daysDraft ?? \"\"}\n              onChange={(e) => applyWithinDays(e.target.value)} onValidityChange={validity.report(\"days\")} />\n          </span>\n        ) : (\n          <DatePicker\n            key={\"between-\" + seed}\n            range\n            label=\"Date range\"\n            value={{ start: between.from, end: between.to }}\n            onChange={(e) => applyBetween(e.target.value.start || \"\", e.target.value.end || \"\")}\n          />\n        )}\n      </span>\n    </Popover>\n  );\n}\n\n/**\n * FilterBar — the declarative filter system for a server-driven list.\n *\n * A consumer declares fields once (`{ key, label, type, ... }`) and hands this a live\n * `filters` record plus onFilterChange/onFilterRemove — the same three things\n * useServerTable already exposes, so wiring one up is copy-paste, not glue code. Every\n * active filter renders as a Tag chip; this component holds no shadow copy of filter\n * values, only the transient \"which field's popover/input is open right now\" UI state\n * (`panel`), the same way SortMenu holds `open` but never sort state itself.\n *\n * It is a standard controlled component. `filters` is the single source of truth, and\n * the host applies onFilterChange/onFilterRemove to it synchronously (never inside\n * `startTransition`, never after a timeout), deferring only the expensive query that the\n * filters drive, with a debounce or useDeferredValue.\n *\n * Every floating surface — a field's edit panel and the \"add filter\" menu — is a real\n * Popover (or Menu-in-a-Popover) from this kit's own actions module: viewport clamping,\n * nested-layer handling, Escape, and focus-return-to-the-chip all come from there, so\n * FilterBar itself runs no document-level dismissal listener of its own. Only the text\n * field's inline input manages its own dismissal (blur/Enter/Escape), since it isn't a\n * floating panel at all.\n *\n * FilterBar supports five field kinds: text, select, multiSelect (searchable, sync or\n * async, with an optional paste-a-list mode for the same value), range (numeric min/max),\n * and date (\"within the last N days\" or \"between two dates\"). text and select keep a bare\n * string value; multiSelect/range/date each read/write a small typed object of their own\n * (see FilterValue).\n */\n/** The one Filter button: the bar's trigger, and the button its loading skeleton reserves room for. */\nfunction FilterButton({ children, ...rest }: Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, \"aria-haspopup\" | \"aria-expanded\" | \"onClick\" | \"children\"> & { disabled?: boolean; focusableWhenDisabled?: boolean }) {\n  return (\n    <Button size=\"md\" variant=\"secondary\" icon=\"funnel\" {...rest}>\n      Filter\n      {children}\n    </Button>\n  );\n}\n\n/** DS-55: the help button beside a chip (or inside a fixed chip, before its x). A sibling of the chip's\n *  own button, never inside it, so pressing it neither opens the picker nor removes the filter. */\nfunction FieldHelpButton({ field, onFieldHelp }: { field: FilterField; onFieldHelp?: FilterBarProps[\"onFieldHelp\"] }) {\n  if (!field.help) return null;\n  return (\n    <Tooltip label={field.help.summary}>\n      <IconButton icon=\"question\" size=\"sm\" label={\"Help: \" + field.label} title={undefined} className=\"fd-filterbar-help\"\n        onClick={(e) => onFieldHelp?.(field.key, e.currentTarget)} />\n    </Tooltip>\n  );\n}\n\nexport function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, onFieldHelp, align = \"left\", actions, onClearAll, showActiveCount = false, loading = false, loadingLabel = \"Loading the filters\", className = \"\", ...rest }: FilterBarProps) {\n  const [panel, setPanel] = React.useState<Panel>(null);\n  const editAnchorRef = React.useRef<HTMLElement>(null);\n  const addAnchorRef = React.useRef<HTMLElement>(null);\n  const textInputRef = React.useRef<HTMLInputElement>(null);\n  const optionsRef = React.useRef<HTMLSpanElement>(null);\n\n  // A field's defaultDays/maxDays/maxValues are constants an app can hard-code wrong,\n  // not a runtime validation state: caught here, once per render, rather than per edit.\n  if (process.env.NODE_ENV !== \"production\") {\n    for (const f of fields) assertValidFieldDefinition(f);\n  }\n\n  // MP-243: `commit` and `removeField` read the props through this ref, as of the last\n  // committed render. A closure captured by an async settle (a paste resolving, a held\n  // stepper's timer) runs long after the render that created it; reading the props it\n  // closed over would act on a filter state that no longer exists, e.g. removing a key a\n  // later edit already removed. Through the ref, a stale closure and a fresh one both\n  // compute from the current props, which are the only record of what is applied.\n  const latest = useLatest({ fields, filters, onFilterChange, onFilterRemove });\n\n  // The ONLY function in this component that calls onFilterChange, and the ONLY one that\n  // calls onFilterRemove. Every UI path below (typing, a stepper, a toggle, a paste\n  // settling, Escape, an outside click, a mode switch, Done, clearing a bound) builds a\n  // candidate value and hands it to `commit`, or removes explicitly via `removeField`.\n  // `commit` validates against the field's CURRENT definition, never writes a value\n  // validateFilterValue rejects (it returns the reason instead), and never removes a key\n  // that isn't currently set: a candidate that represents \"nothing entered\"\n  // (isEmptyCandidate) removes the filter if it is set and otherwise does nothing at all.\n  // The range and date panels, which keep their own drafts, hand it `undefined` for any\n  // draft they can't apply, so what stays applied is always what they show, or nothing.\n  const commit = (field: FilterField, candidate: unknown): FilterValidation => {\n    const current = latest.current.fields.find((f) => f.key === field.key);\n    if (!current) return { ok: false, reason: \"This filter is no longer available\" };\n    if (isEmptyCandidate(current, candidate)) {\n      removeField(current);\n      return { ok: true };\n    }\n    const result = validateFilterValue(current, candidate);\n    if (result.ok) latest.current.onFilterChange(current.key, candidate);\n    return result;\n  };\n  const removeField = (field: FilterField) => {\n    const { filters: now, onFilterRemove: remove } = latest.current;\n    if (isFieldSet(field, now[field.key])) remove(field.key);\n  };\n\n  const editingField = panel && panel.kind === \"edit\" ? fields.find((f) => f.key === panel.key) : undefined;\n  const startEditing = (key: string) => setPanel({ kind: \"edit\", key });\n  const closeEditing = () => setPanel(null);\n\n  // Focus lands in the field's new value input the moment it's added — a text field's own\n  // <input>, or the currently-selected (else first) option in a select field's list. The\n  // newer variants (multiSelect/range/date) focus themselves inside their own panel.\n  React.useEffect(() => {\n    if (!panel || panel.kind !== \"edit\") return;\n    if (editingField?.type === \"text\") {\n      textInputRef.current?.focus();\n    } else if (editingField?.type === \"select\" && optionsRef.current) {\n      const target =\n        optionsRef.current.querySelector<HTMLButtonElement>('[aria-selected=\"true\"]') ||\n        optionsRef.current.querySelector<HTMLButtonElement>(\"button\");\n      target?.focus();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [panel]);\n\n  const addableFields = fields.filter((f) => f.type !== \"fixed\" && !isFieldSet(f, filters[f.key]));\n  const activeCount = activeFilterCount(fields, filters);\n  const canAdd = addableFields.length > 0;\n  const showCount = showActiveCount && activeCount > 0;\n  const clearAll = activeCount > 0 ? onClearAll : undefined;\n  const showClear = clearAll !== undefined;\n  const addMenuItems: MenuItem[] = [\n    { kind: \"section\", label: \"Add filter\" },\n    ...addableFields.map((f): MenuItem => ({ id: f.key, label: f.label, onSelect: () => startEditing(f.key) })),\n  ];\n\n  if (loading) {\n    return (\n      <span className={[\"fd-filterbar\", className].filter(Boolean).join(\" \")} {...rest}>\n        <span className=\"fd-filterbar-main\" role=\"status\" aria-busy=\"true\" aria-label={loadingLabel}>\n          <span className=\"fd-sr\">{loadingLabel}</span>\n          <span className=\"fd-filterbar-trigger\">\n            <ReservedSkeleton><FilterButton /></ReservedSkeleton>\n          </span>\n          <span className=\"fd-filterbar-chips\" />\n        </span>\n        {actions ? <span className=\"fd-filterbar-actions\">{actions}</span> : null}\n      </span>\n    );\n  }\n\n  return (\n    <span className={[\"fd-filterbar\", className].filter(Boolean).join(\" \")} {...rest}>\n      <span className=\"fd-filterbar-main\">\n      {/* With every field applied there is nothing left to add, but a button that carries the\n          count stays, disabled, rather than the count vanishing with it. */}\n      {canAdd || showCount || showClear ? (\n        <span className=\"fd-filterbar-trigger\">\n          {canAdd || showCount ? (\n          <span ref={addAnchorRef}>\n            <FilterButton\n              disabled={!canAdd} focusableWhenDisabled\n              aria-haspopup=\"menu\" aria-expanded={panel?.kind === \"add\"}\n              onClick={() => setPanel(panel?.kind === \"add\" ? null : { kind: \"add\" })}\n            >\n              {showCount ? (\n                <Badge tone=\"count\" className=\"fd-filterbar-count\">\n                  <span aria-hidden=\"true\">{activeCount}</span>\n                  <span className=\"fd-sr-only\">, {activeCount} active</span>\n                </Badge>\n              ) : null}\n            </FilterButton>\n          </span>\n          ) : null}\n          {clearAll ? (\n            <Button size=\"sm\" variant=\"ghost\" onClick={() => clearAll()}>Clear all</Button>\n          ) : null}\n          {canAdd ? (\n          <Popover open={panel?.kind === \"add\"} anchorRef={addAnchorRef} onClose={closeEditing}\n            placement={align === \"right\" ? \"bottom-end\" : \"bottom-start\"} minWidth={200} role=\"menu\" label=\"Add filter\">\n            {/* No onClose passed to Menu: an item's own onSelect (startEditing) already\n                moves `panel` from \"add\" to \"edit\", which is itself what closes this\n                Popover — Menu.choose() also calls its OWN onClose after every pick, and\n                passing one here would race that transition (both setPanel calls landing\n                in the same batch, with \"close\" applied last, undoing startEditing). */}\n            <Menu items={addMenuItems} />\n          </Popover>\n          ) : null}\n        </span>\n      ) : null}\n      <span className=\"fd-filterbar-chips\">\n      {fields.map((field) => {\n        const value = filters[field.key];\n        const editing = panel?.kind === \"edit\" && panel.key === field.key;\n\n        if (editing && field.type === \"text\") {\n          return (\n            <span key={field.key} className={[\"fd-tag\", \"fd-filterbar-text\"].join(\" \")}>\n              <input\n                ref={textInputRef}\n                className=\"fd-filterbar-text-input\"\n                value={(value as string | undefined) ?? \"\"}\n                placeholder={field.placeholder || field.label}\n                aria-label={field.label}\n                onChange={(e) => commit(field, e.target.value)}\n                onKeyDown={(e) => {\n                  if (e.key === \"Enter\") setPanel(null);\n                  else if (e.key === \"Escape\") { e.stopPropagation(); setPanel(null); }\n                }}\n                onBlur={() => setPanel(null)}\n              />\n              {isSet(value) ? (\n                <span\n                  className=\"fd-tag-remove\"\n                  role=\"button\"\n                  aria-label={\"Remove \" + field.label}\n                  onClick={(e) => { e.stopPropagation(); removeField(field); setPanel(null); }}\n                >\n                  <i className=\"ph ph-x\" aria-hidden=\"true\" />\n                </span>\n              ) : null}\n            </span>\n          );\n        }\n\n        // select/multiSelect/range/date share one shape below — a chip wrapped in the\n        // SAME span whether or not it's currently being edited, with only the trailing\n        // Panel/Popover mounting or not. Keeping that wrapper's element type identical\n        // across the transition (rather than a `<Tag>` alone when closed vs. a\n        // `<span><Tag/></span>` when open) is what lets React preserve the actual chip\n        // DOM node instead of unmounting and remounting a new one at the same key — and\n        // THAT is what makes Popover's own returnFocus land focus back on a node that is\n        // still on screen (\"focus returns to the chip\") rather than a detached one from\n        // the render that just closed.\n        const set = isFieldSet(field, value);\n        if (!editing && !set) return null;\n        if (field.type === \"fixed\") {\n          const fixedText = field.label + \": \" + field.valueLabel;\n          return (\n            <span key={field.key} className=\"fd-filterbar-chip\">\n              <span className=\"fd-tag fd-filterbar-fixed\" role=\"group\" title={fixedText} aria-label={fixedText}>\n                {field.icon ? <i className={\"ph ph-\" + field.icon} aria-hidden=\"true\" /> : null}\n                <span className=\"fd-tag-label\"><MiddleEllipsis text={field.icon ? field.valueLabel : fixedText} /></span>\n                <FieldHelpButton field={field} onFieldHelp={onFieldHelp} />\n                <button type=\"button\" className=\"fd-tag-remove\" aria-label={\"Remove \" + fixedText} onClick={() => removeField(field)}>\n                  <i className=\"ph ph-x\" aria-hidden=\"true\" />\n                </button>\n              </span>\n            </span>\n          );\n        }\n        const chipRef = editing ? editAnchorRef : undefined;\n        const toggleOrClose = () => (editing ? closeEditing() : startEditing(field.key));\n        const remove = () => { removeField(field); closeEditing(); };\n        const valueText = set ? chipLabel(field, value) : \"\";\n        const chipText = set ? field.label + \": \" + valueText : field.label;\n        // The chip's whole text (\"Label: value\", or the label alone while a field is being added)\n        // is its button's name (explicitly: see Tag's aria-label) and the hover tooltip. What is\n        // painted is shorter for a field with a value and an icon: the icon names the kind, so the\n        // value alone takes the chip's width (a phone-width chip has room for little else). A field\n        // without an icon keeps the label, the only thing naming its kind, and so does a field still\n        // being added, which has no value yet. The painted text is then shortened by MiddleEllipsis\n        // (see `.fd-filterbar-chip`'s max-width in components.css), keeping the end of the value.\n        const paintedText = field.icon && set ? valueText : chipText;\n        const chipClass = \"fd-filterbar-chip\" + (field.help ? \" has-help\" : \"\");\n        const chip = (\n          <Tag icon={field.icon} selected onClick={toggleOrClose} onRemove={remove} title={chipText} aria-label={chipText}>\n            <MiddleEllipsis text={paintedText} middle={!joinsLabels(field, value)} />\n          </Tag>\n        );\n\n        // text is never \"editing\" here (its own inline-input branch above already\n        // returned for that case) — this is only its \"set, not currently being edited\"\n        // chip, unaffected by anything Popover-related. It sits in the same `.fd-filterbar-chip`\n        // wrapper as every other chip, which is what carries the max width.\n        if (field.type === \"text\") {\n          return <span key={field.key} className={chipClass}>{field.help ? <span>{chip}</span> : chip}<FieldHelpButton field={field} onFieldHelp={onFieldHelp} /></span>;\n        }\n\n        if (field.type === \"select\") {\n          return (\n            <span key={field.key} className={chipClass}>\n              <span ref={chipRef}>\n                {chip}\n              </span>\n              <FieldHelpButton field={field} onFieldHelp={onFieldHelp} />\n              {editing ? (\n                <Popover open anchorRef={editAnchorRef} onClose={closeEditing} placement={align === \"right\" ? \"bottom-end\" : \"bottom-start\"}\n                  offset={6} minWidth={200} label={field.label}>\n                  <span role=\"listbox\" aria-label={field.label} ref={optionsRef} className=\"fd-pop-list\">\n                    {field.options.map((o) => {\n                      const on = o.value === value;\n                      return (\n                        <button type=\"button\" key={o.value} role=\"option\" aria-selected={on}\n                          className={[\"fd-opt\", on ? \"is-selected\" : \"\"].filter(Boolean).join(\" \")}\n                          onClick={() => { commit(field, o.value); setPanel(null); }}>\n                          <span className=\"fd-opt-label\">{o.label}</span>\n                        </button>\n                      );\n                    })}\n                  </span>\n                </Popover>\n              ) : null}\n            </span>\n          );\n        }\n\n        if (field.type === \"multiSelect\") {\n          return (\n            <span key={field.key} className={chipClass}>\n              <span ref={chipRef}>\n                {chip}\n              </span>\n              <FieldHelpButton field={field} onFieldHelp={onFieldHelp} />\n              {editing ? (\n                <MultiSelectPanel\n                  field={field} value={value as FilterMultiSelectValue | undefined} anchorRef={editAnchorRef}\n                  onCommit={(v) => commit(field, v)}\n                  onClose={closeEditing}\n                />\n              ) : null}\n            </span>\n          );\n        }\n\n        if (field.type === \"range\") {\n          return (\n            <span key={field.key} className={chipClass}>\n              <span ref={chipRef}>\n                {chip}\n              </span>\n              <FieldHelpButton field={field} onFieldHelp={onFieldHelp} />\n              {editing ? (\n                <RangePanel\n                  field={field} value={value as FilterRangeValue | undefined} anchorRef={editAnchorRef}\n                  onCommit={(v) => commit(field, v)}\n                  onClose={closeEditing}\n                />\n              ) : null}\n            </span>\n          );\n        }\n\n        if (field.type === \"date\") {\n          return (\n            <span key={field.key} className={chipClass}>\n              <span ref={chipRef}>\n                {chip}\n              </span>\n              <FieldHelpButton field={field} onFieldHelp={onFieldHelp} />\n              {editing ? (\n                <DatePanel\n                  field={field} value={value as FilterDateValue | undefined} anchorRef={editAnchorRef}\n                  onCommit={(v) => commit(field, v)}\n                  onClose={closeEditing}\n                />\n              ) : null}\n            </span>\n          );\n        }\n\n        return null;\n      })}\n      </span>\n      </span>\n      {actions ? <span className=\"fd-filterbar-actions\">{actions}</span> : null}\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport { FieldLabel, useFieldId } from \"./field\";\nimport { useLatest } from \"../useLatest\";\n\n/** Numeric field with thousands formatting while unfocused, +/- steppers (press once for\n *  one step, press and hold to repeat with acceleration), ArrowUp/ArrowDown (Shift for\n *  `bigStep`), and inline min/max/integer validation that keeps an invalid typed value\n *  from ever reaching `onChange`. Every stepper and arrow result lands on the step grid\n *  (multiples of `step` counted from `min`, or from 0 when there is no finite `min`),\n *  computed in decimal-safe arithmetic, then clamped into the allowed range. */\nexport interface NumberInputProps {\n  label?: string; help?: string; error?: string;\n  /** Element id — lands on the <input> and on the label's `for`. Generated when\n   *  omitted, so `label` is always the input's accessible name either way. */\n  id?: string;\n  /** Names an instance that has no visible `label` — a bare bound inside a range\n   *  row whose heading lives elsewhere. Do not set both: aria-label OUTRANKS the\n   *  associated <label>, so a field carrying both is announced as something other\n   *  than what it visibly says. */\n  \"aria-label\"?: string;\n  prefix?: string; suffix?: string;\n  required?: boolean; disabled?: boolean;\n  /** Lowest allowed value. A typed value below it is shown as invalid and never reaches\n   *  `onChange`; the steppers and arrow keys stop at it. With `integer`, the lowest\n   *  allowed value is `Math.ceil(min)`. */\n  min?: number;\n  /** Highest allowed value, enforced the same way as `min`. With `integer`, the highest\n   *  allowed value is `Math.floor(max)`. */\n  max?: number;\n  /** Grid spacing for the steppers and arrow keys. Default 1. A press moves to the next\n   *  grid point in its direction, so from an off-grid value it snaps onto the grid\n   *  (step 10 from 3 goes up to 10, down to 0). Typed values are not snapped. */\n  step?: number;\n  /** Distance for Shift+ArrowUp/ArrowDown and for the accelerated phase of a held\n   *  stepper, also snapped to the step grid. Default `10 × step`. */\n  bigStep?: number;\n  /** Requires a whole number. Off by default, so a whole-number `step` (e.g. cents in\n   *  steps of 10) doesn't by itself block decimals. When set, a typed fraction is shown\n   *  as invalid, the allowed range narrows to `[ceil(min), floor(max)]`, and a stepper or\n   *  arrow result that falls between whole numbers is rounded in the direction of travel. */\n  integer?: boolean;\n  /** Thousands-format the display when not editing. Default true. */\n  format?: boolean;\n  value?: number | string;\n  /** Called with {target:{value}} where value is a number — or `undefined` once the\n   *  field is cleared to empty. A cleared field is \"no value\", never `0`: the caller\n   *  (e.g. FilterBar's range/date panels) tells an unset bound apart from a typed\n   *  zero by this, not by testing for `0` itself. Never called with an invalid value. */\n  onChange?: (e: any) => void;\n  /** Called on mount and whenever the field's validity changes — true while the text is\n   *  empty or a legal number, false while it is out of range, fractional (with\n   *  `integer`), or not a number. Invalid text stays in the field, flagged, after blur, so\n   *  a parent with its own Done button can keep it disabled until the text is fixed. */\n  onValidityChange?: (valid: boolean) => void;\n  placeholder?: string;\n  style?: any; className?: string;\n}\n\n/** Hold-to-repeat timing: the first repeat waits HOLD_DELAY_MS after the press; repeats\n *  1–6 move by `step` every 120 ms, repeats 7–12 by `bigStep` every 70 ms, and from the\n *  13th on by `bigStep` every 40 ms. */\nconst HOLD_DELAY_MS = 400;\nconst HOLD_BIG_AFTER = 6;\nconst HOLD_FAST_AFTER = 12;\nconst holdInterval = (repeats: number) => (repeats > HOLD_FAST_AFTER ? 40 : repeats > HOLD_BIG_AFTER ? 70 : 120);\n\n/** Decimal places in a finite number's shortest round-trip form, including exponent\n *  notation (1e-7 has 7). */\nfunction decimalPlaces(n: number): number {\n  if (!Number.isFinite(n)) return 0;\n  const [mantissa, exp] = String(n).toLowerCase().split(\"e\");\n  const frac = (mantissa.split(\".\")[1] || \"\").length;\n  return Math.max(0, frac - (exp ? Number(exp) : 0));\n}\n\n/** Parses the field's text: empty is null (no value, never 0); thousands separators are\n *  ignored; anything else that isn't a complete number (including a bare \"-\") is NaN. */\nexport function parseNumberText(text: string): number | null {\n  const s = text.replace(/,/g, \"\").trim();\n  if (s === \"\") return null;\n  if (!/^-?(\\d+\\.?\\d*|\\.\\d+)$/.test(s)) return NaN;\n  return Number(s);\n}\n\nexport interface StepRequest {\n  /** The value to step from; null (an empty field) steps from 0, like a native number input. */\n  from: number | null;\n  direction: 1 | -1;\n  /** How far this press travels before snapping: `step`, or `bigStep`. */\n  amount: number;\n  step: number;\n  min: number;\n  max: number;\n  integer: boolean;\n}\n\n/** The allowed range after applying `integer`. */\nexport function allowedRange(min: number, max: number, integer: boolean): { lo: number; hi: number } {\n  return integer ? { lo: Math.ceil(min), hi: Math.floor(max) } : { lo: min, hi: max };\n}\n\n/**\n * One stepper/arrow press, as a pure function. Moves `amount` in `direction`, snaps back\n * onto the step grid (anchored at the lowest allowed value, else 0) without undershooting\n * the press, always moves at least one grid point, rounds toward the direction of travel\n * when `integer` is set, and clamps into the allowed range. The arithmetic runs on\n * integers scaled by 10^(the most decimal places among the inputs), so 0.1 + 0.2 steps\n * give 0.3, not 0.30000000000000004. Returns null when the range holds no value at all.\n */\nexport function stepNumber({ from, direction, amount, step, min, max, integer }: StepRequest): number | null {\n  const { lo, hi } = allowedRange(min, max, integer);\n  if (lo > hi) return null;\n  const base = from ?? 0;\n  const anchor = Number.isFinite(lo) ? lo : 0;\n  const unit = step > 0 ? step : 1;\n  const travel = amount > 0 ? amount : unit;\n  const magnitude = Math.max(Math.abs(base), Math.abs(anchor), travel, unit, 1);\n  const maxPlaces = Math.max(0, Math.floor(Math.log10(Number.MAX_SAFE_INTEGER / (4 * magnitude))));\n  const places = Math.min(maxPlaces, Math.max(decimalPlaces(base), decimalPlaces(anchor), decimalPlaces(travel), decimalPlaces(unit)));\n  const scale = 10 ** places;\n  const b = Math.round(base * scale);\n  const a = Math.round(anchor * scale);\n  const s = Math.round(unit * scale);\n  const t = Math.round(travel * scale);\n  const target = b + direction * t;\n  let k = direction > 0 ? Math.floor((target - a) / s) : Math.ceil((target - a) / s);\n  // A bigStep smaller than step (or a press from an off-grid value) can snap back onto,\n  // or behind, the starting point — a press always moves at least one grid point.\n  if (direction > 0 && a + k * s <= b) k = Math.floor((b - a) / s) + 1;\n  if (direction < 0 && a + k * s >= b) k = Math.ceil((b - a) / s) - 1;\n  let next = (a + k * s) / scale;\n  if (integer && !Number.isInteger(next)) next = direction > 0 ? Math.ceil(next) : Math.floor(next);\n  return Math.min(hi, Math.max(lo, next));\n}\n\nexport function NumberInput({\n  label, help, error, prefix, suffix, required = false, disabled = false,\n  min = -Infinity, max = Infinity, step = 1, bigStep, integer = false, value, onChange, onValidityChange,\n  format = true, className = \"\", style, placeholder, id, \"aria-label\": ariaLabel\n}: NumberInputProps) {\n  const fieldId = useFieldId(id);\n  const errorId = fieldId + \"-error\";\n  const { lo, hi } = allowedRange(min, max, integer);\n  const big = bigStep ?? Number((step * 10).toFixed(decimalPlaces(step)));\n  const toText = (v: number | string | undefined) => (v == null || v === \"\" ? \"\" : String(v));\n  const toNumber = (v: number | string | undefined): number | null => {\n    if (v == null || v === \"\") return null;\n    const n = typeof v === \"number\" ? v : parseNumberText(v);\n    return n == null || Number.isNaN(n) ? null : n;\n  };\n\n  const [text, setText] = React.useState(() => toText(value));\n  const [editing, setEditing] = React.useState(false);\n  const parsed = parseNumberText(text);\n  const invalidMessage: string | null =\n    parsed == null ? null\n    : Number.isNaN(parsed) ? \"Enter a number\"\n    : integer && !Number.isInteger(parsed) ? \"Enter a whole number\"\n    : parsed < lo ? \"Must be ≥ \" + lo\n    : parsed > hi ? \"Must be ≤ \" + hi\n    : null;\n  const valid = invalidMessage == null;\n\n  // MP-243: the value this field last reported through onChange (or received as `value`),\n  // held in a ref the steppers read at press time. A held stepper's repeat timer outlives\n  // the render that started it; reading this ref instead of render-time `text` means each\n  // repeat steps from the previous repeat's result, and invalid text in the box is never\n  // a stepping base.\n  const committedRef = React.useRef<number | null>(toNumber(value));\n  const onChangeRef = useLatest(onChange);\n  const onValidityChangeRef = useLatest(onValidityChange);\n  const focusedRef = React.useRef(false);\n\n  React.useEffect(() => {\n    committedRef.current = toNumber(value);\n    if (!focusedRef.current) setText(toText(value));\n  }, [value]);\n  // A layout effect, so a parent that disables its Done button from this re-renders\n  // before the browser paints: no frame ever shows invalid text beside an enabled Done.\n  React.useLayoutEffect(() => { onValidityChangeRef.current?.(valid); }, [valid, onValidityChangeRef]);\n\n  const fire = (n: number | undefined) => {\n    committedRef.current = n ?? null;\n    onChangeRef.current?.({ target: { value: n } });\n  };\n\n  /** Steps once; returns whether the value moved (false at a bound). */\n  const bump = (direction: 1 | -1, amount: number): boolean => {\n    const next = stepNumber({ from: committedRef.current, direction, amount, step, min, max, integer });\n    if (next == null) return false;\n    setText(String(next));\n    if (next === committedRef.current) return false;\n    fire(next);\n    return true;\n  };\n  const bumpRef = useLatest(bump);\n\n  const holdTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const release = () => {\n    if (holdTimer.current) clearTimeout(holdTimer.current);\n    holdTimer.current = null;\n  };\n  const hold = (direction: 1 | -1) => {\n    release();\n    bump(direction, step);\n    let repeats = 0;\n    const tick = () => {\n      repeats++;\n      if (!bumpRef.current(direction, repeats > HOLD_BIG_AFTER ? big : step)) { release(); return; }\n      holdTimer.current = setTimeout(tick, holdInterval(repeats));\n    };\n    holdTimer.current = setTimeout(tick, HOLD_DELAY_MS);\n  };\n  React.useEffect(() => () => { if (holdTimer.current) clearTimeout(holdTimer.current); }, []);\n\n  const current = committedRef.current;\n  const shown = editing || !valid ? text : parsed == null ? \"\" : format ? parsed.toLocaleString() : String(parsed);\n  const shownError = error || invalidMessage || undefined;\n  const box = [\"fd-input\", \"fd-input-num\", shownError ? \"fd-input-error\" : \"\", disabled ? \"fd-input-disabled\" : \"\"].filter(Boolean).join(\" \");\n  const fieldName = label || ariaLabel;\n  const stepperName = (verb: string) => (fieldName ? verb + \" \" + fieldName : verb);\n  const noRange = lo > hi;\n  return (\n    <div className={[\"fd-field\", className].filter(Boolean).join(\" \")} style={style}>\n      {label ? <FieldLabel htmlFor={fieldId} required={required}>{label}</FieldLabel> : null}\n      <div className={box}>\n        {prefix ? <span className=\"fd-input-affix\">{prefix}</span> : null}\n        <input id={fieldId} aria-label={ariaLabel} inputMode=\"numeric\" disabled={disabled} placeholder={placeholder} value={shown}\n          aria-invalid={shownError ? \"true\" : undefined} aria-describedby={shownError ? errorId : undefined}\n          onFocus={() => { focusedRef.current = true; setEditing(true); }}\n          onBlur={() => {\n            focusedRef.current = false;\n            setEditing(false);\n            if (text.trim() === \"\" && committedRef.current != null) fire(undefined);\n          }}\n          onChange={(e) => {\n            const raw = e.target.value;\n            setText(raw);\n            const n = parseNumberText(raw);\n            if (n == null) { if (committedRef.current != null) fire(undefined); return; }\n            if (Number.isNaN(n) || (integer && !Number.isInteger(n)) || n < lo || n > hi) return;\n            fire(n);\n          }}\n          onKeyDown={(e) => {\n            if (e.key === \"ArrowUp\") { e.preventDefault(); bump(1, e.shiftKey ? big : step); }\n            else if (e.key === \"ArrowDown\") { e.preventDefault(); bump(-1, e.shiftKey ? big : step); }\n          }} />\n        {suffix ? <span className=\"fd-input-affix\">{suffix}</span> : null}\n        {/* The steppers carry the field's name too. A bare \"Increase\"/\"Decrease\" is\n            unambiguous only while there is one NumberInput on the page; a range row\n            (\"At least\" / \"At most\") puts two of each within a few hundred px of one\n            another, and a name that doesn't say which field it steps is no more\n            usable than no name at all. A pointer press steps and starts hold-to-repeat;\n            a keyboard activation (click with detail 0) steps once. */}\n        <span className=\"fd-input-steppers\">\n          <button type=\"button\" className=\"fd-stepbtn\" aria-label={stepperName(\"Decrease\")}\n            disabled={disabled || noRange || (current != null && current <= lo)}\n            onPointerDown={() => hold(-1)} onPointerUp={release} onPointerLeave={release} onPointerCancel={release}\n            onClick={(e) => { if (e.detail === 0) bump(-1, step); }}><i className=\"ph ph-minus\" aria-hidden=\"true\" /></button>\n          <button type=\"button\" className=\"fd-stepbtn\" aria-label={stepperName(\"Increase\")}\n            disabled={disabled || noRange || (current != null && current >= hi)}\n            onPointerDown={() => hold(1)} onPointerUp={release} onPointerLeave={release} onPointerCancel={release}\n            onClick={(e) => { if (e.detail === 0) bump(1, step); }}><i className=\"ph ph-plus\" aria-hidden=\"true\" /></button>\n        </span>\n      </div>\n      {/* The error is checked on every keystroke, so it can appear while the user is still\n          typing, with focus in the box. This always-mounted, visually hidden live region\n          is what a screen reader hears it through: a region that already exists announces\n          new text, where one mounted together with its text is easily missed. It is also\n          the input's description, so the visible copy below is hidden from assistive\n          tech rather than read twice. */}\n      <span id={errorId} className=\"fd-sr\" role=\"status\">{shownError ?? \"\"}</span>\n      {shownError ? <span className=\"fd-field-error\" aria-hidden=\"true\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{shownError}</span>\n        : help ? <span className=\"fd-field-help\">{help}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * The id a field's <label> and its control agree on.\n *\n * A field has an accessible name only when something actually ties the label to\n * the control, and every tie HTML offers runs through an id — so every labelled\n * control in this family needs one whether or not the caller cared enough to\n * supply it. Before this existed, the family's components fell back to\n * `\"fd-\" + name` and, failing that, to no id at all: a label rendered as a bare\n * <label> next to an anonymous input, which is a <label> that names nothing. A\n * screen reader reaching such a field announces the control with no name, and a\n * test cannot find it by its label either — the two symptoms are the same defect,\n * so a test that reaches past the missing name (locating the field by an internal\n * class instead) is the accessibility bug showing up as a testing smell.\n *\n * React's `useId` is what mints the fallback. It is stable across every re-render\n * of the same element — a module-level counter read once into a ref would be too\n * — but it is also identical between a server render and the client hydration of\n * that same element, which nothing we could write by hand is: a counter starts\n * over in each fresh server process, so the id in the shipped HTML and the id the\n * client computes disagree, React reports a hydration mismatch, and the\n * label/control tie silently breaks in the markup that actually reached the user.\n *\n * A caller-supplied `id` always wins, because it is the only way a caller can\n * point its own `aria-describedby`, its own <label>, or a test selector at this\n * control. There is deliberately no `name`-derived fallback any more: `name` is\n * not unique — one form rendered twice on a page, or a repeated row of fields,\n * gives two controls the same `name` and therefore the same id, and a duplicated\n * id makes every one of those labels resolve to whichever control the browser\n * happens to find first.\n */\nexport function useFieldId(id?: string): string {\n  const generated = React.useId();\n  return id || generated;\n}\n\nexport interface FieldLabelProps {\n  /** The control's id. Set this for a real labelable control (input, textarea):\n   *  it becomes the label's `for`, which both focuses the control on a label\n   *  click and makes this text the control's accessible name. */\n  htmlFor?: string;\n  /** This element's own id. Set this INSTEAD of `htmlFor` for a control that is\n   *  named by aria-labelledby rather than by association — see useTriggerLabelling. */\n  id?: string;\n  required?: boolean;\n  /** The popover fields (Select, DatePicker, TimePicker) open themselves when\n   *  their label is clicked, since their label can't carry a `for` that would\n   *  do it natively. */\n  onClick?: React.MouseEventHandler<HTMLLabelElement>;\n  children: React.ReactNode;\n}\n\n/**\n * The one <label> every field in this family renders.\n *\n * Extracted because the markup was copied into six components and had already\n * drifted: only Input marked the required asterisk aria-hidden, so in the other\n * five the asterisk was read out as part of the field's name (\"Budget star\").\n * The asterisk is a purely visual restatement of a state the control itself\n * carries — it belongs nowhere near the name — and a field's label is exactly\n * the kind of markup that must be identical everywhere, because a difference\n * between two fields is a difference a user hears.\n */\nexport function FieldLabel({ htmlFor, id, required = false, onClick, children }: FieldLabelProps) {\n  return (\n    <label className=\"fd-field-label\" htmlFor={htmlFor} id={id} onClick={onClick}>\n      {children}\n      {required ? <span className=\"fd-field-req\" aria-hidden=\"true\">*</span> : null}\n    </label>\n  );\n}\n\nexport interface TriggerLabelling {\n  /** id for the trigger element itself. */\n  fieldId: string;\n  /** id for the <label> — hand this to FieldLabel's `id`. */\n  labelId: string;\n  /** aria-labelledby for the trigger; undefined when there is no visible label. */\n  ariaLabelledBy: string | undefined;\n}\n\n/**\n * Labelling for a field whose \"control\" is a custom <button> opening a popover —\n * Select, DatePicker, TimePicker.\n *\n * These deliberately do NOT use `<label for>` the way an <input> does, for two\n * independent reasons. First, HTML-AAM computes a button's accessible name from\n * its own subtree before it ever reaches an associated <label>, so a `for` here\n * is quietly ignored and the name stays whatever the trigger currently displays.\n * Second, these labels already carry an onClick that toggles the popover; adding\n * `for` would make a label click ALSO forward a synthetic click to the button,\n * toggling it a second time and leaving it shut.\n *\n * So the tie runs the other way: the label gets an id and the trigger points at\n * it with aria-labelledby. The list names the label FIRST and the trigger ITSELF\n * second, which resolves to \"<label> <what the trigger displays>\". Naming only\n * the label would throw the current value away for exactly the users who cannot\n * see it; naming only the trigger (which is what these components did before)\n * throws away what that value means.\n */\nexport function useTriggerLabelling(label: React.ReactNode, id?: string, hiddenLabel?: string): TriggerLabelling {\n  const fieldId = useFieldId(id);\n  const labelId = fieldId + \"-label\";\n  return { fieldId, labelId, ariaLabelledBy: label || hiddenLabel ? labelId + \" \" + fieldId : undefined };\n}\n\n/**\n * The label a popover field renders when it has no visible one: a page that shows the\n * control's purpose some other way (a date range that sits beside the filters it belongs\n * to) passes `aria-label`, and this puts that text in a visually hidden element with the\n * label's id, so the trigger is still named \"<label> <current value>\" (see\n * useTriggerLabelling) rather than by its value alone, or by an aria-label that throws the\n * value away. Renders nothing when there is no hidden label.\n */\nexport function HiddenFieldLabel({ id, children }: { id: string; children?: string }) {\n  return children ? <span id={id} className=\"fd-sr\">{children}</span> : null;\n}\n","import * as React from \"react\";\n\n/**\n * A ref that holds `value` as of the last COMMITTED render, for code that runs outside\n * render and must act on current props: an async settle, a timer, or an effect in a\n * child. The ref is assigned in an insertion effect, never during render, so a render\n * React throws away (an interrupted or suspended one) never leaks its props into it.\n * Insertion effects run in the commit's mutation phase, before any component's layout\n * effects, so a child's layout effect that calls back into its parent already reads\n * that same commit's values.\n */\nexport function useLatest<T>(value: T): React.MutableRefObject<T> {\n  const ref = React.useRef(value);\n  React.useInsertionEffect(() => {\n    ref.current = value;\n  });\n  return ref;\n}\n","import * as React from \"react\";\nimport { Popover } from \"../actions/Popover\";\nimport { FieldLabel, HiddenFieldLabel, useTriggerLabelling } from \"./field\";\nimport { truncationTitle } from \"../textExposure\";\n\nconst MONTHS = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nconst DOW = [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"];\nconst iso = (d: Date) => d.getFullYear() + \"-\" + String(d.getMonth() + 1).padStart(2, \"0\") + \"-\" + String(d.getDate()).padStart(2, \"0\");\nconst parse = (s?: string | null): Date | null => { if (!s) return null; const [y, m, d] = s.split(\"-\").map(Number); return new Date(y, m - 1, d); };\nconst fmt = (s?: string | null) => { const d = parse(s); return d ? MONTHS[d.getMonth()].slice(0, 3) + \" \" + d.getDate() + \", \" + d.getFullYear() : \"\"; };\n\n// MP-272: full-date accessible names and destination-named nav, all locale-aware via Intl\n// rather than the fixed MONTHS/DOW tables above (those still drive the *visible* text, which\n// this kit renders in English regardless of locale — only the accessible names follow the\n// runtime locale, per the card).\nconst fullDateLabel = (d: Date) => new Intl.DateTimeFormat(undefined, { dateStyle: \"full\" }).format(d);\nconst monthYearLabel = (d: Date) => new Intl.DateTimeFormat(undefined, { month: \"long\", year: \"numeric\" }).format(d);\n// Jan 1 2023 was a Sunday — a stable anchor for reading each weekday's full locale name\n// without depending on the calendar's own week-start assumptions.\nconst weekdayLong = (i: number) => new Intl.DateTimeFormat(undefined, { weekday: \"long\" }).format(new Date(2023, 0, 1 + i));\n\nconst daysInMonth = (y: number, m: number) => new Date(y, m + 1, 0).getDate();\nconst addMonths = (d: Date, n: number): Date => {\n  const total = d.getFullYear() * 12 + d.getMonth() + n;\n  const y = Math.floor(total / 12), m = ((total % 12) + 12) % 12;\n  return new Date(y, m, Math.min(d.getDate(), daysInMonth(y, m)));\n};\nconst addYears = (d: Date, n: number): Date => {\n  const y = d.getFullYear() + n;\n  return new Date(y, d.getMonth(), Math.min(d.getDate(), daysInMonth(y, d.getMonth())));\n};\nconst addDays = (d: Date, n: number): Date => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);\nconst sameMonth = (d: Date, y: number, m: number): boolean => d.getFullYear() === y && d.getMonth() === m;\n\n/** Calendar popover date field. Click the title to drill month -> year; range mode picks start then end with live hover preview. Values are ISO strings (\"2026-03-01\"). */\nexport interface DatePickerProps {\n  label?: string; help?: string; error?: string;\n  /** Names the field when it has no visible `label` (the trigger is then named \"<aria-label> <what it displays>\"). */\n  \"aria-label\"?: string;\n  required?: boolean; disabled?: boolean;\n  /** false: value is \"YYYY-MM-DD\". true: value is {start, end}. */\n  range?: boolean;\n  value?: any;\n  /** Called with {target:{value}} — string, or {start,end} in range mode. */\n  onChange?: (e: any) => void;\n  placeholder?: string;\n  /** Element id — lands on the trigger button, with the label's own id derived\n   *  from it. Generated when omitted, so `label` names the trigger either way. */\n  id?: string;\n  style?: any; className?: string;\n}\n\n/** The bare calendar, for embedding in custom surfaces. months=2 renders two side-by-side months (used by range mode). */\nexport interface CalendarProps { value?: any; range?: boolean; onPick: (v: any) => void; initialMonth?: string; months?: number }\n\nexport function Calendar({ value, range = false, onPick, initialMonth, months = 1 }: CalendarProps) {\n  const today = new Date();\n  const sel = range ? value || {} : { start: value, end: value };\n  const anchor = parse(sel.start) || parse(initialMonth) || today;\n  const [vy, setVy] = React.useState(anchor.getFullYear());\n  const [vm, setVm] = React.useState(anchor.getMonth());\n  const [mode, setMode] = React.useState(\"days\"); // days | months | years\n  const [hover, setHover] = React.useState<string | null>(null);\n  const s = parse(sel.start), e = parse(sel.end);\n  const hoverEnd = range && s && !e && hover ? parse(hover) : null;\n  const inRange = (d: Date) => {\n    const lo = s, hi = e || hoverEnd;\n    return lo && hi && d > (lo < hi ? lo : hi) && d < (lo < hi ? hi : lo);\n  };\n  const isStart = (d: Date) => !!s && iso(d) === iso(s);\n  const isEnd = (d: Date) => !!e && iso(d) === iso(e);\n  const isEdge = (d: Date) => isStart(d) || isEnd(d);\n  const nextY = vm === 11 ? vy + 1 : vy, nextM = (vm + 1) % 12;\n\n  // MP-272: the day the grid's roving tabindex currently owns — the cell that receives real\n  // DOM focus. Starts on the selected day (range or single) when there is one, else on today\n  // when today is inside the month this instance opens on, else the 1st of that month (an\n  // explicit `initialMonth` with no selection and today elsewhere — a narrow case, but one\n  // that must still land the roving index on a real, visible cell rather than an offscreen one).\n  const [activeDate, setActiveDate] = React.useState<Date>(() => {\n    if (s) return s;\n    if (sameMonth(today, anchor.getFullYear(), anchor.getMonth())) return today;\n    return new Date(anchor.getFullYear(), anchor.getMonth(), 1);\n  });\n  const calRef = React.useRef<HTMLDivElement>(null);\n\n  // Brings whichever month(s) the active date needs into view, without moving it off a month\n  // that's already showing — including, in range mode, the second (right-hand) grid.\n  const pageToShow = (y: number, m: number) => {\n    const idx = y * 12 + m, firstIdx = vy * 12 + vm, secondIdx = firstIdx + 1;\n    if (idx === firstIdx || (months > 1 && idx === secondIdx)) return;\n    if (idx < firstIdx || months === 1) { setVy(y); setVm(m); return; }\n    const baseIdx = idx - 1;\n    setVy(Math.floor(baseIdx / 12)); setVm(((baseIdx % 12) + 12) % 12);\n  };\n\n  const moveActive = (next: Date) => { setActiveDate(next); pageToShow(next.getFullYear(), next.getMonth()); };\n\n  // Every time this calendar mounts (i.e. every time the popover opens — Popover unmounts\n  // it on close) or the active day moves, focus follows it. This is what lands focus on the\n  // selected-or-today cell on open, and keeps DOM focus glued to the roving index afterwards.\n  React.useEffect(() => {\n    const el = calRef.current?.querySelector<HTMLElement>('[data-iso=\"' + iso(activeDate) + '\"]');\n    if (el) el.focus({ preventScroll: true });\n  }, [activeDate, vy, vm]);\n\n  const clickDay = (d: Date) => {\n    setActiveDate(d);\n    const v = iso(d);\n    if (!range) { onPick(v); return; }\n    if (!sel.start || (sel.start && sel.end)) onPick({ start: v, end: \"\" });\n    else {\n      const a = parse(sel.start)!;\n      onPick(d < a ? { start: v, end: sel.start } : { start: sel.start, end: v });\n    }\n  };\n  const nav = (d: number) => { let m = vm + d, y = vy; if (m < 0) { m = 11; y--; } if (m > 11) { m = 0; y++; } setVm(m); setVy(y); };\n\n  const onGridKeyDown = (ev: React.KeyboardEvent) => {\n    const d = activeDate;\n    switch (ev.key) {\n      case \"ArrowLeft\": ev.preventDefault(); moveActive(addDays(d, -1)); return;\n      case \"ArrowRight\": ev.preventDefault(); moveActive(addDays(d, 1)); return;\n      case \"ArrowUp\": ev.preventDefault(); moveActive(addDays(d, -7)); return;\n      case \"ArrowDown\": ev.preventDefault(); moveActive(addDays(d, 7)); return;\n      case \"Home\": ev.preventDefault(); moveActive(addDays(d, -d.getDay())); return;\n      case \"End\": ev.preventDefault(); moveActive(addDays(d, 6 - d.getDay())); return;\n      case \"PageUp\": ev.preventDefault(); moveActive(ev.shiftKey ? addYears(d, -1) : addMonths(d, -1)); return;\n      case \"PageDown\": ev.preventDefault(); moveActive(ev.shiftKey ? addYears(d, 1) : addMonths(d, 1)); return;\n      case \"Enter\": case \" \": ev.preventDefault(); clickDay(d); return;\n      default: return;\n    }\n  };\n\n  // The visible month/year heading, read out fresh whenever it changes — moved into its own\n  // node (rather than the mode-switch button's own accessible name) so a screen reader\n  // announces the new month on every nav/page keystroke without also re-reading \"button\".\n  const monthHeading = mode === \"days\" ? MONTHS[vm] + \" \" + vy : mode === \"months\" ? String(vy) : (vy - 5) + \" – \" + (vy + 6);\n  const prevLabel = mode === \"days\" ? \"Previous month, \" + monthYearLabel(new Date(vy, vm - 1, 1))\n    : mode === \"months\" ? \"Previous year, \" + (vy - 1)\n    : \"Previous years, \" + (vy - 17) + \" – \" + (vy - 6);\n  const nextLabel = mode === \"days\" ? \"Next month, \" + monthYearLabel(new Date(vy, vm + 1, 1))\n    : mode === \"months\" ? \"Next year, \" + (vy + 1)\n    : \"Next years, \" + (vy + 7) + \" – \" + (vy + 18);\n\n  const monthGrid = (y: number, m: number) => {\n    const startPad = new Date(y, m, 1).getDay();\n    const last = daysInMonth(y, m);\n    // MP-272: only this month's own days are real, focusable, clickable grid cells. Leading\n    // and trailing padding — previously live buttons for the adjacent month — is now blank,\n    // non-interactive filler (role=\"presentation\"). In range mode's two-up display those\n    // padding cells would otherwise duplicate a date that's a real, in-month cell in the\n    // OTHER visible grid (the left grid's trailing days are the right grid's own month), which\n    // is exactly the kind of same-accessible-name collision the grid pattern can't have.\n    const cells: Array<Date | null> = [];\n    for (let i = 0; i < 42; i++) {\n      const dom = i - startPad + 1;\n      cells.push(dom >= 1 && dom <= last ? new Date(y, m, dom) : null);\n    }\n    return (\n      <div\n        className=\"fd-cal-grid\" role=\"grid\" aria-label={monthYearLabel(new Date(y, m, 1))}\n        style={{ width: months > 1 ? 252 : \"auto\", flex: \"none\" }} onMouseLeave={() => setHover(null)}\n      >\n        <div className=\"fd-cal-row\" role=\"row\">\n          {DOW.map((d, i) => <span key={d} className=\"fd-cal-dow\" role=\"columnheader\" aria-label={weekdayLong(i)}>{d}</span>)}\n        </div>\n        {Array.from({ length: 6 }, (_, row) => (\n          <div className=\"fd-cal-row\" role=\"row\" key={row}>\n            {cells.slice(row * 7, row * 7 + 7).map((d, col) => {\n              if (!d) return <div key={col} className=\"fd-cal-day is-empty\" role=\"presentation\" aria-hidden=\"true\" />;\n              const today_ = iso(d) === iso(today);\n              const start = isStart(d), end = isEnd(d), selected = isEdge(d);\n              const bits: string[] = [];\n              if (range && start) bits.push(\"start date\");\n              if (range && end) bits.push(\"end date\");\n              if (selected && !range) bits.push(\"selected\");\n              if (today_) bits.push(\"today\");\n              const name = bits.length ? fullDateLabel(d) + \", \" + bits.join(\", \") : fullDateLabel(d);\n              return (\n                <div\n                  key={col} data-iso={iso(d)} role=\"gridcell\" tabIndex={iso(d) === iso(activeDate) ? 0 : -1}\n                  aria-label={name} aria-selected={selected} aria-current={today_ ? \"date\" : undefined}\n                  className={[\"fd-cal-day\", today_ ? \"is-today\" : \"\", inRange(d) ? \"in-range\" : \"\", selected ? \"is-edge\" : \"\"].filter(Boolean).join(\" \")}\n                  onClick={() => clickDay(d)} onMouseEnter={() => range && setHover(iso(d))}\n                  onKeyDown={onGridKeyDown} onFocus={() => setActiveDate(d)}\n                >\n                  {d.getDate()}\n                </div>\n              );\n            })}\n          </div>\n        ))}\n      </div>\n    );\n  };\n  return (\n    <div className=\"fd-cal\" style={{ width: months > 1 && mode === \"days\" ? \"auto\" : undefined }} ref={calRef}>\n      <div className=\"fd-cal-head\">\n        <button type=\"button\" className=\"fd-btn-icon\" aria-label={prevLabel} onClick={() => mode === \"years\" ? setVy(vy - 12) : mode === \"months\" ? setVy(vy - 1) : nav(-1)}><i className=\"ph ph-caret-left\" /></button>\n        <button type=\"button\" className=\"fd-cal-title\" onClick={() => setMode(mode === \"days\" ? \"months\" : mode === \"months\" ? \"years\" : \"days\")}>\n          {monthHeading}\n          <i className=\"ph ph-caret-down\" style={{ fontSize: 10, marginLeft: 6, color: \"var(--text-muted)\" }} />\n        </button>\n        {months > 1 && mode === \"days\" ? <span className=\"fd-cal-title\" style={{ cursor: \"default\", background: \"none\" }}>{MONTHS[nextM] + \" \" + nextY}</span> : null}\n        <button type=\"button\" className=\"fd-btn-icon\" aria-label={nextLabel} onClick={() => mode === \"years\" ? setVy(vy + 12) : mode === \"months\" ? setVy(vy + 1) : nav(1)}><i className=\"ph ph-caret-right\" /></button>\n      </div>\n      {/* Announces the visible month/year (or year/decade in the drill-down views) whenever it\n       *  changes, independent of the mode-switch button's own name. */}\n      <span aria-live=\"polite\" className=\"fd-sr-only\">{monthHeading}</span>\n      {mode === \"days\" ? (\n        <div style={{ display: \"flex\", gap: 18 }}>\n          {monthGrid(vy, vm)}\n          {months > 1 ? monthGrid(nextY, nextM) : null}\n        </div>\n      ) : mode === \"months\" ? (\n        <div className=\"fd-cal-grid-months\">\n          {MONTHS.map((m, i) => (\n            <button type=\"button\" key={m} className={\"fd-cal-cell\" + (i === vm && s && s.getFullYear() === vy ? \" is-sel\" : \"\")}\n              onClick={() => { setVm(i); setMode(\"days\"); }}>{m.slice(0, 3)}</button>\n          ))}\n        </div>\n      ) : (\n        <div className=\"fd-cal-grid-months\">\n          {Array.from({ length: 12 }, (_, i) => vy - 5 + i).map((y) => (\n            <button type=\"button\" key={y} className={\"fd-cal-cell\" + (y === vy ? \" is-sel\" : \"\")}\n              onClick={() => { setVy(y); setMode(\"months\"); }}>{y}</button>\n          ))}\n        </div>\n      )}\n      <div className=\"fd-cal-foot\">\n        <button type=\"button\" className=\"fd-btn fd-btn-link\" style={{ fontSize: 12.5 }}\n          onClick={() => { setVy(today.getFullYear()); setVm(today.getMonth()); setMode(\"days\"); moveActive(today); }}>Today</button>\n        <span style={{ flex: 1 }} />\n        {range && sel.start ? <span className=\"fd-body-sm fd-muted\">{fmt(sel.start)}{sel.end ? \" → \" + fmt(sel.end) : \" → pick an end\"}</span> : null}\n      </div>\n    </div>\n  );\n}\n\nexport function DatePicker({ label, help, error, required = false, disabled = false, range = false, value, onChange, placeholder, id, className = \"\", style, \"aria-label\": hiddenLabel, ...rest }: DatePickerProps) {\n  const { fieldId, labelId, ariaLabelledBy } = useTriggerLabelling(label, id, hiddenLabel);\n  const [open, setOpen] = React.useState(false);\n  const rootRef = React.useRef<HTMLDivElement>(null);\n  const boxRef = React.useRef<HTMLDivElement>(null);\n  const display = range\n    ? (value && value.start ? fmt(value.start) + (value.end ? \"  →  \" + fmt(value.end) : \"  →  …\") : \"\")\n    : fmt(value);\n  const toggle = () => { if (!disabled) setOpen(!open); };\n  return (\n    <div className={[\"fd-field\", \"fd-popfield\", open ? \"is-open\" : \"\", className].filter(Boolean).join(\" \")} style={style} ref={rootRef}>\n      {label ? <FieldLabel id={labelId} required={required} onClick={toggle}>{label}</FieldLabel> : <HiddenFieldLabel id={labelId}>{hiddenLabel}</HiddenFieldLabel>}\n      <div className={[\"fd-input\", error ? \"fd-input-error\" : \"\", disabled ? \"fd-input-disabled\" : \"\"].filter(Boolean).join(\" \")} style={{ cursor: disabled ? \"not-allowed\" : \"pointer\" }} onClick={toggle} ref={boxRef}>\n        <span className=\"fd-input-icon\"><i className=\"ph ph-calendar-blank\" aria-hidden=\"true\" /></span>\n        <button type=\"button\" id={fieldId} aria-labelledby={ariaLabelledBy} title={truncationTitle(display)} disabled={disabled} onKeyDown={(e) => { if (e.key === \"Enter\" || e.key === \" \") { e.preventDefault(); toggle(); } }}\n          style={{ all: \"unset\", flex: 1, minWidth: 0, overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\", cursor: \"inherit\", color: display ? \"var(--text)\" : \"var(--text-muted)\" }} {...rest}>\n          {display || placeholder || (range ? \"Pick a date range\" : \"Pick a date\")}\n        </button>\n        <span className=\"fd-select-caret\"><i className=\"ph ph-caret-down\" aria-hidden=\"true\" /></span>\n      </div>\n      {/* MP-272: this already renders through Popover, which is already a registered layer\n       *  (kits/layerStack.tsx, via useStackedLayer) — Escape here closes only this calendar,\n       *  never a Drawer/Modal it happens to be opened inside of, and closing it returns focus\n       *  to whatever had it before the calendar opened (ordinarily this trigger button). No\n       *  separate layer registration is needed or added here; see layering.test.tsx and\n       *  DatePicker.browser.test.tsx for the coverage. */}\n      <Popover\n        open={open} anchorRef={boxRef} triggerRef={rootRef} onClose={() => setOpen(false)}\n        placement=\"bottom-start\" offset={6} role=\"presentation\"\n        style={{ width: \"max-content\" }}\n      >\n        <Calendar range={range} months={range ? 2 : 1} value={value}\n          onPick={(v: any) => { onChange && onChange({ target: { value: v } }); if (!range || (v.start && v.end)) setOpen(false); }} />\n      </Popover>\n      {error ? <span className=\"fd-field-error\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{error}</span>\n        : help ? <span className=\"fd-field-help\">{help}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { FieldLabel, useFieldId } from \"./field\";\n\n/** Multi-line field. Same chrome as Input; vertical resize only. */\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n  label?: string;\n  help?: string;\n  error?: string;\n  required?: boolean;\n  rows?: number;\n  /** Read-only plus `aria-busy`, with the same visible look as `disabled` (the\n   *  `.fd-input-disabled` tokens) — for a value an in-flight request is about to replace\n   *  while the field stays reachable. Unlike `disabled`, `busy` never sets the native\n   *  `disabled` attribute: `readOnly` blocks editing without removing the control from the\n   *  tab order or dropping focus that was already on it, so a keyboard user's in-progress\n   *  action (e.g. Ctrl+Enter to resolve) still reaches it while busy. */\n  busy?: boolean;\n  /** Applied to the outer .fd-field element — this is where width belongs. */\n  style?: React.CSSProperties;\n  /** Applied to the outer .fd-field element, like `style` — the same rule as Input. */\n  className?: string;\n}\n\nexport function Textarea({ label, help, error, required = false, rows = 4, disabled = false, busy = false, readOnly, id, className = \"\", style, ...rest }: TextareaProps) {\n  const fieldId = useFieldId(id);\n  const box = [\"fd-input\", \"fd-input-textarea\", error ? \"fd-input-error\" : \"\", disabled || busy ? \"fd-input-disabled\" : \"\"].filter(Boolean).join(\" \");\n  return (\n    <div className={[\"fd-field\", className].filter(Boolean).join(\" \")} style={style}>\n      {label ? <FieldLabel htmlFor={fieldId} required={required}>{label}</FieldLabel> : null}\n      <div className={box}>\n        <textarea\n          id={fieldId}\n          rows={rows}\n          disabled={disabled}\n          readOnly={busy || readOnly}\n          aria-busy={busy || undefined}\n          aria-invalid={error ? \"true\" : undefined}\n          {...rest}\n        />\n      </div>\n      {error ? <span className=\"fd-field-error\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{error}</span>\n        : help ? <span className=\"fd-field-help\">{help}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * The keyboard/scroll rules a listbox-driven picker needs: an active index that\n * Arrow/Home/End move, Enter confirms, and the active row scrolls into view. Owns index\n * math only — markup (native buttons vs. non-tabbable option rows), disabled rows,\n * typeahead and how the picker dismisses itself stay with each caller, since those\n * differ enough between a single/multi Select and a stay-open-across-picks multi-select\n * that folding them in here would only move the caller-specific branching into a shared\n * file instead of removing it.\n */\nexport interface UseListboxNavOptions {\n  /** How many rows are currently visible/navigable. Shrinking it (e.g. a query that\n   *  narrows the list) does not by itself move `active` — a caller that wants the\n   *  active row reset on every new result set (as both current callers do) resets it\n   *  itself via `setActive`. */\n  count: number;\n  /** Fires for a confirmed pick — Enter while the active index points at a real row. */\n  onSelect: (index: number) => void;\n}\n\nexport interface ListboxNav {\n  active: number;\n  setActive: React.Dispatch<React.SetStateAction<number>>;\n  /** Moves the active index by one row, clamped to the list's ends. No wraparound —\n   *  the same clamp both Select and FilterBar's multi-select already used. */\n  move: (dir: 1 | -1) => void;\n  first: () => void;\n  last: () => void;\n  /** Fires onSelect(active) when the active index currently points at a real row. */\n  activate: () => void;\n}\n\nexport function useListboxNav({ count, onSelect }: UseListboxNavOptions): ListboxNav {\n  const [active, setActive] = React.useState(-1);\n  return {\n    active,\n    setActive,\n    move: (dir: 1 | -1) => setActive((a) => Math.min(count - 1, Math.max(0, a + dir))),\n    first: () => setActive(0),\n    last: () => setActive(count - 1),\n    activate: () => { if (active >= 0 && active < count) onSelect(active); },\n  };\n}\n\n/**\n * Scrolls the active row into view inside `listRef`'s own scroll box, identifying the\n * row by `data-i={index}` the same way Select's options already did. `enabled` gates\n * this behind \"the list is actually open and rendered\" so a hidden or unmounted listbox\n * with a stale nonzero active index never writes a scrollTop against nothing.\n */\nexport function useListboxScrollIntoView(\n  active: number,\n  listRef: React.RefObject<HTMLElement>,\n  enabled: boolean,\n): void {\n  React.useEffect(() => {\n    if (!enabled || active < 0 || !listRef.current) return;\n    const list = listRef.current;\n    const el = list.querySelector<HTMLElement>('[data-i=\"' + active + '\"]');\n    if (!el) return;\n    const top = el.offsetTop - list.offsetTop;\n    if (top < list.scrollTop) list.scrollTop = top - 4;\n    else if (top + el.offsetHeight > list.scrollTop + list.clientHeight) {\n      list.scrollTop = top + el.offsetHeight - list.clientHeight + 4;\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [active, enabled]);\n}\n","\n/** How many trailing characters stay visible when the value is truncated — enough to keep the\n *  distinctive end of a long name (its \"(b17)\", \"S26 - 20260925\", \"…ement (na)\"). */\nconst TAIL_CHARS = 12;\n\nconst graphemes = new Intl.Segmenter(undefined, { granularity: \"grapheme\" });\n\n/** Splits a value into a shrinkable head and a fixed tail, on grapheme-cluster boundaries so an\n *  emoji, a flag or a letter with a combining mark is never cut apart. A value no longer than\n *  the tail has no head to truncate and stays whole in `head`. */\nexport function splitForMiddleEllipsis(text: string): { head: string; tail: string } {\n  const chars = Array.from(graphemes.segment(text), (part) => part.segment);\n  if (chars.length <= TAIL_CHARS) return { head: text, tail: \"\" };\n  return { head: chars.slice(0, -TAIL_CHARS).join(\"\"), tail: chars.slice(-TAIL_CHARS).join(\"\") };\n}\n\nexport interface MiddleEllipsisProps {\n  text: string;\n  /** False for a value that is several items joined (\"Michigan State (MI) · IPEDS 1, Wayne State\n   *  (MI) · IPEDS 2\"): its tail belongs to the LAST item, and a cut that keeps the first item's\n   *  start beside the last item's end shows a pair that was never together. Such a value gives up\n   *  its end instead and keeps its head. Defaults to true. */\n  middle?: boolean;\n}\n\n/**\n * Text that, when its box is too narrow, gives up its MIDDLE rather than its end: \"Flytedesk\n * Spr…ement (na)\". CSS can only ellipsise a line's end, so the value is two adjacent spans — a\n * head that shrinks and shows `text-overflow: ellipsis`, and a tail that never does. Side by\n * side they read as one unbroken value whenever it fits, and the element's `textContent` is\n * always the whole value (never the truncated look), which is what a button containing it\n * takes as its accessible name. The caller supplies the hover tooltip (`title`).\n */\nexport function MiddleEllipsis({ text, middle = true }: MiddleEllipsisProps) {\n  const { head, tail } = middle ? splitForMiddleEllipsis(text) : { head: text, tail: \"\" };\n  return (\n    <span className=\"fd-mid-ellipsis\">\n      <span className=\"fd-mid-ellipsis-head\">{head}</span>\n      {tail ? <span className=\"fd-mid-ellipsis-tail\">{tail}</span> : null}\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { Tooltip } from \"../feedback/Tooltip\";\n\nexport interface InfoButtonProps {\n  /** What the explanation is about. The button's accessible name is \"About <label>\". */\n  label: string;\n  /** The explanation, shown in a Tooltip on hover or focus. */\n  info: React.ReactNode;\n}\n\n/**\n * DS-54 — the small info button StatTile draws after its label, exported so a panel heading can\n * carry the same one (a ghost, small `IconButton` with the info icon, wrapped in a `Tooltip`).\n * StatTile renders this component, so there is one copy.\n */\nexport function InfoButton({ label, info }: InfoButtonProps) {\n  return (\n    <Tooltip label={info}>\n      <IconButton icon=\"info\" label={\"About \" + label} variant=\"ghost\" size=\"sm\" />\n    </Tooltip>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * MP-310 — a set of `StatTile`s that wraps only into even rows. `columns` is how many tiles the\n * set holds on a full row; as the grid's OWN container narrows it drops 4 → 2 → 1 (3 → 1, or 2 → 1),\n * never leaving one tile alone on a line, which is what the plain `fd-grid-stats` (an `auto-fit`\n * that fits as many tiles as the width allows) does with four tiles at a width that fits three.\n * Callers that want that fit-as-many behaviour keep using `fd-grid-stats`; it is unchanged.\n *\n * The root is the size container (`container-type: inline-size`, like `FilterBar`'s main\n * column) and the tiles sit in a grid inside it, because a grid cannot query its own width.\n * That makes the column count follow the box the grid is placed in, not the viewport.\n * `className` and every native div attribute go on the root.\n */\nexport interface StatGridProps extends React.HTMLAttributes<HTMLDivElement> {\n  /** Tiles per full row. 4 wraps 4 → 2 → 1; 3 wraps 3 → 1 (never 2 + 1); 2 wraps 2 → 1. */\n  columns: 2 | 3 | 4;\n}\n\nexport function StatGrid({ columns, className = \"\", children, ...rest }: StatGridProps) {\n  return (\n    <div className={[\"fd-stat-grid\", className].filter(Boolean).join(\" \")} {...rest}>\n      <div className=\"fd-stat-grid-tiles\" data-columns={columns}>\n        {children}\n      </div>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { InfoButton } from \"./InfoButton\";\n\n/**\n * A flat figure tile — no shadow, no background color, never more than four in a row.\n * Given `onPress` it becomes a button that can filter a list (MP-311).\n */\ninterface StatTileBaseProps {\n  label: string;\n  value?: React.ReactNode;\n  sub?: React.ReactNode;\n  /** \"+12.4%\" or \"-3.1%\" — the arrow direction always follows the sign (up for a\n   *  positive delta, down for a negative one). Colour follows the sign too, UNLESS\n   *  `invert` is set. */\n  delta?: string;\n  /** Set for a metric where a larger number is the bad outcome (an opt-out rate, an\n   *  error rate, a churn rate, ...) — flips which sign colours as good (ok) vs bad\n   *  (danger), without changing which way the arrow points. A rising opt-out rate is\n   *  still an up arrow (the number really did go up) but rendered in the danger\n   *  colour, not the ok one a plain increase would otherwise get. */\n  invert?: boolean;\n  loading?: boolean;\n  /** Thin one-line variant for stat rows above tables. */\n  compact?: boolean;\n  className?: string;\n  /** Explains the figure. An info button sits right after the label; hovering or focusing it\n   *  shows this in a Tooltip. The tile's own accessible name stays the label. */\n  info?: React.ReactNode;\n}\n\n/** Display mode: a `div`, exactly as before. `pressed` and `disabled` mean nothing without `onPress`. */\nexport interface StatTileDisplayProps extends StatTileBaseProps, React.HTMLAttributes<HTMLDivElement> {\n  onPress?: undefined;\n  pressed?: never;\n  disabled?: never;\n}\n\n/** Press mode: the tile is a real `<button>` with an `aria-pressed` state, so a dashboard's tiles\n *  can filter the list below them. Enter and Space press it (native button behaviour); a pressed\n *  tile wears the brand border and fill. */\nexport interface StatTilePressProps\n  extends StatTileBaseProps,\n    Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"onClick\" | \"type\" | \"disabled\" | \"value\"> {\n  onPress: () => void;\n  /** Whether the list is currently filtered by this tile. Give it (true or false) only for a tile that toggles a filter: it sets `aria-pressed`. Omit it for a tile that acts without a state (it jumps somewhere), which is then a plain button. */\n  pressed?: boolean;\n  /** Shown but cannot be pressed (nothing to go to). A `loading` tile is never pressable either. */\n  disabled?: boolean;\n}\n\nexport type StatTileProps = StatTileDisplayProps | StatTilePressProps;\n\n/** True when `delta`'s numeric magnitude is exactly zero, regardless of\n *  whatever sign prefix (or lack of one) the caller formatted it with —\n *  \"0.0pp\", \"+0.0pp\" and \"-0%\" are all \"no change\", not a real decrease. */\nfunction isZeroDelta(delta: string | undefined): boolean {\n  if (!delta) return false;\n  const match = delta.match(/[\\d.]+/);\n  return match !== null && parseFloat(match[0]) === 0;\n}\n\nexport function StatTile(props: StatTileProps) {\n  const { label, value, sub, delta, invert = false, loading = false, compact = false, className = \"\", info, ...rest } = props;\n  const isDecrease = delta?.startsWith(\"-\") ?? false;\n  const isZero = isZeroDelta(delta);\n  // The arrow always reports the metric's own direction of travel; only the colour\n  // (which side counts as \"good\") flips under `invert`. A zero delta is neither —\n  // it gets its own neutral colour so `invert` can never paint \"no change\" as a\n  // danger-coloured regression.\n  const isGood = invert ? isDecrease : !isDecrease;\n  const deltaToneClass = isZero ? \"fd-stat-delta-neutral\" : isGood ? \"fd-stat-delta-up\" : \"fd-stat-delta-down\";\n\n  const infoButton = info && !loading ? <InfoButton label={label} info={info} /> : null;\n\n  const content = (\n    <>\n      {loading\n        ? <span className=\"fd-skel fd-skel-text\" style={{ display: \"block\", height: compact ? 20 : 28, width: \"62%\" }} />\n        : (\n          <span className=\"fd-stat-top\">\n            <span className=\"fd-stat-figure\">{value}</span>\n            {delta ? (\n              <span className={\"fd-stat-delta \" + deltaToneClass}>\n                <i className={\"ph ph-\" + (isZero ? \"minus\" : \"arrow-\" + (isDecrease ? \"down\" : \"up\") + \"-right\")} aria-hidden=\"true\" /> {delta}\n              </span>\n            ) : null}\n          </span>\n        )}\n      {!loading && sub ? <span className=\"fd-stat-sub\">{sub}</span> : null}\n      {loading\n        ? <span className=\"fd-skel fd-skel-text\" style={{ display: \"block\", height: 10, width: \"40%\", marginTop: 8 }} />\n        : <span className=\"fd-stat-label\" style={{ display: \"block\" }}>{label}{rest.onPress ? null : infoButton}</span>}\n    </>\n  );\n\n  const classes = (...extra: string[]) => [\"fd-stat\", ...extra, compact ? \"fd-stat-compact\" : \"\", className].filter(Boolean).join(\" \");\n  // With an info button in press mode the tile is wrapped, and the wrapper is what a grid places,\n  // so the caller's className goes on it and the button keeps only the tile's own classes.\n  const wrapped = Boolean(rest.onPress && infoButton);\n  const tileClasses = (...extra: string[]) => (wrapped ? [\"fd-stat\", ...extra, compact ? \"fd-stat-compact\" : \"\"].filter(Boolean).join(\" \") : classes(...extra));\n\n  if (rest.onPress) {\n    const { onPress, pressed, disabled = false, ...buttonRest } = rest;\n    const button = (\n      <button type=\"button\" className={tileClasses(\"fd-stat-pressable\")} aria-pressed={pressed} disabled={disabled || loading} onClick={onPress} {...buttonRest}>\n        {content}\n      </button>\n    );\n    if (!infoButton) return button;\n    // DS-49: a <button> cannot hold the info button, so it overlays the tile instead. The\n    // overlay repeats the label invisibly so the info button lands right after the label's\n    // last word, however the label wraps.\n    return (\n      <div className={[\"fd-stat-info-wrap\", compact ? \"is-compact\" : \"\", className].filter(Boolean).join(\" \")}>\n        {button}\n        <div className=\"fd-stat-info-overlay\">\n          <span className=\"fd-stat-label\">\n            <span className=\"fd-stat-label-ghost\" aria-hidden=\"true\">{label}</span>\n            {infoButton}\n          </span>\n        </div>\n      </div>\n    );\n  }\n  return <div className={classes()} {...rest}>{content}</div>;\n}\n","import * as React from \"react\";\nimport { useCopyToClipboard } from \"../../kits/clipboard\";\n\n/* ── highlighting ──────────────────────────────────────────────────────────\n   A small, dependency-free tokenizer. It emits classed spans (real nodes, no\n   HTML strings), so themes live in CSS and there is no injection surface. */\n\nconst JS_KW = /^(?:const|let|var|function|return|if|else|for|while|do|new|class|extends|import|from|export|default|await|async|try|catch|finally|throw|typeof|instanceof|of|in|switch|case|break|continue|delete|void|yield|static|get|set|this|super|interface|type|enum|implements|public|private|protected|readonly|abstract|as|satisfies|declare|namespace)$/;\n\ntype RuleClass = string | null;\ntype Rule = [RegExp, RuleClass | ((t: string) => RuleClass)];\n\nconst RULES: Record<string, Rule[]> = {\n  js: [\n    [/\\/\\/[^\\n]*/y, \"com\"], [/\\/\\*[\\s\\S]*?\\*\\//y, \"com\"],\n    [/`(?:\\\\[\\s\\S]|\\$\\{[^}]*\\}|[^`\\\\])*`?/y, \"str\"],\n    [/'(?:\\\\[\\s\\S]|[^'\\\\\\n])*'?/y, \"str\"], [/\"(?:\\\\[\\s\\S]|[^\"\\\\\\n])*\"?/y, \"str\"],\n    [/\\b(?:true|false|null|undefined|NaN|Infinity)\\b/y, \"lit\"],\n    [/\\b0[xb][0-9a-f_]+\\b|\\b\\d[\\d_]*(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b/iy, \"num\"],\n    [/[A-Za-z_$][\\w$]*/y, (t) => (JS_KW.test(t) ? \"kw\" : /^[A-Z]/.test(t) ? \"type\" : null)],\n    [/[{}()[\\];,.]/y, \"pun\"], [/[+\\-*/%=<>!&|?:^~]+/y, \"op\"],\n  ],\n  py: [\n    [/#[^\\n]*/y, \"com\"],\n    [/\"\"\"[\\s\\S]*?\"\"\"|'''[\\s\\S]*?'''/y, \"str\"],\n    [/f?'(?:\\\\[\\s\\S]|[^'\\\\\\n])*'?|f?\"(?:\\\\[\\s\\S]|[^\"\\\\\\n])*\"?/y, \"str\"],\n    [/\\b(?:True|False|None)\\b/y, \"lit\"],\n    [/\\b\\d[\\d_]*(?:\\.\\d+)?\\b/y, \"num\"],\n    [/@[A-Za-z_][\\w.]*/y, \"fn\"],\n    [/[A-Za-z_][\\w]*/y, (t) => (/^(?:def|class|return|if|elif|else|for|while|import|from|as|with|try|except|finally|raise|lambda|yield|global|nonlocal|assert|pass|break|continue|del|in|is|not|and|or|async|await|self)$/.test(t) ? \"kw\" : /^[A-Z]/.test(t) ? \"type\" : null)],\n    [/[{}()[\\];,.:]/y, \"pun\"], [/[+\\-*/%=<>!&|^~]+/y, \"op\"],\n  ],\n  css: [\n    [/\\/\\*[\\s\\S]*?\\*\\//y, \"com\"],\n    [/'(?:[^'\\\\\\n]|\\\\.)*'|\"(?:[^\"\\\\\\n]|\\\\.)*\"/y, \"str\"],\n    [/--[\\w-]+/y, \"type\"],\n    [/@[\\w-]+/y, \"kw\"],\n    [/#[0-9a-f]{3,8}\\b/iy, \"num\"],\n    [/\\b\\d*\\.?\\d+(?:px|rem|em|%|vh|vw|s|ms|deg|fr|ch)?\\b/y, \"num\"],\n    [/[.#]?[\\w-]+(?=\\s*\\{)/y, \"fn\"],\n    [/[\\w-]+(?=\\s*:)/y, \"prop\"],\n    [/[{}();:,]/y, \"pun\"], [/[>+~*]/y, \"op\"],\n  ],\n  html: [\n    [/<!--[\\s\\S]*?-->/y, \"com\"],\n    [/<\\/?[A-Za-z][\\w-]*/y, \"kw\"],\n    [/'(?:[^'\\\\\\n]|\\\\.)*'|\"(?:[^\"\\\\\\n]|\\\\.)*\"/y, \"str\"],\n    [/[A-Za-z-]+(?==)/y, \"prop\"],\n    [/[<>/=]/y, \"pun\"],\n  ],\n  json: [\n    [/\"(?:\\\\[\\s\\S]|[^\"\\\\])*\"(?=\\s*:)/y, \"prop\"],\n    [/\"(?:\\\\[\\s\\S]|[^\"\\\\])*\"/y, \"str\"],\n    [/\\b(?:true|false|null)\\b/y, \"lit\"],\n    [/-?\\b\\d[\\d.]*(?:e[+-]?\\d+)?\\b/iy, \"num\"],\n    [/[{}[\\],:]/y, \"pun\"],\n  ],\n  sql: [\n    [/--[^\\n]*/y, \"com\"], [/\\/\\*[\\s\\S]*?\\*\\//y, \"com\"],\n    [/'(?:[^'\\\\]|\\\\.|'')*'/y, \"str\"],\n    [/\\b\\d+(?:\\.\\d+)?\\b/y, \"num\"],\n    [/[A-Za-z_][\\w]*/y, (t) => (/^(?:select|from|where|join|left|right|inner|outer|on|group|order|by|having|limit|offset|insert|into|values|update|set|delete|create|table|alter|drop|index|view|with|as|and|or|not|null|is|in|between|like|case|when|then|else|end|distinct|count|sum|avg|min|max|coalesce|cast|union|all|asc|desc)$/i.test(t) ? \"kw\" : null)],\n    [/[(),.;*]/y, \"pun\"], [/[=<>!+\\-/%|]+/y, \"op\"],\n  ],\n  bash: [\n    [/#[^\\n]*/y, \"com\"],\n    [/'[^'\\n]*'|\"(?:[^\"\\\\\\n]|\\\\.)*\"/y, \"str\"],\n    [/\\$\\{?[A-Za-z_][\\w]*\\}?|\\$\\d/y, \"type\"],\n    [/(?:^|\\n)\\s*[a-z_][\\w-]*/y, \"fn\"],\n    [/\\b(?:if|then|fi|else|elif|for|in|do|done|while|case|esac|function|return|export|local|source|echo|cd|set)\\b/y, \"kw\"],\n    [/--?[\\w-]+/y, \"prop\"],\n    [/[|&;()<>]/y, \"pun\"],\n  ],\n  yaml: [\n    [/#[^\\n]*/y, \"com\"],\n    [/^[ \\t]*-?[ \\t]*[\\w.-]+(?=:)/my, \"prop\"],\n    [/'[^'\\n]*'|\"[^\"\\n]*\"/y, \"str\"],\n    [/\\b(?:true|false|null|yes|no)\\b/iy, \"lit\"],\n    [/\\b\\d[\\d.]*\\b/y, \"num\"],\n    [/[:,\\-[\\]{}]/y, \"pun\"],\n  ],\n  generic: [\n    [/\\/\\/[^\\n]*|#[^\\n]*/y, \"com\"],\n    [/'(?:[^'\\\\\\n]|\\\\.)*'|\"(?:[^\"\\\\\\n]|\\\\.)*\"/y, \"str\"],\n    [/\\b\\d[\\d._]*\\b/y, \"num\"],\n    [/[{}()[\\];,.:]/y, \"pun\"],\n  ],\n};\n\nconst ALIAS: Record<string, string> = {\n  javascript: \"js\", jsx: \"js\", ts: \"js\", typescript: \"js\", tsx: \"js\", mjs: \"js\", node: \"js\", vue: \"html\", svelte: \"html\",\n  python: \"py\", scss: \"css\", less: \"css\", sass: \"css\", xml: \"html\", svg: \"html\", htm: \"html\",\n  json5: \"json\", jsonc: \"json\", postgres: \"sql\", psql: \"sql\", mysql: \"sql\",\n  sh: \"bash\", shell: \"bash\", zsh: \"bash\", console: \"bash\", yml: \"yaml\",\n};\n\nexport function languageLabel(lang?: string): string {\n  if (!lang) return \"\";\n  const map: Record<string, string> = { js: \"JavaScript\", jsx: \"JSX\", ts: \"TypeScript\", tsx: \"TSX\", py: \"Python\", python: \"Python\", sh: \"Shell\", bash: \"Shell\", html: \"HTML\", css: \"CSS\", json: \"JSON\", sql: \"SQL\", yaml: \"YAML\", yml: \"YAML\", md: \"Markdown\", diff: \"Diff\", vue: \"Vue\", go: \"Go\", rb: \"Ruby\", php: \"PHP\", java: \"Java\", rust: \"Rust\", swift: \"Swift\", kt: \"Kotlin\", c: \"C\", cpp: \"C++\", cs: \"C#\" };\n  return map[lang.toLowerCase()] || lang.toUpperCase();\n}\n\n/** Tokenise source into [{t, c}] where c is a token class or null for plain text. */\nexport function tokenize(src: string, lang?: string): Array<{ t: string; c: string | null }> {\n  const key = ALIAS[(lang || \"\").toLowerCase()] || (RULES[(lang || \"\").toLowerCase()] ? (lang || \"\").toLowerCase() : \"generic\");\n  const rules = RULES[key] || RULES.generic;\n  const out: Array<{ t: string; c: string | null }> = [];\n  const text = src.length > 24000 ? src.slice(0, 24000) : src;\n  let i = 0, plain = \"\";\n  const flush = () => { if (plain) { out.push({ t: plain, c: null }); plain = \"\"; } };\n  while (i < text.length) {\n    let hit: { t: string; c: string | null } | null = null;\n    for (const [re, cls] of rules) {\n      re.lastIndex = i;\n      const m = re.exec(text);\n      if (m && m.index === i && m[0].length) {\n        const c = typeof cls === \"function\" ? cls(m[0]) : cls;\n        hit = { t: m[0], c };\n        break;\n      }\n    }\n    if (hit) { flush(); out.push(hit); i += hit.t.length; }\n    else { plain += text[i]; i++; }\n  }\n  flush();\n  if (src.length > text.length) out.push({ t: \"\\n… truncated\", c: \"com\" });\n  return out;\n}\n\nfunction Highlighted({ code, lang }: { code: string; lang?: string }) {\n  const toks = React.useMemo(() => tokenize(code, lang), [code, lang]);\n  return <>{toks.map((tk, i) => (tk.c ? <span key={i} className={\"tok-\" + tk.c}>{tk.t}</span> : tk.t))}</>;\n}\n\nexport interface CodeBlockProps {\n  code: string;\n  language?: string;\n  filename?: string;\n  lineNumbers?: boolean;\n  wrap?: boolean;\n  /** Fold past this many lines. 0 disables. Default 26. */\n  collapseAfter?: number;\n  copyable?: boolean;\n  actions?: React.ReactNode;\n  className?: string;\n}\n\n/**\n * A fenced code block: language label, copy, soft-wrap toggle, optional line\n * numbers, and a fold for long listings.\n */\nexport function CodeBlock({\n  code = \"\", language, filename, lineNumbers = false, wrap: wrapDefault = false,\n  collapseAfter = 26, copyable = true, actions, className = \"\",\n}: CodeBlockProps) {\n  const [wrap, setWrap] = React.useState(!!wrapDefault);\n  const [open, setOpen] = React.useState(false);\n  const [copied, copy] = useCopyToClipboard();\n  const body = String(code).replace(/\\n$/, \"\");\n  const lines = body.split(\"\\n\");\n  const foldable = collapseAfter > 0 && lines.length > collapseAfter + 6;\n  const shown = foldable && !open ? lines.slice(0, collapseAfter).join(\"\\n\") : body;\n\n  return (\n    <div className={[\"fd-code\", wrap ? \"is-wrap\" : \"\", className].filter(Boolean).join(\" \")}>\n      <div className=\"fd-code-head\">\n        {filename ? <span className=\"fd-code-file\">{filename}</span> : null}\n        <span className=\"fd-code-lang\">{languageLabel(language)}</span>\n        <span className=\"fd-code-spacer\" />\n        {actions}\n        <button type=\"button\" className=\"fd-code-act\" onClick={() => setWrap((v) => !v)} aria-pressed={wrap} title={wrap ? \"No wrap\" : \"Soft wrap\"}>\n          <i className={\"ph ph-text-\" + (wrap ? \"columns\" : \"align-left\")} aria-hidden=\"true\" />\n        </button>\n        {copyable ? (\n          <button type=\"button\" className={\"fd-code-act\" + (copied ? \" is-done\" : \"\")} onClick={() => copy(body)}>\n            <i className={\"ph ph-\" + (copied ? \"check\" : \"copy\")} aria-hidden=\"true\" />\n            <span>{copied ? \"Copied\" : \"Copy\"}</span>\n          </button>\n        ) : null}\n      </div>\n      <div className=\"fd-code-body\">\n        {lineNumbers ? (\n          <pre className=\"fd-code-gutter\" aria-hidden=\"true\">{shown.split(\"\\n\").map((_, i) => (i + 1) + \"\\n\").join(\"\")}</pre>\n        ) : null}\n        <pre className=\"fd-code-pre\" tabIndex={0}><code><Highlighted code={shown} lang={language} /></code></pre>\n      </div>\n      {foldable ? (\n        <button type=\"button\" className=\"fd-code-fold\" onClick={() => setOpen((v) => !v)} aria-expanded={open}>\n          <i className={\"ph ph-caret-\" + (open ? \"up\" : \"down\")} aria-hidden=\"true\" />\n          {open ? \"Collapse\" : \"Show all \" + lines.length + \" lines\"}\n        </button>\n      ) : null}\n    </div>\n  );\n}\n\nexport interface DiffBlockProps { diff: string; filename?: string; language?: string; collapseAfter?: number; className?: string }\n\n/**\n * A unified diff. Renders +/- lines with their own gutters and a stat line —\n * the shape a code change should always take in a transcript.\n */\nexport function DiffBlock({ diff = \"\", filename, collapseAfter = 34, className = \"\" }: DiffBlockProps) {\n  const [open, setOpen] = React.useState(false);\n  const [copied, copy] = useCopyToClipboard();\n  const raw = String(diff).replace(/\\n$/, \"\");\n  const all = raw.split(\"\\n\").map((line) => {\n    if (/^(?:diff |index |---|\\+\\+\\+)/.test(line)) return { k: \"meta\", line };\n    if (/^@@/.test(line)) return { k: \"hunk\", line };\n    if (line.startsWith(\"+\")) return { k: \"add\", line };\n    if (line.startsWith(\"-\")) return { k: \"del\", line };\n    return { k: \"ctx\", line };\n  });\n  const adds = all.filter((l) => l.k === \"add\").length;\n  const dels = all.filter((l) => l.k === \"del\").length;\n  const foldable = collapseAfter > 0 && all.length > collapseAfter + 6;\n  const rows = foldable && !open ? all.slice(0, collapseAfter) : all;\n\n  return (\n    <div className={[\"fd-code\", \"fd-diff\", className].filter(Boolean).join(\" \")}>\n      <div className=\"fd-code-head\">\n        <i className=\"ph ph-git-diff fd-code-icon\" aria-hidden=\"true\" />\n        {filename ? <span className=\"fd-code-file\">{filename}</span> : <span className=\"fd-code-lang\">Diff</span>}\n        <span className=\"fd-diff-stat fd-tabular\"><span className=\"is-add\">+{adds}</span><span className=\"is-del\">−{dels}</span></span>\n        <span className=\"fd-code-spacer\" />\n        <button type=\"button\" className={\"fd-code-act\" + (copied ? \" is-done\" : \"\")} onClick={() => copy(raw)}>\n          <i className={\"ph ph-\" + (copied ? \"check\" : \"copy\")} aria-hidden=\"true\" />\n          <span>{copied ? \"Copied\" : \"Copy\"}</span>\n        </button>\n      </div>\n      <div className=\"fd-diff-body\">\n        {rows.map((r, i) => (\n          <div key={i} className={\"fd-diff-line is-\" + r.k}>\n            <span className=\"fd-diff-mark\" aria-hidden=\"true\">{r.k === \"add\" ? \"+\" : r.k === \"del\" ? \"−\" : \"\"}</span>\n            <code>{r.k === \"add\" || r.k === \"del\" ? r.line.slice(1) : r.line}</code>\n          </div>\n        ))}\n      </div>\n      {foldable ? (\n        <button type=\"button\" className=\"fd-code-fold\" onClick={() => setOpen((v) => !v)} aria-expanded={open}>\n          <i className={\"ph ph-caret-\" + (open ? \"up\" : \"down\")} aria-hidden=\"true\" />\n          {open ? \"Collapse\" : \"Show all \" + all.length + \" lines\"}\n        </button>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { CodeBlock, DiffBlock } from \"./CodeBlock\";\nimport type { CodeBlockProps } from \"./CodeBlock\";\nimport { hideEscapes, showEscapes, showEscapesRaw } from \"./markdownEscape\";\nexport { markdownToText } from \"./markdownEscape\";\n\n/* ── inline ────────────────────────────────────────────────────────────────\n   Everything renders to real React nodes. There is no HTML-string path, so the\n   injection surface is closed by construction rather than by escaping. */\n\nconst SAFE = /^(?:https?:|mailto:|tel:|#|\\/|\\.{1,2}\\/)/i;\nconst safeHref = (h: unknown): string | null => (SAFE.test(String(h || \"\").trim()) ? String(h).trim() : null);\n\nconst INLINE: Array<[string, RegExp]> = [\n  [\"code\", /`([^`\\n]+)`/],\n  [\"image\", /!\\[([^\\]]*)\\]\\(([^)\\s]+)(?:\\s+\"([^\"]*)\")?\\)/],\n  [\"link\", /\\[([^\\]]+)\\]\\(([^)\\s]+)(?:\\s+\"([^\"]*)\")?\\)/],\n  [\"cite\", /\\[\\^([\\w.-]+)\\]/],\n  [\"strongem\", /\\*\\*\\*([^*]+)\\*\\*\\*/],\n  [\"strong\", /\\*\\*([^*]+?)\\*\\*|__([^_]+?)__/],\n  [\"em\", /(?<![A-Za-z0-9])\\*([^*\\n]+?)\\*(?![A-Za-z0-9])|(?<![A-Za-z0-9_])_([^_\\n]+?)_(?![A-Za-z0-9_])/],\n  [\"del\", /~~([^~]+)~~/],\n  [\"autolink\", /<((?:https?:\\/\\/|mailto:)[^>\\s]+)>/],\n  [\"bare\", /(?<![\\w@/])(https?:\\/\\/[^\\s<>()]+[^\\s<>().,;:!?])/],\n];\n\ninterface MdCtx {\n  allowImages?: boolean;\n  headingOffset?: number;\n  renderCitation?: (marker: string) => React.ReactNode;\n  onLinkClick?: (e: React.MouseEvent) => void;\n  codeProps?: Partial<CodeBlockProps>;\n}\n\nfunction inlineNodes(src: string | null | undefined, ctx: MdCtx, keyBase: string): React.ReactNode[] {\n  return hiddenInlineNodes(hideEscapes(String(src == null ? \"\" : src)), ctx, keyBase);\n}\n\n/* DS-14: nested nodes receive text whose escapes are already hidden; hiding again would turn the stand-ins into U+FFFD. */\nfunction hiddenInlineNodes(hidden: string, ctx: MdCtx, keyBase: string): React.ReactNode[] {\n  const out: React.ReactNode[] = [];\n  let rest = hidden, guard = 0;\n  const d = showEscapes;\n  const key = () => keyBase + \"-\" + out.length;\n  while (rest && guard++ < 800) {\n    let best: { kind: string; m: RegExpExecArray } | null = null;\n    for (const [kind, re] of INLINE) {\n      const m = re.exec(rest);\n      if (m && (!best || m.index < best.m.index)) best = { kind, m };\n      if (best && best.m.index === 0) break;\n    }\n    if (!best) break;\n    const { kind, m } = best;\n    if (m.index > 0) out.push(d(rest.slice(0, m.index)));\n    const g = (i: number) => m[i];\n    if (kind === \"code\") out.push(<code key={key()} className=\"fd-md-code\">{showEscapesRaw(g(1))}</code>);\n    else if (kind === \"image\") {\n      const src2 = safeHref(d(g(2)));\n      out.push(ctx.allowImages && src2\n        ? <img key={key()} className=\"fd-md-img\" src={src2} alt={d(g(1) || \"\")} title={g(3) ? d(g(3)) : undefined} loading=\"lazy\" />\n        : <span key={key()} className=\"fd-md-imgalt\">{d(g(1) || \"image\")}</span>);\n    } else if (kind === \"link\") {\n      const href = safeHref(d(g(2)));\n      out.push(href\n        ? <a key={key()} href={href} title={g(3) ? d(g(3)) : undefined} target={/^https?:/i.test(href) ? \"_blank\" : undefined} rel=\"noopener noreferrer\" onClick={ctx.onLinkClick}>{hiddenInlineNodes(g(1), ctx, key())}</a>\n        : <span key={key()}>{d(g(1))}</span>);\n    } else if (kind === \"cite\") {\n      out.push(ctx.renderCitation ? <React.Fragment key={key()}>{ctx.renderCitation(d(g(1)))}</React.Fragment> : <sup key={key()} className=\"fd-md-cite\">{d(g(1))}</sup>);\n    } else if (kind === \"strongem\") out.push(<strong key={key()}><em>{hiddenInlineNodes(g(1), ctx, key())}</em></strong>);\n    else if (kind === \"strong\") out.push(<strong key={key()}>{hiddenInlineNodes(g(1) || g(2), ctx, key())}</strong>);\n    else if (kind === \"em\") out.push(<em key={key()}>{hiddenInlineNodes(g(1) || g(2), ctx, key())}</em>);\n    else if (kind === \"del\") out.push(<del key={key()}>{hiddenInlineNodes(g(1), ctx, key())}</del>);\n    else if (kind === \"autolink\" || kind === \"bare\") {\n      const href = safeHref(d(g(1)));\n      out.push(href ? <a key={key()} href={href} target=\"_blank\" rel=\"noopener noreferrer\" onClick={ctx.onLinkClick}>{d(g(1)).replace(/^mailto:/, \"\")}</a> : d(g(1)));\n    }\n    rest = rest.slice(m.index + m[0].length);\n  }\n  if (rest) out.push(d(rest));\n  return out;\n}\n\n/* ── blocks ────────────────────────────────────────────────────────────── */\n\nconst RE = {\n  fence: /^(\\s*)(`{3,}|~{3,})\\s*([\\w+#-]*)\\s*(?::\\s*(\\S+))?\\s*$/,\n  heading: /^(#{1,6})\\s+(.*)$/,\n  hr: /^\\s*(?:[-*_]\\s*){3,}$/,\n  quote: /^\\s*>\\s?(.*)$/,\n  li: /^(\\s*)([-*+]|\\d{1,3}[.)])\\s+(.*)$/,\n  task: /^\\[([ xX])\\]\\s+(.*)$/,\n  tableSep: /^\\s*\\|?[\\s:|-]*-[\\s:|-]*\\|?\\s*$/,\n};\n\n/* A pipe preceded by a backslash belongs to the cell (GFM `\\\\|`); the backslash stays for inline parsing. */\nconst splitRow = (line: string): string[] => {\n  const t = line.trim();\n  const cells: string[] = [];\n  let cur = \"\";\n  for (let i = t.startsWith(\"|\") ? 1 : 0; i < t.length; i++) {\n    const c = t[i];\n    if (c === \"\\\\\" && i + 1 < t.length) { cur += c + t[++i]; continue; }\n    if (c === \"|\") { cells.push(cur.trim()); cur = \"\"; continue; }\n    cur += c;\n  }\n  if (cur.trim() || !t.endsWith(\"|\")) cells.push(cur.trim());\n  return cells;\n};\n\ntype ListItem = { checked?: boolean; children: Block[] };\n\ntype Block =\n  | { t: \"code\"; lang: string; file: string; code: string }\n  | { t: \"h\"; level: number; text: string }\n  | { t: \"hr\" }\n  | { t: \"quote\"; children: Block[] }\n  | { t: \"list\"; ordered: boolean; start: number; items: ListItem[] }\n  | { t: \"table\"; head: string[]; align: string[]; rows: string[][] }\n  | { t: \"p\"; text: string };\n\nfunction parseBlocks(src: string): Block[] {\n  const lines = String(src == null ? \"\" : src).replace(/\\r\\n?/g, \"\\n\").split(\"\\n\");\n  const blocks: Block[] = [];\n  let i = 0;\n  while (i < lines.length) {\n    const line = lines[i];\n    if (!line.trim()) { i++; continue; }\n\n    const f = RE.fence.exec(line);\n    if (f) {\n      const close = new RegExp(\"^\\\\s*\" + f[2][0] + \"{\" + f[2].length + \",}\\\\s*$\");\n      const buf: string[] = [];\n      i++;\n      while (i < lines.length && !close.test(lines[i])) buf.push(lines[i++]);\n      i++;\n      blocks.push({ t: \"code\", lang: f[3] || \"\", file: f[4] || \"\", code: buf.join(\"\\n\") });\n      continue;\n    }\n    const h = RE.heading.exec(line);\n    if (h) { blocks.push({ t: \"h\", level: h[1].length, text: h[2] }); i++; continue; }\n    if (RE.hr.test(line)) { blocks.push({ t: \"hr\" }); i++; continue; }\n    if (RE.quote.test(line)) {\n      const buf: string[] = [];\n      while (i < lines.length && (RE.quote.test(lines[i]) || (lines[i].trim() && buf.length && !RE.li.test(lines[i]) && !RE.fence.test(lines[i])))) {\n        const q = RE.quote.exec(lines[i]);\n        buf.push(q ? q[1] : lines[i].trim());\n        i++;\n      }\n      blocks.push({ t: \"quote\", children: parseBlocks(buf.join(\"\\n\")) });\n      continue;\n    }\n    if (line.includes(\"|\") && lines[i + 1] != null && RE.tableSep.test(lines[i + 1]) && lines[i + 1].includes(\"-\")) {\n      const head = splitRow(line);\n      const align = splitRow(lines[i + 1]).map((c) => (/^:-+:$/.test(c) ? \"center\" : /-+:$/.test(c) ? \"right\" : \"left\"));\n      i += 2;\n      const rows: string[][] = [];\n      while (i < lines.length && lines[i].includes(\"|\") && lines[i].trim()) rows.push(splitRow(lines[i++]));\n      blocks.push({ t: \"table\", head, align, rows });\n      continue;\n    }\n    if (RE.li.test(line)) {\n      const items: { raw: string[] }[] = [];\n      const baseIndent = RE.li.exec(line)![1].length;\n      const ordered = /\\d/.test(RE.li.exec(line)![2]);\n      const start = ordered ? parseInt(RE.li.exec(line)![2], 10) : 1;\n      while (i < lines.length) {\n        const m = RE.li.exec(lines[i]);\n        if (!m || m[1].length < baseIndent) {\n          if (items.length && lines[i] && lines[i].trim() && lines[i].search(/\\S/) > baseIndent) { items[items.length - 1].raw.push(lines[i].trim()); i++; continue; }\n          break;\n        }\n        if (m[1].length > baseIndent) { items[items.length - 1].raw.push(lines[i].slice(baseIndent + 2)); i++; continue; }\n        if (ordered !== /\\d/.test(m[2])) break;\n        items.push({ raw: [m[3]] });\n        i++;\n        while (i < lines.length && lines[i].trim() && !RE.li.test(lines[i]) && lines[i].search(/\\S/) > baseIndent) { items[items.length - 1].raw.push(lines[i].trim()); i++; }\n      }\n      blocks.push({\n        t: \"list\", ordered, start,\n        items: items.map((it) => {\n          const joined = it.raw.join(\"\\n\");\n          const task = RE.task.exec(joined);\n          return task\n            ? { checked: task[1].toLowerCase() === \"x\", children: parseBlocks(task[2]) }\n            : { children: parseBlocks(joined) };\n        }),\n      });\n      continue;\n    }\n    const buf: string[] = [];\n    while (i < lines.length && lines[i].trim() && !RE.fence.test(lines[i]) && !RE.heading.test(lines[i]) && !RE.hr.test(lines[i]) && !RE.quote.test(lines[i]) && !RE.li.test(lines[i])) buf.push(lines[i++]);\n    blocks.push({ t: \"p\", text: buf.join(\"\\n\") });\n  }\n  return blocks;\n}\n\nfunction renderBlocks(blocks: Block[], ctx: MdCtx, path: string): React.ReactNode[] {\n  return blocks.map((b, i) => {\n    const k = path + \"-\" + i;\n    switch (b.t) {\n      case \"code\": {\n        if ((b.lang || \"\").toLowerCase() === \"diff\") return <DiffBlock key={k} diff={b.code} filename={b.file || undefined} />;\n        return <CodeBlock key={k} code={b.code} language={b.lang} filename={b.file || undefined} {...(ctx.codeProps || {})} />;\n      }\n      case \"h\": {\n        const lvl = Math.min(6, Math.max(1, b.level + (ctx.headingOffset || 0)));\n        const Tag = (\"h\" + lvl) as React.ElementType;\n        return <Tag key={k} className={\"fd-md-h fd-md-h\" + lvl}>{inlineNodes(b.text, ctx, k)}</Tag>;\n      }\n      case \"hr\": return <hr key={k} className=\"fd-md-hr\" />;\n      case \"quote\": return <blockquote key={k} className=\"fd-md-quote\">{renderBlocks(b.children, ctx, k)}</blockquote>;\n      case \"list\": {\n        const Tag = (b.ordered ? \"ol\" : \"ul\") as React.ElementType;\n        const isTask = b.items.some((it) => it.checked != null);\n        return (\n          <Tag key={k} className={\"fd-md-list\" + (isTask ? \" is-task\" : \"\")} start={b.ordered && b.start !== 1 ? b.start : undefined}>\n            {b.items.map((it, j) => (\n              <li key={k + \"-\" + j} className={it.checked != null ? (it.checked ? \"is-done\" : \"is-todo\") : undefined}>\n                {it.checked != null ? (\n                  <span className=\"fd-md-task\" aria-hidden=\"true\"><i className={\"ph ph-\" + (it.checked ? \"check-square\" : \"square\")} /></span>\n                ) : null}\n                <span className=\"fd-md-li\">{renderBlocks(it.children, ctx, k + \"-\" + j)}</span>\n              </li>\n            ))}\n          </Tag>\n        );\n      }\n      case \"table\":\n        return (\n          <div key={k} className=\"fd-md-tablewrap\">\n            <table className=\"fd-md-table\">\n              <thead><tr>{b.head.map((c, j) => <th key={j} style={{ textAlign: (b.align[j] || \"left\") as React.CSSProperties[\"textAlign\"] }}>{inlineNodes(c, ctx, k + \"h\" + j)}</th>)}</tr></thead>\n              <tbody>\n                {b.rows.map((r, ri) => (\n                  <tr key={ri}>{b.head.map((_, ci) => <td key={ci} style={{ textAlign: (b.align[ci] || \"left\") as React.CSSProperties[\"textAlign\"] }}>{inlineNodes(r[ci] || \"\", ctx, k + ri + \"c\" + ci)}</td>)}</tr>\n                ))}\n              </tbody>\n            </table>\n          </div>\n        );\n      default:\n        return <p key={k} className=\"fd-md-p\">{inlineNodes(b.text, ctx, k)}</p>;\n    }\n  });\n}\n\nexport interface MarkdownProps {\n  source: string;\n  className?: string;\n  codeProps?: Partial<CodeBlockProps>;\n  allowImages?: boolean;\n  headingOffset?: number;\n  /** Renderer for `[^n]` markers. */\n  renderCitation?: (marker: string) => React.ReactNode;\n  onLinkClick?: (e: React.MouseEvent) => void;\n  /** `body` (default) or `small`. */\n  size?: MarkdownSize;\n  /** `default` or `muted` (secondary text colour). */\n  tone?: MarkdownTone;\n}\n\nexport type MarkdownSize = \"body\" | \"small\";\nexport type MarkdownTone = \"default\" | \"muted\";\n\nconst mdClass = (base: string, size: MarkdownSize | undefined, tone: MarkdownTone | undefined, className: string) =>\n  [base, size && `${base}--${size}`, tone === \"muted\" && `${base}--muted`, className].filter(Boolean).join(\" \");\n\n/**\n * Read-only markdown → React nodes. Headings, emphasis, links, lists (incl. task\n * lists), quotes, tables, images, fenced code (handed to CodeBlock, `diff` to\n * DiffBlock) and `[^n]` citation markers.\n *\n * Deliberately read-only: an editor in readonly mode carries a contenteditable,\n * a context menu and popovers it will never use — per message.\n */\nexport function Markdown({\n  source = \"\", className = \"\", codeProps, allowImages = true,\n  headingOffset = 0, renderCitation, onLinkClick, size = \"body\", tone = \"default\",\n}: MarkdownProps) {\n  const ctx: MdCtx = { allowImages, headingOffset, renderCitation, onLinkClick, codeProps };\n  const blocks = React.useMemo(() => parseBlocks(source), [source]);\n  return <div className={mdClass(\"fd-md\", size, tone, className)}>{renderBlocks(blocks, ctx, \"b\")}</div>;\n}\n\n/** Inline-only markdown, for labels and single-line contexts. */\nexport function MarkdownInline({ source = \"\", className = \"\", onLinkClick, size, tone }: { source: string; className?: string; onLinkClick?: (e: React.MouseEvent) => void; size?: MarkdownSize; tone?: MarkdownTone }) {\n  return <span className={mdClass(\"fd-md-inline\", size, tone, className)}>{inlineNodes(source, { allowImages: false, onLinkClick }, \"i\")}</span>;\n}\n","/* DS-7: the one definition of the markdown escape rule, shared by the renderer\n   (Markdown.tsx) and by `escapeMarkdown` (a React-free entry, so a server can import it). */\n\n/** CommonMark: a backslash before any ASCII punctuation character makes it literal. */\nexport const ESCAPABLE = /\\\\([!-/:-@[-`{-~])/g;\n\n/* An escaped character is swapped for a private-use stand-in (U+E000 + its code) before any\n   syntax pattern runs, so no pattern can see it, then swapped back where text is emitted. */\nconst STAND_IN_BASE = 0xe000;\nconst STAND_IN = /[-]/g;\n\n/** Hide every escaped character from the syntax patterns. Stray stand-ins already in the input are neutralised first. */\nexport const hideEscapes = (s: string): string =>\n  s.replace(STAND_IN, \"�\").replace(ESCAPABLE, (_, c: string) => String.fromCharCode(STAND_IN_BASE + c.charCodeAt(0)));\n\n/** Put escaped characters back as the literal character. */\nexport const showEscapes = (s: string): string => s.replace(STAND_IN, (c) => String.fromCharCode(c.charCodeAt(0) - STAND_IN_BASE));\n\n/** Put escaped characters back with their backslash (a code span keeps its source verbatim). */\nexport const showEscapesRaw = (s: string): string => s.replace(STAND_IN, (c) => \"\\\\\" + String.fromCharCode(c.charCodeAt(0) - STAND_IN_BASE));\n\n/**\n * Backslash-escape text so `Markdown` / `MarkdownInline` render it as exactly that text:\n * every character the renderer reads as inline syntax, the `:` that starts a bare-URL or\n * mailto autolink, and any block marker (heading, quote, list, rule, table, fence) at the\n * start of a line.\n */\nexport function escapeMarkdown(text: string): string {\n  return String(text == null ? \"\" : text)\n    .replace(/\\r\\n?/g, \"\\n\")\n    .replace(/[\\\\`*_[\\]()<>!|~^]/g, \"\\\\$&\")\n    .replace(/\\b(https?|mailto|tel):/gi, \"$1\\\\:\")\n    .split(\"\\n\")\n    .map((line) =>\n      line\n        // heading, quote, bullet, rule, fence-like markers: escape the first marker character\n        .replace(/^(\\s*)([#>+-])/, \"$1\\\\$2\")\n        // ordered list: escape the dot or paren after the number\n        .replace(/^(\\s*\\d{1,9})([.)])/, \"$1\\\\$2\")\n        // task item `[ ]` is already covered by escaping `[`\n    )\n    .join(\"\\n\");\n}\n\nconst TABLE_ROW = /^\\s*\\|.*\\|\\s*$/;\nconst TABLE_SEPARATOR = /^\\s*\\|(\\s*:?-{3,}:?\\s*\\|)+\\s*$/;\nconst LIST_MARKER = /^\\s*(?:[-*+]|\\d{1,9}[.)])\\s+/;\n\n/* DS-12: table pipes, the separator row and list markers are layout, not words. Escaped pipes\n   and markers are already hidden, so they stay literal. Fenced code is left untouched. */\nfunction stripBlockSyntax(s: string): string {\n  let inFence = false;\n  return s\n    .split(\"\\n\")\n    .flatMap((line) => {\n      if (/^\\s*```/.test(line)) inFence = !inFence;\n      if (inFence || /^\\s*```/.test(line)) return [line];\n      if (TABLE_SEPARATOR.test(line)) return [];\n      if (TABLE_ROW.test(line)) {\n        return [line.trim().slice(1, -1).split(\"|\").map((c) => c.trim()).filter(Boolean).join(\" \")];\n      }\n      return [line.replace(LIST_MARKER, \"\")];\n    })\n    .join(\"\\n\");\n}\n\n/**\n * Strip markdown to the plain text the renderer shows — for search, copy actions, titles and\n * previews. Escaped characters become literal text; only real syntax is removed, so\n * `markdownToText(escapeMarkdown(x)) === x`. A code span keeps its source verbatim.\n */\nexport function markdownToText(src: string): string {\n  return showEscapes(\n    stripBlockSyntax(hideEscapes(String(src == null ? \"\" : src)))\n      .replace(/```[\\w+#-]*\\n?([\\s\\S]*?)```/g, (_, c: string) => showEscapesRaw(c))\n      .replace(/`([^`]+)`/g, (_, c: string) => showEscapesRaw(c))\n      .replace(/!\\[([^\\]]*)\\]\\([^)]*\\)/g, \"$1\")\n      .replace(/\\[([^\\]]+)\\]\\([^)]*\\)/g, \"$1\")\n      .replace(/^\\s{0,3}#{1,6}\\s+/gm, \"\")\n      .replace(/\\*\\*\\*([^*]+)\\*\\*\\*|\\*\\*([^*]+)\\*\\*|__([^_]+)__/g, \"$1$2$3\")\n      .replace(/(^|\\W)[*_]([^*_\\n]+)[*_](\\W|$)/g, \"$1$2$3\")\n      .replace(/~~([^~]+)~~/g, \"$1\")\n      .replace(/^\\s*>\\s?/gm, \"\")\n      .trim(),\n  );\n}\n","\n/**\n * A segmented bar — budget split by channel, delivery against a flight.\n * Unallocated space is hatched, so it looks unfinished rather than empty.\n */\nexport interface MeterSegment {\n  label: string;\n  value: number;\n  /** Defaults to the categorical chart ramp in order. */\n  color?: string;\n}\nexport interface MeterProps {\n  segments: MeterSegment[];\n  unallocated?: number;\n  height?: number;\n  label?: string;\n  legend?: boolean;\n  className?: string;\n}\n\nexport function Meter({ segments = [], unallocated = 0, height = 8, label, legend = false, className = \"\" }: MeterProps) {\n  const total = segments.reduce((s, x) => s + x.value, 0) + unallocated;\n  const pct = (v: number) => (total ? (v / total) * 100 : 0);\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 8 }}>\n      {label ? <span className=\"fd-label-lg fd-secondary\">{label}</span> : null}\n      <div className=\"fd-meterbar\" style={{ height }}>\n        {segments.map((s, i) => (\n          <span key={i} className=\"fd-meterbar-seg\" title={s.label}\n            style={{ width: pct(s.value) + \"%\", background: s.color || \"var(--chart-\" + ((i % 8) + 1) + \")\", transition: \"width var(--dur-slow) var(--ease)\" }} />\n        ))}\n        {unallocated > 0 ? <span className=\"fd-meterbar-seg fd-meterbar-unallocated\" title=\"Unallocated\" style={{ width: pct(unallocated) + \"%\" }} /> : null}\n      </div>\n      {legend ? (\n        <div className=\"fd-row\" style={{ gap: 16, flexWrap: \"wrap\" }}>\n          {segments.map((s, i) => (\n            <span key={i} className=\"fd-row fd-body-sm fd-secondary\" style={{ gap: 7 }}>\n              <span style={{ width: 9, height: 9, borderRadius: 2, background: s.color || \"var(--chart-\" + ((i % 8) + 1) + \")\" }} />\n              {s.label}\n            </span>\n          ))}\n          {unallocated > 0 ? (\n            <span className=\"fd-row fd-body-sm fd-secondary\" style={{ gap: 7 }}>\n              <span className=\"fd-meterbar-unallocated\" style={{ width: 9, height: 9, borderRadius: 2 }} />Unallocated\n            </span>\n          ) : null}\n        </div>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/** The one place this package pluralizes a caller-supplied noun for a count,\n *  exported so consumers use it too rather than keeping their own copy. Callers\n *  pass the singular form, plus the plural when it isn't a bare \"+s\" (e.g.\n *  \"campus\" / \"campuses\", \"entry\" / \"entries\"); `Intl.PluralRules` decides one vs.\n *  other from `n`, so 0 and 2+ are plural and 1 is singular. */\nconst unitPluralRules = new Intl.PluralRules(\"en-US\");\nexport function pluralizeUnit(n: number, singular: string, irregularPlural?: string): string {\n  return unitPluralRules.select(n) === \"one\" ? singular : (irregularPlural ?? `${singular}s`);\n}\n\n/**\n * The standard footer for a server-driven table: range readout, rows-per-page,\n * and windowed page navigation. Presentational only — it holds no state.\n */\nexport interface PaginationProps extends React.HTMLAttributes<HTMLDivElement> {\n  /** 1-indexed current page. */\n  page?: number;\n  pageSize?: number;\n  /** Total matching rows on the server, not the length of the current page. */\n  total?: number;\n  pageSizes?: number[];\n  onPageChange?: (page: number) => void;\n  /** Omit to hide the rows-per-page control. */\n  onPageSizeChange?: (pageSize: number) => void;\n  loading?: boolean;\n  /** Singular noun for the readout — \"row\", \"campus\", \"placement\". The\n   *  component renders it singular or plural itself based on `total`. */\n  unit?: string;\n  /** Irregular plural for `unit`, when it isn't a bare \"+s\" — e.g. \"campuses\"\n   *  for \"campus\". Omit when the regular plural is correct. */\n  unitPlural?: string;\n  className?: string;\n}\n\n/**\n * Pagination — the standard footer for every server-driven table.\n * Purely presentational: it reports intent through onPageChange / onPageSizeChange\n * and never derives its own state, so it stays honest against a real endpoint.\n */\nexport function Pagination({\n  page = 1, pageSize = 25, total = 0, pageSizes = [10, 25, 50, 100],\n  onPageChange, onPageSizeChange, loading = false, unit = \"row\", unitPlural, className = \"\", ...rest\n}: PaginationProps) {\n  const totalPages = Math.max(1, Math.ceil(total / pageSize));\n  const from = total === 0 ? 0 : (page - 1) * pageSize + 1;\n  const to = Math.min(total, page * pageSize);\n  const go = (p: number) => { if (onPageChange && p >= 1 && p <= totalPages && p !== page) onPageChange(p); };\n  const unitLabel = pluralizeUnit(total, unit, unitPlural);\n\n  const nums: (number | string)[] = [];\n  const span = 1;\n  for (let i = 1; i <= totalPages; i++) {\n    if (i === 1 || i === totalPages || Math.abs(i - page) <= span) nums.push(i);\n    else if (nums[nums.length - 1] !== \"…\") nums.push(\"…\");\n  }\n\n  return (\n    <div className={[\"fd-pag\", className].filter(Boolean).join(\" \")} {...rest}>\n      <span className=\"fd-pag-count\">\n        {loading ? <span className=\"fd-skel fd-skel-text\" style={{ display: \"inline-block\", height: 12, width: 108 }} />\n          : total === 0 ? <>No {unitLabel}</> : <><strong>{from.toLocaleString()}–{to.toLocaleString()}</strong> of {total.toLocaleString()} {unitLabel}</>}\n      </span>\n      {onPageSizeChange ? (\n        <label className=\"fd-pag-size\">\n          <span>Rows</span>\n          <select value={pageSize} onChange={(e) => onPageSizeChange(Number(e.target.value))} aria-label=\"Rows per page\">\n            {pageSizes.map((n) => <option key={n} value={n}>{n}</option>)}\n          </select>\n        </label>\n      ) : null}\n      <span className=\"fd-pag-nav\">\n        <button type=\"button\" onClick={() => go(1)} disabled={page <= 1} aria-label=\"First page\"><i className=\"ph ph-caret-double-left\" /></button>\n        <button type=\"button\" onClick={() => go(page - 1)} disabled={page <= 1} aria-label=\"Previous page\"><i className=\"ph ph-caret-left\" /></button>\n        {nums.map((n, i) => n === \"…\"\n          ? <span key={\"e\" + i} className=\"fd-pag-gap\" aria-hidden=\"true\">…</span>\n          : <button key={n} type=\"button\" onClick={() => go(n as number)} aria-current={n === page ? \"page\" : undefined}\n              className={n === page ? \"is-current\" : \"\"}>{n}</button>)}\n        <button type=\"button\" onClick={() => go(page + 1)} disabled={page >= totalPages} aria-label=\"Next page\"><i className=\"ph ph-caret-right\" /></button>\n        <button type=\"button\" onClick={() => go(totalPages)} disabled={page >= totalPages} aria-label=\"Last page\"><i className=\"ph ph-caret-double-right\" /></button>\n      </span>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nconst MIN = 60e3, HOUR = 36e5, DAY = 864e5;\n\n/** \"just now\" · \"4 min ago\" · \"in 4 min\" · \"Wed 5:00 PM\" · \"12 Mar\" */\nexport function formatRelative(value: string | Date, now?: number): string {\n  const t = value instanceof Date ? value.getTime() : Date.parse(value);\n  if (!t || isNaN(t)) return \"\";\n  const ref = now || Date.now();\n  const diff = t - ref;\n  const abs = Math.abs(diff);\n  const future = diff > 0;\n  if (abs < 45e3) return future ? \"in a moment\" : \"just now\";\n  if (abs < HOUR) { const m = Math.round(abs / MIN); return future ? \"in \" + m + \" min\" : m + \" min ago\"; }\n  if (abs < 6 * HOUR) {\n    const h = Math.floor(abs / HOUR), m = Math.round((abs % HOUR) / MIN);\n    const s = h + \"h\" + (m ? \" \" + m + \"m\" : \"\");\n    return future ? \"in \" + s : s + \" ago\";\n  }\n  const d = new Date(t);\n  const sameDay = new Date(ref).toDateString() === d.toDateString();\n  const time = d.toLocaleTimeString([], { hour: \"numeric\", minute: \"2-digit\" });\n  if (sameDay) return time;\n  if (abs < 6 * DAY) return d.toLocaleDateString([], { weekday: \"short\" }) + \" \" + time;\n  return d.toLocaleDateString([], { day: \"numeric\", month: \"short\" });\n}\n\n/** Absolute, for the title attribute. */\nexport function formatAbsolute(value: string | Date): string {\n  const t = value instanceof Date ? value.getTime() : Date.parse(value);\n  if (!t || isNaN(t)) return \"\";\n  return new Date(t).toLocaleString([], { dateStyle: \"medium\", timeStyle: \"short\" });\n}\n\n/** Clock time only — \"3:42 PM\". */\nexport function formatClock(value: string | Date): string {\n  const t = value instanceof Date ? value.getTime() : Date.parse(value);\n  if (!t || isNaN(t)) return \"\";\n  return new Date(t).toLocaleTimeString([], { hour: \"numeric\", minute: \"2-digit\" });\n}\n\n/** ms → \"1m 34s\" · \"12.4s\" · \"840ms\" */\nexport function formatDuration(ms: number): string {\n  if (ms == null || isNaN(ms)) return \"\";\n  if (ms < 1000) return Math.round(ms) + \"ms\";\n  if (ms < 60e3) { const s = ms / 1000; return (s < 10 ? s.toFixed(1) : Math.round(s)) + \"s\"; }\n  const m = Math.floor(ms / 60e3), s = Math.round((ms % 60e3) / 1000);\n  if (m < 60) return m + \"m\" + (s ? \" \" + s + \"s\" : \"\");\n  const h = Math.floor(m / 60);\n  return h + \"h\" + (m % 60 ? \" \" + (m % 60) + \"m\" : \"\");\n}\n\nexport interface RelativeTimeProps { value: string | Date; prefix?: string; refresh?: boolean; className?: string }\n\n/**\n * A self-refreshing relative timestamp. Ticks no faster than the unit it shows,\n * and stops entirely once the value is days old.\n */\nexport function RelativeTime({ value, prefix, className = \"\", refresh = true, ...rest }: RelativeTimeProps) {\n  const [, force] = React.useState(0);\n  const t = value instanceof Date ? value.getTime() : Date.parse(value);\n  React.useEffect(() => {\n    if (!refresh || !t || isNaN(t)) return;\n    const abs = Math.abs(t - Date.now());\n    if (abs > DAY) return;\n    const every = abs < HOUR ? 15e3 : 60e3;\n    const id = setInterval(() => force((n) => n + 1), every);\n    return () => clearInterval(id);\n  }, [t, refresh]);\n  if (!t || isNaN(t)) return null;\n  return (\n    <time className={className} dateTime={new Date(t).toISOString()} title={formatAbsolute(new Date(t))} {...rest}>\n      {prefix ? prefix + \" \" : \"\"}{formatRelative(new Date(t))}\n    </time>\n  );\n}\n","import * as React from \"react\";\nimport { Popover, type Placement } from \"../actions/Popover\";\nimport { SegmentedMeter, type MeterSegmentInput } from \"./SegmentedMeter\";\n\nexport interface ScoreMeterProps {\n  /** The score itself, 0-100. Shown as a plain integer next to the rail. */\n  score: number;\n  /** One segment per contributing thing, each already carrying its own colour. Widths\n   *  are proportional to `value` out of 100, so what doesn't contribute reads as the\n   *  empty remainder of the rail rather than as a missing segment. */\n  segments: MeterSegmentInput[];\n  /** Accessible name for the meter, e.g. \"Preference score\". Required — a bare bar with\n   *  a number next to it is meaningless to a screen reader without one. */\n  label: string;\n  /** Rail width in px. A fixed width (not a flexing one) is what lets a column of these\n   *  line up down a list. */\n  width?: number;\n  height?: number;\n  /** Hide the numeral and show only the rail, for somewhere the number is already said. */\n  showScore?: boolean;\n  /** Content of the breakdown popover. Supplying it is what makes the meter clickable —\n   *  without it this renders as a plain, inert span. */\n  breakdown?: React.ReactNode;\n  /** Accessible name for the popover. Defaults to `label` + \" breakdown\". */\n  breakdownLabel?: string;\n  placement?: Placement;\n  /** Width of the breakdown popover in px. */\n  breakdownWidth?: number;\n  className?: string;\n}\n\n/**\n * ScoreMeter — a small 0-100 score drawn as a categorical bar, optionally opening a\n * breakdown of how the score was arrived at.\n *\n * Not a new meter primitive: the rail IS SegmentedMeter (chosen over CsiMeter because a\n * score built from a variable number of differently-coloured contributions needs\n * per-segment colour and a variable segment count, and CsiMeter is fixed at four\n * segments all drawn in one `currentColor`) with its head and legend turned off, so the\n * proportional-width maths, the transition, the empty-remainder rail and the full\n * `role=\"meter\"` aria that SegmentedMeter already ships are used rather than reimplemented.\n * What this adds is the part SegmentedMeter deliberately lacks: a real trigger.\n *\n * The trigger is a `<button>`, never a div with an onClick — three things follow from\n * that, and all three are the reason it's a button. It is keyboard-operable and\n * announced as a control; SegmentedMeter's own `onClick` (which lands on a plain div)\n * is neither. And inside a drag source it is automatically safe: TransferList arms a\n * drag on any row pointerdown EXCEPT one originating inside a `button`, so the meter\n * stays clickable in a row you can also pick up and drag, with no extra coordination\n * between the two components.\n *\n * The popover is rendered as this component's own child rather than hoisted, which is\n * what makes it survive a virtualized list: the anchor and the open state live and die\n * together, so a row scrolled out of the mounted window takes its popover with it\n * instead of leaving an orphan pinned to a dead element. While the row IS mounted, the\n * popover tracks its anchor frame by frame (see usePopoverPosition), so it follows a row\n * that slides to a new slot when the list is re-sorted underneath it.\n */\nexport function ScoreMeter({\n  score,\n  segments,\n  label,\n  width = 56,\n  height = 6,\n  showScore = true,\n  breakdown,\n  breakdownLabel,\n  placement = \"bottom-end\",\n  breakdownWidth = 280,\n  className = \"\",\n}: ScoreMeterProps) {\n  const [open, setOpen] = React.useState(false);\n  const ref = React.useRef<HTMLButtonElement>(null);\n  const value = Math.max(0, Math.min(100, Math.round(Number(score) || 0)));\n\n  // The rail is aria-hidden and the accessible name is stated once on whatever wraps it\n  // (the meter span, or the button). SegmentedMeter's own role=\"meter\" would otherwise\n  // announce a second, unnamed \"Usage\" meter inside a control that has already said the\n  // score — correct in isolation, duplicated noise here.\n  const body = (\n    <React.Fragment>\n      <span className=\"fd-scoremeter-rail\" style={{ width }} aria-hidden=\"true\">\n        <SegmentedMeter total={100} segments={segments} height={height} showTotal={false} showPercent={false} legend={false} />\n      </span>\n      {showScore ? (\n        <span className=\"fd-scoremeter-value fd-tabular\" aria-hidden=\"true\">\n          {value}\n        </span>\n      ) : null}\n    </React.Fragment>\n  );\n\n  if (!breakdown) {\n    return (\n      <span\n        className={[\"fd-scoremeter\", className].filter(Boolean).join(\" \")}\n        role=\"meter\"\n        aria-label={label}\n        aria-valuenow={value}\n        aria-valuemin={0}\n        aria-valuemax={100}\n        aria-valuetext={value + \" of 100\"}\n      >\n        {body}\n      </span>\n    );\n  }\n\n  return (\n    <React.Fragment>\n      <button\n        type=\"button\"\n        ref={ref}\n        className={[\"fd-scoremeter\", \"fd-scoremeter-button\", open ? \"is-open\" : \"\", className].filter(Boolean).join(\" \")}\n        aria-haspopup=\"dialog\"\n        aria-expanded={open}\n        aria-label={label + \" \" + value + \" of 100 — show breakdown\"}\n        onClick={() => setOpen((v) => !v)}\n      >\n        {body}\n      </button>\n      <Popover\n        open={open}\n        anchorRef={ref}\n        placement={placement}\n        width={breakdownWidth}\n        padded\n        label={breakdownLabel || label + \" breakdown\"}\n        onClose={() => setOpen(false)}\n      >\n        {breakdown}\n      </Popover>\n    </React.Fragment>\n  );\n}\n","import * as React from \"react\";\nimport { Popover, type PopoverProps } from \"./Popover\";\n\n/** The open state of a panel that opens beside its trigger: SortMenu, ModeSwitch and\n *  FileBrowser's folder picker. The panel itself is `InlinePanelSurface`. */\nexport interface InlinePanel<T extends HTMLElement> {\n  open: boolean;\n  setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n  /** The trigger's wrapper: the element the panel is positioned against. A press on it is the\n   *  trigger's own toggle, never an outside press that dismisses the panel. */\n  ref: React.RefObject<T>;\n}\n\nexport function useInlinePanel<T extends HTMLElement>(): InlinePanel<T> {\n  const [open, setOpen] = React.useState(false);\n  const ref = React.useRef<T>(null);\n  return { open, setOpen, ref };\n}\n\nexport interface InlinePanelSurfaceProps\n  extends Pick<PopoverProps, \"width\" | \"maxHeight\" | \"offset\" | \"role\" | \"label\" | \"className\" | \"style\" | \"children\"> {\n  panel: InlinePanel<HTMLElement>;\n  /** Which edge of the trigger the panel lines up with. Default \"right\". */\n  align?: \"left\" | \"right\";\n}\n\n/**\n * The surface of an inline panel: rendered through `Popover`, so it is portaled to\n * `document.body`, fixed-positioned against the trigger, flipped above it when there is no\n * room below, kept inside the viewport and re-measured every frame (scroll, resize, a moving\n * ancestor). No ancestor's `overflow`, `transform`, `contain` or stacking context can clip it,\n * which an `position: absolute` panel inside the trigger's wrapper could not promise: a Card\n * or scroll pane around the trigger cut it to a sliver. Escape (through the shared layer\n * stack, so Escape inside a Drawer or Modal closes only the panel), a press outside, focus\n * return and stacking above whatever it was opened from are Popover's own.\n */\nexport function InlinePanelSurface({ panel, align = \"right\", ...popover }: InlinePanelSurfaceProps): React.ReactElement {\n  return (\n    <Popover\n      open={panel.open}\n      anchorRef={panel.ref}\n      onClose={() => panel.setOpen(false)}\n      placement={align === \"left\" ? \"bottom-start\" : \"bottom-end\"}\n      {...popover}\n    />\n  );\n}\n","import * as React from \"react\";\nimport { Button } from \"../actions/Button\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { InlinePanelSurface, useInlinePanel } from \"../actions/inlinePanel\";\n\nexport interface SortMenuField {\n  /** Sort key sent to the endpoint. */\n  key: string;\n  /** Human label shown in the menu and on the collapsed trigger. */\n  label: string;\n  /** Numeric fields read \"lowest/highest first\" instead of \"A to Z\". */\n  numeric?: boolean;\n}\n\nexport type SortDirection = \"asc\" | \"desc\";\n\n/** One sort key and its direction. A sort is an ordered list of these, most significant first. */\nexport interface SortEntry {\n  key: string;\n  dir: SortDirection;\n}\n\nexport interface SortMenuProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"onChange\"> {\n  fields: SortMenuField[];\n  /** The current sort, most significant key first, straight from the endpoint's response\n   *  envelope. Empty (the default) reads \"Unsorted\". A single-key sort is a list of one. */\n  sort?: SortEntry[];\n  /** Called with the complete new sort whenever the user changes it. The menu never holds\n   *  the list itself: the host applies this, and `sort` comes back. */\n  onSortChange?: (sort: SortEntry[]) => void;\n  /** Sort by several keys at once: the panel lists the active keys in order, each with a\n   *  direction flip, move earlier/later and remove, and every unused field offers an add.\n   *  Off (the default), the sort is one key: choosing a direction on a field replaces it. */\n  multiple?: boolean;\n  /** Which edge the popover aligns to. Default \"right\". */\n  align?: \"left\" | \"right\";\n  /** Trigger button height, same scale as every other control in the kit (Button,\n   *  Input). Default \"md\" — matches Input/SearchField's own default height, since\n   *  this is most often placed directly alongside a SearchField in one header row\n   *  (see TransferList) and the two need to line up. Pass \"sm\" for a denser,\n   *  standalone placement. */\n  size?: \"sm\" | \"md\";\n  className?: string;\n}\n\nconst directionWord = (field: SortMenuField, dir: SortDirection) =>\n  dir === \"asc\" ? (field.numeric ? \"lowest first\" : \"A to Z\") : field.numeric ? \"highest first\" : \"Z to A\";\n\nfunction moved(sort: SortEntry[], from: number, to: number): SortEntry[] {\n  const next = [...sort];\n  const [entry] = next.splice(from, 1);\n  next.splice(to, 0, entry);\n  return next;\n}\n\n/**\n * SortMenu — the sort control for every server-driven table.\n *\n * A raw \"sort=crp&dir=desc\" readout tells a user what the machine is doing, not what\n * they asked for. This states the field in words and offers both directions as explicit\n * targets, so choosing \"highest first\" is one click rather than a toggle you have to\n * click twice and then verify.\n *\n * Direction wording follows the field type — numeric fields read \"lowest/highest first\",\n * text fields \"A to Z\" — while both use the same arrow pair, because varying the icon by\n * type encodes a distinction nobody asked for and reads as inconsistency.\n *\n * The sort is an ordered list of keys. By default it holds one; with `multiple` the user\n * builds a list (first key wins, later keys break its ties) and can flip, reorder and\n * remove each entry.\n *\n * Purely presentational: reports intent through onSortChange(list) and never holds sort\n * state, so it stays honest against a real endpoint.\n */\nexport function SortMenu({\n  fields = [],\n  sort = [],\n  onSortChange,\n  multiple = false,\n  align = \"right\",\n  size = \"md\",\n  className = \"\",\n  ...rest\n}: SortMenuProps) {\n  const panel = useInlinePanel<HTMLSpanElement>();\n  const { open, setOpen, ref } = panel;\n\n  const change = (next: SortEntry[]) => onSortChange && onSortChange(next);\n  const fieldOf = (key: string) => fields.find((f) => f.key === key);\n  const active = sort.filter((entry) => fieldOf(entry.key));\n  const first = active[0];\n  const firstField = first && fieldOf(first.key);\n\n  const triggerLabel = firstField\n    ? firstField.label + (active.length > 1 ? \" +\" + (active.length - 1) : \"\")\n    : \"Unsorted\";\n  const triggerTitle = active\n    .map((entry) => {\n      const field = fieldOf(entry.key)!;\n      return field.label + \" \" + directionWord(field, entry.dir);\n    })\n    .join(\", then \");\n\n  const arrow = (field: SortMenuField, dir: SortDirection, on: boolean, onClick: () => void) => (\n    <button type=\"button\" aria-label={field.label + \", \" + directionWord(field, dir)} aria-pressed={on} onClick={onClick}\n      style={{ display: \"grid\", placeItems: \"center\", width: 26, height: 26, borderRadius: 6, cursor: \"pointer\", flex: \"none\",\n        border: \"1px solid \" + (on ? \"var(--brand)\" : \"var(--border)\"),\n        background: on ? \"var(--brand)\" : \"var(--surface)\", color: on ? \"#fff\" : \"var(--text-muted)\" }}>\n      <i className={\"ph ph-arrow-\" + (dir === \"asc\" ? \"up\" : \"down\")} style={{ fontSize: 13 }} />\n    </button>\n  );\n\n  const rowStyle = (highlight: boolean): React.CSSProperties => ({\n    gap: 8, padding: \"4px 8px\", borderRadius: 7, background: highlight ? \"var(--surface-brand)\" : \"transparent\",\n  });\n  const labelStyle = (highlight: boolean): React.CSSProperties => ({\n    flex: 1, minWidth: 0, fontWeight: highlight ? 700 : 500, color: highlight ? \"var(--text-on-surface-brand)\" : \"var(--text)\",\n  });\n\n  // One key: every field, each with its two directions; the one chosen is highlighted.\n  const singleBody = fields.map((f) => {\n    const on = !!first && first.key === f.key;\n    return (\n      <span key={f.key} className=\"fd-row\" style={rowStyle(on)}>\n        <span className=\"fd-body-sm\" style={labelStyle(on)}>{f.label}</span>\n        {arrow(f, \"asc\", on && first.dir === \"asc\", () => change([{ key: f.key, dir: \"asc\" }]))}\n        {arrow(f, \"desc\", on && first.dir === \"desc\", () => change([{ key: f.key, dir: \"desc\" }]))}\n      </span>\n    );\n  });\n\n  // Several keys: the active list in order, then every field not yet in it.\n  const unused = fields.filter((f) => !active.some((entry) => entry.key === f.key));\n  const multipleBody = (\n    <>\n      <span className=\"fd-overline fd-muted\" style={{ padding: \"4px 8px 6px\" }}>Sorted by</span>\n      {active.length === 0 ? (\n        <span className=\"fd-body-sm fd-muted\" style={{ padding: \"4px 8px\" }}>Unsorted</span>\n      ) : (\n        <ol className=\"fd-stack\" style={{ gap: 2, margin: 0, padding: 0, listStyle: \"none\" }} aria-label=\"Sort order\">\n          {active.map((entry, index) => {\n            const f = fieldOf(entry.key)!;\n            const flipped: SortDirection = entry.dir === \"asc\" ? \"desc\" : \"asc\";\n            return (\n              <li key={entry.key} className=\"fd-row\" style={rowStyle(false)}>\n                <span className=\"fd-body-sm fd-muted\" aria-hidden=\"true\" style={{ width: 14, flex: \"none\" }}>{index + 1}</span>\n                <span className=\"fd-body-sm\" style={labelStyle(false)}>{f.label}</span>\n                <IconButton size=\"sm\" variant=\"outline\" icon={entry.dir === \"asc\" ? \"arrow-up\" : \"arrow-down\"}\n                  label={f.label + \", \" + directionWord(f, entry.dir) + \". Switch to \" + directionWord(f, flipped)}\n                  onClick={() => change(active.map((e) => (e.key === entry.key ? { key: e.key, dir: flipped } : e)))} />\n                <IconButton size=\"sm\" icon=\"caret-up\" label={\"Sort \" + f.label + \" earlier\"} disabled={index === 0}\n                  onClick={() => change(moved(active, index, index - 1))} />\n                <IconButton size=\"sm\" icon=\"caret-down\" label={\"Sort \" + f.label + \" later\"} disabled={index === active.length - 1}\n                  onClick={() => change(moved(active, index, index + 1))} />\n                <IconButton size=\"sm\" icon=\"x\" label={\"Remove \" + f.label + \" from the sort\"}\n                  onClick={() => change(active.filter((e) => e.key !== entry.key))} />\n              </li>\n            );\n          })}\n        </ol>\n      )}\n      {unused.length > 0 ? (\n        <>\n          <span className=\"fd-overline fd-muted\" style={{ padding: \"10px 8px 6px\" }}>Add a sort</span>\n          {unused.map((f) => (\n            <span key={f.key} className=\"fd-row\" style={rowStyle(false)}>\n              <span className=\"fd-body-sm\" style={labelStyle(false)}>{f.label}</span>\n              {arrow(f, \"asc\", false, () => change([...active, { key: f.key, dir: \"asc\" }]))}\n              {arrow(f, \"desc\", false, () => change([...active, { key: f.key, dir: \"desc\" }]))}\n            </span>\n          ))}\n        </>\n      ) : null}\n    </>\n  );\n\n  return (\n    <span className={className} style={{ display: \"inline-flex\", minWidth: 0 }} ref={ref} {...rest}>\n      <Button size={size} variant=\"secondary\" icon={first && first.dir === \"asc\" ? \"sort-ascending\" : \"sort-descending\"}\n        title={triggerTitle || undefined} onClick={() => setOpen(!open)}>\n        {triggerLabel}\n        <i className={\"ph ph-\" + (first && first.dir === \"asc\" ? \"arrow-up\" : \"arrow-down\")} style={{ fontSize: 12, marginLeft: 6, opacity: 0.75 }} />\n      </Button>\n      <InlinePanelSurface panel={panel} align={align} offset={6} width={multiple ? 340 : 280} label=\"Sort by\">\n        <span className=\"fd-stack\" style={{ gap: 2, padding: 8 }}>\n          {multiple ? multipleBody : (\n            <>\n              <span className=\"fd-overline fd-muted\" style={{ padding: \"4px 8px 6px\" }}>Sort by</span>\n              {singleBody}\n            </>\n          )}\n        </span>\n      </InlinePanelSurface>\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport { formatDuration } from \"./RelativeTime\";\nimport { truncationTitle } from \"../textExposure\";\n\nconst KIND_ICON: Record<string, string> = { tool: \"wrench\", search: \"magnifying-glass\", read: \"file-text\", write: \"pencil-simple\", reasoning: \"brain\", run: \"terminal\", fetch: \"cloud-arrow-down\" };\n\nexport interface Step {\n  id: string;\n  /** Short verb + target: \"Queried calls table\". */\n  label: string;\n  kind?: \"tool\" | \"search\" | \"read\" | \"write\" | \"reasoning\" | \"run\" | \"fetch\";\n  /** Raw input/output or reasoning text, behind a disclosure. */\n  detail?: string;\n  durationMs?: number;\n  status?: \"running\" | \"ok\" | \"error\";\n}\n\n/** Flat collapsible rows — never one card per tool call. */\nexport interface StepListProps { steps: Step[]; label?: string; defaultOpen?: boolean; open?: boolean; onToggle?: (open: boolean) => void; showDurations?: boolean; dense?: boolean; className?: string;\n  /**\n   * The work these steps belong to is not finished (a turn still waiting on background work). The head then\n   * reads as a neutral \"Steps so far\" disclosure, never the green \"Worked for …\" completion check, so a\n   * person never sees finished and working at once. A running step still shows its own spinner.\n   */\n  active?: boolean }\n\n/**\n * A flat, collapsible list of work steps — one row per step, never one card per\n * call. A long run stays readable: it is a list, not a stack.\n */\nexport function StepList({\n  steps = [], label, defaultOpen = false, open: openProp, onToggle,\n  showDurations = true, dense = false, className = \"\", active = false,\n}: StepListProps) {\n  const [openState, setOpenState] = React.useState(defaultOpen);\n  const open = openProp == null ? openState : openProp;\n  const [expanded, setExpanded] = React.useState<Record<string, boolean>>({});\n  if (!steps.length) return null;\n\n  const running = steps.some((s) => s.status === \"running\");\n  const failed = steps.filter((s) => s.status === \"error\").length;\n  const total = steps.reduce((n, s) => n + (s.durationMs || 0), 0);\n  const current = steps.filter((s) => s.status === \"running\").slice(-1)[0];\n\n  const summary = label || (running\n    ? (current ? current.label : \"Working\")\n    : active ? \"Steps so far\"\n    : (total ? \"Worked for \" + formatDuration(total) : \"Steps\"));\n\n  const toggle = () => {\n    const next = !open;\n    if (openProp == null) setOpenState(next);\n    onToggle && onToggle(next);\n  };\n\n  return (\n    <div className={[\"fd-steps\", dense ? \"is-dense\" : \"\", active ? \"is-active\" : \"\", open ? \"is-open\" : \"\", className].filter(Boolean).join(\" \")}>\n      <button type=\"button\" className=\"fd-steps-head\" onClick={toggle} aria-expanded={open}>\n        {running ? <span className=\"fd-steps-spin\" aria-hidden=\"true\" /> : <i className={\"ph ph-\" + (failed ? \"warning-circle\" : active ? \"list-checks\" : \"check-circle\")} aria-hidden=\"true\" />}\n        <span className=\"fd-steps-title\" title={truncationTitle(summary)}>{summary}</span>\n        <span className=\"fd-steps-count fd-tabular\">\n          {steps.length} step{steps.length === 1 ? \"\" : \"s\"}\n          {failed ? <span className=\"fd-steps-failed\"> · {failed} failed</span> : null}\n        </span>\n        <i className={\"ph ph-caret-\" + (open ? \"up\" : \"down\") + \" fd-steps-caret\"} aria-hidden=\"true\" />\n      </button>\n      {open ? (\n        <ol className=\"fd-steps-list\">\n          {steps.map((s, i) => {\n            const id = s.id || i;\n            const isOpen = !!expanded[id];\n            const icon = KIND_ICON[s.kind || \"\"] || \"dot-outline\";\n            return (\n              <li key={id} className={\"fd-step is-\" + (s.status || \"ok\")}>\n                <div className=\"fd-step-row\">\n                  <span className=\"fd-step-icon\" aria-hidden=\"true\">\n                    {s.status === \"running\" ? <span className=\"fd-steps-spin\" /> : <i className={\"ph ph-\" + icon} />}\n                  </span>\n                  {s.detail ? (\n                    <button type=\"button\" className=\"fd-step-label\" aria-expanded={isOpen}\n                      onClick={() => setExpanded((m) => Object.assign({}, m, { [id]: !isOpen }))}>\n                      <span title={truncationTitle(s.label)}>{s.label}</span>\n                      <i className={\"ph ph-caret-\" + (isOpen ? \"up\" : \"down\")} aria-hidden=\"true\" />\n                    </button>\n                  ) : <span className=\"fd-step-label is-static\" title={truncationTitle(s.label)}>{s.label}</span>}\n                  {s.status === \"error\" ? <span className=\"fd-step-badge is-error\">failed</span> : null}\n                  {showDurations && s.durationMs ? <span className=\"fd-step-dur fd-tabular\">{formatDuration(s.durationMs)}</span> : null}\n                </div>\n                {s.detail && isOpen ? <pre className=\"fd-step-detail\">{s.detail}</pre> : null}\n              </li>\n            );\n          })}\n        </ol>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/** Number of rows kept mounted above and below the visible band. Two buffers this size\n *  (one per edge) plus the visible band itself is what keeps the mounted node count\n *  bounded — see the file doc comment below for why 20 is the right number here. */\nexport const VIRTUAL_LIST_BUFFER_ROWS = 20;\n\n/** Default px of empty space left at the bottom of every row slot, which is what reads\n *  as the gap between two cards. See VirtualListProps.rowGap. */\nexport const VIRTUAL_LIST_ROW_GAP = 6;\n\n/** Where the caller's loaded slice sits inside the full collection. `firstItemIndex` is\n *  the absolute index of items[0]; `count` is how many are loaded. For a caller that\n *  holds the whole collection this is simply { firstItemIndex: 0, count: items.length }. */\nexport interface VirtualLoadedBand {\n  firstItemIndex: number;\n  count: number;\n}\n\nexport interface VirtualWindow {\n  /** ABSOLUTE index of the first row a viewport of this height would actually show. */\n  visibleStart: number;\n  /** ABSOLUTE index of the last row a viewport of this height would actually show (inclusive). */\n  visibleEnd: number;\n  /** ABSOLUTE index of the first row that should be mounted in the DOM (visibleStart minus\n   *  the buffer), clamped to the loaded band — a row the caller hasn't loaded can't mount. */\n  startIndex: number;\n  /** ABSOLUTE index of the last row that should be mounted in the DOM (inclusive). */\n  endIndex: number;\n  /** Full scrollable height in px — this is what makes the scrollbar/scroll range honest\n   *  about the whole collection even though only a slice of it is ever mounted, and it is\n   *  computed from the TOTAL count, never from how many rows happen to be loaded. */\n  totalHeight: number;\n  /** px the mounted block must be pushed down so its rows land at their real scroll position. */\n  offsetY: number;\n}\n\n/**\n * Pure windowing math: given a scroll position and the shape of the data, decide which\n * row indices are visible and which should actually be mounted. Kept free of React and\n * the DOM on purpose — see VirtualList's doc comment for why this is exported and tested\n * on its own rather than only indirectly through a mounted component.\n *\n * Every fixed-height virtualizer boils down to integer division: row i sits at\n * `i * itemHeight` px, so scrollTop/itemHeight lands on the first partially-visible row\n * and (scrollTop + viewportHeight)/itemHeight lands on the last one. Everything else here\n * is clamping that to the buffer, to the real item count, and to whatever slice of it the\n * caller currently has in memory.\n *\n * Every index this returns is ABSOLUTE — an index into the whole collection, not into the\n * caller's loaded array. That distinction is the entire point of `loaded`: a caller that\n * keeps a sliding window (say 50 rows retained out of 4,000, discarding rows as it scrolls\n * rather than accumulating them) still gets row 3,214 drawn at 3,214 * itemHeight and a\n * scrollbar sized for 4,000 rows. Compute positions off array indices instead and the\n * whole list jumps every time the window slides.\n */\nexport function computeVirtualWindow(opts: {\n  scrollTop: number;\n  viewportHeight: number;\n  itemHeight: number;\n  /** TOTAL rows in the collection, loaded or not. */\n  itemCount: number;\n  /** Which slice of that total is actually in memory. Defaults to \"all of it\". */\n  loaded?: VirtualLoadedBand;\n  bufferRows?: number;\n}): VirtualWindow {\n  const { scrollTop, viewportHeight, itemHeight, itemCount, bufferRows = VIRTUAL_LIST_BUFFER_ROWS } = opts;\n  const loaded = opts.loaded || { firstItemIndex: 0, count: itemCount };\n\n  if (itemCount <= 0 || itemHeight <= 0) {\n    return { visibleStart: 0, visibleEnd: -1, startIndex: 0, endIndex: -1, totalHeight: 0, offsetY: 0 };\n  }\n\n  const lastPossible = itemCount - 1;\n  const visibleStart = Math.min(lastPossible, Math.max(0, Math.floor(scrollTop / itemHeight)));\n  const visibleRows = Math.max(1, Math.ceil(viewportHeight / itemHeight));\n  const visibleEnd = Math.min(lastPossible, visibleStart + visibleRows - 1);\n\n  // The mounted band is the visible band plus a buffer, intersected with what's loaded.\n  // The intersection can come out empty (the user dragged the scrollbar clear past the\n  // loaded slice), which is reported honestly as endIndex < startIndex rather than as\n  // some nearest-loaded-row fudge — nothing is mountable there until the caller fetches.\n  const loadedFirst = Math.max(0, loaded.firstItemIndex);\n  const loadedLast = Math.min(lastPossible, loaded.firstItemIndex + loaded.count - 1);\n  const startIndex = Math.max(loadedFirst, Math.max(0, visibleStart - bufferRows));\n  const endIndex = Math.min(loadedLast, Math.min(lastPossible, visibleEnd + bufferRows));\n\n  return {\n    visibleStart,\n    visibleEnd,\n    startIndex,\n    endIndex,\n    totalHeight: itemCount * itemHeight,\n    offsetY: startIndex * itemHeight,\n  };\n}\n\n/**\n * Given the current window and the LOADED band, says whether the visible band has come\n * within one buffer's width of either edge of what's currently in memory — the signal\n * VirtualList uses to ask its caller for more. Threading it through the *visible* band\n * (not the mounted one) means the caller gets asked while the buffer still has rows left\n * to show, not only once the user has scrolled past all of them.\n *\n * Measured against the loaded band rather than the total, because \"do I need to fetch\"\n * is a question about memory, not about the collection: a caller holding rows 800-849 of\n * 4,000 needs more in BOTH directions even though it is nowhere near either end.\n */\nexport function computeNeedMore(\n  win: Pick<VirtualWindow, \"visibleStart\" | \"visibleEnd\">,\n  loaded: VirtualLoadedBand,\n  bufferRows: number = VIRTUAL_LIST_BUFFER_ROWS\n): { start: boolean; end: boolean } {\n  if (loaded.count <= 0) return { start: true, end: true };\n  return {\n    start: win.visibleStart - loaded.firstItemIndex <= bufferRows,\n    end: loaded.firstItemIndex + loaded.count - 1 - win.visibleEnd <= bufferRows,\n  };\n}\n\nexport interface VirtualListProps<T> {\n  /** Whatever the caller currently has loaded — not the full remote collection. */\n  items: T[];\n  /** Fixed row height in px. Every row is assumed to be exactly this tall. */\n  itemHeight: number;\n  /** px of the row's slot left empty at the bottom, which is what reads as the gap\n   *  between two cards. A real prop rather than a constant because the right gap depends\n   *  on how much the row itself weighs: a one-line 44px row wants the 6px default, a\n   *  two-line card wants more air. Note it comes OUT of itemHeight — the slot is still\n   *  exactly itemHeight tall, so the scroll math is untouched by changing this. */\n  rowGap?: number;\n  /** Called with the ABSOLUTE index of the row (its index in the whole collection), which\n   *  is not the same as its index in `items` once a sliding window is in play. */\n  renderItem: (item: T, index: number) => React.ReactNode;\n  /** Fired when the visible band comes within one buffer's width of an edge of what's\n   *  loaded and that edge isn't known to be exhausted. The caller owns fetching — this\n   *  only asks. The window is handed over too so a caller running a sliding window can\n   *  answer a big scrollbar jump (visible band nowhere near the loaded band) by fetching\n   *  around `win.visibleStart` instead of stepping a page at a time towards it. */\n  onNeedMore: (direction: \"start\" | \"end\", win: VirtualWindow) => void;\n  /** Which edges of `items` still have more behind them. Omitted/undefined reads as \"yes,\n   *  there might be more\" for that edge, since an unknown edge is the common starting state. */\n  hasMore?: { start?: boolean; end?: boolean };\n  /** Absolute index of `items[0]` in the full collection. Non-zero when the caller keeps a\n   *  sliding window and has discarded the rows above. */\n  firstItemIndex?: number;\n  /** Size of the WHOLE collection, when the caller knows it and is holding only a slice.\n   *  Defaults to firstItemIndex + items.length, i.e. \"what's loaded is all there is\". This\n   *  is what the scrollbar is sized against, so a caller that discards rows as it scrolls\n   *  gets a scroll range that stays still instead of shrinking under the user. */\n  totalCount?: number;\n  /** Suppresses onNeedMore while a fetch the caller already started is in flight. Drives the\n   *  small pinned spinner at the bottom of the list — rows already mounted stay exactly as\n   *  they are, since this only ever means \"more is being appended,\" never \"what's on screen\n   *  might be stale.\" For the append-vs-replace distinction, see `refreshing` below. */\n  loading?: boolean;\n  /** True while the caller is replacing the WHOLE result set (a search or sort change), as\n   *  opposed to `loading` appending more onto the end. `items` is expected to still be the\n   *  PREVIOUS result set while this is true — this renders it underneath a full-panel scrim\n   *  instead of clearing to empty, so a search/sort edit never blanks the list while the new\n   *  page is in flight. Swap `items` to the new rows once they land and this back to false. */\n  refreshing?: boolean;\n  /** Copy shown in the `refreshing` overlay's centered card, next to its spinner. */\n  refreshingLabel?: string;\n  keyOf: (item: T) => string | number;\n  /** Viewport height in px. Default (400) is ten rows at the kit's --control-h-md (44px). */\n  height?: number;\n  emptyState?: React.ReactNode;\n  className?: string;\n  style?: React.CSSProperties;\n}\n\n/**\n * VirtualList — a fixed-height windowed viewport for a list the caller may be streaming\n * in from a few thousand rows at a time.\n *\n * Why fixed row height only: variable-height virtualization needs a measurement pass\n * (render off-screen, read the real height, then correct the scroll math) which is a\n * meaningfully bigger and more fragile piece of engineering than this kit needs for any\n * consumer it has today. Every current use case is a single-line-or-two row of known,\n * consistent height, so the simplest correct approach is the right one: the caller states\n * itemHeight, and the math is plain arithmetic (see computeVirtualWindow).\n *\n * Why plain onScroll + scrollTop math instead of IntersectionObserver: an observer would\n * still need one sentinel per boundary and a ResizeObserver alongside it to keep the\n * scroll track honest as itemCount changes — no less code, and it trades arithmetic you\n * can unit test for browser timing you can't. scrollTop/clientHeight are synchronous and\n * exact, so the windowing math stays a pure function (computeVirtualWindow, exported and\n * tested on its own below) with the component itself doing nothing but reading scrollTop\n * and rendering the slice that function names.\n *\n * The window keeps ~10 rows actually visible plus a VIRTUAL_LIST_BUFFER_ROWS-row buffer\n * mounted above and below (~50 rows mounted at once at the default height), which is\n * enough that fast wheel/trackpad scrolling never outruns the mounted band before the\n * next onScroll fires, without ever mounting more than a small bounded slice regardless\n * of how many thousand rows `items` holds.\n *\n * `items` does not have to be the whole collection, or even start at the top of it.\n * `firstItemIndex`/`totalCount` let the caller hand over a SLIDING WINDOW — say 50 rows\n * retained out of 4,000, fetching ten at a time in either direction and DISCARDING the\n * rows that fall out the other side. Every position here is computed from the absolute\n * index, so discarding rows above the viewport doesn't move the rows below it, and the\n * scrollbar stays sized to `totalCount` rather than shrinking to whatever is still in\n * memory. Keeping a window is strictly the caller's business — this component never\n * decides what to drop, it only refuses to assume that `items[0]` is row zero.\n *\n * Fully controlled: this holds no item data and no page state, only the scroll position\n * needed to compute the window. The caller owns fetching more rows (onNeedMore) and\n * knowing when an edge is exhausted (hasMore).\n */\nexport function VirtualList<T>({\n  items,\n  itemHeight,\n  rowGap = VIRTUAL_LIST_ROW_GAP,\n  renderItem,\n  onNeedMore,\n  hasMore,\n  firstItemIndex = 0,\n  totalCount,\n  loading = false,\n  refreshing = false,\n  refreshingLabel = \"Searching…\",\n  keyOf,\n  height = 400,\n  emptyState,\n  className = \"\",\n  style,\n}: VirtualListProps<T>) {\n  const [scrollTop, setScrollTop] = React.useState(0);\n\n  const loaded = React.useMemo<VirtualLoadedBand>(\n    () => ({ firstItemIndex, count: items.length }),\n    [firstItemIndex, items.length]\n  );\n  const total = Math.max(totalCount == null ? 0 : totalCount, firstItemIndex + items.length);\n\n  const bandKey = firstItemIndex + \":\" + items.length;\n\n  const win = React.useMemo(\n    () => computeVirtualWindow({ scrollTop, viewportHeight: height, itemHeight, itemCount: total, loaded }),\n    [scrollTop, height, itemHeight, total, loaded]\n  );\n  const need = React.useMemo(() => computeNeedMore(win, loaded), [win, loaded]);\n\n  const wantStart = need.start && hasMore?.start !== false;\n  const wantEnd = need.end && hasMore?.end !== false;\n\n  // What each edge was last asked about: the loaded band, plus which buffer-width bucket\n  // of the collection the viewport was sitting in. Repeating the ask is suppressed while\n  // both are unchanged, so a caller isn't called on every scroll tick for the same thing.\n  //\n  // The bucket is the part that stops this from deadlocking, and it is there because it\n  // already did once. Keying on the band alone means an ask is spent whether or not the\n  // caller acts on it: a caller that declines one — it thought a fetch was still in\n  // flight, it was mid-render, it dropped it — is then never asked again for that band,\n  // no matter how far the user keeps scrolling, and the list simply stops loading. With\n  // the bucket in the key the ask renews every buffer's width of further scrolling, which\n  // is both bounded (one ask per 20 rows travelled, not one per scroll event) and\n  // impossible to get permanently stuck in. `loading` remains the way to say \"I'm already\n  // fetching, hold off\" — a guard the caller controls, rather than one it can't clear.\n  const bucket = Math.floor(win.visibleStart / VIRTUAL_LIST_BUFFER_ROWS);\n  const askKey = bandKey + \"@\" + bucket;\n  const asked = React.useRef<{ start: string | null; end: string | null }>({ start: null, end: null });\n\n  React.useEffect(() => {\n    if (loading || !wantStart || asked.current.start === askKey) return;\n    asked.current.start = askKey;\n    onNeedMore(\"start\", win);\n  }, [wantStart, loading, askKey, onNeedMore, win]);\n\n  React.useEffect(() => {\n    if (loading || !wantEnd || asked.current.end === askKey) return;\n    asked.current.end = askKey;\n    onNeedMore(\"end\", win);\n  }, [wantEnd, loading, askKey, onNeedMore, win]);\n\n  // Which of `items`' keys are new since the last commit — drives each fresh row's\n  // brief fade/scale-in. Compared against the FULL `items` array (not the mounted\n  // window), so scrolling a already-loaded row into view is never mistaken for a\n  // newly-added one; only a row genuinely absent from the previous commit's `items`\n  // gets the enter treatment. Read during render off last commit's snapshot, then\n  // that snapshot is advanced in an effect after paint — never mutated inline during\n  // render itself.\n  const lastKeysRef = React.useRef<Set<string | number> | null>(null);\n  const newKeys = React.useMemo(() => {\n    const prev = lastKeysRef.current;\n    if (!prev) return new Set<string | number>(); // first mount — nothing \"new\" to animate in\n    const fresh = new Set<string | number>();\n    for (const item of items) {\n      const k = keyOf(item);\n      if (!prev.has(k)) fresh.add(k);\n    }\n    return fresh;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [items]);\n  React.useEffect(() => {\n    lastKeysRef.current = new Set(items.map(keyOf));\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [items]);\n\n  const gapStyle = { \"--fd-vlist-gap\": rowGap + \"px\" } as React.CSSProperties;\n\n  if (!items.length && !loading && !refreshing && emptyState) {\n    return (\n      <div className={[\"fd-vlist-wrap\", className].filter(Boolean).join(\" \")} style={{ height, position: \"relative\", ...style }}>\n        <div className=\"fd-vlist fd-scrollbar\" style={{ height: \"100%\", overflow: \"auto\" }}>\n          {emptyState}\n        </div>\n      </div>\n    );\n  }\n\n  const rows: React.ReactNode[] = [];\n  for (let i = win.startIndex; i <= win.endIndex; i++) {\n    const item = items[i - firstItemIndex];\n    if (item === undefined) continue;\n    const key = keyOf(item);\n    rows.push(\n      <div\n        key={key}\n        className=\"fd-vlist-row\"\n        style={{ height: itemHeight, boxSizing: \"border-box\", transform: \"translateY(\" + i * itemHeight + \"px)\" }}\n      >\n        <div className={newKeys.has(key) ? \"fd-vlist-row-content fd-vlist-row-enter\" : \"fd-vlist-row-content\"}>\n          {renderItem(item, i)}\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <div className={[\"fd-vlist-wrap\", className].filter(Boolean).join(\" \")} style={{ height, position: \"relative\", ...gapStyle, ...style }}>\n      <div\n        className=\"fd-vlist fd-scrollbar\"\n        style={{ height: \"100%\", overflowY: \"auto\", overflowX: \"hidden\", position: \"relative\" }}\n        onScroll={(e) => setScrollTop(e.currentTarget.scrollTop)}\n      >\n        <div style={{ height: win.totalHeight, position: \"relative\" }}>{rows}</div>\n        {loading ? (\n          <div style={{ position: \"sticky\", bottom: 0, left: 0, right: 0, display: \"grid\", placeItems: \"center\", padding: \"8px 0\", background: \"var(--surface)\" }}>\n            <span className=\"fd-spinner\" aria-hidden=\"true\" />\n          </div>\n        ) : null}\n      </div>\n      {refreshing ? (\n        <div className=\"fd-vlist-refresh-scrim\">\n          <div className=\"fd-vlist-refresh-card\">\n            <span className=\"fd-spinner\" aria-hidden=\"true\" />\n            <span className=\"fd-body-sm\">{refreshingLabel}</span>\n          </div>\n        </div>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { Tooltip } from \"../feedback/Tooltip\";\nimport { truncationTitle } from \"../textExposure\";\n\nexport interface EntityRowAction {\n  /** Phosphor icon name, e.g. \"plus\" */\n  icon: string;\n  /** Accessible name for the action button. */\n  label: string;\n  onClick: () => void;\n  /** Picks the fill — \"add\" is the constructive (ok) fill, \"remove\" the destructive\n   *  (danger) fill, and no tone the brand fill. The button is always a filled IconButton\n   *  (variant \"soft\": a lighter fill with a darker border, MP-52): it is the one action on\n   *  the row, repeated down a long list, and has to be findable at a glance on a default\n   *  card and on a danger-toned one alike. No effect on layout, so a caller can still pass\n   *  any icon. */\n  tone?: \"add\" | \"remove\";\n}\n\n/** Width in px a metric cell takes when it doesn't ask for its own. Wide enough for a\n *  five-digit grouped number plus its glyph at --overline-size. */\nexport const ENTITY_ROW_METRIC_WIDTH = 74;\n\nexport interface EntityRowMetric {\n  /** Stable identity for the column. Falls back to `label`, which is what actually has\n   *  to match between rows for a column to line up, so an id is only needed when two\n   *  columns legitimately share a label. */\n  id?: string;\n  /** What the number means — \"students\", \"ad units\". Never rendered as running text:\n   *  it is the metric's accessible name, so the row stays scannable as numbers while a\n   *  screen reader still hears \"1,240 students\". Without a `tooltip` it is also the\n   *  cell's native hover title. */\n  label: string;\n  /** The long-form explanation of this figure — what it counts, why it is zero, what an\n   *  \"unknown\" means. Shown in the kit's Tooltip on hover, keyboard focus and tap, and\n   *  exposed as the cell's accessible description (`label` stays its short name). A cell\n   *  with a tooltip becomes a focusable button so the explanation is reachable without a\n   *  mouse, and drops the native `title` so two tooltips never show at once. A button is\n   *  also what keeps a tap on it from arming TransferList's row drag. */\n  tooltip?: React.ReactNode;\n  value: React.ReactNode;\n  /** Phosphor icon name shown before the value, e.g. \"student\". */\n  icon?: string;\n  /** Fixed cell width in px. Same value on the same column of every row is what makes\n   *  the strip a real aligned column rather than text that happens to sit near text.\n   *  It is the width a cell takes when the strip has room for every column at its width;\n   *  in a strip too narrow for that, cells shrink toward their own figure first, so a\n   *  narrow row loses alignment before it loses a figure. */\n  width?: number;\n  tone?: \"default\" | \"muted\" | \"danger\";\n}\n\n/**\n * Everything about a row that is CONTENT rather than behaviour — what the row says, as\n * opposed to what it does. Split out from EntityRowProps as its own type on purpose: a\n * caller that renders the same row twice (TransferList renders every row a second time\n * as the drag ghost) hands one of these around whole, so a prop added here can't be\n * silently dropped by the second render site the way individually-spread props were.\n */\n/** An icon shown before the row's title, itself the Tooltip trigger together with the\n *  title text (MP-52: \"hovering EITHER the icon or the name\" opens the same explanation —\n *  one hoverable/focusable region rather than two separate targets that could disagree). */\nexport interface EntityRowTitleIcon {\n  /** Phosphor icon name, e.g. \"warning\". */\n  icon: string;\n  tone?: \"danger\";\n  /** The long-form explanation, shown in the kit's Tooltip on hover, keyboard focus and\n   *  tap — never a native `title`, so it is never truncated to a browser tooltip. */\n  tooltip: React.ReactNode;\n}\n\nexport interface EntityRowContent {\n  title: string;\n  /** Renders before `title`, wrapped with it in the kit Tooltip. Drive this from the\n   *  row's own existing state (e.g. the same signal that sets `tone: \"danger\"`) — it is\n   *  not a second source of truth, just a second thing that one signal explains. */\n  titleIcon?: EntityRowTitleIcon;\n  /** A secondary line — a count, a subtitle, whatever the caller's data has that a raw\n   *  title doesn't. Optional because plenty of rows are fine with just a name. Sits\n   *  inline after the title; for numbers that must line up row-to-row use `metrics`. */\n  meta?: React.ReactNode;\n  /** An aligned strip of small numbers below the title — fixed-width cells, so the same\n   *  column lands at the same x on every row. Rendering more than one number through\n   *  `meta` instead would produce a ragged line that happens to contain numbers. */\n  metrics?: EntityRowMetric[];\n  /** A small interactive element pinned to the end of the metric strip — the row's\n   *  score meter, a menu, a flag. Anything focusable belongs in a real `<button>`: the\n   *  row is a drag source, and TransferList's drag arming explicitly skips any\n   *  pointerdown originating inside a button, which is what keeps this clickable. */\n  accessory?: React.ReactNode;\n  /** Whole-row state colour. \"danger\" repaints fill, border and title (e.g. a school\n   *  with no sellable inventory) — the tone tokens are --erow-danger-*, defined for\n   *  both themes. Default is the ordinary card treatment. */\n  tone?: \"default\" | \"danger\";\n}\n\nexport interface EntityRowProps extends EntityRowContent {\n  action?: EntityRowAction;\n  /** Marks the row a drag source: shows the grip icon and a grab cursor, and reports\n   *  `onPointerDown` so the caller's own pointer-based drag (see TransferList) can pick\n   *  the gesture up from there. Deliberately NOT the native HTML `draggable` attribute\n   *  (see the file doc comment for why) — this row never starts a native browser drag. */\n  draggable?: boolean;\n  onPointerDown?: (e: React.PointerEvent<HTMLDivElement>) => void;\n  style?: React.CSSProperties;\n  className?: string;\n}\n\nconst METRIC_TONE_COLOR: Record<string, string | undefined> = {\n  default: \"var(--text-2)\",\n  muted: \"var(--text-muted)\",\n  danger: \"var(--danger-text)\",\n};\n\nexport interface EntityRowMetricsProps {\n  metrics: EntityRowMetric[];\n  className?: string;\n  style?: React.CSSProperties;\n}\n\n/**\n * The aligned number strip, on its own so the SAME columns can be rendered outside a\n * row — TransferList's per-side footer totals are literally this component with the\n * same widths, which is the only way a totals line can stay lined up with the rows it\n * totals without the two places agreeing on magic numbers by hand.\n */\nexport function EntityRowMetrics({ metrics, className = \"\", style }: EntityRowMetricsProps) {\n  return (\n    <span className={[\"fd-erow-metrics\", className].filter(Boolean).join(\" \")} style={style}>\n      {metrics.map((m, i) => {\n        const key = m.id || m.label || i;\n        const className = [\"fd-erow-metric\", m.tone && m.tone !== \"default\" ? \"is-\" + m.tone : \"\", m.tooltip != null ? \"is-described\" : \"\"].filter(Boolean).join(\" \");\n        const tone = { color: METRIC_TONE_COLOR[m.tone || \"default\"] };\n        const content = (\n          <React.Fragment>\n            {m.icon ? <i className={\"ph ph-\" + m.icon} aria-hidden=\"true\" /> : null}\n            <span className=\"fd-erow-metric-value fd-tabular\">{m.value}</span>\n            <span className=\"fd-sr\">{\" \" + m.label}</span>\n          </React.Fragment>\n        );\n        // The column slot is its own box, whatever the metric inside is (a plain span, or a\n        // button inside the Tooltip's anchor), so one rule sizes every column: its width\n        // when the strip has room, shrinking toward its figure when it doesn't (see\n        // .fd-erow-cell in components.css). The width is a custom property rather than an\n        // inline `width` so the stylesheet decides how it flexes.\n        return (\n          <span key={key} className=\"fd-erow-cell\" style={{ \"--erow-metric-w\": (m.width || ENTITY_ROW_METRIC_WIDTH) + \"px\" } as React.CSSProperties}>\n            {m.tooltip == null ? (\n              <span className={className} style={tone} title={m.label}>{content}</span>\n            ) : (\n              <Tooltip label={m.tooltip}>\n                <button type=\"button\" className={className} style={tone}>{content}</button>\n              </Tooltip>\n            )}\n          </span>\n        );\n      })}\n    </span>\n  );\n}\n\n/**\n * EntityRow — a single row for a name plus an optional aligned strip of numbers, an\n * optional accessory and an optional action, meant to be stamped out by the hundreds\n * inside a VirtualList.\n *\n * A real card per row, not flat text: its own surface distinct from the list's\n * background (`--surface-2` against the list's `--surface`), a hairline border, a soft\n * rest-state shadow that lifts on hover — the same `--r-md`/`--e-1`/`--e-2` elevation\n * vocabulary Card itself uses (see styles/components.css's \".fd-erow\" rules), just at\n * the tighter radius a compact row reads better at than Card's own `--r-lg`. Height is\n * still left to the caller (it fills 100% of its parent) because VirtualList is what\n * actually fixes row height, and duplicating that number here would be one more place a\n * future change has to remember to update — the card treatment lives entirely in\n * padding/border/shadow, not height. The border is --erow-border rather than --border\n * for a measured reason: the card and the panel behind it are 1.06:1 apart in light\n * mode, so the inter-card gap is only visible if the hairline carries it.\n *\n * The row lays out as one or two lines depending on what it's given: title (plus inline\n * `meta`) always, and a second line holding the metric strip and accessory only when\n * there is one. That keeps a plain name-only row exactly as tall and as quiet as it\n * always was while letting a richer row carry three numbers and a meter.\n *\n * The drag/drop split is deliberate: a row only ever needs to say \"I am the thing being\n * dragged\" (draggable + onPointerDown), never \"something was dropped on me\" — nothing in\n * this kit drops one row onto another to reorder it, only a row onto a list to move it\n * there. Putting the drop handling on every row would mean wiring the same drop logic N\n * times over instead of once on the list container that actually owns it (see\n * TransferList's own doc comment for why it drives a pointer-based custom drag rather than\n * native HTML5 DnD — in short, a native drag image is a static snapshot, not a live\n * element, so it can't sustain a persistent tilt that follows the cursor), so this only\n * exposes the source half of the contract: `onPointerDown` hands the gesture off to\n * whatever the caller wants to do with it (TransferList starts tracking a drag once the\n * pointer has moved past a small threshold, so a plain click still reads as a click).\n * The action button exists precisely so drag-and-drop is never the only way to do the\n * same move — pointer-only and keyboard users get an equally real affordance, not a\n * degraded fallback.\n */\nexport function EntityRow({\n  title,\n  titleIcon,\n  meta,\n  metrics,\n  accessory,\n  tone = \"default\",\n  action,\n  draggable = false,\n  onPointerDown,\n  style,\n  className = \"\",\n}: EntityRowProps) {\n  const hasStrip = (metrics && metrics.length > 0) || accessory != null;\n  return (\n    <div\n      onPointerDown={onPointerDown}\n      className={[\"fd-erow\", tone === \"danger\" ? \"fd-erow-danger\" : \"\", className].filter(Boolean).join(\" \")}\n      style={{\n        // display/alignItems/gap/padding moved to the .fd-erow stylesheet rule\n        // (MP-114 follow-ups): an inline style always wins over a stylesheet rule\n        // regardless of specificity or media/container query, which would have made\n        // it impossible for the narrow-container rule below to ever switch this row\n        // from a flex row to a grid — and padding specifically is also read back by\n        // .fd-tlist-footer's own indent calc(), as --erow-pad-x, so it has to be a\n        // real, readable stylesheet value rather than a number only this component\n        // ever sees.\n        height: \"100%\",\n        cursor: draggable ? \"grab\" : undefined,\n        // Own the gesture on touch too — without this, a touch-drag on a draggable row\n        // starts the page scrolling instead of (or as well as) the pointer drag.\n        touchAction: draggable ? \"none\" : undefined,\n        ...style,\n      }}\n    >\n      {draggable ? (\n        // font-size moved to the .fd-erow-grip stylesheet rule, same reason as the\n        // row's own padding above: .fd-tlist-footer's indent reads it back as\n        // --erow-grip-size.\n        <i className=\"ph ph-dots-six-vertical fd-erow-grip\" aria-hidden=\"true\" style={{ flex: \"none\", color: \"var(--text-muted)\" }} />\n      ) : null}\n      <span className=\"fd-erow-body\">\n        <span className=\"fd-erow-titleline\">\n          {titleIcon ? (\n            <Tooltip label={titleIcon.tooltip}>\n              <button\n                type=\"button\"\n                className={[\"fd-erow-title-icon\", titleIcon.tone ? \"is-\" + titleIcon.tone : \"\"].filter(Boolean).join(\" \")}\n              >\n                <i className={\"ph ph-\" + titleIcon.icon} aria-hidden=\"true\" />\n                {/* MP-141: this title is already inside the Tooltip above (titleIcon's\n                 * own doc comment: \"never a native `title`, so it is never truncated to\n                 * a browser tooltip\") — a second, native title here would fight it. */}\n                <span className=\"fd-erow-title fd-body-sm\">{title}</span>\n              </button>\n            </Tooltip>\n          ) : (\n            // MP-141: dense-row identifier, no Tooltip wrapper in this branch — a native\n            // `title` is the exposure mechanism, same rule as every other identifier.\n            <span className=\"fd-erow-title fd-body-sm\" title={truncationTitle(title)}>{title}</span>\n          )}\n          {meta ? <span className=\"fd-erow-meta\" title={truncationTitle(meta)}>{meta}</span> : null}\n        </span>\n        {hasStrip ? (\n          <span className=\"fd-erow-strip\">\n            {metrics && metrics.length ? <EntityRowMetrics metrics={metrics} /> : null}\n            {accessory ? <span className=\"fd-erow-accessory\">{accessory}</span> : null}\n          </span>\n        ) : null}\n      </span>\n      {action ? (\n        <IconButton\n          icon={action.icon}\n          label={action.label}\n          size=\"sm\"\n          // \"soft\" only has ok/danger fills (MP-52); an untoned action falls back to the\n          // brand-filled \"solid\" look rather than an undefined neutral soft fill.\n          variant={action.tone ? \"soft\" : \"solid\"}\n          tone={action.tone === \"add\" ? \"ok\" : action.tone === \"remove\" ? \"danger\" : \"neutral\"}\n          className=\"fd-erow-action\"\n          onClick={action.onClick}\n        />\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { SearchField } from \"../forms/SearchField\";\nimport { SortMenu, type SortMenuField } from \"./SortMenu\";\nimport { VirtualList, type VirtualWindow } from \"./VirtualList\";\nimport { EntityRow, type EntityRowContent } from \"./EntityRow\";\nimport { EmptyState } from \"../feedback/EmptyState\";\nimport { OVERLAY_CEILING } from \"../../kits/layerStack\";\n\nexport type TransferListSide = \"left\" | \"right\";\n\nexport interface TransferListSideProps<T> {\n  /** Whatever this side currently has loaded — not its full remote collection. */\n  items: T[];\n  /** Total matching count on the server, if known — shown next to the label. */\n  total?: number;\n  loading?: boolean;\n  /** True while this side's WHOLE result set is being replaced (a search or sort\n   *  change), not merely appended to. `items` should still be the previous result set\n   *  while this is true — see VirtualList's own `refreshing` prop, which this threads\n   *  straight through. */\n  refreshing?: boolean;\n  search: string;\n  onSearchChange: (value: string) => void;\n  sort?: { key: string; dir: \"asc\" | \"desc\" } | null;\n  sortFields: SortMenuField[];\n  onSort: (key: string, dir: \"asc\" | \"desc\") => void;\n  onNeedMore: (direction: \"start\" | \"end\", win: VirtualWindow) => void;\n  hasMore?: { start?: boolean; end?: boolean };\n  /** Absolute index of `items[0]` in this side's full collection, and the size of that\n   *  collection — threaded straight through to this side's VirtualList so each side can\n   *  independently run a sliding window. See VirtualList's own docs. */\n  firstItemIndex?: number;\n  totalCount?: number;\n  /** Heading text for this side. Fully caller-supplied — this component has no opinion\n   *  about what the two sides represent. Stays a plain string because it is also woven\n   *  into the search field's and the move action's accessible names; anything richer\n   *  than a name belongs in `header`. */\n  label?: string;\n  /** A slot above the search row, under the label. */\n  header?: React.ReactNode;\n  /** A slot below the list — where a running totals line for this side goes. A real slot\n   *  rather than more `label`, because totals are structured content (typically an\n   *  EntityRowMetrics strip using the same widths as the rows, so the columns line up\n   *  with the numbers they total) and `label` is a string that gets concatenated. */\n  footer?: React.ReactNode;\n  /** Copy shown in the full-panel drop overlay while a drag is over this side. Falls\n   *  back to a generic \"Drop here\" (plus `label`, if set) when omitted — set this for\n   *  exact per-side wording (e.g. \"Drop to add to audience\" / \"Drop to remove from\n   *  audience\"), since that phrasing is about what a drop here DOES, which only the\n   *  caller's domain actually knows. */\n  dropLabel?: string;\n}\n\nexport interface TransferListProps<T> {\n  left: TransferListSideProps<T>;\n  right: TransferListSideProps<T>;\n  keyOf: (item: T) => string | number;\n  /** Everything a row SAYS, as one object — title, meta, the aligned metric strip, the\n   *  accessory, the row tone. One render prop returning one EntityRowContent rather than\n   *  a render prop per field, because a dragged row is rendered a SECOND time as the\n   *  ghost that follows the cursor: with per-field props that second call has to\n   *  remember to pass each of them, and the version of this component that did exactly\n   *  that quietly dropped every field but title and meta off the dragged card. Handing\n   *  the same object to both render sites makes that class of bug unrepresentable.\n   *  The row's `title` also names its +/- action, with the destination side's `label`:\n   *  \"Move Alpha to In audience\". */\n  renderRow: (item: T) => EntityRowContent;\n  /** Fired by both a drag-drop and the equivalent +/- click. The caller owns actually\n   *  moving the item between whatever backing lists it maintains — this component never\n   *  mutates `left.items`/`right.items` itself. */\n  onMove: (item: T, from: TransferListSide, to: TransferListSide) => void;\n  /** Row height fed straight through to each side's VirtualList. Default (64) fits the\n   *  two-line card an EntityRow becomes once it carries a metric strip and an accessory:\n   *  a 56px card (title line + strip line, 10px of vertical padding) plus the 8px gap.\n   *  A list of bare title-only rows should pass 44 (the kit's --control-h-md, which is\n   *  what EntityRow's single-line form is tuned to) with a matching smaller rowGap. */\n  itemHeight?: number;\n  /** px of each row slot left empty, which is what draws the gap between two cards.\n   *  Default 8 — see the --erow-border token note for why a card on this kit's surfaces\n   *  needs both a real gap and a real hairline before the separation is visible. */\n  rowGap?: number;\n  /** Viewport height fed straight through to each side's VirtualList. */\n  listHeight?: number;\n  className?: string;\n}\n\nconst emptyHasMore: { start?: boolean; end?: boolean } = {};\n\n/** Pointer clientX/clientY has to move at least this many px past pointerdown before a\n *  press-and-hold on a row reads as a drag rather than a click — without a threshold,\n *  the action button's own click (which also fires pointerdown first) would be swallowed\n *  the instant it started, and a plain unsteady tap would spuriously start a drag. */\nconst DRAG_THRESHOLD_PX = 5;\n\ninterface DragState<T> {\n  item: T;\n  from: TransferListSide;\n  key: string | number;\n  pointerId: number;\n  /** Pointer position, in row-local coordinates, at pickup — keeps the ghost glued to\n   *  wherever on the card the user actually grabbed it, instead of snapping to a corner. */\n  offsetX: number;\n  offsetY: number;\n  width: number;\n  height: number;\n  /** Latest pointer position in viewport coordinates. */\n  x: number;\n  y: number;\n}\n\n/**\n * TransferList — a dual-list picker for moving items between two collections, by drag or\n * by a click, over a search box and a sort control each side owns independently.\n *\n * Deliberately named \"left\"/\"right\" rather than e.g. \"available\"/\"selected\": the product\n * this ships for is one particular use of it, but nothing about moving rows between two\n * lists is specific to that use, and baking in \"available\"/\"selected\" (or worse, this\n * kit's actual first consumer's own vocabulary) would make every *other* two-list picker\n * this kit will ever be asked for a second component instead of a second set of props. A\n * caller wanting domain words passes them through `label`/`dropLabel`.\n *\n * A pointer-based custom drag, not native HTML5 DnD, and not a library: this kit ships\n * zero runtime dependencies on purpose, and a pointer-events implementation (pointerdown/\n * pointermove/pointerup driving a portaled ghost element) is still zero-dependency — just\n * more code than `draggable`. It replaced an earlier native-HTML5-DnD version once the\n * spec called for a real \"card lifts out of the list and tilts, following the cursor\"\n * feel: a native drag image (`dataTransfer.setDragImage`) is a static snapshot taken once\n * at dragstart, not a live element, so it can't sustain a persistent rotation that tracks\n * the pointer for the duration of the drag — only owning the pointer events ourselves can.\n * Each row's pointerdown (via EntityRow's `onPointerDown`) arms a potential drag; nothing\n * visually happens until the pointer actually moves past `DRAG_THRESHOLD_PX`, so a plain\n * click (on the row, or on its +/- action button) is never mistaken for one. Once armed,\n * window-level pointermove/pointerup/pointercancel listeners (not per-row ones, since the\n * row being dragged gets replaced by a placeholder mid-drag) track the gesture to\n * completion; which side the pointer is currently over is decided by hit-testing each\n * side's own bounding rect against the pointer position, not by any per-row target.\n *\n * The +/- action on every row is not a fallback bolted on for accessibility box-ticking:\n * it is the same onMove call a drop makes, exposed as a first-class equivalent, because\n * drag-and-drop alone would silently exclude anyone not using a mouse.\n *\n * Each side owns a `header` and a `footer` slot in addition to its `label`. `label` stays\n * a plain string because it is also woven into that side's search field and move-action\n * accessible names and gets a count concatenated onto it; the slots are where real\n * content goes — a running totals line in the footer, rendered with EntityRowMetrics at\n * the same column widths the rows use, so the totals sit under the numbers they total.\n *\n * Fully controlled and stateless about the actual item sets: `left`/`right` are handed in\n * whole, this never copies or reorders them, and the only state kept locally is which row\n * is mid-drag and which side a drag is currently over — pure interaction feedback, thrown\n * away the moment the drag ends. Each side may independently be a sliding window over a\n * much larger collection (`firstItemIndex`/`totalCount`, threaded to its VirtualList).\n */\nexport function TransferList<T>({\n  left,\n  right,\n  keyOf,\n  renderRow,\n  onMove,\n  itemHeight = 64,\n  rowGap = 8,\n  listHeight = 440,\n  className = \"\",\n}: TransferListProps<T>) {\n  const [drag, setDrag] = React.useState<DragState<T> | null>(null);\n  const [dragOverSide, setDragOverSide] = React.useState<TransferListSide | null>(null);\n  const dragRef = React.useRef<DragState<T> | null>(null);\n  const armedRef = React.useRef<{\n    item: T;\n    from: TransferListSide;\n    key: string | number;\n    pointerId: number;\n    startX: number;\n    startY: number;\n    offsetX: number;\n    offsetY: number;\n    width: number;\n    height: number;\n  } | null>(null);\n  const sideRefs = React.useRef<Record<TransferListSide, HTMLDivElement | null>>({ left: null, right: null });\n\n  const hitTestSide = React.useCallback((x: number, y: number): TransferListSide | null => {\n    for (const side of [\"left\", \"right\"] as TransferListSide[]) {\n      const el = sideRefs.current[side];\n      if (!el) continue;\n      const r = el.getBoundingClientRect();\n      if (x >= r.left && x <= r.right && y >= r.top && y <= r.bottom) return side;\n    }\n    return null;\n  }, []);\n\n  const findItem = React.useCallback(\n    (side: TransferListSide, key: string | number): T | undefined =>\n      (side === \"left\" ? left.items : right.items).find((it) => keyOf(it) === key),\n    [left.items, right.items, keyOf]\n  );\n\n  const beginDrag = (e: React.PointerEvent<HTMLDivElement>, item: T, from: TransferListSide) => {\n    if (e.button !== 0) return;\n    // Never arm a drag from the row's own +/- action button — that's a plain click\n    // target in its own right (see EntityRowAction), not a drag handle.\n    if ((e.target as HTMLElement).closest && (e.target as HTMLElement).closest(\"button\")) return;\n    // Stop the browser's own native text-selection/drag gesture from starting at the\n    // same time as ours — without this, a real mouse drag leaves a stray text\n    // selection highlight across whatever the pointer passes over mid-drag.\n    e.preventDefault();\n    const rect = e.currentTarget.getBoundingClientRect();\n    armedRef.current = {\n      item,\n      from,\n      key: keyOf(item),\n      pointerId: e.pointerId,\n      startX: e.clientX,\n      startY: e.clientY,\n      offsetX: e.clientX - rect.left,\n      offsetY: e.clientY - rect.top,\n      width: rect.width,\n      height: rect.height,\n    };\n  };\n\n  React.useEffect(() => {\n    const onMovePointer = (e: PointerEvent) => {\n      const armed = armedRef.current;\n      if (!armed || e.pointerId !== armed.pointerId) return;\n      if (!dragRef.current) {\n        const dx = e.clientX - armed.startX;\n        const dy = e.clientY - armed.startY;\n        if (Math.hypot(dx, dy) < DRAG_THRESHOLD_PX) return;\n        const started: DragState<T> = {\n          item: armed.item,\n          from: armed.from,\n          key: armed.key,\n          pointerId: armed.pointerId,\n          offsetX: armed.offsetX,\n          offsetY: armed.offsetY,\n          width: armed.width,\n          height: armed.height,\n          x: e.clientX,\n          y: e.clientY,\n        };\n        dragRef.current = started;\n        setDrag(started);\n      } else {\n        dragRef.current = { ...dragRef.current, x: e.clientX, y: e.clientY };\n        setDrag(dragRef.current);\n      }\n      const hit = hitTestSide(e.clientX, e.clientY);\n      setDragOverSide(hit && hit !== armed.from ? hit : null);\n    };\n\n    const endDrag = (e: PointerEvent) => {\n      const armed = armedRef.current;\n      if (!armed || e.pointerId !== armed.pointerId) return;\n      const wasDragging = dragRef.current;\n      armedRef.current = null;\n      dragRef.current = null;\n      setDrag(null);\n      setDragOverSide(null);\n      if (!wasDragging) return; // never crossed the threshold — this was a click, not a drag\n      const hit = hitTestSide(e.clientX, e.clientY);\n      if (hit && hit !== armed.from) {\n        const item = findItem(armed.from, armed.key);\n        if (item !== undefined) onMove(item, armed.from, hit);\n      }\n    };\n\n    window.addEventListener(\"pointermove\", onMovePointer);\n    window.addEventListener(\"pointerup\", endDrag);\n    window.addEventListener(\"pointercancel\", endDrag);\n    return () => {\n      window.removeEventListener(\"pointermove\", onMovePointer);\n      window.removeEventListener(\"pointerup\", endDrag);\n      window.removeEventListener(\"pointercancel\", endDrag);\n    };\n  }, [hitTestSide, findItem, onMove]);\n\n  // Suppress text selection for the duration of an actual drag — with the ghost\n  // portaled to document.body and tracking the pointer across the whole page, an\n  // ordinary mouse-drag gesture would otherwise select surrounding page text as it goes.\n  React.useEffect(() => {\n    if (!drag || typeof document === \"undefined\") return;\n    const prev = document.body.style.userSelect;\n    document.body.style.userSelect = \"none\";\n    return () => {\n      document.body.style.userSelect = prev;\n    };\n  }, [drag]);\n\n  const renderSide = (side: TransferListSide, cfg: TransferListSideProps<T>, opposite: TransferListSide) => {\n    const showOverlay = drag != null && dragOverSide === side;\n    return (\n      <div\n        ref={(el) => {\n          sideRefs.current[side] = el;\n        }}\n        className={[\"fd-tlist-side\", dragOverSide === side ? \"is-drop-target\" : \"\"].filter(Boolean).join(\" \")}\n      >\n        {cfg.label ? (\n          <span className=\"fd-overline fd-muted\">\n            {cfg.label}\n            {cfg.total != null ? \" (\" + cfg.total.toLocaleString() + \")\" : \"\"}\n          </span>\n        ) : null}\n        {cfg.header ? <div className=\"fd-tlist-header\">{cfg.header}</div> : null}\n        <span className=\"fd-row\" style={{ gap: 8 }}>\n          <SearchField value={cfg.search} onChange={cfg.onSearchChange} placeholder=\"Search\" aria-label={(cfg.label || side) + \" search\"} style={{ flex: 1 }} />\n          <SortMenu fields={cfg.sortFields} sort={cfg.sort ? [cfg.sort] : []} onSortChange={(next) => next[0] && cfg.onSort(next[0].key, next[0].dir)} align={side === \"left\" ? \"left\" : \"right\"} />\n        </span>\n        <VirtualList\n          items={cfg.items}\n          itemHeight={itemHeight}\n          rowGap={rowGap}\n          height={listHeight}\n          keyOf={keyOf}\n          loading={cfg.loading}\n          refreshing={cfg.refreshing}\n          hasMore={cfg.hasMore || emptyHasMore}\n          firstItemIndex={cfg.firstItemIndex}\n          totalCount={cfg.totalCount}\n          onNeedMore={cfg.onNeedMore}\n          emptyState={<EmptyState icon=\"tray\" title=\"Nothing here\" />}\n          renderItem={(item) => {\n            const isBeingDragged = drag != null && drag.from === side && drag.key === keyOf(item);\n            if (isBeingDragged) {\n              // The vacated slot reads as an obviously-empty placeholder, not a\n              // still-there-but-faded real row — the real card is off with the pointer\n              // (see the portaled ghost below), tilted, not sitting here at all.\n              return <div className=\"fd-erow-placeholder\" aria-hidden=\"true\" />;\n            }\n            const content = renderRow(item);\n            const destination = (side === \"left\" ? right : left).label || \"the other list\";\n            return (\n              <EntityRow\n                {...content}\n                draggable\n                onPointerDown={(e) => beginDrag(e, item, side)}\n                action={{\n                  icon: side === \"left\" ? \"plus\" : \"minus\",\n                  // Names the row AND where it goes. A list repeats this button on every\n                  // row, so a name without the row's title is the same word fifty times\n                  // over to a screen reader, with nothing to tell one button from the next.\n                  label: \"Move \" + content.title + \" to \" + destination,\n                  tone: side === \"left\" ? \"add\" : \"remove\",\n                  onClick: () => onMove(item, side, opposite),\n                }}\n              />\n            );\n          }}\n        />\n        {cfg.footer ? <div className=\"fd-tlist-footer\">{cfg.footer}</div> : null}\n        {showOverlay ? (\n          <div className=\"fd-tlist-drop-overlay\" aria-hidden=\"true\">\n            <span className=\"fd-tlist-drop-card\">\n              <i className=\"ph ph-tray-arrow-down\" style={{ fontSize: 18 }} aria-hidden=\"true\" />\n              <span className=\"fd-body-sm\" style={{ fontWeight: 600 }}>\n                {cfg.dropLabel || \"Drop here\" + (cfg.label ? \" — \" + cfg.label : \"\")}\n              </span>\n            </span>\n          </div>\n        ) : null}\n      </div>\n    );\n  };\n\n  return (\n    <div className={[\"fd-tlist\", className].filter(Boolean).join(\" \")}>\n      {/* The root is the size container the panes' stacking rule queries (a container\n          cannot query its own width), so the panes get their own flex row inside it. */}\n      <div className=\"fd-tlist-panes\">\n        {renderSide(\"left\", left, \"right\")}\n        {renderSide(\"right\", right, \"left\")}\n      </div>\n      {/* Not routed through the layer stack: that mechanism orders overlays RELATIVE to\n          whichever one they were opened from, but a drag ghost has to win against every\n          layer unconditionally — the user is actively dragging it, so it must never end\n          up under a Popover, Drawer, Modal or Tooltip that happens to be open elsewhere on\n          the page. OVERLAY_CEILING is the mechanism's own guarantee of a number above\n          anything it can compute, which is the actual invariant this needs — not a derived\n          layer, and not a hand-picked constant that could drift stale. */}\n      {drag\n        ? createPortal(\n            <div\n              aria-hidden=\"true\"\n              className=\"fd-erow-ghost\"\n              style={{\n                position: \"fixed\",\n                left: 0,\n                top: 0,\n                width: drag.width,\n                height: drag.height,\n                transform: `translate(${drag.x - drag.offsetX}px, ${drag.y - drag.offsetY}px) rotate(-3deg)`,\n                pointerEvents: \"none\",\n                zIndex: OVERLAY_CEILING,\n              }}\n            >\n              {/* The SAME content object the in-list row is built from — spread whole,\n                  never field-by-field, so the card that follows the cursor can never\n                  end up a stripped-down version of the card it was lifted out of. */}\n              <EntityRow {...renderRow(drag.item)} draggable className=\"fd-erow-dragging\" />\n            </div>,\n            document.body\n          )\n        : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { FieldLabel, useFieldId } from \"./field\";\n\n/**\n * Labelled text field. 44px tall, 8px radius, hairline border, blue focus ring.\n */\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\" | \"prefix\"> {\n  label?: string;\n  help?: string;\n  /** Present = error state. Replaces help text. */\n  error?: string;\n  /** Static text inside the field, left — e.g. \"$\" */\n  prefix?: React.ReactNode;\n  /** Static text inside the field, right — e.g. \"CPM\" */\n  suffix?: React.ReactNode;\n  /** Phosphor icon name shown left of the input */\n  icon?: string;\n  /** Right-aligned tabular figures. Use for every money or count field. */\n  numeric?: boolean;\n  required?: boolean;\n  size?: \"md\" | \"lg\";\n  /** Inline spinner on the right — for async validation or a value still arriving. */\n  loading?: boolean;\n  /** Applied to the outer .fd-field element — this is where width belongs. */\n  style?: React.CSSProperties;\n  /** Applied to the outer .fd-field element, like `style` and for the same reason: that\n   *  element is the field's box in whatever layout it sits in (a flex toolbar, a grid\n   *  cell). The input box inside it is a child of a vertical flex column, so a sizing\n   *  class landing THERE turns a row's `flex-basis` into a height. */\n  className?: string;\n  /** Applied to the inner input element. Rarely needed. */\n  inputStyle?: React.CSSProperties;\n}\n\nexport function Input({\n  label, help, error, prefix, suffix, icon, numeric = false, required = false,\n  size = \"md\", loading = false, disabled = false, id, className = \"\", style, inputStyle, ...rest\n}: InputProps) {\n  const fieldId = useFieldId(id);\n  const box = [\n    \"fd-input\",\n    numeric ? \"fd-input-num\" : \"\",\n    error ? \"fd-input-error\" : \"\",\n    disabled ? \"fd-input-disabled\" : \"\",\n    size === \"lg\" ? \"fd-input-lg\" : \"\",\n  ].filter(Boolean).join(\" \");\n\n  return (\n    <div className={[\"fd-field\", className].filter(Boolean).join(\" \")} style={style}>\n      {label ? <FieldLabel htmlFor={fieldId} required={required}>{label}</FieldLabel> : null}\n      <div className={box}>\n        {icon ? <span className=\"fd-input-icon\"><i className={\"ph ph-\" + icon} aria-hidden=\"true\" /></span> : null}\n        {prefix ? <span className=\"fd-input-affix\">{prefix}</span> : null}\n        <input id={fieldId} disabled={disabled} style={inputStyle} aria-invalid={error ? \"true\" : undefined} {...rest} />\n        {loading ? <span className=\"fd-spinner\" style={{ color: \"var(--text-muted)\" }} aria-label=\"Loading\" /> : null}\n        {suffix && !loading ? <span className=\"fd-input-affix\">{suffix}</span> : null}\n      </div>\n      {error ? (\n        <span className=\"fd-field-error\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{error}</span>\n      ) : help ? (\n        <span className=\"fd-field-help\">{help}</span>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Input } from \"./Input\";\n\nexport interface SearchFieldProps {\n  /** Current search text. */\n  value: string;\n  /** Fires with the new text on every keystroke — a plain string, not a raw\n   *  DOM event, so this drops in above a filterable list with zero boilerplate. */\n  onChange: (value: string) => void;\n  placeholder?: string;\n  /** Fires when the clear (\"x\") button is pressed. Defaults to onChange(\"\"). */\n  onClear?: () => void;\n  /** Applied to the outer .fd-field element — this is where width belongs. */\n  style?: React.CSSProperties;\n  /** Applied to the outer .fd-field element, like `style`. */\n  className?: string;\n  /** Visible field label, same as Input. Most search fields skip this and rely on placeholder. */\n  label?: string;\n  disabled?: boolean;\n  id?: string;\n  name?: string;\n  \"aria-label\"?: string;\n}\n\n/**\n * SearchField — the one keyword field that belongs above a filterable list.\n *\n * A thin wrapper around Input: a magnifying-glass icon on the left (Input's\n * own `icon` prop) and a clear (\"x\") button on the right that appears only\n * once there's something to clear. The clear button rides in Input's\n * existing `suffix` slot rather than inventing new inset layout, and its\n * styling matches Select's clearable \"x\" (`ph-x-circle`, `all: unset`,\n * `text-muted`) so every clear affordance in the kit looks the same.\n *\n * Controlled, string-in/string-out. Debouncing is the consumer's job (or a\n * future concern) — building it in here would be hidden behavior a caller\n * can't see or override.\n */\nexport function SearchField({\n  value, onChange, placeholder, onClear, style, className, label, disabled, id, name, ...rest\n}: SearchFieldProps) {\n  const clear = onClear || (() => onChange(\"\"));\n  return (\n    <Input\n      id={id}\n      name={name}\n      label={label}\n      icon=\"magnifying-glass\"\n      value={value}\n      disabled={disabled}\n      placeholder={placeholder}\n      style={style}\n      className={className}\n      onChange={(e) => onChange(e.target.value)}\n      suffix={\n        value ? (\n          <button\n            type=\"button\"\n            aria-label=\"Clear search\"\n            onClick={clear}\n            style={{ all: \"unset\", cursor: \"pointer\", color: \"var(--text-muted)\", display: \"grid\", placeItems: \"center\", padding: 2 }}\n          >\n            <i className=\"ph ph-x-circle\" style={{ fontSize: 15 }} aria-hidden=\"true\" />\n          </button>\n        ) : undefined\n      }\n      {...rest}\n    />\n  );\n}\n","import * as React from \"react\";\n\nexport interface Fact {\n  /** What the fact is. Also its identity, so labels are unique within a list. */\n  label: string;\n  /** Any node: text, a badge, a link. */\n  value: React.ReactNode;\n}\n\nexport interface FactListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n  facts: Fact[];\n  className?: string;\n}\n\n/**\n * Label/value pairs as a compact grid: 2 to 4 columns as the list's own width allows, one column\n * when it is narrow (a phone). Where CardRow stacks one pair per line, a summary of a handful of\n * facts reads at a glance instead of filling the screen. The columns follow the width of the\n * container it is placed in, not the viewport, so it holds in a narrow card on a wide screen too.\n */\nexport function FactList({ facts = [], className = \"\", ...rest }: FactListProps) {\n  return (\n    <div className={[\"fd-facts\", className].filter(Boolean).join(\" \")} {...rest}>\n      <dl className=\"fd-facts-grid\">\n        {facts.map((f) => (\n          <div key={f.label} className=\"fd-fact\">\n            <dt className=\"fd-fact-label\">{f.label}</dt>\n            <dd className=\"fd-fact-value\">{f.value}</dd>\n          </div>\n        ))}\n      </dl>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { useTooltip } from \"../feedback/useTooltip\";\nimport { Collapsible } from \"../surfaces/Collapsible\";\nimport { LoadingRegion } from \"../loading/LoadingRegion\";\nimport { Skeleton } from \"../loading/Skeleton\";\nimport { BarList } from \"./BarList\";\nimport { DataTable, type DataTableColumn } from \"./DataTable\";\nimport { US_STATE_CODES } from \"./usChoropleth/usStates\";\nimport { MAP_HEIGHT, MAP_WIDTH } from \"./usChoropleth/mapBox\";\nimport {\n  buildChoroplethModel,\n  formatShare,\n  legendSteps,\n  stepOf,\n  type ChoroplethModel,\n  type ChoroplethValue,\n  type LegendStep,\n  type StateFigure,\n} from \"./usChoropleth/model\";\nimport { useUsStateShapes } from \"./usChoropleth/useUsStateShapes\";\nimport type { StateShape } from \"./usChoropleth/usStateShapes\";\n\nexport type { ChoroplethValue as USChoroplethValue, StateFigure as USChoroplethState };\n\nexport interface USChoroplethProps {\n  /** One entry per state that has a value: USPS code and a whole count. A state not listed, or 0,\n   *  is drawn empty. A code that is not a state, a state twice or a value that is not a whole\n   *  count throws. */\n  values: readonly ChoroplethValue[];\n  /** Accessible name of the map, e.g. \"Students by state\". */\n  label: string;\n  /** What the value counts, plural: the heading of the table's value column (\"Students\"). */\n  valueLabel: string;\n  /** A value as the legend, the ranking and the table print it. */\n  formatValue: (value: number) => string;\n  /** What one state reads as everywhere it is named: its shape's accessible name, the tooltip and\n   *  the table. A state with no value arrives with `value` 0. */\n  formatReadout: (state: StateFigure) => string;\n  /** Show a ranking of this many states beside the map (below it when the component is narrow).\n   *  Leave unset for no ranking. */\n  topN?: number;\n  /** What 100% is, for every share the component prints (readout, ranking, table). Defaults to the sum\n   *  of `values`; pass a larger whole count when some of what you counted has no state. Smaller than\n   *  the sum throws. */\n  total?: number;\n  className?: string;\n}\n\nconst TABLE_TITLE = \"Show as a table\";\n\nfunction legendLabel({ from, to }: LegendStep, formatValue: (n: number) => string): string {\n  if (from === 0) return `Up to ${formatValue(to)}`;\n  return from === to ? formatValue(to) : `${formatValue(from)} to ${formatValue(to)}`;\n}\n\nfunction Legend({ model, formatValue }: { model: ChoroplethModel; formatValue: (n: number) => string }) {\n  return (\n    <ul className=\"fd-uschoro-legend\" aria-label=\"Legend\">\n      <li>\n        <span className=\"fd-uschoro-swatch\" data-step=\"none\" aria-hidden=\"true\" />\n        None\n      </li>\n      {legendSteps(model.bounds).map((step) => (\n        <li key={step.step}>\n          <span className=\"fd-uschoro-swatch\" data-step={step.step} aria-hidden=\"true\" />\n          {legendLabel(step, formatValue)}\n        </li>\n      ))}\n    </ul>\n  );\n}\n\ninterface MapProps {\n  shapes: readonly StateShape[];\n  model: ChoroplethModel;\n  figures: ReadonlyMap<string, StateFigure>;\n  label: string;\n  formatReadout: (state: StateFigure) => string;\n}\n\n/** Where an arrow, Home or End key moves focus, as an offset into `US_STATE_CODES` (state-name order). */\nfunction nextCode(key: string, from: string): string | null {\n  const last = US_STATE_CODES.length - 1;\n  const at = US_STATE_CODES.indexOf(from);\n  const to = key === \"ArrowRight\" || key === \"ArrowDown\" ? at + 1 : key === \"ArrowLeft\" || key === \"ArrowUp\" ? at - 1 : key === \"Home\" ? 0 : key === \"End\" ? last : null;\n  return to === null ? null : US_STATE_CODES[Math.min(last, Math.max(0, to))];\n}\n\n/** The map: one tab stop, then arrow keys (and Home and End) walk the states in name order, the\n *  order of the table; the stop is the state last focused, so Tab comes back where the reader left.\n *  Hover and keyboard focus show a state's readout, a tap shows it on a touchscreen (see useTooltip). */\nfunction StateMap({ shapes, model, figures, label, formatReadout }: MapProps) {\n  const tip = useTooltip();\n  const [stop, setStop] = React.useState(US_STATE_CODES[0]);\n  const onKeyDown = (event: React.KeyboardEvent<SVGSVGElement>) => {\n    const from = (event.target as Element).getAttribute(\"data-state\");\n    const to = from && nextCode(event.key, from);\n    if (!to) return;\n    event.preventDefault();\n    (event.currentTarget.querySelector(`path[data-state=\"${to}\"]`) as SVGPathElement).focus();\n  };\n  const active = shapes.find((shape) => shape.code === tip.activeId);\n  return (\n    <div className=\"fd-uschoro-stage\">\n      <svg className=\"fd-uschoro-svg\" viewBox={`0 0 ${MAP_WIDTH} ${MAP_HEIGHT}`} role=\"group\" aria-label={label} onKeyDown={onKeyDown}>\n        {shapes.map((shape) => {\n          const figure = figures.get(shape.code)!;\n          const readout = formatReadout(figure);\n          const binding = tip.bind(shape.code, readout);\n          return (\n            <path\n              key={shape.code}\n              className=\"fd-uschoro-state\"\n              d={shape.path}\n              data-state={shape.code}\n              data-step={stepOf(figure.value, model.bounds) ?? \"none\"}\n              role=\"img\"\n              tabIndex={shape.code === stop ? 0 : -1}\n              aria-label={readout}\n              {...binding}\n              onFocus={(event) => { setStop(shape.code); binding.onFocus(event); }}\n            />\n          );\n        })}\n        {active ? <path className=\"fd-uschoro-active\" d={active.path} aria-hidden=\"true\" /> : null}\n      </svg>\n      {tip.bubble}\n    </div>\n  );\n}\n\n/** The table view: every state, its value and its share, biggest first. */\nfunction StateTable({ model, valueLabel, formatValue }: { model: ChoroplethModel; valueLabel: string; formatValue: (n: number) => string }) {\n  const columns: DataTableColumn[] = [\n    { key: \"name\", label: \"State\", phone: \"primary\" },\n    { key: \"value\", label: valueLabel, numeric: true, phone: \"secondary\", render: (row: StateFigure) => formatValue(row.value) },\n    { key: \"share\", label: \"Share of total\", numeric: true, phone: \"secondary\", render: (row: StateFigure) => formatShare(row.share) },\n  ];\n  return (\n    <Collapsible title={TABLE_TITLE}>\n      <DataTable columns={columns} rows={model.rows} rowKey=\"code\" compact />\n    </Collapsible>\n  );\n}\n\n/**\n * USChoropleth: a US map with each state shaded by a count, on the kit's sequential ramp\n * (`--seq-1..5`), with the legend that names what each shade means.\n *\n * The scale is equal steps in the square root of the count, so the many small states are told\n * apart and the few huge ones do not take every dark shade. A state with no value is drawn empty,\n * not as the lightest shade. Alaska and Hawaii are inset below the lower 48 (the geometry is\n * us-atlas's Albers USA projection, already laid out that way, so no projection runs in the\n * browser). Every state is a focusable shape named with its readout (the map is one tab stop and the arrow keys walk the states in name order, so a keyboard reader is not asked for 51 Tabs), shown as a tooltip on hover,\n * keyboard focus or tap (`useTooltip`: a shape cannot be wrapped in `Tooltip`'s span).\n *\n * `topN` adds a ranking, a `BarList`, beside the map when the component is wide enough and below\n * it when it is not: the component's own width decides (a container query), not the window's, since\n * the same card sits in different page widths. Every figure is also in the table behind \"Show as a\n * table\" (`Collapsible` and `DataTable`), which is the text alternative to the map.\n *\n * The outlines and the geo libraries (d3-geo, topojson-client, us-atlas) are one separate chunk,\n * fetched when the map first renders; the legend, ranking and table show at once.\n */\nexport function USChoropleth({ values, label, valueLabel, formatValue, formatReadout, topN, total, className = \"\" }: USChoroplethProps) {\n  const model = React.useMemo(() => buildChoroplethModel(values, topN ?? 0, total), [values, topN, total]);\n  const figures = React.useMemo(() => new Map(model.rows.map((row) => [row.code, row])), [model]);\n  const { state, retry } = useUsStateShapes();\n\n  return (\n    <div className={[\"fd-uschoro\", className].filter(Boolean).join(\" \")}>\n      <div className=\"fd-uschoro-layout\">\n        <div className=\"fd-uschoro-main\">\n          <LoadingRegion\n            state={state.status}\n            label={`${label} loading`}\n            error={state.status === \"error\" ? state.message : undefined}\n            onRetry={retry}\n            skeleton={<div className=\"fd-uschoro-skeleton\"><Skeleton h=\"100%\" /></div>}\n          >\n            {state.status === \"ready\" ? (\n              <StateMap shapes={state.shapes} model={model} figures={figures} label={label} formatReadout={formatReadout} />\n            ) : null}\n          </LoadingRegion>\n          <Legend model={model} formatValue={formatValue} />\n        </div>\n        {topN ? (\n          <div className=\"fd-uschoro-top\">\n            <BarList\n              label={`Top ${topN} states`}\n              rows={model.top.map((row) => ({ id: row.code, label: row.name, value: row.value, color: \"var(--seq-4)\" }))}\n              valueFormat={formatValue}\n              total={model.total}\n              shareFormat={formatShare}\n              sort={false}\n            />\n          </div>\n        ) : null}\n      </div>\n      <StateTable model={model} valueLabel={valueLabel} formatValue={formatValue} />\n    </div>\n  );\n}\n","/** The map's coordinate space: us-atlas's `states-albers-10m` is already projected (Albers USA, with\n *  Alaska and Hawaii inset) into this box, so no projection runs in the browser. Kept apart from\n *  usStateShapes.ts so the component can size its SVG without importing the geometry chunk. */\nexport const MAP_WIDTH = 975;\nexport const MAP_HEIGHT = 610;\n","import { US_STATES, isUsStateCode, type UsState } from \"./usStates\";\n\n/** How many shades the sequential ramp (`--seq-1..5`) has. */\nexport const SEQ_STEPS = 5;\n\nexport interface ChoroplethValue {\n  /** USPS postal code: \"CA\", \"DC\". */\n  state: string;\n  /** A whole, non-negative count. 0 reads as no value. */\n  value: number;\n}\n\nexport interface StateFigure extends UsState {\n  value: number;\n  /** Fraction (0 to 1) of every value given. */\n  share: number;\n}\n\nexport interface ChoroplethModel {\n  total: number;\n  /** Value per state code, for every state that has one. */\n  byCode: ReadonlyMap<string, number>;\n  /** The biggest states, at most the N asked for. States with no value are never in it. */\n  top: StateFigure[];\n  /** Every state, biggest first: the table's rows. */\n  rows: StateFigure[];\n  /** The upper bound of each step, in value, `SEQ_STEPS` of them. */\n  bounds: number[];\n  /** A value as a fraction (0 to 1) of `total`; 0 while the total is 0. */\n  share: (value: number) => number;\n}\n\n/** Equal steps in the square root of the value, so many small states are told apart and the few\n *  huge ones do not take every dark shade: bound k is `max * (k / steps)^2`, rounded up to a whole\n *  count. Integer arithmetic until the one division, so an exact bound is never nudged up by float error\n *  (1000 * 0.16 is 160.00000000000003). */\nfunction scaleBounds(max: number): number[] {\n  return Array.from({ length: SEQ_STEPS }, (_, i) => Math.ceil((max * (i + 1) ** 2) / SEQ_STEPS ** 2));\n}\n\n/** The shade (1 lightest to `SEQ_STEPS` darkest) for a value; null for none, which is drawn empty\n *  rather than as the lightest shade. A bound belongs to its own step. */\nexport function stepOf(value: number, bounds: readonly number[]): number | null {\n  if (value <= 0) return null;\n  const index = bounds.findIndex((bound) => value <= bound);\n  if (index === -1) throw new Error(`USChoropleth: ${value} is above the scale's top bound ${bounds[bounds.length - 1]}`);\n  return index + 1;\n}\n\nexport interface LegendStep {\n  step: number;\n  /** The smallest whole count in the step (0 for the first, which reads \"up to\"). */\n  from: number;\n  to: number;\n}\n\n/** The ranges the legend names. A step no whole count can fall in (the bounds round up, so a small\n *  maximum repeats one) is left out, never shown as a backwards range. */\nexport function legendSteps(bounds: readonly number[]): LegendStep[] {\n  const steps: LegendStep[] = [];\n  bounds.forEach((to, index) => {\n    const from = index === 0 ? 0 : bounds[index - 1] + 1;\n    if (to >= from && to > 0) steps.push({ step: index + 1, from, to });\n  });\n  return steps;\n}\n\n/** A share of the total for a label: whole percent from 10%, one decimal below it, \"<0.1%\" for a\n *  share too small to show one, and never \"0%\" for a state that has a value. */\nexport function formatShare(share: number): string {\n  if (share <= 0) return \"0%\";\n  const percent = share * 100;\n  if (percent < 0.05) return \"<0.1%\";\n  const tenths = Math.round(percent * 10) / 10;\n  return tenths >= 10 ? `${Math.round(percent)}%` : `${tenths.toFixed(1)}%`;\n}\n\n/** Biggest value first. Equal values keep the table's state-name order: the sort is stable and the rows start\n *  in `US_STATES` order, which a test pins as name order, so no tie-break clause is needed. */\nconst byValue = (a: StateFigure, b: StateFigure) => b.value - a.value;\n\n/** Validates `values` and derives everything the map, legend, ranking and table show. A code that is\n *  not a state, a state given twice, a value that is not a whole count or a `givenTotal` below the sum of\n *  the values is a caller's bug and throws. `givenTotal` is what 100% is; it defaults to the sum. */\nexport function buildChoroplethModel(values: readonly ChoroplethValue[], topN: number, givenTotal?: number): ChoroplethModel {\n  const byCode = new Map<string, number>();\n  let sum = 0;\n  for (const { state, value } of values) {\n    if (!isUsStateCode(state)) throw new Error(`USChoropleth: \"${state}\" is not a US state code`);\n    if (byCode.has(state)) throw new Error(`USChoropleth: ${state} is given more than once`);\n    if (!Number.isInteger(value) || value < 0) {\n      throw new Error(`USChoropleth: the value for ${state} must be a whole count of 0 or more, got ${value}`);\n    }\n    byCode.set(state, value);\n    sum += value;\n  }\n  if (givenTotal !== undefined && !(Number.isInteger(givenTotal) && givenTotal >= sum)) {\n    throw new Error(`USChoropleth: total must be a whole count of at least the sum of values (${sum}), got ${givenTotal}`);\n  }\n  const total = givenTotal ?? sum;\n  const share = (value: number) => (total === 0 ? 0 : value / total);\n  const rows = US_STATES.map((state) => {\n    const value = byCode.get(state.code) ?? 0;\n    return { ...state, value, share: share(value) };\n  }).sort(byValue);\n  return {\n    total,\n    byCode,\n    top: rows.filter((row) => row.value > 0).slice(0, topN),\n    rows,\n    bounds: scaleBounds(Math.max(0, ...byCode.values())),\n    share,\n  };\n}\n","import * as React from \"react\";\nimport type { StateShape } from \"./usStateShapes\";\n\nexport type StateShapesState =\n  | { status: \"loading\" }\n  | { status: \"ready\"; shapes: readonly StateShape[] }\n  | { status: \"error\"; message: string };\n\ntype Settled = Exclude<StateShapesState, { status: \"loading\" }>;\n\n/** The map's geometry, fetched on first use as its own chunk (see usStateShapes.ts): a consumer's main\n *  bundle never carries it. Derives \"loading\" from a token mismatch, so the effect never sets state in\n *  its own body and a retry shows loading again. */\nexport function useUsStateShapes(): { state: StateShapesState; retry: () => void } {\n  const [token, setToken] = React.useState(0);\n  const [settled, setSettled] = React.useState<{ token: number; state: Settled } | null>(null);\n\n  React.useEffect(() => {\n    let current = true;\n    import(\"./usStateShapes\")\n      .then(({ STATE_SHAPES }) => {\n        if (current) setSettled({ token, state: { status: \"ready\", shapes: STATE_SHAPES } });\n      })\n      .catch((err: unknown) => {\n        if (current) setSettled({ token, state: { status: \"error\", message: err instanceof Error ? err.message : String(err) } });\n      });\n    return () => { current = false; };\n  }, [token]);\n\n  const state: StateShapesState = settled && settled.token === token ? settled.state : { status: \"loading\" };\n  return { state, retry: () => setToken((t) => t + 1) };\n}\n","export { AnimNum } from \"./AnimNum\";\nexport type { AnimNumProps } from \"./AnimNum\";\n\nexport { TrendChart } from \"./TrendChart\";\nexport type { TrendChartProps, TrendSeries } from \"./TrendChart\";\n\nexport { DonutChart } from \"./DonutChart\";\nexport type { DonutChartProps, DonutSegment } from \"./DonutChart\";\n\nexport { BarList } from \"./BarList\";\nexport type { BarListProps, BarListRow } from \"./BarList\";\n\nexport { FunnelChart } from \"./FunnelChart\";\nexport type { FunnelChartProps, FunnelStep } from \"./FunnelChart\";\n\nexport { Clamp } from \"./Clamp\";\nexport type { ClampProps } from \"./Clamp\";\n\nexport { CsiBadge, CsiMeter, CsiHero } from \"./CsiBadge\";\nexport type { CsiBadgeProps, CsiMeterProps, CsiHeroProps } from \"./CsiBadge\";\n\nexport { DataTable } from \"./DataTable\";\nexport type { DataTableColumn, DataTableColumnLabel, DataTablePhoneRole, DataTableProps, DataTableRowAction } from \"./DataTable\";\n\nexport { FilterBar, validateFilterValue } from \"./FilterBar\";\nexport type {\n  FilterField,\n  FilterFieldText,\n  FilterFieldSelect,\n  FilterFieldFixed,\n  FilterFieldHelp,\n  FilterFieldMultiSelect,\n  FilterFieldRange,\n  FilterFieldDate,\n  FilterFieldOption,\n  FilterOperator,\n  FilterValue,\n  FilterMultiSelectValue,\n  FilterRangeValue,\n  FilterDateValue,\n  FilterResolveMatch,\n  FilterResolveResult,\n  FilterBarProps,\n  FilterValidation,\n} from \"./FilterBar\";\n\nexport { InfoButton } from \"./InfoButton\";\nexport type { InfoButtonProps } from \"./InfoButton\";\n\nexport { StatGrid } from \"./StatGrid\";\nexport type { StatGridProps } from \"./StatGrid\";\nexport { StatTile } from \"./StatTile\";\nexport type { StatTileProps } from \"./StatTile\";\n\nexport { CodeBlock, DiffBlock, languageLabel, tokenize } from \"./CodeBlock\";\nexport type { CodeBlockProps, DiffBlockProps } from \"./CodeBlock\";\n\nexport { Markdown, MarkdownInline, markdownToText } from \"./Markdown\";\nexport type { MarkdownProps, MarkdownSize, MarkdownTone } from \"./Markdown\";\n\nexport { Meter } from \"./Meter\";\nexport type { MeterSegment, MeterProps } from \"./Meter\";\n\nexport { Pagination, pluralizeUnit } from \"./Pagination\";\nexport type { PaginationProps } from \"./Pagination\";\n\nexport { RelativeTime, formatRelative, formatAbsolute, formatClock, formatDuration } from \"./RelativeTime\";\nexport type { RelativeTimeProps } from \"./RelativeTime\";\n\nexport { ScoreMeter } from \"./ScoreMeter\";\nexport type { ScoreMeterProps } from \"./ScoreMeter\";\n\nexport { SegmentedMeter, QuotaRow, meterFormats } from \"./SegmentedMeter\";\nexport type { MeterSegmentInput, SegmentedMeterProps, QuotaRowProps } from \"./SegmentedMeter\";\n\nexport { SortMenu } from \"./SortMenu\";\nexport type { SortDirection, SortEntry, SortMenuField, SortMenuProps } from \"./SortMenu\";\n\nexport { StepList } from \"./StepList\";\nexport type { Step, StepListProps } from \"./StepList\";\n\nexport { VirtualList, computeVirtualWindow, computeNeedMore, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP } from \"./VirtualList\";\nexport type { VirtualListProps, VirtualWindow, VirtualLoadedBand } from \"./VirtualList\";\n\nexport { EntityRow, EntityRowMetrics, ENTITY_ROW_METRIC_WIDTH } from \"./EntityRow\";\nexport type { EntityRowProps, EntityRowContent, EntityRowAction, EntityRowMetric, EntityRowMetricsProps } from \"./EntityRow\";\n\nexport { TransferList } from \"./TransferList\";\nexport type { TransferListProps, TransferListSideProps, TransferListSide } from \"./TransferList\";\n\nexport { FactList } from \"./FactList\";\nexport type { Fact, FactListProps } from \"./FactList\";\n\nexport { USChoropleth } from \"./USChoropleth\";\nexport { US_STATE_CODES, isUsStateCode } from \"./usChoropleth/usStates\";\nexport { formatShare } from \"./usChoropleth/model\";\nexport type { USChoroplethProps, USChoroplethState, USChoroplethValue } from \"./USChoropleth\";\n\nexport { ReferenceList } from \"./ReferenceList\";\nexport type { ReferenceEntry, ReferenceSection, ReferenceListProps } from \"./ReferenceList\";\n","import * as React from \"react\";\nimport { Collapsible } from \"../surfaces/Collapsible\";\nimport { SearchField } from \"../forms/SearchField\";\n\nexport interface ReferenceEntry {\n  /** What is being defined: a column, a glossary word, an API field. Also its identity within its list. */\n  term: string;\n  /** A small type label beside the term, such as `STRING` or `ARRAY<STRING>`. */\n  tag?: string;\n  /** Shown in full and wrapped, never truncated. */\n  description?: React.ReactNode;\n  /** Controls at the entry's right, e.g. a CopyButton. */\n  actions?: React.ReactNode;\n}\n\nexport interface ReferenceSection {\n  /** Identity of the section, unique within the list. */\n  id: string;\n  title: React.ReactNode;\n  /** One line under the title. */\n  subtitle?: React.ReactNode;\n  /** Controls in the section's heading row, outside the open/close button, e.g. a CopyButton for the section's name. */\n  actions?: React.ReactNode;\n  entries: ReferenceEntry[];\n  /** Uncontrolled initial state. Default closed. */\n  defaultOpen?: boolean;\n  /** Controlled state; pair with `onToggle`. */\n  open?: boolean;\n  onToggle?: (open: boolean) => void;\n}\n\ninterface ReferenceListBase extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n  /** Render terms in the monospace face. */\n  mono?: boolean;\n  /** Show a labelled search box that filters by term or description text. */\n  searchable?: boolean;\n  /** The search box's label. Default \"Search\". */\n  searchLabel?: string;\n  /** Shown when a search matches nothing. Default \"No matches\". */\n  emptyMessage?: React.ReactNode;\n  className?: string;\n}\nexport type ReferenceListProps =\n  | (ReferenceListBase & { entries: ReferenceEntry[]; sections?: undefined })\n  | (ReferenceListBase & { sections: ReferenceSection[]; entries?: undefined });\n\n/** The visible text of a node, for matching a search against a description. */\nfunction textOf(node: React.ReactNode): string {\n  if (node == null || typeof node === \"boolean\") return \"\";\n  if (typeof node === \"string\" || typeof node === \"number\") return String(node);\n  if (Array.isArray(node)) return node.map(textOf).join(\" \");\n  if (React.isValidElement(node)) return textOf((node.props as { children?: React.ReactNode }).children);\n  return \"\";\n}\n\nfunction matches(entry: ReferenceEntry, needle: string): boolean {\n  return entry.term.toLowerCase().includes(needle) || textOf(entry.description).toLowerCase().includes(needle);\n}\n\nfunction Entries({ entries, mono }: { entries: ReferenceEntry[]; mono: boolean }) {\n  return (\n    <dl className=\"fd-ref-entries\">\n      {entries.map((e) => (\n        <div key={e.term} className=\"fd-ref-entry\">\n          <dt className=\"fd-ref-head\">\n            <span className={\"fd-ref-term\" + (mono ? \" is-mono\" : \"\")}>{e.term}</span>\n            {e.tag ? <span className=\"fd-badge fd-badge-neutral fd-ref-tag\">{e.tag}</span> : null}\n          </dt>\n          {e.description ? <dd className=\"fd-ref-desc\">{e.description}</dd> : null}\n          {e.actions ? <dd className=\"fd-ref-actions\">{e.actions}</dd> : null}\n        </div>\n      ))}\n    </dl>\n  );\n}\n\n/**\n * A reference as a definition list: each entry is a term (with an optional type tag), its full\n * wrapped description and optional actions. Entries can sit in collapsible sections, and an\n * optional search filters by term or description (case-insensitive): while a query is typed\n * every section with a match is open, empty sections are hidden, the match count is announced,\n * and clearing the query puts every section back to the state it had before.\n */\nexport function ReferenceList(props: ReferenceListProps) {\n  const { mono = false, searchable = false, searchLabel = \"Search\", emptyMessage = \"No matches\", className = \"\", ...divProps } = props;\n  const { entries, sections, ...rest } = divProps as typeof divProps & Pick<ReferenceListProps, \"entries\" | \"sections\">;\n  const [query, setQuery] = React.useState(\"\");\n  const [searchOpen, setSearchOpen] = React.useState<Record<string, boolean>>({});\n  const [uncontrolled, setUncontrolled] = React.useState<Record<string, boolean>>({});\n  const needle = searchable ? query.trim().toLowerCase() : \"\";\n  const searching = needle !== \"\";\n\n  const onQuery = (value: string) => {\n    setQuery(value);\n    setSearchOpen({});\n  };\n\n  let total = 0;\n  let body: React.ReactNode;\n  if (sections) {\n    const visible = sections\n      .map((s) => ({ s, shown: searching ? s.entries.filter((e) => matches(e, needle)) : s.entries }))\n      .filter(({ shown }) => !searching || shown.length > 0);\n    total = visible.reduce((n, v) => n + v.shown.length, 0);\n    body = visible.map(({ s, shown }) => {\n      const baseOpen = s.open ?? uncontrolled[s.id] ?? s.defaultOpen ?? false;\n      const open = searching ? searchOpen[s.id] ?? true : baseOpen;\n      return (\n        <Collapsible\n          key={s.id}\n          className=\"fd-ref-section\"\n          title={s.title}\n          subtitle={s.subtitle}\n          actions={s.actions}\n          badge={<span className=\"fd-badge fd-badge-count\">{searching ? `${shown.length} of ${s.entries.length}` : s.entries.length}</span>}\n          open={open}\n          onToggle={(next) => {\n            // While searching, a toggle changes only this temporary view: the host's state (and\n            // its onToggle) is what clearing the search puts back.\n            if (searching) {\n              setSearchOpen((m) => ({ ...m, [s.id]: next }));\n              return;\n            }\n            if (s.open === undefined) setUncontrolled((m) => ({ ...m, [s.id]: next }));\n            s.onToggle?.(next);\n          }}\n        >\n          <Entries entries={shown} mono={mono} />\n        </Collapsible>\n      );\n    });\n  } else {\n    const shown = searching ? entries.filter((e) => matches(e, needle)) : entries;\n    total = shown.length;\n    body = shown.length > 0 ? <Entries entries={shown} mono={mono} /> : null;\n  }\n\n  return (\n    <div className={[\"fd-ref\", className].filter(Boolean).join(\" \")} {...rest}>\n      {searchable ? (\n        <div className=\"fd-ref-search\">\n          <SearchField label={searchLabel} value={query} onChange={onQuery} />\n          <p className=\"fd-ref-status\" role=\"status\" aria-live=\"polite\">\n            {searching ? `${total} ${total === 1 ? \"match\" : \"matches\"}` : \"\"}\n          </p>\n        </div>\n      ) : null}\n      {searching && total === 0 ? <p className=\"fd-ref-empty\">{emptyMessage}</p> : <div className=\"fd-ref-body\">{body}</div>}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * Multi-select control with a 44px comfortable hit area.\n */\nexport interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {\n  label: React.ReactNode;\n  description?: React.ReactNode;\n  /** Renders as a bordered selectable card — for the big, calm choices. */\n  card?: boolean;\n  indeterminate?: boolean;\n}\n\nexport function Checkbox({ label, description, card = false, indeterminate = false, className = \"\", ...rest }: CheckboxProps) {\n  const ref = React.useRef<HTMLInputElement>(null);\n  React.useEffect(() => { if (ref.current) ref.current.indeterminate = indeterminate; }, [indeterminate]);\n  return (\n    <label className={[\"fd-choice\", card ? \"fd-choice-card\" : \"\", className].filter(Boolean).join(\" \")}>\n      <span className=\"fd-choice-input\">\n        <input ref={ref} type=\"checkbox\" {...rest} />\n        <span className=\"fd-choice-box\" aria-hidden=\"true\">\n          <i className={indeterminate ? \"ph ph-minus\" : \"ph ph-check\"} />\n        </span>\n      </span>\n      <span className=\"fd-choice-text\">\n        <span className=\"fd-choice-title\">{label}</span>\n        {description ? <span className=\"fd-choice-desc\">{description}</span> : null}\n      </span>\n    </label>\n  );\n}\n","import * as React from \"react\";\n\n/** One-of-many control. Share a name across the group. */\nexport interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {\n  label: React.ReactNode;\n  description?: React.ReactNode;\n  card?: boolean;\n  /** Trailing slot beside the label, e.g. a \"Recommended\" Badge. */\n  badge?: React.ReactNode;\n}\n\nexport function Radio({ label, description, badge, card = false, className = \"\", ...rest }: RadioProps) {\n  return (\n    <label className={[\"fd-choice\", card ? \"fd-choice-card\" : \"\", className].filter(Boolean).join(\" \")}>\n      <span className=\"fd-choice-input\">\n        <input type=\"radio\" {...rest} />\n        <span className=\"fd-choice-box fd-choice-box-round\" aria-hidden=\"true\"><span className=\"fd-choice-dot\" /></span>\n      </span>\n      <span className=\"fd-choice-text\">\n        <span className=\"fd-choice-title\">{label}{badge ? <span className=\"fd-choice-badge\">{badge}</span> : null}</span>\n        {description ? <span className=\"fd-choice-desc\">{description}</span> : null}\n      </span>\n    </label>\n  );\n}\n","import * as React from \"react\";\n\n/** An immediate on/off setting — no Save button. Use Checkbox inside forms instead. */\nexport interface SwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {\n  label?: React.ReactNode;\n  description?: React.ReactNode;\n}\n\nexport function Switch({ label, description, className = \"\", ...rest }: SwitchProps) {\n  return (\n    <label className={[\"fd-switch\", className].filter(Boolean).join(\" \")}>\n      <input type=\"checkbox\" role=\"switch\" {...rest} />\n      <span className=\"fd-switch-track\"><span className=\"fd-switch-thumb\" /></span>\n      {label ? (\n        <span className=\"fd-choice-text\">\n          <span className=\"fd-switch-label\">{label}</span>\n          {description ? <span className=\"fd-choice-desc\">{description}</span> : null}\n        </span>\n      ) : null}\n    </label>\n  );\n}\n","import * as React from \"react\";\nimport { Popover } from \"../actions/Popover\";\nimport { FieldLabel, HiddenFieldLabel, useTriggerLabelling } from \"./field\";\nimport { truncationTitle } from \"../textExposure\";\nimport { useListboxNav, useListboxScrollIntoView } from \"./listbox\";\n\n/** Rich popover select: animated listbox, keyboard nav + type-ahead, search over 8 options, option icons, descriptions, meta and groups. API-compatible with the old native select. */\nexport interface SelectOption { value: string; label: string; description?: string; icon?: string; meta?: any; group?: string; disabled?: boolean }\nexport interface SelectProps {\n  label?: string; help?: string; error?: string;\n  /** Names the field when it has no visible `label` (the trigger is then named \"<aria-label> <selected option>\"). */\n  \"aria-label\"?: string;\n  options: Array<string | SelectOption>;\n  placeholder?: string; required?: boolean; disabled?: boolean;\n  /** Options still arriving — the control locks and shows a spinner. */\n  loading?: boolean;\n  /** Force the search box on/off; default: on when over 8 options. */\n  searchable?: boolean;\n  /** Show an x that clears back to placeholder. */\n  clearable?: boolean;\n  /** Pick several: `value` is an array, the popover stays open, options get\n   *  checkboxes, and a footer offers Select all / Clear. */\n  multiple?: boolean;\n  /** With `multiple`, override the collapsed box text for 2+ selections. */\n  summary?: (values: string[]) => string;\n  value?: string | string[];\n  /** Called with {target:{value}} like a native select — an array when `multiple`. */\n  onChange?: (e: any) => void;\n  /** Applied to the outer .fd-field element — this is where width belongs. */\n  style?: any; className?: string;\n  /** Element id — lands on the trigger button, with the label's own id derived\n   *  from it. Generated when omitted, so `label` names the trigger either way. */\n  id?: string;\n}\n\nconst norm = (o: string | SelectOption): SelectOption => (typeof o === \"string\" ? { value: o, label: o } : o);\n\nexport function Select({\n  label, help, error, options = [], placeholder = \"Select…\", required = false,\n  disabled = false, loading = false, value, onChange, searchable, clearable = false,\n  multiple = false, summary,\n  id, className = \"\", style, \"aria-label\": hiddenLabel\n}: SelectProps) {\n  const opts = options.map(norm);\n  const vals = multiple ? (Array.isArray(value) ? value : value ? [value] : []) : [];\n  const isOn = (v: string) => (multiple ? vals.includes(v) : v === value);\n  const hasSearch = searchable === undefined ? opts.length > 8 : searchable;\n  const { fieldId, labelId, ariaLabelledBy } = useTriggerLabelling(label, id, hiddenLabel);\n  const [open, setOpen] = React.useState(false);\n  const [q, setQ] = React.useState(\"\");\n  const rootRef = React.useRef<HTMLDivElement>(null);\n  const boxRef = React.useRef<HTMLDivElement>(null);\n  const listRef = React.useRef<HTMLDivElement>(null);\n  const typeBuf = React.useRef({ s: \"\", t: 0 });\n  const selected = multiple ? null : opts.find((o) => o.value === value);\n  const chosen = multiple ? opts.filter((o) => vals.includes(o.value)) : [];\n  const boxText = multiple\n    ? (chosen.length === 0 ? placeholder\n      : chosen.length === 1 ? chosen[0].label\n        : summary ? summary(chosen.map((o) => o.value)) : chosen.length + \" selected\")\n    : (selected ? selected.label : placeholder);\n\n  const visible = q ? opts.filter((o) => (o.label + \" \" + (o.description || \"\") + \" \" + (o.group || \"\")).toLowerCase().includes(q.toLowerCase())) : opts;\n\n  const fire = (v: string | string[]) => { onChange && onChange({ target: { value: v } }); };\n  const pick = (o: SelectOption) => {\n    if (o.disabled) return;\n    if (multiple) { fire(vals.includes(o.value) ? vals.filter((v) => v !== o.value) : [...vals, o.value]); return; }\n    fire(o.value); setOpen(false);\n  };\n  // Active-index math, Home/End and scroll-into-view live in one place (./listbox) shared\n  // with FilterBar's multi-select — pick() already no-ops on a disabled option, so routing\n  // Enter through nav.activate() keeps that check intact.\n  const nav = useListboxNav({ count: visible.length, onSelect: (i) => pick(visible[i]) });\n  useListboxScrollIntoView(nav.active, listRef, open);\n  const toggle = () => {\n    if (disabled || loading) return;\n    if (!open) { setQ(\"\"); nav.setActive(Math.max(0, opts.findIndex((o) => isOn(o.value)))); }\n    setOpen(!open);\n  };\n\n  const onKey = (e: React.KeyboardEvent<HTMLElement>) => {\n    if (disabled) return;\n    if (!open && (e.key === \"Enter\" || e.key === \" \" || e.key === \"ArrowDown\" || e.key === \"ArrowUp\")) { e.preventDefault(); toggle(); return; }\n    if (!open) {\n      if (e.key.length === 1 && /\\S/.test(e.key)) {\n        const now = Date.now();\n        typeBuf.current = { s: (now - typeBuf.current.t < 700 ? typeBuf.current.s : \"\") + e.key.toLowerCase(), t: now };\n        const hit = opts.find((o) => o.label.toLowerCase().startsWith(typeBuf.current.s));\n        if (hit && !multiple) fire(hit.value);\n      }\n      return;\n    }\n    // MP-248: Escape is not handled here: the listbox's Popover layer closes it (see\n    // kits/layerStack.tsx), so the press never also reaches a Drawer or Modal around it.\n    if (e.key === \"ArrowDown\") { e.preventDefault(); nav.move(1); }\n    else if (e.key === \"ArrowUp\") { e.preventDefault(); nav.move(-1); }\n    else if (e.key === \"Home\") { e.preventDefault(); nav.first(); }\n    else if (e.key === \"End\") { e.preventDefault(); nav.last(); }\n    else if (e.key === \"Enter\") { e.preventDefault(); nav.activate(); }\n    else if (e.key === \"Tab\") setOpen(false);\n  };\n\n  const groups: { g: string; items: { o: SelectOption; i: number }[] }[] = [];\n  visible.forEach((o, i) => {\n    const g = o.group || \"\";\n    const last = groups[groups.length - 1];\n    if (!last || last.g !== g) groups.push({ g, items: [{ o, i }] });\n    else last.items.push({ o, i });\n  });\n\n  const box = [\"fd-input\", \"fd-select\", error ? \"fd-input-error\" : \"\", disabled ? \"fd-input-disabled\" : \"\"].filter(Boolean).join(\" \");\n  return (\n    <div className={[\"fd-field\", \"fd-popfield\", open ? \"is-open\" : \"\", className].filter(Boolean).join(\" \")} style={style} ref={rootRef}>\n      {label ? <FieldLabel id={labelId} required={required} onClick={toggle}>{label}</FieldLabel> : <HiddenFieldLabel id={labelId}>{hiddenLabel}</HiddenFieldLabel>}\n      <div className={box} style={{ cursor: disabled ? \"not-allowed\" : \"pointer\" }} ref={boxRef}>\n        <button type=\"button\" id={fieldId} disabled={disabled || loading} onClick={toggle} onKeyDown={onKey}\n          role=\"combobox\" aria-expanded={open} aria-haspopup=\"listbox\" aria-labelledby={ariaLabelledBy}\n          style={{ all: \"unset\", flex: 1, minWidth: 0, display: \"flex\", alignItems: \"center\", gap: 8, cursor: \"inherit\", overflow: \"hidden\" }}>\n          {selected && selected.icon ? <i className={\"ph ph-\" + selected.icon} style={{ flex: \"none\", color: \"var(--text-2)\" }} /> : null}\n          <span title={truncationTitle(boxText)} style={{ overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\", color: (multiple ? chosen.length : selected) ? \"var(--text)\" : \"var(--text-muted)\" }}>\n            {boxText}\n          </span>\n          {multiple && chosen.length > 1 ? <span className=\"fd-mono\" style={{ flex: \"none\", fontSize: 11, fontWeight: 700, padding: \"1px 6px\", borderRadius: 99, background: \"var(--brand)\", color: \"#fff\" }}>{chosen.length}</span> : null}\n        </button>\n        {clearable && (multiple ? chosen.length > 0 : selected) && !loading ? (\n          <button type=\"button\" aria-label=\"Clear\" onClick={(e) => { e.stopPropagation(); fire(multiple ? [] : \"\"); }}\n            style={{ all: \"unset\", cursor: \"pointer\", color: \"var(--text-muted)\", display: \"grid\", placeItems: \"center\", padding: 2 }}>\n            <i className=\"ph ph-x-circle\" style={{ fontSize: 15 }} />\n          </button>) : null}\n        {loading\n          ? <span className=\"fd-spinner\" style={{ color: \"var(--text-muted)\" }} aria-label=\"Loading options\" />\n          : <span className=\"fd-select-caret\" onClick={toggle}><i className=\"ph ph-caret-down\" aria-hidden=\"true\" /></span>}\n      </div>\n      <Popover\n        open={open} anchorRef={boxRef} triggerRef={rootRef} onClose={() => setOpen(false)}\n        placement=\"bottom-start\" offset={6} matchWidth=\"min\" minWidth={260} role=\"presentation\"\n        style={{ maxWidth: 380 }}\n        header={hasSearch ? (\n          <div className=\"fd-pop-search\">\n            <i className=\"ph ph-magnifying-glass\" style={{ color: \"var(--text-muted)\", fontSize: 14 }} />\n            <input autoFocus placeholder=\"Search…\" value={q} onKeyDown={onKey}\n              onChange={(e) => { setQ(e.target.value); nav.setActive(0); }} />\n            {q ? <span className=\"fd-body-sm fd-muted\">{visible.length}</span> : null}\n          </div>) : undefined}\n        footer={multiple ? (\n          <React.Fragment>\n            <button type=\"button\" onClick={() => fire(visible.filter((o) => !o.disabled).map((o) => o.value))}\n              style={{ all: \"unset\", cursor: \"pointer\", fontSize: \"var(--body-sm-size)\", fontWeight: 600, color: \"var(--brand)\" }}>Select all</button>\n            <span style={{ flex: 1 }} />\n            <span className=\"fd-body-sm fd-muted\">{vals.length} of {opts.length}</span>\n            <button type=\"button\" disabled={!vals.length} onClick={() => fire([])}\n              style={{ all: \"unset\", cursor: vals.length ? \"pointer\" : \"default\", fontSize: \"var(--body-sm-size)\", fontWeight: 600, color: vals.length ? \"var(--text-2)\" : \"var(--text-muted)\" }}>Clear</button>\n          </React.Fragment>) : undefined}\n      >\n        <div className=\"fd-pop-list\" role=\"listbox\" aria-multiselectable={multiple || undefined} ref={listRef}>\n          {visible.length === 0 ? <div className=\"fd-pop-empty\">Nothing matches \"{q}\".</div> : groups.map((grp) => (\n            <React.Fragment key={grp.g || \"_\"}>\n              {grp.g ? <div className=\"fd-pop-group\">{grp.g}</div> : null}\n              {grp.items.map(({ o, i }) => (\n                <button type=\"button\" key={String(o.value)} data-i={i} role=\"option\" aria-selected={isOn(o.value)}\n                  aria-disabled={o.disabled || undefined}\n                  className={[\"fd-opt\", i === nav.active ? \"is-active\" : \"\", isOn(o.value) ? \"is-selected\" : \"\"].filter(Boolean).join(\" \")}\n                  onMouseEnter={() => nav.setActive(i)} onClick={() => pick(o)}>\n                  {multiple ? (\n                    <span aria-hidden=\"true\" style={{ flex: \"none\", display: \"grid\", placeItems: \"center\", width: 16, height: 16, borderRadius: 4, border: \"1.5px solid \" + (isOn(o.value) ? \"var(--brand)\" : \"var(--border-strong, var(--border))\"), background: isOn(o.value) ? \"var(--brand)\" : \"var(--surface)\", color: \"#fff\" }}>\n                      {isOn(o.value) ? <i className=\"ph ph-check\" style={{ fontSize: 11 }} /> : null}\n                    </span>) : null}\n                  {o.icon ? <span className=\"fd-opt-icon\"><i className={\"ph ph-\" + o.icon} /></span> : null}\n                  <span style={{ flex: 1, minWidth: 0 }}>\n                    <span className=\"fd-opt-label\">{o.label}</span>\n                    {o.description ? <span className=\"fd-opt-desc\">{o.description}</span> : null}\n                  </span>\n                  {o.meta ? <span className=\"fd-opt-meta\">{o.meta}</span> : null}\n                  {multiple ? null : <span className=\"fd-opt-check\">{o.value === value ? <i className=\"ph ph-check\" /> : null}</span>}\n                </button>\n              ))}\n            </React.Fragment>\n          ))}\n        </div>\n      </Popover>\n      {error ? <span className=\"fd-field-error\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{error}</span>\n        : help ? <span className=\"fd-field-help\">{help}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Popover } from \"../actions/Popover\";\nimport { FieldLabel, useTriggerLabelling } from \"./field\";\n\nconst pad = (n: number) => String(n).padStart(2, \"0\");\n\n/** Analog clock-face time field: tap or drag the hand to set the hour, auto-advances to minutes; AM/PM chips; \"Now\" shortcut. Value is 24h \"HH:MM\". */\nexport interface TimePickerProps {\n  label?: string; help?: string; error?: string;\n  required?: boolean; disabled?: boolean;\n  /** 24h \"HH:MM\", e.g. \"14:30\". */\n  value?: string;\n  /** Called with {target:{value}}. */\n  onChange?: (e: any) => void;\n  placeholder?: string;\n  /** Element id — lands on the trigger button, with the label's own id derived\n   *  from it. Generated when omitted, so `label` names the trigger either way. */\n  id?: string;\n  style?: any; className?: string;\n}\n\n/** The bare clock face, for embedding (e.g. below a Calendar). */\nexport interface ClockFaceProps { value?: string; onChange: (v: string) => void }\n\nexport function ClockFace({ value = \"09:00\", onChange }: ClockFaceProps) {\n  let [h24, m] = value.split(\":\").map(Number);\n  if (isNaN(h24)) h24 = 9;\n  if (isNaN(m)) m = 0;\n  const pm = h24 >= 12;\n  const h12 = h24 % 12 === 0 ? 12 : h24 % 12;\n  const [mode, setMode] = React.useState(\"h\"); // h | m\n  const faceRef = React.useRef<HTMLDivElement>(null);\n  const dragging = React.useRef(false);\n  const set = (h: number, mm: number, isPm: boolean) => onChange((isPm ? (h % 12) + 12 : h % 12) + \":\" + pad(mm));\n  const R = 108, NR = 80;\n  const nums = mode === \"h\" ? Array.from({ length: 12 }, (_, i) => i + 1) : Array.from({ length: 12 }, (_, i) => i * 5);\n  const selNum = mode === \"h\" ? h12 : m;\n  const angleOf = (n: number) => (mode === \"h\" ? (n % 12) * 30 : (n / 5) * 30) - 90;\n  const fromPointer = (e: React.PointerEvent) => {\n    const r = faceRef.current!.getBoundingClientRect();\n    const x = e.clientX - r.left - R, y = e.clientY - r.top - R;\n    let deg = Math.atan2(y, x) * 180 / Math.PI + 90;\n    if (deg < 0) deg += 360;\n    if (mode === \"h\") {\n      const h = Math.round(deg / 30) % 12 || 12;\n      set(h === 12 ? 12 : h, m, pm);\n    } else {\n      const mm = Math.round(deg / 6) % 60;\n      set(h12, mm, pm);\n    }\n  };\n  const down = (e: React.PointerEvent) => { dragging.current = true; faceRef.current && faceRef.current.setPointerCapture && faceRef.current.setPointerCapture(e.pointerId); fromPointer(e); };\n  const move = (e: React.PointerEvent) => { if (dragging.current) fromPointer(e); };\n  const upH = () => { if (dragging.current) { dragging.current = false; if (mode === \"h\") setMode(\"m\"); } };\n  const handAngle = mode === \"h\" ? (h12 % 12) * 30 : m * 6;\n  const minuteOff = mode === \"m\" && m % 5 !== 0;\n  return (\n    <div style={{ padding: \"4px 14px 14px\" }}>\n      <div className=\"fd-clock-digits\">\n        <button type=\"button\" className={\"fd-clock-digit\" + (mode === \"h\" ? \" is-active\" : \"\")} onClick={() => setMode(\"h\")}>{pad(h12)}</button>\n        <span style={{ fontSize: 24, fontWeight: 700, color: \"var(--text-muted)\" }}>:</span>\n        <button type=\"button\" className={\"fd-clock-digit\" + (mode === \"m\" ? \" is-active\" : \"\")} onClick={() => setMode(\"m\")}>{pad(m)}</button>\n        <span className=\"fd-stack\" style={{ gap: 3, marginLeft: 8 }}>\n          {[\"AM\", \"PM\"].map((ap) => (\n            <button type=\"button\" key={ap} onClick={() => set(h12, m, ap === \"PM\")}\n              style={{ border: \"1px solid \" + ((ap === \"PM\") === pm ? \"var(--brand)\" : \"var(--border)\"), background: (ap === \"PM\") === pm ? \"var(--surface-brand)\" : \"var(--surface)\", color: (ap === \"PM\") === pm ? \"var(--brand)\" : \"var(--text-muted)\", borderRadius: 6, font: \"inherit\", fontSize: 11, fontWeight: 700, padding: \"3px 8px\", cursor: \"pointer\" }}>{ap}</button>\n          ))}\n        </span>\n      </div>\n      <div className=\"fd-clock\" ref={faceRef} onPointerDown={down} onPointerMove={move} onPointerUp={upH}>\n        <span className=\"fd-clock-hand\" style={{ height: NR - (minuteOff ? 14 : 16), transform: \"translateX(-50%) rotate(\" + handAngle + \"deg)\", bottom: \"50%\" }} />\n        <span className=\"fd-clock-pivot\" />\n        {minuteOff ? <span style={{ position: \"absolute\", left: \"50%\", top: \"50%\", width: 10, height: 10, margin: -5, borderRadius: \"50%\", border: \"2px solid var(--brand)\", background: \"var(--surface)\", transform: \"rotate(\" + handAngle + \"deg) translateY(-\" + (NR - 6) + \"px)\", transformOrigin: \"center\", pointerEvents: \"none\" }} /> : null}\n        {nums.map((n) => {\n          const a = angleOf(n) * Math.PI / 180;\n          return (\n            <span key={n} className={\"fd-clock-num\" + (n === selNum || (mode === \"m\" && n === Math.round(m / 5) * 5 % 60 && m % 5 === 0) ? \" is-sel\" : \"\")}\n              style={{ left: R + Math.cos(a) * NR, top: R + Math.sin(a) * NR }}>\n              {mode === \"m\" ? pad(n) : n}\n            </span>\n          );\n        })}\n      </div>\n      <div className=\"fd-row\" style={{ justifyContent: \"center\", gap: 6 }}>\n        <span className=\"fd-body-sm fd-muted\">{mode === \"h\" ? \"Pick the hour — drag or tap\" : \"Now the minutes\"}</span>\n      </div>\n    </div>\n  );\n}\n\nexport function TimePicker({ label, help, error, required = false, disabled = false, value = \"\", onChange, placeholder = \"Pick a time\", id, className = \"\", style }: TimePickerProps) {\n  const { fieldId, labelId, ariaLabelledBy } = useTriggerLabelling(label, id);\n  const [open, setOpen] = React.useState(false);\n  const rootRef = React.useRef<HTMLDivElement>(null);\n  const boxRef = React.useRef<HTMLDivElement>(null);\n  const disp = () => {\n    if (!value) return \"\";\n    const [h, m] = value.split(\":\").map(Number);\n    return (h % 12 === 0 ? 12 : h % 12) + \":\" + pad(m) + \" \" + (h >= 12 ? \"PM\" : \"AM\");\n  };\n  const toggle = () => { if (!disabled) setOpen(!open); };\n  return (\n    <div className={[\"fd-field\", \"fd-popfield\", open ? \"is-open\" : \"\", className].filter(Boolean).join(\" \")} style={style} ref={rootRef}>\n      {label ? <FieldLabel id={labelId} required={required} onClick={toggle}>{label}</FieldLabel> : null}\n      <div className={[\"fd-input\", error ? \"fd-input-error\" : \"\", disabled ? \"fd-input-disabled\" : \"\"].filter(Boolean).join(\" \")} style={{ cursor: disabled ? \"not-allowed\" : \"pointer\" }} onClick={toggle} ref={boxRef}>\n        <span className=\"fd-input-icon\"><i className=\"ph ph-clock\" aria-hidden=\"true\" /></span>\n        <button type=\"button\" id={fieldId} aria-labelledby={ariaLabelledBy} disabled={disabled} onKeyDown={(e) => { if (e.key === \"Enter\" || e.key === \" \") { e.preventDefault(); toggle(); } }}\n          style={{ all: \"unset\", flex: 1, cursor: \"inherit\", color: value ? \"var(--text)\" : \"var(--text-muted)\" }}>\n          {disp() || placeholder}\n        </button>\n        <span className=\"fd-select-caret\"><i className=\"ph ph-caret-down\" aria-hidden=\"true\" /></span>\n      </div>\n      <Popover\n        open={open} anchorRef={boxRef} triggerRef={rootRef} onClose={() => setOpen(false)}\n        placement=\"bottom-start\" offset={6} width={262} role=\"presentation\"\n        footer={\n          <React.Fragment>\n            <button type=\"button\" className=\"fd-btn fd-btn-link\" style={{ fontSize: 12.5 }}\n              onClick={() => { const d = new Date(); onChange && onChange({ target: { value: d.getHours() + \":\" + pad(d.getMinutes()) } }); }}>Now</button>\n            <span style={{ flex: 1 }} />\n            <button type=\"button\" className=\"fd-btn fd-btn-primary fd-btn-sm\" onClick={() => setOpen(false)}>Done</button>\n          </React.Fragment>\n        }\n      >\n        <ClockFace value={value || \"09:00\"} onChange={(v) => onChange && onChange({ target: { value: v } })} />\n      </Popover>\n      {error ? <span className=\"fd-field-error\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{error}</span>\n        : help ? <span className=\"fd-field-help\">{help}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { FieldLabel, useFieldId } from \"./field\";\n\n/**\n * Continuous value control. In the media planner this is the reallocation slider:\n * a live chip follows the handle while dragging and the commit is explicit.\n */\nexport interface SliderProps {\n  label?: string;\n  min?: number;\n  max?: number;\n  step?: number;\n  value?: number;\n  onChange?: (value: number) => void;\n  /** Renders the value in the chip and header, e.g. v => \"$\" + v.toLocaleString() */\n  format?: (value: number) => string;\n  showChip?: boolean;\n  help?: string;\n  /** Element id — lands on the range input and on the label's `for`. Generated\n   *  when omitted, so `label` is always the slider's accessible name. */\n  id?: string;\n  /** Names an instance that has no visible `label`. Do not set both: aria-label\n   *  OUTRANKS the associated <label>, so a slider carrying both is announced as\n   *  something other than what it visibly says. */\n  \"aria-label\"?: string;\n  className?: string;\n}\n\nexport function Slider({\n  label, min = 0, max = 100, step = 1, value, onChange,\n  format = (v: number) => String(v), showChip = true, help, id, \"aria-label\": ariaLabel, className = \"\", ...rest\n}: SliderProps) {\n  const fieldId = useFieldId(id);\n  const [dragging, setDragging] = React.useState(false);\n  const v = value === undefined ? min : Number(value);\n  const pct = max === min ? 0 : ((v - min) / (max - min)) * 100;\n  return (\n    <div className={[\"fd-field\", className].filter(Boolean).join(\" \")}>\n      {label ? (\n        <div className=\"fd-row\" style={{ justifyContent: \"space-between\", gap: 12 }}>\n          <FieldLabel htmlFor={fieldId}>{label}</FieldLabel>\n          <span className=\"fd-num\" style={{ color: \"var(--text-2)\" }}>{format(v)}</span>\n        </div>\n      ) : null}\n      <div className=\"fd-slider\">\n        <span className=\"fd-slider-fill\" style={{ width: pct + \"%\" }} />\n        {showChip && dragging ? (\n          <span className=\"fd-slider-chip\" style={{ left: pct + \"%\" }}>{format(v)}</span>\n        ) : null}\n        <input id={fieldId} type=\"range\" min={min} max={max} step={step} value={v}\n          onChange={onChange ? (e) => onChange!(Number(e.target.value)) : undefined}\n          onPointerDown={() => setDragging(true)}\n          onPointerUp={() => setDragging(false)}\n          onBlur={() => setDragging(false)}\n          aria-label={ariaLabel} {...rest} />\n      </div>\n      {help ? <span className=\"fd-field-help\">{help}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/** Dual-thumb range slider: drag either thumb or the rail, value bubbles while dragging or focused, tick marks with labels, optional magnetic snap, keyboard (arrows, shift for 10%, Home/End). */\nexport interface RangeSliderProps {\n  label?: string; help?: string;\n  min?: number; max?: number; step?: number;\n  /** [low, high] */\n  value: [number, number];\n  onChange: (v: [number, number]) => void;\n  /** Minimum distance the thumbs keep between them. */\n  minGap?: number;\n  /** Tick stops; label is optional. */\n  marks?: Array<{ value: number; label?: string }>;\n  /** Ordinal mode: unevenly spaced legal values (numbers, or {value,label}); the\n   *  slider then travels in even steps between them and reports real values.\n   *  Infinity is allowed for an open upper bound — give it a label like \"No limit\". */\n  stops?: Array<number | { value: number; label?: string }>;\n  /** Magnetically snap to nearby marks while dragging. */\n  snap?: boolean;\n  format?: (v: number) => string;\n  className?: string;\n}\n\nexport function RangeSlider({\n  label, min = 0, max = 100, step = 1, value, onChange, minGap = 0,\n  marks = [], snap = false, stops, format, help, className = \"\", ...rest\n}: RangeSliderProps & Record<string, any>): JSX.Element {\n  // Hooks must run unconditionally on every render (Rules of Hooks) — declared\n  // here even though ordinal mode below doesn't use them, since it delegates\n  // to a nested <RangeSlider> instance rather than using this one's state.\n  const fmt = format || ((v: number) => String(v));\n  const [a, b] = value || [min, max];\n  const [drag, setDrag] = React.useState<number | null>(null); // 0 | 1 | null\n  const [focus, setFocus] = React.useState<number | null>(null);\n  const railRef = React.useRef<HTMLSpanElement>(null);\n  const pct = (v: number) => max === min ? 0 : ((v - min) / (max - min)) * 100;\n  const clampPair = (i: number, v: number): [number, number] => {\n    v = Math.min(max, Math.max(min, Math.round(v / step) * step));\n    if (snap && marks.length) {\n      const near = marks.reduce((best, m) => Math.abs(m.value - v) < Math.abs(best - v) ? m.value : best, Infinity);\n      if (Math.abs(near - v) <= (max - min) * 0.015) v = near;\n    }\n    const pair: [number, number] = i === 0 ? [Math.min(v, b - minGap), b] : [a, Math.max(v, a + minGap)];\n    return pair;\n  };\n  const fromEvent = (e: { clientX: number }) => {\n    const r = railRef.current!.getBoundingClientRect();\n    return min + Math.min(1, Math.max(0, (e.clientX - r.left) / r.width)) * (max - min);\n  };\n  React.useEffect(() => {\n    if (drag === null) return;\n    const mv = (e: PointerEvent) => onChange && onChange(clampPair(drag, fromEvent(e)));\n    const upH = () => setDrag(null);\n    window.addEventListener(\"pointermove\", mv);\n    window.addEventListener(\"pointerup\", upH);\n    return () => { window.removeEventListener(\"pointermove\", mv); window.removeEventListener(\"pointerup\", upH); };\n  }, [drag, a, b]);\n\n  /* Ordinal mode: with `stops` the slider works in index space, so unevenly\n     spaced breakpoints (0, 5k, 10k … 100k, No limit) get even handle travel and\n     only ever land on a legal value. Delegates to the linear implementation. */\n  if (stops && stops.length > 1) {\n    const S: Array<{ value: number; label?: string }> = stops.map((s) => (typeof s === \"object\" ? s : { value: s }));\n    const num = (v: any) => (v === Infinity || v == null ? Number.MAX_SAFE_INTEGER : v);\n    const idxOf = (v: any) => S.reduce((best, s, i) => (Math.abs(num(s.value) - num(v)) < Math.abs(num(S[best].value) - num(v)) ? i : best), 0);\n    const labelOf = (i: number) => { const s = S[Math.round(i)] || S[0]; return s.label != null ? s.label : String(s.value); };\n    const thin = S.length > 7 ? Math.ceil(S.length / 5) : 1;\n    const pair = value || [S[0].value, S[S.length - 1].value];\n    return (\n      <RangeSlider {...rest} label={label} help={help} className={className}\n        min={0} max={S.length - 1} step={1} minGap={minGap}\n        value={[idxOf(pair[0]), idxOf(pair[1])]}\n        onChange={(p) => onChange && onChange([S[p[0]].value, S[p[1]].value])}\n        marks={marks.length ? marks : S.map((_s, i) => ({ value: i, label: (i === 0 || i === S.length - 1 || i % thin === 0) ? labelOf(i) : undefined }))}\n        format={format ? (i: number) => format!(S[Math.round(i)].value) : labelOf} />\n    );\n  }\n  const startDrag = (i: number) => (e: React.PointerEvent) => {\n    e.preventDefault();\n    (e.target as Element).setPointerCapture && (e.target as Element).setPointerCapture(e.pointerId);\n    setDrag(i);\n  };\n  const onRailDown = (e: React.PointerEvent) => {\n    const v = fromEvent(e);\n    const i = Math.abs(v - a) <= Math.abs(v - b) ? 0 : 1;\n    onChange && onChange(clampPair(i, v));\n    setDrag(i);\n  };\n  const key = (i: number) => (e: React.KeyboardEvent) => {\n    const big = (max - min) / 10;\n    let d = 0;\n    if (e.key === \"ArrowLeft\" || e.key === \"ArrowDown\") d = -(e.shiftKey ? big : step);\n    else if (e.key === \"ArrowRight\" || e.key === \"ArrowUp\") d = e.shiftKey ? big : step;\n    else if (e.key === \"Home\") { onChange(clampPair(i, min)); e.preventDefault(); return; }\n    else if (e.key === \"End\") { onChange(clampPair(i, max)); e.preventDefault(); return; }\n    else return;\n    e.preventDefault();\n    onChange && onChange(clampPair(i, (i === 0 ? a : b) + d));\n  };\n  const showChip = (i: number) => drag === i || focus === i;\n  const hasLabels = marks.some((m) => m.label);\n  return (\n    <div className={[\"fd-field\", className].filter(Boolean).join(\" \")} {...rest}>\n      {label ? (\n        <div className=\"fd-row\" style={{ justifyContent: \"space-between\", gap: 12 }}>\n          <span className=\"fd-field-label\">{label}</span>\n          <span className=\"fd-num\" style={{ color: \"var(--text-2)\" }}>{fmt(a)} – {fmt(b)}</span>\n        </div>\n      ) : null}\n      <div className={\"fd-range\" + (hasLabels ? \" has-labels\" : \"\")} onPointerDown={onRailDown}>\n        <span className=\"fd-range-rail\" ref={railRef} />\n        <span className=\"fd-range-fill\" style={{ left: pct(a) + \"%\", width: (pct(b) - pct(a)) + \"%\" }} />\n        {marks.map((m) => (\n          <React.Fragment key={m.value}>\n            <span className={\"fd-range-mark\" + (m.value >= a && m.value <= b ? \" is-in\" : \"\")} style={{ left: pct(m.value) + \"%\" }} />\n            {m.label ? <span className=\"fd-range-mark-label\" style={{ left: pct(m.value) + \"%\" }}>{m.label}</span> : null}\n          </React.Fragment>\n        ))}\n        {[a, b].map((v, i) => (\n          <span key={i} className={\"fd-range-thumb\" + (drag === i ? \" is-drag\" : \"\")} style={{ left: pct(v) + \"%\" }}\n            tabIndex={0} role=\"slider\" aria-valuemin={min} aria-valuemax={max} aria-valuenow={v}\n            aria-label={(label || \"Range\") + (i === 0 ? \" minimum\" : \" maximum\")}\n            onPointerDown={startDrag(i)} onKeyDown={key(i)}\n            onFocus={() => setFocus(i)} onBlur={() => setFocus(null)}>\n            <span className=\"fd-range-chip\" style={{ opacity: showChip(i) ? 1 : undefined }}>{fmt(v)}</span>\n          </span>\n        ))}\n      </div>\n      {help ? <span className=\"fd-field-help\">{help}</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { filterFiles, toAttachment } from \"../../kits/files\";\nimport type { Attachment, FileRejection } from \"../../kits/files\";\n\nexport interface DropzoneProps {\n  onFiles?: (files: File[]) => void;\n  onReject?: (rejections: FileRejection[]) => void;\n  accept?: string;\n  maxFileSize?: number;\n  multiple?: boolean;\n  disabled?: boolean;\n  label?: string;\n  hint?: string;\n  children?: React.ReactNode;\n  className?: string;\n  style?: React.CSSProperties;\n}\n\n/**\n * A drop target that wraps any content. Reports accepted files and rejections;\n * it never uploads anything itself.\n */\nexport function Dropzone({\n  onFiles, onReject, accept, maxFileSize, multiple = true, disabled = false,\n  label = \"Drop files to attach\", hint, children, className = \"\", style,\n}: DropzoneProps) {\n  const [over, setOver] = React.useState(false);\n  const depth = React.useRef(0);\n\n  const has = (e: React.DragEvent) => {\n    const dt = e.dataTransfer;\n    if (!dt) return false;\n    return Array.from(dt.types || []).indexOf(\"Files\") !== -1;\n  };\n\n  const enter = (e: React.DragEvent) => { if (disabled || !has(e)) return; depth.current++; setOver(true); };\n  const leave = () => { depth.current = Math.max(0, depth.current - 1); if (!depth.current) setOver(false); };\n  const over_ = (e: React.DragEvent) => { if (disabled || !has(e)) return; e.preventDefault(); e.dataTransfer.dropEffect = \"copy\"; };\n  const drop = (e: React.DragEvent) => {\n    if (disabled || !has(e)) return;\n    e.preventDefault();\n    depth.current = 0; setOver(false);\n    const picked = multiple ? Array.from(e.dataTransfer.files) : Array.from(e.dataTransfer.files).slice(0, 1);\n    const { accepted, rejected } = filterFiles(picked, { accept, maxFileSize });\n    if (rejected.length && onReject) onReject(rejected);\n    if (accepted.length && onFiles) onFiles(accepted);\n  };\n\n  return (\n    <div\n      className={[\"fd-dropzone\", over ? \"is-over\" : \"\", className].filter(Boolean).join(\" \")}\n      style={style}\n      onDragEnter={enter} onDragLeave={leave} onDragOver={over_} onDrop={drop}\n    >\n      {children}\n      {over ? (\n        <div className=\"fd-dropzone-veil\" aria-hidden=\"true\">\n          <div className=\"fd-dropzone-card\">\n            <i className=\"ph ph-tray-arrow-down\" />\n            <span className=\"fd-dropzone-label\">{label}</span>\n            {hint ? <span className=\"fd-dropzone-hint\">{hint}</span> : null}\n          </div>\n        </div>\n      ) : null}\n    </div>\n  );\n}\n\nexport interface FilePickButtonProps extends Omit<DropzoneProps, \"children\" | \"label\" | \"hint\" | \"style\"> { label?: string; icon?: string; children?: React.ReactNode }\n\n/** A file input behind any trigger. Resets between picks so re-picking the same file fires. */\nexport function FilePickButton({\n  onFiles, onReject, accept, maxFileSize, multiple = true, disabled,\n  label = \"Attach files\", icon = \"paperclip\", className = \"\", children,\n}: FilePickButtonProps) {\n  const ref = React.useRef<HTMLInputElement>(null);\n  return (\n    <React.Fragment>\n      <button\n        type=\"button\" className={[\"fd-attachbtn\", className].filter(Boolean).join(\" \")} disabled={disabled}\n        aria-label={label} title={label} onClick={() => ref.current && ref.current.click()}\n      >\n        {children != null ? children : <i className={\"ph ph-\" + icon} aria-hidden=\"true\" />}\n      </button>\n      <input\n        ref={ref} type=\"file\" accept={accept} multiple={multiple} className=\"fd-sr\"\n        onChange={(e) => {\n          const { accepted, rejected } = filterFiles(e.target.files as FileList, { accept, maxFileSize });\n          if (rejected.length && onReject) onReject(rejected);\n          if (accepted.length && onFiles) onFiles(accepted);\n          e.target.value = \"\";\n        }}\n      />\n    </React.Fragment>\n  );\n}\n\nexport type FileUploadHandler = (file: File, onProgress: (pct: number) => void, signal?: AbortSignal) => Promise<Partial<Attachment> | void>;\n\n/**\n * Upload orchestration for a staged set of files: progress per file, per-file\n * errors, retry, and cancel — the same behaviour an upload field has.\n *\n * `upload(file, onProgress, signal)` must resolve to `Partial<Attachment>` (at\n * least the server-assigned `id`, typically `url` and `thumb` too) or throw.\n * When the result carries an `id`, it REPLACES the local staged id — the id a\n * host sends onward (`ChatComposer.onSubmit`) is therefore always the id the\n * server gave the file, never the client-local placeholder `toAttachment`\n * minted. Nothing here knows what a chat is; it is the app's upload handler\n * that does.\n */\nexport function useStagedFiles(\n  upload?: FileUploadHandler,\n  opts?: { onUploaded?: (a: Attachment) => void; onError?: (e: unknown, a: Attachment) => void }\n): {\n  items: Attachment[];\n  add: (files: File[] | FileList) => Attachment[];\n  remove: (a: Attachment) => void;\n  retry: (a: Attachment) => void;\n  clear: () => void;\n  busy: boolean;\n  setItems: (items: Attachment[]) => void;\n} {\n  const o = opts || {};\n  const [items, setItems] = React.useState<Attachment[]>([]);\n  const controllers = React.useRef<Record<string, AbortController | null>>({});\n\n  const patch = (id: string, next: Partial<Attachment>) => setItems((list) => list.map((f) => (f.id === id ? Object.assign({}, f, next) : f)));\n\n  const run = React.useCallback((att: Attachment) => {\n    if (!upload) return;\n    const ac = typeof AbortController !== \"undefined\" ? new AbortController() : null;\n    controllers.current[att.id] = ac;\n    patch(att.id, { progress: 0, error: undefined });\n    Promise.resolve()\n      .then(() => upload!(att.file as File, (p) => patch(att.id, { progress: Math.max(0, Math.min(99, p)) }), ac ? ac.signal : undefined))\n      .then((res) => {\n        const r: Partial<Attachment> = res || {};\n        // Merge whatever the host returned onto the staged attachment, with the\n        // server's own id winning when it supplied one — matched below by the\n        // OLD (local) id, since that is the only id `patch` can still find this\n        // row under.\n        patch(att.id, Object.assign({}, r, { id: r.id || att.id, progress: 100, error: undefined }));\n        o.onUploaded && o.onUploaded(att);\n      })\n      .catch((err) => {\n        if (ac && ac.signal.aborted) return;\n        patch(att.id, { progress: null, error: (err && err.message) || \"Upload failed\" } as any);\n        o.onError && o.onError(err, att);\n      })\n      .finally(() => { delete controllers.current[att.id]; });\n  }, [upload]);\n\n  const add = React.useCallback((files: File[] | FileList) => {\n    if (!upload) return [];           // nowhere to put it: refuse rather than strand it\n    const atts = Array.from(files).map((f) => toAttachment(f));\n    setItems((list) => list.concat(atts));\n    atts.forEach(run);\n    return atts;\n  }, [upload, run]);\n\n  const remove = React.useCallback((att: Attachment) => {\n    const ac = controllers.current[att.id];\n    if (ac) { try { ac.abort(); } catch (_e) { /* noop */ } delete controllers.current[att.id]; }\n    setItems((list) => list.filter((f) => f.id !== att.id));\n  }, []);\n\n  const retry = React.useCallback((att: Attachment) => { run(att); }, [run]);\n  const clear = React.useCallback(() => {\n    Object.values(controllers.current).forEach((ac) => { try { ac && ac.abort(); } catch (_e) { /* noop */ } });\n    controllers.current = {};\n    setItems([]);\n  }, []);\n\n  const busy = items.some((f) => f.progress != null && f.progress < 100 && !f.error);\n  return { items, add, remove, retry, clear, busy, setItems };\n}\n\n/** Namespace export — useStagedFiles is a hook, so it cannot be capital-initial itself. */\nexport const DropzoneKit = { useStagedFiles };\n","import * as React from \"react\";\nimport { formatBytes, iconForMime, isImage } from \"../../kits/files\";\nimport type { Attachment } from \"../../kits/files\";\n\nconst truncateMiddle = (name: string, max = 34) => {\n  if (!name || name.length <= max) return name;\n  const ext = /\\.[A-Za-z0-9]+$/.exec(name);\n  const tail = ext ? ext[0] : \"\";\n  const head = name.slice(0, Math.max(6, max - tail.length - 2));\n  return head + \"…\" + tail;\n};\n\nfunction Progress({ value }: { value: number }) {\n  return (\n    <span className=\"fd-file-prog\" role=\"progressbar\" aria-valuenow={Math.round(value)} aria-valuemin={0} aria-valuemax={100}>\n      <span className=\"fd-file-prog-fill\" style={{ width: Math.max(4, Math.min(100, value)) + \"%\" }} />\n    </span>\n  );\n}\n\nexport interface FileChipProps { file: Attachment; onOpen?: (f: Attachment) => void; onRemove?: (f: Attachment) => void; onRetry?: (f: Attachment) => void; compact?: boolean; className?: string }\n\n/**\n * A compact file row: icon or thumbnail, name, size, live upload progress,\n * error state, and an optional remove control. One file component everywhere —\n * images get real thumbnails, video gets a play badge, uploads get a bar.\n */\nexport function FileChip({ file, onOpen, onRemove, onRetry, compact = false, className = \"\" }: FileChipProps) {\n  if (!file) return null;\n  const uploading = file.progress != null && file.progress < 100 && !file.error;\n  const image = isImage(file.mime, file.name);\n  const thumb = (file.thumb && file.thumb.url) || (image ? file.blobUrl || file.url : null);\n  const meta = file.meta || (file.size ? formatBytes(file.size) : \"\");\n  const clickable = !!onOpen && !uploading;\n\n  return (\n    <div className={[\"fd-file\", compact ? \"is-compact\" : \"\", file.error ? \"is-error\" : \"\", uploading ? \"is-uploading\" : \"\", className].filter(Boolean).join(\" \")}>\n      <button\n        type=\"button\" className=\"fd-file-main\" disabled={!clickable}\n        onClick={clickable ? () => onOpen!(file) : undefined}\n        title={file.name + (meta ? \" · \" + meta : \"\")}\n      >\n        <span className=\"fd-file-icon\">\n          {thumb ? <img src={thumb} alt=\"\" /> : <i className={\"ph ph-\" + iconForMime(file.mime, file.name)} aria-hidden=\"true\" />}\n          {(file.mime || \"\").startsWith(\"video/\") ? <i className=\"ph ph-play fd-file-play\" aria-hidden=\"true\" /> : null}\n        </span>\n        <span className=\"fd-file-text\">\n          <span className=\"fd-file-name\">{truncateMiddle(file.name, compact ? 26 : 40)}</span>\n          <span className=\"fd-file-meta\">\n            {file.error\n              ? <span className=\"fd-file-err\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{file.error}</span>\n              : uploading ? <span className=\"fd-tabular\">{Math.round(file.progress as number)}% uploaded</span>\n              : meta}\n          </span>\n        </span>\n      </button>\n      {uploading ? <Progress value={file.progress as number} /> : null}\n      {file.error && onRetry ? (\n        <button type=\"button\" className=\"fd-file-act\" onClick={() => onRetry!(file)} aria-label={\"Retry upload of \" + file.name}>\n          <i className=\"ph ph-arrow-clockwise\" aria-hidden=\"true\" />\n        </button>\n      ) : null}\n      {onRemove ? (\n        <button type=\"button\" className=\"fd-file-act\" onClick={() => onRemove!(file)} aria-label={\"Remove \" + file.name}>\n          <i className=\"ph ph-x\" aria-hidden=\"true\" />\n        </button>\n      ) : null}\n    </div>\n  );\n}\n\nexport interface FileTileProps { file: Attachment; onOpen?: (f: Attachment) => void; onRemove?: (f: Attachment) => void; maxHeight?: number; className?: string }\n\n/**\n * An image-forward tile. Pasted screenshots belong here, not in a chip —\n * the picture is the content.\n */\nexport function FileTile({ file, onOpen, onRemove, maxHeight = 200, className = \"\" }: FileTileProps) {\n  if (!file) return null;\n  const src = (file.thumb && file.thumb.url) || file.blobUrl || file.url;\n  const uploading = file.progress != null && file.progress < 100 && !file.error;\n  return (\n    <figure className={[\"fd-tile\", uploading ? \"is-uploading\" : \"\", file.error ? \"is-error\" : \"\", className].filter(Boolean).join(\" \")}>\n      <button type=\"button\" className=\"fd-tile-btn\" onClick={onOpen ? () => onOpen!(file) : undefined} disabled={!onOpen}>\n        {src ? <img src={src} alt={file.name || \"\"} style={{ maxHeight }} loading=\"lazy\" />\n          : <span className=\"fd-tile-fallback\"><i className={\"ph ph-\" + iconForMime(file.mime, file.name)} aria-hidden=\"true\" /></span>}\n      </button>\n      {uploading ? <Progress value={file.progress as number} /> : null}\n      {file.error ? <figcaption className=\"fd-tile-err\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{file.error}</figcaption> : null}\n      {onRemove ? (\n        <button type=\"button\" className=\"fd-tile-x\" onClick={() => onRemove!(file)} aria-label={\"Remove \" + file.name}>\n          <i className=\"ph ph-x\" aria-hidden=\"true\" />\n        </button>\n      ) : null}\n    </figure>\n  );\n}\n\n/**\n * One row of uniform tiles — the staging tray. Same size whatever the type:\n * images crop to fill, documents show a truncated name and their size.\n * Overflow scrolls sideways instead of growing the tray.\n */\nexport interface FileStripProps { files: Attachment[]; size?: number; onOpen?: (f: Attachment) => void; onRemove?: (f: Attachment) => void; onRetry?: (f: Attachment) => void; className?: string }\n\nexport function FileStrip({ files = [], size = 68, onOpen, onRemove, onRetry, className = \"\" }: FileStripProps) {\n  const list = files.filter(Boolean);\n  if (!list.length) return null;\n  return (\n    <div className={[\"fd-filestrip\", \"fd-scrollbar\", className].filter(Boolean).join(\" \")} style={{ \"--fd-cell\": size + \"px\" } as React.CSSProperties}>\n      {list.map((f) => <FileCell key={f.id || f.name} file={f} onOpen={onOpen} onRemove={onRemove} onRetry={onRetry} />)}\n    </div>\n  );\n}\n\nconst shortName = (name: string, keep = 5) => {\n  const s = String(name || \"file\");\n  const ext = /\\.([A-Za-z0-9]{1,5})$/.exec(s);\n  const tail = ext ? \".\" + ext[1] : \"\";\n  const stem = tail ? s.slice(0, -tail.length) : s;\n  return stem.length > keep ? stem.slice(0, keep) + \"…\" + tail : stem + tail;\n};\n\ninterface FileCellProps { file: Attachment; onOpen?: (f: Attachment) => void; onRemove?: (f: Attachment) => void; onRetry?: (f: Attachment) => void }\n\nfunction FileCell({ file, onOpen, onRemove, onRetry }: FileCellProps) {\n  const uploading = file.progress != null && file.progress < 100 && !file.error;\n  const image = isImage(file.mime, file.name);\n  const thumb = (file.thumb && file.thumb.url) || (image ? file.blobUrl || file.url : null);\n  const label = file.name + (file.size ? \" · \" + formatBytes(file.size) : \"\");\n  return (\n    <div className={[\"fd-cell\", file.error ? \"is-error\" : \"\", uploading ? \"is-uploading\" : \"\"].filter(Boolean).join(\" \")} title={file.error ? file.name + \" — \" + file.error : label}>\n      <button type=\"button\" className=\"fd-cell-main\" onClick={onOpen ? () => onOpen!(file) : undefined} disabled={!onOpen || uploading} aria-label={\"Open \" + file.name}>\n        {thumb ? <img src={thumb} alt=\"\" /> : (\n          <span className=\"fd-cell-doc\">\n            <i className={\"ph ph-\" + iconForMime(file.mime, file.name)} aria-hidden=\"true\" />\n            <span className=\"fd-cell-name\">{shortName(file.name)}</span>\n            <span className=\"fd-cell-size\">{file.meta || formatBytes(file.size)}</span>\n          </span>\n        )}\n        {(file.mime || \"\").startsWith(\"video/\") ? <i className=\"ph ph-play fd-cell-play\" aria-hidden=\"true\" /> : null}\n      </button>\n      {uploading ? <Progress value={file.progress as number} /> : null}\n      {file.error ? (\n        <span className=\"fd-cell-err\" aria-hidden=\"true\"><i className=\"ph ph-warning-circle\" /></span>\n      ) : null}\n      {file.error && onRetry ? (\n        <button type=\"button\" className=\"fd-cell-x is-retry\" onClick={() => onRetry!(file)} aria-label={\"Retry upload of \" + file.name}>\n          <i className=\"ph ph-arrow-clockwise\" aria-hidden=\"true\" />\n        </button>\n      ) : null}\n      {onRemove ? (\n        <button type=\"button\" className=\"fd-cell-x\" onClick={() => onRemove!(file)} aria-label={\"Remove \" + file.name}>\n          <i className=\"ph ph-x\" aria-hidden=\"true\" />\n        </button>\n      ) : null}\n    </div>\n  );\n}\n\n/** Images as tiles, everything else as chips. */\nexport interface FileGridProps { files: Attachment[]; onOpen?: (f: Attachment) => void; onRemove?: (f: Attachment) => void; onRetry?: (f: Attachment) => void; tiles?: boolean; maxHeight?: number; compact?: boolean; className?: string }\n\n/**\n * A set of files: images as tiles, everything else as chips.\n * `tiles={false}` forces the compact all-chips form for tight columns.\n */\nexport function FileGrid({ files = [], onOpen, onRemove, onRetry, tiles = true, maxHeight = 200, compact = false, className = \"\" }: FileGridProps) {\n  const list = files.filter(Boolean);\n  if (!list.length) return null;\n  const pics = tiles ? list.filter((f) => isImage(f.mime, f.name)) : [];\n  const rest = list.filter((f) => pics.indexOf(f) === -1);\n  return (\n    <div className={[\"fd-filegrid\", className].filter(Boolean).join(\" \")}>\n      {pics.length ? (\n        <div className=\"fd-filegrid-tiles\">\n          {pics.map((f) => <FileTile key={f.id || f.name} file={f} onOpen={onOpen} onRemove={onRemove} maxHeight={maxHeight} />)}\n        </div>\n      ) : null}\n      {rest.length ? (\n        <div className=\"fd-filegrid-chips\">\n          {rest.map((f) => <FileChip key={f.id || f.name} file={f} onOpen={onOpen} onRemove={onRemove} onRetry={onRetry} compact={compact} />)}\n        </div>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/* ── rich markdown composer ────────────────────────────────────────────────\n   A contenteditable whose text content is EXACTLY the markdown source, one\n   element per line. Because the caret lives in the real text, decoration is\n   free: headings can be bigger, bold can be bold, quotes can be indented —\n   there is no mirror to keep in metric lockstep. Markers stay in the text\n   (dimmed), so what you typed is always what gets sent.\n\n   All structural input — Enter, paste, line breaks — is intercepted, and the\n   DOM is re-synced line by line after every change, so the browser never gets\n   to invent nested divs. */\n\nconst isMac = typeof navigator !== \"undefined\" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent || \"\");\n\nconst INLINE_RE = /(\\*\\*\\*[^*\\n]+\\*\\*\\*|\\*\\*[^*\\n]+\\*\\*|__[^_\\n]+__|~~[^~\\n]+~~|`[^`\\n]+`|\\*[^*\\s][^*\\n]*\\*|(?<![A-Za-z0-9_])_[^_\\s][^_\\n]*_|\\[[^\\]\\n]*\\]\\([^)\\s\\n]*\\)|https?:\\/\\/\\S+)/g;\n\n/** [text, className] pairs whose concatenation equals the input, exactly. */\nfunction inlineParts(text: string): Array<[string, string]> {\n  const out: Array<[string, string]> = [];\n  let last = 0, m: RegExpExecArray | null;\n  INLINE_RE.lastIndex = 0;\n  while ((m = INLINE_RE.exec(text))) {\n    if (m.index > last) out.push([text.slice(last, m.index), \"\"]);\n    const tk = m[0];\n    const wrap = (n: number, cls: string) => { out.push([tk.slice(0, n), \"rme-mk\"], [tk.slice(n, tk.length - n), cls], [tk.slice(tk.length - n), \"rme-mk\"]); };\n    if (/^\\*\\*\\*/.test(tk)) wrap(3, \"rme-b rme-i\");\n    else if (/^\\*\\*/.test(tk) || /^__/.test(tk)) wrap(2, \"rme-b\");\n    else if (/^~~/.test(tk)) wrap(2, \"rme-s\");\n    else if (/^`/.test(tk)) wrap(1, \"rme-c\");\n    else if (/^\\[/.test(tk)) {\n      const cut = tk.indexOf(\"](\");\n      out.push([\"[\", \"rme-mk\"], [tk.slice(1, cut), \"rme-lk\"], [tk.slice(cut, tk.length), \"rme-mk\"]);\n    } else if (/^https?:/.test(tk)) out.push([tk, \"rme-lk\"]);\n    else wrap(1, \"rme-i\");\n    last = m.index + tk.length;\n  }\n  if (last < text.length) out.push([text.slice(last), \"\"]);\n  return out.filter((p) => p[0] !== \"\");\n}\n\nconst RE_H = /^(#{1,6})(\\s+)(.*)$/;\nconst RE_LI = /^(\\s*)([-*+]|\\d{1,3}[.)])(\\s+)(\\[[ xX]\\]\\s+)?(.*)$/;\nconst RE_Q = /^(\\s*)(>+)(\\s*)(.*)$/;\nconst RE_FENCE = /^\\s*(```|~~~)(.*)$/;\n\n/** Build one line element. Its textContent is the source line, character for character. */\nfunction buildLine(doc: Document, line: string, inFence: boolean): HTMLElement {\n  const el = doc.createElement(\"div\");\n  el.className = \"fd-rme-line\";\n  el.setAttribute(\"data-src\", line);\n  const put = (text: string, cls: string) => {\n    if (!text) return;\n    if (!cls) { el.appendChild(doc.createTextNode(text)); return; }\n    const s = doc.createElement(\"span\");\n    s.className = cls;\n    s.textContent = text;\n    el.appendChild(s);\n  };\n\n  const fence = RE_FENCE.exec(line);\n  if (fence || inFence) {\n    el.classList.add(\"is-code\");\n    if (fence) { put(fence[1], \"rme-mk\"); put(fence[2], \"rme-lang\"); }\n    else put(line, \"\");\n    if (!line) el.appendChild(doc.createElement(\"br\"));\n    return el;\n  }\n\n  const h = RE_H.exec(line);\n  if (h) {\n    el.classList.add(\"is-h\" + h[1].length);\n    put(h[1], \"rme-mk\"); put(h[2], \"rme-mk\");\n    inlineParts(h[3]).forEach(([t, c]) => put(t, c));\n    return el;\n  }\n  const q = RE_Q.exec(line);\n  if (q && q[2]) {\n    el.classList.add(\"is-quote\");\n    put(q[1], \"\"); put(q[2] + q[3], \"rme-mk\");\n    inlineParts(q[4]).forEach(([t, c]) => put(t, c));\n    return el;\n  }\n  const li = RE_LI.exec(line);\n  if (li) {\n    el.classList.add(\"is-li\");\n    if (li[1]) el.style.paddingLeft = (li[1].length * 8) + \"px\";\n    put(li[1], \"\"); put(li[2], \"rme-bullet\"); put(li[3], \"rme-mk\");\n    if (li[4]) put(li[4], /x/i.test(li[4]) ? \"rme-task is-done\" : \"rme-task\");\n    inlineParts(li[5]).forEach(([t, c]) => put(t, c));\n    return el;\n  }\n  if (/^\\s*\\|/.test(line)) {\n    el.classList.add(\"is-table\");\n    put(line, \"\");\n    return el;\n  }\n  if (/^\\s*(?:[-*_]\\s*){3,}$/.test(line)) {\n    el.classList.add(\"is-rule\");\n    put(line, \"rme-mk\");\n    return el;\n  }\n\n  const parts = inlineParts(line);\n  if (!parts.length) el.appendChild(doc.createElement(\"br\"));\n  else parts.forEach(([t, c]) => put(t, c));\n  return el;\n}\n\n/* ── caret <-> character offset ─────────────────────────────────────────────\n   One walk produces both the source text and the offsets of the selection\n   endpoints, so the two can never disagree. It tolerates a flattened DOM\n   (select-all-and-type, autocorrect, drag-drop) because the next sync rebuilds\n   the structure from the text it read. */\n\nconst IS_BLOCK = (n: Node): boolean => n.nodeType === 1 && /^(DIV|P|LI|H[1-6]|BLOCKQUOTE|PRE|SECTION)$/.test((n as Element).tagName);\n\nconst lineTextOf = (el: Element): string => {\n  let s = \"\";\n  el.childNodes.forEach((n) => { s += (n.nodeType === 1 && (n as Element).tagName === \"BR\") ? \"\" : (n.textContent || \"\"); });\n  return s;\n};\n\ninterface CaretPoint { node: Node; offset: number }\n\nfunction readDom(root: Element, points?: Array<CaretPoint | null | undefined>): { text: string; points: number[] } {\n  const pts = points || [];\n  const out: Array<number | null> = pts.map(() => null);\n  let text = \"\";\n\n  const hit = (node: Node, resolve: (offset: number) => number) => {\n    pts.forEach((p, i) => { if (out[i] == null && p && p.node === node) out[i] = resolve(p.offset); });\n  };\n  const childPrefix = (el: Element, upto: number) => {\n    let n = 0;\n    for (let j = 0; j < upto && j < el.childNodes.length; j++) {\n      const c = el.childNodes[j];\n      n += (c.nodeType === 1 && (c as Element).tagName === \"BR\") ? 0 : (c.textContent || \"\").length;\n    }\n    return n;\n  };\n\n  const walkInline = (el: Element) => {\n    el.childNodes.forEach((n) => {\n      if (n.nodeType === 3) {\n        hit(n, (o) => text.length + Math.min(o, (n as Text).nodeValue!.length));\n        text += (n as Text).nodeValue;\n      } else if (n.nodeType === 1 && (n as Element).tagName !== \"BR\") {\n        hit(n, (o) => text.length + childPrefix(n as Element, o));\n        walkInline(n as Element);\n      }\n    });\n  };\n\n  const children = Array.from(root.childNodes);\n  let first = true;\n  children.forEach((n) => {\n    if (IS_BLOCK(n)) {\n      if (!first) text += \"\\n\";\n      first = false;\n      hit(n, (o) => text.length + childPrefix(n as Element, o));\n      walkInline(n as Element);\n    } else if (n.nodeType === 1 && (n as Element).tagName === \"BR\") {\n      text += \"\\n\";\n      first = false;\n    } else {\n      first = false;\n      hit(n, (o) => text.length + Math.min(o || 0, ((n as Text).nodeValue || \"\").length));\n      text += n.textContent || \"\";\n    }\n  });\n\n  // a caret dropped on the root itself addresses a child index\n  pts.forEach((p, i) => {\n    if (out[i] != null || !p || p.node !== root) return;\n    let t = 0;\n    for (let j = 0; j < p.offset && j < children.length; j++) {\n      const c = children[j];\n      t += IS_BLOCK(c) ? (j ? 1 : 0) + lineTextOf(c as Element).length : (c.textContent || \"\").length;\n    }\n    out[i] = t;\n  });\n\n  return { text, points: out.map((v) => (v == null ? text.length : v)) };\n}\n\nfunction placeCaret(root: Element, offset: number): void {\n  const lines = Array.from(root.children);\n  let remaining = Math.max(0, offset);\n  for (let i = 0; i < lines.length; i++) {\n    const line = lines[i];\n    const len = (line.textContent || \"\").length;\n    if (remaining <= len || i === lines.length - 1) {\n      const walker = document.createTreeWalker(line, NodeFilter.SHOW_TEXT);\n      let t: Node | null, seen = 0, target: Text | null = null, targetOffset = 0;\n      while ((t = walker.nextNode())) {\n        const L = (t as Text).nodeValue!.length;\n        if (seen + L >= remaining) { target = t as Text; targetOffset = Math.min(L, remaining - seen); break; }\n        seen += L; target = t as Text; targetOffset = L;\n      }\n      const sel = window.getSelection();\n      const range = document.createRange();\n      if (target) range.setStart(target, targetOffset);\n      else range.setStart(line, 0);\n      range.collapse(true);\n      sel!.removeAllRanges();\n      sel!.addRange(range);\n      return;\n    }\n    remaining -= len + 1;\n  }\n}\n\n/* Structure-tolerant read-back lives in readDom above. */\n\nfunction syncDom(root: Element, value: any): void {\n  const lines = String(value == null ? \"\" : value).split(\"\\n\");\n  const doc = root.ownerDocument;\n  let inFence = false;\n  for (let i = 0; i < lines.length; i++) {\n    const line = lines[i];\n    const wasFence = inFence;\n    if (RE_FENCE.test(line)) inFence = !inFence;\n    const existing = root.children[i];\n    const key = (wasFence ? \"1|\" : \"0|\") + line;\n    if (existing && existing.getAttribute(\"data-key\") === key) continue;\n    const next = buildLine(doc, line, wasFence);\n    next.setAttribute(\"data-key\", key);\n    if (existing) root.replaceChild(next, existing);\n    else root.appendChild(next);\n  }\n  while (root.children.length > lines.length) root.removeChild(root.lastChild as Node);\n}\n\nconst LIST_CONT = RE_LI;\n\nexport interface MarkdownEditorHandle {\n  focus(opts?: FocusOptions): void;\n  blur(): void;\n  readonly element: HTMLElement | null;\n  getSelection(): { start: number; end: number };\n  replaceRange(start: number, end: number, text: string, caretAt?: number): void;\n  insert(text: string): void;\n  wrapSelection(before: string, after?: string, placeholder?: string): void;\n  prefixLines(prefix: string): void;\n}\nexport interface EditorTrigger { type: \"slash\" | \"mention\"; query: string; from: number; to: number }\n\n/**\n * Rich markdown composer. A contenteditable whose text content IS the markdown\n * source, one element per line — so headings can be bigger and bold can be bold\n * without a mirror to keep in metric lockstep.\n *\n * Keydown ordering contract: the host sees the event FIRST (onKeyDown), may call\n * preventDefault(), and the editor then checks defaultPrevented and skips its own\n * handling. onPaste follows the same contract.\n */\nexport interface MarkdownEditorProps {\n  value: string;\n  onChange?: (next: string) => void;\n  onSubmit?: (value: string) => void;\n  onKeyDown?: (e: React.KeyboardEvent) => void;\n  onPaste?: (e: React.ClipboardEvent) => void;\n  onTrigger?: (t: EditorTrigger | null) => void;\n  placeholder?: string;\n  disabled?: boolean;\n  readOnly?: boolean;\n  maxLength?: number;\n  minRows?: number;\n  maxRows?: number;\n  autoFocus?: boolean;\n  /** Enter sends, Shift+Enter inserts a newline. Default true. */\n  submitOnEnter?: boolean;\n  ariaLabel?: string;\n  className?: string;\n  id?: string;\n}\n\n/**\n * The composer field.\n *\n * Keydown ordering contract — the host sees the event FIRST:\n *    editor emits onKeyDown  →  host may call preventDefault()\n *    →  editor checks event.defaultPrevented and skips its own handling\n * Emitting after the internal handler would make the host's preventDefault\n * arrive too late. onPaste follows the same contract.\n */\nexport const MarkdownEditor = React.forwardRef<MarkdownEditorHandle, MarkdownEditorProps>(function MarkdownEditor({\n  value = \"\", onChange, onSubmit, onKeyDown, onPaste, onTrigger,\n  placeholder = \"\", disabled = false, readOnly = false, maxLength,\n  minRows = 1, maxRows = 12, autoFocus = false,\n  submitOnEnter = true, ariaLabel = \"Message\", className = \"\", id,\n}, ref) {\n  const boxRef = React.useRef<HTMLDivElement>(null);\n  const composing = React.useRef(false);\n  const pendingCaret = React.useRef<number | null>(null);\n\n  /* keep the DOM in step with `value`, then restore the caret */\n  React.useLayoutEffect(() => {\n    const root = boxRef.current;\n    if (!root || composing.current) return;\n    const active = document.activeElement === root || root.contains(document.activeElement);\n    syncDom(root, value);\n    const caret = pendingCaret.current;\n    pendingCaret.current = null;\n    if (active && caret != null) placeCaret(root, caret);\n  }, [value]);\n\n  React.useEffect(() => { if (autoFocus && boxRef.current) boxRef.current.focus(); }, [autoFocus]);\n\n  const caretNow = (): number => {\n    const root = boxRef.current;\n    const sel = window.getSelection();\n    if (!root || !sel || !sel.rangeCount) return 0;\n    const r = sel.getRangeAt(0);\n    return readDom(root, [{ node: r.startContainer, offset: r.startOffset }]).points[0];\n  };\n\n  const selectionNow = (): { start: number; end: number } => {\n    const root = boxRef.current;\n    const sel = window.getSelection();\n    if (!root || !sel || !sel.rangeCount) return { start: value.length, end: value.length };\n    const r = sel.getRangeAt(0);\n    const read = readDom(root, [{ node: r.startContainer, offset: r.startOffset }, { node: r.endContainer, offset: r.endOffset }]);\n    const [a, b] = read.points;\n    return { start: Math.min(a, b), end: Math.max(a, b) };\n  };\n\n  const commit = (next: string, caret?: number | null) => {\n    if (maxLength && next.length > maxLength) return;\n    pendingCaret.current = caret == null ? null : caret;\n    onChange && onChange(next);\n    if (onTrigger) detect(next, caret == null ? next.length : caret);\n  };\n\n  const api: MarkdownEditorHandle = {\n    focus: (o) => boxRef.current && boxRef.current.focus(o),\n    blur: () => { boxRef.current && boxRef.current.blur(); },\n    get element() { return boxRef.current; },\n    getSelection: selectionNow,\n    replaceRange: (start, end, text, caretAt) => {\n      const next = value.slice(0, start) + text + value.slice(end);\n      commit(next, caretAt == null ? start + text.length : caretAt);\n    },\n    insert: (text) => { const s = selectionNow(); api.replaceRange(s.start, s.end, text); },\n    wrapSelection: (before, after, placeholderText) => {\n      const s = selectionNow();\n      const sel = value.slice(s.start, s.end);\n      const close = after == null ? before : after;\n      const already = value.slice(s.start - before.length, s.start) === before && value.slice(s.end, s.end + close.length) === close;\n      if (already) {\n        const next = value.slice(0, s.start - before.length) + sel + value.slice(s.end + close.length);\n        commit(next, s.start - before.length + sel.length);\n        return;\n      }\n      const inner = sel || placeholderText || \"\";\n      const next = value.slice(0, s.start) + before + inner + close + value.slice(s.end);\n      commit(next, sel ? s.start + before.length + inner.length + close.length : s.start + before.length + inner.length);\n    },\n    prefixLines: (prefix) => {\n      const s = selectionNow();\n      const from = value.lastIndexOf(\"\\n\", Math.max(0, s.start - 1)) + 1;\n      const toRaw = value.indexOf(\"\\n\", s.end);\n      const to = toRaw === -1 ? value.length : toRaw;\n      const block = value.slice(from, to);\n      const on = block.split(\"\\n\").every((l) => !l.trim() || l.startsWith(prefix));\n      const next = block.split(\"\\n\").map((l) => (on ? l.replace(prefix, \"\") : prefix + l)).join(\"\\n\");\n      api.replaceRange(from, to, next, from + next.length);\n    },\n  };\n  React.useImperativeHandle(ref, () => api);\n\n  /* trigger detection: / at line start, @ anywhere. A key that did not move the caret (Escape\n     dismissing the trigger menu, a lone modifier) re-detects nothing on key up, so a menu the\n     host just closed stays closed. */\n  const caretAtKeydown = React.useRef(-1);\n  function detect(text: string, caret: number) {\n    if (!onTrigger) return;\n    const upto = text.slice(0, caret);\n    const line = upto.slice(upto.lastIndexOf(\"\\n\") + 1);\n    const slash = /^\\/([\\w-]*)$/.exec(line);\n    if (slash) { onTrigger({ type: \"slash\", query: slash[1], from: caret - slash[0].length, to: caret }); return; }\n    const at = /(?:^|\\s)@([\\w./-]*)$/.exec(upto);\n    if (at) { const tok = at[0].replace(/^\\s/, \"\"); onTrigger({ type: \"mention\", query: at[1], from: caret - tok.length, to: caret }); return; }\n    onTrigger(null);\n  }\n\n  const newlineAtCaret = () => {\n    const s = selectionNow();\n    const lineStart = value.lastIndexOf(\"\\n\", Math.max(0, s.start - 1)) + 1;\n    const line = value.slice(lineStart, s.start);\n    const li = LIST_CONT.exec(line);\n    const q = RE_Q.exec(line);\n    if (li && li[5].trim()) {\n      const bullet = /\\d/.test(li[2]) ? (parseInt(li[2], 10) + 1) + li[2].replace(/\\d+/, \"\") : li[2];\n      const ins = \"\\n\" + li[1] + bullet + li[3] + (li[4] ? \"[ ] \" : \"\");\n      api.replaceRange(s.start, s.end, ins);\n      return;\n    }\n    if (li && !li[5].trim()) { api.replaceRange(lineStart, s.end, \"\", lineStart); return; }\n    if (q && q[2] && q[4].trim()) { api.replaceRange(s.start, s.end, \"\\n\" + q[1] + q[2] + q[3]); return; }\n    api.replaceRange(s.start, s.end, \"\\n\");\n  };\n\n  const keydown = (e: React.KeyboardEvent) => {\n    caretAtKeydown.current = caretNow();\n    onKeyDown && onKeyDown(e);          // host first\n    if (e.defaultPrevented) return;\n    if ((e as unknown as { isComposing?: boolean }).isComposing || e.keyCode === 229) { composing.current = true; return; }\n\n    const mod = isMac ? e.metaKey : e.ctrlKey;\n    if (mod && !e.altKey) {\n      const k = e.key.toLowerCase();\n      if (k === \"b\") { e.preventDefault(); api.wrapSelection(\"**\", \"**\", \"bold\"); return; }\n      if (k === \"i\") { e.preventDefault(); api.wrapSelection(\"_\", \"_\", \"italic\"); return; }\n      if (k === \"e\") { e.preventDefault(); api.wrapSelection(\"`\", \"`\", \"code\"); return; }\n      if (k === \"k\") {\n        e.preventDefault();\n        const s = selectionNow();\n        const sel = value.slice(s.start, s.end) || \"text\";\n        api.replaceRange(s.start, s.end, \"[\" + sel + \"](url)\", s.start + sel.length + 3);\n        return;\n      }\n    }\n\n    if (e.key === \"Enter\") {\n      e.preventDefault();              // we own every line break\n      if (e.shiftKey || !submitOnEnter) newlineAtCaret();\n      else onSubmit && onSubmit(value);\n      return;\n    }\n    if (e.key === \"Tab\") {\n      const s = selectionNow();\n      const fences = (value.slice(0, s.start).match(/```|~~~/g) || []).length;\n      const line = value.slice(value.lastIndexOf(\"\\n\", Math.max(0, s.start - 1)) + 1, s.start);\n      if (fences % 2 === 1 || RE_LI.test(line)) { e.preventDefault(); api.insert(\"  \"); }\n    }\n  };\n\n  const beforeInput = (e: React.FormEvent<HTMLDivElement> & { inputType?: string }) => {\n    if (e.inputType === \"insertParagraph\" || e.inputType === \"insertLineBreak\") {\n      e.preventDefault();\n      newlineAtCaret();\n    }\n  };\n\n  const input = () => {\n    const root = boxRef.current;\n    if (!root || composing.current) return;\n    const sel = window.getSelection();\n    const r = sel && sel.rangeCount ? sel.getRangeAt(0) : null;\n    const read = readDom(root, r ? [{ node: r.startContainer, offset: r.startOffset }] : []);\n    commit(read.text, r ? read.points[0] : read.text.length);\n  };\n\n  const paste = (e: React.ClipboardEvent) => {\n    onPaste && onPaste(e);             // host first — it may turn this into a file\n    if (e.defaultPrevented) return;\n    const text = e.clipboardData && e.clipboardData.getData(\"text/plain\");\n    if (text == null) return;\n    e.preventDefault();               // plain text only: never accept pasted HTML\n    const s = selectionNow();\n    api.replaceRange(s.start, s.end, text.replace(/\\r\\n?/g, \"\\n\"));\n  };\n\n  const lh = 1.55;\n  return (\n    <div className={[\"fd-rme-wrap\", disabled ? \"is-disabled\" : \"\", className].filter(Boolean).join(\" \")}>\n      <div\n        ref={boxRef} id={id} className=\"fd-rme\"\n        contentEditable={!disabled && !readOnly}\n        suppressContentEditableWarning\n        role=\"textbox\" aria-multiline=\"true\" aria-label={ariaLabel}\n        spellCheck={true} autoCapitalize=\"sentences\"\n        style={{ minHeight: (minRows * lh) + \"em\", maxHeight: (maxRows * lh) + \"em\" }}\n        onKeyDown={keydown}\n        onBeforeInput={beforeInput as any}\n        onInput={input}\n        onPaste={paste}\n        onCompositionStart={() => { composing.current = true; }}\n        onCompositionEnd={() => { composing.current = false; input(); }}\n        onKeyUp={() => { if (onTrigger && caretNow() !== caretAtKeydown.current) detect(value, caretNow()); }}\n        onClick={() => { if (onTrigger) detect(value, caretNow()); }}\n      />\n      {!value ? <span className=\"fd-rme-ph\" aria-hidden=\"true\">{placeholder}</span> : null}\n    </div>\n  );\n});\n","import * as React from \"react\";\nimport { EditorView, keymap, lineNumbers, placeholder as cmPlaceholder, drawSelection, Decoration } from \"@codemirror/view\";\nimport { EditorState, StateEffect, StateField, Compartment } from \"@codemirror/state\";\nimport { defaultKeymap, history, historyKeymap, indentMore, indentLess } from \"@codemirror/commands\";\nimport { sql as sqlLang } from \"@codemirror/lang-sql\";\nimport { syntaxHighlighting, HighlightStyle, indentOnInput, bracketMatching } from \"@codemirror/language\";\nimport { tags } from \"@lezer/highlight\";\nimport { FieldLabel, useFieldId } from \"./field\";\n\n/* ── MP-274: CodeEditor ───────────────────────────────────────────────────\n *\n * Engine choice: CodeMirror 6 (`@codemirror/view` + `state` + `commands` +\n * `lang-sql` + `language`, all MIT-licensed — no GPL anywhere in the tree,\n * checked via `npm view <pkg> license` before adding the dependency).\n * A hand-rolled contenteditable (the pattern this file's sibling,\n * MarkdownEditor.tsx, uses) would have to reimplement a SQL tokenizer that\n * runs incrementally on every keystroke, a gutter that stays pixel-locked to\n * wrapped lines, and a keyboard-trap escape hatch — all of which CM6 already\n * ships, tested, behind a documented a11y contract. CM6's own accessibility\n * notes (https://codemirror.net/docs/ref/#state — \"Accessibility\") call out\n * exactly the two hazards this component must clear: (1) the editable region\n * gets `role=\"textbox\"` and `aria-multiline` for free from `contentDOM`, and\n * (2) binding Tab to indent creates a keyboard trap unless the host adds its\n * own escape, which is what the Escape-then-Tab handling below does. Gzipped\n * cost of the six packages together is on the order of 35-45kB — far less\n * than Monaco (~1.5MB) or ships-the-whole-language-server engines, and it is\n * the same order of magnitude as this package's other rich-text component\n * (MarkdownEditor) once its own supporting code is counted.\n *\n * Keyboard-trap contract: Tab indents the current line (`indentMore`/\n * `indentLess`, matching most code editors' plain expectation). Escape-then-\n * Tab focus-out is CodeMirror 6's own built-in behaviour (its `tabFocusMode`,\n * armed by Escape and consumed by the next Tab/Shift-Tab) — this component\n * adds no keymap of its own for it. This is documented to the user via\n * `escapeHint` (rendered as visible help text) and to assistive tech via the\n * same description node `aria-describedby` points at.\n *\n * Escape/layer-stack interaction: CM6 never calls `stopPropagation()` on its\n * own Escape handling (only `preventDefault()` when a binding returns\n * `true`), and `src/kits/layerStack.tsx`'s document-level Escape handler\n * does not check `e.defaultPrevented`. So an enclosing Drawer/Modal's Escape\n * handler always fires regardless of what this editor's Escape handling\n * does — nothing here is what makes that work.\n */\n\nexport interface CodeEditorDiagnostic {\n  /** 1-based line number the diagnostic starts at. */\n  line: number;\n  /** 1-based column the diagnostic starts at. Defaults to 1 (start of line). */\n  column?: number;\n  /** 1-based end line. Defaults to `line`. */\n  endLine?: number;\n  /** 1-based end column. Defaults to the end of `endLine`. */\n  endColumn?: number;\n  message: string;\n  severity?: \"error\" | \"warning\" | \"info\";\n}\n\nexport interface CodeEditorProps {\n  value: string;\n  onChange?: (next: string) => void;\n  label?: string;\n  help?: string;\n  error?: string;\n  required?: boolean;\n  disabled?: boolean;\n  readOnly?: boolean;\n  placeholder?: string;\n  /** Diagnostics anchored to a line/column range — shown inline (underline +\n   *  a message list under the editor) and announced to screen readers via an\n   *  `aria-live` region. */\n  diagnostics?: CodeEditorDiagnostic[];\n  /** The documented key that moves focus out of the editor after Tab has\n   *  started indenting. Shown as help text under the editor. Default true. */\n  showEscapeHint?: boolean;\n  minHeight?: number;\n  id?: string;\n  className?: string;\n  style?: React.CSSProperties;\n  autoFocus?: boolean;\n}\n\nfunction clampOffset(state: EditorState, line: number, column: number): number {\n  const total = state.doc.lines;\n  const ln = state.doc.line(Math.min(Math.max(1, line), total));\n  const col = Math.max(0, (column || 1) - 1);\n  return Math.min(ln.from + col, ln.to);\n}\n\nfunction toCmDiagnostics(state: EditorState, diags: CodeEditorDiagnostic[]) {\n  return diags.map((d) => {\n    const from = clampOffset(state, d.line, d.column ?? 1);\n    const endLine = d.endLine ?? d.line;\n    const endColumn = d.endColumn ?? (state.doc.line(Math.min(Math.max(1, endLine), state.doc.lines)).length + 1);\n    let to = clampOffset(state, endLine, endColumn);\n    if (to <= from) to = Math.min(from + 1, state.doc.length);\n    return { from, to, severity: (d.severity || \"error\") as \"error\" | \"warning\" | \"info\", message: d.message, source: undefined };\n  });\n}\n\n/* Diagnostics are stored in a StateField (rather than CM6's own @codemirror/lint\n * Diagnostic + setDiagnostics, which ships a mouse-hover tooltip that is not itself\n * keyboard- or screen-reader-reachable) so this component can render BOTH the\n * inline underline decoration and the always-visible, always-announced message\n * list from the exact same source of truth. */\nconst setDiagnosticsEffect = StateEffect.define<Array<{ from: number; to: number; severity: string; message: string }>>();\nconst diagnosticsField = StateField.define<Array<{ from: number; to: number; severity: string; message: string }>>({\n  create: () => [],\n  update(value, tr) {\n    for (const e of tr.effects) if (e.is(setDiagnosticsEffect)) return e.value;\n    if (!tr.docChanged) return value;\n    return value.map((d) => ({ ...d, from: tr.changes.mapPos(d.from), to: tr.changes.mapPos(d.to) }));\n  },\n});\n\n/* The syntax palette reuses CodeBlock's own .tok-* classes/--code-* tokens (see\n * src/components/data/CodeBlock.tsx) instead of inventing a second palette, so\n * light/dark/high-contrast theming for SQL keywords, strings, numbers etc. is\n * defined exactly once and CodeEditor and CodeBlock always agree. */\nconst tokenHighlight = HighlightStyle.define([\n  { tag: tags.keyword, class: \"tok-kw\" },\n  { tag: tags.string, class: \"tok-str\" },\n  { tag: [tags.number, tags.bool], class: \"tok-num\" },\n  { tag: tags.comment, class: \"tok-com\" },\n  { tag: [tags.function(tags.variableName), tags.function(tags.propertyName)], class: \"tok-fn\" },\n  { tag: tags.typeName, class: \"tok-type\" },\n  { tag: tags.propertyName, class: \"tok-prop\" },\n  { tag: tags.null, class: \"tok-lit\" },\n  { tag: [tags.punctuation, tags.paren, tags.bracket], class: \"tok-pun\" },\n  { tag: tags.operator, class: \"tok-op\" },\n]);\n\nconst editorTheme = EditorView.theme({\n  \"&\": {\n    fontFamily: \"var(--font-mono)\",\n    fontSize: \"12.5px\",\n    color: \"var(--text)\",\n    backgroundColor: \"transparent\",\n    height: \"100%\",\n  },\n  \".cm-content\": { padding: \"10px 12px\", caretColor: \"var(--text)\" },\n  \".cm-scroller\": { fontFamily: \"var(--font-mono)\", lineHeight: \"1.62\" },\n  \".cm-gutters\": {\n    backgroundColor: \"transparent\",\n    color: \"var(--text-disabled)\",\n    border: \"0\",\n    borderRight: \"1px solid var(--chat-code-border)\",\n  },\n  \".cm-lineNumbers .cm-gutterElement\": { padding: \"0 8px 0 12px\" },\n  \".cm-activeLine\": { backgroundColor: \"var(--surface-2)\" },\n  \".cm-activeLineGutter\": { backgroundColor: \"var(--surface-2)\", color: \"var(--text-2)\" },\n  \"&.cm-focused\": { outline: \"none\" },\n  \".cm-cursor\": { borderLeftColor: \"var(--text)\" },\n  \".cm-selectionBackground, &.cm-focused .cm-selectionBackground\": { backgroundColor: \"var(--blue-100) !important\" },\n  \".cm-placeholder\": { color: \"var(--text-disabled)\" },\n  \".fd-cm-diag-error\": { textDecoration: \"underline wavy var(--danger-solid)\", textUnderlineOffset: \"3px\" },\n  \".fd-cm-diag-warning\": { textDecoration: \"underline wavy var(--warn-solid)\", textUnderlineOffset: \"3px\" },\n  \".fd-cm-diag-info\": { textDecoration: \"underline wavy var(--info-solid)\", textUnderlineOffset: \"3px\" },\n}, { dark: false });\n\nfunction severityClass(sev: string): string {\n  return sev === \"warning\" ? \"fd-cm-diag-warning\" : sev === \"info\" ? \"fd-cm-diag-info\" : \"fd-cm-diag-error\";\n}\n\n/** Decorations recomputed straight from `diagnosticsField` whenever it\n *  changes — the underline is a pure function of the diagnostics, so there is\n *  no separate mutable decoration state to keep in sync with it. */\nfunction decorationsFromDiagnostics() {\n  return EditorView.decorations.compute([diagnosticsField], (state) => {\n    const diags = state.field(diagnosticsField);\n    if (!diags.length) return Decoration.none;\n    const marks = diags\n      .filter((d) => d.from < d.to)\n      .sort((a, b) => a.from - b.from)\n      .map((d) => Decoration.mark({ class: severityClass(d.severity) }).range(d.from, d.to));\n    return Decoration.set(marks, true);\n  });\n}\n\n/**\n * An editable, monospace SQL code editor: line numbers, syntax highlighting,\n * a controlled value/onChange, disabled/read-only states, and diagnostics\n * anchored to a line/column range — shown inline as an underline plus a\n * message list, and announced to screen readers through an `aria-live`\n * region. See the file header above for the engine choice and the\n * keyboard-trap contract (Tab indents; Escape then Tab moves focus out).\n */\nexport function CodeEditor({\n  value, onChange, label, help, error, required = false,\n  disabled = false, readOnly = false, placeholder: placeholderText = \"\",\n  diagnostics = [], showEscapeHint = true, minHeight = 160,\n  id, className = \"\", style, autoFocus = false,\n}: CodeEditorProps) {\n  const fieldId = useFieldId(id);\n  const descId = fieldId + \"-desc\";\n  const liveId = fieldId + \"-live\";\n  const hostRef = React.useRef<HTMLDivElement | null>(null);\n  const viewRef = React.useRef<EditorView | null>(null);\n  const valueRef = React.useRef(value);\n  const onChangeRef = React.useRef(onChange);\n  onChangeRef.current = onChange;\n  const editableCompartment = React.useRef(new Compartment()).current;\n  const readOnlyCompartment = React.useRef(new Compartment()).current;\n  const attributesCompartment = React.useRef(new Compartment()).current;\n  const errorRef = React.useRef(error);\n  errorRef.current = error;\n  const diagnosticsCountRef = React.useRef(diagnostics.length);\n  diagnosticsCountRef.current = diagnostics.length;\n\n  function contentAttributes(): Record<string, string> {\n    return {\n      id: fieldId,\n      \"aria-describedby\": descId + \" \" + liveId,\n      \"aria-invalid\": errorRef.current || diagnosticsCountRef.current ? \"true\" : \"false\",\n      ...(label ? { \"aria-label\": label } : {}),\n    };\n  }\n\n  React.useEffect(() => {\n    const host = hostRef.current;\n    if (!host) return;\n    const updateListener = EditorView.updateListener.of((update) => {\n      if (!update.docChanged) return;\n      const next = update.state.doc.toString();\n      valueRef.current = next;\n      onChangeRef.current && onChangeRef.current(next);\n    });\n\n    const state = EditorState.create({\n      doc: value,\n      extensions: [\n        lineNumbers(),\n        history(),\n        drawSelection(),\n        indentOnInput(),\n        bracketMatching(),\n        sqlLang(),\n        syntaxHighlighting(tokenHighlight),\n        diagnosticsField,\n        decorationsFromDiagnostics(),\n        editorTheme,\n        cmPlaceholder(placeholderText),\n        keymap.of([\n          { key: \"Tab\", run: indentMore, shift: indentLess },\n          ...defaultKeymap,\n          ...historyKeymap,\n        ]),\n        editableCompartment.of(EditorView.editable.of(!disabled)),\n        readOnlyCompartment.of(EditorState.readOnly.of(readOnly)),\n        updateListener,\n        attributesCompartment.of(EditorView.contentAttributes.of(contentAttributes())),\n      ],\n    });\n\n    const view = new EditorView({ state, parent: host });\n    viewRef.current = view;\n    if (autoFocus) view.focus();\n    return () => { view.destroy(); viewRef.current = null; };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  /* controlled value: push external changes in, but never fight the user's\n   * own keystrokes — only dispatch when the doc actually disagrees with the\n   * incoming prop (an `onChange` echo has already made them equal). */\n  React.useEffect(() => {\n    const view = viewRef.current;\n    if (!view) return;\n    const current = view.state.doc.toString();\n    if (current !== value) {\n      view.dispatch({ changes: { from: 0, to: current.length, insert: value } });\n    }\n    valueRef.current = value;\n  }, [value]);\n\n  React.useEffect(() => {\n    const view = viewRef.current;\n    if (!view) return;\n    view.dispatch({ effects: editableCompartment.reconfigure(EditorView.editable.of(!disabled)) });\n  }, [disabled, editableCompartment]);\n\n  React.useEffect(() => {\n    const view = viewRef.current;\n    if (!view) return;\n    view.dispatch({ effects: readOnlyCompartment.reconfigure(EditorState.readOnly.of(readOnly)) });\n  }, [readOnly, readOnlyCompartment]);\n\n  React.useEffect(() => {\n    const view = viewRef.current;\n    if (!view) return;\n    view.dispatch({\n      effects: [\n        setDiagnosticsEffect.of(toCmDiagnostics(view.state, diagnostics)),\n        attributesCompartment.reconfigure(EditorView.contentAttributes.of(contentAttributes())),\n      ],\n    });\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [diagnostics, error]);\n\n  const box = [\"fd-input\", \"fd-code-editor\", error ? \"fd-input-error\" : \"\", disabled ? \"fd-input-disabled\" : \"\"].filter(Boolean).join(\" \");\n  const announce = diagnostics.length\n    ? diagnostics.length + (diagnostics.length === 1 ? \" problem: \" : \" problems: \") +\n      diagnostics.map((d) => \"line \" + d.line + (d.column ? \", column \" + d.column : \"\") + \": \" + d.message).join(\"; \")\n    : \"\";\n\n  return (\n    <div className={[\"fd-field\", className].filter(Boolean).join(\" \")} style={style}>\n      {label ? <FieldLabel htmlFor={fieldId} required={required}>{label}</FieldLabel> : null}\n      <div\n        className={box}\n        style={{ minHeight }}\n      >\n        <div\n          ref={hostRef}\n          className=\"fd-code-editor-host\"\n          style={{ minHeight }}\n        />\n      </div>\n      <span id={descId} className=\"fd-sr\">\n        {help ? help + \". \" : \"\"}\n        {showEscapeHint ? \"Tab indents. Press Escape, then Tab, to move focus out of the editor.\" : \"\"}\n      </span>\n      <div id={liveId} className=\"fd-sr\" role=\"status\" aria-live=\"polite\">{announce}</div>\n      {diagnostics.length ? (\n        <ul className=\"fd-code-editor-diagnostics\">\n          {diagnostics.map((d, i) => (\n            <li key={i} className={\"fd-code-editor-diag is-\" + (d.severity || \"error\")}>\n              <i\n                className={\"ph ph-\" + (d.severity === \"warning\" ? \"warning\" : d.severity === \"info\" ? \"info\" : \"warning-circle\")}\n                aria-hidden=\"true\"\n              />\n              <span className=\"fd-code-editor-diag-loc\">Line {d.line}{d.column ? \":\" + d.column : \"\"}</span>\n              <span>{d.message}</span>\n            </li>\n          ))}\n        </ul>\n      ) : null}\n      {error ? <span className=\"fd-field-error\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{error}</span>\n        : !diagnostics.length && help ? <span className=\"fd-field-help\">{help}</span> : null}\n      {showEscapeHint ? <span className=\"fd-field-help fd-code-editor-hint\">Tab indents. Escape, then Tab, moves focus out.</span> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Radio } from \"./Radio\";\n\nexport interface RadioGroupOption {\n  value: string;\n  label: React.ReactNode;\n  description?: React.ReactNode;\n  badge?: React.ReactNode;\n  disabled?: boolean;\n}\n\n/** Exactly one names the group: `label` renders its own label; `labelledBy` points at a heading the app already shows. */\nexport type RadioGroupNaming =\n  | { /** Accessible name of the group; rendered as the group's own label. */ label: React.ReactNode; labelledBy?: never }\n  | { label?: never; /** Id of a visible element that names the group (`aria-labelledby`); no label is rendered. */ labelledBy: string };\n\nexport type RadioGroupProps = RadioGroupNaming & {\n  options: RadioGroupOption[];\n  value: string;\n  onChange: (value: string) => void;\n  /** Renders each option as a bordered card. */\n  card?: boolean;\n  disabled?: boolean;\n  name?: string;\n  className?: string;\n};\n\n/**\n * A labelled `role=\"radiogroup\"` over native radios sharing one name, so the browser supplies the\n * WAI-ARIA walk: Tab enters on the checked radio, arrows move and select, wrapping at the ends.\n */\nexport function RadioGroup({ label, labelledBy, options, value, onChange, card = false, disabled = false, name, className = \"\" }: RadioGroupProps) {\n  const autoName = React.useId();\n  const labelId = React.useId();\n  return (\n    <div role=\"radiogroup\" aria-labelledby={labelledBy ?? labelId} aria-disabled={disabled || undefined} className={[\"fd-radiogroup\", className].filter(Boolean).join(\" \")}>\n      {labelledBy === undefined && <span id={labelId} className=\"fd-radiogroup-label\">{label}</span>}\n      {options.map((o) => (\n        <Radio\n          key={o.value}\n          card={card}\n          name={name ?? autoName}\n          value={o.value}\n          label={o.label}\n          description={o.description}\n          badge={o.badge}\n          checked={o.value === value}\n          disabled={disabled || o.disabled}\n          onChange={() => onChange(o.value)}\n        />\n      ))}\n    </div>\n  );\n}\n","import * as React from \"react\";\n\nexport interface FieldsetProps extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, \"disabled\"> {\n  /** Disables every descendant control and marks the group aria-busy (an apply is in flight). */\n  busy?: boolean;\n}\n\n/** A native fieldset: `busy` disables all descendant controls at once, with `aria-busy`. */\nexport function Fieldset({ busy = false, className = \"\", ...rest }: FieldsetProps) {\n  return <fieldset disabled={busy} aria-busy={busy || undefined} className={[\"fd-fieldset\", className].filter(Boolean).join(\" \")} {...rest} />;\n}\n","import * as React from \"react\";\nimport { Popover } from \"../actions/Popover\";\nimport { Avatar } from \"../feedback/Avatar\";\nimport { Badge } from \"../feedback/Badge\";\nimport { Spinner } from \"../loading/Spinner\";\nimport { useSessionContext } from \"../../kits/sessionContext\";\nimport { truncationTitle } from \"../textExposure\";\n\n/* The account menu every flytedesk app puts in its top right.\n\n   Drop-in: <AccountMenu onNavigate={(href) => …} /> renders the signed-in user from the\n   nearest SessionProvider (see kits/sessionContext.tsx) and shows each named group in\n   `groups` only to those who can reach at least one of its links — a menu full of items\n   that error on click is worse than a shorter menu.\n\n   `links` and `groups` are overridable so each app can add its own destinations without\n   forking the component. `groups` is a general, ordered list of named sections (e.g.\n   \"Administration\", \"Architecture\", \"Raw Data\") — there is no separate single-group shim:\n   an app that only wants one \"Administration\" section passes `groups={[{ label:\n   \"Administration\", links: [...] }]}`, which is also this component's own default.\n\n   \"View as another member\" — the demo-only user switcher — renders only when the injected\n   session carries `demo` controls, which only `DemoSessionProvider` ever populates. A real\n   session simply never sets it, so there is no separate flag to remember to turn off. */\n\nexport interface AccountMenuLink {\n  id: string; label: string; icon?: string;\n  href?: string;\n  /** Hidden unless the signed-in user holds this permission. */\n  perm?: string;\n  badge?: string;\n  onSelect?: () => void;\n}\n\n/** A named, permission-filtered section of links rendered below the top-level (ungrouped)\n *  `links` — e.g. \"Administration\", \"Architecture\", \"Raw Data\". A group is hidden entirely\n *  once every one of its links is filtered out by `perm`. */\nexport interface AccountMenuGroup {\n  label: string;\n  links: AccountMenuLink[];\n}\n\nexport interface AccountMenuProps {\n  links?: AccountMenuLink[];\n  /** Named sections below `links`, e.g. Administration. Each entry is filtered by its own\n   *  `perm`; a group with no visible links renders nothing. */\n  groups?: AccountMenuGroup[];\n  /** Preferred over href navigation — lets an SPA route without a page load. */\n  onNavigate?: (href: string | undefined, item: AccountMenuLink) => void;\n  /** May return a Promise — the sign-out item shows a spinner and disables itself until it\n   *  settles. On success the menu closes; on rejection the menu stays open with an inline,\n   *  announced error and a Retry (MP-221) — the session is unchanged, so closing here would\n   *  tell the user they signed out when they didn't. Falls back to the injected session's\n   *  own `signOut`. */\n  onSignOut?: () => void | Promise<void>;\n  showRoles?: boolean;\n  /** Demo affordance: impersonate another member to see their UI. Default true. */\n  allowUserSwitch?: boolean;\n  className?: string;\n}\n\n// MP-214: this component used to default to the docs site's own demo destinations\n// (Your profile / Preferences, and an Administration group of Users / Roles & permissions\n// / Feature flags — all `../admin/index.html#…`). Every consumer that never passed\n// `links`/`groups` inherited them into its real account menu, which is how sms-app's\n// chrome ended up shipping links that 404 (SMS-5 architecture-gate review). An app now\n// gets exactly the destinations it asks for; the docs site supplies its own demo links\n// explicitly (see docs/pages/platform/AccountMenu.tsx).\nconst DEFAULT_LINKS: AccountMenuLink[] = [];\n\nconst DEFAULT_GROUPS: AccountMenuGroup[] = [];\n\ninterface ItemProps {\n  item: AccountMenuLink;\n  onPick: (item: AccountMenuLink) => void;\n}\n\nfunction Item({ item, onPick }: ItemProps) {\n  return (\n    <button type=\"button\" role=\"menuitem\" className=\"fd-acct-item\"\n      onClick={() => onPick(item)}>\n      {item.icon ? <i className={\"ph ph-\" + item.icon} aria-hidden=\"true\" /> : null}\n      <span style={{ flex: 1 }}>{item.label}</span>\n      {item.badge ? <Badge tone=\"neutral\">{item.badge}</Badge> : null}\n    </button>\n  );\n}\n\n/**\n * The avatar button + popover every flytedesk app puts in its top right.\n * Reads the signed-in user from the nearest SessionProvider; shows each `groups` section\n * only to those who can use at least one of its links.\n */\nexport function AccountMenu({\n  links = DEFAULT_LINKS,\n  groups = DEFAULT_GROUPS,\n  onNavigate,\n  onSignOut,\n  showRoles = true,\n  allowUserSwitch = true,\n  className = \"\",\n  ...rest\n}: AccountMenuProps) {\n  const { user, roles, can, signOut: ctxSignOut, demo, pending } = useSessionContext();\n  const [open, setOpen] = React.useState(false);\n  const [switching, setSwitching] = React.useState(false);\n  const [signingOut, setSigningOut] = React.useState(false);\n  const [signOutError, setSignOutError] = React.useState<string | null>(null);\n  const ref = React.useRef<HTMLButtonElement>(null);\n\n  // MP-253: while the session is pending, a permission-gated link's visibility can't be\n  // verified either — the same \"unknown, not denied\" rule Gate applies. Rather than call\n  // `can()` against a snapshot that might already be stale (and risk showing a link the\n  // signed-in user no longer, or never actually, holds), every permission-gated link hides\n  // until the session resolves; only links with no `perm` requirement stay visible.\n  const visibleLinks = links.filter((l) => !l.perm || (!pending && can(l.perm)));\n  const visibleGroups = groups\n    .map((g) => ({ label: g.label, links: g.links.filter((l) => !l.perm || (!pending && can(l.perm))) }))\n    .filter((g) => g.links.length);\n  /** The one path that closes the menu without a successful sign-out — always drops any\n   *  stale sign-out error with it, so reopening the menu later never shows a leftover\n   *  error from a previous, unrelated visit. */\n  const closeMenu = () => {\n    setOpen(false);\n    setSignOutError(null);\n  };\n  const pick = (item: AccountMenuLink) => {\n    closeMenu();\n    if (item.onSelect) return item.onSelect();\n    if (onNavigate) return onNavigate(item.href, item);\n    if (item.href) window.location.href = item.href;\n  };\n  /** The handler may be a real async round-trip (an app's own `onSignOut`, or a session's\n   *  `signOut`) — keep the popover open with a visible pending state on this item instead\n   *  of closing immediately, so the click has feedback for however long it takes. */\n  const signOut = async () => {\n    const handler = onSignOut ?? ctxSignOut;\n    setSigningOut(true);\n    setSignOutError(null);\n    try {\n      await handler();\n      // Only a successful sign-out closes the menu — the signed-in session actually\n      // ended, so there's nothing left for the user to do here.\n      setSigningOut(false);\n      closeMenu();\n    } catch (err) {\n      // A failed sign-out is surfaced, never swallowed: the session is unchanged, so\n      // closing the menu here would tell the user they signed out when they didn't\n      // (MP-221). The menu stays open with an inline, announced error and a Retry.\n      console.error(\"AccountMenu: sign-out handler failed\", err);\n      setSigningOut(false);\n      setSignOutError(err instanceof Error ? err.message : \"Sign out failed. Please try again.\");\n    }\n  };\n  const showSwitcher = allowUserSwitch && !!demo;\n\n  return (\n    <>\n      <button type=\"button\" ref={ref} className={[\"fd-acct-trigger\", className].filter(Boolean).join(\" \")}\n        aria-haspopup=\"menu\" aria-expanded={open} aria-label={\"Account — \" + user.name}\n        onClick={() => (open ? closeMenu() : setOpen(true))} {...rest}>\n        <Avatar name={user.name} size=\"sm\" />\n        <i className=\"ph ph-caret-down\" aria-hidden=\"true\" style={{ fontSize: 11, color: \"var(--text-muted)\" }} />\n      </button>\n      <Popover\n        open={open}\n        anchorRef={ref}\n        onClose={closeMenu}\n        placement=\"bottom-end\"\n        width={272}\n      >\n        <div role=\"menu\" className=\"fd-stack\" style={{ gap: 0 }}>\n          <div className=\"fd-row\" style={{ gap: 10, padding: \"12px 14px\", borderBottom: \"1px solid var(--border)\" }}>\n            <Avatar name={user.name} />\n            <span className=\"fd-stack\" style={{ gap: 1, minWidth: 0, flex: 1 }}>\n              <span className=\"fd-body-sm\" style={{ fontWeight: 700 }}>{user.name}</span>\n              <span className=\"fd-body-sm fd-muted fd-table-trunc\" title={truncationTitle(user.email)}>{user.email}</span>\n            </span>\n          </div>\n\n          {showRoles && roles.length ? (\n            <div className=\"fd-row\" style={{ gap: 6, padding: \"10px 14px\", flexWrap: \"wrap\", borderBottom: \"1px solid var(--border)\" }}>\n              {roles.map((r) => <Badge key={r.id} tone={r.id === \"owner\" ? \"success\" : \"neutral\"}>{r.name}</Badge>)}\n            </div>\n          ) : null}\n\n          {visibleLinks.length ? (\n            <div className=\"fd-acct-group\">\n              {visibleLinks.map((l) => <Item key={l.id} item={l} onPick={pick} />)}\n            </div>\n          ) : null}\n\n          {visibleGroups.map((g) => (\n            <div key={g.label} className=\"fd-acct-group\" style={{ borderTop: \"1px solid var(--border)\" }}>\n              <span className=\"fd-overline fd-muted\" style={{ padding: \"8px 14px 4px\", display: \"block\" }}>{g.label}</span>\n              {g.links.map((l) => <Item key={l.id} item={l} onPick={pick} />)}\n            </div>\n          ))}\n\n          {/* Demo affordance: impersonate another member to see the UI their roles produce.\n              A real deployment gates this behind an audited support tool, never a menu —\n              enforced here by `demo` only ever being set by DemoSessionProvider. */}\n          {showSwitcher && demo ? (\n            <div className=\"fd-acct-group\" style={{ borderTop: \"1px solid var(--border)\" }}>\n              <button type=\"button\" role=\"menuitem\" className=\"fd-acct-item\" onClick={() => setSwitching((s) => !s)}>\n                <i className=\"ph ph-user-switch\" aria-hidden=\"true\" />\n                <span style={{ flex: 1 }}>View as another member</span>\n                <i className={\"ph ph-caret-\" + (switching ? \"up\" : \"down\")} aria-hidden=\"true\" style={{ fontSize: 11 }} />\n              </button>\n              {switching ? (\n                <div className=\"fd-stack\" style={{ gap: 0 }}>\n                  {demo.allUsers.map((u) => (\n                    <button key={u.id} type=\"button\" className=\"fd-acct-item\" data-current={u.id === user.id ? \"true\" : \"false\"}\n                      onClick={() => { demo.setActiveUser(u.id); setOpen(false); setSwitching(false); }}>\n                      <Avatar name={u.name} size=\"sm\" />\n                      <span className=\"fd-stack\" style={{ gap: 0, flex: 1, minWidth: 0, alignItems: \"flex-start\" }}>\n                        <span style={{ fontWeight: u.id === user.id ? 700 : 500 }}>{u.name}</span>\n                        {u.roles ? <span className=\"fd-muted\" style={{ fontSize: 11.5 }}>{u.roles.join(\", \")}</span> : null}\n                      </span>\n                      {u.id === user.id ? <i className=\"ph ph-check\" aria-hidden=\"true\" style={{ color: \"var(--ok-text)\" }} /> : null}\n                    </button>\n                  ))}\n                </div>\n              ) : null}\n            </div>\n          ) : null}\n\n          <div className=\"fd-acct-group\" style={{ borderTop: \"1px solid var(--border)\" }}>\n            <button type=\"button\" role=\"menuitem\" className=\"fd-acct-item\" data-danger=\"true\"\n              disabled={signingOut} onClick={signOut}>\n              {signingOut ? <Spinner size=\"sm\" /> : <i className=\"ph ph-sign-out\" aria-hidden=\"true\" />}\n              <span style={{ flex: 1 }}>{signingOut ? \"Signing out…\" : \"Sign out\"}</span>\n            </button>\n            {/* MP-221: a rejected sign-out keeps the menu open — closing it here would tell\n                the user they signed out when they didn't. `role=\"alert\"` gets this announced\n                to assistive tech the moment it appears, with no extra aria-live wiring. */}\n            {signOutError ? (\n              <div role=\"alert\" className=\"fd-body-sm\" style={{ padding: \"0 14px 12px\" }}>\n                <span style={{ display: \"block\", color: \"var(--danger-text)\", marginBottom: 6 }}>\n                  {signOutError}\n                </span>\n                <button type=\"button\" className=\"fd-soon-link\" disabled={signingOut} onClick={signOut}>\n                  Retry\n                </button>\n              </div>\n            ) : null}\n          </div>\n        </div>\n      </Popover>\n    </>\n  );\n}\n","import * as React from \"react\";\n\n/* The one injection point every session-aware component (AccountMenu, Gate / PermissionDenied\n   / FeatureGate / PermissionHint, ProfilePage, AppSwitcher) reads.\n\n   An app supplies its own SessionContextValue — built from its real signed-in session — via\n   <SessionProvider value={...}>. The docs site (and any other demo consumer) instead mounts\n   <DemoSessionProvider> (kits/session.ts), which wraps the built-in fixture SessionKit as ONE\n   implementation of this exact contract. There is no second, parallel \"demo mode\" code path\n   inside the components themselves: they call useSessionContext() and nothing else. */\n\n/** Whatever a session-aware component asks of the signed-in user, independent of any specific\n *  identity provider. `kits/session.ts`'s own demo `User` extends this with fixture-only\n *  bookkeeping (status, lastActive, …) that a real integration is never expected to supply. */\nexport interface SessionUser {\n  id: string;\n  name: string;\n  email: string;\n  title?: string;\n  team?: string;\n  phone?: string;\n  bio?: string;\n  timezone?: string;\n  /** Identity is managed by an SSO provider — ProfilePage disables the email field with a\n   *  different help string when true. */\n  sso?: boolean;\n  joined?: string;\n  notify?: Record<string, boolean>;\n  /** Display-only role names — used by the demo \"View as another member\" list. Not read\n   *  anywhere permissions are actually decided; `SessionContextValue.roles`/`can`/`hasRole`\n   *  are the source of truth for the SIGNED-IN user. */\n  roles?: string[];\n}\n\nexport interface SessionRole {\n  id: string;\n  name: string;\n}\n\n/** One flytedesk app the signed-in user can reach — the \"All flytedesk apps\" switcher's row\n *  shape. The design system never fetches this list; it is supplied via `AppSwitcher`'s own\n *  `apps` prop or via `SessionContextValue.apps`. */\nexport interface AppEntry {\n  key: string;\n  name: string;\n  url: string;\n  icon?: string;\n  /** True for the app the switcher itself is currently rendered inside. */\n  current?: boolean;\n}\n\n/** Demo-only affordance: impersonate another member to see their UI. Present ONLY on the demo\n *  provider — a real, injected session must never populate this — so AccountMenu can key its\n *  \"View as another member\" row on this field simply existing, rather than on a separate\n *  boolean prop a real integration could forget to turn off. */\nexport interface DemoSessionControls {\n  allUsers: SessionUser[];\n  setActiveUser: (userId: string) => void;\n}\n\nexport interface SessionContextValue {\n  user: SessionUser;\n  /** The signed-in user's roles, for display (AccountMenu's/ProfilePage's role badges). */\n  roles: SessionRole[];\n  /** Every permission key the signed-in user holds. */\n  permissions: string[];\n  /** All of `permission` must be held. */\n  can: (permission: string | string[]) => boolean;\n  /** At least one of `permissions` must be held. */\n  canAny: (permissions: string[]) => boolean;\n  hasRole: (roleId: string) => boolean;\n  /** The app's real sign-out handler. AccountMenu's `onSignOut` prop, when supplied, still\n   *  wins over this — this is the fallback every app gets for free. May return a Promise —\n   *  AccountMenu shows a pending state on its sign-out item until it settles. */\n  signOut: () => void | Promise<void>;\n  /** Persists a profile edit. Omit on a session that does not support self-service profile\n   *  edits; ProfilePage then relies solely on its own `onSave` prop. */\n  saveProfile?: (patch: Partial<SessionUser>) => void | Promise<void>;\n  /** The flytedesk apps this user can reach, for `AppSwitcher`. Omit if the app instead\n   *  passes `AppSwitcher`'s own `apps` prop directly. */\n  apps?: AppEntry[];\n  demo?: DemoSessionControls;\n  /**\n   * True while this snapshot's permissions cannot be verified right now — an identity\n   * provider or auth-store outage, never an ordinary initial load (that case has its own\n   * \"loading\" region elsewhere and never reaches a `SessionProvider` at all). Permission is\n   * then UNKNOWN, not denied: `can`/`canAny`/`hasRole` may still be defined and may still\n   * fail closed for any OTHER caller that reads them directly, but `Gate` checks this field\n   * FIRST and, when true, renders its pending state instead of evaluating them against a\n   * snapshot that might already be stale. Omit (or leave `false`) for a session an app never\n   * expects to go stale — every existing integration keeps its current behavior unchanged.\n   */\n  pending?: boolean;\n}\n\nconst SessionContext = React.createContext<SessionContextValue | null>(null);\n\nexport interface SessionProviderProps {\n  value: SessionContextValue;\n  children?: React.ReactNode;\n}\n\n/** Mount once near the app root with the real, signed-in session. Every session-aware\n *  component in this package reads from this provider and nothing else. */\nexport function SessionProvider({ value, children }: SessionProviderProps) {\n  return React.createElement(SessionContext.Provider, { value }, children);\n}\n\n/** Reads the nearest `SessionProvider`. Throws when none is mounted — a session-aware\n *  component with nothing to read from is a wiring bug to surface immediately, not a state to\n *  silently render through. */\nexport function useSessionContext(): SessionContextValue {\n  const ctx = React.useContext(SessionContext);\n  if (!ctx) {\n    throw new Error(\n      \"useSessionContext() was called outside a <SessionProvider>. Wrap your app root in \" +\n        \"<SessionProvider value={...}> with your real session, or — in the docs site or a \" +\n        \"demo — in <DemoSessionProvider>, before rendering AccountMenu, Gate, ProfilePage or \" +\n        \"AppSwitcher.\"\n    );\n  }\n  return ctx;\n}\n","import * as React from \"react\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { Popover, Menu, type MenuItem } from \"../actions/Popover\";\nimport { useSessionContext } from \"../../kits/sessionContext\";\nimport type { AppEntry } from \"../../kits/sessionContext\";\n\nexport interface AppSwitcherProps {\n  /**\n   * The flytedesk apps this user can reach. Defaults to the injected session's own `apps`\n   * (`SessionContextValue.apps`) when omitted — this package never fetches the list itself;\n   * an app either passes it here or wires it into its `SessionProvider` value.\n   */\n  apps?: AppEntry[];\n  /** Preferred over `url` navigation — lets an SPA route without a page load. */\n  onNavigate?: (app: AppEntry) => void;\n  className?: string;\n}\n\n/**\n * The \"All flytedesk apps\" switcher every flytedesk app puts in its topbar, beside\n * `AccountMenu`: a grid-icon trigger anchoring a list of the apps the signed-in user can\n * reach, the current app marked and not selectable. Reuses `Popover`/`Menu` — the same\n * keyboard-complete, ARIA-correct list every other menu-shaped control in this package is\n * built on — rather than a bespoke list, so Home/End/type-ahead/arrow-key behavior is\n * identical everywhere.\n *\n * Renders nothing when there are no apps to switch to (an empty switcher is not a control,\n * it's a dead button), so a Topbar can render it unconditionally.\n */\nexport function AppSwitcher({ apps: appsProp, onNavigate, className = \"\" }: AppSwitcherProps) {\n  const { apps: contextApps } = useSessionContext();\n  const apps = appsProp ?? contextApps ?? [];\n  const [open, setOpen] = React.useState(false);\n  // IconButton isn't ref-forwarding — anchor the popover to a wrapping span instead (same\n  // idiom AppearanceMenu uses).\n  const anchorRef = React.useRef<HTMLSpanElement>(null);\n\n  if (!apps.length) return null;\n\n  const items: MenuItem[] = apps.map((app): MenuItem => ({\n    id: app.key,\n    label: app.name,\n    icon: app.icon,\n    meta: app.current ? \"Current\" : undefined,\n    disabled: app.current,\n    onSelect: () => {\n      if (app.current) return;\n      if (onNavigate) return onNavigate(app);\n      window.location.href = app.url;\n    },\n  }));\n\n  return (\n    <React.Fragment>\n      <span ref={anchorRef} className={[\"fd-appswitch-anchor\", className].filter(Boolean).join(\" \")} style={{ display: \"inline-flex\" }}>\n        <IconButton\n          icon=\"squares-four\"\n          label=\"All flytedesk apps\"\n          aria-haspopup=\"menu\"\n          aria-expanded={open}\n          onClick={() => setOpen((v) => !v)}\n        />\n      </span>\n      <Popover\n        open={open}\n        anchorRef={anchorRef}\n        onClose={() => setOpen(false)}\n        placement=\"bottom-end\"\n        role=\"menu\"\n        label=\"All flytedesk apps\"\n        width={240}\n        maxHeight={360}\n      >\n        <Menu items={items} onClose={() => setOpen(false)} />\n      </Popover>\n    </React.Fragment>\n  );\n}\n","import * as React from \"react\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { Popover } from \"../actions/Popover\";\nimport { SegmentedControl } from \"../actions/SegmentedControl\";\nimport { Switch } from \"../forms/Switch\";\nimport { useAppearancePrefs, type AppearancePrefs, type TextScale, type ThemeMode } from \"../../kits/appearance\";\nimport { useAppearanceStore } from \"./AppearanceProvider\";\n\nexport interface AppearanceMenuProps {\n  className?: string;\n}\n\nconst THEME_OPTIONS: { value: ThemeMode; label: string }[] = [\n  { value: \"light\", label: \"Light\" },\n  { value: \"dark\", label: \"Dark\" },\n  { value: \"system\", label: \"System\" },\n];\nconst TEXT_SCALE_OPTIONS: { value: TextScale; label: string }[] = [\n  { value: \"sm\", label: \"S\" },\n  { value: \"md\", label: \"M\" },\n  { value: \"lg\", label: \"L\" },\n  { value: \"xl\", label: \"XL\" },\n];\n\n/**\n * The appearance popover every flytedesk app puts in its topbar: theme, text size, high\n * contrast, and a reduced-motion override on top of the OS's own `prefers-reduced-\n * motion`. Fits `Topbar`'s `actions`/`overflowActions` slot (see Topbar.tsx) the same\n * way `AccountMenu` does — an `IconButton` trigger anchoring a `Popover`.\n *\n * It only reads and writes the nearest `AppearanceProvider`'s store (persistence is that\n * store's concern, see kits/appearance.ts); applying the prefs to `document.documentElement`\n * is the provider's job, so it holds at every width whether or not this menu is mounted.\n * Every visual effect is a CSS rule in this package's own styles (tokens.css) driven by\n * the `[data-theme]`/`[data-text-scale]`/`[data-contrast]`/`[data-motion]` attributes\n * the provider sets — no inline styles, no app-side CSS.\n */\nexport function AppearanceMenu({ className = \"\" }: AppearanceMenuProps) {\n  const [prefs, update] = useAppearancePrefs(useAppearanceStore());\n  const [open, setOpen] = React.useState(false);\n  // IconButton isn't ref-forwarding — anchor the popover to a wrapping span instead.\n  const anchorRef = React.useRef<HTMLSpanElement>(null);\n\n  const patch = (p: Partial<AppearancePrefs>) => update(p);\n\n  return (\n    <React.Fragment>\n      <span ref={anchorRef} className={[\"fd-appearance-anchor\", className].filter(Boolean).join(\" \")} style={{ display: \"inline-flex\" }}>\n        <IconButton\n          icon=\"circle-half\"\n          label=\"Appearance settings\"\n          onClick={() => setOpen((v) => !v)}\n        />\n      </span>\n      <Popover\n        open={open}\n        anchorRef={anchorRef}\n        onClose={() => setOpen(false)}\n        placement=\"bottom-end\"\n        padded\n        width={260}\n        label=\"Appearance settings\"\n      >\n        <div className=\"fd-stack\" style={{ display: \"flex\", flexDirection: \"column\", gap: 16 }}>\n          <div style={{ display: \"flex\", flexDirection: \"column\", gap: 6 }}>\n            <span className=\"fd-field-label\">Theme</span>\n            <SegmentedControl\n              options={THEME_OPTIONS}\n              value={prefs.theme}\n              onChange={(v) => patch({ theme: v as ThemeMode })}\n              aria-label=\"Theme\"\n            />\n          </div>\n          <div style={{ display: \"flex\", flexDirection: \"column\", gap: 6 }}>\n            <span className=\"fd-field-label\">Text size</span>\n            <SegmentedControl\n              options={TEXT_SCALE_OPTIONS}\n              value={prefs.textScale}\n              onChange={(v) => patch({ textScale: v as TextScale })}\n              aria-label=\"Text size\"\n            />\n          </div>\n          <Switch\n            label=\"High contrast\"\n            description=\"Stronger borders and text color\"\n            checked={prefs.highContrast}\n            onChange={(e) => patch({ highContrast: e.target.checked })}\n          />\n          <Switch\n            label=\"Reduce motion\"\n            description=\"Minimize animations and transitions\"\n            checked={prefs.reduceMotion}\n            onChange={(e) => patch({ reduceMotion: e.target.checked })}\n          />\n        </div>\n      </Popover>\n    </React.Fragment>\n  );\n}\n","import * as React from \"react\";\n\n/* AppearanceKit — the display/accessibility preferences every flytedesk app offers from\n   its topbar: theme (light/dark/system), text size, high contrast, and a reduced-motion\n   override layered on top of the OS's own `prefers-reduced-motion`.\n\n   PERSISTENCE IS AN APP-SUPPLIED EXTERNAL STORE (`AppearanceStore`) — deliberately not a\n   single hard-coded key or a bare `Storage`, because:\n   - more than one app on the same origin (or more than one AppearanceMenu instance in a\n     test) must never share or collide on state;\n   - an app whose prefs arrive asynchronously after mount (media-planner's server-synced\n     `hydrate()`/`mergePreferences`, landing after GET /me + prefs.get) needs the menu to\n     pick that up and re-render, not just read once at mount.\n   `AppearanceStore` is the `useSyncExternalStore` shape: a synchronous `getSnapshot`, a\n   `write`, and a `subscribe` that returns its own unsubscribe. `useAppearancePrefs` reads\n   through `React.useSyncExternalStore`, so ANY store — the built-in localStorage one, or\n   an app's own adapter over its server-synced state — re-renders the menu the moment its\n   snapshot changes, and `watchAppearance` (run by `AppearanceProvider` for the app's whole\n   lifetime) re-applies the DOM attributes, whether or not the menu is mounted.\n\n   `createLocalStorageAppearanceStore` is just one implementation of that interface: the\n   default for an app with no server-side prefs of its own. It stays in sync across tabs\n   via the `storage` event and notifies its own subscribers on same-tab writes. Every\n   visual effect lives in this package's own styles/tokens.css, driven by the\n   [data-theme]/[data-text-scale]/[data-contrast]/[data-motion] attributes this kit sets\n   on `document.documentElement` — never inline styles, never app-side CSS. */\n\nexport type ThemeMode = \"light\" | \"dark\" | \"system\";\nexport type TextScale = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nexport interface AppearancePrefs {\n  theme: ThemeMode;\n  textScale: TextScale;\n  highContrast: boolean;\n  /** Can only ever ADD reduced motion on top of the `prefers-reduced-motion` OS floor\n   *  tokens.css already respects — turning this off never re-enables motion the OS\n   *  itself asked to reduce. */\n  reduceMotion: boolean;\n}\n\nexport const DEFAULT_STORAGE_KEY = \"fd-appearance\";\n\nexport const DEFAULT_PREFS: AppearancePrefs = {\n  theme: \"system\",\n  textScale: \"md\",\n  highContrast: false,\n  reduceMotion: false,\n};\n\n/** An app-supplied external store for `AppearancePrefs` — the same read/subscribe shape\n *  `React.useSyncExternalStore` expects, plus a `write`. Implement this over whatever a\n *  consuming app already has (a server-synced prefs cache, a Redux/Zustand store, …) to\n *  drive `AppearanceMenu` from that state instead of the default localStorage store. */\nexport interface AppearanceStore {\n  /** Synchronous current value. Called on every render that might have changed it —\n   *  must be cheap and must not allocate a new object unless the value actually changed\n   *  (React compares by reference to decide whether to re-render). */\n  getSnapshot: () => AppearancePrefs;\n  /** Persist a full prefs object. `AppearanceMenu` always calls this with the complete,\n   *  merged record — never a partial patch — so a store never needs to merge itself. */\n  write: (prefs: AppearancePrefs) => void;\n  /** Register a callback fired whenever the snapshot changes for a reason other than this\n   *  store's own `write` call returning (e.g. another tab, or an app's async server\n   *  hydration completing after mount). Returns its own unsubscribe. */\n  subscribe: (onChange: () => void) => () => void;\n}\n\nexport interface AppearanceStoreOptions {\n  /** localStorage (or `storage`) key these prefs are read from / written to. Default\n   *  \"fd-appearance\". Namespace this per consuming app. */\n  storageKey?: string;\n  /** Swappable for tests or a non-browser environment. Default `window.localStorage`\n   *  (read lazily — safe to import this module where `window` doesn't exist yet). */\n  storage?: Pick<Storage, \"getItem\" | \"setItem\">;\n  /** Overrides the built-in defaults (`system` / `md` / off / off) per field. */\n  defaults?: Partial<AppearancePrefs>;\n}\n\nfunction resolveDefaults(opts?: AppearanceStoreOptions): AppearancePrefs {\n  return { ...DEFAULT_PREFS, ...opts?.defaults };\n}\n\nfunction resolveStorage(opts?: AppearanceStoreOptions): Pick<Storage, \"getItem\" | \"setItem\"> | undefined {\n  if (opts?.storage) return opts.storage;\n  return typeof window !== \"undefined\" ? window.localStorage : undefined;\n}\n\n/** \"system\" resolved against the OS's current setting. Pure aside from reading\n *  `matchMedia` — never throws in an environment without it (SSR, some test runners). */\nexport function resolveTheme(mode: ThemeMode): \"light\" | \"dark\" {\n  if (mode !== \"system\") return mode;\n  return typeof window !== \"undefined\" &&\n    typeof window.matchMedia === \"function\" &&\n    window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n    ? \"dark\"\n    : \"light\";\n}\n\n/** Reads stored prefs, falling back field-by-field to defaults — a missing key, a\n *  malformed JSON blob, or a value of the wrong shape/type each fall back individually\n *  rather than discarding the whole record (a bad stored value degrades, it never\n *  crashes the caller). Used internally by `createLocalStorageAppearanceStore`; exported\n *  as a low-level primitive for a caller building its own store on top of a similar\n *  key/value backend. */\nexport function loadPrefs(opts?: AppearanceStoreOptions): AppearancePrefs {\n  const defaults = resolveDefaults(opts);\n  const storage = resolveStorage(opts);\n  const key = opts?.storageKey ?? DEFAULT_STORAGE_KEY;\n  if (!storage) return defaults;\n  let stored: unknown;\n  try {\n    const raw = storage.getItem(key);\n    stored = raw ? JSON.parse(raw) : null;\n  } catch {\n    stored = null;\n  }\n  if (typeof stored !== \"object\" || stored === null) return defaults;\n  const s = stored as Partial<Record<keyof AppearancePrefs, unknown>>;\n  return {\n    theme: s.theme === \"light\" || s.theme === \"dark\" || s.theme === \"system\" ? s.theme : defaults.theme,\n    textScale:\n      s.textScale === \"sm\" || s.textScale === \"md\" || s.textScale === \"lg\" || s.textScale === \"xl\"\n        ? s.textScale\n        : defaults.textScale,\n    highContrast: typeof s.highContrast === \"boolean\" ? s.highContrast : defaults.highContrast,\n    reduceMotion: typeof s.reduceMotion === \"boolean\" ? s.reduceMotion : defaults.reduceMotion,\n  };\n}\n\nexport function savePrefs(prefs: AppearancePrefs, opts?: AppearanceStoreOptions): void {\n  const storage = resolveStorage(opts);\n  if (!storage) return;\n  const key = opts?.storageKey ?? DEFAULT_STORAGE_KEY;\n  try {\n    storage.setItem(key, JSON.stringify(prefs));\n  } catch {\n    /* private-browsing or storage disabled — preference just won't persist */\n  }\n}\n\n/** The default `AppearanceStore`: backed by `storage` (default `window.localStorage`)\n *  under `storageKey` (default `\"fd-appearance\"`). Same-tab writes notify this store's\n *  own subscribers synchronously; the browser's `storage` event keeps every OTHER tab\n *  in sync too (a tab never gets its own `storage` event for its own write, which is\n *  exactly why same-tab notification is handled separately here). The window listener is\n *  attached only while at least one subscriber is registered, and removed once the last\n *  one unsubscribes — a store an app creates per-mount never leaks a listener. */\nexport function createLocalStorageAppearanceStore(opts?: AppearanceStoreOptions): AppearanceStore {\n  const key = opts?.storageKey ?? DEFAULT_STORAGE_KEY;\n  const storage = resolveStorage(opts);\n  let snapshot = loadPrefs(opts);\n  const listeners = new Set<() => void>();\n\n  const notify = () => listeners.forEach((l) => l());\n\n  const onStorageEvent = (e: StorageEvent) => {\n    // A `storage` event with `key === null` means the whole storage area was cleared\n    // (e.g. `localStorage.clear()`), which affects this key too.\n    if (e.key !== null && e.key !== key) return;\n    snapshot = loadPrefs(opts);\n    notify();\n  };\n\n  return {\n    getSnapshot: () => snapshot,\n    write(prefs) {\n      snapshot = prefs;\n      if (storage) {\n        try {\n          storage.setItem(key, JSON.stringify(prefs));\n        } catch {\n          /* private-browsing or storage disabled — preference just won't persist */\n        }\n      }\n      notify();\n    },\n    subscribe(onChange) {\n      listeners.add(onChange);\n      if (listeners.size === 1 && typeof window !== \"undefined\") {\n        window.addEventListener(\"storage\", onStorageEvent);\n      }\n      return () => {\n        listeners.delete(onChange);\n        if (listeners.size === 0 && typeof window !== \"undefined\") {\n          window.removeEventListener(\"storage\", onStorageEvent);\n        }\n      };\n    },\n  };\n}\n\n/** Sets every attribute this kit's tokens.css rules read: `[data-theme]` (resolved,\n *  never \"system\" itself — nothing downstream re-resolves it), `[data-text-scale]`,\n *  `[data-contrast=\"high\"]` (present only when on — absent, not \"normal\", is the \"off\"\n *  state so a plain `[data-contrast]` selector alone is meaningless) and\n *  `[data-motion=\"reduce\"]` (same absent-is-off shape). No inline styles: every visual\n *  effect is a CSS rule in this package's own styles, driven by these attributes alone. */\nexport function applyPrefs(prefs: AppearancePrefs, root: HTMLElement = document.documentElement): void {\n  root.setAttribute(\"data-theme\", resolveTheme(prefs.theme));\n  root.setAttribute(\"data-text-scale\", prefs.textScale);\n  if (prefs.highContrast) root.setAttribute(\"data-contrast\", \"high\");\n  else root.removeAttribute(\"data-contrast\");\n  if (prefs.reduceMotion) root.setAttribute(\"data-motion\", \"reduce\");\n  else root.removeAttribute(\"data-motion\");\n}\n\n/** Applies `store`'s current snapshot to `root` — one synchronous, idempotent call. Run it\n *  once BEFORE the app's first React render (`main.tsx`) so a saved theme/text size/contrast\n *  paints from the very first frame, with no flash of the defaults while the bundle boots and\n *  the app mounts. It is the same application `watchAppearance` does on mount, so the two never\n *  disagree. */\nexport function applyAppearance(store: AppearanceStore, root: HTMLElement = document.documentElement): void {\n  applyPrefs(store.getSnapshot(), root);\n}\n\n/** Keeps `root`'s appearance attributes equal to `store`'s snapshot for as long as it runs:\n *  applies the current value now, re-applies on every change the store reports (a menu write,\n *  another tab's `storage` event, an app's async server hydration) and, while the theme is\n *  \"system\", when the OS's own light/dark setting flips. Returns its stop function.\n *\n *  This is the ONE place appearance reaches the DOM, and it is independent of every piece of UI:\n *  `AppearanceProvider` runs it for the app's lifetime, so a saved Appearance applies at every\n *  width whether or not `AppearanceMenu` is mounted (Topbar collapses it into a \"More actions\"\n *  menu on a phone, where it isn't mounted until opened — SMS-96). */\nexport function watchAppearance(store: AppearanceStore, root: HTMLElement = document.documentElement): () => void {\n  const apply = () => applyAppearance(store, root);\n  apply();\n  const unsubscribe = store.subscribe(apply);\n  const mq =\n    typeof window !== \"undefined\" && typeof window.matchMedia === \"function\"\n      ? window.matchMedia(\"(prefers-color-scheme: dark)\")\n      : null;\n  const onSchemeChange = () => {\n    if (store.getSnapshot().theme === \"system\") apply();\n  };\n  mq?.addEventListener(\"change\", onSchemeChange);\n  return () => {\n    unsubscribe();\n    mq?.removeEventListener(\"change\", onSchemeChange);\n  };\n}\n\n/** [prefs, update] over an app-supplied `AppearanceStore`. Reads through\n *  `React.useSyncExternalStore`, so a snapshot that changes for ANY reason — this hook's\n *  own `update`, another tab, or an app's async server hydration landing after mount —\n *  re-renders with the new value. It does NOT touch the DOM: applying appearance is the\n *  app-wide `AppearanceProvider`'s job (`watchAppearance`), never a hook a menu happens to\n *  mount. Nothing here is a module-level singleton. */\nexport function useAppearancePrefs(\n  store: AppearanceStore,\n): [AppearancePrefs, (patch: Partial<AppearancePrefs>) => void] {\n  const prefs = React.useSyncExternalStore(store.subscribe, store.getSnapshot);\n\n  const update = React.useCallback(\n    (patch: Partial<AppearancePrefs>) => {\n      store.write({ ...store.getSnapshot(), ...patch });\n    },\n    [store],\n  );\n\n  return [prefs, update];\n}\n","import * as React from \"react\";\nimport { watchAppearance, type AppearanceStore } from \"../../kits/appearance\";\n\nconst AppearanceStoreContext = React.createContext<AppearanceStore | null>(null);\n\nexport interface AppearanceProviderProps {\n  /** The app's one `AppearanceStore` — `createLocalStorageAppearanceStore({ storageKey })`\n   *  for an app with no server-side prefs, or its own adapter over server-synced state. Create\n   *  it ONCE, outside React (a module constant): the provider, `AppearanceMenu` and the\n   *  pre-render `applyAppearance(store)` call in `main.tsx` all share this one instance. */\n  store: AppearanceStore;\n  children: React.ReactNode;\n}\n\n/**\n * Owns applying the app's saved Appearance (theme, text size, contrast, reduced motion) to\n * `document.documentElement` for the whole life of the app, and shares its store with\n * `AppearanceMenu`. Mount it once, at the app root — above the session boundary, so the\n * sign-in and loading screens carry the saved Appearance too.\n *\n * Applying is deliberately NOT the menu's job: Topbar collapses the menu into a \"More actions\"\n * overflow that isn't mounted until it's opened (640px and narrower by default), so a menu that\n * applied prefs would leave a saved dark theme unapplied after a reload on a phone (SMS-96).\n * Here a menu write, another tab's `storage` event and an app's async server hydration all\n * re-apply at every width. The first application runs in a layout effect, before the browser's\n * first paint of the app; call `applyAppearance(store)` before `createRoot(...).render(...)` to\n * also cover the time before React mounts.\n */\nexport function AppearanceProvider({ store, children }: AppearanceProviderProps) {\n  React.useLayoutEffect(() => watchAppearance(store), [store]);\n  return <AppearanceStoreContext.Provider value={store}>{children}</AppearanceStoreContext.Provider>;\n}\n\n/** The store of the nearest `AppearanceProvider`. Throws without one: an `AppearanceMenu`\n *  mounted outside a provider would write prefs nothing ever applies. */\nexport function useAppearanceStore(): AppearanceStore {\n  const store = React.useContext(AppearanceStoreContext);\n  if (!store) throw new Error(\"AppearanceMenu and useAppearanceStore must be rendered inside an <AppearanceProvider>.\");\n  return store;\n}\n","import * as React from \"react\";\nimport { Card } from \"../surfaces/Card\";\nimport { Badge } from \"../feedback/Badge\";\nimport { Tag } from \"../feedback/Tag\";\nimport { Flag } from \"../feedback/Flag\";\nimport { Button } from \"../actions/Button\";\nimport { Input } from \"../forms/Input\";\nimport { Collapsible } from \"../surfaces/Collapsible\";\n\n/* A drop-in browser for a simulated API contract.\n\n   Every flytedesk app that ships a simulated backend needs the same screen: the endpoint\n   list engineers build from. Rather than fork the planner's version per app, this takes the\n   spec as data.\n\n   Required:\n     spec      — [{ id, method, path, title, purpose, usedBy[], latency:[lo,hi],\n                    request, response, notes?, isList? }]\n     onRequest — (id, params) => Promise<any>   the app's simulated transport\n\n   Optional:\n     modules   — [{ id, label, icon, endpoints:[id] }]  maps app screens to the endpoints\n                 they call. Rendered as the primary filter, because \"what does this screen\n                 need\" is the question engineers actually arrive with.\n     groups    — [[label, [id]]] lifecycle grouping for the list itself\n     conventions — [[label, text]] cross-cutting rules (auth, errors, pagination)\n*/\n\nexport interface EndpointSpec {\n  id: string;\n  method: \"GET\" | \"POST\" | \"PATCH\" | \"PUT\" | \"DELETE\";\n  path: string;\n  title: string;\n  purpose: string;\n  usedBy?: string[];\n  /** [lo, hi] ms. Doubles as the latency SLO the UI's loading states are designed around. */\n  latency: [number, number];\n  request?: unknown;\n  query?: unknown;\n  response: unknown;\n  notes?: string;\n  /** Marks a paged list returning the { rows, pager, sort, filter } envelope. */\n  isList?: boolean;\n}\nexport interface SpecModule { id: string; label: string; icon?: string; endpoints: string[] }\n\nexport interface ApiSpecBrowserProps {\n  spec?: EndpointSpec[];\n  /** The app's simulated transport: (id, params) => Promise<any>. Powers \"Try it\". */\n  onRequest: (id: string, params: unknown) => Promise<unknown>;\n  /** Screen → endpoints map. Rendered as the primary filter. */\n  modules?: SpecModule[];\n  /** Lifecycle grouping: [[label, endpointIds]] */\n  groups?: Array<[string, string[]]>;\n  title?: string;\n  kicker?: string;\n  lede?: string;\n  /** Where the spec lives and how to swap in the real transport. */\n  sourceNote?: string;\n  conventions?: Array<[string, string]>;\n  openQuestions?: Array<[string, string, string]>;\n  className?: string;\n}\n\nconst METHOD_TONE: Record<string, \"success\" | \"info\" | \"warning\" | \"danger\"> = { GET: \"success\", POST: \"info\", PATCH: \"warning\", PUT: \"warning\", DELETE: \"danger\" };\n\nexport function Json({ obj }: { obj: unknown }) {\n  return <pre className=\"fd-json\">{JSON.stringify(obj, null, 2)}</pre>;\n}\n\ntype TriedState = \"busy\" | { ms: number; data?: unknown; error?: string } | null;\n\ninterface EndpointProps {\n  s: EndpointSpec;\n  onRequest: (id: string, params: unknown) => Promise<unknown>;\n}\n\nfunction Endpoint({ s, onRequest }: EndpointProps) {\n  const [tried, setTried] = React.useState<TriedState>(null);\n  const run = async () => {\n    setTried(\"busy\");\n    const t0 = (window.performance || Date).now();\n    try {\n      const data = await onRequest(s.id, s.request || (s.isList ? { page: 1, pageSize: 5 } : {}));\n      setTried({ ms: Math.round((window.performance || Date).now() - t0), data });\n    } catch (e) {\n      setTried({ ms: Math.round((window.performance || Date).now() - t0), error: String((e as any) && (e as any).message || e) });\n    }\n  };\n  return (\n    <Card elevation=\"flat\" padded={false}>\n      <div className=\"fd-stack\" style={{ gap: 0 }}>\n        <div className=\"fd-row\" style={{ gap: 10, padding: \"14px 18px\", flexWrap: \"wrap\" }}>\n          <Badge tone={METHOD_TONE[s.method] || \"neutral\"}>{s.method}</Badge>\n          <code className=\"fd-mono\" style={{ fontSize: 12.5, fontWeight: 600, color: \"var(--text)\", wordBreak: \"break-all\" }}>{s.path}</code>\n          {s.isList ? <Badge tone=\"neutral\" icon=\"rows\">Paged list</Badge> : null}\n          <span style={{ flex: 1 }} />\n          <span className=\"fd-body-sm fd-muted fd-mono\">{s.latency[0]}–{s.latency[1]}ms</span>\n          <Button size=\"sm\" variant=\"secondary\" icon=\"play\" loading={tried === \"busy\"} onClick={run}>Try it</Button>\n        </div>\n        <div className=\"fd-stack\" style={{ gap: 14, padding: \"0 18px 16px\" }}>\n          <div className=\"fd-stack\" style={{ gap: 6 }}>\n            <span className=\"fd-body-sm\" style={{ fontWeight: 700 }}>{s.title}</span>\n            <p className=\"fd-body-sm fd-secondary\" style={{ margin: 0, textWrap: \"pretty\" }}>{s.purpose}</p>\n            {s.usedBy && s.usedBy.length ? (\n              <span className=\"fd-row\" style={{ gap: 6, flexWrap: \"wrap\" }}>{s.usedBy.map((u) => <Tag key={u}>{u}</Tag>)}</span>\n            ) : null}\n          </div>\n          <div style={{ display: \"grid\", gridTemplateColumns: \"repeat(auto-fit,minmax(280px,1fr))\", gap: 12, alignItems: \"start\" }}>\n            {s.request ? <div className=\"fd-stack\" style={{ gap: 6 }}><span className=\"fd-overline fd-muted\">Request body</span><Json obj={s.request} /></div> : null}\n            {s.query ? <div className=\"fd-stack\" style={{ gap: 6 }}><span className=\"fd-overline fd-muted\">Query</span><Json obj={s.query} /></div> : null}\n            <div className=\"fd-stack\" style={{ gap: 6 }}><span className=\"fd-overline fd-muted\">Response 200</span><Json obj={s.response} /></div>\n          </div>\n          {s.notes ? <Flag tone=\"info\" statement=\"Implementation note\" cost={s.notes} actions={null} /> : null}\n          {tried && tried !== \"busy\" ? (\n            <div className=\"fd-stack\" style={{ gap: 6 }}>\n              <span className=\"fd-row\" style={{ gap: 8 }}>\n                <span className=\"fd-overline fd-muted\">Simulated response</span>\n                <Badge tone={tried.error ? \"danger\" : \"success\"} icon=\"timer\">{tried.ms}ms</Badge>\n              </span>\n              <Json obj={tried.error ? { error: tried.error } : tried.data} />\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </Card>\n  );\n}\n\n/** Drop-in browser for a simulated API contract. Takes the spec as data. */\nexport function ApiSpecBrowser({\n  spec = [],\n  onRequest,\n  modules,\n  groups,\n  title = \"API specification\",\n  kicker = \"Architecture\",\n  lede,\n  sourceNote,\n  conventions,\n  openQuestions,\n  className = \"\",\n  ...rest\n}: ApiSpecBrowserProps) {\n  const [q, setQ] = React.useState(\"\");\n  const [method, setMethod] = React.useState<string | null>(null);\n  const [mod, setMod] = React.useState<string | null>(null);\n  const [listOnly, setListOnly] = React.useState(false);\n\n  const activeModule = modules && modules.find((m) => m.id === mod);\n  const hits = spec.filter((s) =>\n    (!method || s.method === method) &&\n    (!listOnly || s.isList) &&\n    (!activeModule || activeModule.endpoints.indexOf(s.id) >= 0) &&\n    (!q || (s.path + \" \" + s.title + \" \" + s.purpose + \" \" + (s.usedBy || []).join(\" \")).toLowerCase().includes(q.toLowerCase())));\n\n  const effGroups: Array<[string, string[]]> = groups && groups.length\n    ? groups\n    : [[\"All endpoints\", spec.map((s) => s.id)]];\n  const methods = [...new Set(spec.map((s) => s.method))];\n  const listCount = spec.filter((s) => s.isList).length;\n\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 20, maxWidth: 1100 }} {...rest}>\n      <div className=\"fd-stack\" style={{ gap: 10 }}>\n        {kicker ? <span className=\"fd-overline fd-muted\">{kicker}</span> : null}\n        <h1 className=\"fd-h1\" style={{ margin: 0 }}>{title}</h1>\n        {lede ? <p className=\"fd-body fd-secondary fd-prose\" style={{ margin: 0 }}>{lede}</p> : null}\n      </div>\n\n      {modules && modules.length ? (\n        <div className=\"fd-stack\" style={{ gap: 8 }}>\n          <span className=\"fd-overline fd-muted\">Filter by screen — every endpoint that screen depends on</span>\n          <div className=\"fd-row\" style={{ gap: 8, flexWrap: \"wrap\" }}>\n            <Tag icon=\"stack\" selected={!mod} onClick={() => setMod(null)}>All screens <span className=\"fd-mono\">{spec.length}</span></Tag>\n            {modules.map((m) => (\n              <Tag key={m.id} icon={m.icon} selected={mod === m.id} onClick={() => setMod(mod === m.id ? null : m.id)}>\n                {m.label} <span className=\"fd-mono\">{m.endpoints.length}</span>\n              </Tag>\n            ))}\n          </div>\n          {/* With one screen selected the list becomes an integration checklist — the most\n              useful thing this page can be to someone picking up a ticket. */}\n          {activeModule ? (\n            <Flag tone=\"info\" statement={activeModule.label + \" calls \" + activeModule.endpoints.length + \" endpoints.\"}\n              cost={\"Integration checklist for this screen: \" + activeModule.endpoints.join(\", \") + \". Wire these and the screen is done.\"}\n              actions={<Button size=\"sm\" variant=\"ghost\" icon=\"x\" onClick={() => setMod(null)}>Show all screens</Button>} />\n          ) : null}\n        </div>\n      ) : null}\n\n      {sourceNote ? <Flag tone=\"info\" statement=\"Design-first: this page is the spec.\" cost={sourceNote} actions={null} /> : null}\n\n      <div className=\"fd-row\" style={{ gap: 10, flexWrap: \"wrap\" }}>\n        <Input icon=\"magnifying-glass\" placeholder=\"Find an endpoint, screen, or behavior\" value={q} onChange={(e) => setQ(e.target.value)} style={{ width: 300 }} />\n        {methods.map((m) => (\n          <Tag key={m} selected={method === m} onClick={() => setMethod(method === m ? null : m)}>\n            {m} <span className=\"fd-mono\">{spec.filter((s) => s.method === m).length}</span>\n          </Tag>\n        ))}\n        {listCount ? (\n          <Tag icon=\"rows\" selected={listOnly} onClick={() => setListOnly(!listOnly)}>\n            Paged lists <span className=\"fd-mono\">{listCount}</span>\n          </Tag>\n        ) : null}\n        <span style={{ flex: 1 }} />\n        <span className=\"fd-body-sm fd-muted\">{hits.length} of {spec.length} endpoints{listCount ? \" · \" + listCount + \" paged\" : \"\"}</span>\n      </div>\n\n      {hits.length === 0 ? (\n        <Card elevation=\"flat\"><p className=\"fd-body-sm fd-muted\" style={{ margin: 0 }}>No endpoint matches those filters.</p></Card>\n      ) : effGroups.map(([g, ids]) => {\n        const items = hits.filter((s) => ids.indexOf(s.id) >= 0);\n        if (!items.length) return null;\n        return (\n          <div key={g} className=\"fd-stack\" style={{ gap: 12 }}>\n            <span className=\"fd-label-lg\">{g}</span>\n            {items.map((s) => <Endpoint key={s.id} s={s} onRequest={onRequest} />)}\n          </div>\n        );\n      })}\n\n      {conventions && conventions.length ? (\n        <Card title=\"Cross-cutting conventions\" elevation=\"flat\">\n          <div className=\"fd-stack\" style={{ gap: 10 }}>\n            {conventions.map(([k, v]) => (\n              <div key={k} className=\"fd-row\" style={{ gap: 12, alignItems: \"flex-start\" }}>\n                <span className=\"fd-overline fd-muted\" style={{ width: 110, flex: \"none\", paddingTop: 2 }}>{k}</span>\n                <span className=\"fd-body-sm fd-secondary\" style={{ textWrap: \"pretty\" }}>{v}</span>\n              </div>\n            ))}\n          </div>\n        </Card>\n      ) : null}\n\n      {openQuestions && openQuestions.length ? (\n        <Collapsible icon=\"list-checks\" title=\"Open questions before implementation\" subtitle={openQuestions.length + \" unresolved\"}>\n          <div className=\"fd-stack\" style={{ gap: 8 }}>\n            {openQuestions.map(([id, question, why]) => (\n              <div key={id} className=\"fd-row\" style={{ gap: 10, alignItems: \"flex-start\", padding: \"8px 0\", borderTop: \"1px solid var(--border)\" }}>\n                <Badge tone=\"danger\">{id}</Badge>\n                <span className=\"fd-stack\" style={{ gap: 2, flex: 1 }}>\n                  <span className=\"fd-body-sm\" style={{ fontWeight: 600 }}>{question}</span>\n                  <span className=\"fd-body-sm fd-muted\">{why}</span>\n                </span>\n              </div>\n            ))}\n          </div>\n        </Collapsible>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Card, CardRow } from \"../surfaces/Card\";\nimport { Badge } from \"../feedback/Badge\";\nimport { Button } from \"../actions/Button\";\nimport { Avatar } from \"../feedback/Avatar\";\nimport { Input } from \"../forms/Input\";\nimport { Select } from \"../forms/Select\";\nimport { Switch } from \"../forms/Switch\";\nimport { Textarea } from \"../forms/Textarea\";\nimport { useSessionContext } from \"../../kits/sessionContext\";\nimport type { SessionUser as User } from \"../../kits/sessionContext\";\n\n/* The profile page, shared by every flytedesk app.\n\n   NOTHING IS HARD-CODED (MP-209/2225): the app decides which fields exist (`fields`),\n   which notification toggles exist (`notifications`), whether a \"Change photo\" action\n   exists (`onChangePhoto`) and whether a signed-in-devices card exists (`sessions`).\n   Earlier versions of this component hard-coded title/phone/timezone/bio, a \"Change\n   photo\" button and a fake device-session list — every flytedesk app got those whether\n   or not its own `User` shape (or backend) actually supported them. media-planner's\n   `User` (packages/shared/src/identity.ts), for example, has none of them: they moved to\n   flytedesk-id's own shared profile page. An app that DOES want the richer set (the docs\n   site's demo) supplies it explicitly through the same props.\n\n   Roles/permissions are still always shown (the \"Access\" card) — those come from the\n   injected session, not from an app-specific field set, and are never user-editable:\n   the card points at the admin surface instead of an inline editor.\n\n   Pass `onSave` to persist through your own endpoint. Without it, the injected session's\n   own `saveProfile` is used when present (the demo provider wires this to\n   SessionKit.saveProfile so the docs site keeps edits across reloads); if neither is\n   supplied, Save is disabled. */\n\nexport type ProfileFieldType = \"text\" | \"textarea\" | \"select\" | \"readonly\";\n\nexport interface ProfileFieldDef {\n  /** Draft/patch key. Also the key `onSave`'s draft carries this value under. */\n  key: string;\n  label: string;\n  /** Default \"text\". \"readonly\" renders like \"text\" but is never editable, regardless\n   *  of any `onChange`. */\n  type?: ProfileFieldType;\n  /** Groups fields sharing the same value into one Card, titled by this group's name.\n   *  Default group: \"Identity\". Fields are rendered in the order their group first\n   *  appears, then in the order given within that group. */\n  group?: string;\n  /** Shown under the group's title — the first field in a group with one supplies it. */\n  groupDescription?: React.ReactNode;\n  placeholder?: string;\n  /** Static help text, or computed from the signed-in user (e.g. a different string for\n   *  an SSO- vs. password-managed account). */\n  help?: string | ((user: User) => string);\n  /** Required for `type: \"select\"`. */\n  options?: string[];\n  /** For `type: \"textarea\"`. Default 3. */\n  rows?: number;\n  /** Forces read-only regardless of `type`. */\n  readOnly?: boolean;\n  /** Computes this field's initial value from the signed-in user. Default: the user\n   *  property of the same name, coerced to a string (`String(user[key] ?? \"\")`) — set\n   *  this when the field's key doesn't match a `SessionUser` property, or needs\n   *  formatting. */\n  value?: (user: User) => string;\n}\n\nexport interface ProfileNotificationDef {\n  /** Draft key, read from/written into `notify: Record<string, boolean>`. */\n  key: string;\n  label: string;\n  description?: string;\n}\n\nexport interface DeviceSession { id: string; device: string; where: string; when: string; current?: boolean }\n\nexport interface ProfilePageProps {\n  /** Defaults to the signed-in user from the injected session. */\n  user?: User;\n  /** The editable fields this app's profile has. Omit (or pass none) and no field cards\n   *  render at all — only the avatar header and the Access card remain. */\n  fields?: ProfileFieldDef[];\n  /** The notification toggles this app has. Omit and the Notifications card doesn't\n   *  render. */\n  notifications?: ProfileNotificationDef[];\n  /** Rendered after the field cards and before Notifications — for app-specific content\n   *  that isn't a plain field, e.g. a link out to another app's own profile page for\n   *  fields that live there instead. */\n  extra?: React.ReactNode;\n  /** Renders the \"Change photo\" button when supplied; omitted entirely otherwise. */\n  onChangePhoto?: () => void;\n  /** Persist edited fields/notifications through your own endpoint. Defaults to the\n   *  injected session's `saveProfile` (the demo provider wires this to\n   *  SessionKit.saveProfile); if neither is available, Save is disabled. Receives every\n   *  field's current value under its `key`, plus `notify` when `notifications` is set. */\n  onSave?: (draft: Record<string, string> & { notify?: Record<string, boolean> }) => void | Promise<void>;\n  onNavigate?: (href: string) => void;\n  /** Renders the \"Signed-in devices\" card when supplied (an empty array still renders\n   *  the card, showing none); omitted entirely otherwise — no fabricated device list. */\n  sessions?: DeviceSession[];\n  onSignOutEverywhere?: () => void | Promise<void>;\n  className?: string;\n}\n\nfunction fieldInitialValue(field: ProfileFieldDef, user: User): string {\n  if (field.value) return field.value(user);\n  const raw = (user as unknown as Record<string, unknown>)[field.key];\n  return raw == null ? \"\" : String(raw);\n}\n\nfunction groupFields(fields: ProfileFieldDef[]): { group: string; description?: React.ReactNode; fields: ProfileFieldDef[] }[] {\n  const order: string[] = [];\n  const byGroup = new Map<string, { group: string; description?: React.ReactNode; fields: ProfileFieldDef[] }>();\n  for (const field of fields) {\n    const group = field.group ?? \"Identity\";\n    if (!byGroup.has(group)) {\n      byGroup.set(group, { group, description: field.groupDescription, fields: [] });\n      order.push(group);\n    }\n    const entry = byGroup.get(group)!;\n    if (entry.description === undefined) entry.description = field.groupDescription;\n    entry.fields.push(field);\n  }\n  return order.map((g) => byGroup.get(g)!);\n}\n\n/**\n * The shared profile page: identity, working preferences, notifications, devices — all\n * driven entirely by the `fields`/`notifications`/`sessions` this app supplies. Roles are\n * shown but never editable — self-promotion is the reason RBAC exists.\n */\nexport function ProfilePage({\n  user: userProp,\n  fields = [],\n  notifications = [],\n  extra,\n  onChangePhoto,\n  onSave,\n  onNavigate,\n  sessions,\n  onSignOutEverywhere,\n  className = \"\",\n}: ProfilePageProps) {\n  const { user: sessionUser, roles, permissions, saveProfile } = useSessionContext();\n  const user = userProp || sessionUser;\n\n  const initialFieldValues = React.useMemo(() => {\n    const values: Record<string, string> = {};\n    for (const field of fields) values[field.key] = fieldInitialValue(field, user);\n    return values;\n    // Re-derive only when the user or the field set itself changes, not on every render.\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [user.id, fields]);\n  const initialNotify = React.useMemo(() => {\n    const values: Record<string, boolean> = {};\n    for (const n of notifications) values[n.key] = !!user.notify?.[n.key];\n    return values;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [user.id, notifications]);\n\n  const [values, setValues] = React.useState<Record<string, string>>(initialFieldValues);\n  const [notify, setNotify] = React.useState<Record<string, boolean>>(initialNotify);\n  const [saving, setSaving] = React.useState(false);\n  const [saved, setSaved] = React.useState(false);\n\n  // Reset the draft whenever the signed-in identity itself changes (not on every\n  // incidental re-render) — computed during render per\n  // https://react.dev/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes\n  const [prevUserId, setPrevUserId] = React.useState(user.id);\n  if (user.id !== prevUserId) {\n    setPrevUserId(user.id);\n    setValues(initialFieldValues);\n    setNotify(initialNotify);\n    setSaved(false);\n  }\n\n  const setField = (key: string, v: string) => {\n    setValues((d) => ({ ...d, [key]: v }));\n    setSaved(false);\n  };\n  const toggleNotify = (key: string) => {\n    setNotify((d) => ({ ...d, [key]: !d[key] }));\n    setSaved(false);\n  };\n\n  const dirty =\n    fields.some((f) => values[f.key] !== initialFieldValues[f.key]) ||\n    notifications.some((n) => notify[n.key] !== initialNotify[n.key]);\n\n  const canSave = !!(onSave || saveProfile) && (fields.length > 0 || notifications.length > 0);\n  const save = async () => {\n    if (!canSave) return;\n    setSaving(true);\n    const draft: Record<string, string> & { notify?: Record<string, boolean> } = { ...values };\n    if (notifications.length > 0) draft.notify = notify;\n    try {\n      if (onSave) await onSave(draft);\n      else await saveProfile!(draft);\n      setSaved(true);\n    } finally {\n      setSaving(false);\n    }\n  };\n  const discard = () => {\n    setValues(initialFieldValues);\n    setNotify(initialNotify);\n    setSaved(false);\n  };\n\n  const displayName = fields.some((f) => f.key === \"name\") ? values.name || user.name : user.name;\n  const fieldGroups = groupFields(fields);\n\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 20, maxWidth: 860 }}>\n      <div className=\"fd-stack\" style={{ gap: 10 }}>\n        <span className=\"fd-overline fd-muted\">Account</span>\n        <h1 className=\"fd-h1\" style={{ margin: 0 }}>Your profile</h1>\n        <p className=\"fd-body fd-secondary fd-prose\" style={{ margin: 0 }}>\n          How you appear to colleagues and clients across every flytedesk app, and what we send you.\n        </p>\n      </div>\n\n      <Card elevation=\"flat\">\n        <div className=\"fd-row\" style={{ gap: 16, flexWrap: \"wrap\", alignItems: \"flex-start\" }}>\n          <Avatar name={displayName} size=\"lg\" />\n          <div className=\"fd-stack\" style={{ gap: 4, flex: 1, minWidth: 200 }}>\n            <span className=\"fd-h3\" style={{ margin: 0 }}>{displayName}</span>\n            <span className=\"fd-row\" style={{ gap: 6, flexWrap: \"wrap\", paddingTop: 4 }}>\n              {roles.map((r) => <Badge key={r.id} tone={r.id === \"owner\" ? \"success\" : \"neutral\"}>{r.name}</Badge>)}\n              {user.sso ? <Badge tone=\"info\" icon=\"shield-check\">SSO</Badge> : null}\n            </span>\n          </div>\n          {onChangePhoto ? (\n            <Button variant=\"secondary\" size=\"sm\" icon=\"image\" onClick={onChangePhoto}>Change photo</Button>\n          ) : null}\n        </div>\n      </Card>\n\n      {fieldGroups.map(({ group, description, fields: groupFieldDefs }) => (\n        <Card\n          key={group}\n          title={\n            description ? (\n              <span className=\"fd-stack\" style={{ gap: 2 }}>\n                <span>{group}</span>\n                <span className=\"fd-body-sm fd-muted\" style={{ fontWeight: 400 }}>{description}</span>\n              </span>\n            ) : (\n              group\n            )\n          }\n          elevation=\"flat\"\n        >\n          <div className=\"fd-stack\" style={{ gap: 14 }}>\n            <div style={{ display: \"grid\", gridTemplateColumns: \"repeat(auto-fit,minmax(220px,1fr))\", gap: 14 }}>\n              {groupFieldDefs\n                .filter((f) => f.type !== \"textarea\")\n                .map((field) => {\n                  const help = typeof field.help === \"function\" ? field.help(user) : field.help;\n                  const readOnly = field.readOnly || field.type === \"readonly\";\n                  if (field.type === \"select\") {\n                    return (\n                      <Select\n                        key={field.key}\n                        label={field.label}\n                        value={values[field.key]}\n                        onChange={readOnly ? undefined : (e) => setField(field.key, e.target.value)}\n                        options={field.options ?? []}\n                        placeholder={field.placeholder}\n                        help={help}\n                        disabled={readOnly}\n                      />\n                    );\n                  }\n                  return (\n                    <Input\n                      key={field.key}\n                      label={field.label}\n                      value={values[field.key]}\n                      onChange={readOnly ? undefined : (e) => setField(field.key, e.target.value)}\n                      readOnly={readOnly}\n                      disabled={readOnly}\n                      placeholder={field.placeholder}\n                      help={help}\n                    />\n                  );\n                })}\n            </div>\n            {groupFieldDefs\n              .filter((f) => f.type === \"textarea\")\n              .map((field) => {\n                const help = typeof field.help === \"function\" ? field.help(user) : field.help;\n                return (\n                  <Textarea\n                    key={field.key}\n                    label={field.label}\n                    value={values[field.key]}\n                    onChange={field.readOnly ? undefined : (e) => setField(field.key, e.target.value)}\n                    readOnly={field.readOnly}\n                    disabled={field.readOnly}\n                    rows={field.rows ?? 3}\n                    placeholder={field.placeholder}\n                    help={help}\n                  />\n                );\n              })}\n          </div>\n        </Card>\n      ))}\n\n      {extra}\n\n      {notifications.length > 0 ? (\n        <Card title=\"Notifications\" elevation=\"flat\">\n          <div className=\"fd-stack\" style={{ gap: 14 }}>\n            {notifications.map((n) => (\n              <Switch key={n.key} checked={!!notify[n.key]} onChange={() => toggleNotify(n.key)} label={n.label} description={n.description} />\n            ))}\n          </div>\n        </Card>\n      ) : null}\n\n      <Card\n        title={\n          <span className=\"fd-stack\" style={{ gap: 2 }}>\n            <span>Access</span>\n            <span className=\"fd-body-sm fd-muted\" style={{ fontWeight: 400 }}>What your roles grant you</span>\n          </span>\n        }\n        elevation=\"flat\"\n        action={<Button size=\"sm\" variant=\"ghost\" icon=\"arrow-right\"\n          onClick={() => onNavigate && onNavigate(\"#roles\")}>See role definitions</Button>}>\n        <div className=\"fd-stack\" style={{ gap: 0 }}>\n          <CardRow label=\"Roles\">{roles.map((r) => r.name).join(\", \") || \"None\"}</CardRow>\n          <CardRow label=\"Permissions\">{permissions.length} granted</CardRow>\n          <CardRow label=\"Member since\">{user.joined || \"—\"}</CardRow>\n        </div>\n        <p className=\"fd-body-sm fd-muted\" style={{ margin: \"12px 0 0\" }}>\n          You cannot change your own roles — that is the point of them. An administrator manages roles from Admin → Users.\n        </p>\n      </Card>\n\n      {sessions ? (\n        <Card title=\"Signed-in devices\" elevation=\"flat\"\n          action={<Button size=\"sm\" variant=\"ghost\" icon=\"sign-out\" onClick={onSignOutEverywhere}>Sign out everywhere</Button>}>\n          <div className=\"fd-stack\" style={{ gap: 0 }}>\n            {sessions.length === 0 ? (\n              <p className=\"fd-body-sm fd-muted\" style={{ margin: 0 }}>No other signed-in devices.</p>\n            ) : sessions.map((s) => (\n              <div key={s.id} className=\"fd-row\" style={{ gap: 12, padding: \"10px 0\", borderTop: \"1px solid var(--border)\", flexWrap: \"wrap\" }}>\n                <i className=\"ph ph-device-mobile\" style={{ fontSize: 16, color: \"var(--text-muted)\" }} aria-hidden=\"true\" />\n                <span className=\"fd-stack\" style={{ gap: 1, flex: 1, minWidth: 160 }}>\n                  <span className=\"fd-body-sm\" style={{ fontWeight: 600 }}>{s.device}</span>\n                  <span className=\"fd-body-sm fd-muted\">{s.where} · {s.when}</span>\n                </span>\n                {s.current ? <Badge tone=\"success\" dot>This device</Badge> : <Button size=\"sm\" variant=\"ghost\">Revoke</Button>}\n              </div>\n            ))}\n          </div>\n        </Card>\n      ) : null}\n\n      <div className=\"fd-row\" style={{ gap: 10, flexWrap: \"wrap\", position: \"sticky\", bottom: 0, padding: \"12px 14px\",\n        borderRadius: 10, background: \"var(--surface)\", border: \"1px solid var(--border)\", boxShadow: \"0 -4px 16px rgba(11,13,17,.06)\" }}>\n        <span className=\"fd-body-sm\" style={{ fontWeight: 600, flex: 1 }}>\n          {saved ? \"Saved.\" : dirty ? \"Unsaved changes\" : \"No pending changes\"}\n        </span>\n        <Button size=\"sm\" variant=\"ghost\" disabled={!dirty || saving} onClick={discard}>\n          Discard\n        </Button>\n        <Button size=\"sm\" icon=\"check\" disabled={!dirty || !canSave} loading={saving} onClick={save}>Save changes</Button>\n      </div>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Card } from \"../surfaces/Card\";\nimport { Button } from \"../actions/Button\";\nimport { Banner } from \"../feedback/Banner\";\nimport { FlytedeskMark } from \"../navigation/FlytedeskBrand\";\n\n/**\n * MP-288: the one full-viewport screen every flytedesk ID app shows while its session is\n * not usable. flytedesk ID apps never show a sign-in button page (PLN-2 R-14): app-kit's\n * headless `SessionBoundary` signs the visitor in automatically, and renders the app only\n * while the session is usable. For every other moment it calls `screen(state)`, and this\n * component is what the app renders there —\n *\n *   <SessionBoundary screen={(state) => <SessionScreen {...state} productName=\"SMS\" />}>\n *\n * Purely presentational, and the dependency rule is one-way in both directions: this\n * package never imports app-kit, and app-kit never imports this one. `kind`, `error` and\n * `onRetry` are exactly the plain shape app-kit's `SessionScreenState` has, so the fit is\n * checked structurally at the app's call site.\n *\n * Busy kinds show a spinner and a message in a polite live region. Failure kinds show\n * `error` in a danger Banner (which announces itself as an alert) and a \"Try again\" button\n * that calls `onRetry`.\n *\n * Focus: the screen replaces the whole app, so whatever held focus is gone. Focus moves to\n * the heading when the screen appears, and whenever it switches between a busy and a failure\n * state (a retried failure's \"Try again\" button, which held focus, unmounts). From a failure,\n * the next Tab reaches \"Try again\".\n *\n * Announcements: a live region only announces changes made after it is in the page, and\n * this screen usually mounts with its message already known. So the message is written\n * into the (already mounted) region one effect later; every later change of kind updates\n * the same region, so \"Signing you in…\" becoming \"Your session expired — …\" is announced.\n */\nexport type SessionScreenKind =\n  | \"signing-in\"\n  | \"session-expired\"\n  | \"signing-out\"\n  | \"reconnecting\"\n  | \"sign-in-failed\"\n  | \"load-failed\";\n\nexport interface SessionScreenProps {\n  kind: SessionScreenKind;\n  /** A plain-language message. Set for `sign-in-failed` and `load-failed`, null otherwise. */\n  error: string | null;\n  /** The failure kinds' \"Try again\". Set for `sign-in-failed` and `load-failed`, null\n   *  otherwise; a failure kind without it shows no button. */\n  onRetry: (() => void) | null;\n  /** The heading, e.g. \"SMS\" or \"Media Planner\". */\n  productName: string;\n}\n\ntype ScreenCopy = { busy: string } | { failure: string };\n\nconst COPY: Record<SessionScreenKind, ScreenCopy> = {\n  \"signing-in\": { busy: \"Signing you in…\" },\n  \"session-expired\": { busy: \"Your session expired — signing you back in…\" },\n  \"signing-out\": { busy: \"Signing you out…\" },\n  reconnecting: { busy: \"Reconnecting…\" },\n  \"sign-in-failed\": { failure: \"We couldn't sign you in\" },\n  \"load-failed\": { failure: \"We couldn't load your session\" },\n};\n\nexport function SessionScreen({ kind, error, onRetry, productName }: SessionScreenProps) {\n  const copy = COPY[kind];\n  const busyMessage = \"busy\" in copy ? copy.busy : null;\n  const failureTitle = \"failure\" in copy ? copy.failure : null;\n\n  // The region stays mounted across kinds (busy or failure) and its text is written one\n  // effect after mount, so it is always a change to an existing live region.\n  const [announced, setAnnounced] = React.useState(\"\");\n  React.useEffect(() => {\n    setAnnounced(busyMessage ?? \"\");\n  }, [busyMessage]);\n\n  const titleRef = React.useRef<HTMLHeadingElement>(null);\n  const failed = failureTitle !== null;\n  React.useEffect(() => {\n    // preventScroll: a full-viewport screen has nothing to scroll to, and a framed preview\n    // (the docs site) must not jump the page to it.\n    titleRef.current?.focus({ preventScroll: true });\n  }, [failed]);\n\n  return (\n    <main className=\"fd-session-screen\">\n      <div className=\"fd-session-screen-inner\">\n        <div className=\"fd-session-screen-mark\" data-theme=\"dark\">\n          <FlytedeskMark size=\"lg\" />\n        </div>\n        <div className=\"fd-session-screen-frame\">\n          <div className=\"fd-session-screen-stripe\" />\n          <Card>\n            <div className=\"fd-session-screen-body\">\n              <h1 ref={titleRef} tabIndex={-1} className=\"fd-h3 fd-session-screen-title\">\n                {productName}\n              </h1>\n              <div role=\"status\" aria-live=\"polite\" className=\"fd-session-screen-status\">\n                {busyMessage !== null ? (\n                  <>\n                    <span className=\"fd-spinner fd-spinner-lg fd-session-screen-spinner\" aria-hidden=\"true\" />\n                    <p className=\"fd-body fd-session-screen-message\">{announced}</p>\n                  </>\n                ) : null}\n              </div>\n              {failureTitle !== null ? (\n                <div className=\"fd-session-screen-failure\">\n                  <Banner tone=\"danger\" title={failureTitle} detail={error ?? undefined} />\n                  {onRetry !== null ? (\n                    <Button variant=\"primary\" block onClick={onRetry}>\n                      Try again\n                    </Button>\n                  ) : null}\n                </div>\n              ) : null}\n            </div>\n          </Card>\n        </div>\n      </div>\n    </main>\n  );\n}\n","import * as React from \"react\";\nimport { Card } from \"../surfaces/Card\";\nimport { Badge } from \"../feedback/Badge\";\nimport { Tag } from \"../feedback/Tag\";\nimport { Flag } from \"../feedback/Flag\";\nimport { Button } from \"../actions/Button\";\nimport { Input } from \"../forms/Input\";\nimport { Select } from \"../forms/Select\";\nimport { StatTile } from \"../data/StatTile\";\nimport { SessionKit } from \"../../kits/session\";\nimport type { RoadmapItem } from \"../../kits/session\";\nimport { RuntimeKit } from \"../../kits/runtime\";\n\n/* The roadmap is DERIVED from the flag registry, not maintained beside it — a roadmap kept in\n   a second file is a roadmap that goes stale within a fortnight. Every entry's date, status and\n   dependency list comes from the flag that gates the feature.\n\n   The reading order is the argument: the whole UI is already designed and working against a\n   simulated transport, so this timeline only ever describes BACKEND work. Shipped items sit\n   above the \"you are here\" line, upcoming ones below, and the scroll container opens at that\n   line so the first thing in view is what comes next rather than what is finished. */\n\nexport interface RoadmapTimelineProps {\n  /** Called with a flag key when the reader clicks one — route it to your flag admin. */\n  onOpenFlag?: (flagKey: string) => void;\n  /** Heading. Default \"Roadmap\". */\n  title?: string;\n  /** Replaces the default explanation of what the timeline covers. */\n  lede?: string;\n}\n\nconst STATUS: Record<string, { tone: \"success\" | \"warning\" | \"neutral\"; icon: string; label: string }> = {\n  shipped: { tone: \"success\", icon: \"check-circle\", label: \"Wired\" },\n  next: { tone: \"warning\", icon: \"traffic-cone\", label: \"Not wired\" },\n  planned: { tone: \"neutral\", icon: \"circle-dashed\", label: \"Not released\" }\n};\nconst PROJECT_ICON: Record<string, string> = { \"Media Planner\": \"chart-line-up\", Platform: \"buildings\", Admin: \"shield-check\", \"Agent Chat\": \"chat-circle-dots\" };\n\nconst fmtDate = (iso: string | null) => {\n  const d = new Date(String(iso) + \"T00:00:00\");\n  return isNaN(d as unknown as number) ? iso : d.toLocaleDateString(undefined, { month: \"short\", day: \"numeric\", year: \"numeric\" });\n};\n\ninterface RoadmapCardProps {\n  item: RoadmapItem;\n  byKey: Record<string, RoadmapItem>;\n  onOpenFlag?: (flagKey: string) => void;\n}\n\nfunction RoadmapCard({ item, byKey, onOpenFlag }: RoadmapCardProps) {\n  const s = STATUS[item.status] || STATUS.planned;\n  const deps = (item.dependsOn || []).map((k) => byKey[k]).filter(Boolean);\n  const blocking = deps.filter((d) => !d.implemented);\n  return (\n    <Card elevation=\"flat\">\n      <div className=\"fd-stack\" style={{ gap: 10 }}>\n        <div className=\"fd-row\" style={{ gap: 8, flexWrap: \"wrap\" }}>\n          <span className=\"fd-body\" style={{ fontWeight: 700, flex: 1, minWidth: 140 }}>{item.label}</span>\n          <Badge tone=\"neutral\" icon={PROJECT_ICON[item.project] || \"squares-four\"}>{item.project}</Badge>\n          <Badge tone={s.tone} icon={s.icon}>{s.label}</Badge>\n        </div>\n        <p className=\"fd-body-sm fd-secondary\" style={{ margin: 0, textWrap: \"pretty\" }}>{item.description}</p>\n        {item.backend ? (\n          <div className=\"fd-row\" style={{ gap: 10, alignItems: \"flex-start\" }}>\n            <span className=\"fd-overline fd-muted\" style={{ width: 62, flex: \"none\", paddingTop: 2 }}>Backend</span>\n            <span className=\"fd-body-sm\" style={{ flex: 1, textWrap: \"pretty\" }}>{item.backend}</span>\n          </div>\n        ) : null}\n        <div className=\"fd-row\" style={{ gap: 12, flexWrap: \"wrap\" }}>\n          {item.effort ? <span className=\"fd-body-sm fd-muted\"><i className=\"ph ph-hourglass-medium\" /> {item.effort}</span> : null}\n          <span className=\"fd-body-sm fd-muted\"><i className=\"ph ph-user\" /> {item.owner}</span>\n          {item.screen ? <Badge tone=\"neutral\" icon=\"browser\">screen</Badge> : null}\n          <span style={{ flex: 1 }} />\n          <button type=\"button\" onClick={() => onOpenFlag && onOpenFlag(item.key)}\n            style={{ all: \"unset\", cursor: \"pointer\", display: \"inline-flex\", alignItems: \"center\", gap: 5 }}>\n            <code className=\"fd-mono\" style={{ fontSize: 11, color: \"var(--brand)\" }}>{item.key}</code>\n          </button>\n        </div>\n        {deps.length ? (\n          <div className=\"fd-row\" style={{ gap: 6, flexWrap: \"wrap\", paddingTop: 6, borderTop: \"1px solid var(--border)\" }}>\n            <span className=\"fd-overline fd-muted\" style={{ paddingTop: 3 }}>After</span>\n            {deps.map((d) => (\n              <Tag key={d.key} icon={d.implemented ? \"check\" : \"clock\"}>{d.label}</Tag>\n            ))}\n          </div>\n        ) : null}\n        {blocking.length && !item.implemented ? (\n          <span className=\"fd-body-sm\" style={{ color: \"var(--warn-text)\" }}>\n            Blocked until {blocking.map((d) => d.label).join(\" and \")} {blocking.length === 1 ? \"is\" : \"are\"} wired.\n          </span>\n        ) : null}\n      </div>\n    </Card>\n  );\n}\n\n/**\n * A vertical, chronological map of what is wired to the real backend and what is next.\n *\n * Derived entirely from the feature-flag registry (`SessionKit.roadmap()`) — status is each\n * flag's `implemented` field, ordering comes from its date, and blocking relationships come\n * from its `dependsOn`. Nothing here is maintained separately, so it cannot drift from what\n * the apps actually do.\n *\n * Shipped work sits above a \"you are here\" marker and upcoming work below it; the scroll\n * container opens at that marker, so the first thing in view is what comes next.\n */\nexport function RoadmapTimeline({ onOpenFlag, title = \"Roadmap\", lede }: RoadmapTimelineProps) {\n  const session = SessionKit.useSession();\n  const [project, setProject] = React.useState(\"\");\n  const [q, setQ] = React.useState(\"\");\n  const scrollRef = React.useRef<HTMLDivElement>(null);\n  const nowRef = React.useRef<HTMLDivElement>(null);\n\n  const rm = React.useMemo(() => SessionKit.roadmap({ isComplete: RuntimeKit.isComplete }), [session]);\n  const byKey = React.useMemo(() => {\n    const m: Record<string, RoadmapItem> = {};\n    rm.items.forEach((i: RoadmapItem) => { m[i.key] = i; });\n    return m;\n  }, [rm]);\n\n  const items: RoadmapItem[] = rm.items.filter((i: RoadmapItem) =>\n    (!project || i.project === project) &&\n    (!q || (i.label + \" \" + i.description + \" \" + (i.backend || \"\") + \" \" + i.key).toLowerCase().includes(q.toLowerCase())));\n  const projects = [...new Set(rm.items.map((i: RoadmapItem) => i.project))];\n\n  // Open at the \"you are here\" line: history above, what's next in view. Runs on the filtered\n  // list too, since filtering moves the boundary. Two frames, because era headers and card text\n  // change the track's height after the first paint — measuring too early lands in the wrong place.\n  React.useEffect(() => {\n    let raf1 = 0, raf2 = 0;\n    const place = () => {\n      const box = scrollRef.current, mark = nowRef.current;\n      if (!box) return;\n      // No pending work: show the end of the timeline rather than leaving it at the top.\n      if (!mark) { box.scrollTop = box.scrollHeight; return; }\n      // Put the marker just under the top edge so its label is readable — an offset large\n      // enough to scroll it out of view defeats the purpose of having a label at all.\n      box.scrollTop = Math.max(0, mark.offsetTop - 28);\n    };\n    raf1 = requestAnimationFrame(() => { place(); raf2 = requestAnimationFrame(place); });\n    return () => { cancelAnimationFrame(raf1); cancelAnimationFrame(raf2); };\n  }, [project, q, rm.nextIndex]);\n\n  const firstPending = items.findIndex((i) => !i.implemented);\n  const shippedShown = items.filter((i) => i.implemented).length;\n  /* parseInt(\"1 week\") is 1 and parseInt(\"4 days\") is 4, so summing the raw numbers mixed two\n     units and labelled the result \"wk\". Normalise to working days first. */\n  const days = items.filter((i) => !i.implemented).reduce((s, i) => {\n    const m = String(i.effort).match(/(\\d+)\\s*(day|week)/);\n    return s + (m ? Number(m[1]) * (m[2] === \"week\" ? 5 : 1) : 0);\n  }, 0);\n  const nextPhase = items.find((i) => !i.implemented);\n\n  let lastPhase: number | null | undefined = null;\n  return (\n    <div className=\"fd-stack\" style={{ gap: 16, maxWidth: 1000 }}>\n      <div className=\"fd-stack\" style={{ gap: 10 }}>\n        <span className=\"fd-overline fd-muted\">Architecture</span>\n        <h1 className=\"fd-h1\" style={{ margin: 0 }}>{title}</h1>\n        <p className=\"fd-body fd-secondary fd-prose\" style={{ margin: 0 }}>\n          {lede || \"Every screen and feature in these tools is already designed and working against a simulated backend. This is the plan for connecting them to the real one — so the only work described here is server work.\"}\n        </p>\n      </div>\n\n      <div className=\"fd-grid-stats is-thin\">\n        <StatTile compact label=\"Wired\" value={String(rm.shipped)} sub={\"of \" + rm.items.length + \" features\"} />\n        <StatTile compact label=\"Remaining\" value={String(rm.remaining)} sub=\"backend work\" />\n        <StatTile compact label=\"Est. effort\" value={days ? days + \" days\" : \"—\"} sub=\"sum of estimates, not calendar\" />\n        <StatTile compact label=\"Up next\" value={nextPhase ? \"Phase \" + nextPhase.phase : \"—\"} sub={nextPhase ? nextPhase.phaseName : \"all wired\"} />\n      </div>\n\n      <div className=\"fd-row\" style={{ gap: 10, flexWrap: \"wrap\" }}>\n        <Input icon=\"magnifying-glass\" placeholder=\"Find a feature or a piece of backend work\" value={q} onChange={(e) => setQ(e.target.value)} style={{ width: 300 }} />\n        <Select placeholder=\"All projects\" value={project} onChange={(e) => setProject(e.target.value)} options={projects} style={{ width: 190 }} />\n        <span style={{ flex: 1 }} />\n        <Button size=\"sm\" variant=\"secondary\" icon=\"arrow-down\"\n          onClick={() => { const b = scrollRef.current, m = nowRef.current; if (b) b.scrollTop = m ? Math.max(0, m.offsetTop - 28) : b.scrollHeight; }}>\n          Jump to now\n        </Button>\n      </div>\n\n      <Flag tone=\"info\" statement=\"Shipped means its endpoints are live — nothing here is marked done by hand.\"\n        cost=\"A feature counts as shipped only when every endpoint it declares is served by the real backend, so this page cannot drift from the app. Dates are targets, not commitments; effort is the size of the backend work, and the ordering follows each feature's dependencies — a slip early in the list moves everything below it.\"\n        actions={null} />\n\n      <div className=\"fd-rm\">\n        <div className=\"fd-rm-scroll\" ref={scrollRef}>\n          <div className=\"fd-rm-track\">\n            <span className=\"fd-rm-spine\">\n              <span className=\"fd-rm-spine-done\" style={{ height: items.length ? (100 * shippedShown / items.length) + \"%\" : \"0%\" }} />\n            </span>\n            {items.map((item, n) => {\n              /* Group by build phase, not by quarter. A quarter header says when; a phase header\n                 says what unblocks what, which is the only reason the order is what it is. */\n              const showPhase = item.phase !== lastPhase;\n              lastPhase = item.phase;\n              const inPhase = items.filter((i) => i.phase === item.phase).length;\n              const isBoundary = n === firstPending;\n              return (\n                <React.Fragment key={item.key}>\n                  {showPhase ? (\n                    <div className=\"fd-rm-era\">\n                      <span className=\"fd-row\" style={{ gap: 8, flexWrap: \"wrap\", alignItems: \"baseline\" }}>\n                        <span style={{ fontWeight: 700 }}>{item.phase === 0 ? \"Shipped\" : \"Phase \" + item.phase + \" — \" + item.phaseName}</span>\n                        {item.phase === 0 ? null : (\n                          <span className=\"fd-mono\" style={{ opacity: 0.7, fontWeight: 400 }}>\n                            {fmtDate(item.phaseStart)} – {fmtDate(item.date)}\n                          </span>)}\n                        <span style={{ opacity: 0.7, fontWeight: 400 }}>· {inPhase} feature{inPhase === 1 ? \"\" : \"s\"}</span>\n                      </span>\n                      {item.phaseWhy ? <p className=\"fd-rm-era-why\">{item.phaseWhy}</p> : null}\n                    </div>\n                  ) : null}\n                  {isBoundary ? (\n                    <div className=\"fd-rm-now\" ref={nowRef}>\n                      <span className=\"fd-rm-now-pill\"><i className=\"ph ph-map-pin\" /> You are here — everything above is wired</span>\n                    </div>\n                  ) : null}\n                  <div className=\"fd-rm-row\">\n                    <span className={\"fd-rm-dot \" + (item.implemented ? \"is-shipped\" : item.status === \"next\" ? \"is-next\" : \"\")} />\n                    <div className=\"fd-rm-date\">\n                      {fmtDate(item.date)}\n                      <br />\n                      <span style={{ opacity: 0.75 }}>{item.implemented ? \"shipped\" : \"phase \" + item.phase}</span>\n                    </div>\n                    <RoadmapCard item={item} byKey={byKey} onOpenFlag={onOpenFlag} />\n                  </div>\n                </React.Fragment>\n              );\n            })}\n            {!items.length ? <p className=\"fd-body-sm fd-muted\">Nothing matches that filter.</p> : null}\n          </div>\n        </div>\n      </div>\n\n      <p className=\"fd-body-sm fd-muted\" style={{ margin: 0 }}>\n        Derived from the feature-flag registry — each entry's status is its flag's <code className=\"fd-mono\">implemented</code> field,\n        so this page cannot drift from what the apps actually do.\n      </p>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { SessionProvider, type SessionContextValue, type SessionUser } from \"./sessionContext\";\n\n/* Session, RBAC and feature flags — the front-end half of access control.\n   Reusable across every flytedesk project: the planner, the platform app, the admin app.\n\n   Nothing here is a security boundary. Permissions gate the UI so people are not shown\n   affordances they cannot use; the server must re-check every one of them. A hidden button\n   is a courtesy, not a control.\n\n   Wire to a real backend by replacing loadSession() with a fetch of\n   GET /me → { user, roles, permissions, flags }. Everything else is derived. */\n\nexport interface PermissionItem { key: string; label: string; detail: string }\nexport interface PermissionGroup { group: string; items: PermissionItem[] }\nexport interface Role { id: string; name: string; system: boolean; description: string; permissions: string[] }\nexport interface Flag {\n  key: string; project: string; label: string; description: string;\n  /** Kill switch. False means off for everyone, whatever the targeting says. */\n  enabled: boolean;\n  /** 0-100. Bucketed on a stable hash of the user id so answers never flicker. */\n  rollout: number;\n  /** Role ids the flag is forced on for. */\n  roles: string[];\n  /** Per-user overrides, highest precedence: { userId: true | false } */\n  users: Record<string, boolean>;\n  owner?: string; updated?: string;\n  /* Not declared in the original session.d.ts (which only covers the fields common to every\n     flag record) but present on every entry in FLAGS and read by roadmap() below — filled in\n     here from the session.js implementation, same as the six SessionKit members. */\n  /** Which screen this flag gates, if any. */\n  screen?: string;\n  /** Target ship date for an unshipped feature. */\n  eta?: string | null;\n  /** Date this shipped — set instead of `eta` once it's done. */\n  shippedAt?: string;\n  /** Build phase index into PHASES. */\n  phase?: number;\n  /** Human estimate, e.g. \"4 days\". */\n  effort?: string;\n  /** What has to be built for this to be real. */\n  backend?: string;\n  /** Other flag keys this depends on. */\n  dependsOn?: string[];\n}\n/** The demo fixture's user record. Extends the provider-agnostic `SessionUser` (see\n *  `kits/sessionContext.tsx`) with bookkeeping fields only this in-memory fixture needs — a\n *  real, injected session is never expected to supply `status`/`lastActive`. */\nexport interface User extends SessionUser {\n  roles: string[]; status: \"active\" | \"invited\" | \"suspended\";\n  lastActive?: string;\n}\nexport interface Session {\n  user: User; roles: Role[]; permissions: string[];\n  /** Resolved flag key → on/off for THIS user. */\n  flags: Record<string, boolean>;\n  allRoles: Role[]; allFlags: Flag[]; allUsers: User[];\n}\nexport interface FlagExplanation { on: boolean; reason: string; detail: string }\n\n/** One row of the build roadmap. Not declared in session.js's own PHASES shape but inferred\n *  from how PHASES entries are constructed and consumed by roadmap() below. */\ninterface Phase { n: number; name: string; start: string; end: string; why: string }\n\n/** roadmap()'s per-flag result row. Not declared in session.d.ts (roadmap() itself is one of\n *  the six SessionKit members missing from that file) — inferred from what roadmap() actually\n *  builds and returns for each flag. */\nexport interface RoadmapItem {\n  key: string; label: string; project: string; description: string;\n  backend?: string; effort?: string; owner?: string; dependsOn: string[];\n  screen: string | null; enabled: boolean;\n  /** Which build phase this sits in, and why that phase comes where it does. */\n  phase?: number; phaseName: string; phaseWhy: string | null; phaseStart: string | null;\n  /** Derived, not stored: whether every endpoint the feature needs is wired. */\n  implemented: boolean;\n  date: string | null;\n  /** True when the only date on record is when the UI was designed, not when it ships. */\n  dateIsDesign: boolean;\n  status: \"shipped\" | \"next\" | \"planned\";\n}\n/** roadmap()'s return shape. */\nexport interface RoadmapResult {\n  items: RoadmapItem[];\n  /** Index of the first unshipped item — everything above it is history. */\n  nextIndex: number;\n  shipped: number;\n  remaining: number;\n}\n\nconst PERMISSION_CATALOG: PermissionGroup[] = [\n  { group: \"Plans\", items: [\n    { key: \"plan.view\", label: \"View plans\", detail: \"Read any plan in the workspace.\" },\n    { key: \"plan.edit\", label: \"Edit plans\", detail: \"Reallocate budget, add or remove campuses, swap placements.\" },\n    { key: \"plan.solve\", label: \"Run the solver\", detail: \"Trigger a solve. Consumes engine capacity.\" },\n    { key: \"plan.delete\", label: \"Delete plans\", detail: \"Irreversible once the retention window closes.\" }\n  ] },\n  { group: \"Delivery\", items: [\n    { key: \"export.run\", label: \"Export workbooks\", detail: \"Generate the client spreadsheet.\" },\n    { key: \"share.manage\", label: \"Manage share links\", detail: \"Create, revoke and re-pin client links.\" },\n    { key: \"client.view\", label: \"Open client view\", detail: \"See the presentation surface clients receive.\" }\n  ] },\n  { group: \"Model\", items: [\n    { key: \"model.view\", label: \"View the model\", detail: \"Read formulas, weights and provenance.\" },\n    { key: \"model.edit\", label: \"Change coefficients\", detail: \"Alter the numbers every plan is scored with.\" }\n  ] },\n  { group: \"Administration\", items: [\n    { key: \"users.view\", label: \"View users\", detail: \"See the member directory.\" },\n    { key: \"users.manage\", label: \"Manage users\", detail: \"Invite, edit, deactivate, assign roles.\" },\n    { key: \"roles.manage\", label: \"Manage roles\", detail: \"Create roles and change what they grant.\" },\n    { key: \"flags.manage\", label: \"Manage feature flags\", detail: \"Toggle features across projects and audiences.\" },\n    { key: \"audit.view\", label: \"View the audit log\", detail: \"Read who changed what, when.\" },\n    { key: \"roadmap.view\", label: \"View the roadmap\", detail: \"See which features are wired to the backend and what is next.\" }\n  ] }\n];\n\nconst ALL_PERMISSIONS: string[] = PERMISSION_CATALOG.flatMap((g) => g.items.map((i) => i.key));\n\n/** Roles are named permission bundles. `system: true` roles cannot be deleted. */\nconst ROLES: Role[] = [\n  { id: \"owner\", name: \"Owner\", system: true, description: \"Unrestricted. Every permission, including destructive ones.\",\n    permissions: ALL_PERMISSIONS },\n  { id: \"admin\", name: \"Administrator\", system: true, description: \"Runs the workspace and its people. Cannot change the scoring model.\",\n    permissions: [\"plan.view\", \"plan.edit\", \"plan.solve\", \"export.run\", \"share.manage\", \"client.view\", \"model.view\", \"users.view\", \"users.manage\", \"roles.manage\", \"flags.manage\", \"audit.view\", \"roadmap.view\"] },\n  { id: \"planner\", name: \"Planner\", system: false, description: \"Builds and edits plans. The default for the demand team.\",\n    permissions: [\"plan.view\", \"plan.edit\", \"plan.solve\", \"export.run\", \"share.manage\", \"client.view\", \"model.view\", \"roadmap.view\"] },\n  { id: \"analyst\", name: \"Analyst\", system: false, description: \"Reads everything, changes nothing. For QA and finance.\",\n    permissions: [\"plan.view\", \"model.view\", \"audit.view\", \"client.view\", \"roadmap.view\"] },\n  { id: \"model-admin\", name: \"Model administrator\", system: false, description: \"May change scoring coefficients — the numbers behind every plan the company ships.\",\n    permissions: [\"plan.view\", \"model.view\", \"model.edit\", \"roadmap.view\"] },\n  { id: \"sales\", name: \"Account lead\", system: false, description: \"Presents plans to clients without editing them.\",\n    permissions: [\"plan.view\", \"client.view\", \"share.manage\", \"export.run\"] }\n];\n\n/* Feature flags. Precedence, highest first:\n     1. user override      (explicit allow/deny for one person)\n     2. role targeting     (on for these roles)\n     3. rollout percentage (stable hash of userId, so a user's answer never flickers)\n     4. enabled            (the global switch)\n   A flag with `enabled: false` is off for everyone regardless of targeting — that is the\n   kill switch, and it must not be overridable or it is not a kill switch. */\n/* Every screen and every discrete feature carries its own flag, so a capability can be\n   released, targeted or killed without touching its neighbours.\n\n   `implemented` is a SEPARATE axis from `enabled`. All of this UI is designed and working\n   against a simulated transport; `implemented` records whether the REAL backend is wired.\n     enabled=false                → hidden entirely. Nobody sees it.\n     enabled + implemented=false  → visible but inert: blurred, with a coming-soon banner.\n     enabled + implemented=true   → the live feature.\n   That distinction is what makes the roadmap honest — it is a backend plan, not a design plan.\n\n   Roadmap fields: shippedAt for what is done, eta + effort for what is not, backend for what\n   actually has to be built, dependsOn so the ordering is derived rather than asserted. */\nconst PHASES: Phase[] = [\n  {\n    \"n\": 0,\n    \"name\": \"Shipped\",\n    \"start\": \"2026-08-18\",\n    \"end\": \"2026-08-18\",\n    \"why\": \"Documentation rendered from code. No backend, so these were done the moment the design was.\"\n  },\n  {\n    \"n\": 1,\n    \"name\": \"Identity and gating\",\n    \"start\": \"2026-08-24\",\n    \"end\": \"2026-09-11\",\n    \"why\": \"None of this exists yet and everything else assumes it: who is acting, what they may do, and the switch that lets unfinished work ship dark. Version attribution, the audit trail and every gate in the app resolve against it.\"\n  },\n  {\n    \"n\": 2,\n    \"name\": \"Data in\",\n    \"start\": \"2026-09-14\",\n    \"end\": \"2026-09-25\",\n    \"why\": \"Nothing can be scored until inventory is normalised and a brief exists to constrain it. Two independent surfaces, so they run in parallel.\"\n  },\n  {\n    \"n\": 3,\n    \"name\": \"The engine\",\n    \"start\": \"2026-09-28\",\n    \"end\": \"2026-10-09\",\n    \"why\": \"The solver IS the product. Largest single piece of work, and every screen downstream is a view of its output.\"\n  },\n  {\n    \"n\": 4,\n    \"name\": \"Read the plan\",\n    \"start\": \"2026-10-12\",\n    \"end\": \"2026-10-30\",\n    \"why\": \"Four read-only surfaces over solve output. Excluded schools ships WITH them, not later — planners will not trust a solve they cannot audit.\"\n  },\n  {\n    \"n\": 5,\n    \"name\": \"Change it safely\",\n    \"start\": \"2026-11-02\",\n    \"end\": \"2026-11-20\",\n    \"why\": \"Version history lands before the first editing surface. Mutations without append-only snapshots are how plans get lost.\"\n  },\n  {\n    \"n\": 6,\n    \"name\": \"Get it to the client\",\n    \"start\": \"2026-11-23\",\n    \"end\": \"2026-12-11\",\n    \"why\": \"A plan that cannot leave the tool has no value. Workbook export precedes the client view: planners live in spreadsheets.\"\n  },\n  {\n    \"n\": 7,\n    \"name\": \"Scale the tables\",\n    \"start\": \"2026-12-14\",\n    \"end\": \"2026-12-24\",\n    \"why\": \"The pilot has 35 line items; production has 3,729. These are the ergonomics that make that difference survivable.\"\n  },\n  {\n    \"n\": 8,\n    \"name\": \"Explain the plan\",\n    \"start\": \"2027-01-04\",\n    \"end\": \"2027-01-22\",\n    \"why\": \"The charts and nudges that turn a table of numbers into an argument. Genuinely optional — the plan is usable without them.\"\n  },\n  {\n    \"n\": 9,\n    \"name\": \"Tuning criteria and alternatives\",\n    \"start\": \"2027-01-25\",\n    \"end\": \"2027-02-12\",\n    \"why\": \"Judgement tools. They need a stable plan and working versioning underneath them.\"\n  },\n  {\n    \"n\": 10,\n    \"name\": \"Trust the model\",\n    \"start\": \"2027-02-15\",\n    \"end\": \"2027-02-26\",\n    \"why\": \"Showing the working, and letting the model owner tune it. Needs versioning so a coefficient change is attributable.\"\n  },\n  {\n    \"n\": 11,\n    \"name\": \"Operate at scale\",\n    \"start\": \"2027-03-01\",\n    \"end\": \"2027-03-12\",\n    \"why\": \"The admin refinements that only matter once there are enough people and enough history to need them.\"\n  },\n  {\n    \"n\": 12,\n    \"name\": \"Creative operations\",\n    \"start\": \"2027-03-15\",\n    \"end\": \"2027-03-26\",\n    \"why\": \"Adjacent to planning — needed before the college side can transact against a plan.\"\n  },\n  {\n    \"n\": 13,\n    \"name\": \"The assistant\",\n    \"start\": \"2027-03-29\",\n    \"end\": \"2027-04-16\",\n    \"why\": \"Last on purpose. It is a faster path to things the app can already do, so it has no value until those things work.\"\n  }\n];\n\nconst FLAGS: Flag[] = [\n  // ---- Media Planner · brief and solve ----------------------------------\n  { key: \"planner.setup\", project: \"Media Planner\", label: \"Campaign setup\", screen: \"setup\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-09-25\", phase: 2, effort: \"4 days\", backend: \"Campaign CRUD, brief persistence.\",\n    description: \"The brief: budget, flight, geography, objective, channel priorities.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.briefParse\", project: \"Media Planner\", label: \"Describe-the-plan parsing\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"4 days\", backend: \"LLM extraction endpoint returning structured brief fields plus measurable criteria.\",\n    dependsOn: [\"planner.setup\"], description: \"Turns a plain-language brief into structured fields and tuning criteria.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.goals\", project: \"Media Planner\", label: \"Tuning criteria and reviewer\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"1 week\", backend: \"Criteria store plus the reviewer that scores a solved plan against each criterion.\",\n    dependsOn: [\"planner.briefParse\"], description: \"Measurable criteria the reviewer checks after every solve.\", owner: \"Dana Reyes\", updated: \"Aug 17\" },\n  { key: \"planner.goalTweaks\", project: \"Media Planner\", label: \"Reviewer tweaks\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\", \"planner\"], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"6 days\", backend: \"Tweak records with an ordered change list, apply/revert as plan versions, and a refine prompt that re-plans under a constraint.\",\n    dependsOn: [\"planner.goals\", \"planner.versions\"], description: \"Proposed plan changes attached to a missed criterion, applied or reverted as a unit.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.import\", project: \"Media Planner\", label: \"Inventory import\", screen: \"import\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-09-25\", phase: 2, effort: \"1 week\", backend: \"Workbook upload, column mapping, row validation as a job.\",\n    description: \"The supply workbook: what is actually available to buy.\", owner: \"Marcus Webb\", updated: \"Aug 14\" },\n  { key: \"planner.solve\", project: \"Media Planner\", label: \"Solver\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-10-09\", phase: 3, effort: \"2 weeks\", backend: \"The engine itself: candidate ranking, funding loop, placement fitting, CRP scoring.\",\n    dependsOn: [\"planner.import\", \"planner.setup\"], description: \"Fits placements across campuses and scores the result.\", owner: \"Engineering\", updated: \"Aug 15\" },\n\n  // ---- Media Planner · plan screens -------------------------------------\n  { key: \"planner.overview\", project: \"Media Planner\", label: \"Plan overview\", screen: \"overview\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-10-30\", phase: 4, effort: \"4 days\", backend: \"One plan document: header, funded campuses, mix vs target, attention flags.\",\n    dependsOn: [\"planner.solve\"], description: \"The plan in one screen, ordered by the three questions a planner asks.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.attentionFlags\", project: \"Media Planner\", label: \"Attention flags\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"2 days\", backend: \"Rule pass over the solved plan producing flagged campuses with a stated cost to fix.\",\n    dependsOn: [\"planner.overview\"], description: \"The 'needs your attention' list: campuses a rule says are wrong, with what fixing costs.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.saturationDistribution\", project: \"Media Planner\", label: \"Saturation distribution\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"2 days\", backend: \"Enrollment-weighted CRP distribution with the floor percentile marked.\",\n    dependsOn: [\"planner.overview\"], description: \"Where every campus sits on the saturation scale, and where the floor lands.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.mixGap\", project: \"Media Planner\", label: \"Mix vs target\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"2 days\", backend: \"Realized channel mix against the objective's target mix, with a reason per gap.\",\n    dependsOn: [\"planner.overview\"], description: \"Realized media mix against target, and why each gap exists.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.decisionTrace\", project: \"Media Planner\", label: \"Decision trace\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-02-26\", phase: 10, effort: \"2 weeks\", backend: \"Per-decision audit the engine emits during a solve: every campus considered, every placement weighed, and why each was taken or dropped.\",\n    dependsOn: [\"planner.solve\"], description: \"The full reasoning behind a solve, readable after the fact.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"planner.schools\", project: \"Media Planner\", label: \"School mix\", screen: \"schools\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-10-30\", phase: 4, effort: \"4 days\", backend: \"Server-side sort, filter and pagination over funded campuses.\",\n    dependsOn: [\"planner.overview\"], description: \"Every funded campus with its saturation band and spend.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.reallocate\", project: \"Media Planner\", label: \"Budget reallocation\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\", \"planner\"], users: {},\n    eta: \"2026-11-20\", phase: 5, effort: \"6 days\", backend: \"Debounced re-score preview plus a commit that snapshots a version.\",\n    dependsOn: [\"planner.schools\", \"planner.versions\"], description: \"Drag budget between campuses and see the re-score before committing.\", owner: \"Dana Reyes\", updated: \"Aug 17\" },\n  { key: \"planner.campusDetail\", project: \"Media Planner\", label: \"Campus detail\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-11-20\", phase: 5, effort: \"4 days\", backend: \"Per-campus rollup: channel contribution, surround-sound breadth, placement list.\",\n    dependsOn: [\"planner.schools\"], description: \"Why one campus scores what it scores.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.channelContribution\", project: \"Media Planner\", label: \"Channel contribution\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"2 days\", backend: \"Per-channel CRP contribution within a campus, weighted.\",\n    dependsOn: [\"planner.campusDetail\"], description: \"Which channels built this campus's score, and how much each added.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.surroundSound\", project: \"Media Planner\", label: \"Surround sound\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"2 days\", backend: \"Category breadth per campus and the resulting bonus multiplier.\",\n    dependsOn: [\"planner.campusDetail\"], description: \"How many channel categories a campus covers, and the bonus it earns.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.campusNudges\", project: \"Media Planner\", label: \"Campus recommendations\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\",\"planner\"], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"6 days\", backend: \"Per-campus recommendation engine: the cheapest next move and its projected CRP effect, applyable as a version.\",\n    dependsOn: [\"planner.campusDetail\",\"planner.reallocate\"], description: \"The cheapest single change that would improve this campus.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.placements\", project: \"Media Planner\", label: \"Placement book\", screen: \"placements\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-10-30\", phase: 4, effort: \"1 week\", backend: \"Line-item list with server-side filters across school, media, status, month and cost.\",\n    dependsOn: [\"planner.solve\"], description: \"Every line item, with what it contributes to saturation.\", owner: \"Marcus Webb\", updated: \"Aug 17\" },\n  { key: \"planner.placementSwap\", project: \"Media Planner\", label: \"Placement swap\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\", \"planner\"], users: {},\n    eta: \"2026-11-20\", phase: 5, effort: \"4 days\", backend: \"Ranked alternatives per placement with CRP and cost deltas, plus a swap that re-scores the campus.\",\n    dependsOn: [\"planner.placements\"], description: \"Replace a placement with an engine-ranked alternative.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.savedViews\", project: \"Media Planner\", label: \"Saved table views\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-24\", phase: 7, effort: \"2 days\", backend: \"Per-team named column sets, filters and sort, shared across the workspace.\",\n    dependsOn: [\"planner.placements\"], description: \"Named column and filter sets, shared with the team.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.bulkEdit\", project: \"Media Planner\", label: \"Bulk placement actions\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\", \"planner\"], users: {},\n    eta: \"2026-11-20\", phase: 5, effort: \"2 days\", backend: \"Batch status change and removal, with a queued re-score.\",\n    dependsOn: [\"planner.placements\"], description: \"Select many line items and change status or remove them at once.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.columnPicker\", project: \"Media Planner\", label: \"Column picker\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-24\", phase: 7, effort: \"1 day\", backend: \"Column preference persistence per user, per table.\",\n    dependsOn: [\"planner.placements\"], description: \"Choose which of the fourteen placement columns are shown.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.groupBy\", project: \"Media Planner\", label: \"Group rows\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-24\", phase: 7, effort: \"2 days\", backend: \"Server-side grouping with per-group spend and CRP subtotals.\",\n    dependsOn: [\"planner.placements\"], description: \"Group the placement book by school or media, with subtotals.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.csvExport\", project: \"Media Planner\", label: \"CSV export\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-24\", phase: 7, effort: \"1 day\", backend: \"Streamed CSV of the current query — all filters and columns applied server-side.\",\n    dependsOn: [\"planner.placements\"], description: \"Export exactly the rows and columns on screen.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.excluded\", project: \"Media Planner\", label: \"Excluded schools\", screen: \"excluded\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-10-30\", phase: 4, effort: \"4 days\", backend: \"Every considered-but-unfunded campus with its reason and cost-to-include.\",\n    dependsOn: [\"planner.solve\"], description: \"The trust screen: what was considered and why it lost.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.addCampus\", project: \"Media Planner\", label: \"Add an excluded campus\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\", \"planner\"], users: {},\n    eta: \"2026-11-20\", phase: 5, effort: \"4 days\", backend: \"Funding plan that pulls from unallocated then trims the strongest campus, as a version.\",\n    dependsOn: [\"planner.excluded\", \"planner.reallocate\"], description: \"Fund a campus the engine excluded, and see what it costs.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.map\", project: \"Media Planner\", label: \"Geographic map\", screen: \"map\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"1 week\", backend: \"Campus coordinates and state rollups; geometry is static.\",\n    dependsOn: [\"planner.schools\"], description: \"Campus map with saturation-scaled markers.\", owner: \"Dana Reyes\", updated: \"Aug 17\" },\n  { key: \"planner.flights\", project: \"Media Planner\", label: \"Flight calendar\", screen: \"flights\", enabled: true, rollout: 60,\n    roles: [\"planner\", \"owner\"], users: { u_marcus: false },\n    eta: \"2027-01-22\", phase: 8, effort: \"6 days\", backend: \"Per-week spend distribution and a flight-shift mutation that preserves CRP.\",\n    dependsOn: [\"planner.placements\"], description: \"Placements as flight bars over the campaign weeks.\", owner: \"Marcus Webb\", updated: \"Aug 17\" },\n\n  // ---- Media Planner · analysis ----------------------------------------\n  { key: \"planner.scenarios\", project: \"Media Planner\", label: \"Scenario compare\", screen: \"scenarios\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"7 days\", backend: \"Solve the same brief under multiple strategies, persist each as a scenario, promote one to working.\",\n    dependsOn: [\"planner.solve\", \"planner.versions\"], description: \"Three strategies side by side with a campus matrix.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.versions\", project: \"Media Planner\", label: \"Version history\", screen: \"versions\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-11-20\", phase: 5, effort: \"6 days\", backend: \"Append-only snapshots with per-campus diffs and restore-as-new-head.\",\n    dependsOn: [\"planner.solve\"], description: \"Append-only plan snapshots with pairwise diff and restore.\", owner: \"Dana Reyes\", updated: \"Aug 16\" },\n  { key: \"planner.versionDiff\", project: \"Media Planner\", label: \"Version compare\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"3 days\", backend: \"Pairwise diff between any two snapshots, per campus, with CRP and spend deltas.\",\n    dependsOn: [\"planner.versions\"], description: \"Pick two versions and see exactly what changed.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"planner.versionRestore\", project: \"Media Planner\", label: \"Restore a version\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\",\"planner\"], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"2 days\", backend: \"Append-only restore: snapshots the chosen version as a new head so history is never rewritten.\",\n    dependsOn: [\"planner.versions\"], description: \"Make an earlier version current without losing anything.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"planner.scenarioPromote\", project: \"Media Planner\", label: \"Promote a scenario\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\",\"planner\"], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"3 days\", backend: \"Swap the working plan to a scenario's allocation as a new version.\",\n    dependsOn: [\"planner.scenarios\",\"planner.versions\"], description: \"Make an alternative strategy the working plan.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"planner.scenarioDuplicate\", project: \"Media Planner\", label: \"Duplicate a scenario\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\",\"planner\"], users: {},\n    eta: \"2027-02-12\", phase: 9, effort: \"2 days\", backend: \"Scenario CRUD so a planner can branch and adjust one independently.\",\n    dependsOn: [\"planner.scenarios\"], description: \"Branch a scenario and adjust it without touching the plan.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"planner.flightShift\", project: \"Media Planner\", label: \"Shift a flight\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\",\"planner\"], users: {},\n    eta: \"2027-01-22\", phase: 8, effort: \"3 days\", backend: \"Flight window mutation with weekly spend recomputation. Pacing only — CRP is flight-length invariant.\",\n    dependsOn: [\"planner.flights\"], description: \"Move a placement's run dates and re-pace the week.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.algorithm\", project: \"Media Planner\", label: \"Algorithm documentation\", screen: \"algorithm\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: null, shippedAt: \"2026-08-18\", phase: 0, effort: \"1 week\", backend: \"Read-only model config: weights, exponents, thresholds and provenance.\",\n    description: \"How every number is produced, with each constant's provenance.\", owner: \"Priya Raman\", updated: \"Aug 17\" },\n  { key: \"planner.algorithmConfig\", project: \"Media Planner\", label: \"Live coefficient editing\", enabled: false, rollout: 0,\n    roles: [\"model-admin\"], users: {},\n    eta: \"2027-02-26\", phase: 10, effort: \"6 days\", backend: \"Audited coefficient writes, a simulate endpoint that re-scores without saving, and per-plan coefficient pinning.\",\n    dependsOn: [\"planner.algorithm\", \"planner.versions\"], description: \"Edit scoring coefficients from the UI. Off until the audit trail ships.\", owner: \"Engineering\", updated: \"Aug 15\" },\n  { key: \"planner.algorithmSimulate\", project: \"Media Planner\", label: \"Coefficient simulation\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\"], users: {},\n    eta: \"2027-02-26\", phase: 10, effort: \"1 week\", backend: \"Re-score the working plan under proposed coefficients without saving them.\",\n    dependsOn: [\"planner.algorithmConfig\"], description: \"See what a weight change would do before committing it.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"planner.apiSpec\", project: \"Media Planner\", label: \"API specification\", screen: \"api\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: null, shippedAt: \"2026-08-18\", phase: 0, effort: \"3 days\", backend: \"None — generated from the same declarations the client calls.\",\n    description: \"The backend contract, rendered from the spec the front end calls.\", owner: \"Engineering\", updated: \"Aug 17\" },\n  { key: \"planner.roadmap\", project: \"Media Planner\", label: \"Roadmap\", screen: \"roadmap\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: null, shippedAt: \"2026-08-18\", phase: 0, effort: \"3 days\", backend: \"None — derived from the flag registry.\",\n    description: \"What is wired to the backend, and what is next.\", owner: \"Engineering\", updated: \"Today\" },\n\n  // ---- Media Planner · delivery ----------------------------------------\n  { key: \"planner.export\", project: \"Media Planner\", label: \"Export and share\", screen: \"export\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-11\", phase: 6, effort: \"3 days\", backend: \"Workbook generation as a job, returning a signed download URL.\",\n    dependsOn: [\"planner.overview\"], description: \"The spreadsheet, treated as a first-class deliverable.\", owner: \"Ana Duarte\", updated: \"Aug 12\" },\n  { key: \"planner.clientView\", project: \"Media Planner\", label: \"Client view\", screen: \"client\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-11\", phase: 6, effort: \"1 week\", backend: \"Token-scoped read-only payload carrying presence bands only — CRP must never leave authenticated surfaces.\",\n    dependsOn: [\"planner.export\"], description: \"The presentation surface clients receive. No CRP figures.\", owner: \"Ana Duarte\", updated: \"Aug 12\" },\n  { key: \"planner.shareLinks\", project: \"Media Planner\", label: \"Share links\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\", \"sales\"], users: {},\n    eta: \"2026-12-11\", phase: 6, effort: \"4 days\", backend: \"Version-pinned tokens with expiry, revocation and view analytics.\",\n    dependsOn: [\"planner.clientView\", \"planner.versions\"], description: \"Client links pinned to a version, with expiry and view counts.\", owner: \"Ana Duarte\", updated: \"Today\" },\n  { key: \"planner.exportXlsx\", project: \"Media Planner\", label: \"Workbook export\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-11\", phase: 6, effort: \"4 days\", backend: \"Sheet-for-sheet workbook build matching the legacy template, as a job returning a signed URL.\",\n    dependsOn: [\"planner.export\"], description: \"The client spreadsheet, sheet for sheet.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.exportPdf\", project: \"Media Planner\", label: \"PDF export\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-11\", phase: 6, effort: \"3 days\", backend: \"Server-side render of the client view to a paginated PDF at a pinned version.\",\n    dependsOn: [\"planner.clientView\"], description: \"The client-facing plan as a PDF, pinned to a version.\", owner: \"Marcus Webb\", updated: \"Today\" },\n  { key: \"planner.clientPreview\", project: \"Media Planner\", label: \"Client view preview\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-24\", phase: 7, effort: \"2 days\", backend: \"Read-only render of the client payload inside the admin surface.\",\n    dependsOn: [\"planner.clientView\"], description: \"See what the client sees without leaving the planner.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.clientPresentation\", project: \"Media Planner\", label: \"Presentation settings\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\",\"planner\"], users: {},\n    eta: \"2026-12-11\", phase: 6, effort: \"3 days\", backend: \"Per-link presentation options persisted on the share link: narrative, placement detail, spend visibility.\",\n    dependsOn: [\"planner.shareLinks\"], description: \"Choose what the client sees: narrative, placement detail, spend figures.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.clientPlacementDetail\", project: \"Media Planner\", label: \"Client placement lists\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2026-12-24\", phase: 7, effort: \"2 days\", backend: \"Per-campus placement lists in the client payload, band language only.\",\n    dependsOn: [\"planner.clientView\"], description: \"What runs where, per campus, on the client page.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.assistant\", project: \"Media Planner\", label: \"Plan assistant\", enabled: true, rollout: 40,\n    roles: [\"owner\", \"admin\", \"planner\"], users: { u_priya: true },\n    eta: \"2027-04-16\", phase: 13, effort: \"2 weeks\", backend: \"Threaded chat over the plan, job escalation for engine questions, and packets the planner can apply as real mutations.\",\n    dependsOn: [\"planner.overview\", \"chat.agentPanel\"], description: \"Docked chat that can propose and apply plan changes.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"planner.assistantApply\", project: \"Media Planner\", label: \"Assistant apply\", enabled: true, rollout: 40, roles: [\"owner\", \"admin\", \"planner\"], users: {},\n    eta: \"2027-04-16\", phase: 13, effort: \"6 days\", backend: \"Validate a packet against the live plan, then route it to the matching mutation endpoint.\",\n    dependsOn: [\"planner.assistant\", \"planner.reallocate\"], description: \"Turn an assistant proposal into a committed plan change.\", owner: \"Dana Reyes\", updated: \"Today\" },\n\n  // ---- Platform --------------------------------------------------------\n  { key: \"planner.assistantHistory\", project: \"Media Planner\", label: \"Assistant thread history\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-04-16\", phase: 13, effort: \"3 days\", backend: \"Thread list, rename and delete scoped to a context, with transcript persistence.\",\n    dependsOn: [\"planner.assistant\"], description: \"Past conversations, resumable and deletable.\", owner: \"Dana Reyes\", updated: \"Today\" },\n  { key: \"platform.creativeReview\", project: \"Platform\", label: \"Creative review\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-03-26\", phase: 12, effort: \"6 days\", backend: \"Creative upload, approval states, reviewer assignment.\",\n    description: \"College-side creative approval flow.\", owner: \"Ana Duarte\", updated: \"Aug 09\" },\n  { key: \"platform.verification\", project: \"Platform\", label: \"Screen verification\", enabled: true, rollout: 80, roles: [], users: {},\n    eta: \"2027-03-26\", phase: 12, effort: \"1 week\", backend: \"Photo upload with EXIF and geo validation against the placement's location.\",\n    dependsOn: [\"platform.creativeReview\"], description: \"Photo proof-of-posting on physical placements.\", owner: \"Ana Duarte\", updated: \"Aug 14\" },\n\n  // ---- Admin -----------------------------------------------------------\n  { key: \"admin.users\", project: \"Admin\", label: \"User directory\", screen: \"users\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\"], users: {},\n    eta: \"2026-09-11\", phase: 1, effort: \"4 days\", backend: \"Member CRUD, invitations, status transitions.\",\n    description: \"Who is in the workspace and what they hold.\", owner: \"Engineering\", updated: \"Aug 16\" },\n  { key: \"admin.roles\", project: \"Admin\", label: \"Roles and permissions\", screen: \"roles\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\"], users: {},\n    eta: \"2026-09-11\", phase: 1, effort: \"1 week\", backend: \"Role definitions, permission grants, and server-side enforcement on every route.\",\n    dependsOn: [\"admin.users\"], description: \"Named permission bundles, and what each one grants.\", owner: \"Engineering\", updated: \"Aug 16\" },\n  { key: \"admin.flags\", project: \"Admin\", label: \"Feature flags\", screen: \"flags\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\"], users: {},\n    eta: \"2026-09-11\", phase: 1, effort: \"4 days\", backend: \"Flag registry with rollout bucketing, role targeting and per-user overrides.\",\n    description: \"Every project's flags, with their targeting rules.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"admin.audit\", project: \"Admin\", label: \"Audit log\", screen: \"audit\", enabled: true, rollout: 100, roles: [\"owner\", \"admin\", \"analyst\"], users: {},\n    eta: \"2027-03-12\", phase: 11, effort: \"4 days\", backend: \"Append-only change records with an 18-month retention window.\",\n    dependsOn: [\"admin.roles\"], description: \"Every administrative change, append-only.\", owner: \"Engineering\", updated: \"Aug 16\" },\n  { key: \"admin.bulkInvite\", project: \"Admin\", label: \"Bulk invite\", enabled: false, rollout: 0, roles: [\"owner\"], users: {},\n    eta: \"2027-03-12\", phase: 11, effort: \"2 days\", backend: \"CSV parse, per-row validation, and a partial-success invitation batch.\",\n    dependsOn: [\"admin.users\"], description: \"CSV upload to invite many members at once.\", owner: \"Engineering\", updated: \"Aug 11\" },\n  { key: \"admin.ssoEnforcement\", project: \"Admin\", label: \"Enforce SSO\", enabled: false, rollout: 0, roles: [], users: {},\n    eta: \"2027-03-12\", phase: 11, effort: \"3 days\", backend: \"SAML assertion handling, just-in-time provisioning, and a break-glass path.\",\n    dependsOn: [\"admin.roles\"], description: \"Require SAML for every member. Locks out password sign-in.\", owner: \"Engineering\", updated: \"Aug 05\" },\n\n  // ---- Agent Chat ------------------------------------------------------\n  { key: \"admin.roleEditor\", project: \"Admin\", label: \"Role permission editor\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\"], users: {},\n    eta: \"2027-03-12\", phase: 11, effort: \"4 days\", backend: \"Role CRUD with a permission matrix and an effective-permission resolver.\",\n    dependsOn: [\"admin.roles\"], description: \"Change what a role grants, permission by permission.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"admin.flagTargeting\", project: \"Admin\", label: \"Flag targeting\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\"], users: {},\n    eta: \"2027-03-12\", phase: 11, effort: \"4 days\", backend: \"Evaluation order: user override, role, rollout percentage by stable hash, then the global switch.\",\n    dependsOn: [\"admin.flags\"], description: \"Target a flag by user, role or rollout percentage.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"admin.auditExport\", project: \"Admin\", label: \"Audit export\", enabled: true, rollout: 100, roles: [\"owner\",\"admin\"], users: {},\n    eta: \"2027-03-12\", phase: 11, effort: \"1 day\", backend: \"Streamed CSV of the audit query, with retention-window enforcement.\",\n    dependsOn: [\"admin.audit\"], description: \"Export the audit trail for a date range.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"chat.agentPanel\", project: \"Agent Chat\", label: \"Agent panel\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-04-16\", phase: 13, effort: \"1 week\", backend: \"Thread resolution, message send, job polling, and cancellation.\",\n    description: \"The embeddable assistant surface itself.\", owner: \"Engineering\", updated: \"Today\" },\n  { key: \"chat.attachments\", project: \"Agent Chat\", label: \"Chat attachments\", enabled: true, rollout: 100, roles: [], users: {},\n    eta: \"2027-04-16\", phase: 13, effort: \"3 days\", backend: \"Staged upload with virus scanning, then reference by id in the turn.\",\n    dependsOn: [\"chat.agentPanel\"], description: \"Attach files to a question.\", owner: \"Engineering\", updated: \"Today\" }\n];\n\nconst USERS: User[] = [\n  { id: \"u_dana\", name: \"Dana Reyes\", email: \"dana@flytedesk.com\", title: \"Senior media planner\", team: \"Demand\",\n    roles: [\"planner\", \"admin\"], status: \"active\", lastActive: \"2 minutes ago\", joined: \"Mar 2024\", sso: true,\n    timezone: \"America/Denver\", phone: \"+1 303 555 0142\" },\n  { id: \"u_marcus\", name: \"Marcus Webb\", email: \"marcus@flytedesk.com\", title: \"Media planner\", team: \"Demand\",\n    roles: [\"planner\"], status: \"active\", lastActive: \"Yesterday\", joined: \"Sep 2024\", sso: true, timezone: \"America/New_York\" },\n  { id: \"u_priya\", name: \"Priya Raman\", email: \"priya@flytedesk.com\", title: \"Data scientist\", team: \"Engineering\",\n    roles: [\"model-admin\", \"analyst\"], status: \"active\", lastActive: \"4 hours ago\", joined: \"Jan 2025\", sso: true, timezone: \"America/Los_Angeles\" },\n  { id: \"u_ana\", name: \"Ana Duarte\", email: \"ana@flytedesk.com\", title: \"Account lead\", team: \"Revenue\",\n    roles: [\"sales\"], status: \"active\", lastActive: \"1 hour ago\", joined: \"Jun 2023\", sso: true, timezone: \"America/Chicago\" },\n  { id: \"u_jules\", name: \"Jules Okonkwo\", email: \"jules@flytedesk.com\", title: \"VP Revenue\", team: \"Revenue\",\n    roles: [\"owner\"], status: \"active\", lastActive: \"3 days ago\", joined: \"Feb 2022\", sso: true, timezone: \"America/New_York\" },\n  { id: \"u_sam\", name: \"Sam Whitfield\", email: \"sam@flytedesk.com\", title: \"Finance analyst\", team: \"Finance\",\n    roles: [\"analyst\"], status: \"active\", lastActive: \"Aug 14\", joined: \"Nov 2024\", sso: false, timezone: \"America/Denver\" },\n  { id: \"u_tess\", name: \"Tess Nakamura\", email: \"tess@flytedesk.com\", title: \"Media planner\", team: \"Demand\",\n    roles: [\"planner\"], status: \"invited\", lastActive: \"—\", joined: \"Invited Aug 16\", sso: false, timezone: \"America/Denver\" },\n  { id: \"u_ben\", name: \"Ben Alvarez\", email: \"ben@flytedesk.com\", title: \"Account lead\", team: \"Revenue\",\n    roles: [\"sales\"], status: \"suspended\", lastActive: \"Jul 02\", joined: \"Apr 2023\", sso: true, timezone: \"America/Chicago\" }\n];\n\n/** Stable 0–99 bucket from a string, so rollout answers never flicker between reloads. */\nfunction bucket(seed: string): number {\n  let h = 2166136261;\n  for (let i = 0; i < seed.length; i++) { h ^= seed.charCodeAt(i); h = Math.imul(h, 16777619); }\n  return Math.abs(h) % 100;\n}\n\nconst STORE = \"fd.session.v1\";\n\ninterface StoredSession { userId?: string; profile?: Partial<User> }\n\nfunction readStored(): StoredSession | null {\n  try { return JSON.parse(localStorage.getItem(STORE) || \"null\"); } catch { return null; }\n}\nfunction writeStored(patch: Partial<StoredSession>): StoredSession | null {\n  try {\n    const next = Object.assign({}, readStored(), patch);\n    localStorage.setItem(STORE, JSON.stringify(next));\n    return next;\n  } catch { return null; }\n}\n\n/** Build the session document a real GET /me would return. */\nfunction buildSession(userId: string, overrides?: { users?: User[]; roles?: Role[]; flags?: Flag[] }): Session {\n  const users = (overrides && overrides.users) || USERS;\n  const roles = (overrides && overrides.roles) || ROLES;\n  const flags = (overrides && overrides.flags) || FLAGS;\n  const user = users.find((u) => u.id === userId) || users[0];\n  const held = roles.filter((r) => user.roles.indexOf(r.id) >= 0);\n  const permissions = [...new Set(held.flatMap((r) => r.permissions))];\n  const resolved: Record<string, boolean> = {};\n  flags.forEach((f) => { resolved[f.key] = evaluateFlag(f, user); });\n  return { user, roles: held, permissions, flags: resolved, allRoles: roles, allFlags: flags, allUsers: users };\n}\n\n/** The precedence rule, in one place so the admin UI and the app can never disagree. */\nfunction evaluateFlag(flag: Flag, user: User): boolean {\n  if (!flag.enabled) return false;                                   // kill switch wins\n  if (user && flag.users && flag.users[user.id] != null) return !!flag.users[user.id];\n  if (flag.roles && flag.roles.length) {\n    if (user && user.roles.some((r) => flag.roles.indexOf(r) >= 0)) return true;\n    if (flag.rollout >= 100) return true;\n    return false;\n  }\n  if (flag.rollout >= 100) return true;\n  if (flag.rollout <= 0) return false;\n  return user ? bucket(flag.key + \":\" + user.id) < flag.rollout : false;\n}\n\n/** Why a flag resolved the way it did — shown in the admin UI, invaluable in support. */\nfunction explainFlag(flag: Flag, user: User): FlagExplanation {\n  if (!flag.enabled) return { on: false, reason: \"Globally off\", detail: \"The kill switch overrides all targeting.\" };\n  if (user && flag.users && flag.users[user.id] != null) {\n    const on = !!flag.users[user.id];\n    return { on, reason: on ? \"User override — on\" : \"User override — off\", detail: \"Set explicitly for \" + user.name + \".\" };\n  }\n  if (flag.roles && flag.roles.length && user && user.roles.some((r) => flag.roles.indexOf(r) >= 0)) {\n    return { on: true, reason: \"Role targeted\", detail: \"Held role matches \" + flag.roles.join(\", \") + \".\" };\n  }\n  if (flag.rollout >= 100) return { on: true, reason: \"Fully rolled out\", detail: \"100% of users.\" };\n  if (flag.rollout <= 0) {\n    return flag.roles && flag.roles.length\n      ? { on: false, reason: \"Not targeted\", detail: \"Limited to \" + flag.roles.join(\", \") + \"; rollout is 0%.\" }\n      : { on: false, reason: \"Rollout 0%\", detail: \"Enabled but not released to anyone.\" };\n  }\n  const b = user ? bucket(flag.key + \":\" + user.id) : null;\n  return b != null && b < flag.rollout\n    ? { on: true, reason: \"In rollout\", detail: \"Bucket \" + b + \" is below the \" + flag.rollout + \"% threshold.\" }\n    : { on: false, reason: \"Outside rollout\", detail: \"Bucket \" + b + \" is at or above the \" + flag.rollout + \"% threshold.\" };\n}\n\nconst listeners = new Set<(s: Session) => void>();\nlet current: Session | null = null;\n\ndeclare global {\n  interface Window {\n    /** Admin-app-injected overrides for the demo dataset, read by loadSession(). */\n    __FD_ADMIN_OVERRIDES?: { users?: User[]; roles?: Role[]; flags?: Flag[] };\n  }\n}\n\n/** Replace this with `fetch(API + \"/me\")` to go live. */\nfunction loadSession(userId?: string): Session {\n  const stored = readStored();\n  const id = userId || (stored && stored.userId) || USERS[0].id;\n  current = buildSession(id, window.__FD_ADMIN_OVERRIDES);\n  if (stored && stored.profile) Object.assign(current.user, stored.profile);\n  return current;\n}\n\nfunction getSession(): Session { return current || loadSession(); }\n\nfunction setActiveUser(userId: string): Session {\n  writeStored({ userId });\n  current = null;\n  const s = loadSession(userId);\n  listeners.forEach((fn) => fn(s));\n  return s;\n}\n\n/** Local profile edits persist so the demo keeps them across reloads. */\nfunction saveProfile(patch: Partial<User>): User {\n  const s = getSession();\n  Object.assign(s.user, patch);\n  const stored: StoredSession = readStored() || {};\n  writeStored({ profile: Object.assign({}, stored.profile, patch) });\n  listeners.forEach((fn) => fn(getSession()));\n  return s.user;\n}\n\n/** Recompute after the admin app mutates users/roles/flags. */\nfunction refresh(): Session {\n  const id = getSession().user.id;\n  current = null;\n  const s = loadSession(id);\n  listeners.forEach((fn) => fn(s));\n  return s;\n}\n\nfunction subscribe(fn: (s: Session) => void): () => void { listeners.add(fn); return () => listeners.delete(fn); }\n\nfunction can(permission: string | string[]): boolean {\n  if (!permission) return true;\n  const s = getSession();\n  const list = Array.isArray(permission) ? permission : [permission];\n  return list.every((p) => s.permissions.indexOf(p) >= 0);\n}\nfunction canAny(permissions: string[]): boolean {\n  const s = getSession();\n  return (permissions || []).some((p) => s.permissions.indexOf(p) >= 0);\n}\nfunction hasRole(roleId: string): boolean { return getSession().user.roles.indexOf(roleId) >= 0; }\nfunction flagOn(key: string): boolean { return !!getSession().flags[key]; }\n\n/** The flag registry entry, whatever the session shape.\n *  Not declared in session.d.ts — see the module doc comment on SessionKit below. */\nfunction findFlag(key: string): Flag | null { return (getSession().allFlags || []).find((f) => f.key === key) || null; }\n\n/* Release state ONLY: is this feature turned on for this member (kill switch, rollout bucket,\n   role, per-user override). Whether its backend exists is a different question with a different\n   owner — RuntimeKit.status() computes it from the endpoints the feature declares, so no record\n   anywhere claims to be implemented. Mixing the two here is what let a typed `implemented: true`\n   outrank the code. */\nfunction flagState(key: string): \"on\" | \"off\" {\n  if (!key) return \"on\";\n  const f = findFlag(key);\n  if (!f) return \"on\";                       // unknown key: never hide working UI\n  return flagOn(key) ? \"on\" : \"off\";\n}\nfunction isEnabled(key: string): boolean { return flagState(key) !== \"off\"; }\nfunction flagVisible(key: string): boolean { return isEnabled(key); }\n/* Deprecated: \"live\" used to mean released AND wired. Ask RuntimeKit.isComplete() for the second\n   half — kept only so older call sites do not break. */\nfunction flagLive(key: string): boolean { return isEnabled(key); }\n\n/* Roadmap, derived from the registry rather than maintained beside it — a roadmap kept in a\n   second place is a roadmap that goes stale. Ordered by date so the timeline is chronological\n   regardless of how the flags happen to be listed. */\nfunction roadmap(overrides?: { flags?: Flag[]; isComplete?: (key: string) => boolean }): RoadmapResult {\n  const flags = (overrides && overrides.flags) || (getSession().allFlags || []);\n  // Injected rather than imported: session.ts must not depend on runtime.ts (runtime.ts has no\n  // opinion about sessions, and a cycle between them would be the wrong shape). The consumer\n  // passes RuntimeKit.isComplete; without it every feature reads as pending, which is the safe\n  // direction — it under-claims instead of over-claiming.\n  const isComplete = (overrides && overrides.isComplete) || (() => false);\n  const items: RoadmapItem[] = flags.map((f): RoadmapItem => {\n    const done = !!isComplete(f.key);\n    /* Fall back to shippedAt when a record has no eta. Filtering on a missing date used to be\n       harmless because shipped records were `done` and used shippedAt; with completeness derived,\n       nothing is done, so 36 records lost their date and vanished from the page — including the\n       very features whose coming-soon cards link here. A designed-on date is still a real date;\n       it is labelled as one rather than pretended to be a ship date. */\n    const date = done ? (f.shippedAt || f.eta) : (f.eta || f.shippedAt);\n    const phaseInfo: Partial<Phase> = (f.phase != null ? PHASES[f.phase] : undefined) || {};\n    return {\n      key: f.key, label: f.label, project: f.project, description: f.description,\n      backend: f.backend, effort: f.effort, owner: f.owner, dependsOn: f.dependsOn || [],\n      screen: f.screen || null, enabled: f.enabled,\n      /* Which build phase this sits in, and why that phase comes where it does. */\n      phase: f.phase, phaseName: phaseInfo.name || \"Unscheduled\",\n      phaseWhy: phaseInfo.why || null,\n      phaseStart: phaseInfo.start || null,\n      /* Derived, not stored. */\n      implemented: done,\n      date: date || null,\n      /* True when the only date we have is when the UI was designed, not when it ships. */\n      dateIsDesign: !done && !f.eta && !!f.shippedAt,\n      status: done ? \"shipped\" : (f.enabled ? \"next\" : \"planned\")\n    };\n  }).filter((i) => i.date);\n  /* Phase order, not date order. Two features in the same phase are deliberately unordered\n     relative to each other — the phase is the commitment, the day inside it is not. */\n  items.sort((a, b) => ((a.phase ?? 0) - (b.phase ?? 0)) || String(a.date).localeCompare(String(b.date)) || a.label.localeCompare(b.label));\n  // The first unshipped item is where the reader should land: everything above is history.\n  const nextIndex = items.findIndex((i) => !i.implemented);\n  return {\n    items, nextIndex: nextIndex < 0 ? items.length : nextIndex,\n    shipped: items.filter((i) => i.implemented).length,\n    remaining: items.filter((i) => !i.implemented).length\n  };\n}\n\n/** React binding. Re-renders on user switch, profile save, or admin mutation. */\nfunction useSession(): Session {\n  const [s, setS] = React.useState<Session>(getSession);\n  React.useEffect(() => subscribe(setS), []);\n  return s;\n}\n\n/**\n * Session, RBAC and feature flags for every flytedesk app.\n *\n * Not a security boundary: permissions gate the UI so people aren't shown affordances they\n * cannot use. The server must re-check all of it.\n *\n * To go live, replace loadSession() with a fetch of GET /me → { user, roles, permissions, flags }.\n */\nexport const SessionKit = {\n  PERMISSION_CATALOG, ALL_PERMISSIONS, ROLES, FLAGS, USERS,\n  loadSession, getSession, setActiveUser, saveProfile, refresh, subscribe,\n  can, canAny, hasRole, flagOn, useSession,\n  findFlag, flagState, isEnabled, flagVisible, flagLive, roadmap,\n  evaluateFlag, explainFlag, bucket, buildSession\n};\n\n/**\n * Mounts the built-in fixture `SessionKit` behind the same `SessionProvider` contract every\n * session-aware component reads (see `kits/sessionContext.tsx`). This is the ONLY place the\n * demo fixture is wired to that contract — AccountMenu/Gate/ProfilePage/AppSwitcher never\n * import `SessionKit` directly, so a real app supplying its own `<SessionProvider value={...}>`\n * gets identical behavior with no demo-only code path left running underneath it.\n *\n * `demo` is populated on the resulting context value, which is what lets AccountMenu show\n * \"View as another member\" here and nowhere else: a real session simply never sets it.\n */\nexport function DemoSessionProvider({ children }: { children?: React.ReactNode }) {\n  const session = useSession();\n  const value: SessionContextValue = React.useMemo(\n    () => ({\n      user: session.user,\n      roles: session.roles,\n      permissions: session.permissions,\n      can,\n      canAny,\n      hasRole,\n      signOut: () => window.alert(\"Signed out. (Simulated — no auth provider is wired up.)\"),\n      saveProfile: (patch) => { saveProfile(patch); },\n      demo: { allUsers: session.allUsers.filter((u) => u.status === \"active\"), setActiveUser },\n    }),\n    [session]\n  );\n  return React.createElement(SessionProvider, { value }, children);\n}\n","import * as React from \"react\";\n\n/* Runtime mode and feature completeness.\n\n   The correction this file exists to make: completeness is NOT a field on a feature record.\n   A row in a table saying `implemented: true` is a claim someone typed; it drifts the moment\n   code changes, and nothing enforces it. The code already knows — a feature is complete when\n   the endpoints it depends on are served by a real backend. So that is where it is declared,\n   and everything else is derived.\n\n   Two code-owned lists, both here, both meant to be edited by whoever ships the backend:\n\n     WIRED_ENDPOINTS  endpoint ids the REAL service answers. Empty today: every request in this\n                      build goes to the simulated transport. Add an id the day it goes live.\n     CLIENT_ONLY      features that need no backend at all — pure front-end behaviour. These are\n                      complete by construction and must never be obstructed.\n\n   A feature declares the endpoints it needs via `RuntimeKit.declare()`. It is complete when\n   every one of those endpoints is wired. Nothing to keep in sync, nothing to forget: ship the\n   endpoint, add its id, and every feature that depended on it stops being under construction.\n\n   This package ships with WIRED_ENDPOINTS permanently empty — it has no way to know which\n   endpoints any given consuming app has actually wired up. A consumer that has shipped real\n   backend work for a feature tells this module so via `RuntimeKit.wireEndpoints(ids)`, the\n   mirror of `declare()`: call it once, early (before first render), with the real list. Additive\n   and idempotent, same as `declare()` — safe to call from more than one place in a consuming\n   app without one caller clobbering another's ids.\n\n   MODE is the other half. Under construction is the honest state for a demo, but it is useless\n   for design review — you cannot evaluate a screen through a blur. So:\n\n     live  what a user would see today. Every incomplete feature is obstructed.\n     test  every feature usable, no obstruction, all data simulated.\n\n   Test mode is not a bypass of a specific gate — it is a statement about the whole build, which\n   is why it is one switch and not a per-feature escape. Admins only: a member seeing test mode\n   would be looking at a product that does not exist yet. */\n\n/** Runtime mode and computed feature completeness. */\nexport interface FeatureStatus {\n  /** Every endpoint this feature needs is served by the real backend. */\n  complete: boolean;\n  /** Endpoint ids still unserved. */\n  missing: string[];\n  /** No requirements were declared — treated as incomplete (fails closed). */\n  undeclared?: boolean;\n  /** Needs no backend at all. */\n  clientOnly?: boolean;\n}\nexport interface RuntimeSummary { total: number; complete: number; incomplete: number; endpointsWired: number }\n\nconst WIRED_ENDPOINTS: string[] = [\n  // Nothing yet. Every id below would come from a real service:\n  //   \"plan.get\", \"placements.list\", …\n];\n\nconst CLIENT_ONLY: string[] = [\n  // Rendered from code and the flag registry — no request, so nothing to wait for.\n  \"planner.apiSpec\", \"planner.algorithm\", \"planner.roadmap\"\n];\n\n/* What each feature needs. This is the artifact that replaces `implemented` on the record: it is\n   read by engineers as a checklist and by the UI as truth. Endpoint ids match the API spec.\n   A feature not listed here fails closed — see status(). */\nconst FEATURE_NEEDS: Record<string, string[]> = {\n  // Media Planner · brief and solve\n  \"planner.setup\": [\"brief.update\"],\n  \"planner.briefParse\": [\"brief.parse\"],\n  \"planner.goals\": [\"goals.create\", \"goals.update\", \"goals.delete\", \"goals.review\"],\n  \"planner.goalTweaks\": [\"tweaks.list\", \"goals.applyTweak\", \"tweaks.revert\", \"tweaks.refine\", \"goals.dismissTweak\"],\n  \"planner.import\": [\"inventory.import\", \"inventory.mapMediaType\", \"inventory.ackWarning\", \"inventory.request\"],\n  \"planner.solve\": [\"plan.solve\"],\n\n  // Media Planner · plan screens\n  \"planner.overview\": [\"plan.get\"],\n  \"planner.attentionFlags\": [\"plan.get\"],\n  \"planner.saturationDistribution\": [\"plan.get\"],\n  \"planner.mixGap\": [\"plan.get\"],\n  \"planner.decisionTrace\": [\"plan.model\"],\n  \"planner.schools\": [\"schools.list\"],\n  \"planner.reallocate\": [\"reallocate.preview\", \"reallocate.commit\"],\n  \"planner.campusDetail\": [\"schools.list\", \"placements.list\"],\n  \"planner.channelContribution\": [\"placements.list\"],\n  \"planner.surroundSound\": [\"placements.list\"],\n  \"planner.campusNudges\": [\"campus.applyRecommendation\"],\n  \"planner.placements\": [\"placements.list\"],\n  \"planner.placementSwap\": [\"placements.alternatives\", \"placements.swap\"],\n  \"planner.savedViews\": [\"views.save\"],\n  \"planner.bulkEdit\": [\"placements.update\"],\n  \"planner.columnPicker\": [\"prefs.update\"],\n  \"planner.groupBy\": [\"placements.list\"],\n  \"planner.csvExport\": [\"placements.list\"],\n  \"planner.excluded\": [\"excluded.list\"],\n  \"planner.addCampus\": [\"excluded.include\"],\n  \"planner.map\": [\"geo.campuses\", \"geo.states\"],\n  \"planner.flights\": [\"flights.list\"],\n  \"planner.flightShift\": [\"flights.shift\"],\n  \"planner.scenarios\": [\"scenarios.list\", \"scenarios.matrix\"],\n  \"planner.scenarioPromote\": [\"scenarios.promote\"],\n  \"planner.scenarioDuplicate\": [\"scenarios.create\", \"scenarios.delete\"],\n  \"planner.versions\": [\"versions.list\"],\n  \"planner.versionDiff\": [\"versions.list\"],\n  \"planner.versionRestore\": [\"versions.restore\"],\n  \"planner.algorithmConfig\": [\"config.get\", \"config.update\", \"config.reset\"],\n  \"planner.algorithmSimulate\": [\"config.simulate\"],\n\n  // Media Planner · delivery\n  \"planner.export\": [\"plan.get\"],\n  \"planner.exportXlsx\": [\"export.xlsx\"],\n  \"planner.exportPdf\": [\"export.pdf\"],\n  \"planner.clientView\": [\"client.view\"],\n  \"planner.clientPreview\": [\"client.view\"],\n  \"planner.clientPresentation\": [\"presentation.update\"],\n  \"planner.clientPlacementDetail\": [\"client.view\"],\n  \"planner.shareLinks\": [\"share.list\", \"share.create\", \"share.update\", \"share.revoke\"],\n\n  // Assistant\n  \"planner.assistant\": [\"chat.resolveThread\", \"chat.sendMessage\", \"chat.getJob\", \"chat.getThread\"],\n  \"planner.assistantApply\": [\"chat.sendMessage\", \"plan.undo\"],\n  \"planner.assistantHistory\": [\"chat.listThreads\", \"chat.createThread\", \"chat.deleteThread\"],\n  \"chat.agentPanel\": [\"chat.resolveThread\", \"chat.sendMessage\"],\n  \"chat.attachments\": [\"chat.uploadAttachment\"],\n\n  // Admin\n  \"admin.users\": [\"users.list\"],\n  \"admin.roles\": [\"roles.list\", \"permissions.list\"],\n  \"admin.flags\": [\"flags.list\"],\n  \"admin.audit\": [\"audit.list\"],\n  \"admin.bulkInvite\": [\"users.invite\"],\n  \"admin.ssoEnforcement\": [\"users.update\"],\n  \"admin.roleEditor\": [\"roles.create\", \"roles.update\", \"roles.delete\"],\n  \"admin.flagTargeting\": [\"flags.update\", \"flags.evaluate\"],\n  \"admin.auditExport\": [\"audit.export\"],\n\n  // Platform (college-side)\n  \"platform.creativeReview\": [\"plan.get\"],\n  \"platform.verification\": [\"plan.get\"]\n};\n\nconst MODE_STORE = \"fd.runtime.mode.v1\";\nconst listeners = new Set<(mode: \"live\" | \"test\") => void>();\nlet needs: Record<string, string[]> = {};       // featureKey -> endpoint ids\n\nfunction read(): \"live\" | \"test\" {\n  try {\n    const v = localStorage.getItem(MODE_STORE);\n    return v === \"test\" || v === \"live\" ? v : \"live\";\n  } catch { return \"live\"; }\n}\nfunction emit(): void { listeners.forEach((fn) => fn(mode)); }\n\nlet mode: \"live\" | \"test\" = read();\n\nexport const RuntimeKit = {\n  WIRED_ENDPOINTS,\n  CLIENT_ONLY,\n  FEATURE_NEEDS,\n\n  /** Register what each feature needs: { \"planner.flights\": [\"flights.list\", \"flights.shift\"] } */\n  declare(map: Record<string, string[]>): void { needs = Object.assign({}, needs, map || {}); },\n  needsOf(key: string): string[] { return needs[key] || []; },\n  /** Every declared feature, for the admin surface. */\n  declared(): string[] { return Object.keys(needs); },\n\n  /** Tell this module which endpoints the consuming app has actually wired to a real backend.\n   *  Additive — merges into WIRED_ENDPOINTS, never replaces it, so multiple call sites in a\n   *  consuming app (or a call that runs more than once, e.g. React strict-mode double-invoke)\n   *  compose safely instead of one clobbering another. Call once, early, before first render:\n   *  status() reads WIRED_ENDPOINTS live but nothing here triggers a re-render on its own. */\n  wireEndpoints(ids: string[]): void {\n    (ids || []).forEach((id) => { if (WIRED_ENDPOINTS.indexOf(id) < 0) WIRED_ENDPOINTS.push(id); });\n  },\n\n  isEndpointWired(id: string): boolean { return WIRED_ENDPOINTS.indexOf(id) >= 0; },\n\n  /** The whole point: complete is computed, never stored. */\n  status(key: string): FeatureStatus {\n    if (CLIENT_ONLY.indexOf(key) >= 0) return { complete: true, clientOnly: true, missing: [] };\n    const req = needs[key];\n    // A feature nobody declared is treated as needing a backend. Failing closed is right here:\n    // an undeclared feature quietly reading as \"done\" is exactly the drift this file removes.\n    if (!req || !req.length) return { complete: false, undeclared: true, missing: [] };\n    const missing = req.filter((id) => WIRED_ENDPOINTS.indexOf(id) < 0);\n    return { complete: missing.length === 0, missing: missing };\n  },\n  isComplete(key: string): boolean { return RuntimeKit.status(key).complete; },\n\n  getMode(): \"live\" | \"test\" { return mode; },\n  isTest(): boolean { return mode === \"test\"; },\n  setMode(next: \"live\" | \"test\"): void {\n    const m: \"live\" | \"test\" = next === \"test\" ? \"test\" : \"live\";\n    if (m === mode) return;\n    mode = m;\n    try { localStorage.setItem(MODE_STORE, m); } catch { /* private mode */ }\n    emit();\n  },\n  subscribe(fn: (mode: \"live\" | \"test\") => void): () => void { listeners.add(fn); return () => listeners.delete(fn); },\n\n  /** Counts for the admin surface and the mode popover. */\n  summary(): RuntimeSummary {\n    const keys = Object.keys(needs).concat(CLIENT_ONLY.filter((k) => !needs[k]));\n    let complete = 0;\n    keys.forEach((k) => { if (RuntimeKit.isComplete(k)) complete++; });\n    return { total: keys.length, complete: complete, incomplete: keys.length - complete,\n             endpointsWired: WIRED_ENDPOINTS.length };\n  }\n};\n\nRuntimeKit.declare(FEATURE_NEEDS);\n\nexport function useRuntimeMode(): \"live\" | \"test\" {\n  const [m, setM] = React.useState<\"live\" | \"test\">(RuntimeKit.getMode());\n  React.useEffect(() => RuntimeKit.subscribe(setM), []);\n  return m;\n}\n/** True when this feature should be shown obstructed right now. */\nexport function useFeatureStatus(key: string): FeatureStatus & { mode: \"live\" | \"test\"; obstruct: boolean } {\n  const m = useRuntimeMode();\n  const st = RuntimeKit.status(key);\n  return { mode: m, complete: st.complete, missing: st.missing, undeclared: !!st.undeclared,\n           clientOnly: !!st.clientOnly, obstruct: m === \"live\" && !st.complete };\n}\n\n/* Capital-initial aliases: only names starting with a capital reach window.<Namespace>, so a\n   consuming app destructuring these hooks from the bundle would get undefined. The lowercase\n   names stay for in-bundle imports; these are what a consumer reads. */\nexport const UseRuntimeMode = useRuntimeMode;\nexport const UseFeatureStatus = useFeatureStatus;\n","import * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useStackedLayer, useLayerZIndex } from \"../../kits/layerStack\";\n\n/* Wraps a feature that is designed and working against the simulated transport but not yet\n   wired to the real backend. The point is to let people SEE what is coming without being able\n   to act on it — a disabled button teaches nothing, and hiding it entirely teaches nothing\n   either. So: the real UI, blurred, behind a construction banner, fully inert.\n\n   Inert is enforced three ways, because any one of them alone leaks:\n     pointer-events   stops mouse and touch\n     inert attribute  removes descendants from the tab order and the a11y tree\n     aria-hidden      keeps screen readers out of a surface nobody can use\n   The banner itself sits outside the inert subtree so it stays readable.\n\n   `bypassKey` opens a deliberate exception for the people building the thing: an administrator\n   can unblur and use it. That is not a hole in the gate — the gate protects users from acting on\n   a surface whose writes go nowhere, and an admin already knows. The escape stays honest: a\n   persistent bar remains on screen saying the data is simulated, so nobody forgets which side of\n   the line they are on, and re-blurring is one click away. */\n\nconst BYPASS_STORE = \"fd.soon.bypass.v1\";\n\nfunction readBypassed(): string[] {\n  try { return JSON.parse(sessionStorage.getItem(BYPASS_STORE) || \"[]\"); } catch (e) { return []; }\n}\nfunction writeBypassed(list: string[]): void {\n  try { sessionStorage.setItem(BYPASS_STORE, JSON.stringify(list)); } catch (e) { /* private mode */ }\n}\n/* Session-scoped, not local: the bypass is for one working session. Persisting it across days\n   would quietly become the default state and the warning would stop being read. */\nfunction useBypass(key?: string): [boolean, (next: boolean) => void] {\n  const [on, setOn] = React.useState(() => !!key && readBypassed().indexOf(key) >= 0);\n  React.useEffect(() => { setOn(!!key && readBypassed().indexOf(key) >= 0); }, [key]);\n  const set = (next: boolean) => {\n    if (!key) return;\n    const list = readBypassed().filter((k) => k !== key);\n    if (next) list.push(key);\n    writeBypassed(list);\n    setOn(next);\n  };\n  return [on, set];\n}\n\ninterface SoonCardProps {\n  label?: string;\n  detail?: string;\n  backend?: string | null;\n  eta?: string | null;\n  effort?: string;\n  onRoadmap?: () => void;\n  allowed?: boolean;\n  onBypass?: () => void;\n}\nfunction SoonCard({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass }: SoonCardProps) {\n  return (\n    <>\n      <span className=\"fd-soon-badge\">\n        <i className=\"ph ph-traffic-cone\" aria-hidden=\"true\" />\n        {label}\n      </span>\n      {detail ? <span className=\"fd-soon-detail\">{detail}</span> : null}\n      {backend ? <span className=\"fd-soon-backend\"><span className=\"fd-overline\">Needs</span> {backend}</span> : null}\n      {eta || effort || onRoadmap ? (\n        <span className=\"fd-soon-meta\">\n          {eta ? <span><i className=\"ph ph-calendar-blank\" aria-hidden=\"true\" /> {eta}</span> : null}\n          {effort ? <span><i className=\"ph ph-hourglass-medium\" aria-hidden=\"true\" /> {effort}</span> : null}\n          {onRoadmap ? (\n            <button type=\"button\" className=\"fd-soon-link\" onClick={onRoadmap}>\n              See the roadmap <i className=\"ph ph-arrow-right\" aria-hidden=\"true\" />\n            </button>\n          ) : null}\n        </span>\n      ) : null}\n      {allowed ? (\n        <button type=\"button\" className=\"fd-soon-view\" onClick={onBypass}>\n          <i className=\"ph ph-eye\" aria-hidden=\"true\" /> View and use it anyway\n        </button>\n      ) : null}\n    </>\n  );\n}\n\ninterface HoverCardPos {\n  left: number;\n  top?: number;\n  bottom?: number;\n  width: number;\n}\n/* The inline popover is positioned fixed from the trigger's rect, not absolutely inside it:\n   these markers sit in toolbars and table rows that scroll and clip, and an absolutely\n   positioned card gets cut off or drags the row's width around. */\nfunction useHoverCard(open: boolean): [React.RefObject<HTMLSpanElement>, HoverCardPos | null] {\n  const anchor = React.useRef<HTMLSpanElement>(null);\n  const [pos, setPos] = React.useState<HoverCardPos | null>(null);\n  React.useLayoutEffect(() => {\n    if (!open || !anchor.current) { setPos(null); return; }\n    const place = () => {\n      if (!anchor.current) return;\n      const r = anchor.current.getBoundingClientRect();\n      const W = 340, GAP = 10, PAD = 12;\n      const below = window.innerHeight - r.bottom;\n      const up = below < 190 && r.top > below;\n      setPos({\n        left: Math.max(PAD, Math.min(r.left + r.width / 2 - W / 2, window.innerWidth - W - PAD)),\n        top: up ? undefined : r.bottom + GAP,\n        bottom: up ? window.innerHeight - r.top + GAP : undefined,\n        width: W\n      });\n    };\n    place();\n    window.addEventListener(\"scroll\", place, true);\n    window.addEventListener(\"resize\", place);\n    return () => { window.removeEventListener(\"scroll\", place, true); window.removeEventListener(\"resize\", place); };\n  }, [open]);\n  return [anchor, pos];\n}\n\nexport interface ComingSoonProps {\n  /** Banner headline. Default \"Coming soon\". */\n  label?: string;\n  /** Target date, already formatted for display. */\n  eta?: string | null;\n  /** Rough size of the remaining work, e.g. \"3 weeks\". */\n  effort?: string;\n  /** What has to be built on the server for this to go live. */\n  backend?: string | null;\n  /** One line describing the feature itself. */\n  detail?: string;\n  /** Blur radius in px. Default 3 — enough to stop reading, not enough to hide the shape. */\n  blur?: number;\n  minHeight?: number | string;\n  /** \"block\" wraps a panel; \"inline\" wraps a single control (button, chip, menu item). */\n  variant?: \"block\" | \"inline\";\n  /** Renders a \"See the roadmap\" link when supplied. */\n  onRoadmap?: () => void;\n  /**\n   * Flag key identifying this feature. Supply it together with `canBypass` to offer a\n   * \"View and use it anyway\" escape — the choice is remembered for the session (sessionStorage,\n   * not localStorage: a bypass that survives days becomes the silent default).\n   */\n  bypassKey?: string;\n  /**\n   * Whether this viewer may unblur. Gate on a permission the people building the feature hold\n   * (`flags.manage`). While bypassed the feature is fully interactive, with a persistent,\n   * non-dismissible bar stating that writes go to the simulated backend.\n   */\n  canBypass?: boolean;\n  children?: React.ReactNode;\n  className?: string;\n}\n\n/**\n * A feature that is designed and working but not yet wired to the real backend: the real UI,\n * blurred, behind a construction banner, and fully inert (`pointer-events`, the `inert`\n * attribute, and `aria-hidden`). Lets people see what is coming without acting on it.\n *\n * Usually reached through `FeatureGate`, which resolves the flag state for you. Use this\n * directly only when the gating decision is already made elsewhere.\n */\nexport function ComingSoon({\n  label = \"Coming soon\",\n  eta,\n  effort,\n  backend,\n  detail,\n  blur = 3,\n  minHeight,\n  /** \"block\" wraps a panel; \"inline\" wraps a single control (button, chip, menu item). */\n  variant = \"block\",\n  onRoadmap,\n  /** Flag key. Supplying it AND `canBypass` lets the viewer unblur and use the feature. */\n  bypassKey,\n  canBypass = false,\n  children,\n  className = \"\",\n  ...rest\n}: ComingSoonProps): JSX.Element {\n  const [bypassed, setBypassed] = useBypass(bypassKey);\n  const allowed = canBypass && !!bypassKey;\n  const inline = variant === \"inline\";\n  const tip = [label, detail, backend ? \"Needs \" + backend : null, eta ? \"ETA \" + eta : null, effort]\n    .filter(Boolean).join(\" · \");\n\n  if (inline) {\n    if (allowed && bypassed) {\n      return (\n        <span className={[\"fd-soon-inline-on\", className].filter(Boolean).join(\" \")} {...rest}>\n          {children}\n          <button type=\"button\" className=\"fd-soon-cone\" title={\"Unwired — writes go to the simulated backend. \" + tip + \" Click to re-blur.\"}\n            onClick={() => setBypassed(false)} aria-label=\"Re-blur this unwired feature\">\n            <i className=\"ph ph-traffic-cone\" aria-hidden=\"true\" />\n          </button>\n        </span>\n      );\n    }\n    return (\n      <InlineSoon label={label} detail={detail} backend={backend} eta={eta} effort={effort}\n        onRoadmap={onRoadmap} allowed={allowed} onBypass={() => setBypassed(true)}\n        blur={blur} tip={tip} className={className} rest={rest}>\n        {children}\n      </InlineSoon>\n    );\n  }\n\n  if (allowed && bypassed) {\n    return (\n      <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 14 }} {...rest}>\n        <div className=\"fd-soon-bar\" role=\"status\">\n          <span className=\"fd-soon-badge\">\n            <i className=\"ph ph-traffic-cone\" aria-hidden=\"true\" />\n            Unwired feature — you are using it anyway\n          </span>\n          <span className=\"fd-soon-bar-detail\">\n            Every action here writes to the simulated backend, so nothing you do persists beyond this session.\n          </span>\n          <span className=\"fd-soon-bar-actions\">\n            {onRoadmap ? (\n              <button type=\"button\" className=\"fd-soon-link\" onClick={onRoadmap}>\n                Roadmap <i className=\"ph ph-arrow-right\" aria-hidden=\"true\" />\n              </button>\n            ) : null}\n            <button type=\"button\" className=\"fd-soon-link\" onClick={() => setBypassed(false)}>\n              <i className=\"ph ph-eye-slash\" aria-hidden=\"true\" /> Re-blur\n            </button>\n          </span>\n        </div>\n        {children}\n      </div>\n    );\n  }\n\n  return (\n    <div className={[\"fd-soon\", className].filter(Boolean).join(\" \")} style={minHeight ? { minHeight } : undefined} {...rest}>\n      <div className=\"fd-soon-under\" style={{ filter: \"blur(\" + blur + \"px) saturate(.62)\" }} {...{ inert: \"\" } as any} aria-hidden=\"true\">\n        {children}\n      </div>\n      <div className=\"fd-soon-veil\" />\n      <div className=\"fd-soon-note\" role=\"note\">\n        <SoonCard label={label} detail={detail} backend={backend} eta={eta} effort={effort}\n          onRoadmap={onRoadmap} allowed={allowed} onBypass={() => setBypassed(true)} />\n      </div>\n    </div>\n  );\n}\n\ninterface InlineSoonProps {\n  label?: string;\n  detail?: string;\n  backend?: string | null;\n  eta?: string | null;\n  effort?: string;\n  onRoadmap?: () => void;\n  allowed?: boolean;\n  onBypass?: () => void;\n  blur: number;\n  tip: string;\n  className?: string;\n  /** Leftover DOM attributes forwarded from ComingSoon's own `...rest` — untyped, same as upstream. */\n  rest: any;\n  children?: React.ReactNode;\n}\nfunction InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass, blur, tip, className, rest, children }: InlineSoonProps) {\n  const [open, setOpen] = React.useState(false);\n  const [anchor, pos] = useHoverCard(open);\n  const hoverCardRef = React.useRef<HTMLDivElement>(null);\n  // This hovercard joins the same shared layer stack as every other overlay\n  // (kits/layerStack.tsx) and derives its z-index from that: a root slot in open order, or\n  // LAYER_STEP above a real ancestor overlay when this marker is itself opened from inside\n  // one — never a fixed constant of its own, so a construction marker can never be covered.\n  const hoverLayer = useStackedLayer({ active: open, containerRef: hoverCardRef, returnFocus: false });\n  const zIndex = useLayerZIndex(hoverLayer);\n  const close = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const show = () => {\n    if (close.current) { clearTimeout(close.current); close.current = null; }\n    setOpen(true);\n  };\n  /* A short grace period so moving the pointer from the cone into the card does not dismiss it —\n     the card carries a link and a button, so it has to be reachable. */\n  const hide = () => {\n    if (close.current) clearTimeout(close.current);\n    close.current = setTimeout(() => {\n      const a = document.activeElement;\n      // Focus may have moved from the cone into the card (roadmap link, bypass button) — that is\n      // still \"inside\", so do not dismiss.\n      if (a && (a.closest(\".fd-soon-inline\") || a.closest(\".fd-soon-hovercard\"))) return;\n      setOpen(false);\n    }, 140);\n  };\n  React.useEffect(() => () => { if (close.current) clearTimeout(close.current); }, []);\n\n  return (\n    <span ref={anchor} className={[\"fd-soon\", \"fd-soon-inline\", className].filter(Boolean).join(\" \")}\n      onMouseEnter={show} onMouseLeave={hide} onFocus={show} onBlur={hide} {...rest}>\n      <span className=\"fd-soon-under\" style={{ filter: \"blur(\" + Math.min(blur, 1.1) + \"px) saturate(.66)\" }} {...{ inert: \"\" } as any} aria-hidden=\"true\">\n        {children}\n      </span>\n      <button type=\"button\" className=\"fd-soon-cone-mark\" aria-label={tip} title={tip}\n        aria-expanded={open} onFocus={show} onBlur={hide}\n        onClick={() => (open ? setOpen(false) : show())}>\n        <i className=\"ph ph-traffic-cone\" aria-hidden=\"true\" />\n      </button>\n      {open && pos ? createPortal(\n        <div ref={hoverCardRef} className=\"fd-soon-note fd-soon-hovercard\" role=\"tooltip\"\n          style={{ position: \"fixed\", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width, zIndex }}\n          onMouseEnter={show} onMouseLeave={hide}>\n          <SoonCard label={label} detail={detail} backend={backend} eta={eta} effort={effort}\n            onRoadmap={onRoadmap} allowed={allowed} onBypass={onBypass} />\n        </div>, document.body) : null}\n    </span>\n  );\n}\n\nexport function formatEta(iso?: string | null): string | null {\n  if (!iso) return null;\n  const d = new Date(iso + \"T00:00:00\");\n  if (isNaN(d.getTime())) return iso;\n  return d.toLocaleDateString(undefined, { month: \"short\", year: \"numeric\" });\n}\n\n/* Capital-initial alias: only names starting with a capital reach window.<Namespace>, so\n   consuming apps could not call formatEta and were printing raw ISO dates instead. */\nexport const FormatEta = formatEta;\n","import * as React from \"react\";\nimport { SessionKit, type Flag } from \"../../kits/session\";\nimport { useSessionContext } from \"../../kits/sessionContext\";\nimport { ComingSoon, formatEta } from \"./ComingSoon\";\nimport { useFeatureStatus } from \"../../kits/runtime\";\n\n/* Permission and feature gating. Two deliberately different failure modes:\n\n   Gate         — the user is not allowed. Say so, because silence reads as a bug and\n                  generates a support ticket. `silent` hides instead, for chrome like a\n                  toolbar button where an explanation would be noise.\n   FeatureGate  — the feature does not exist for this user, so it leaves no trace: silence,\n                  not an explanation, or you have leaked the roadmap. Its third state is the\n                  interesting one — released but not yet wired to the backend, which renders\n                  the real UI inert behind a coming-soon banner. */\n\nexport interface PermissionDeniedProps {\n  permission?: string | string[];\n  title?: string;\n  detail?: string;\n  compact?: boolean;\n  className?: string;\n}\n/** Explains a block rather than hiding it — silence reads as a bug and files a ticket. */\nexport function PermissionDenied({ permission, title, detail, compact = false, className = \"\", ...rest }: PermissionDeniedProps) {\n  const need = Array.isArray(permission) ? permission : [permission].filter(Boolean);\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")}\n      style={{ gap: 10, alignItems: \"flex-start\", padding: compact ? \"14px 16px\" : \"28px 24px\",\n        borderRadius: 10, border: \"1px dashed var(--border-strong)\", background: \"var(--surface-2)\",\n        maxWidth: 560, textAlign: \"left\" }} {...rest}>\n      <span className=\"fd-row\" style={{ gap: 8 }}>\n        <i className=\"ph ph-lock-simple\" style={{ fontSize: 16, color: \"var(--text-muted)\" }} aria-hidden=\"true\" />\n        <span className={compact ? \"fd-label-lg\" : \"fd-h3\"}>{title || \"You do not have access to this\"}</span>\n      </span>\n      <p className=\"fd-body-sm fd-secondary\" style={{ margin: 0, textWrap: \"pretty\" }}>\n        {detail || \"Your roles do not grant this. An administrator can change that from Admin → Users.\"}\n      </p>\n      {need.length ? (\n        <span className=\"fd-row\" style={{ gap: 6, flexWrap: \"wrap\" }}>\n          <span className=\"fd-overline fd-muted\">Requires</span>\n          {need.map((p) => (\n            <code key={p} className=\"fd-mono\" style={{ fontSize: 11.5, padding: \"2px 7px\", borderRadius: 5,\n              border: \"1px solid var(--border)\", background: \"var(--surface)\" }}>{p}</code>\n          ))}\n        </span>\n      ) : null}\n    </div>\n  );\n}\n\nexport interface GatePendingProps {\n  compact?: boolean;\n  className?: string;\n}\n/** Neutral placeholder for a permission that cannot be verified right now (an identity\n *  provider or auth-store outage) — never a denial, and never the gated content itself,\n *  which may have been authorized under roles that are no longer current. */\nexport function GatePending({ compact = false, className = \"\" }: GatePendingProps) {\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} role=\"status\"\n      style={{ gap: 10, alignItems: \"flex-start\", padding: compact ? \"14px 16px\" : \"28px 24px\",\n        borderRadius: 10, border: \"1px dashed var(--border-strong)\", background: \"var(--surface-2)\",\n        maxWidth: 560, textAlign: \"left\" }}>\n      <span className=\"fd-row\" style={{ gap: 8 }}>\n        <i className=\"ph ph-arrows-clockwise\" style={{ fontSize: 16, color: \"var(--text-muted)\" }} aria-hidden=\"true\" />\n        <span className={compact ? \"fd-label-lg\" : \"fd-h3\"}>Reconnecting…</span>\n      </span>\n      <p className=\"fd-body-sm fd-secondary\" style={{ margin: 0, textWrap: \"pretty\" }}>\n        Your access can't be verified right now. This will resolve on its own once the\n        connection is back.\n      </p>\n    </div>\n  );\n}\n\nexport interface GateProps {\n  /** All of these must be held. */\n  perm?: string | string[];\n  /** At least one of these must be held. */\n  anyOf?: string[];\n  role?: string | string[];\n  /** Render nothing instead of an explanation — for chrome like toolbar buttons. Also\n   *  governs the pending case: a `silent` gate renders nothing while pending too, rather\n   *  than the default `GatePending` placeholder. */\n  silent?: boolean;\n  fallback?: React.ReactNode;\n  /** Rendered while `SessionContextValue.pending` is true, in place of the default\n   *  `GatePending` placeholder. Never falls back to `fallback` or to evaluating\n   *  `perm`/`anyOf`/`role` — a pending session's `can`/`canAny`/`hasRole` are not\n   *  evaluated at all, since neither a grant nor a denial would be truthful. */\n  pendingFallback?: React.ReactNode;\n  compact?: boolean;\n  children?: React.ReactNode;\n}\n/** Permission gate. Denied by default shows PermissionDenied. Pending (the session's\n *  permissions can't be verified right now) shows GatePending instead — never a denial,\n *  and never the gated content itself. Reads the injected session (see\n *  kits/sessionContext.tsx) — re-renders whenever that context's value changes, so no\n *  separate subscription is needed here. */\nexport function Gate({ perm, anyOf, role, silent = false, fallback, pendingFallback, compact = false, children }: GateProps): React.ReactNode {\n  const { can, canAny, hasRole, pending } = useSessionContext();\n  if (pending) {\n    if (pendingFallback !== undefined) return pendingFallback;\n    if (silent) return null;\n    return <GatePending compact={compact} />;\n  }\n  let ok = true;\n  if (perm) ok = ok && can(perm);\n  if (anyOf) ok = ok && canAny(anyOf);\n  if (role) ok = ok && (Array.isArray(role) ? role.some(hasRole) : hasRole(role));\n  if (ok) return children;\n  if (fallback !== undefined) return fallback;\n  if (silent) return null;\n  return <PermissionDenied permission={perm || anyOf} compact={compact} />;\n}\n\nexport interface FeatureGateProps {\n  flag: string;\n  fallback?: React.ReactNode;\n  children?: React.ReactNode;\n  /** Renders a \"See the roadmap\" link inside the ComingSoon banner when supplied. */\n  onRoadmap?: () => void;\n  /** Blur radius in px for the underlying, inert UI. Passed through to ComingSoon. */\n  blur?: number;\n  minHeight?: number | string;\n  /** Overrides the ComingSoon banner headline. Defaults to the flag's own label (or a generic one). */\n  label?: string;\n  /** \"block\" wraps a panel; \"inline\" wraps a single control (button, chip, menu item). Default \"block\". */\n  variant?: \"block\" | \"inline\";\n  /** When false, an incomplete-in-live-mode feature renders `fallback` instead of the ComingSoon banner. Default true. */\n  preview?: boolean;\n  /**\n   * Permission that lets the viewer bypass the ComingSoon veil and use the feature early.\n   * Default `\"flags.manage\"`. Pass `null` to declare the gate NOT bypassable by anyone,\n   * regardless of permissions — the veil still renders, but no \"View and use it anyway\"\n   * control appears, and a bypass stored from before this call site turned `null` is\n   * ignored rather than honored. Use this for a gate whose content is itself the problem\n   * (e.g. fixture/demo data standing in for another record), where letting even an\n   * administrator click through would show something untrue, not just something unfinished.\n   */\n  bypassPerm?: string | null;\n}\n/** Feature gate. ALWAYS silent when off — an unreleased feature should leave no trace. */\nexport function FeatureGate({ flag, fallback = null, children, onRoadmap, blur, minHeight, label,\n                              variant = \"block\", preview = true, bypassPerm = \"flags.manage\" }: FeatureGateProps): React.ReactNode {\n  // Flag membership (enabled/rollout/role targeting) is a separate axis from the signed-in\n  // session and stays on SessionKit directly — it is not part of the injected session\n  // contract this card wires up. useSession() re-renders this on a flag mutation.\n  SessionKit.useSession();\n  const { can, pending } = useSessionContext();\n  const rt = useFeatureStatus(flag);\n  // Rollout, roles and per-user overrides — the only thing the flag record decides.\n  if (!SessionKit.isEnabled(flag)) return fallback;\n  // Test mode: the whole build is understood to be simulated, so nothing is obstructed.\n  if (rt.complete || rt.mode === \"test\") return children;\n  // Incomplete in live mode. `preview={false}` opts a call site out — use it where a blurred\n  // panel would be worse than nothing, e.g. a single toolbar button.\n  if (!preview) return fallback;\n  const f: Partial<Flag> = SessionKit.findFlag(flag) || {};\n  const missing = rt.missing || [];\n  // MP-253: while the session is pending (identity-provider/auth-store outage), the bypass\n  // permission can't be verified either — a stale grant would let someone click through the\n  // veil during exactly the window that grant might no longer be true. Fails closed to \"not\n  // bypassable\" and never calls `can()`, the same \"unknown, not denied\" rule Gate applies to\n  // perm/anyOf/role. `bypassPerm === null` is the separate, explicit \"nobody, ever\"\n  // declaration — distinct from the default/omitted case, which falls through to the\n  // flags.manage permission check below once the session is no longer pending.\n  const canBypass = pending ? false : bypassPerm === null ? false : (!bypassPerm || can(bypassPerm));\n  return (\n    <ComingSoon label={label || (variant === \"inline\" ? f.label || \"Not wired yet\" : \"Designed — backend not wired yet\")}\n      detail={f.description}\n      backend={f.backend || (missing.length\n        ? missing.length + \" endpoint\" + (missing.length === 1 ? \"\" : \"s\") + \" not yet served: \" + missing.join(\", \")\n        : null)}\n      variant={variant}\n      eta={formatEta(f.eta)} effort={f.effort} blur={blur} minHeight={minHeight} onRoadmap={onRoadmap}\n      bypassKey={flag} canBypass={canBypass}>\n      {children}\n    </ComingSoon>\n  );\n}\n\n/** Inline \"why is this disabled\" affordance for buttons that must stay visible.\n *  MP-253: while the session is pending, permission is unknown, not denied — the same rule\n *  Gate applies. Rendering the control live would risk a stale-role grant; rendering the\n *  \"Requires X\" denial would assert a permission gap that might not be real. So it dims the\n *  control (never `can()`), with a title that says the state is unverified rather than\n *  claiming a specific permission is missing. */\nexport function PermissionHint({ perm, children }: { perm: string | string[]; children?: React.ReactNode }): React.ReactNode {\n  const { can, pending } = useSessionContext();\n  if (pending) {\n    return (\n      <span title=\"Access can't be verified right now\" style={{ display: \"inline-flex\", opacity: 0.45, cursor: \"not-allowed\" }} aria-disabled=\"true\">\n        <span style={{ pointerEvents: \"none\" }}>{children}</span>\n      </span>\n    );\n  }\n  if (can(perm)) return children;\n  return (\n    <span title={\"Requires \" + (Array.isArray(perm) ? perm.join(\", \") : perm)}\n      style={{ display: \"inline-flex\", opacity: 0.45, cursor: \"not-allowed\" }} aria-disabled=\"true\">\n      <span style={{ pointerEvents: \"none\" }}>{children}</span>\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport { RuntimeKit, useRuntimeMode } from \"../../kits/runtime\";\nimport { InlinePanelSurface, useInlinePanel } from \"../actions/inlinePanel\";\n\n/* The build-mode control. Lives in the header where the request log used to, because they are\n   two views of one fact: what this build is talking to.\n\n   live  a lightning bolt. The default, and what a user would see. Clicking explains why so much\n         is under construction and offers test mode.\n   test  a flask with a live request count. Everything is usable, nothing is obstructed, and the\n         count makes it impossible to forget that every response is simulated. The same popover\n         carries the request log and the way back.\n\n   Admin-only by call site (`canToggle`) — a member switching to test mode would be evaluating a\n   product that does not exist. When they cannot toggle, the control is not rendered at all\n   rather than shown disabled: the mode is not their concern. */\n\nexport interface ModeSwitchProps {\n  /** Render nothing unless true. Pass SessionKit.can(\"flags.manage\"). */\n  canToggle?: boolean;\n  /** Simulated requests this session — shown as a count badge in test mode. */\n  requestCount?: number;\n  onClearLog?: () => void;\n  /** Request-log body, rendered inside the popover in test mode only. */\n  renderLog?: () => React.ReactNode;\n  onOpenSpec?: () => void;\n  summary?: { total: number; complete: number; incomplete: number; endpointsWired: number };\n}\n/** Header control: lightning in live mode, flask + request count in test mode. */\nexport function ModeSwitch({ canToggle = false, requestCount = 0, onClearLog, renderLog, onOpenSpec, summary }: ModeSwitchProps): React.ReactNode {\n  const mode = useRuntimeMode();\n  const panel = useInlinePanel<HTMLSpanElement>();\n  const { open, setOpen, ref } = panel;\n  if (!canToggle) return null;\n\n  const test = mode === \"test\";\n  const s = summary || RuntimeKit.summary();\n  const go = (next: \"live\" | \"test\") => { RuntimeKit.setMode(next); setOpen(false); };\n\n  return (\n    <span style={{ display: \"inline-flex\" }} ref={ref}>\n      <button type=\"button\" onClick={() => setOpen(!open)}\n        aria-label={test ? \"Test mode — \" + requestCount + \" simulated requests\" : \"Live mode\"}\n        aria-expanded={open}\n        title={test ? \"Test mode — every response is simulated. Click to inspect requests or return to live mode.\"\n                    : \"Live mode — incomplete features are shown under construction. Click for test mode.\"}\n        className={\"fd-mode-btn\" + (test ? \" is-test\" : \"\") + (open ? \" is-open\" : \"\")}>\n        <i className={\"ph \" + (test ? \"ph-flask\" : \"ph-lightning\")} style={{ fontSize: 17 }} />\n        {test && requestCount ? (\n          <span key={requestCount} className=\"fd-mono fd-mode-count\">{requestCount > 99 ? \"99+\" : requestCount}</span>\n        ) : null}\n      </button>\n\n      <InlinePanelSurface panel={panel} align=\"right\" offset={8} width={400} className=\"fd-mode-pop\" label={test ? \"Test mode\" : \"Live mode\"}>\n      <span className=\"fd-row\" style={{ gap: 10, padding: \"12px 14px\", borderBottom: \"1px solid var(--border)\" }}>\n        <span className={\"fd-badge \" + (test ? \"fd-badge-warning\" : \"fd-badge-neutral\")}>\n          <i className={\"ph \" + (test ? \"ph-flask\" : \"ph-lightning\")} aria-hidden=\"true\" />\n          {test ? \"Test mode\" : \"Live mode\"}\n        </span>\n        {test ? <span className=\"fd-body-sm fd-muted fd-mono\">{requestCount} simulated request{requestCount === 1 ? \"\" : \"s\"}</span> : null}\n        <span style={{ flex: 1 }} />\n        {test && onClearLog ? (\n          <button type=\"button\" className=\"fd-soon-link\" onClick={onClearLog}>Clear</button>\n        ) : null}\n      </span>\n\n      <span style={{ display: \"block\", padding: \"12px 14px\", borderBottom: \"1px solid var(--border)\" }}>\n        <span className=\"fd-body-sm fd-secondary\" style={{ display: \"block\", textWrap: \"pretty\" }}>\n          {test\n            ? \"Every feature is usable and nothing is obstructed, but no response comes from a real service — nothing you do here persists. Use this to review and demo the design.\"\n            : \"This is what a user would see today. \" + s.incomplete + \" of \" + s.total + \" features depend on backend work that is not wired yet, so they render under construction.\"}\n        </span>\n        <span className=\"fd-row\" style={{ gap: 8, marginTop: 10, flexWrap: \"wrap\" }}>\n          <span className=\"fd-body-sm fd-muted fd-mono\">\n            {s.endpointsWired} endpoint{s.endpointsWired === 1 ? \"\" : \"s\"} live · {s.complete}/{s.total} features complete\n          </span>\n          {onOpenSpec ? (\n            <>\n              <span style={{ flex: 1 }} />\n              <button type=\"button\" className=\"fd-soon-link\" onClick={() => { setOpen(false); onOpenSpec(); }}>\n                API spec <i className=\"ph ph-arrow-right\" aria-hidden=\"true\" />\n              </button>\n            </>\n          ) : null}\n        </span>\n      </span>\n\n      <span className=\"fd-mode-choice\">\n        <button type=\"button\" className={\"fd-mode-opt\" + (!test ? \" is-on\" : \"\")} onClick={() => go(\"live\")}>\n          <i className=\"ph ph-lightning\" aria-hidden=\"true\" />\n          <span className=\"fd-mode-opt-text\">\n            <span className=\"fd-mode-opt-title\">Live mode</span>\n            <span className=\"fd-mode-opt-desc\">Incomplete features under construction</span>\n          </span>\n          {!test ? <i className=\"ph ph-check\" aria-hidden=\"true\" /> : null}\n        </button>\n        <button type=\"button\" className={\"fd-mode-opt\" + (test ? \" is-on\" : \"\")} onClick={() => go(\"test\")}>\n          <i className=\"ph ph-flask\" aria-hidden=\"true\" />\n          <span className=\"fd-mode-opt-text\">\n            <span className=\"fd-mode-opt-title\">Test mode</span>\n            <span className=\"fd-mode-opt-desc\">Everything usable, all data simulated</span>\n          </span>\n          {test ? <i className=\"ph ph-check\" aria-hidden=\"true\" /> : null}\n        </button>\n      </span>\n\n      {test && renderLog ? (\n        <span style={{ display: \"block\", maxHeight: 340, overflowY: \"auto\", borderTop: \"1px solid var(--border)\" }}>\n          {renderLog()}\n        </span>\n      ) : null}\n      </InlinePanelSurface>\n    </span>\n  );\n}\n\n/* A persistent strip for test mode. The header icon is easy to stop noticing; a bar at the top of\n   the app is not. Rendered by the shell, above everything. */\nexport interface TestModeBarProps { onExit?: () => void }\n/** Persistent strip shown only in test mode. Render at the top of the app frame. */\nexport function TestModeBar({ onExit }: TestModeBarProps): React.ReactNode {\n  const mode = useRuntimeMode();\n  if (mode !== \"test\") return null;\n  return (\n    <div className=\"fd-testbar\" role=\"status\">\n      <span className=\"fd-badge fd-badge-warning\">\n        <i className=\"ph ph-flask\" aria-hidden=\"true\" />\n        Test mode\n      </span>\n      <span className=\"fd-testbar-detail\">\n        Every feature is unlocked and every response is simulated — nothing here persists.\n      </span>\n      <button type=\"button\" className=\"fd-soon-link\" onClick={() => (onExit ? onExit() : RuntimeKit.setMode(\"live\"))}>\n        <i className=\"ph ph-lightning\" aria-hidden=\"true\" /> Back to live mode\n      </button>\n    </div>\n  );\n}\n","import * as React from \"react\";\n\n/**\n * The canonical channel taxonomy. One icon and one hue per medium, used\n * everywhere a channel is named — table cells, charts, legends, filters, the\n * client view. The colour is part of the label, not decoration.\n *\n * Hue families: blues = large format, violets = moving, ambers = paper,\n * roses = direct, slate = digital.\n *\n * `physical` is a descriptive family property, NOT a weight. The model spec\n * (v2026-07-21 §4) assigns each channel its own weight from four factor scores —\n * 23 to 50, with persistence separating the tiers. Read weights from\n * window.CHANNEL_WEIGHT / MODEL.weights, never from this flag.\n */\n/* Channel weights, spec v2026-07-21 §4: weight = (visual + invasiveness) x persistence\n   x social + 20. Duplicated here (not read from window.MODEL) so the component works in\n   any consuming project, with or without the planner kit loaded. */\nexport const CHANNEL_WEIGHTS: Record<string, number> = {\n  \"OOH\": 50, \"DOOH\": 50, \"Transit\": 48, \"Posters\": 44, \"Mobile Billboards\": 34,\n  \"Flyers\": 33, \"SMS\": 26, \"Email\": 25.5, \"Print\": 24.5,\n  \"Website (takeover)\": 24.5, \"Website (CPM)\": 23,\n  \"Street Team\": 33, \"Print-Ribbon\": 24.5          // aliases, spec §9\n};\nconst W = CHANNEL_WEIGHTS;\n\n/** Spec §4 weight for a channel name, resolving §9 aliases. 0 = unmodeled (contributes no CRP). */\nexport function channelWeightOf(channel: string): number {\n  const k = String(channel || \"\").trim();\n  return W[k] != null ? W[k] : 0;\n}\n/* Capital-initial alias: only names starting with a capital reach window.<Namespace>, so a\n   consuming project destructuring the lowercase form off the bundle would get undefined. */\nexport const ChannelWeightOf = channelWeightOf;\n\nexport interface ChannelMetaRecord {\n  label: string;\n  /** Phosphor icon name, without the `ph-` prefix. */\n  icon: string;\n  /** CSS custom-property reference, e.g. \"var(--ch-ooh)\". */\n  color: string;\n  /** Hue family: Large format | Moving | Paper | Direct | Digital | Other. */\n  family: string;\n  /** Descriptive family property, not a weight. Channel weights live in MODEL.weights (spec §4). */\n  physical: boolean;\n  name?: string;\n}\n\n/**\n * The canonical channel taxonomy — one icon and one hue per medium. Every screen\n * that names a channel reads from this, so a colour always means the same thing.\n */\nexport const CHANNELS: Record<string, ChannelMetaRecord> = {\n  \"OOH\":                { label: \"OOH\",       icon: \"flag-banner\",        color: \"var(--ch-ooh)\",     family: \"Large format\", physical: true },\n  \"DOOH\":               { label: \"DOOH\",      icon: \"television-simple\",  color: \"var(--ch-dooh)\",    family: \"Large format\", physical: true },\n  \"Transit\":            { label: \"Transit\",   icon: \"bus\",                color: \"var(--ch-transit)\", family: \"Moving\",       physical: true },\n  \"Mobile Billboards\":  { label: \"Mobile\",    icon: \"truck\",              color: \"var(--ch-mobile)\",  family: \"Moving\",       physical: true },\n  \"Print\":              { label: \"Print\",     icon: \"newspaper\",          color: \"var(--ch-print)\",   family: \"Paper\",        physical: true },\n  \"Posters\":            { label: \"Posters\",   icon: \"push-pin\",           color: \"var(--ch-posters)\", family: \"Paper\",        physical: true },\n  \"Flyers\":             { label: \"Flyers\",    icon: \"note\",               color: \"var(--ch-flyers)\",  family: \"Paper\",        physical: true },\n  \"Email\":              { label: \"Email\",     icon: \"envelope-simple\",    color: \"var(--ch-email)\",   family: \"Direct\",       physical: false },\n  \"SMS\":                { label: \"SMS\",       icon: \"chat-centered-text\", color: \"var(--ch-sms)\",     family: \"Direct\",       physical: false },\n  \"Website (CPM)\":      { label: \"Web · CPM\", icon: \"browser\",            color: \"var(--ch-web)\",     family: \"Digital\",      physical: false },\n  \"Website (takeover)\": { label: \"Web · takeover\", icon: \"browsers\",      color: \"var(--ch-web)\",     family: \"Digital\",      physical: false },\n  \"Web\":                { label: \"Web\",       icon: \"browser\",            color: \"var(--ch-web)\",     family: \"Digital\",      physical: false }\n};\n\nconst FALLBACK: ChannelMetaRecord = { label: \"Other\", icon: \"tag\", color: \"var(--ch-other)\", family: \"Other\", physical: false };\n\n/** Resolve any channel spelling (exact, lowercase key, partial) to its record. */\nexport function ChannelMeta(name?: string | null): ChannelMetaRecord {\n  if (!name) return FALLBACK;\n  if (CHANNELS[name]) return { ...CHANNELS[name], name };\n  const k = String(name).toLowerCase().trim();\n  const hit = Object.keys(CHANNELS).find((key) => key.toLowerCase() === k);\n  if (hit) return { ...CHANNELS[hit], name: hit };\n  // partial: \"website\", \"outdoor\", \"poster\"\n  const loose = Object.keys(CHANNELS).find((key) => key.toLowerCase().startsWith(k) || k.startsWith(key.toLowerCase()));\n  if (loose) return { ...CHANNELS[loose], name: loose };\n  if (/web|site|display|banner/.test(k)) return { ...CHANNELS[\"Web\"], name };\n  return { ...FALLBACK, label: String(name), name };\n}\n\nexport interface ChannelTagProps extends React.HTMLAttributes<HTMLSpanElement> {\n  /** Channel name — \"OOH\", \"Website (CPM)\", \"transit\"… */\n  channel?: string | null;\n  size?: \"sm\" | \"md\";\n  /** Hide the text and show icon only (dense tables). */\n  showLabel?: boolean;\n  /** Render as a bare colour swatch, for chart legends. */\n  dot?: boolean;\n  /** Append the channel's spec §4 weight after the label. */\n  weight?: boolean;\n  className?: string;\n}\n\n/**\n * The standard way to render a channel name. Icon + hue + label, in a tinted\n * chip. Use `dot` for a bare colour swatch in dense legends.\n */\nexport function ChannelTag({ channel, size = \"md\", showLabel = true, dot = false, weight = false, className = \"\", ...rest }: ChannelTagProps) {\n  const m = ChannelMeta(channel);\n  const wt = channelWeightOf(channel || \"\");\n  if (dot) {\n    return (\n      <span className={[\"fd-chan-dot\", className].filter(Boolean).join(\" \")} title={m.name} style={{ background: m.color }} {...rest} />\n    );\n  }\n  return (\n    <span className={[\"fd-chan\", size === \"sm\" ? \"fd-chan-sm\" : \"\", className].filter(Boolean).join(\" \")}\n      title={m.name + \" · \" + m.family + (wt ? \" · weight \" + wt : \" · unmodeled, 0 CRP\")}\n      style={{ \"--chan\": m.color } as React.CSSProperties} {...rest}>\n      <i className={\"ph ph-\" + m.icon} aria-hidden=\"true\" />\n      {showLabel ? <span className=\"fd-chan-label\">{m.label}</span> : null}\n      {weight ? <span className=\"fd-chan-weight\">{wt || 0}</span> : null}\n    </span>\n  );\n}\n","\ninterface Band {\n  key: \"weak\" | \"adequate\" | \"strong\" | \"dominant\";\n  label: string;\n  n: number;\n  range: string;\n}\n\nconst BANDS: Band[] = [\n  { key: \"weak\", label: \"Weak\", n: 1, range: \"< 50\" },\n  { key: \"adequate\", label: \"Adequate\", n: 2, range: \"50–100\" },\n  { key: \"strong\", label: \"Strong\", n: 3, range: \"100–200\" },\n  { key: \"dominant\", label: \"Dominant\", n: 4, range: \"200+\" }\n];\n\n/**\n * The plan's shape: how funded campuses spread across the four CSI bands.\n * Each campus is one labelled block stacked in its band's column, so the\n * distribution reads as a silhouette before any number is parsed. Columns are\n * clickable to filter the school mix by band.\n */\nexport interface SaturationDistributionCampus {\n  name: string;\n  /** Short label shown inside the block, e.g. \"Michigan State\" */\n  short?: string;\n  band: \"weak\" | \"adequate\" | \"strong\" | \"dominant\";\n  crp?: number;\n}\nexport interface SaturationDistributionProps {\n  campuses: SaturationDistributionCampus[];\n  /** Band of the plan-level floor score. Renders the floor explainer strip. */\n  floorBand?: \"weak\" | \"adequate\" | \"strong\" | \"dominant\";\n  /** The plan floor figure, e.g. 157.2 */\n  floorScore?: number | string;\n  onSelectBand?: (band: string | null) => void;\n  selectedBand?: string | null;\n  loading?: boolean;\n  className?: string;\n}\n\nexport function SaturationDistribution({ campuses = [], floorBand, floorScore, onSelectBand, selectedBand, loading = false, className = \"\" }: SaturationDistributionProps) {\n  const grouped = BANDS.map((b) => ({ ...b, items: campuses.filter((c) => c.band === b.key) }));\n  const tallest = Math.max(1, ...grouped.map((g) => g.items.length));\n  const floor = BANDS.find((b) => b.key === floorBand) || BANDS[0];\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 16 }}>\n      {/* `minmax(0,1fr)`, not bare `1fr`: an `fr` track's minimum is `auto` by default,\n          which is the widest MIN-CONTENT of anything inside it — and a nowrap pill's\n          min-content equals its own full text width (see the pill's own comment below).\n          Four columns of campus names easily add up to more than an `fd-card` has at\n          320px, and a bare `1fr` track refuses to shrink the grid past that, so the\n          whole grid — and the Card clipping it — quietly grows past the viewport\n          instead. `minmax(0,1fr)` lets the track go to zero before it forces the page\n          wide; each button's own `minWidth: 0` below does the matching job for the grid\n          ITEM (a grid/flex child keeps an automatic `min-width: auto` of its own\n          regardless of its track's minimum, so both have to be zeroed together). */}\n      <div style={{ display: \"grid\", gridTemplateColumns: \"repeat(4,minmax(0,1fr))\", gap: 12, alignItems: \"end\" }}>\n        {grouped.map((g) => {\n          const mark = \"var(--csi-\" + g.n + \"-mark)\";\n          const active = selectedBand === g.key;\n          return (\n            <button key={g.key} type=\"button\" onClick={onSelectBand ? () => onSelectBand(active ? null : g.key) : undefined}\n              style={{ display: \"flex\", flexDirection: \"column\", justifyContent: \"flex-end\", gap: 10, padding: 12, border: \"1px solid \" + (active ? \"var(--border-strong)\" : \"var(--border)\"), borderRadius: \"var(--r-lg)\", background: active ? \"var(--surface-2)\" : \"var(--surface)\", cursor: onSelectBand ? \"pointer\" : \"default\", textAlign: \"left\", minHeight: 190, minWidth: 0, transition: \"background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)\" }}>\n              <span style={{ display: \"flex\", flexDirection: \"column-reverse\", gap: 4, minHeight: tallest * 24, minWidth: 0 }}>\n                {loading\n                  ? Array.from({ length: 3 }).map((_, i) => <span key={i} className=\"fd-skel\" style={{ height: 16, borderRadius: 4 }} />)\n                  : g.items.map((c) => (\n                    // `overflow: hidden` + `white-space: nowrap` only clips once the span\n                    // actually HAS a bounded width to clip against (see the grid/flex\n                    // `minWidth: 0` chain above) — `textOverflow: ellipsis` then makes\n                    // that clip readable instead of a hard cut mid-letter; the full name\n                    // is still one hover away via `title`.\n                    <span key={c.name} title={c.name + \" · \" + c.crp}\n                      style={{ height: 18, borderRadius: 4, background: \"var(--csi-\" + g.n + \"-fill)\", border: \"1px solid var(--csi-\" + g.n + \"-edge)\", color: \"var(--csi-\" + g.n + \"-text)\", display: \"flex\", alignItems: \"center\", padding: \"0 7px\", fontSize: 10, fontWeight: 700, overflow: \"hidden\", whiteSpace: \"nowrap\", textOverflow: \"ellipsis\" }}>\n                      {c.short || c.name}\n                    </span>\n                  ))}\n              </span>\n              <span className=\"fd-row\" style={{ gap: 8, alignItems: \"baseline\" }}>\n                <span className=\"fd-num-hero\" style={{ fontSize: 30, color: g.items.length ? \"var(--text)\" : \"var(--text-disabled)\" }}>\n                  {loading ? \"–\" : g.items.length}\n                </span>\n                <span className=\"fd-meter\" style={{ gap: 2, color: mark }} aria-hidden=\"true\">\n                  {[1, 2, 3, 4].map((i) => <span key={i} className={\"fd-meter-seg\" + (i <= g.n ? \" is-on\" : \"\")} style={{ width: 4, height: 9 }} />)}\n                </span>\n              </span>\n              <span className=\"fd-stack\" style={{ gap: 1 }}>\n                <span className=\"fd-label-lg\">{g.label}</span>\n                <span className=\"fd-body-sm fd-muted\" style={{ fontSize: 11.5 }}>CRP {g.range}</span>\n              </span>\n            </button>\n          );\n        })}\n      </div>\n      {floorBand ? (\n        <div className=\"fd-row\" style={{ gap: 10, padding: \"12px 14px\", borderRadius: \"var(--r-md)\", background: \"var(--surface-2)\", border: \"1px solid var(--border)\", flexWrap: \"wrap\" }}>\n          <span className=\"fd-meter\" style={{ gap: 2, color: \"var(--csi-\" + floor.n + \"-mark)\" }} aria-hidden=\"true\">\n            {[1, 2, 3, 4].map((i) => <span key={i} className={\"fd-meter-seg\" + (i <= floor.n ? \" is-on\" : \"\")} style={{ width: 5, height: 12 }} />)}\n          </span>\n          <span className=\"fd-body-sm fd-secondary\" style={{ flex: 1, minWidth: 240 }}>\n            <strong style={{ color: \"var(--text)\" }}>Plan floor {floorScore}</strong> — the saturation about 70% of students in this plan reach or exceed. Enrollment-weighted 30th percentile, not an average.\n          </span>\n        </div>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { ChannelTag } from \"./ChannelMeta\";\n\n/**\n * Realized media mix against the strategic target, one row per channel.\n * Realized is a solid tone bar, target a striped marker on the same row, and the\n * realized share is labelled directly beside them — the gap is the story, so it\n * never hides in a legend.\n */\nexport interface MixGapRow {\n  channel: string;\n  /** Target share, percent */\n  target: number;\n  /** Realized share, percent */\n  realized: number;\n  /** Why the gap exists, e.g. \"Limited inventory at target campuses\" — shown in the hover tooltip. */\n  note?: string;\n}\nexport interface MixGapProps {\n  rows: MixGapRow[];\n  loading?: boolean;\n  className?: string;\n}\n\n/**\n * Row geometry, in px. The realized bar sits centred in the track; the target\n * marker spans the full track so it stands proud of the bar above and below.\n * `labelGutter` is the room reserved at the track's right edge: the axis ends\n * that far short of it, so the largest bar or target always leaves space for\n * its own label, which is placed after whichever of the two ends further right.\n * 50 = half the target marker (3) + the label gap (6) + a one-decimal label such as\n * \"100.0%\" at 12px (~40); 40 clipped a measured \"34.6%\" by 3.7px.\n */\nexport const MIX_GAP_LAYOUT = {\n  trackHeight: 30,\n  barHeight: 20,\n  targetWidth: 6,\n  labelGap: 6,\n  labelGutter: 50,\n} as const;\n\n/** The target marker's diagonal stripe — shared with the legend swatch so the two never drift. */\nexport const MIX_GAP_TARGET_STRIPE =\n  \"repeating-linear-gradient(135deg, var(--n-600) 0 2px, var(--n-300) 2px 4px)\";\n\n/** Horizontal offset of `value` on the row's axis: the axis spans the track minus the label gutter. */\nexport function mixGapOffset(value: number, max: number): string {\n  return `calc((100% - ${MIX_GAP_LAYOUT.labelGutter}px) * ${value / max})`;\n}\n\nexport function MixGap({ rows = [], loading = false, className = \"\" }: MixGapProps) {\n  const max = Math.max(1, ...rows.flatMap((r) => [r.target, r.realized]));\n  const [hover, setHover] = React.useState<string | null>(null);\n  const toneOf = (gap: number) => gap >= -1 ? \"ok\" : gap >= -4 ? \"warn\" : \"danger\";\n  const TONE: Record<string, string> = { ok: \"var(--ok-solid)\", warn: \"var(--warn-solid)\", danger: \"var(--danger-solid)\" };\n  const { trackHeight, barHeight, targetWidth, labelGap } = MIX_GAP_LAYOUT;\n  const barTop = (trackHeight - barHeight) / 2;\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 4 }}>\n      <div className=\"fd-row\" style={{ gap: 16, justifyContent: \"flex-end\", paddingBottom: 6, flexWrap: \"wrap\" }}>\n        {[[\"On target\", TONE.ok], [\"Close\", TONE.warn], [\"Short\", TONE.danger]].map(([l, c]) => (\n          <span key={l} className=\"fd-row fd-body-sm fd-muted\" style={{ gap: 6 }}>\n            <span style={{ width: 14, height: 9, borderRadius: 2, background: c }} />{l}\n          </span>\n        ))}\n        <span className=\"fd-row fd-body-sm fd-muted\" style={{ gap: 6 }}>\n          <span data-mixgap-legend-target=\"\" style={{ width: targetWidth, height: 16, borderRadius: 1, background: MIX_GAP_TARGET_STRIPE }} />Target\n        </span>\n      </div>\n      {rows.map((r) => {\n        const gap = r.realized - r.target;\n        const tone = toneOf(gap);\n        const tip = \"Realized \" + r.realized + \"% vs \" + r.target + \"% target\" +\n          (gap < -1 ? \" · \" + Math.abs(gap).toFixed(0) + \" pts short\" : gap > 1 ? \" · \" + gap.toFixed(0) + \" pts over\" : \" · on target\") +\n          (r.note ? \" — \" + r.note : \"\");\n        // The label clears both the bar's end and the target marker's right edge,\n        // whichever reaches further — so it is always to the right of the target.\n        const labelLeft = r.realized > r.target\n          ? `calc(${mixGapOffset(r.realized, max)} + ${labelGap}px)`\n          : `calc(${mixGapOffset(r.target, max)} + ${targetWidth / 2 + labelGap}px)`;\n        return (\n          <div key={r.channel} className=\"fd-row\" style={{ gap: 12, padding: \"7px 0\", borderBottom: \"1px solid var(--border)\" }}\n            onMouseEnter={() => setHover(r.channel)} onMouseLeave={() => setHover(null)}>\n            <span style={{ width: 128, flex: \"none\" }}><ChannelTag channel={r.channel} size=\"sm\" /></span>\n            <span style={{ position: \"relative\", flex: 1, height: trackHeight, minWidth: 120 }}>\n              {loading ? <span className=\"fd-skel\" style={{ position: \"absolute\", left: 0, right: 0, top: barTop, height: barHeight, borderRadius: 3 }} /> : <>\n                <span data-mixgap-bar=\"\" style={{ position: \"absolute\", left: 0, top: barTop, height: barHeight, width: mixGapOffset(r.realized, max), background: TONE[tone], borderRadius: \"2px 3px 3px 2px\", transition: \"width var(--dur-slow) var(--ease), background var(--dur-base) var(--ease)\" }} />\n                <span data-mixgap-target=\"\" style={{ position: \"absolute\", left: `calc(${mixGapOffset(r.target, max)} - ${targetWidth / 2}px)`, top: 0, width: targetWidth, height: trackHeight, background: MIX_GAP_TARGET_STRIPE, borderRadius: 1 }} />\n                <span data-mixgap-label=\"\" className=\"fd-num\" style={{ position: \"absolute\", left: labelLeft, top: \"50%\", transform: \"translateY(-50%)\", fontSize: 12, color: \"var(--text-muted)\", whiteSpace: \"nowrap\" }}>{r.realized}%</span>\n                {hover === r.channel ? (\n                  <span className=\"fd-tooltip\" role=\"tooltip\" style={{ position: \"absolute\", left: 0, right: \"auto\", bottom: trackHeight + 4, maxWidth: \"min(340px, 100%)\", whiteSpace: \"normal\", textAlign: \"left\", width: \"max-content\" }}>{tip}</span>\n                ) : null}\n              </>}\n            </span>\n          </div>\n        );\n      })}\n    </div>\n  );\n}\n","import { channelWeightOf, ChannelMeta, ChannelTag } from \"./ChannelMeta\";\n\nconst money = (n: number) => \"$\" + Math.round(n).toLocaleString();\n\n/**\n * How one campus's CRP was built, channel by channel, with the surround-sound\n * bonus as its own hatched segment. This is the most valuable visualization in\n * the planner: it answers why a campus scores what it scores and where the\n * headroom is.\n */\nexport interface ChannelContributionChannel {\n  name: string;\n  /** CRP contributed by this channel */\n  crp: number;\n  /** Formatted spend, e.g. \"$12,400\" */\n  spend?: string;\n  /** Physical formats (OOH, transit, posters) carry roughly 2x the weight of feed-based digital. */\n  physical?: boolean;\n  color?: string;\n}\nexport interface ChannelContributionProps {\n  channels: ChannelContributionChannel[];\n  /** Surround-sound bonus actually earned, as a percent of the channel base. */\n  bonusPct?: number;\n  /** The model's ceiling. Defaults to 40. */\n  bonusMax?: number;\n  /** Override the computed total when the engine's figure differs from base + bonus. */\n  total?: number;\n  loading?: boolean;\n  showTable?: boolean;\n  className?: string;\n}\n\nexport function ChannelContribution({\n  channels = [], bonusPct = 0, bonusMax = 40, total, loading = false, showTable = true, className = \"\"\n}: ChannelContributionProps) {\n  const base = channels.reduce((s, c) => s + c.crp, 0);\n  const bonus = base * (bonusPct / 100);\n  const grand = total !== undefined ? total : base + bonus;\n  const pct = (v: number) => (grand ? (v / grand) * 100 : 0);\n  const spendTotal = channels.reduce((s, c) => s + Number(String(c.spend || 0).replace(/[^0-9.]/g, \"\")), 0);\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 16 }}>\n      {loading ? <span className=\"fd-skel\" style={{ height: 34, borderRadius: \"var(--r-sm)\" }} /> : (\n        <div className=\"fd-row\" style={{ height: 34, borderRadius: \"var(--r-sm)\", overflow: \"hidden\", gap: 2, background: \"var(--surface-3)\" }}>\n          {channels.map((c) => (\n            <span key={c.name} title={c.name + \" · \" + c.crp.toFixed(1) + \" CRP\"}\n              style={{ width: pct(c.crp) + \"%\", background: c.color || ChannelMeta(c.name).color, display: \"grid\", placeItems: \"center\", fontSize: 10.5, fontWeight: 700, color: \"#fff\", overflow: \"hidden\", transition: \"width var(--dur-slow) var(--ease)\" }}>\n              {pct(c.crp) > 9 ? c.crp.toFixed(0) : \"\"}\n            </span>\n          ))}\n          {bonus > 0 ? (\n            <span title={\"Surround-sound bonus +\" + bonusPct + \"%\"}\n              style={{ width: pct(bonus) + \"%\", background: \"repeating-linear-gradient(135deg,var(--csi-3-mark) 0 6px,var(--csi-2-mark) 6px 12px)\", display: \"grid\", placeItems: \"center\", fontSize: 10.5, fontWeight: 700, color: \"#fff\" }}>\n              {pct(bonus) > 9 ? \"+\" + bonus.toFixed(0) : \"\"}\n            </span>\n          ) : null}\n        </div>\n      )}\n\n      {showTable ? (\n        <table className=\"fd-table\" style={{ fontSize: \"var(--body-sm-size)\" }}>\n          <thead><tr>\n            <th style={{ width: \"34%\" }}>Channel</th>\n            <th style={{ width: \"16%\" }}>Weight</th>\n            <th className=\"is-num\" style={{ width: \"16%\" }}>Spend</th>\n            <th className=\"is-num\" style={{ width: \"17%\" }}>CRP</th>\n            <th className=\"is-num\" style={{ width: \"17%\" }}>Share</th>\n          </tr></thead>\n          <tbody>\n            {channels.map((c) => (\n              <tr key={c.name}>\n                <td><ChannelTag channel={c.name} size=\"sm\" /></td>\n                <td><span className=\"fd-badge fd-badge-neutral\" style={{ height: 20, fontSize: 11 }}\n            title={\"Spec §4 channel weight\" + (c.physical ? \" · physical format\" : \"\")}>{\"weight \" + (channelWeightOf(c.name) || 0)}</span></td>\n                <td className=\"is-num\">{c.spend}</td>\n                <td className=\"is-num\">{c.crp.toFixed(1)}</td>\n                <td className=\"is-num\">{pct(c.crp).toFixed(0)}%</td>\n              </tr>\n            ))}\n            {bonus > 0 ? (\n              <tr>\n                <td><span className=\"fd-row\" style={{ gap: 9, fontWeight: 600 }}>\n                  <span style={{ width: 9, height: 9, borderRadius: 2, background: \"repeating-linear-gradient(135deg,var(--csi-3-mark) 0 3px,var(--csi-2-mark) 3px 6px)\", flex: \"none\" }} />\n                  Surround-sound bonus\n                </span></td>\n                <td><span className=\"fd-badge fd-badge-success\" style={{ height: 20, fontSize: 11 }}>+{bonusPct}% of +{bonusMax}%</span></td>\n                <td className=\"is-num fd-muted\">—</td>\n                <td className=\"is-num\">{bonus.toFixed(1)}</td>\n                <td className=\"is-num\">{pct(bonus).toFixed(0)}%</td>\n              </tr>\n            ) : null}\n            <tr style={{ background: \"var(--surface-2)\" }}>\n              <td style={{ fontWeight: 700 }}>Campus total</td>\n              <td />\n              <td className=\"is-num\" style={{ fontWeight: 700 }}>{money(spendTotal)}</td>\n              <td className=\"is-num\" style={{ fontWeight: 700 }}>{grand.toFixed(1)}</td>\n              <td className=\"is-num\" style={{ fontWeight: 700 }}>100%</td>\n            </tr>\n          </tbody>\n        </table>\n      ) : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { CsiBadge } from \"../data/CsiBadge\";\n\nconst bandFor = (crp: number) => crp >= 200 ? \"dominant\" : crp >= 100 ? \"strong\" : crp >= 50 ? \"adequate\" : \"weak\";\n\n/**\n * The planner's signature interaction: move budget at one campus and watch its\n * saturation band re-score live. The previewed band renders at 70% opacity with\n * a dashed edge until the change is committed; Escape reverts.\n */\nexport interface BudgetReallocatorProps {\n  campus: string;\n  /** Committed spend. */\n  spend: number;\n  /** Committed CRP. */\n  crp: number;\n  min?: number;\n  max: number;\n  /** Defaults to 100 — the same increment as an arrow-key step. */\n  step?: number;\n  /** The engine's re-score for a candidate spend. Required for a live preview. */\n  scoreFor?: (spend: number) => number;\n  onPreview?: (spend: number, crp: number) => void;\n  onCommit?: (spend: number, crp: number) => void;\n  onCancel?: () => void;\n  className?: string;\n}\n\nexport function BudgetReallocator({\n  campus, spend, crp, min = 0, max, step = 100, scoreFor,\n  onPreview, onCommit, onCancel, className = \"\"\n}: BudgetReallocatorProps) {\n  const [draft, setDraft] = React.useState(spend);\n  React.useEffect(() => setDraft(spend), [spend]);\n  const dirty = draft !== spend;\n  const nextCrp = scoreFor ? scoreFor(draft) : crp;\n  const nextBand = bandFor(nextCrp);\n  const nowBand = bandFor(crp);\n  const delta = draft - spend;\n  const set = (v: number) => { setDraft(v); if (onPreview) onPreview(v, scoreFor ? scoreFor(v) : crp); };\n  const pct = max === min ? 0 : ((draft - min) / (max - min)) * 100;\n  const revert = () => { setDraft(spend); if (onCancel) onCancel(); };\n\n  // MP-192: the change chip used to sit at a raw `left: pct%` with the stylesheet's\n  // own `transform: translateX(-50%)` centering it there — correct everywhere except\n  // near either end of the track, where a chip's own half-width (its rendered text\n  // varies: \"+$100\" vs \"+$123,456\") pushes it past the track's edge (and, since a\n  // popover portals straight to the body with no overflow clip of its own to catch\n  // it, off the CONTAINER's edge too). Fixed by measuring the chip's real rendered\n  // width — never a guessed constant, which would either under-clamp a wide chip or\n  // over-clamp a narrow one — and clamping the position `pct%` would have implied\n  // to keep both of the chip's own edges inside the track. `trackRef`/`chipRef` are\n  // this measurement's only two anchors: the track element `pct%` is relative to,\n  // and the chip element being positioned.\n  const trackRef = React.useRef<HTMLDivElement>(null);\n  const chipRef = React.useRef<HTMLSpanElement>(null);\n  // Pixels, not a percent — a percent can't express \"half a chip-width in from the\n  // edge\" without also knowing the track's own pixel width, which is exactly what\n  // gets measured below. `null` renders the ordinary `pct%` until dirty AND measured\n  // (the very first paint after a drag starts, before the chip has ever been laid\n  // out to measure) — `useLayoutEffect` closes that gap before the browser paints,\n  // so there is no visible jump from unclamped to clamped.\n  const [chipLeft, setChipLeft] = React.useState<number | null>(null);\n\n  React.useLayoutEffect(() => {\n    const track = trackRef.current;\n    if (!dirty || !track) {\n      setChipLeft(null);\n      return;\n    }\n    const measure = () => {\n      const chip = chipRef.current;\n      if (!chip) return;\n      const trackWidth = track.clientWidth;\n      const chipWidth = chip.offsetWidth;\n      const half = chipWidth / 2;\n      const desired = (pct / 100) * trackWidth;\n      // Priority: never let the RIGHT edge past the track (the reported defect —\n      // dragging toward `max`) over never letting the LEFT edge past it. Both hold\n      // whenever the chip is narrower than the track; only a chip wider than its\n      // own track (a real layout impossibility) forces a choice, and the right edge\n      // landing flush is the one that keeps `pct === 100` still reading as \"at max\".\n      setChipLeft(Math.min(Math.max(desired, half), Math.max(trackWidth - half, half)));\n    };\n    measure();\n    if (typeof ResizeObserver !== \"function\") return;\n    const ro = new ResizeObserver(measure);\n    ro.observe(track);\n    return () => ro.disconnect();\n  }, [dirty, pct]);\n\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")}\n      style={{ gap: 14, padding: 18, border: \"1px solid \" + (dirty ? \"var(--border-brand)\" : \"var(--border)\"), borderRadius: \"var(--r-lg)\", background: dirty ? \"var(--surface-brand)\" : \"var(--surface)\", color: \"var(--text)\", transition: \"background var(--dur-base) var(--ease),border-color var(--dur-base) var(--ease)\" }}>\n      <div className=\"fd-row\" style={{ gap: 12, flexWrap: \"wrap\" }}>\n        <span className=\"fd-h4\" style={{ flex: 1, minWidth: 140 }}>{campus}</span>\n        <CsiBadge band={nowBand} crp={crp} size=\"medium\" />\n        {dirty ? <>\n          <i className=\"ph ph-arrow-right fd-muted\" aria-hidden=\"true\" />\n          <CsiBadge band={nextBand} crp={nextCrp} size=\"medium\" preview />\n        </> : null}\n      </div>\n\n      <div className=\"fd-slider\" ref={trackRef}>\n        <span className=\"fd-slider-fill\" style={{ width: pct + \"%\" }} />\n        {dirty ? (\n          <span\n            ref={chipRef}\n            className=\"fd-slider-chip\"\n            style={{\n              left: chipLeft === null ? pct + \"%\" : chipLeft,\n              background: delta < 0 ? \"var(--danger-solid)\" : \"var(--ok-solid)\",\n            }}>\n            {(delta < 0 ? \"−$\" : \"+$\") + Math.abs(delta).toLocaleString()}\n          </span>\n        ) : null}\n        <input type=\"range\" min={min} max={max} step={step} value={draft}\n          onChange={(e) => set(Number(e.target.value))}\n          onKeyDown={(e) => { if (e.key === \"Escape\") revert(); }}\n          aria-label={\"Budget at \" + campus} />\n      </div>\n\n      <div className=\"fd-row\" style={{ gap: 12, flexWrap: \"wrap\" }}>\n        <span className=\"fd-stack\" style={{ gap: 2, flex: 1, minWidth: 150 }}>\n          <span className=\"fd-num\" style={{ fontSize: 19, fontWeight: 700 }}>{\"$\" + draft.toLocaleString()}</span>\n          <span className=\"fd-body-sm fd-muted\">Arrow keys step $100, shift+arrow $1,000. Escape reverts.</span>\n        </span>\n        <button type=\"button\" className=\"fd-btn fd-btn-ghost\" disabled={!dirty} onClick={revert}>Cancel</button>\n        <button type=\"button\" className=\"fd-btn fd-btn-primary\" disabled={!dirty}\n          onClick={() => { if (onCommit) onCommit(draft, nextCrp); }}>Commit reallocation</button>\n      </div>\n    </div>\n  );\n}\n","\n// Categories mirror the canonical channel taxonomy in ChannelMeta — same icon,\n// same hue, so a colour means the same medium here as in every table.\nconst CATEGORIES = [\n  { key: \"ooh\", label: \"OOH\", icon: \"flag-banner\", color: \"var(--ch-ooh)\" },\n  { key: \"transit\", label: \"Transit\", icon: \"bus\", color: \"var(--ch-transit)\" },\n  { key: \"posters\", label: \"Posters\", icon: \"push-pin\", color: \"var(--ch-posters)\" },\n  { key: \"print\", label: \"Print\", icon: \"newspaper\", color: \"var(--ch-print)\" },\n  { key: \"email\", label: \"Email\", icon: \"envelope-simple\", color: \"var(--ch-email)\" },\n  { key: \"web\", label: \"Web\", icon: \"browser\", color: \"var(--ch-web)\" }\n];\n\n/**\n * Channel-diversity breadth at one campus and the bonus it earned or forgave.\n * The engine rewards reaching a campus through multiple reinforcing categories\n * with up to +40% on its score; thin-breadth campuses forgo most of it.\n */\nexport interface SurroundSoundProps {\n  /** Category keys present: \"ooh\" | \"transit\" | \"posters\" | \"print\" | \"email\" | \"web\" */\n  present: string[];\n  /** Bonus actually earned, in points of percent. */\n  bonusPct?: number;\n  /** Model ceiling. Defaults to 40. */\n  bonusMax?: number;\n  /** One sentence naming what the missed breadth costs, e.g. \"+$3,000 into OOH earns +12%.\" */\n  missedCost?: string;\n  className?: string;\n}\n\nexport function SurroundSound({ present = [], bonusPct = 0, bonusMax = 40, missedCost, className = \"\" }: SurroundSoundProps) {\n  const earned = Math.max(0, Math.min(1, bonusPct / bonusMax));\n  const single = present.length <= 2;\n  return (\n    <div className={[\"fd-stack\", className].filter(Boolean).join(\" \")} style={{ gap: 14 }}>\n      <div className=\"fd-row\" style={{ gap: 8, flexWrap: \"wrap\" }}>\n        {CATEGORIES.map((c) => {\n          const on = present.includes(c.key);\n          return (\n            <span key={c.key} title={c.label + (on ? \" — present\" : \" — not bought\")}\n              style={{ display: \"flex\", flexDirection: \"column\", alignItems: \"center\", gap: 5, width: 62, padding: \"10px 0\", borderRadius: \"var(--r-md)\", border: \"1px solid \" + (on ? \"var(--csi-2-edge)\" : \"var(--border)\"), background: on ? \"var(--csi-2-fill)\" : \"var(--surface-2)\", color: on ? \"var(--csi-2-text)\" : \"var(--text-disabled)\" }}>\n              <i className={\"ph ph-\" + c.icon} style={{ fontSize: 19, color: on ? c.color : \"var(--text-muted)\" }} aria-hidden=\"true\" />\n              <span style={{ fontSize: 10.5, fontWeight: 700 }}>{c.label}</span>\n            </span>\n          );\n        })}\n      </div>\n      <div className=\"fd-stack\" style={{ gap: 8 }}>\n        <div className=\"fd-row\" style={{ justifyContent: \"space-between\", gap: 12 }}>\n          <span className=\"fd-label-lg\">Surround-sound bonus earned</span>\n          <span className=\"fd-num\" style={{ color: single ? \"var(--warn-text)\" : \"var(--csi-3-mark)\", fontWeight: 700 }}>\n            +{bonusPct}% of +{bonusMax}%\n          </span>\n        </div>\n        <div style={{ height: 8, borderRadius: \"var(--r-xs)\", background: \"var(--surface-3)\", overflow: \"hidden\" }}>\n          <div style={{ height: \"100%\", width: (earned * 100) + \"%\", background: \"var(--csi-3-mark)\", borderRadius: \"inherit\", transition: \"width var(--dur-slow) var(--ease)\" }} />\n        </div>\n        <span className=\"fd-body-sm fd-secondary\" style={{ textWrap: \"pretty\" }}>\n          {present.length} of 6 channel categories present.{\" \"}\n          {single\n            ? \"Thin breadth forgoes most of the bonus — the same dollars spread across another category score higher.\"\n            : \"Students pass the same spaces daily, so reinforcing channels compound.\"}\n          {missedCost ? \" \" + missedCost : \"\"}\n        </span>\n      </div>\n    </div>\n  );\n}\n","export type ImportanceLevelId = \"nudge\" | \"lean\" | \"priority\" | \"driver\" | \"dealbreaker\";\n\nexport interface ImportanceLevel {\n  id: ImportanceLevelId;\n  /** 1-5, ascending. This is the number the --imp-N-* tokens are keyed by. */\n  rank: 1 | 2 | 3 | 4 | 5;\n  /** How the level is named in the UI. */\n  label: string;\n  /** Phosphor icon name. */\n  icon: string;\n  /** One line saying what choosing this level actually does to a plan. */\n  description: string;\n}\n\n/**\n * How much a single criterion is allowed to matter, as five ordered steps. Ordered\n * ascending, and index-stable: the position in this array IS the `rank`, which is what\n * the --imp-N-* colour tokens are keyed by, so reordering it would silently re-colour\n * every criterion in the product.\n *\n * The ramp runs slate → blue → indigo → amber → red, i.e. from \"barely registers\" to\n * \"nothing else matters\". It deliberately crosses from the neutral/interaction end of\n * the palette into the warning end, because that IS the semantic gradient: a\n * Deal-breaker isn't a stronger preference, it's a veto, and it should look like one.\n */\nexport const IMPORTANCE_LEVELS: ImportanceLevel[] = [\n  { id: \"nudge\", rank: 1, label: \"Nudge\", icon: \"feather\", description: \"Breaks a tie, nothing more.\" },\n  { id: \"lean\", rank: 2, label: \"Lean\", icon: \"arrow-bend-up-right\", description: \"A mild preference between otherwise equal options.\" },\n  { id: \"priority\", rank: 3, label: \"Priority\", icon: \"push-pin\", description: \"Weighed seriously against the other priorities.\" },\n  { id: \"driver\", rank: 4, label: \"Driver\", icon: \"lightning\", description: \"Shapes the plan — outranks anything below it.\" },\n  { id: \"dealbreaker\", rank: 5, label: \"Deal-breaker\", icon: \"prohibit\", description: \"Must be satisfied. Anything failing it is out.\" },\n];\n\nconst BY_ID: Record<string, ImportanceLevel> = IMPORTANCE_LEVELS.reduce(\n  (acc, lvl) => {\n    acc[lvl.id] = lvl;\n    return acc;\n  },\n  {} as Record<string, ImportanceLevel>\n);\n\n/** The level record for an id, falling back to the lowest step for an unknown one — an\n *  unrecognised level should read as \"barely matters\", never throw in a list row. */\nexport function importanceLevel(id: ImportanceLevelId | string): ImportanceLevel {\n  return BY_ID[id] || IMPORTANCE_LEVELS[0];\n}\n\nexport interface ImportanceTokens {\n  /** Background wash for a criterion card at this level. */\n  fill: string;\n  /** Border for that card. */\n  edge: string;\n  /** AA-safe text colour ON `fill`. */\n  text: string;\n  /** The solid — meter segments, glyphs, dots. Clears 3:1 on the meter rail. */\n  mark: string;\n}\n\n/**\n * The four `var(--imp-N-*)` references for a level, as a plain object, so a criterion\n * card elsewhere in a consuming app tints itself from exactly the same tokens the meter\n * segments are drawn in rather than from a second hand-copied list of hexes. Returns the\n * var() references, not resolved colours — the whole point is that the theme resolves\n * them, and every one of these is defined for both light and dark ground.\n */\nexport function importanceTokens(id: ImportanceLevelId | string): ImportanceTokens {\n  const n = importanceLevel(id).rank;\n  return {\n    fill: \"var(--imp-\" + n + \"-fill)\",\n    edge: \"var(--imp-\" + n + \"-edge)\",\n    text: \"var(--imp-\" + n + \"-text)\",\n    mark: \"var(--imp-\" + n + \"-mark)\",\n  };\n}\n\nexport interface ImportanceTagProps {\n  level: ImportanceLevelId | string;\n  /** Show the level's name next to its glyph. Off for a bare glyph in tight spots. */\n  showLabel?: boolean;\n  size?: \"sm\" | \"md\";\n  className?: string;\n  /** Paint the tag with the kit's own disabled tokens — the same trio `.fd-btn[disabled]`\n   *  uses (`--surface-3`/`--border`/`--text-disabled`) — instead of this level's own\n   *  fill/edge/text, and set `aria-disabled` and the `not-allowed` cursor. Never `opacity`,\n   *  per the kit's 0.41 rule: a disabled control keeps full-strength, AA-safe colour rather\n   *  than fading out. A consumer wrapping the tag in a disabled trigger (e.g. a raw\n   *  `<button disabled>`) should pass this through instead of hand-overriding the level's\n   *  `--imp-{rank}-*` tokens itself. */\n  disabled?: boolean;\n}\n\n/**\n * The level itself, as a small tinted tag — glyph plus name in that level's own fill,\n * edge and text tokens. Never colour alone: the name and the icon both carry the level,\n * so the five steps are still distinguishable without colour vision.\n */\nexport function ImportanceTag({ level, showLabel = true, size = \"sm\", className = \"\", disabled = false }: ImportanceTagProps) {\n  const lvl = importanceLevel(level);\n  const t = importanceTokens(level);\n  return (\n    <span\n      className={[\"fd-imp-tag\", size === \"md\" ? \"is-md\" : \"\", disabled ? \"is-disabled\" : \"\", className].filter(Boolean).join(\" \")}\n      style={disabled\n        ? { background: \"var(--surface-3)\", borderColor: \"var(--border)\", color: \"var(--text-disabled)\", cursor: \"not-allowed\" }\n        : { background: t.fill, borderColor: t.edge, color: t.text }}\n      title={lvl.label + \" — \" + lvl.description}\n      aria-disabled={disabled ? \"true\" : undefined}\n    >\n      <i className={\"ph ph-\" + lvl.icon} aria-hidden=\"true\" />\n      {showLabel ? lvl.label : <span className=\"fd-sr\">{lvl.label}</span>}\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport { ScoreMeter } from \"../data/ScoreMeter\";\nimport type { MeterSegmentInput } from \"../data/SegmentedMeter\";\nimport type { Placement } from \"../actions/Popover\";\nimport { ImportanceTag, importanceLevel, importanceTokens, type ImportanceLevelId } from \"./Importance\";\n\nexport interface PreferenceCriterion {\n  id: string;\n  /** What the planner asked for — \"Within 50 miles\", \"Enrollment over 10,000\". */\n  label: string;\n  importance: ImportanceLevelId | string;\n  /** The most this criterion could contribute to a 100-point score, i.e. what it is\n   *  worth given its importance relative to the other criteria. */\n  weight: number;\n  /** What it actually contributed for this option, 0..weight. A partially-satisfied\n   *  criterion is allowed — this is not a pass/fail flag. */\n  earned: number;\n  /** Optional plain-language reason shown under the criterion in the breakdown, e.g.\n   *  \"31 miles\" or \"no outdoor inventory\". */\n  note?: React.ReactNode;\n}\n\n/** The score a set of criteria adds up to, rounded to a whole 0-100. Exported because a\n *  consumer usually needs the same number for sorting the list as for drawing the meter,\n *  and two implementations of that would drift. */\nexport function preferenceScore(criteria: PreferenceCriterion[]): number {\n  const earned = criteria.reduce((n, c) => n + (Number(c.earned) || 0), 0);\n  const weight = criteria.reduce((n, c) => n + (Number(c.weight) || 0), 0);\n  if (weight <= 0) return 0;\n  return Math.max(0, Math.min(100, Math.round((earned / weight) * 100)));\n}\n\n/** One meter segment per criterion, each sized by what that criterion actually earned\n *  (as a share of 100) and coloured by its importance level's `mark` token. */\nexport function preferenceSegments(criteria: PreferenceCriterion[]): MeterSegmentInput[] {\n  const weight = criteria.reduce((n, c) => n + (Number(c.weight) || 0), 0);\n  if (weight <= 0) return [];\n  return criteria.map((c) => ({\n    id: c.id,\n    label: c.label + \" · \" + importanceLevel(c.importance).label,\n    value: ((Number(c.earned) || 0) / weight) * 100,\n    color: importanceTokens(c.importance).mark,\n  }));\n}\n\nexport interface PreferenceMeterProps {\n  criteria: PreferenceCriterion[];\n  /** Overrides the score derived from `criteria`. Pass it when the score is computed\n   *  server-side and the criteria are only the explanation of it. */\n  score?: number;\n  /** Accessible name. Defaults to \"Preference score\". */\n  label?: string;\n  width?: number;\n  height?: number;\n  showScore?: boolean;\n  placement?: Placement;\n  /** Heading shown above the breakdown list. */\n  breakdownTitle?: string;\n  className?: string;\n}\n\n/**\n * PreferenceMeter — how well one option matches the planner's stated priorities, drawn\n * as one segment per criterion coloured by that criterion's importance.\n *\n * The encoding is the point, and it is not \"how high did this score\". A plain 0-100 bar\n * says a school scored 72; this says WHICH of the planner's priorities it satisfies — a\n * bar that is mostly red-and-amber is meeting the deal-breakers and drivers, a bar of\n * the same length that is mostly slate is scraping the same number out of things the\n * planner said barely matter. Two schools with identical scores are visibly different\n * propositions, at a glance, in a list row.\n *\n * Segment width is what the criterion EARNED, not what it was worth, so the unfilled\n * remainder of the rail is exactly what the option is failing to deliver. Clicking opens\n * the breakdown: every criterion, its level, what it earned out of its weight, and the\n * caller's own note explaining why.\n */\nexport function PreferenceMeter({\n  criteria,\n  score,\n  label = \"Preference score\",\n  width,\n  height,\n  showScore,\n  placement,\n  breakdownTitle = \"Why this score\",\n  className = \"\",\n}: PreferenceMeterProps) {\n  const value = score == null ? preferenceScore(criteria) : score;\n  const segments = React.useMemo(() => preferenceSegments(criteria), [criteria]);\n\n  return (\n    <ScoreMeter\n      score={value}\n      segments={segments}\n      label={label}\n      width={width}\n      height={height}\n      showScore={showScore}\n      placement={placement}\n      className={className}\n      breakdownLabel={breakdownTitle}\n      breakdown={\n        <div className=\"fd-prefbreak\">\n          <div className=\"fd-prefbreak-head\">\n            <span className=\"fd-label-lg\">{breakdownTitle}</span>\n            <span className=\"fd-prefbreak-score fd-tabular\">{Math.round(value)}</span>\n          </div>\n          <ul className=\"fd-prefbreak-list\">\n            {criteria.map((c) => {\n              const pct = c.weight > 0 ? Math.round(((Number(c.earned) || 0) / c.weight) * 100) : 0;\n              return (\n                <li key={c.id} className={pct === 0 ? \"fd-prefbreak-item is-unmet\" : \"fd-prefbreak-item\"}>\n                  <ImportanceTag level={c.importance} />\n                  <span className=\"fd-prefbreak-text\">\n                    <span className=\"fd-prefbreak-label\">{c.label}</span>\n                    {c.note ? <span className=\"fd-prefbreak-note\">{c.note}</span> : null}\n                  </span>\n                  <span className=\"fd-prefbreak-val fd-tabular\">\n                    {Math.round(Number(c.earned) || 0)}\n                    <span className=\"fd-prefbreak-sep\">/</span>\n                    {Math.round(c.weight)}\n                  </span>\n                </li>\n              );\n            })}\n          </ul>\n        </div>\n      }\n    />\n  );\n}\n","import * as React from \"react\";\nimport { useChatEngine } from \"./chatEngine\";\nimport type { ChatAdapter, ChatMessage, Packet, PacketSchema, PacketDecision } from \"./chatEngine\";\nimport { ChatTranscript } from \"./ChatTranscript\";\nimport { ChatComposer } from \"./ChatComposer\";\nimport { useChatDraft } from \"./chatStore\";\nimport { truncationTitle } from \"../textExposure\";\nimport { ChatSessionBar, ModelControls } from \"./ChatSessionBar\";\nimport { MenuButton } from \"../actions/Popover\";\nimport type { MenuItem } from \"../actions/Popover\";\nimport { formatRelative } from \"../data/RelativeTime\";\nimport type { Attachment } from \"../../kits/files\";\nimport type { FileUploadHandler } from \"../forms/Dropzone\";\nimport type { MeterSegmentInput } from \"../data/SegmentedMeter\";\nimport { useMeasuredWidth } from \"../useMeasuredWidth\";\n\n/** A sidebar panel narrower than this (px) uses the compact layout. */\nconst NARROW_PANEL_WIDTH = 420;\n\nconst SURFACES: Record<string, string> = { sidebar: \"is-sidebar\", inline: \"is-inline\", page: \"is-page\", modal: \"is-modal\", sheet: \"is-sheet\" };\n\nexport interface Suggestion { id?: string; label: string; text?: string; description?: string; icon?: string }\nexport interface SlashCommand { id: string; label: string; description?: string; icon?: string; shortcut?: string; /** Send immediately on pick. */ immediate?: boolean; run?: () => void }\nexport interface MentionSource { id?: string; label: string; value?: string; description?: string; icon?: string; meta?: React.ReactNode }\nexport interface Model { id: string; label: string; description?: string; /** Key HINT only. */ shortcut?: string; group?: string; meta?: React.ReactNode; disabled?: boolean }\nexport interface ContextUsage { total: number; segments: MeterSegmentInput[]; label?: string; format?: \"count\" | \"compact\" | \"bytes\" }\nexport interface UsageLimit { id: string; label: string; percent: number; resetsAt?: string; note?: string }\nexport interface SessionStats { elapsedMs?: number; tokens?: number; runningTasks?: number; costUsd?: number; turns?: number }\nexport interface ThreadSummary { id: string; title?: string; description?: string; updatedAt?: string }\n\nexport type VoiceHandler = (controls: { onText: (text: string, meta?: { replace?: boolean }) => void; onEnd?: () => void }) => (() => void) | void;\n\nexport interface AgentChatPanelProps {\n  /* required */\n  contextType: string;\n  contextId: string;\n  /** Whose draft this is: the signed-in user's id. The composer's unsent text is kept in the tab's session storage\n   *  under this owner, so it survives the panel being remounted but is never shown to a different owner. `null` =\n   *  no owner to scope to, so the draft is not stored at all. */\n  draftOwner: string | null;\n  apiAdapter: ChatAdapter | null;\n  /** Show this exact thread instead of resolving one from context. Set it from\n   *  onNewThread / onSelectThread to make history switching work. */\n  threadId?: string | null;\n  /** Change it to make the panel re-read its thread, e.g. after the app adds an item to the conversation outside a chat turn. Not read on first mount. The transcript stays, a live turn is untouched. */\n  reloadKey?: string | number;\n\n  /* chrome */\n  title?: string;\n  subtitle?: React.ReactNode;\n  showHeader?: boolean;\n  headerActions?: React.ReactNode;\n  onClose?: () => void;\n  assistantName?: string;\n  userName?: string;\n  assistantAvatar?: string;\n  userAvatar?: string;\n  /** Phosphor name for the assistant mark. Default \"sparkle\". */\n  assistantIcon?: string;\n  showAvatars?: boolean;\n\n  /* transcript */\n  markdown?: boolean;\n  /** Clamp threshold before Show more. Default 600; 0 disables. */\n  maxVisibleChars?: number;\n  messageActions?: boolean;\n  showSteps?: boolean;\n  showThinking?: boolean;\n  emptyTitle?: string;\n  emptyDescription?: string;\n  emptyIcon?: string;\n  suggestions?: Array<Suggestion | string>;\n  renderEmpty?: () => React.ReactNode;\n  packetSchemas?: Record<string, PacketSchema>;\n  packetRenderers?: Record<string, (p: Packet) => React.ReactNode>;\n  onApplyPacket?: (p: Packet) => void;\n  /** Decision mode per packet type: header status badge, pinned Confirm/Dismiss footer, then the outcome. */\n  packetDecisions?: Record<string, PacketDecision>;\n  /** Give-up time for a queued/running turn, in ms. Default 180000. The server's terminal job status always wins. */\n  pendingTimeoutMs?: number;\n  /** Words for the background work a live turn waits on, given the still-working cards (\"Running 2 queries\"). */\n  describeWaiting?: (pending: ChatMessage[]) => string;\n  onOpenAttachment?: (a: Attachment) => void;\n  /** Map a backend error code to human copy. */\n  errorCopy?: (code: string) => React.ReactNode;\n\n  /* composer */\n  placeholder?: string;\n  maxLength?: number;\n  hint?: React.ReactNode;\n  /** Omit and there is no attach affordance — a pasted image falls through. */\n  fileUploadHandler?: FileUploadHandler;\n  acceptFiles?: string;\n  maxFileSize?: number;\n  /** Chars above which a paste becomes a .txt attachment. Default 4000. */\n  largePasteThreshold?: number;\n  slashCommands?: SlashCommand[];\n  mentionSources?: MentionSource[] | ((query: string) => Promise<MentionSource[]>);\n  voiceHandler?: VoiceHandler;\n  initialMessage?: string | null;\n\n  /* session bar — supply none of these and no bar renders */\n  contextUsage?: ContextUsage;\n  sessionStats?: SessionStats;\n  usageLimits?: UsageLimit[];\n  models?: Model[];\n  moreModels?: Model[];\n  model?: string;\n  onModelChange?: (id: string) => void;\n  effortLevels?: string[];\n  effort?: string;\n  onEffortChange?: (level: string) => void;\n  fastMode?: boolean;\n  onFastModeChange?: (on: boolean) => void;\n\n  /* threads */\n  threads?: ThreadSummary[];\n  onSelectThread?: (t: ThreadSummary) => void;\n  onNewThread?: () => void;\n  /** Supply to put a delete affordance on each history row. Omit and none renders. */\n  onDeleteThread?: (t: ThreadSummary) => void;\n\n  /* layout — behaviour is identical across all five surfaces. \"sidebar\" fills the panel it is put in (AppShell's\n     side panel owns the width and the resize handle). */\n  surface?: \"sidebar\" | \"inline\" | \"page\" | \"modal\" | \"sheet\";\n  height?: number | string;\n  className?: string;\n  style?: React.CSSProperties;\n\n  /* events */\n  onPacket?: (p: Packet) => void;\n  onThreadReady?: (id: string) => void;\n  onError?: (e: unknown) => void;\n  onSend?: (text: string) => void;\n  onClear?: () => void;\n  onFeedback?: (x: { message?: ChatMessage; feedback?: string | null }) => void;\n  onEditMessage?: (m: ChatMessage) => void;\n}\n\n/**\n * Agent chat panel.\n *\n * Ships no backend: without `apiAdapter` it loads nothing and says so. Every\n * optional surface — usage meters, model picker, attachments, avatars, steps —\n * renders only when its input is supplied. A panel with no telemetry shows no\n * telemetry, not zeroes.\n */\nexport function AgentChatPanel({\n  /* required */\n  contextType, contextId, draftOwner, apiAdapter,\n  threadId, reloadKey,\n  /* identity + chrome */\n  title = \"Assistant\", subtitle, showHeader = true, headerActions, onClose,\n  assistantName = \"Assistant\", userName = \"You\", assistantAvatar, userAvatar,\n  assistantIcon = \"sparkle\", showAvatars = true,\n  /* transcript */\n  markdown = true, maxVisibleChars = 600, messageActions = true,\n  showSteps = true, showThinking = true,\n  emptyTitle, emptyDescription, emptyIcon, suggestions = [], renderEmpty,\n  packetSchemas, packetRenderers, packetDecisions, onApplyPacket, pendingTimeoutMs, describeWaiting, onOpenAttachment, errorCopy,\n  /* composer */\n  placeholder = \"Ask a question…\", maxLength, hint,\n  fileUploadHandler, acceptFiles, maxFileSize, largePasteThreshold = 4000,\n  slashCommands, mentionSources, voiceHandler, initialMessage,\n  /* session bar */\n  contextUsage, sessionStats, usageLimits,\n  models, model, onModelChange, effortLevels, effort, onEffortChange,\n  fastMode, onFastModeChange, moreModels,\n  /* threads */\n  threads, onSelectThread, onNewThread, onDeleteThread,\n  /* layout */\n  surface = \"sidebar\",\n  height, className = \"\", style,\n  /* events */\n  onPacket, onThreadReady, onError, onSend, onClear, onFeedback, onEditMessage,\n}: AgentChatPanelProps) {\n  const [panelRef, panelWidth] = useMeasuredWidth(NARROW_PANEL_WIDTH);\n  const [applied, setApplied] = React.useState<Record<string, boolean>>({});\n  const [draft, setDraft] = useChatDraft(draftOwner, contextType, contextId);\n\n  const engine = useChatEngine({\n    contextType, contextId, apiAdapter, initialMessage, threadId, pendingTimeoutMs, describeWaiting,\n    onPacket, onThreadReady, onError, onSend, onClear, onFeedback,\n  });\n\n  const { refresh } = engine;\n  const lastReloadKey = React.useRef(reloadKey);\n  React.useEffect(() => {\n    if (lastReloadKey.current === reloadKey) return;\n    lastReloadKey.current = reloadKey;\n    refresh();\n  }, [reloadKey, refresh]);\n\n  const narrow = surface === \"sidebar\" ? panelWidth < NARROW_PANEL_WIDTH : surface === \"sheet\";\n\n  const ctx = {\n    assistantName, userName, assistantAvatar, userAvatar, assistantIcon, showAvatars,\n    markdown, maxVisibleChars, messageActions, showSteps, showThinking,\n    packetSchemas, packetRenderers, packetDecisions, appliedPackets: applied, narrow,\n    onOpenAttachment, errorCopy,\n    onRetry: engine.retry,\n    onFeedback: (id: string, v: \"up\" | \"down\") => engine.setFeedback(id, v),\n    onEdit: (m: ChatMessage) => { setDraft(m.text || \"\"); onEditMessage && onEditMessage(m); },\n    onApplyPacket: onApplyPacket ? (p: Packet) => {\n      const carrier = [...engine.visible].reverse().find((m) => m.packet === p);\n      if (carrier) setApplied((a) => Object.assign({}, a, { [carrier.id]: true }));\n      onApplyPacket(p);\n    } : undefined,\n    onReconnect: engine.reload,\n    deadTitle: \"The assistant isn’t reachable\",\n  };\n\n  const sessionBar = (\n    <ChatSessionBar\n      sessionStats={sessionStats} contextUsage={contextUsage} usageLimits={usageLimits}\n      onClear={engine.visible.length ? engine.clear : undefined}\n    />\n  );\n\n  const modelControls = (\n    <ModelControls\n      models={models} model={model} onModelChange={onModelChange}\n      effortLevels={effortLevels} effort={effort} onEffortChange={onEffortChange}\n      fastMode={fastMode} onFastModeChange={onFastModeChange} moreModels={moreModels}\n      narrow={narrow}\n    />\n  );\n\n  const threadMenu = threads && threads.length ? (\n    <MenuButton\n      variant=\"ghost\" icon=\"clock-counter-clockwise\" trailingIcon={null} placement=\"bottom-end\"\n      ariaLabel=\"Conversation history\" title=\"History\" minWidth={300}\n      items={([{ kind: \"section\", label: \"Recent\" }] as MenuItem[]).concat(threads.map((t) => ({\n        id: t.id, label: t.title || \"Untitled\",\n        description: t.updatedAt ? formatRelative(t.updatedAt) : t.description,\n        checked: t.id === engine.threadId,\n        onSelect: () => onSelectThread && onSelectThread(t),\n        /* Delete sits on the row rather than behind a submenu, so removing a stale thread is\n           one gesture. Only offered when the host can actually persist it. */\n        trailingAction: onDeleteThread ? {\n          icon: \"trash\", label: \"Delete “\" + (t.title || \"Untitled\") + \"”\", danger: true,\n          onSelect: () => onDeleteThread(t)\n        } : undefined,\n      })))}\n    />\n  ) : null;\n\n  return (\n    <aside\n      ref={panelRef}\n      className={[\"fdc-panel\", SURFACES[surface] || SURFACES.sidebar, narrow ? \"is-narrow\" : \"\", className].filter(Boolean).join(\" \")}\n      style={{\n        ...(height ? { height } : {}),\n        ...style,\n      }}\n      aria-label={title}\n    >\n      {showHeader ? (\n        <header className=\"fdc-head\">\n          <span className=\"fdc-head-mark\" aria-hidden=\"true\"><i className={\"ph ph-\" + assistantIcon} /></span>\n          <span className=\"fdc-head-titles\">\n            <span className=\"fdc-head-title\" title={truncationTitle(title)}>{title}</span>\n            {subtitle ? <span className=\"fdc-head-sub\" title={truncationTitle(subtitle)}>{subtitle}</span> : null}\n          </span>\n          <span className=\"fdc-head-acts\">\n            {headerActions}\n            {threadMenu}\n            {onNewThread ? (\n              <button type=\"button\" className=\"fdc-iconbtn\" onClick={onNewThread} aria-label=\"New conversation\" title=\"New conversation\">\n                <i className=\"ph ph-plus\" aria-hidden=\"true\" />\n              </button>\n            ) : null}\n            {onClose ? (\n              <button type=\"button\" className=\"fdc-iconbtn\" onClick={onClose} aria-label=\"Close panel\" title=\"Close\">\n                <i className=\"ph ph-x\" aria-hidden=\"true\" />\n              </button>\n            ) : null}\n          </span>\n        </header>\n      ) : null}\n\n      <ChatTranscript\n        messages={engine.visible} ctx={ctx} status={engine.status} fatal={engine.fatal}\n        suggestions={suggestions} onPick={(t) => engine.send(t as string)}\n        emptyTitle={emptyTitle} emptyDescription={emptyDescription} emptyIcon={emptyIcon}\n        renderEmpty={renderEmpty}\n      />\n\n      <ChatComposer\n        onSubmit={(text, atts) => engine.send(text, atts)}\n        onStop={engine.stop}\n        busy={engine.busy}\n        disabled={engine.status === \"disconnected\" || engine.status === \"idle\"}\n        placeholder={placeholder} maxLength={maxLength} hint={hint}\n        fileUploadHandler={fileUploadHandler} acceptFiles={acceptFiles}\n        maxFileSize={maxFileSize} largePasteThreshold={largePasteThreshold}\n        slashCommands={slashCommands} mentionSources={mentionSources} voiceHandler={voiceHandler}\n        queue={engine.queue} onRemoveQueued={engine.removeQueued}\n        sessionBar={sessionBar} toolbarExtras={modelControls}\n        onOpenAttachment={onOpenAttachment}\n        draft={draft} onDraftChange={setDraft} narrow={narrow}\n      />\n    </aside>\n  );\n}\n","import * as React from \"react\";\nimport type { Attachment } from \"../../kits/files\";\nimport type { Step } from \"../data/StepList\";\nimport { safeStore, jobKey } from \"./chatStore\";\nimport type { ChatStore } from \"./chatStore\";\n\n/**\n * Chat state machine. Framework-shaped as a React hook, but the rules it encodes\n * are the portable part: thread resolution, serial sending, escalation polling,\n * recovery, abort semantics and retry truncation.\n *\n * It ships no HTTP client. Without an adapter it resolves nothing and renders\n * nothing — every app's proxy differs in auth, routing and host.\n */\n\n/* ── types ────────────────────────────────────────────────────────────────── */\n\n/** Tri-state `valid`: only an explicit false blocks Apply. */\nexport interface Citation { id?: string; marker?: string | number; title?: string; url?: string; detail?: string }\n\n/** Tri-state `valid`: only an explicit false blocks Apply. */\nexport interface Packet { type: string; payload: unknown; valid?: boolean; error?: string; repaired?: boolean }\nexport interface PacketSchema {\n  heading?: string;\n  icon?: string;\n  applyLabel?: string;\n  /** `false` hides the Apply footer for this packet type (a live query card, a CSV). Default: Apply shows. */\n  apply?: boolean;\n}\n\nexport type PacketDecisionAction = \"confirm\" | \"dismiss\";\nexport type PacketDecisionTone = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\";\n/** What the app says about a packet right now. The design system keeps no state beyond the pending press. */\nexport interface PacketDecisionState {\n  /** Header badge: waiting, confirming, done, refused, failed, unknown… */\n  status?: { label: string; tone: PacketDecisionTone };\n  /** Once set the packet is decided: replaces the footer. */\n  outcome?: { message: React.ReactNode; tone: \"success\" | \"danger\" };\n  /** App-reported error banner, shown with both buttons usable. A rejection of `onDecide` shows its own message. */\n  error?: React.ReactNode;\n}\n/** Decision mode for one packet type. */\nexport interface PacketDecision {\n  /** Called with the pressed action; the buttons stay pending until it settles, a rejection shows an error banner. */\n  onDecide: (action: PacketDecisionAction, packet: Packet) => Promise<void>;\n  /** Packet's current status, outcome and error. */\n  state: (packet: Packet) => PacketDecisionState;\n  confirmLabel?: string;\n  dismissLabel?: string;\n}\n\nexport interface JobStatus {\n  id?: string;\n  /** queued | running keep polling · completed | recovered are success · anything else fails loudly. */\n  status: string;\n  detail?: string;\n  error?: string;\n}\n\nexport interface ChatMessage {\n  id: string;\n  role: \"user\" | \"assistant\" | \"system\";\n  text?: string | null;\n  packet?: Packet | null;\n  /** Escalation in flight. */\n  working?: boolean;\n  /** Tokens arriving — renders a live caret. */\n  streaming?: boolean;\n  /** Optimistic, not yet confirmed. */\n  pending?: boolean;\n  /** The turn was stopped by the user. */\n  stopped?: boolean;\n  jobId?: string;\n  job?: JobStatus;\n  error?: string;\n  retryable?: boolean;\n  timestamp?: string;\n  author?: string;\n  steps?: Step[];\n  citations?: Citation[];\n  attachments?: Attachment[];\n  thinking?: string;\n  thinkingMs?: number;\n  feedback?: \"up\" | \"down\" | null;\n  model?: string;\n  usage?: unknown;\n  resumed?: boolean;\n  /**\n   * This message is a background task that is still in progress (a queued or running query's card). Set by the\n   * adapter. `working` keeps meaning only \"the turn is in flight\"; a pending message shows no working row of\n   * its own. A task-pending message is what a working turn waits on (see `waitingFor`).\n   */\n  taskPending?: boolean;\n  /**\n   * What a still-working turn is waiting on, in words (\"Running 2 queries\"): set by the engine, never the\n   * adapter, on the working turn whenever messages of the thread are `taskPending`. The working indicator then\n   * shows this in place of \"Working\" as the turn's one state. Never an id.\n   */\n  waitingFor?: string;\n  metadata?: { type?: string; [k: string]: unknown };\n}\n\nexport interface SendMessageResult {\n  /** true = escalated to a background job. */\n  dispatched?: boolean;\n  job_id?: string;\n  reply?: string | null;\n  packet?: Packet;\n  steps?: Step[];\n  citations?: Citation[];\n  usage?: unknown;\n  model?: string;\n}\n\nexport interface StreamHandlers {\n  /** Chunks APPEND, never replace. */\n  onToken(chunk: string): void;\n  onStep?(step: Step): void;\n  onThinking?(chunk: string): void;\n}\n\n/**\n * The app-supplied backend. There is no default: every proxy differs in auth,\n * routing and host. Reject with the backend's stable error code as the message —\n * the panel matches codes by exact equality, never substring sniffing.\n */\nexport interface ChatAdapter {\n  resolveThread(ctx: { contextType: string; contextId: string }): Promise<{ thread_id: string | null }>;\n  getThread(threadId: string): Promise<{ messages: ChatMessage[] }>;\n  sendMessage(threadId: string, text: string, signal?: AbortSignal, attachments?: Attachment[]): Promise<SendMessageResult>;\n  getJob(jobId: string): Promise<JobStatus>;\n  /** Preferred when present. */\n  streamMessage?(threadId: string, text: string, handlers: StreamHandlers, signal: AbortSignal, attachments?: Attachment[]): Promise<SendMessageResult>;\n  /** Cancels upstream only. It must not gate whether Stop appears. */\n  cancelJob?(jobId: string): Promise<void>;\n}\n\nexport interface ChatEngineOptions {\n  contextType: string;\n  contextId: string;\n  apiAdapter?: ChatAdapter | null;\n  initialMessage?: string | null;\n  threadId?: string | null;\n  pollIntervalMs?: number;\n  /**\n   * How long a turn may stay queued/running before the panel gives up with a\n   * retryable \"timeout\". Default 180000 (3 min). The server's terminal job status\n   * is always authoritative: a terminal status seen at any time wins over this.\n   */\n  pendingTimeoutMs?: number;\n  /**\n   * Words for the background work a working turn is waiting on: called with the thread's `taskPending` messages\n   * (a running query's card), whenever there is at least one. Default \"Waiting on N background\n   * task(s)\". Return the app's own phrasing, e.g. \"Running 2 queries\".\n   */\n  describeWaiting?: (pending: ChatMessage[]) => string;\n  store?: ChatStore;\n  onPacket?: (p: Packet) => void;\n  onThreadReady?: (id: string) => void;\n  onError?: (e: unknown) => void;\n  onSend?: (text: string) => void;\n  onClear?: () => void;\n  onFeedback?: (x: { message?: ChatMessage; feedback?: string | null }) => void;\n}\n\nexport interface QueuedTurn { id: string; text: string; attachments?: Attachment[] }\n\nexport interface ChatEngine {\n  status: \"idle\" | \"resolving\" | \"loading\" | \"ready\" | \"disconnected\";\n  threadId: string | null;\n  messages: ChatMessage[];\n  visible: ChatMessage[];\n  queue: QueuedTurn[];\n  busy: boolean;\n  fatal: string | null;\n  turnStartedAt: number | null;\n  send(text: string, attachments?: Attachment[]): void;\n  stop(): void;\n  retry(): void;\n  clear(): void;\n  removeQueued(id: string): void;\n  setFeedback(id: string, value: \"up\" | \"down\"): void;\n  reload(): Promise<void>;\n  /** Re-read the thread without touching status; new server items merge in, local-only messages stay. */\n  refresh(): Promise<void>;\n  canSend: boolean;\n}\n\n/* ── constants / helpers ──────────────────────────────────────────────────── */\n\nexport const CHAT_UNAVAILABLE = \"chat_unavailable\";\nconst JOB_PENDING = [\"queued\", \"running\"];\nconst JOB_SUCCESS = [\"completed\", \"recovered\"];   // `recovered` IS success\n\nlet seq = 0;\nconst uid = (p: string) => p + \"_\" + (++seq) + \"_\" + Date.now().toString(36);\nconst sleep = (ms: number) => new Promise<void>((r) => setTimeout(r, ms));\n\nexport const isSystemMessage = (m: ChatMessage | null | undefined): boolean =>\n  !!m && (m.role === \"system\" || (m.metadata != null && m.metadata.type === \"system\"));\nexport const visibleMessages = (list: ChatMessage[] | null | undefined): ChatMessage[] =>\n  (list || []).filter((m) => !isSystemMessage(m));\n\nexport function jobBucket(status?: string): \"pending\" | \"success\" | \"failure\" {\n  const s = String(status || \"\").toLowerCase();\n  if (JOB_PENDING.indexOf(s) !== -1) return \"pending\";\n  if (JOB_SUCCESS.indexOf(s) !== -1) return \"success\";\n  return \"failure\";                                  // including anything unrecognised\n}\n\nfunction defaultDescribeWaiting(pending: ChatMessage[]): string {\n  return \"Waiting on \" + pending.length + \" background \" + (pending.length === 1 ? \"task\" : \"tasks\");\n}\n\n/**\n * DS-19: the single place \"waiting\" is derived, for every list the engine commits (live merge, first load,\n * reload). While any message is `taskPending`, the working turn (the last `working` message) carries\n * `waitingFor`; otherwise no message does. Adapter data is never rewritten beyond that one derived field.\n */\nexport function withWaiting(list: ChatMessage[], describe: (pending: ChatMessage[]) => string): ChatMessage[] {\n  const pending = list.filter((m) => m.taskPending);\n  let turn = -1;\n  list.forEach((m, i) => { if (m.working) turn = i; });\n  return list.map((m, i) => {\n    const want = i === turn && pending.length ? describe(pending) : undefined;\n    return m.waitingFor === want ? m : Object.assign({}, m, { waitingFor: want });\n  });\n}\n\n/* An AbortController-shaped fallback for environments without one — its `signal`\n   is deliberately undefined; callers that require a real AbortSignal cast it. */\ntype AbortLike = AbortController | { abort(): void; signal?: undefined };\n\nexport function useChatEngine(opts: ChatEngineOptions): ChatEngine {\n  const {\n    contextType, contextId, apiAdapter, initialMessage, threadId: threadIdProp,\n    pollIntervalMs = 1500, pendingTimeoutMs = 180_000, describeWaiting = defaultDescribeWaiting, store = safeStore,\n    onPacket, onThreadReady, onError, onSend, onClear, onFeedback,\n  } = opts || ({} as ChatEngineOptions);\n\n  const [status, setStatus] = React.useState<ChatEngine[\"status\"]>(\"idle\");   // idle|resolving|loading|ready|disconnected\n  const [threadId, setThreadId] = React.useState<string | null>(null);\n  const [messages, setMessages] = React.useState<ChatMessage[]>([]);\n  const [queue, setQueue] = React.useState<QueuedTurn[]>([]);\n  const [fatal, setFatal] = React.useState<string | null>(null);\n  const [busy, setBusy] = React.useState(false);\n  const [turnStartedAt, setTurnStartedAt] = React.useState<number | null>(null);\n\n  const listRef = React.useRef<ChatMessage[]>([]);\n  const queueRef = React.useRef<QueuedTurn[]>([]);\n  const busyRef = React.useRef(false);\n  // DS-15: false while the thread is being resolved or first loaded. A turn sent in that window waits in the\n  // queue: the load replaces the whole list, so a turn dispatched meanwhile lost its message from view and\n  // Retry then had nothing to retry.\n  const loadedRef = React.useRef(false);\n  const stoppedRef = React.useRef(false);\n  const abortRef = React.useRef<AbortLike | null>(null);\n  const serverCount = React.useRef(0);\n  // SMS-268: ids of every message the server has shown us, and — while a dispatched turn is\n  // in flight — the ids it had shown BEFORE that turn plus the id of the local placeholder\n  // standing in for the turn, so mergeThread can tell the turn's own server messages from the rest.\n  const serverIds = React.useRef<Set<string>>(new Set());\n  const liveTurn = React.useRef<{ known: Set<string>; holderId: string } | null>(null);\n  // DS-15: the server ids a finished turn owned, and the ids of failed turns the person retried.\n  // A retry drops the failed turn locally, so mergeThread must not list its server copy again.\n  const lastTurnOwn = React.useRef<Set<string>>(new Set());\n  const retired = React.useRef<Set<string>>(new Set());\n  const threadRef = React.useRef<string | null>(null);\n  const mounted = React.useRef(true);\n\n  // React 18 Strict Mode double-invokes this effect in dev (mount, cleanup, remount)\n  // without discarding the ref, so the cleanup alone leaves `mounted.current` stuck\n  // false forever unless the body also resets it true — without this, every commit()\n  // after the phantom unmount is silently dropped and the transcript never renders.\n  React.useEffect(() => {\n    mounted.current = true;\n    return () => { mounted.current = false; };\n  }, []);\n\n  const describeWaitingRef = React.useRef(describeWaiting);\n  describeWaitingRef.current = describeWaiting;\n  const commit = (next: ChatMessage[]) => {\n    const derived = withWaiting(next, (pending) => describeWaitingRef.current(pending));\n    listRef.current = derived;\n    if (mounted.current) setMessages(derived);\n  };\n  const patch = (id: string, p: Partial<ChatMessage> | ((m: ChatMessage) => Partial<ChatMessage>)) =>\n    commit(listRef.current.map((m) => (m.id === id ? Object.assign({}, m, typeof p === \"function\" ? p(m) : p) : m)));\n  const push = (...msgs: ChatMessage[]) => commit(listRef.current.concat(msgs));\n\n  const fail = (err: unknown): boolean => {\n    const code = ((err as { message?: string })?.message) || String(err || \"error\");\n    onError && onError(err);\n    if (code === CHAT_UNAVAILABLE) { setStatus(\"disconnected\"); setFatal(code); return true; }\n    return false;\n  };\n\n  /* ── thread lifecycle ─────────────────────────────────────────────────── */\n\n  const loadThread = React.useCallback(async (id: string): Promise<ChatMessage[]> => {\n    const data = await apiAdapter!.getThread(id);\n    // Copy: an adapter may hand back a live store array, and this panel pushes\n    // optimistic messages onto its list. Aliasing it double-renders every turn.\n    const list = [...((data && data.messages) || [])];\n    serverCount.current = list.length;\n    serverIds.current = new Set(list.map((m) => m.id));\n    commit(list);\n    return list;\n  }, [apiAdapter]);\n\n  // Re-read the thread mid-turn without disturbing the live turn: server messages\n  // win by id (new cards appear, changed cards update, in server order); local-only\n  // messages (the optimistic user turn and the working placeholder) stay at the end.\n  // SMS-268: the server also lists the live turn's OWN messages (the user's text under an\n  // id of its own, and a running assistant message). The optimistic user message and the\n  // placeholder already stand for them, so they are not listed a second time; the server's\n  // assistant message (the turn row) folds its progress (steps, text, packet) into the placeholder, which\n  // keeps the jobId that Stop needs to cancel the turn.\n  async function mergeThread(): Promise<void> {\n    const data = await apiAdapter!.getThread(threadRef.current!);\n    const server = (data && data.messages) || [];\n    const turn = liveTurn.current;\n    // DS-16: the turn's own server messages split three ways. The person's message is hidden (the\n    // optimistic one stands for it, SMS-268); the LAST assistant entry is the turn's row and folds into\n    // the placeholder; every earlier assistant entry (a background query's live card) stays visible\n    // in server order, just before the placeholder.\n    const ownIds = new Set<string>();\n    const ownAssistants: ChatMessage[] = [];\n    if (turn) {\n      for (const m of server) {\n        if (turn.known.has(m.id)) continue;\n        ownIds.add(m.id);\n        if (m.role === \"assistant\") ownAssistants.push(m);\n      }\n    }\n    const progress = ownAssistants.pop();\n    const cards = ownAssistants;\n    const ids = new Set(server.map((m) => m.id));\n    serverCount.current = server.length;\n    serverIds.current = ids;\n    const settled = server.filter((m) => !ownIds.has(m.id) && !retired.current.has(m.id));\n    const local = listRef.current.filter((m) => !ids.has(m.id));\n    const at = local.findIndex((m) => m.id === turn?.holderId);\n    const tail = at < 0 ? [...cards, ...local] : [...local.slice(0, at), ...cards, ...local.slice(at)];\n    const next = [...settled, ...tail];\n    commit(turn && progress ? next.map((m) => (m.id === turn.holderId ? foldProgress(m, progress) : m)) : next);\n  }\n\n  function foldProgress(holder: ChatMessage, progress: ChatMessage): ChatMessage {\n    return Object.assign({}, holder, {\n      steps: progress.steps ?? holder.steps,\n      text: progress.text || holder.text,\n      packet: progress.packet ?? holder.packet,\n    });\n  }\n\n  React.useEffect(() => {\n    if (!apiAdapter) {\n      // No adapter: load nothing, show nothing. Drop anything a previous adapter left.\n      setStatus(\"idle\"); setFatal(null);\n      commit([]); queueRef.current = []; setQueue([]); serverCount.current = 0;\n      return;\n    }\n    let dead = false;\n    // Abandon anything in flight for the thread we are leaving.\n    if (abortRef.current) { try { abortRef.current.abort(); } catch (e) { /* already settled */ } abortRef.current = null; }\n    busyRef.current = false; setBusy(false); setTurnStartedAt(null);\n    queueRef.current = []; setQueue([]);\n    stoppedRef.current = false;\n    loadedRef.current = false;\n    setStatus(\"resolving\"); setFatal(null);\n    (async () => {\n      try {\n        // An explicit id wins: the host has already created or picked the thread.\n        const id = threadIdProp || await (async () => {\n          const res = await apiAdapter.resolveThread({ contextType, contextId });\n          return res && res.thread_id;\n        })();\n        if (dead) return;\n        if (!id) { setStatus(\"disconnected\"); setFatal(CHAT_UNAVAILABLE); return; }\n        threadRef.current = id; setThreadId(id);\n        setStatus(\"loading\");\n        await loadThread(id);\n        if (dead) return;\n        setStatus(\"ready\");\n        loadedRef.current = true;\n        onThreadReady && onThreadReady(id);\n        const stored = store.get(jobKey(id));\n        const last = [...visibleMessages(listRef.current)].reverse().find((m) => m.role === \"assistant\");\n        if (stored) resumeJob(stored);            // escalation survives remount\n        else if (last && last.working && last.jobId) resumeJob(last.jobId, last.id);   // thread opened mid-turn\n        else if (initialMessage) send(initialMessage);\n        drain();                                  // turns the person sent while the thread loaded\n      } catch (err) {\n        if (dead) return;\n        if (!fail(err)) { setStatus(\"disconnected\"); setFatal(((err as { message?: string })?.message) || \"load_failed\"); }\n      }\n    })();\n    return () => { dead = true; };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [apiAdapter, contextType, contextId, threadIdProp]);\n\n  /* ── job polling ──────────────────────────────────────────────────────── */\n\n  async function pollJob(jobId: string, placeholderId: string): Promise<void> {\n    store.set(jobKey(threadRef.current!), jobId);\n    const deadline = Date.now() + pendingTimeoutMs;\n    while (true) {\n      if (stoppedRef.current) break;\n      await sleep(pollIntervalMs);\n      if (!mounted.current) return;\n      let job: JobStatus | undefined;\n      try {\n        job = await apiAdapter!.getJob(jobId);\n      } catch (err) {\n        // A job can succeed, write its result, then age out of the registry — so\n        // the next poll 404s even though the work landed. Check the thread first.\n        const landed = await didResultLand();\n        if (landed) { finishJob(jobId); return; }\n        recordFailure(placeholderId, ((err as { message?: string })?.message) || \"job_unavailable\", true);\n        return;\n      }\n      patch(placeholderId, { job });\n      const bucket = jobBucket(job && job.status);\n      if (bucket === \"pending\") {\n        try { await mergeThread(); } catch (err) { fail(err); }\n        if (Date.now() >= deadline) break;        // checked only while pending: a terminal status above always wins\n        continue;\n      }\n      if (bucket === \"success\") {\n        finishJob(jobId, job);\n        return;\n      }\n      recordFailure(placeholderId, (job && (job.error || job.status)) || \"job_failed\", true, job);\n      return;\n    }\n    if (!stoppedRef.current) recordFailure(placeholderId, \"timeout\", true);\n  }\n\n  async function didResultLand(): Promise<boolean> {\n    const before = serverCount.current;\n    try {\n      const list = await loadThread(threadRef.current!);\n      return list.length > before;                 // count, not object identity\n    } catch (e) { return false; }\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars -- signature mirrors both call sites (pollJob success, and the post-getJob-404 recovery path)\n  async function finishJob(_jobId: string, _job?: JobStatus): Promise<void> {\n    store.del(jobKey(threadRef.current!));\n    try {\n      const list = await loadThread(threadRef.current!);\n      const withPacket = [...list].reverse().find((m) => m && m.packet);\n      if (withPacket && onPacket && withPacket.packet) onPacket(withPacket.packet);\n    } catch (err) { fail(err); }\n  }\n\n  function recordFailure(placeholderId: string, code: string, retryable: boolean, job?: JobStatus): void {\n    store.del(jobKey(threadRef.current!));\n    // A recovery reload replaces the whole list and can detach the placeholder.\n    // Re-attach it by id, or the error lands on an object nothing renders.\n    if (!listRef.current.some((m) => m.id === placeholderId)) {\n      push({ id: placeholderId, role: \"assistant\", text: null });\n    }\n    patch(placeholderId, { working: false, streaming: false, error: code, retryable: !!retryable, job: job || undefined });\n    onError && onError(new Error(code));\n  }\n\n  function resumeJob(jobId: string, existingId?: string): void {\n    const id = existingId || uid(\"a\");\n    if (existingId) patch(id, { working: true, resumed: true });\n    else push({ id, role: \"assistant\", working: true, jobId, resumed: true });\n    setBusy(true); busyRef.current = true; setTurnStartedAt(Date.now());\n    pollJob(jobId, id).finally(() => { busyRef.current = false; setBusy(false); setTurnStartedAt(null); drain(); });\n  }\n\n  /* ── sending ──────────────────────────────────────────────────────────── */\n\n  async function dispatchTurn(turn: QueuedTurn): Promise<void> {\n    const id = threadRef.current;\n    if (!id) return;\n    busyRef.current = true; setBusy(true); setTurnStartedAt(Date.now());\n    const userId = uid(\"u\");\n    const holderId = uid(\"a\");\n    push(\n      { id: userId, role: \"user\", text: turn.text || null, attachments: turn.attachments, pending: true, timestamp: new Date().toISOString() },\n      { id: holderId, role: \"assistant\", text: \"\", streaming: !!apiAdapter!.streamMessage, working: !apiAdapter!.streamMessage, timestamp: new Date().toISOString() },\n    );\n    liveTurn.current = { known: new Set(serverIds.current), holderId };\n    const ac: AbortLike = typeof AbortController !== \"undefined\" ? new AbortController() : { abort() {}, signal: undefined };\n    abortRef.current = ac;\n    onSend && onSend(turn.text);\n\n    try {\n      let res: SendMessageResult | undefined;\n      if (apiAdapter!.streamMessage) {\n        res = await apiAdapter!.streamMessage(id, turn.text, {\n          onToken: (chunk: string) => patch(holderId, (m) => ({ text: (m.text || \"\") + chunk, streaming: true })),   // chunks append\n          onStep: (step) => patch(holderId, (m) => {\n            const steps = (m.steps || []).slice();\n            const at = steps.findIndex((s) => s.id === step.id);\n            if (at === -1) steps.push(step); else steps[at] = Object.assign({}, steps[at], step);\n            return { steps };\n          }),\n          onThinking: (chunk: string) => patch(holderId, (m) => ({ thinking: (m.thinking || \"\") + chunk })),\n        }, ac.signal as AbortSignal, turn.attachments && turn.attachments.length ? turn.attachments : undefined);\n      } else if (turn.attachments && turn.attachments.length) {\n        res = await apiAdapter!.sendMessage(id, turn.text, ac.signal, turn.attachments);\n      } else {\n        res = await apiAdapter!.sendMessage(id, turn.text, ac.signal);   // same three args as always\n      }\n\n      patch(userId, { pending: false });\n      const r: SendMessageResult = res || {};\n      if (r.dispatched && r.job_id) {\n        patch(holderId, { streaming: false, working: true, jobId: r.job_id, text: r.reply || \"\" });\n        await pollJob(r.job_id, holderId);\n      } else {\n        patch(holderId, {\n          streaming: false, working: false,\n          text: r.reply != null ? r.reply : listRef.current.find((m) => m.id === holderId)?.text || \"\",\n          packet: r.packet, steps: r.steps || listRef.current.find((m) => m.id === holderId)?.steps,\n          citations: r.citations, usage: r.usage, model: r.model,\n          timestamp: new Date().toISOString(),\n        });\n        serverCount.current += 2;\n        if (r.packet && onPacket) onPacket(r.packet);\n      }\n    } catch (err) {\n      const aborted = (err && ((err as { name?: string }).name === \"AbortError\" || (err as { message?: string }).message === \"aborted\")) || stoppedRef.current;\n      patch(userId, { pending: false });\n      if (aborted) {\n        patch(holderId, (m) => ({ streaming: false, working: false, stopped: true, retryable: true, text: m.text || null }));\n      } else if (!fail(err)) {\n        patch(holderId, { streaming: false, working: false, error: ((err as { message?: string })?.message) || \"send_failed\", retryable: true });\n      } else {\n        commit(listRef.current.filter((m) => m.id !== holderId));\n      }\n    } finally {\n      const known = liveTurn.current!.known;\n      lastTurnOwn.current = new Set([...serverIds.current].filter((id) => !known.has(id)));\n      liveTurn.current = null;\n      abortRef.current = null;\n      busyRef.current = false; setBusy(false); setTurnStartedAt(null);\n    }\n  }\n\n  async function drain(): Promise<void> {\n    if (busyRef.current || !loadedRef.current) return;\n    while (queueRef.current.length) {\n      if (stoppedRef.current) return;            // Stop halts the pipeline, not just the request\n      const turn = queueRef.current[0];\n      queueRef.current = queueRef.current.slice(1);\n      setQueue(queueRef.current.slice());\n      await dispatchTurn(turn);\n    }\n  }\n\n  const send = React.useCallback((text: string, attachments?: Attachment[]) => {\n    const body = (text || \"\").trim();\n    if (!body && !(attachments && attachments.length)) return;   // nothing to send\n    if (status === \"disconnected\") return;\n    const turn: QueuedTurn = { id: uid(\"q\"), text: body, attachments: attachments && attachments.length ? attachments.slice() : undefined };\n    queueRef.current = queueRef.current.concat(turn);\n    setQueue(queueRef.current.slice());\n    stoppedRef.current = false;                  // a fresh send always resets the flag\n    drain();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [status]);\n\n  const stop = React.useCallback(() => {\n    stoppedRef.current = true;\n    const ac = abortRef.current;\n    if (ac) { try { ac.abort(); } catch (e) { /* noop */ } }\n    const holder = [...listRef.current].reverse().find((m) => m.working || m.streaming);\n    if (holder) {\n      patch(holder.id, (m) => ({ working: false, streaming: false, stopped: true, retryable: true, text: m.text || null }));\n      if (holder.jobId && apiAdapter && apiAdapter.cancelJob) {\n        // cancelJob gates only the upstream cancel — never the Stop button itself.\n        Promise.resolve(apiAdapter.cancelJob(holder.jobId)).catch(() => {});\n      }\n      store.del(jobKey(threadRef.current!));\n    }\n    // The queue is text the user typed: leave it standing, visible and removable.\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [apiAdapter]);\n\n  const removeQueued = React.useCallback((id: string) => {\n    queueRef.current = queueRef.current.filter((t) => t.id !== id);\n    setQueue(queueRef.current.slice());\n  }, []);\n\n  const retry = React.useCallback(() => {\n    const list = listRef.current;\n    let at = -1;\n    for (let i = list.length - 1; i >= 0; i--) if (list[i].role === \"user\") { at = i; break; }\n    if (at === -1) return;\n    const turn = list[at];\n    commit(list.slice(0, at));                   // a retry reads as one attempt, not a pile\n    serverCount.current = Math.max(0, serverCount.current - 1);\n    lastTurnOwn.current.forEach((id) => retired.current.add(id));\n    stoppedRef.current = false;\n    queueRef.current = ([{ id: uid(\"q\"), text: turn.text || \"\", attachments: turn.attachments }] as QueuedTurn[]).concat(queueRef.current);\n    setQueue(queueRef.current.slice());\n    drain();\n  }, []);\n\n  const clear = React.useCallback(() => {\n    commit([]); serverCount.current = 0;\n    queueRef.current = []; setQueue([]);\n    onClear && onClear();\n  }, [onClear]);\n\n  const setFeedback = React.useCallback((id: string, value: \"up\" | \"down\") => {\n    patch(id, (m) => ({ feedback: m.feedback === value ? null : value }));\n    const msg = listRef.current.find((m) => m.id === id);\n    onFeedback && onFeedback({ message: msg, feedback: msg ? msg.feedback : value });\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [onFeedback]);\n\n  const reload = React.useCallback(async () => {\n    if (!threadRef.current) return;\n    setStatus(\"loading\");\n    try { await loadThread(threadRef.current!); setStatus(\"ready\"); }\n    catch (err) { if (!fail(err)) setStatus(\"ready\"); }\n  }, [loadThread]);\n\n  // DS-28: re-read for an item the app added outside a chat turn. Unlike reload() it keeps status\n  // (no skeleton) and merges, so a live turn's optimistic message and placeholder survive.\n  const refresh = React.useCallback(async () => {\n    if (!threadRef.current) return;\n    try { await mergeThread(); } catch (err) { fail(err); }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [apiAdapter]);\n\n  return {\n    status, threadId, messages, visible: visibleMessages(messages), queue,\n    busy, fatal, turnStartedAt,\n    send, stop, retry, clear, removeQueued, setFeedback, reload, refresh,\n    canSend: status === \"ready\",\n  };\n}\n\n/**\n * Namespace export. The bundle exposes only capital-initial names, so this is how a\n * consuming project reaches the state machine to build its own shell:\n *\n *   const { useChatEngine } = window.<Namespace>.ChatKit;\n *   const chat = useChatEngine({ contextType, contextId, apiAdapter });\n */\nexport const ChatKit = {\n  useChatEngine,\n  visibleMessages,\n  isSystemMessage,\n  jobBucket,\n  CHAT_UNAVAILABLE,\n};\n","import * as React from \"react\";\n\nexport type ChatStore = { get(k: string): string | null; set(k: string, v: string): void; del(k: string): void };\n\n/** sessionStorage that cannot throw — private-mode browsers expose it and throw on use. */\nexport const safeStore: ChatStore = {\n  get(k) { try { return window.sessionStorage.getItem(k); } catch (e) { return null; } },\n  set(k, v) { try { window.sessionStorage.setItem(k, v); } catch (e) { /* noop */ } },\n  del(k) { try { window.sessionStorage.removeItem(k); } catch (e) { /* noop */ } },\n};\n\n/* The one place the \"fdchat:\" session-storage namespace is defined. */\nconst part = (v: string) => encodeURIComponent(v);\n/** The record of the job a thread is running, so an escalation survives a remount. */\nexport const jobKey = (threadId: string) => \"fdchat:job:\" + part(threadId);\n/** One owner's unsent composer text in one conversation. */\nexport const draftKey = (owner: string, contextType: string, contextId: string) =>\n  \"fdchat:draft:\" + [owner, contextType, contextId].map(part).join(\":\");\n\n/**\n * DS-20: the composer's unsent text, kept per owner and conversation OUTSIDE the panel's component state so it\n * survives the panel being unmounted and mounted again (a host that moves the panel between a docked sidebar and\n * a sheet remounts it). Stored in the same per-tab sessionStorage as the engine's running-job record, keyed by\n * the owner (the signed-in user's id, from the host) and the conversation, so one person's draft is never shown\n * to the next person on the same tab. A null owner means the host has no one to scope to: the draft then lives\n * only in this mounted panel and is never stored; an empty-string owner is a host bug and throws. A write the store\n * did not keep (quota) removes the key, so a remount never restores an older draft than the one on screen. An empty draft (after a send, or cleared) removes the key.\n */\nexport function useChatDraft(owner: string | null, contextType: string, contextId: string, store: ChatStore = safeStore): [string, (text: string) => void] {\n  if (owner === \"\") throw new Error(\"useChatDraft: draftOwner is an empty string; pass the signed-in user's id, or null for no owner.\");\n  const key = owner === null ? null : draftKey(owner, contextType, contextId);\n  const read = (k: string | null) => (k ? store.get(k) || \"\" : \"\");\n  const [state, setState] = React.useState(() => ({ key, text: read(key) }));\n  // A different owner or conversation: read its draft in the same render, not a frame later.\n  let current = state;\n  if (state.key !== key) { current = { key, text: read(key) }; setState(current); }\n  const setText = React.useCallback((text: string) => {\n    if (key) {\n      if (text) { store.set(key, text); if (store.get(key) !== text) store.del(key); } else store.del(key);\n    }\n    setState({ key, text });\n  }, [key, store]);\n  return [current.text, setText];\n}\n","import * as React from \"react\";\nimport { ChatTurn } from \"./ChatTurn\";\nimport type { ChatRenderContext, MessageGroup } from \"./ChatTurn\";\nimport type { ChatMessage } from \"./chatEngine\";\nimport type { Suggestion } from \"./AgentChatPanel\";\n\nconst GROUP_WINDOW = 60e3;\nconst STICK_PX = 100;\n\n/** Consecutive messages from one sender inside 60s share a head. Anything\n *  carrying a packet, steps or an error always starts its own group. */\nexport function groupMessages(list: ChatMessage[]): MessageGroup[] {\n  const groups: Array<MessageGroup & { t: number | null }> = [];\n  (list || []).forEach((m) => {\n    const solo = !!(m.packet || (m.steps && m.steps.length) || m.error || m.working || m.stopped);\n    const prev = groups[groups.length - 1];\n    const t = m.timestamp ? Date.parse(m.timestamp) : null;\n    const close = prev && prev.t != null && t != null ? Math.abs(t - prev.t) < GROUP_WINDOW : !!prev;\n    if (prev && !prev.solo && !solo && prev.role === m.role && (prev.author || \"\") === (m.author || \"\") && close) {\n      prev.messages.push(m);\n      prev.t = t == null ? prev.t : t;\n      return;\n    }\n    groups.push({ role: m.role, author: m.author, messages: [m], t, solo, key: m.id });\n  });\n  return groups;\n}\n\nconst dayKey = (iso: string | undefined): string | null => {\n  const d = iso ? new Date(iso) : null;\n  return d && !isNaN(d.getTime()) ? d.toDateString() : null;\n};\n\nfunction dayLabel(key: string): string {\n  const d = new Date(key);\n  const today = new Date().toDateString();\n  const yest = new Date(Date.now() - 864e5).toDateString();\n  if (key === today) return \"Today\";\n  if (key === yest) return \"Yesterday\";\n  return d.toLocaleDateString([], { weekday: \"long\", day: \"numeric\", month: \"long\" });\n}\n\nfunction Suggestions({ items = [], onPick }: { items?: Array<Suggestion | string>; onPick?: (s: Suggestion | string) => void }) {\n  if (!items.length) return null;\n  return (\n    <div className=\"fdc-suggest\">\n      {items.map((s, i) => {\n        const it: Suggestion = typeof s === \"string\" ? { label: s, text: s } : s;\n        return (\n          <button type=\"button\" key={it.id || i} className=\"fdc-suggest-item\" onClick={() => onPick && onPick(it.text || it.label)}>\n            {it.icon ? <i className={\"ph ph-\" + it.icon} aria-hidden=\"true\" /> : null}\n            <span className=\"fdc-suggest-text\">\n              <span className=\"fdc-suggest-label\">{it.label}</span>\n              {it.description ? <span className=\"fdc-suggest-desc\">{it.description}</span> : null}\n            </span>\n            <i className=\"ph ph-arrow-up-right fdc-suggest-go\" aria-hidden=\"true\" />\n          </button>\n        );\n      })}\n    </div>\n  );\n}\n\nfunction LoadingTurns() {\n  return (\n    <div className=\"fdc-skel\" aria-hidden=\"true\">\n      {[0, 1].map((i) => (\n        <div key={i} className=\"fdc-skel-turn\">\n          <div className=\"fd-skel fd-skel-circle\" style={{ width: 22, height: 22 }} />\n          <div className=\"fdc-skel-lines\">\n            <div className=\"fd-skel\" style={{ width: i ? \"62%\" : \"44%\", height: 11 }} />\n            <div className=\"fd-skel\" style={{ width: i ? \"94%\" : \"78%\", height: 11 }} />\n            <div className=\"fd-skel\" style={{ width: i ? \"71%\" : \"56%\", height: 11 }} />\n          </div>\n        </div>\n      ))}\n    </div>\n  );\n}\n\n/**\n * Runs of consecutive messages from one sender, for run-vs-turn spacing.\n * `role=\"log\"` and deliberately NOT also aria-live — a live region on a\n * transcript makes a screen reader announce every token of a streaming reply.\n */\nexport interface ChatTranscriptProps {\n  messages?: ChatMessage[];\n  ctx: ChatRenderContext;\n  status?: \"idle\" | \"resolving\" | \"loading\" | \"ready\" | \"disconnected\";\n  /** Terminal error code; renders the disconnected state. */\n  fatal?: string | null;\n  suggestions?: Array<Suggestion | string>;\n  onPick?: (s: Suggestion | string) => void;\n  emptyTitle?: string;\n  emptyDescription?: string;\n  emptyIcon?: string;\n  renderEmpty?: () => React.ReactNode;\n  className?: string;\n}\n\n/**\n * The transcript: a role=\"log\" region (and deliberately not aria-live too —\n * that doubles announcements). Grouping, day dividers, and an auto-scroll that\n * follows only while the reader is already at the bottom.\n */\nexport function ChatTranscript({\n  messages = [], ctx, status, fatal, suggestions = [], onPick,\n  emptyTitle = \"How can I help?\", emptyDescription, emptyIcon = \"chat-teardrop-dots\",\n  renderEmpty, className = \"\",\n}: ChatTranscriptProps) {\n  const scroller = React.useRef<HTMLDivElement | null>(null);\n  const stick = React.useRef(true);\n  const [pill, setPill] = React.useState(0);\n  const seen = React.useRef(0);\n\n  const toBottom = (smooth?: boolean) => {\n    const el = scroller.current;\n    if (!el) return;\n    // Scroll the container, never the page.\n    el.scrollTo({ top: el.scrollHeight, behavior: smooth ? \"smooth\" : \"auto\" });\n    stick.current = true;\n    setPill(0);\n    seen.current = messages.length;\n  };\n\n  const onScroll = () => {\n    const el = scroller.current;\n    if (!el) return;\n    const gap = el.scrollHeight - el.scrollTop - el.clientHeight;\n    stick.current = gap <= STICK_PX;\n    if (stick.current && pill) { setPill(0); seen.current = messages.length; }\n  };\n\n  React.useLayoutEffect(() => {\n    const el = scroller.current;\n    if (!el) return;\n    if (stick.current) { el.scrollTop = el.scrollHeight; seen.current = messages.length; }\n    else setPill(Math.max(0, messages.length - seen.current));\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [messages]);\n\n  // Content that settles late — webfonts, images, a code block unfolding — must\n  // not leave a \"stuck to bottom\" reader stranded mid-transcript.\n  React.useEffect(() => {\n    const el = scroller.current;\n    const inner = el && (el.firstChild as Element | null);\n    if (!el || !inner || typeof ResizeObserver === \"undefined\") return;\n    const ro = new ResizeObserver(() => { if (stick.current) el.scrollTop = el.scrollHeight; });\n    ro.observe(inner);\n    return () => ro.disconnect();\n  }, []);\n\n  const groups = React.useMemo(() => groupMessages(messages), [messages]);\n  const empty = !messages.length && status === \"ready\";\n\n  return (\n    <div className={[\"fdc-scroll\", className].filter(Boolean).join(\" \")} ref={scroller} onScroll={onScroll}>\n      <div className=\"fdc-log\" role=\"log\" aria-label=\"Conversation\">\n        {status === \"loading\" || status === \"resolving\" ? <LoadingTurns /> : null}\n\n        {status === \"disconnected\" ? (\n          <div className=\"fdc-dead\">\n            <span className=\"fdc-dead-icon\"><i className=\"ph ph-plugs\" aria-hidden=\"true\" /></span>\n            <h3 className=\"fdc-dead-title\">{ctx.deadTitle || \"The assistant isn’t reachable\"}</h3>\n            <p className=\"fdc-dead-body\">\n              {fatal === \"chat_unavailable\"\n                ? \"The service reported chat_unavailable. Nothing you type will be lost — reopen the panel once it’s back.\"\n                : \"The thread couldn’t be resolved\" + (fatal ? \" (\" + fatal + \")\" : \"\") + \". The composer stays disabled until it resolves.\"}\n            </p>\n            {ctx.onReconnect ? (\n              <button type=\"button\" className=\"fd-btn fd-btn-secondary fd-btn-sm\" onClick={ctx.onReconnect}>\n                <i className=\"ph ph-arrow-clockwise\" aria-hidden=\"true\" />Try again\n              </button>\n            ) : null}\n          </div>\n        ) : null}\n\n        {empty ? (\n          renderEmpty ? renderEmpty() : (\n            <div className=\"fdc-empty\">\n              <span className=\"fdc-empty-icon\"><i className={\"ph ph-\" + emptyIcon} aria-hidden=\"true\" /></span>\n              <h3 className=\"fdc-empty-title\">{emptyTitle}</h3>\n              {emptyDescription ? <p className=\"fdc-empty-body\">{emptyDescription}</p> : null}\n              <Suggestions items={suggestions} onPick={onPick} />\n            </div>\n          )\n        ) : null}\n\n        {groups.map((g, i) => {\n          const prev = groups[i - 1];\n          const k = dayKey(g.messages[0].timestamp);\n          const showDay = !!k && (!prev || dayKey(prev.messages[0].timestamp) !== k);\n          return (\n            <React.Fragment key={g.key || i}>\n              {showDay ? <div className=\"fdc-day\"><span>{dayLabel(k!)}</span></div> : null}\n              <ChatTurn group={g} ctx={ctx} />\n            </React.Fragment>\n          );\n        })}\n      </div>\n\n      {pill ? (\n        <button type=\"button\" className=\"fdc-pill\" onClick={() => toBottom(true)}>\n          <i className=\"ph ph-arrow-down\" aria-hidden=\"true\" />\n          {pill} new message{pill === 1 ? \"\" : \"s\"}\n        </button>\n      ) : null}\n    </div>\n  );\n}\n\n/** Namespace export — grouping helper, for consumers rendering their own transcript. */\nexport const TranscriptKit = { groupMessages };\n","import * as React from \"react\";\nimport type { Attachment } from \"../../kits/files\";\nimport { Markdown, markdownToText } from \"../data/Markdown\";\nimport { CodeBlock } from \"../data/CodeBlock\";\nimport { StepList } from \"../data/StepList\";\nimport { truncationTitle } from \"../textExposure\";\nimport { Button } from \"../actions/Button\";\nimport { Banner } from \"../feedback/Banner\";\nimport { Badge } from \"../feedback/Badge\";\nimport { FileGrid } from \"../forms/FileGrid\";\nimport { formatClock, formatDuration, RelativeTime } from \"../data/RelativeTime\";\nimport { useCopyToClipboard } from \"../../kits/clipboard\";\nimport type { Citation, ChatMessage, Packet, PacketSchema, PacketDecision, PacketDecisionAction, PacketDecisionState } from \"./chatEngine\";\n\n/**\n * Render context, built once by AgentChatPanel and threaded into every part.\n * Assembling your own shell means supplying this yourself.\n */\nexport interface ChatRenderContext {\n  assistantName?: string;\n  userName?: string;\n  assistantAvatar?: string;\n  userAvatar?: string;\n  /** Phosphor name for the assistant mark. Default \"sparkle\". */\n  assistantIcon?: string;\n  showAvatars?: boolean;\n  markdown?: boolean;\n  /** Clamp threshold before Show more. 0 disables. */\n  maxVisibleChars?: number;\n  messageActions?: boolean;\n  showSteps?: boolean;\n  showThinking?: boolean;\n  packetSchemas?: Record<string, PacketSchema>;\n  packetRenderers?: Record<string, (p: Packet) => React.ReactNode>;\n  appliedPackets?: Record<string, boolean>;\n  /** Decision mode per packet type (see PacketCard `decision`). */\n  packetDecisions?: Record<string, PacketDecision>;\n  /** Sidebar-width layout: tighter padding, stacked controls. */\n  narrow?: boolean;\n  onOpenAttachment?: (a: Attachment) => void;\n  /** Max height (px) of the attachment grid before it scrolls. Default 220. */\n  attachmentHeight?: number;\n  /** Renderer for `[^n]` citation markers inside markdown bodies. */\n  renderCitation?: (marker: string) => React.ReactNode;\n  /** Map a backend error code to human copy. */\n  errorCopy?: (code: string) => React.ReactNode;\n  onRetry?: () => void;\n  onFeedback?: (id: string, value: \"up\" | \"down\") => void;\n  onEdit?: (m: ChatMessage) => void;\n  onApplyPacket?: (p: Packet) => void;\n  onOpenCitation?: (c: Citation, e: React.MouseEvent) => void;\n  extraActions?: (group: MessageGroup) => React.ReactNode;\n  /** Disconnected-state heading. Default \"The assistant isn't reachable\". */\n  deadTitle?: string;\n  onReconnect?: () => void;\n}\n\n/** A run of consecutive messages from one sender — see groupMessages. */\nexport interface MessageGroup {\n  role: string;\n  author?: string;\n  messages: ChatMessage[];\n  /** A single-message run; affects spacing and the author label. */\n  solo: boolean;\n  key: string;\n}\n\n/* ── packets ──────────────────────────────────────────────────────────────── */\n\nfunction JsonView({ value }: { value: unknown }) {\n  let text: string | undefined;\n  try { text = JSON.stringify(value, null, 2); } catch (e) { text = String(value); }\n  return <CodeBlock code={text as string} language=\"json\" collapseAfter={18} />;\n}\n\n/** A structured result. `valid: false` blocks Apply; undefined does not. */\nexport interface PacketCardProps {\n  packet: Packet; schema?: PacketSchema; render?: (p: Packet) => React.ReactNode; onApply?: (p: Packet) => void; applied?: boolean;\n  /** Decision mode: a status badge, a pinned Confirm/Dismiss footer, then the outcome. Replaces the Apply footer. */\n  decision?: PacketDecision;\n}\n\nfunction DecisionFooter({ packet, decision, state }: { packet: Packet; decision: PacketDecision; state: PacketDecisionState }) {\n  const [pending, setPending] = React.useState<PacketDecisionAction | null>(null);\n  const [failure, setFailure] = React.useState<string | null>(null);\n  const mounted = React.useRef(true);\n  React.useEffect(() => { mounted.current = true; return () => { mounted.current = false; }; }, []);\n  const press = (action: PacketDecisionAction) => {\n    if (pending) return;\n    setPending(action);\n    setFailure(null);\n    decision.onDecide(action, packet).then(\n      () => { if (mounted.current) setPending(null); },\n      (e: unknown) => {\n        if (!mounted.current) return;\n        setPending(null);\n        setFailure(e instanceof Error && e.message ? e.message : \"That didn’t go through.\");\n      },\n    );\n  };\n  const error = failure !== null ? failure : state.error;\n  return (\n    <>\n      {error ? (\n        <div className=\"fdc-packet-decision-msg\"><Banner tone=\"danger\" title={error} /></div>\n      ) : null}\n      <footer className=\"fdc-packet-foot fdc-packet-decision\">\n        <Button variant=\"secondary\" size=\"sm\" loading={pending === \"dismiss\"} disabled={pending === \"confirm\"} onClick={() => press(\"dismiss\")}>\n          {decision.dismissLabel || \"Dismiss\"}\n        </Button>\n        <Button variant=\"primary\" size=\"sm\" loading={pending === \"confirm\"} disabled={pending === \"dismiss\"} onClick={() => press(\"confirm\")}>\n          {decision.confirmLabel || \"Confirm\"}\n        </Button>\n      </footer>\n    </>\n  );\n}\n\n/**\n * A structured result carried by a message. `valid` is tri-state: only an\n * explicit `false` blocks Apply — an unvalidated packet is a legitimate result.\n */\nexport function PacketCard({ packet, schema, render, onApply, applied, decision }: PacketCardProps) {\n  if (!packet) return null;\n  const s = schema || {};\n  const state: PacketDecisionState = decision ? decision.state(packet) : {};\n  const invalid = packet.valid === false;\n  const title = s.heading || packet.type;\n  return (\n    <section className={\"fdc-packet\" + (invalid ? \" is-invalid\" : \"\")} aria-label={title}>\n      <header className=\"fdc-packet-head\">\n        <i className={\"ph ph-\" + (s.icon || \"package\")} aria-hidden=\"true\" />\n        <span className=\"fdc-packet-title\" title={truncationTitle(title)}>{title}</span>\n        {packet.repaired ? <span className=\"fdc-packet-badge\">Repaired</span> : null}\n        {invalid ? <span className=\"fdc-packet-badge is-danger\">Invalid</span> : null}\n        {decision && state.status ? <Badge tone={state.status.tone}>{state.status.label}</Badge> : null}\n      </header>\n      {invalid ? (\n        <div className=\"fdc-packet-alert\" role=\"alert\">\n          <i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />\n          <span>{packet.error || \"This result failed validation and can’t be applied.\"}</span>\n        </div>\n      ) : (\n        <div className=\"fdc-packet-body\">\n          {render ? render(packet) : <JsonView value={packet.payload} />}\n        </div>\n      )}\n      {!invalid && decision ? (\n        state.outcome ? (\n          <div className=\"fdc-packet-decision-msg\"><Banner tone={state.outcome.tone === \"success\" ? \"ok\" : \"danger\"} role=\"status\" title={state.outcome.message} /></div>\n        ) : <DecisionFooter packet={packet} decision={decision} state={state} />\n      ) : !invalid && onApply && s.apply !== false ? (\n        <footer className=\"fdc-packet-foot\">\n          {packet.repaired ? <span className=\"fdc-packet-note\">Corrected by the backend after a first attempt.</span> : <span />}\n          <button type=\"button\" className=\"fd-btn fd-btn-primary fd-btn-sm\" disabled={applied} onClick={() => onApply(packet)}>\n            <i className={\"ph ph-\" + (applied ? \"check\" : \"arrow-square-in\")} aria-hidden=\"true\" />\n            {applied ? \"Applied\" : (s.applyLabel || \"Apply\")}\n          </button>\n        </footer>\n      ) : null}\n    </section>\n  );\n}\n\n/* ── thinking ─────────────────────────────────────────────────────────────── */\n\nexport interface ThinkingBlockProps { text?: string; durationMs?: number; streaming?: boolean; defaultOpen?: boolean }\n\nexport function ThinkingBlock({ text, durationMs, streaming, defaultOpen = false }: ThinkingBlockProps) {\n  const [open, setOpen] = React.useState(defaultOpen);\n  if (!text) return null;\n  return (\n    <div className={\"fdc-think\" + (open ? \" is-open\" : \"\")}>\n      <button type=\"button\" className=\"fdc-think-head\" onClick={() => setOpen((v) => !v)} aria-expanded={open}>\n        <i className=\"ph ph-brain\" aria-hidden=\"true\" />\n        <span>{streaming ? \"Thinking\" : durationMs ? \"Thought for \" + formatDuration(durationMs) : \"Thought process\"}</span>\n        {streaming ? <span className=\"fdc-dots\" aria-hidden=\"true\"><span /><span /><span /></span> : null}\n        <i className={\"ph ph-caret-\" + (open ? \"up\" : \"down\")} aria-hidden=\"true\" />\n      </button>\n      {open ? <div className=\"fdc-think-body\">{text}</div> : null}\n    </div>\n  );\n}\n\n/* ── citations ────────────────────────────────────────────────────────────── */\n\nexport interface CitationsProps { items?: Citation[]; onOpen?: (c: Citation, e: React.MouseEvent) => void }\n\nexport function Citations({ items = [], onOpen }: CitationsProps) {\n  const [open, setOpen] = React.useState(false);\n  if (!items.length) return null;\n  return (\n    <div className=\"fdc-cites\">\n      <button type=\"button\" className=\"fdc-cites-head\" onClick={() => setOpen((v) => !v)} aria-expanded={open}>\n        <i className=\"ph ph-quotes\" aria-hidden=\"true\" />\n        <span>{items.length} source{items.length === 1 ? \"\" : \"s\"}</span>\n        <i className={\"ph ph-caret-\" + (open ? \"up\" : \"down\")} aria-hidden=\"true\" />\n      </button>\n      {open ? (\n        <ol className=\"fdc-cites-list\">\n          {items.map((c, i) => (\n            <li key={c.id || i}>\n              <span className=\"fdc-cite-n fd-tabular\">{c.marker || i + 1}</span>\n              {c.url ? (\n                <a href={c.url} target=\"_blank\" rel=\"noopener noreferrer\" onClick={onOpen ? (e) => onOpen(c, e) : undefined}>{c.title || c.url}</a>\n              ) : <span>{c.title || \"Source\"}</span>}\n              {c.detail ? <span className=\"fdc-cite-detail\">{c.detail}</span> : null}\n            </li>\n          ))}\n        </ol>\n      ) : null}\n    </div>\n  );\n}\n\n/* ── message body ─────────────────────────────────────────────────────────── */\n\nfunction clampText(text: string, max?: number): string | null {\n  if (!max || !text || text.length <= max) return null;\n  const cut = text.slice(0, max);\n  const at = cut.lastIndexOf(\" \");\n  return (at > max * 0.6 ? cut.slice(0, at) : cut).trimEnd() + \"…\";\n}\n\n/** Message content only — markdown, code blocks, clamping. No chrome. */\nexport interface MessageBodyProps { message: ChatMessage; ctx: ChatRenderContext }\n\nexport function MessageBody({ message: m, ctx }: MessageBodyProps) {\n  const [expanded, setExpanded] = React.useState(false);\n  const isUser = m.role === \"user\";\n  const raw = m.text || \"\";\n  const clamped = !expanded && !m.streaming ? clampText(raw, ctx.maxVisibleChars) : null;\n  const body = clamped != null ? clamped : raw;\n  const showMd = ctx.markdown && !isUser;\n\n  return (\n    <div className=\"fdc-body\">\n      {m.thinking && ctx.showThinking ? (\n        <ThinkingBlock text={m.thinking} durationMs={m.thinkingMs} streaming={m.streaming && !m.text} />\n      ) : null}\n\n      {m.steps && m.steps.length && ctx.showSteps ? (\n        <StepList steps={m.steps} defaultOpen={m.steps.some((s) => s.status === \"running\")} active={!!m.working} dense />\n      ) : null}\n\n      {body ? (\n        <div className={\"fdc-text\" + (isUser ? \" is-user\" : \"\")}>\n          {showMd\n            ? <Markdown source={body} headingOffset={2} codeProps={{ collapseAfter: 22 }} renderCitation={ctx.renderCitation} />\n            : <div className=\"fdc-plain\">{body}</div>}\n          {m.streaming ? <span className=\"fdc-caret\" aria-hidden=\"true\" /> : null}\n        </div>\n      ) : null}\n\n      {clamped != null ? (\n        <button type=\"button\" className=\"fdc-more\" onClick={() => setExpanded(true)}>\n          <i className=\"ph ph-caret-down\" aria-hidden=\"true\" />Show more\n          <span className=\"fdc-more-len fd-tabular\">{raw.length < 2000 ? raw.length.toLocaleString() + \" characters\" : (Math.round(raw.length / 100) / 10) + \"k characters\"}</span>\n        </button>\n      ) : expanded && ctx.maxVisibleChars && raw.length > ctx.maxVisibleChars ? (\n        <button type=\"button\" className=\"fdc-more\" onClick={() => setExpanded(false)}>\n          <i className=\"ph ph-caret-up\" aria-hidden=\"true\" />Show less\n        </button>\n      ) : null}\n\n      {m.attachments && m.attachments.length ? (\n        <FileGrid files={m.attachments} onOpen={ctx.onOpenAttachment} tiles maxHeight={ctx.attachmentHeight || 220} compact={ctx.narrow} />\n      ) : null}\n\n      {m.packet ? (\n        <PacketCard\n          packet={m.packet}\n          schema={(ctx.packetSchemas || {})[m.packet.type]}\n          render={(ctx.packetRenderers || {})[m.packet.type]}\n          onApply={ctx.onApplyPacket}\n          decision={(ctx.packetDecisions || {})[m.packet.type]}\n          applied={ctx.appliedPackets && ctx.appliedPackets[m.id]}\n        />\n      ) : null}\n\n      {m.citations && m.citations.length ? <Citations items={m.citations} onOpen={ctx.onOpenCitation} /> : null}\n\n      {m.working ? (\n        <div className=\"fdc-working\" role=\"status\">\n          <span className=\"fdc-dots\" aria-hidden=\"true\"><span /><span /><span /></span>\n          <span className=\"fdc-working-label\">\n            {m.waitingFor || (m.resumed ? \"Resuming\" : \"Working\")}\n            {/* The job's status word (\"running\") is dropped while waiting: waitingFor already says what is happening. The job's detail text stays. */}\n            {!m.waitingFor && m.job && m.job.status ? <span className=\"fdc-working-job\"> · {m.job.status}</span> : null}\n            {m.job && m.job.detail ? <span className=\"fdc-working-job\"> · {m.job.detail}</span> : null}\n          </span>\n        </div>\n      ) : null}\n\n      {m.stopped ? <div className=\"fdc-stopped\"><i className=\"ph ph-stop-circle\" aria-hidden=\"true\" />Stopped</div> : null}\n\n      {m.error ? (\n        <div className=\"fdc-error\" role=\"alert\">\n          <i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />\n          <span className=\"fdc-error-text\">{ctx.errorCopy ? ctx.errorCopy(m.error) : m.error}</span>\n          {m.retryable && ctx.onRetry ? (\n            <button type=\"button\" className=\"fdc-error-retry\" onClick={ctx.onRetry}>\n              <i className=\"ph ph-arrow-clockwise\" aria-hidden=\"true\" />Retry\n            </button>\n          ) : null}\n        </div>\n      ) : null}\n    </div>\n  );\n}\n\n/* ── run actions ──────────────────────────────────────────────────────────── */\n\n/** Copy / retry / feedback / edit. Real buttons; the hover reveal is CSS only. */\nexport interface RunActionsProps { group: MessageGroup; ctx: ChatRenderContext }\n\n/**\n * One toolbar per run — copying the whole run, not one message. Buttons stay in\n * the DOM (the reveal is CSS only), so keyboard and screen-reader users, who\n * never produce a hover, can still reach them.\n */\nexport function RunActions({ group, ctx }: RunActionsProps) {\n  const [copied, copy] = useCopyToClipboard();\n  const last = group.messages[group.messages.length - 1];\n  const text = group.messages.map((m) => m.text || \"\").filter(Boolean).join(\"\\n\\n\");\n  const isAssistant = group.role === \"assistant\";\n  const fb = last.feedback;\n  if (!ctx.messageActions) return null;\n  return (\n    <div className=\"fdc-actions\" role=\"group\" aria-label=\"Message actions\">\n      <button type=\"button\" className={\"fdc-act\" + (copied ? \" is-done\" : \"\")} onClick={() => copy(markdownToText(text))} aria-label=\"Copy message\">\n        <i className={\"ph ph-\" + (copied ? \"check\" : \"copy\")} aria-hidden=\"true\" />\n        <span className=\"fdc-act-label\">{copied ? \"Copied\" : \"Copy\"}</span>\n      </button>\n      {isAssistant && ctx.onRetry ? (\n        <button type=\"button\" className=\"fdc-act\" onClick={ctx.onRetry} aria-label=\"Retry this turn\">\n          <i className=\"ph ph-arrow-clockwise\" aria-hidden=\"true\" />\n        </button>\n      ) : null}\n      {group.role === \"user\" && ctx.onEdit ? (\n        <button type=\"button\" className=\"fdc-act\" onClick={() => ctx.onEdit!(last)} aria-label=\"Edit and resend\">\n          <i className=\"ph ph-pencil-simple\" aria-hidden=\"true\" />\n        </button>\n      ) : null}\n      {isAssistant && ctx.onFeedback ? (\n        <React.Fragment>\n          <button type=\"button\" className={\"fdc-act\" + (fb === \"up\" ? \" is-on\" : \"\")} onClick={() => ctx.onFeedback!(last.id, \"up\")} aria-pressed={fb === \"up\"} aria-label=\"Good response\">\n            <i className=\"ph ph-thumbs-up\" aria-hidden=\"true\" />\n          </button>\n          <button type=\"button\" className={\"fdc-act\" + (fb === \"down\" ? \" is-on\" : \"\")} onClick={() => ctx.onFeedback!(last.id, \"down\")} aria-pressed={fb === \"down\"} aria-label=\"Bad response\">\n            <i className=\"ph ph-thumbs-down\" aria-hidden=\"true\" />\n          </button>\n        </React.Fragment>\n      ) : null}\n      {ctx.extraActions ? ctx.extraActions(group) : null}\n    </div>\n  );\n}\n\n/* ── the turn ─────────────────────────────────────────────────────────────── */\n\n/** One turn: author label, body, attachments, packet, thinking, citations, actions. */\nexport interface ChatTurnProps { group: MessageGroup; ctx: ChatRenderContext }\n\nexport function ChatTurn({ group, ctx }: ChatTurnProps) {\n  const isUser = group.role === \"user\";\n  const name = isUser ? ctx.userName : (group.author || ctx.assistantName);\n  const avatar = isUser ? ctx.userAvatar : ctx.assistantAvatar;\n  const stamp = group.messages[0].timestamp;\n\n  return (\n    <article className={\"fdc-turn is-\" + group.role} aria-label={String(name) + (stamp ? \" at \" + formatClock(stamp) : \"\")}>\n      <div className=\"fdc-turn-head\">\n        {ctx.showAvatars ? (\n          <span className={\"fdc-avatar is-\" + group.role} aria-hidden=\"true\">\n            {avatar ? <img src={avatar} alt=\"\" /> : isUser\n              ? <span className=\"fdc-avatar-txt\">{(name || \"You\").slice(0, 1).toUpperCase()}</span>\n              : <i className={\"ph ph-\" + (ctx.assistantIcon || \"sparkle\")} />}\n          </span>\n        ) : null}\n        <span className=\"fdc-who\">{name}</span>\n        {stamp ? <RelativeTime className=\"fdc-when\" value={stamp} /> : null}\n        {group.messages.some((m) => m.model) ? <span className=\"fdc-turn-model\">{group.messages.find((m) => m.model)!.model}</span> : null}\n      </div>\n      <div className=\"fdc-turn-body\">\n        {group.messages.map((m) => (\n          <div key={m.id} className={\"fdc-msg\" + (m.pending ? \" is-pending\" : \"\")}>\n            <MessageBody message={m} ctx={ctx} />\n          </div>\n        ))}\n        <RunActions group={group} ctx={ctx} />\n      </div>\n    </article>\n  );\n}\n","import * as React from \"react\";\nimport { MarkdownEditor } from \"../forms/MarkdownEditor\";\nimport type { MarkdownEditorHandle, EditorTrigger } from \"../forms/MarkdownEditor\";\nimport { Dropzone, FilePickButton, useStagedFiles } from \"../forms/Dropzone\";\nimport type { FileUploadHandler } from \"../forms/Dropzone\";\nimport { truncationTitle } from \"../textExposure\";\nimport { FileStrip } from \"../forms/FileGrid\";\nimport { Popover, Menu } from \"../actions/Popover\";\nimport type { MenuItem } from \"../actions/Popover\";\nimport { extractClipboardFiles } from \"../../kits/files\";\nimport type { Attachment, FileRejection } from \"../../kits/files\";\nimport { KeyHint } from \"../feedback/KeyHint\";\nimport type { SlashCommand, MentionSource, VoiceHandler } from \"./AgentChatPanel\";\n\n/**\n * Staged files, the queue strip, the markdown editor, slash/mention triggers, send + stop.\n * Enter sends, Shift+Enter continues the list or quote you are in, IME composition never\n * sends. Omit `fileUploadHandler` and there is no attach affordance at all — a pasted\n * image then falls through to the editor rather than stranding on a message that cannot\n * carry it.\n */\nexport interface ChatComposerProps {\n  onSubmit: (text: string, attachments?: Attachment[]) => void;\n  /** Offered whenever a turn is in flight, even with no upstream cancel. */\n  onStop?: () => void;\n  busy?: boolean;\n  disabled?: boolean;\n  placeholder?: string;\n  maxLength?: number;\n  fileUploadHandler?: FileUploadHandler;\n  acceptFiles?: string;\n  maxFileSize?: number;\n  /** Chars above which a paste becomes a .txt attachment. Default 4000. */\n  largePasteThreshold?: number;\n  slashCommands?: SlashCommand[];\n  mentionSources?: MentionSource[] | ((query: string) => Promise<MentionSource[]>);\n  voiceHandler?: VoiceHandler;\n  /** Messages waiting behind the turn in flight. Each row is removable. */\n  queue?: Array<{ id: string; text: string; attachments?: Attachment[] }>;\n  onRemoveQueued?: (id: string) => void;\n  /** Rendered above the field — where AgentChatPanel puts the session bar. */\n  sessionBar?: React.ReactNode;\n  toolbarExtras?: React.ReactNode;\n  /** Controlled draft, so a host can prefill (edit-a-message does this). */\n  draft?: string;\n  onDraftChange?: (text: string) => void;\n  hint?: React.ReactNode;\n  narrow?: boolean;\n  autoFocus?: boolean;\n  onReject?: (rejections: FileRejection[]) => void;\n  onOpenAttachment?: (a: Attachment) => void;\n}\n\n/**\n * The composer: staged attachments, the visible send queue, the editor, and the\n * send/stop control. Every optional affordance appears only when its input is\n * supplied — no upload handler means no attach button at all.\n */\nexport function ChatComposer({\n  onSubmit, onStop, busy, disabled, placeholder = \"Ask a question…\", maxLength,\n  fileUploadHandler, acceptFiles, maxFileSize, largePasteThreshold = 4000,\n  slashCommands, mentionSources, voiceHandler,\n  queue = [], onRemoveQueued, sessionBar, toolbarExtras,\n  draft, onDraftChange, hint, narrow, autoFocus,\n  onReject, onOpenAttachment,\n}: ChatComposerProps) {\n  const [text, setText] = React.useState(draft || \"\");\n  const [trigger, setTrigger] = React.useState<EditorTrigger | null>(null);\n  const [mentionItems, setMentionItems] = React.useState<MentionSource[]>([]);\n  const [listening, setListening] = React.useState(false);\n  const [notice, setNotice] = React.useState<string | null>(null);\n  const editor = React.useRef<MarkdownEditorHandle>(null);\n  const wrap = React.useRef<HTMLDivElement>(null);\n  const stopVoice = React.useRef<(() => void) | null>(null);\n  const staged = useStagedFiles(fileUploadHandler, { onError: () => {} });\n\n  React.useEffect(() => { if (draft != null && draft !== text) setText(draft); }, [draft]);\n  const change = (v: string) => { setText(v); onDraftChange && onDraftChange(v); };\n\n  const uploading = staged.busy;\n  const canSend = !disabled && !uploading && (text.trim().length > 0 || staged.items.length > 0);\n\n  const flash = (msg: string) => { setNotice(msg); setTimeout(() => setNotice(null), 4000); };\n\n  const submit = () => {\n    if (!canSend) return;\n    onSubmit(text.trim(), staged.items.map((f) => {\n      // Neither the raw File nor the local object URL it was staged with belongs on\n      // the wire: the File isn't serializable, and blobUrl points at a preview this\n      // tab's memory holds — by the time another client (or a reload) reads the\n      // message, it is a dead reference. What ships is exactly what the server\n      // returned (id, url, thumb, mime, size, …).\n      const { file, blobUrl, ...rest } = f;\n      void file; void blobUrl;              // discarded on purpose — see comment above\n      return rest;\n    }));\n    change(\"\");\n    staged.clear();\n    setTrigger(null);\n  };\n\n  /* paste → attachment. The extractor reports; this host decides whether to consume. */\n  const onPaste = (e: React.ClipboardEvent) => {\n    if (!fileUploadHandler) return;                   // nowhere to put it: fall through\n    const found = extractClipboardFiles(e.nativeEvent, { largePasteThreshold, accept: acceptFiles, maxFileSize });\n    if (found.rejected && found.rejected.length) { flash(found.rejected[0].message); onReject && onReject(found.rejected); }\n    if (!found.source || !found.files.length) return; // ordinary paste: leave the event alone\n    e.preventDefault();\n    staged.add(found.files);\n  };\n\n  /* trigger menus */\n  React.useEffect(() => {\n    if (!trigger || trigger.type !== \"mention\" || !mentionSources) { setMentionItems([]); return; }\n    if (typeof mentionSources === \"function\") {\n      let dead = false;\n      Promise.resolve(mentionSources(trigger.query)).then((r) => { if (!dead) setMentionItems(r || []); }).catch(() => {});\n      return () => { dead = true; };\n    }\n    const q = (trigger.query || \"\").toLowerCase();\n    setMentionItems(mentionSources.filter((m) => !q || (m.label + \" \" + (m.description || \"\")).toLowerCase().includes(q)));\n  }, [trigger, mentionSources]);\n\n  const slashItems = React.useMemo(() => {\n    if (!trigger || trigger.type !== \"slash\" || !slashCommands) return [] as SlashCommand[];\n    const q = (trigger.query || \"\").toLowerCase();\n    return slashCommands.filter((c) => !q || (c.id + \" \" + c.label + \" \" + (c.description || \"\")).toLowerCase().includes(q));\n  }, [trigger, slashCommands]);\n\n  const menuItems: MenuItem[] = trigger\n    ? (trigger.type === \"slash\" ? slashItems : mentionItems).slice(0, 40).map((it) => {\n      const slash = it as SlashCommand;\n      const mention = it as MentionSource;\n      return {\n        id: it.id, label: trigger.type === \"slash\" ? \"/\" + slash.id : mention.label,\n        description: it.description, icon: it.icon, meta: mention.meta,\n        shortcut: slash.shortcut ? <KeyHint keys={slash.shortcut} size=\"sm\" /> : undefined,\n        onSelect: () => {\n          const insert = trigger.type === \"slash\"\n            ? (slash.immediate ? \"/\" + slash.id : \"/\" + slash.id + \" \")\n            : \"@\" + (mention.value || mention.label) + \" \";\n          editor.current && editor.current.replaceRange(trigger.from, trigger.to, insert);\n          setTrigger(null);\n          if (slash.immediate) setTimeout(() => { onSubmit(\"/\" + slash.id, []); change(\"\"); }, 0);\n          if (slash.run) slash.run();\n        },\n      };\n    })\n    : [];\n  const menuOpen = !!trigger && menuItems.length > 0;\n\n  const keydown = (e: React.KeyboardEvent) => {\n    if (menuOpen) {\n      if (e.key === \"Enter\" || e.key === \"Tab\") {\n        e.preventDefault();\n        const active = document.querySelector<HTMLElement>(\".fdc-trigger .fd-menu-item.is-active\") || document.querySelector<HTMLElement>(\".fdc-trigger .fd-menu-item\");\n        if (active) active.click(); else setTrigger(null);\n        return;\n      }\n      if (e.key === \"ArrowUp\" || e.key === \"ArrowDown\") {\n        // the open menu owns vertical movement\n        e.preventDefault();\n        const list = document.querySelector(\".fdc-trigger .fd-menu\");\n        if (list) list.dispatchEvent(new KeyboardEvent(\"keydown\", { key: e.key, bubbles: true }));\n        return;\n      }\n      // MP-248: the menu's own Popover layer closes it on Escape (kits/layerStack.tsx); the\n      // press must not also stop a reply below.\n      if (e.key === \"Escape\") return;\n    }\n    const mod = e.metaKey || e.ctrlKey;\n    if (mod && e.key === \"Enter\") { e.preventDefault(); submit(); return; }\n    if (e.key === \"Escape\" && busy && onStop) { e.preventDefault(); onStop(); }\n  };\n\n  const voice = () => {\n    if (!voiceHandler) return;\n    if (listening) { if (stopVoice.current) stopVoice.current(); setListening(false); return; }\n    setListening(true);\n    const res = voiceHandler({\n      onText: (t: string, meta?: { replace?: boolean }) => { change(((meta && meta.replace) ? \"\" : text ? text + \" \" : \"\") + t); },\n      onEnd: () => setListening(false),\n    });\n    stopVoice.current = typeof res === \"function\" ? res : () => {};\n  };\n\n  return (\n    <div className={\"fdc-composer\" + (disabled ? \" is-disabled\" : \"\") + (narrow ? \" is-narrow\" : \"\")}>\n      {queue.length ? (\n        <div className=\"fdc-queue\" aria-label=\"Queued messages\">\n          {queue.map((q) => (\n            <div className=\"fdc-queue-row\" key={q.id}>\n              <i className=\"ph ph-clock-countdown\" aria-hidden=\"true\" />\n              <span className=\"fdc-queue-text\" title={truncationTitle(q.text || (q.attachments ? q.attachments.length + \" file(s)\" : \"\"))}>{q.text || (q.attachments ? q.attachments.length + \" file(s)\" : \"\")}</span>\n              {onRemoveQueued ? (\n                <button type=\"button\" className=\"fdc-queue-x\" onClick={() => onRemoveQueued(q.id)} aria-label=\"Remove queued message\">\n                  <i className=\"ph ph-x\" aria-hidden=\"true\" />\n                </button>\n              ) : null}\n            </div>\n          ))}\n        </div>\n      ) : null}\n\n      {sessionBar}\n\n      <Dropzone\n        className=\"fdc-field\"\n        onFiles={fileUploadHandler ? (files) => staged.add(files) : undefined}\n        onReject={(r) => { flash(r[0].message); onReject && onReject(r); }}\n        accept={acceptFiles} maxFileSize={maxFileSize}\n        disabled={!fileUploadHandler || disabled}\n        label=\"Drop to attach\"\n        hint={acceptFiles ? acceptFiles.replace(/,/g, \" · \") : undefined}\n      >\n        <div ref={wrap} className=\"fdc-field-inner\">\n          {staged.items.length ? (\n            <div className=\"fdc-staged\">\n              <FileStrip files={staged.items} size={narrow ? 60 : 68} onRemove={staged.remove} onRetry={staged.retry} onOpen={onOpenAttachment} />\n            </div>\n          ) : null}\n\n          <MarkdownEditor\n            ref={editor} value={text} onChange={change} onSubmit={submit}\n            onKeyDown={keydown} onPaste={onPaste} onTrigger={setTrigger}\n            placeholder={disabled ? \"The assistant is unavailable\" : placeholder}\n            disabled={disabled} maxLength={maxLength} autoFocus={autoFocus}\n            minRows={narrow ? 1 : 2} maxRows={12} ariaLabel=\"Message\"\n          />\n\n          <div className=\"fdc-tools\">\n            {fileUploadHandler ? (\n              <FilePickButton onFiles={staged.add} onReject={(r) => flash(r[0].message)} accept={acceptFiles} maxFileSize={maxFileSize} label=\"Attach files\" icon=\"plus\" />\n            ) : null}\n            {voiceHandler ? (\n              <button type=\"button\" className={\"fd-attachbtn\" + (listening ? \" is-live\" : \"\")} onClick={voice} aria-pressed={listening} aria-label={listening ? \"Stop dictation\" : \"Dictate\"}>\n                <i className={\"ph ph-\" + (listening ? \"waveform\" : \"microphone\")} aria-hidden=\"true\" />\n              </button>\n            ) : null}\n            {toolbarExtras}\n            <span className=\"fdc-tools-gap\" />\n            {maxLength && text.length > maxLength * 0.6 ? (\n              <span className={\"fdc-count fd-tabular\" + (text.length > maxLength * 0.95 ? \" is-hot\" : \"\")}>{text.length}/{maxLength}</span>\n            ) : null}\n            {busy ? (\n              <button type=\"button\" className=\"fdc-stop\" onClick={onStop} aria-label=\"Stop generating\">\n                <i className=\"ph ph-stop-circle\" aria-hidden=\"true\" />\n                <span>Stop</span>\n              </button>\n            ) : (\n              <button type=\"button\" className=\"fdc-send\" onClick={submit} disabled={!canSend} aria-label=\"Send message\">\n                <i className=\"ph ph-paper-plane-right\" aria-hidden=\"true\" />\n                <span className=\"fdc-send-label\">Send</span>\n              </button>\n            )}\n          </div>\n        </div>\n      </Dropzone>\n\n      {notice ? <div className=\"fdc-notice\" role=\"status\"><i className=\"ph ph-warning-circle\" aria-hidden=\"true\" />{notice}</div> : null}\n      {hint && !notice ? <div className=\"fdc-hint\">{hint}</div> : null}\n\n      <Popover\n        open={menuOpen} anchorRef={wrap} placement=\"top-start\" offset={10}\n        minWidth={narrow ? 260 : 320} maxHeight={300} className=\"fdc-trigger\"\n        onClose={() => setTrigger(null)} returnFocus={false} closeOnOutside\n        label={trigger && trigger.type === \"slash\" ? \"Commands\" : \"Mentions\"}\n      >\n        <Menu\n          items={menuItems} autoFocus={false}\n          header={<div className=\"fd-pop-group\">{trigger && trigger.type === \"slash\" ? \"Commands\" : \"Attach context\"}</div>}\n          onClose={() => setTrigger(null)}\n        />\n      </Popover>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { SegmentedMeter, QuotaRow, meterFormats } from \"../data/SegmentedMeter\";\nimport { Popover, MenuButton } from \"../actions/Popover\";\nimport type { MenuItem } from \"../actions/Popover\";\nimport { formatDuration, formatRelative } from \"../data/RelativeTime\";\nimport { truncationTitle } from \"../textExposure\";\nimport { KeyHint } from \"../feedback/KeyHint\";\nimport type { SessionStats, ContextUsage, UsageLimit, Model } from \"./AgentChatPanel\";\n\nconst compact = meterFormats.compact;\n\n/**\n * Elapsed time, token spend, context window and quota rows. Renders `null` unless at\n * least one input is supplied — the bar is never an empty frame.\n */\nexport interface ChatSessionBarProps {\n  sessionStats?: SessionStats;\n  contextUsage?: ContextUsage;\n  usageLimits?: UsageLimit[];\n  onClear?: () => void;\n  extras?: React.ReactNode;\n}\n\n/**\n * The strip above the composer. Every part is prop-fed: supply none of\n * sessionStats / contextUsage / usageLimits and no bar renders at all.\n */\nexport function ChatSessionBar({ sessionStats, contextUsage, usageLimits, onClear, extras }: ChatSessionBarProps) {\n  const [open, setOpen] = React.useState(false);\n  const anchor = React.useRef<HTMLButtonElement>(null);\n  const stats = sessionStats || null;\n  const cu = contextUsage || null;\n  const limits = usageLimits || null;\n  if (!stats && !cu && !limits && !extras) return null;\n\n  const total = cu && Number(cu.total) > 0 ? Number(cu.total) : 0;\n  const used = cu ? (cu.segments || []).reduce((n, s) => n + (Number(s.value) || 0), 0) : 0;\n  const pct = total ? Math.min(100, Math.round((used / total) * 100)) : 0;\n\n  const bits: string[] = [];\n  if (stats && stats.elapsedMs) bits.push(formatDuration(stats.elapsedMs));\n  if (stats && stats.tokens) bits.push(compact(stats.tokens) + \" tokens\");\n  if (stats && stats.costUsd != null) bits.push(\"$\" + Number(stats.costUsd).toFixed(stats.costUsd < 1 ? 3 : 2));\n  if (stats && stats.runningTasks) bits.push(stats.runningTasks + \" running task\" + (stats.runningTasks === 1 ? \"\" : \"s\"));\n  if (cu) bits.push(pct + \"% context\");\n\n  const expandable = !!(cu || limits);\n\n  return (\n    <React.Fragment>\n      <div className=\"fdc-bar\">\n        <button\n          type=\"button\" ref={anchor} className=\"fdc-bar-btn\" disabled={!expandable}\n          onClick={() => setOpen((v) => !v)} aria-expanded={expandable ? open : undefined}\n          aria-label={expandable ? \"Usage details\" : undefined}\n        >\n          {cu ? (\n            <span className=\"fdc-bar-mini\" aria-hidden=\"true\">\n              <SegmentedMeter total={total} segments={cu.segments} height={4} showTotal={false} />\n            </span>\n          ) : null}\n          <span className=\"fdc-bar-text\" title={truncationTitle(bits.join(\" · \"))}>{bits.join(\" · \")}</span>\n          {expandable ? <i className=\"ph ph-caret-right fdc-bar-caret\" aria-hidden=\"true\" /> : null}\n        </button>\n        {extras}\n      </div>\n\n      <Popover open={open} anchorRef={anchor} placement=\"top-start\" onClose={() => setOpen(false)} minWidth={330} maxHeight={460} padded label=\"Usage\"\n        footer={onClear ? (\n          <button type=\"button\" className=\"fdc-usage-clear\" onClick={() => { setOpen(false); onClear(); }}>\n            <i className=\"ph ph-trash\" aria-hidden=\"true\" />Clear conversation\n          </button>\n        ) : undefined}\n      >\n        <div className=\"fdc-usage\">\n          {cu ? (\n            <section className=\"fdc-usage-sec\">\n              <SegmentedMeter\n                total={total} segments={cu.segments} label={cu.label || \"Context window\"}\n                format={cu.format === \"bytes\" ? meterFormats.bytes : compact} height={8} legend\n                remainderLabel=\"Free\"\n              />\n            </section>\n          ) : null}\n          {limits && limits.length ? (\n            <section className=\"fdc-usage-sec\">\n              <h4 className=\"fdc-usage-h\">{\"Usage limits\"}</h4>\n              <div className=\"fdc-usage-rows\">\n                {limits.map((l) => (\n                  <QuotaRow key={l.id} label={l.label} percent={l.percent}\n                    note={l.resetsAt ? \"Resets \" + formatRelative(l.resetsAt) : l.note} />\n                ))}\n              </div>\n            </section>\n          ) : null}\n          {stats ? (\n            <section className=\"fdc-usage-sec fdc-usage-stats\">\n              {stats.elapsedMs ? <div><span>Session</span><b className=\"fd-tabular\">{formatDuration(stats.elapsedMs)}</b></div> : null}\n              {stats.tokens ? <div><span>Tokens</span><b className=\"fd-tabular\">{stats.tokens.toLocaleString()}</b></div> : null}\n              {stats.costUsd != null ? <div><span>Cost</span><b className=\"fd-tabular\">${Number(stats.costUsd).toFixed(3)}</b></div> : null}\n              {stats.turns ? <div><span>Turns</span><b className=\"fd-tabular\">{stats.turns}</b></div> : null}\n            </section>\n          ) : null}\n        </div>\n      </Popover>\n    </React.Fragment>\n  );\n}\n\n/**\n * Model picker, effort level and fast mode. `null` when no models are given.\n * A model's `shortcut` renders a key cap and binds nothing.\n */\nexport interface ModelControlsProps {\n  models?: Model[];\n  model?: string;\n  onModelChange?: (id: string) => void;\n  effortLevels?: string[];\n  effort?: string;\n  onEffortChange?: (level: string) => void;\n  fastMode?: boolean;\n  onFastModeChange?: (on: boolean) => void;\n  fastModeLabel?: string;\n  /** Collapsed into a submenu. */\n  moreModels?: Model[];\n  narrow?: boolean;\n}\n\n/**\n * Model picker (+ optional effort and fast-mode). Renders only when `models` is\n * supplied. Shortcuts are hints; the app registers the real keys.\n */\nexport function ModelControls({\n  models, model, onModelChange,\n  effortLevels, effort, onEffortChange,\n  fastMode, onFastModeChange, fastModeLabel = \"Enable fast mode\",\n  moreModels, narrow: _narrow,\n}: ModelControlsProps) {\n  if (!models || !models.length) return null;\n  const current = models.find((m) => m.id === model) || models[0];\n  const grouped: Record<string, Model[]> = {};\n  const flat: Model[] = [];\n  models.forEach((m) => {\n    if (m.group) { (grouped[m.group] = grouped[m.group] || []).push(m); return; }\n    flat.push(m);\n  });\n\n  const item = (m: Model): MenuItem => ({\n    id: m.id, label: m.label, description: m.description, disabled: m.disabled,\n    checked: m.id === (current && current.id),\n    meta: m.meta,\n    shortcut: m.shortcut ? <KeyHint keys={m.shortcut} size=\"sm\" /> : undefined,\n    onSelect: () => onModelChange && onModelChange(m.id),\n  });\n\n  const items: MenuItem[] = ([{ kind: \"section\", label: \"Models\" }] as MenuItem[]).concat(flat.map(item));\n  Object.keys(grouped).forEach((g) => {\n    items.push({ id: \"grp_\" + g, label: g, icon: \"stack\", submenu: grouped[g].map(item) });\n  });\n  if (moreModels && moreModels.length) items.push({ id: \"more\", label: \"More models\", submenu: moreModels.map(item) });\n  if (onFastModeChange) {\n    items.push({ kind: \"separator\" });\n    items.push({ kind: \"section\", label: \"Fast mode\" });\n    items.push({\n      kind: \"custom\",\n      render: () => (\n        <label className=\"fdc-switchrow\">\n          <span>{fastModeLabel}</span>\n          <input type=\"checkbox\" className=\"fd-sr\" checked={!!fastMode} onChange={(e) => onFastModeChange(e.target.checked)} />\n          <span className={\"fd-switch-track\" + (fastMode ? \" is-on\" : \"\")} aria-hidden=\"true\"><span className=\"fd-switch-thumb\" /></span>\n        </label>\n      ),\n    });\n  }\n\n  return (\n    <React.Fragment>\n      <MenuButton\n        items={items} placement=\"top-end\" minWidth={252} ariaLabel=\"Model\"\n        label={current ? current.label : \"Model\"} title=\"Choose a model\"\n      />\n      {effortLevels && effortLevels.length ? (\n        <MenuButton\n          placement=\"top-end\" minWidth={180} ariaLabel=\"Reasoning effort\" trailingIcon={null}\n          label={effort || effortLevels[0]} title=\"Reasoning effort\"\n          items={effortLevels.map((lv) => ({\n            id: lv, label: lv, checked: lv === effort,\n            onSelect: () => onEffortChange && onEffortChange(lv),\n          }))}\n        />\n      ) : null}\n    </React.Fragment>\n  );\n}\n","import * as React from \"react\";\nimport { Badge, type BadgeProps } from \"../feedback/Badge\";\nimport { DataTable, type DataTableColumn } from \"../data/DataTable\";\nimport { FactList, type Fact } from \"../data/FactList\";\nimport { formatDuration } from \"../data/RelativeTime\";\n\nexport type QueryResultStatus = \"queued\" | \"running\" | \"done\" | \"failed\" | \"canceled\";\n\nconst STATUS: Record<QueryResultStatus, { label: string; tone: NonNullable<BadgeProps[\"tone\"]> }> = {\n  queued: { label: \"Queued\", tone: \"neutral\" },\n  running: { label: \"Running\", tone: \"info\" },\n  done: { label: \"Done\", tone: \"success\" },\n  failed: { label: \"Failed\", tone: \"danger\" },\n  canceled: { label: \"Stopped\", tone: \"neutral\" },\n};\n\nexport const QUERY_EMPTY_MESSAGE = \"No rows to show.\";\n\nexport interface QueryResultCardProps {\n  title: string;\n  status: QueryResultStatus;\n  /** ISO time the query started; a running query shows how long it has run, on a local clock ticking each second. */\n  startedAt?: string | null;\n  failureMessage?: string | null;\n  /** Headline figures, already formatted. */\n  facts?: Fact[];\n  /** The preview's columns and rows. */\n  columns?: DataTableColumn[];\n  rows?: object[];\n  /** The row field that identifies a row. */\n  rowKey?: string;\n  /** The card's own actions (an export button, say): rendered as given, so the card names no action of any app. */\n  actions?: React.ReactNode;\n}\n\n/** How long a running query has run, ticking once a second; null for any other state. */\nfunction useElapsed(status: QueryResultStatus, startedAt: string | null | undefined): string | null {\n  const [now, setNow] = React.useState(() => Date.now());\n  const running = status === \"running\" && startedAt != null;\n  React.useEffect(() => {\n    if (!running) return;\n    const tick = setInterval(() => setNow(Date.now()), 1_000);\n    return () => clearInterval(tick);\n  }, [running]);\n  if (!running) return null;\n  return formatDuration(Math.max(0, now - Date.parse(startedAt!)));\n}\n\n/**\n * The live card of a background query an agent started, inside `PacketCard` (`AgentChatPanel`'s `packetRenderers`, with\n * `apply: false`: a query is never applied). The panel re-reads the thread on every poll while a turn runs, so the card\n * moves from queued to running to done or failed by itself. Presentational: pass the packet's fields.\n */\nexport function QueryResultCard({\n  title,\n  status,\n  startedAt,\n  failureMessage,\n  facts = [],\n  columns,\n  rows = [],\n  rowKey = \"id\",\n  actions,\n}: QueryResultCardProps) {\n  const { label, tone } = STATUS[status];\n  const elapsed = useElapsed(status, startedAt);\n  const empty = status === \"done\" && facts.length === 0 && rows.length === 0;\n\n  return (\n    <div className=\"fd-stack fd-gap-sm\" role=\"group\" aria-label={`Query: ${title}`}>\n      <div className=\"fd-row fd-wrap fd-justify-between fd-align-center fd-gap-sm\">\n        <span className=\"fd-body-sm\" style={{ overflowWrap: \"anywhere\", minWidth: 0 }}>\n          {title}\n        </span>\n        <Badge tone={tone} dot={status === \"running\"}>\n          {elapsed === null ? label : `${label} · ${elapsed}`}\n        </Badge>\n      </div>\n      {failureMessage ? <p className=\"fd-body-sm fd-danger\">{failureMessage}</p> : null}\n      {facts.length === 0 ? null : <FactList facts={facts} />}\n      {rows.length === 0 || !columns ? null : <DataTable compact columns={columns} rows={rows} rowKey={rowKey} />}\n      {empty ? <p className=\"fd-body-sm fd-muted\">{QUERY_EMPTY_MESSAGE}</p> : null}\n      {actions ? <div className=\"fd-row fd-wrap fd-gap-sm\">{actions}</div> : null}\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { Badge, type BadgeProps } from \"../feedback/Badge\";\nimport { Button } from \"../actions/Button\";\nimport { FactList } from \"../data/FactList\";\nimport { exportStateOf, useExpiryClock, type ExportState } from \"../../kits/exports/exportState\";\nimport type { ExportJob } from \"../../kits/exports/exportJob\";\n\nconst STATE: Record<ExportState, { label: string; tone: NonNullable<BadgeProps[\"tone\"]> }> = {\n  queued: { label: \"Queued\", tone: \"neutral\" },\n  preparing: { label: \"Preparing\", tone: \"info\" },\n  ready: { label: \"Ready\", tone: \"success\" },\n  expired: { label: \"Expired\", tone: \"neutral\" },\n  failed: { label: \"Failed\", tone: \"danger\" },\n};\n\nexport const CSV_FAILED_FALLBACK = \"The CSV could not be made.\";\nexport const CSV_KEPT_NOTE = \"Kept 24 hours\";\n\nexport interface CsvCardProps {\n  /** The export as the card should show it. */\n  job: ExportJob;\n  /** Takes the file. Download is on only while the export is ready; the button shows busy until this settles. */\n  onDownload: (id: string) => Promise<void>;\n}\n\n/**\n * The live card of a CSV an agent made (or the person made from a query card), for `AgentChatPanel`'s `packetRenderers`\n * with `apply: false`: a file is downloaded, never applied. Presentational: the export's state is the `job` it is given,\n * and a ready file turns expired by itself at the moment it expires while the card is open.\n */\nexport function CsvCard({ job, onDownload }: CsvCardProps) {\n  const [downloading, setDownloading] = React.useState(false);\n  const now = useExpiryClock(job);\n  const state = exportStateOf(job, now);\n  const { label, tone } = STATE[state];\n  const facts = job.rowCount === null ? [] : [{ label: \"Rows\", value: job.rowCount.toLocaleString(\"en-US\") }];\n\n  function download() {\n    setDownloading(true);\n    void onDownload(job.id).finally(() => setDownloading(false));\n  }\n\n  return (\n    <div className=\"fd-stack fd-gap-sm\" role=\"group\" aria-label={`CSV: ${job.fileName}`}>\n      <div className=\"fd-row fd-wrap fd-justify-between fd-align-center fd-gap-sm\">\n        <span className=\"fd-body-sm fd-mono\" style={{ overflowWrap: \"anywhere\", minWidth: 0 }}>\n          {job.fileName}\n        </span>\n        <Badge tone={tone} dot={state === \"preparing\"}>\n          {label}\n        </Badge>\n      </div>\n      {state === \"failed\" ? <p className=\"fd-body-sm fd-danger\">{job.failureMessage ?? CSV_FAILED_FALLBACK}</p> : null}\n      {facts.length === 0 ? null : <FactList facts={facts} />}\n      {state === \"ready\" ? <p className=\"fd-body-sm fd-muted\">{CSV_KEPT_NOTE}</p> : null}\n      <div className=\"fd-row fd-wrap fd-gap-sm\">\n        <Button\n          size=\"sm\"\n          variant=\"secondary\"\n          icon=\"download-simple\"\n          disabled={state !== \"ready\"}\n          loading={downloading}\n          onClick={download}\n        >\n          Download\n        </Button>\n      </div>\n    </div>\n  );\n}\n","import * as React from \"react\";\nimport { isExpiredExport, isLiveExport, type ExportJob } from \"./exportJob\";\n\n/** What a person is told about an export: its wire status, with a finished one past its expiry told apart. */\nexport type ExportState = \"queued\" | \"preparing\" | \"ready\" | \"expired\" | \"failed\";\n\nexport function exportStateOf(job: ExportJob, now: number): ExportState {\n  switch (job.status) {\n    case \"PENDING\":\n      return \"queued\";\n    case \"RUNNING\":\n      return \"preparing\";\n    case \"FAILED\":\n      return \"failed\";\n    case \"SUCCEEDED\":\n      return isExpiredExport(job, now) ? \"expired\" : \"ready\";\n  }\n}\n\n/** The time an export is judged expired by: when it was drawn, moved on to the moment a ready file expires while it is open. */\nexport function useExpiryClock(job: ExportJob): number {\n  const [now, setNow] = React.useState(() => Date.now());\n  const { status, expiresAt } = job;\n  React.useEffect(() => {\n    if (status !== \"SUCCEEDED\" || expiresAt === null) return;\n    const wait = Date.parse(expiresAt) - Date.now();\n    if (wait <= 0) return;\n    const timer = setTimeout(() => setNow(Date.now()), wait);\n    return () => clearTimeout(timer);\n  }, [status, expiresAt]);\n  return now;\n}\n\n/** The last copy of an export the shared jobs listed. They stop listing an export once it is dismissed from the tray or\n *  ages out, and a copy held elsewhere (a chat thread's) is only as new as the turn that made it, so this keeps a view\n *  from going back to a state it has already shown. */\nfunction useLastListed(listed: ExportJob | undefined): ExportJob | undefined {\n  const [last, setLast] = React.useState(listed);\n  if (listed !== undefined && listed !== last) setLast(listed);\n  return listed ?? last;\n}\n\n/**\n * The export as a view of it should show, when it holds its own copy (`held`, a chat thread's) beside the shared jobs'\n * list (`exports`, `refresh`). While the held copy is live, the last copy the shared jobs listed wins once they have\n * listed it; a finished export never changes, so the held copy of it stands. A live export the jobs do not list yet has\n * them re-read once, and from then on their poll moves it to its end: the view adds no poll of its own.\n */\nexport function useShownExport(held: ExportJob, exports: ExportJob[], refresh: () => void): ExportJob {\n  const lastListed = useLastListed(exports.find((candidate) => candidate.id === held.id));\n  const unlisted = isLiveExport(held) && lastListed === undefined;\n  React.useEffect(() => {\n    if (unlisted) refresh();\n  }, [unlisted, refresh]);\n  return isLiveExport(held) && lastListed !== undefined ? lastListed : held;\n}\n","/** Where a background export is. */\nexport type ExportJobStatus = \"PENDING\" | \"RUNNING\" | \"SUCCEEDED\" | \"FAILED\";\n\n/** One background export, in the shape an app maps its own export rows to. The one shape the tray, the CSV card and the polling hook\n *  all read, so a chat card and the tray never show two snapshots of the same export. */\nexport interface ExportJob {\n  id: string;\n  /** What the export was made from: the tray's card title. */\n  title: string;\n  /** What kind of export it is: the tray's card note. */\n  note?: string;\n  /** The name the downloaded file carries. */\n  fileName: string;\n  status: ExportJobStatus;\n  rowCount: number | null;\n  /** Set only once SUCCEEDED: when the download stops being available. */\n  expiresAt: string | null;\n  failureMessage: string | null;\n}\n\nexport function isLiveExport(job: ExportJob): boolean {\n  return job.status === \"PENDING\" || job.status === \"RUNNING\";\n}\n\nexport function isExpiredExport(job: ExportJob, now: number): boolean {\n  return job.expiresAt !== null && Date.parse(job.expiresAt) <= now;\n}\n","import * as React from \"react\";\nimport { formatBytes, iconForMime, isImage, extensionOf } from \"../../kits/files\";\nimport type { Attachment } from \"../../kits/files\";\nimport { LoadingRegion } from \"../loading/LoadingRegion\";\nimport { Skeleton } from \"../loading/Skeleton\";\nimport { CodeBlock } from \"../data/CodeBlock\";\nimport { Markdown } from \"../data/Markdown\";\nimport { Tabs } from \"../navigation/Tabs\";\nimport { Button } from \"../actions/Button\";\nimport { IconButton } from \"../actions/IconButton\";\n\n/**\n * What FileViewer knows how to render inline, decided from mime first and the\n * file's own extension second (a server that mislabels a `.csv` as\n * `text/plain` still gets a table, not a wall of raw commas). \"none\" is the\n * honest fallback — an icon, the file's own metadata and nothing invented.\n */\ntype PreviewKind = \"image\" | \"pdf\" | \"markdown\" | \"json\" | \"csv\" | \"text\" | \"none\";\n\nfunction previewKindOf(file: Attachment): PreviewKind {\n  const mime = (file.mime || \"\").toLowerCase();\n  const ext = extensionOf(file.name || \"\");\n  if (isImage(mime, file.name)) return \"image\";\n  if (mime === \"application/pdf\" || ext === \"pdf\") return \"pdf\";\n  if (mime === \"text/markdown\" || ext === \"md\" || ext === \"markdown\") return \"markdown\";\n  if (mime === \"application/json\" || ext === \"json\") return \"json\";\n  if (mime === \"text/csv\" || mime === \"text/tab-separated-values\" || ext === \"csv\" || ext === \"tsv\") return \"csv\";\n  if (mime.startsWith(\"text/\") || ext === \"txt\" || ext === \"log\") return \"text\";\n  return \"none\";\n}\n\n/** Kept modest on purpose: this is a PREVIEW, not a document viewer. A file past this\n *  many characters still opens — it just shows its first slice, same as CodeBlock's own\n *  line fold for a long file. */\nexport const FILE_VIEWER_TEXT_LIMIT = 500_000;\n/** CSV/TSV render as a real table, which means real DOM rows — bounded for the same\n *  reason a virtualized list is, just simpler: this is a preview, and a spreadsheet with\n *  50,000 rows is what the \"download\" action is for. */\nexport const FILE_VIEWER_CSV_ROW_LIMIT = 500;\n\n/**\n * A minimal, dependency-free delimited-text reader: quoted fields, `\"\"` as an escaped\n * quote inside one, and either line ending. Not a full RFC 4180 implementation — good\n * enough for a bounded preview table, which is all this ever renders.\n */\nexport function parseDelimited(text: string, delimiter: string): string[][] {\n  const rows: string[][] = [];\n  let row: string[] = [];\n  let field = \"\";\n  let inQuotes = false;\n  for (let i = 0; i < text.length; i++) {\n    const c = text[i];\n    if (inQuotes) {\n      if (c === '\"') {\n        if (text[i + 1] === '\"') { field += '\"'; i++; } else inQuotes = false;\n      } else field += c;\n      continue;\n    }\n    if (c === '\"') { inQuotes = true; continue; }\n    if (c === delimiter) { row.push(field); field = \"\"; continue; }\n    if (c === \"\\n\") { row.push(field); rows.push(row); row = []; field = \"\"; continue; }\n    if (c === \"\\r\") continue;\n    field += c;\n  }\n  if (field.length || row.length) { row.push(field); rows.push(row); }\n  return rows;\n}\n\ninterface PreviewState {\n  status: \"loading\" | \"ready\" | \"error\";\n  error?: string;\n  url?: string;\n  text?: string;\n}\n\n/**\n * Resolves whatever a preview kind needs through the host's `resolveUrl` — never reads\n * `file.url` directly, since production URLs are short-lived and signed, and a stale one\n * is exactly as wrong as a missing one. Ignores a response that comes back after the file\n * or its kind has already changed (a fast open-next-file click racing a slow fetch), and\n * aborts the in-flight text fetch on unmount/change/retry so it can't win that race either.\n */\nfunction usePreview(file: Attachment, kind: PreviewKind, resolveUrl: (disposition: \"inline\" | \"attachment\") => Promise<string>) {\n  const [state, setState] = React.useState<PreviewState>({ status: \"loading\" });\n  const [attempt, setAttempt] = React.useState(0);\n  // A ref, not a dependency: resolveUrl is very often a fresh closure every render (it\n  // closes over the file id in most hosts), and re-running the fetch whenever a caller\n  // merely re-rendered would turn every keystroke elsewhere in the host into a refetch.\n  const resolveRef = React.useRef(resolveUrl);\n  React.useEffect(() => { resolveRef.current = resolveUrl; }, [resolveUrl]);\n\n  React.useEffect(() => {\n    if (kind === \"none\") { setState({ status: \"ready\" }); return; }\n    let dead = false;\n    const ac = typeof AbortController !== \"undefined\" ? new AbortController() : undefined;\n    setState({ status: \"loading\" });\n    resolveRef.current(\"inline\")\n      .then((url) => {\n        if (dead) return undefined;\n        if (kind === \"image\" || kind === \"pdf\") { setState({ status: \"ready\", url }); return undefined; }\n        return fetch(url, ac ? { signal: ac.signal } : undefined).then((res) => {\n          if (!res.ok) throw new Error(\"The preview didn't load (\" + res.status + \").\");\n          return res.text();\n        }).then((body) => {\n          if (dead) return;\n          setState({ status: \"ready\", url, text: body.length > FILE_VIEWER_TEXT_LIMIT ? body.slice(0, FILE_VIEWER_TEXT_LIMIT) : body });\n        });\n      })\n      .catch((err) => {\n        if (dead || (ac && ac.signal.aborted)) return;\n        setState({ status: \"error\", error: (err && err.message) || \"The preview didn't load.\" });\n      });\n    return () => { dead = true; if (ac) ac.abort(); };\n  }, [file.id, kind, attempt]);\n\n  return { ...state, retry: React.useCallback(() => setAttempt((a) => a + 1), []) };\n}\n\nfunction PreviewBody({ file, kind, state }: { file: Attachment; kind: PreviewKind; state: PreviewState }) {\n  if (kind === \"image\") return <img className=\"fd-fv-image\" src={state.url} alt={file.name || \"Preview\"} />;\n  if (kind === \"pdf\") return <iframe className=\"fd-fv-pdf\" src={state.url} title={file.name || \"PDF preview\"} />;\n  if (kind === \"markdown\") return <Markdown className=\"fd-fv-markdown\" source={state.text || \"\"} />;\n  if (kind === \"json\") {\n    let pretty = state.text || \"\";\n    try { pretty = JSON.stringify(JSON.parse(pretty), null, 2); } catch { /* not valid JSON after all — show the raw bytes rather than fail the preview */ }\n    return <CodeBlock code={pretty} language=\"json\" />;\n  }\n  if (kind === \"csv\") {\n    const tsv = extensionOf(file.name || \"\") === \"tsv\" || (file.mime || \"\").toLowerCase().includes(\"tab-separated\");\n    const rows = parseDelimited(state.text || \"\", tsv ? \"\\t\" : \",\").filter((r) => r.length > 1 || r[0] !== \"\");\n    const head = rows[0] || [];\n    const dataRows = rows.slice(1);\n    const shown = dataRows.slice(0, FILE_VIEWER_CSV_ROW_LIMIT);\n    return (\n      <div className=\"fd-fv-csv\">\n        <table className=\"fd-fv-csv-table\">\n          <thead><tr>{head.map((c, i) => <th key={i}>{c}</th>)}</tr></thead>\n          <tbody>\n            {shown.map((r, ri) => <tr key={ri}>{head.map((_, ci) => <td key={ci}>{r[ci] ?? \"\"}</td>)}</tr>)}\n          </tbody>\n        </table>\n        {dataRows.length > FILE_VIEWER_CSV_ROW_LIMIT ? (\n          <p className=\"fd-fv-csv-note fd-body-sm fd-muted\">\n            Showing the first {FILE_VIEWER_CSV_ROW_LIMIT.toLocaleString()} of {dataRows.length.toLocaleString()} rows.\n          </p>\n        ) : null}\n      </div>\n    );\n  }\n  if (kind === \"text\") return <CodeBlock code={state.text || \"\"} language={extensionOf(file.name || \"\") || undefined} />;\n  return (\n    <div className=\"fd-fv-fallback\">\n      <span className=\"fd-fv-fallback-icon\" aria-hidden=\"true\"><i className={\"ph ph-\" + iconForMime(file.mime, file.name)} /></span>\n      <span className=\"fd-fv-fallback-title\">No preview available</span>\n      <span className=\"fd-fv-fallback-meta\">{file.mime || \"Unknown type\"}{file.size ? \" · \" + formatBytes(file.size) : \"\"}</span>\n    </div>\n  );\n}\n\nexport interface FileViewerProps {\n  file: Attachment;\n  /**\n   * Mints a short-lived URL for THIS file on demand — called once for the inline\n   * preview and again, separately, for a download. The component never reads\n   * `file.url` itself: production URLs are signed and expire in minutes, so the\n   * only correct URL is one just resolved for the disposition in hand.\n   */\n  resolveUrl: (disposition: \"inline\" | \"attachment\") => Promise<string>;\n  /**\n   * A companion panel — notes, metadata, associations, whatever the host wants\n   * beside the file. Generic on purpose: FileViewer has no idea what a \"note\" or\n   * a \"campaign\" is. Beside the preview when there's room, a tab next to Preview\n   * when there isn't. Omit it and there is no side panel and no tab bar at all.\n   */\n  sidePanel?: React.ReactNode;\n  /** Tab label / region name for `sidePanel`. Default \"Details\". */\n  sidePanelLabel?: string;\n  onClose?: () => void;\n  /** Extra controls beside the built-in Download action, e.g. a host's \"Save to campaign\". */\n  actions?: React.ReactNode;\n  className?: string;\n}\n\n/**\n * A file preview with an optional companion side panel: image, PDF, text/markdown/JSON,\n * a bounded CSV/TSV table, or an honest \"no preview\" fallback with the file's own\n * metadata — plus download, close and a host action slot. Fully responsive: side by side\n * with `sidePanel` while there's room, a tab next to Preview below a narrow width of its\n * OWN container (a `@container` query, not the viewport — see the stylesheet), with\n * exactly one scroll region per pane either way. Renders inside the kit's `Modal` or\n * `Drawer`, or inline in a page — it has no opinion on how it got on screen.\n */\nexport function FileViewer({ file, resolveUrl, sidePanel, sidePanelLabel = \"Details\", onClose, actions, className = \"\" }: FileViewerProps) {\n  const kind = React.useMemo(() => previewKindOf(file), [file]);\n  const preview = usePreview(file, kind, resolveUrl);\n  const [tab, setTab] = React.useState<\"preview\" | \"side\">(\"preview\");\n  const [downloading, setDownloading] = React.useState(false);\n  const [downloadError, setDownloadError] = React.useState<string | null>(null);\n  const hasSide = sidePanel != null;\n\n  // A newly opened file always starts on Preview — carrying a stale \"side\" selection\n  // from the file open before it would land the reader on a tab that may not even apply\n  // (a fallback file with no notes yet, say) with no visual cue anything changed.\n  React.useEffect(() => { setTab(\"preview\"); }, [file.id]);\n\n  const download = () => {\n    setDownloading(true);\n    setDownloadError(null);\n    resolveUrl(\"attachment\")\n      .then((url) => {\n        const a = document.createElement(\"a\");\n        a.href = url;\n        a.rel = \"noopener\";\n        a.download = file.name || \"\";\n        document.body.appendChild(a);\n        a.click();\n        a.remove();\n      })\n      .catch((err) => setDownloadError((err && err.message) || \"Download failed.\"))\n      .finally(() => setDownloading(false));\n  };\n\n  return (\n    <section\n      className={[\"fd-fv\", hasSide && tab === \"side\" ? \"is-tab-side\" : \"is-tab-preview\", className].filter(Boolean).join(\" \")}\n      aria-label={file.name || \"File\"}\n    >\n      <header className=\"fd-fv-head\">\n        <span className=\"fd-fv-head-icon\" aria-hidden=\"true\"><i className={\"ph ph-\" + iconForMime(file.mime, file.name)} /></span>\n        <span className=\"fd-fv-head-titles\">\n          <span className=\"fd-fv-head-title\" title={file.name}>{file.name}</span>\n          <span className=\"fd-fv-head-meta\">{file.mime || \"Unknown type\"}{file.size ? \" · \" + formatBytes(file.size) : \"\"}</span>\n        </span>\n        <span className=\"fd-fv-head-actions\">\n          {actions}\n          <Button variant=\"secondary\" size=\"sm\" icon=\"download-simple\" loading={downloading} onClick={download}>\n            Download\n          </Button>\n          {onClose ? <IconButton icon=\"x\" label=\"Close\" onClick={onClose} /> : null}\n        </span>\n      </header>\n\n      {downloadError ? <div className=\"fd-fv-download-error\" role=\"alert\">{downloadError}</div> : null}\n\n      {hasSide ? (\n        <Tabs\n          className=\"fd-fv-tabs\"\n          tabs={[{ value: \"preview\", label: \"Preview\" }, { value: \"side\", label: sidePanelLabel }]}\n          value={tab}\n          onChange={(v) => setTab(v as \"preview\" | \"side\")}\n        />\n      ) : null}\n\n      <div className=\"fd-fv-body\">\n        <div className=\"fd-fv-preview\" role=\"region\" aria-label={\"Preview of \" + (file.name || \"file\")}>\n          <LoadingRegion\n            state={preview.status === \"loading\" ? \"loading\" : preview.status === \"error\" ? \"error\" : \"ready\"}\n            error={preview.error}\n            label={\"Loading preview of \" + (file.name || \"file\")}\n            onRetry={preview.status === \"error\" ? preview.retry : undefined}\n            skeleton={<Skeleton shape=\"card\" h={220} />}\n          >\n            <PreviewBody file={file} kind={kind} state={preview} />\n          </LoadingRegion>\n        </div>\n        {hasSide ? (\n          <div className=\"fd-fv-side\" role=\"region\" aria-label={sidePanelLabel}>\n            {sidePanel}\n          </div>\n        ) : null}\n      </div>\n    </section>\n  );\n}\n","import * as React from \"react\";\nimport { formatBytes, iconForMime } from \"../../kits/files\";\nimport type { Attachment } from \"../../kits/files\";\nimport { Button } from \"../actions/Button\";\nimport { IconButton } from \"../actions/IconButton\";\nimport { InlinePanelSurface, useInlinePanel } from \"../actions/inlinePanel\";\nimport { Modal } from \"../surfaces/Modal\";\nimport { Dropzone } from \"../forms/Dropzone\";\nimport { EmptyState } from \"../feedback/EmptyState\";\nimport { LoadingRegion } from \"../loading/LoadingRegion\";\nimport { Skeleton } from \"../loading/Skeleton\";\n\n/** A folder in the tree — an adjacency list, the same shape a real directory store\n *  needs (see MP-128): `parentId: null` is a root-level folder. Generic on purpose,\n *  no campaign/thread vocabulary — the host's ids are whatever it wants them to be. */\nexport interface FileBrowserFolder {\n  id: string;\n  parentId: string | null;\n  name: string;\n}\n\n/** The host's own file shape, filed into exactly one folder (`folderId: null` = root). */\nexport type FileBrowserFile = Attachment & { folderId: string | null };\n\n/** Every affordance defaults to visible when its matching callback is supplied — set a\n *  flag to `false` to withhold that ONE affordance for a caller that has the callback\n *  wired but the current viewer lacks the right (e.g. a read-only campaign guest gets\n *  `onOpenFile` but not `canMove`/`canRemove`). Omitting the whole object shows\n *  everything a supplied callback affords. */\nexport interface FileBrowserPermissions {\n  canCreateFolder?: boolean;\n  canRenameFolder?: boolean;\n  canMove?: boolean;\n  canUpload?: boolean;\n  canRemoveFile?: boolean;\n  canDeleteFolder?: boolean;\n}\n\nexport interface FileBrowserProps {\n  folders: FileBrowserFolder[];\n  files: FileBrowserFile[];\n  /** `null` = the root folder. */\n  currentFolderId: string | null;\n  onNavigate: (folderId: string | null) => void;\n  onCreateFolder?: (parentId: string | null, name: string) => void;\n  onRenameFolder?: (folderId: string, name: string) => void;\n  onMoveFolder?: (folderId: string, targetParentId: string | null) => void;\n  onMoveFile?: (fileId: string, targetFolderId: string | null) => void;\n  onOpenFile?: (file: FileBrowserFile) => void;\n  onRemoveFile?: (file: FileBrowserFile) => void;\n  /** MP-190: same contract as `onRenameFolder`/`onMoveFolder` — no fetching, no emptiness\n   *  pre-check (the host's server is the one source of truth for \"empty\"; see the folder\n   *  kit doc comment above), fired only once the confirm dialog is accepted. Sibling\n   *  callbacks (`onRenameFolder`, `onMoveFolder`, `onRemoveFile`) are all plain, synchronous,\n   *  void callbacks with no promise/rejection handling anywhere in this component, so this\n   *  one is void too rather than inventing an async contract none of its siblings have — a\n   *  host that needs to show the server's `folder_not_empty` refusal does so the same way it\n   *  already must for a failed rename/move/remove: by feeding the error back through its own\n   *  state, outside this component. */\n  onDeleteFolder?: (folder: FileBrowserFolder) => void;\n  /** Fired with the raw picked/dropped files and the folder they landed in — FileBrowser\n   *  does no fetching and stages nothing itself (R-8/\"generic, controlled\" — see MP-135):\n   *  the host runs its own `useStagedFiles`/`FileUploadHandler` and feeds the result back\n   *  through `files`, exactly like every other controlled list in this kit. */\n  onUpload?: (files: File[], folderId: string | null) => void;\n  loading?: boolean;\n  permissions?: FileBrowserPermissions;\n  className?: string;\n}\n\nfunction childrenOf(folders: FileBrowserFolder[], parentId: string | null): FileBrowserFolder[] {\n  return folders.filter((f) => f.parentId === parentId).sort((a, b) => a.name.localeCompare(b.name));\n}\n\n/** Root → …→ `id`, inclusive. Empty array for `null` (root has no ancestors). Tolerates a\n *  dangling `parentId` (points at a folder no longer in `folders`) by stopping there rather\n *  than throwing — a host mid-delete can hand a momentarily inconsistent list. */\nfunction ancestorsOf(folders: FileBrowserFolder[], id: string | null): FileBrowserFolder[] {\n  const byId = new Map(folders.map((f) => [f.id, f] as const));\n  const chain: FileBrowserFolder[] = [];\n  let cur = id != null ? byId.get(id) : undefined;\n  const seen = new Set<string>();\n  while (cur && !seen.has(cur.id)) {\n    seen.add(cur.id);\n    chain.unshift(cur);\n    cur = cur.parentId != null ? byId.get(cur.parentId) : undefined;\n  }\n  return chain;\n}\n\n/** True when `nodeId` IS `ancestorId` or sits anywhere in its subtree — the guard that\n *  keeps a drag/menu move from ever filing a folder inside itself. */\nfunction isSelfOrDescendant(folders: FileBrowserFolder[], ancestorId: string, nodeId: string | null): boolean {\n  if (nodeId == null) return false;\n  if (nodeId === ancestorId) return true;\n  const byParent = new Map<string, FileBrowserFolder[]>();\n  folders.forEach((f) => {\n    const key = f.parentId ?? \"\";\n    if (!byParent.has(key)) byParent.set(key, []);\n    byParent.get(key)!.push(f);\n  });\n  const stack = [...(byParent.get(ancestorId) || [])];\n  while (stack.length) {\n    const next = stack.pop()!;\n    if (next.id === nodeId) return true;\n    stack.push(...(byParent.get(next.id) || []));\n  }\n  return false;\n}\n\ninterface FlatFolderOption { id: string | null; name: string; depth: number }\n\n/** Every valid move destination, root first then depth-first, for the folder picker menu.\n *  `excludeSubtreeOf` (a folder being moved) drops itself and its whole subtree — the same\n *  invariant `isSelfOrDescendant` enforces on drop, surfaced here so the menu never even\n *  offers an impossible destination. */\nfunction flattenDestinations(folders: FileBrowserFolder[], excludeSubtreeOf?: string): FlatFolderOption[] {\n  const out: FlatFolderOption[] = [{ id: null, name: \"Home\", depth: 0 }];\n  const walk = (parentId: string | null, depth: number) => {\n    childrenOf(folders, parentId).forEach((f) => {\n      if (excludeSubtreeOf && isSelfOrDescendant(folders, excludeSubtreeOf, f.id)) return;\n      out.push({ id: f.id, name: f.name, depth });\n      walk(f.id, depth + 1);\n    });\n  };\n  walk(null, 1);\n  return out;\n}\n\n/** The drag payload every draggable row writes and every drop target reads. Native HTML5\n *  DnD (not the kit's pointer-based custom drag TransferList uses — see that file's own\n *  doc comment): a FileBrowser drop target is always a plain, static folder row/crumb/tree\n *  node, never a live \"card follows the cursor\" ghost, so the extra pointer-tracking\n *  machinery TransferList needs buys nothing here. `text/plain` carries the same string so\n *  a drop target never has to special-case a MIME type a browser or test harness dropped. */\nconst DND_MIME = \"application/x-fd-filebrowser\";\ntype DragPayload = { kind: \"file\" | \"folder\"; id: string };\n\nfunction writeDragPayload(e: React.DragEvent, payload: DragPayload) {\n  const s = JSON.stringify(payload);\n  e.dataTransfer.setData(DND_MIME, s);\n  e.dataTransfer.setData(\"text/plain\", s);\n  e.dataTransfer.effectAllowed = \"move\";\n}\n\nfunction readDragPayload(e: React.DragEvent): DragPayload | null {\n  const raw = e.dataTransfer.getData(DND_MIME) || e.dataTransfer.getData(\"text/plain\");\n  if (!raw) return null;\n  try {\n    const parsed = JSON.parse(raw);\n    if (parsed && (parsed.kind === \"file\" || parsed.kind === \"folder\") && typeof parsed.id === \"string\") return parsed;\n  } catch { /* not our payload — e.g. a real OS file drag; ignore */ }\n  return null;\n}\n\n/** True when the drag carries a real internal payload — used to gate `onDragOver`'s\n *  `preventDefault()` so this component never claims a native OS file drop for itself. */\nfunction hasInternalPayload(e: React.DragEvent): boolean {\n  return Array.from(e.dataTransfer.types || []).indexOf(DND_MIME) !== -1;\n}\n\n/**\n * The keyboard-operable equivalent to a drag: a popover listing every valid destination\n * folder, indented to show the hierarchy. Opened from a plain button, closed by Escape, an\n * outside click, or picking a destination — the exact same interaction SortMenu already\n * ships in this kit, reused here rather than re-invented.\n */\nfunction FolderPickerMenu({\n  label,\n  destinations,\n  onPick,\n}: {\n  label: string;\n  destinations: FlatFolderOption[];\n  onPick: (id: string | null) => void;\n}) {\n  const panel = useInlinePanel<HTMLSpanElement>();\n  const { open, setOpen, ref } = panel;\n\n  return (\n    <span className=\"fd-fb-menu-anchor\" ref={ref}>\n      <IconButton\n        icon=\"arrows-out-cardinal\"\n        label={label}\n        size=\"sm\"\n        variant=\"ghost\"\n        aria-haspopup=\"menu\"\n        aria-expanded={open}\n        onClick={() => setOpen((v) => !v)}\n      />\n      <InlinePanelSurface panel={panel} align=\"right\" offset={4} width={220} maxHeight={280} role=\"menu\" label={label}>\n        <div className=\"fd-fb-menu\">\n          <span className=\"fd-overline fd-muted fd-fb-menu-title\">Move to…</span>\n          {destinations.map((d) => (\n            <button\n              key={d.id ?? \"__root__\"}\n              type=\"button\"\n              role=\"menuitem\"\n              className=\"fd-fb-menu-item\"\n              style={{ paddingLeft: 10 + d.depth * 14 }}\n              onClick={() => { onPick(d.id); setOpen(false); }}\n            >\n              <i className={\"ph ph-\" + (d.id == null ? \"house-simple\" : \"folder-simple\")} aria-hidden=\"true\" />\n              {d.name}\n            </button>\n          ))}\n        </div>\n      </InlinePanelSurface>\n    </span>\n  );\n}\n\ninterface RowShellProps {\n  icon: string;\n  name: string;\n  meta?: string;\n  onOpen?: () => void;\n  draggableId?: DragPayload;\n  isDropTarget?: boolean;\n  onDropPayload?: (payload: DragPayload) => void;\n  actions?: React.ReactNode;\n  className?: string;\n}\n\n/** One row, folder or file — a plain button for the primary open/navigate action (never a\n *  `<div onClick>`: this is the affordance a keyboard/screen-reader user actually gets),\n *  plus a native `draggable` source and an optional native drop target. FileBrowser builds\n *  its own row rather than reusing the kit's `EntityRow`: EntityRow deliberately opts OUT\n *  of the native `draggable` attribute in favour of TransferList's pointer-based drag (see\n *  EntityRow's own doc comment), which is the wrong tool for a static folder-tree drop\n *  target — so this stays a small, purpose-built row instead of fighting that component's\n *  architecture, while still composing IconButton/Tooltip-free primitives for its actions. */\nfunction RowShell({ icon, name, meta, onOpen, draggableId, isDropTarget, onDropPayload, actions, className = \"\" }: RowShellProps) {\n  const [over, setOver] = React.useState(false);\n  const dragCounter = React.useRef(0);\n\n  const dropHandlers = isDropTarget\n    ? {\n        onDragEnter: (e: React.DragEvent) => { if (!hasInternalPayload(e)) return; dragCounter.current++; setOver(true); },\n        onDragOver: (e: React.DragEvent) => { if (!hasInternalPayload(e)) return; e.preventDefault(); e.dataTransfer.dropEffect = \"move\"; },\n        onDragLeave: () => { dragCounter.current = Math.max(0, dragCounter.current - 1); if (!dragCounter.current) setOver(false); },\n        onDrop: (e: React.DragEvent) => {\n          if (!hasInternalPayload(e)) return;\n          e.preventDefault();\n          dragCounter.current = 0;\n          setOver(false);\n          const payload = readDragPayload(e);\n          if (payload && onDropPayload) onDropPayload(payload);\n        },\n      }\n    : {};\n\n  return (\n    <div className={[\"fd-fb-row\", over ? \"is-drop-target\" : \"\", className].filter(Boolean).join(\" \")} {...dropHandlers}>\n      <button\n        type=\"button\"\n        className=\"fd-fb-row-main\"\n        onClick={onOpen}\n        draggable={!!draggableId}\n        onDragStart={draggableId ? (e) => writeDragPayload(e, draggableId) : undefined}\n      >\n        <span className=\"fd-fb-row-icon\" aria-hidden=\"true\"><i className={\"ph ph-\" + icon} /></span>\n        <span className=\"fd-fb-row-text\">\n          <span className=\"fd-fb-row-name\" title={name}>{name}</span>\n          {meta ? <span className=\"fd-fb-row-meta\">{meta}</span> : null}\n        </span>\n      </button>\n      {actions ? <span className=\"fd-fb-row-actions\">{actions}</span> : null}\n    </div>\n  );\n}\n\ninterface TreeNodeProps {\n  folder: FileBrowserFolder;\n  depth: number;\n  folders: FileBrowserFolder[];\n  currentFolderId: string | null;\n  onNavigate: (id: string | null) => void;\n  onMoveInto: (payload: DragPayload, targetFolderId: string | null) => void;\n  canMove: boolean;\n}\n\nfunction TreeNode({ folder, depth, folders, currentFolderId, onNavigate, onMoveInto, canMove }: TreeNodeProps) {\n  const kids = childrenOf(folders, folder.id);\n  const [expanded, setExpanded] = React.useState(() => currentFolderId != null && isSelfOrDescendant(folders, folder.id, currentFolderId));\n  // A folder that becomes an ancestor of the current one (navigated into from elsewhere)\n  // opens on its own — collapsing only ever happens by the user's own toggle.\n  React.useEffect(() => {\n    if (currentFolderId != null && isSelfOrDescendant(folders, folder.id, currentFolderId)) setExpanded(true);\n  }, [currentFolderId, folder.id, folders]);\n  const isCurrent = folder.id === currentFolderId;\n\n  return (\n    <div className=\"fd-fb-tree-node\">\n      <RowShell\n        icon={folder.id === currentFolderId ? \"folder-open\" : \"folder-simple\"}\n        name={folder.name}\n        onOpen={() => onNavigate(folder.id)}\n        draggableId={canMove ? { kind: \"folder\", id: folder.id } : undefined}\n        isDropTarget={canMove}\n        onDropPayload={(payload) => onMoveInto(payload, folder.id)}\n        className={[\"fd-fb-tree-row\", isCurrent ? \"is-current\" : \"\"].filter(Boolean).join(\" \")}\n        actions={\n          kids.length ? (\n            <IconButton\n              icon={expanded ? \"caret-down\" : \"caret-right\"}\n              label={(expanded ? \"Collapse \" : \"Expand \") + folder.name}\n              size=\"sm\"\n              variant=\"ghost\"\n              onClick={() => setExpanded((v) => !v)}\n            />\n          ) : undefined\n        }\n      />\n      {expanded && kids.length ? (\n        <div className=\"fd-fb-tree-children\" style={{ paddingLeft: 14 }}>\n          {kids.map((k) => (\n            <TreeNode\n              key={k.id}\n              folder={k}\n              depth={depth + 1}\n              folders={folders}\n              currentFolderId={currentFolderId}\n              onNavigate={onNavigate}\n              onMoveInto={onMoveInto}\n              canMove={canMove}\n            />\n          ))}\n        </div>\n      ) : null}\n    </div>\n  );\n}\n\n/**\n * FileBrowser — a folder tree plus the current folder's contents: create, rename and move,\n * by drag or by an equally real keyboard/click menu, over a responsive two-pane layout.\n *\n * Generic and fully controlled (MP-135, phase 7 of MP-128): no data fetching, no upload,\n * no policy of any kind (no size cap, no type allow-list, no retention rule) — every one of\n * those is a product decision the epic has explicitly NOT made yet (see MP-128's open\n * problem), so this component encodes none of them. It only ever renders the `folders`/\n * `files` it is handed and reports intent through callbacks; the host owns every mutation,\n * every permission check and every byte that moves.\n *\n * Two panes side by side while there's room — the folder tree (search this file's own\n * width, a container query, exactly like FileViewer's side panel: a FileBrowser opened\n * inside a narrow Drawer should behave like a phone even on a wide screen) and the current\n * folder's contents. Below that width the tree pane disappears entirely (`display: none`,\n * not a tab — there is nothing to switch to, since the current folder's own subfolders\n * already appear as rows in the main pane) and navigation happens purely through the\n * breadcrumb trail plus tapping into a subfolder row, per the card's own spec. One scroll\n * region per pane either way (R-8): the tree pane and the main pane each own their own\n * `overflow`, the head/breadcrumb bar never scrolls.\n */\nexport function FileBrowser({\n  folders,\n  files,\n  currentFolderId,\n  onNavigate,\n  onCreateFolder,\n  onRenameFolder,\n  onMoveFolder,\n  onMoveFile,\n  onOpenFile,\n  onRemoveFile,\n  onDeleteFolder,\n  onUpload,\n  loading = false,\n  permissions,\n  className = \"\",\n}: FileBrowserProps) {\n  const perm = permissions || {};\n  const canCreateFolder = perm.canCreateFolder !== false && !!onCreateFolder;\n  const canRenameFolder = perm.canRenameFolder !== false && !!onRenameFolder;\n  const canMove = perm.canMove !== false && (!!onMoveFolder || !!onMoveFile);\n  const canUpload = perm.canUpload !== false && !!onUpload;\n  const canRemoveFile = perm.canRemoveFile !== false && !!onRemoveFile;\n  const canDeleteFolder = perm.canDeleteFolder !== false && !!onDeleteFolder;\n\n  const [createOpen, setCreateOpen] = React.useState(false);\n  const [createName, setCreateName] = React.useState(\"\");\n  const [renameTarget, setRenameTarget] = React.useState<FileBrowserFolder | null>(null);\n  const [renameValue, setRenameValue] = React.useState(\"\");\n  // MP-190: a destructive action gets a confirm step — reusing Modal, the same primitive\n  // already driving the New folder / Rename dialogs just above, rather than adding a second\n  // dialog primitive to the kit (it has no dedicated ConfirmDialog/AlertDialog component).\n  const [deleteTarget, setDeleteTarget] = React.useState<FileBrowserFolder | null>(null);\n  const uploadInputRef = React.useRef<HTMLInputElement>(null);\n\n  const crumbFolders = React.useMemo(() => ancestorsOf(folders, currentFolderId), [folders, currentFolderId]);\n  const subfolders = React.useMemo(() => childrenOf(folders, currentFolderId), [folders, currentFolderId]);\n  const currentFiles = React.useMemo(\n    () => files.filter((f) => f.folderId === currentFolderId).sort((a, b) => a.name.localeCompare(b.name)),\n    [files, currentFolderId]\n  );\n  const isEmpty = !subfolders.length && !currentFiles.length;\n\n  const moveIntoFolder = (payload: DragPayload, targetFolderId: string | null) => {\n    if (payload.kind === \"folder\") {\n      if (payload.id === targetFolderId) return; // dropped on itself — a no-op, not a move\n      if (isSelfOrDescendant(folders, payload.id, targetFolderId)) return; // would orphan its own subtree\n      onMoveFolder && onMoveFolder(payload.id, targetFolderId);\n    } else {\n      onMoveFile && onMoveFile(payload.id, targetFolderId);\n    }\n  };\n\n  const openCreate = () => { setCreateName(\"\"); setCreateOpen(true); };\n  const submitCreate = () => {\n    const name = createName.trim();\n    if (name && onCreateFolder) onCreateFolder(currentFolderId, name);\n    setCreateOpen(false);\n  };\n\n  const openRename = (folder: FileBrowserFolder) => { setRenameValue(folder.name); setRenameTarget(folder); };\n  const submitRename = () => {\n    const name = renameValue.trim();\n    if (name && renameTarget && onRenameFolder) onRenameFolder(renameTarget.id, name);\n    setRenameTarget(null);\n  };\n\n  const openDelete = (folder: FileBrowserFolder) => { setDeleteTarget(folder); };\n  const confirmDelete = () => {\n    if (deleteTarget && onDeleteFolder) onDeleteFolder(deleteTarget);\n    setDeleteTarget(null);\n  };\n\n  const content = (\n    <div className={[\"fd-fb\", className].filter(Boolean).join(\" \")}>\n      <div className=\"fd-fb-head\">\n        <nav className=\"fd-fb-crumbs\" aria-label=\"Folder path\">\n          <BreadcrumbCrumb\n            label=\"Home\"\n            isCurrent={currentFolderId == null}\n            onClick={() => onNavigate(null)}\n            isDropTarget={canMove}\n            onDropPayload={(p) => moveIntoFolder(p, null)}\n          />\n          {crumbFolders.map((f, i) => (\n            <BreadcrumbCrumb\n              key={f.id}\n              label={f.name}\n              isCurrent={i === crumbFolders.length - 1}\n              onClick={() => onNavigate(f.id)}\n              isDropTarget={canMove}\n              onDropPayload={(p) => moveIntoFolder(p, f.id)}\n            />\n          ))}\n        </nav>\n        <span className=\"fd-fb-actions\">\n          {canCreateFolder ? (\n            <Button variant=\"secondary\" size=\"sm\" icon=\"folder-simple-plus\" onClick={openCreate}>\n              New folder\n            </Button>\n          ) : null}\n          {canUpload ? (\n            <>\n              <Button variant=\"secondary\" size=\"sm\" icon=\"upload-simple\" onClick={() => uploadInputRef.current && uploadInputRef.current.click()}>\n                Upload\n              </Button>\n              {/* A plain, unfiltered file input — no `accept`/size cap here on purpose (see\n                  the component doc comment): FileBrowser reports every picked file straight\n                  through `onUpload` and leaves what to accept entirely to the host. */}\n              <input\n                ref={uploadInputRef}\n                type=\"file\"\n                multiple\n                className=\"fd-sr\"\n                aria-label=\"Upload files\"\n                onChange={(e) => {\n                  const picked = Array.from(e.target.files || []);\n                  if (picked.length && onUpload) onUpload(picked, currentFolderId);\n                  e.target.value = \"\";\n                }}\n              />\n            </>\n          ) : null}\n        </span>\n      </div>\n\n      <div className=\"fd-fb-body\">\n        <div className=\"fd-fb-tree\" role=\"region\" aria-label=\"Folder tree\">\n          <RowShell\n            icon=\"house-simple\"\n            name=\"Home\"\n            onOpen={() => onNavigate(null)}\n            isDropTarget={canMove}\n            onDropPayload={(p) => moveIntoFolder(p, null)}\n            className={[\"fd-fb-tree-row\", currentFolderId == null ? \"is-current\" : \"\"].filter(Boolean).join(\" \")}\n          />\n          {childrenOf(folders, null).map((f) => (\n            <TreeNode\n              key={f.id}\n              folder={f}\n              depth={0}\n              folders={folders}\n              currentFolderId={currentFolderId}\n              onNavigate={onNavigate}\n              onMoveInto={moveIntoFolder}\n              canMove={canMove}\n            />\n          ))}\n        </div>\n\n        <div className=\"fd-fb-main\" role=\"region\" aria-label=\"Folder contents\">\n          <LoadingRegion\n            state={loading ? \"loading\" : \"ready\"}\n            label=\"Loading folder contents\"\n            skeleton={\n              <div className=\"fd-stack\" style={{ gap: 8, padding: 12 }}>\n                <Skeleton h={44} radius=\"10px\" />\n                <Skeleton h={44} radius=\"10px\" />\n                <Skeleton h={44} radius=\"10px\" />\n              </div>\n            }\n          >\n            {isEmpty ? (\n              <EmptyState icon=\"folder-open\" title=\"This folder is empty\">\n                {canUpload ? \"Drop files here, or use Upload above.\" : \"Nothing has been filed here yet.\"}\n              </EmptyState>\n            ) : (\n              <div className=\"fd-fb-list\">\n                {subfolders.map((f) => (\n                  <RowShell\n                    key={f.id}\n                    icon=\"folder-simple\"\n                    name={f.name}\n                    onOpen={() => onNavigate(f.id)}\n                    draggableId={canMove ? { kind: \"folder\", id: f.id } : undefined}\n                    isDropTarget={canMove}\n                    onDropPayload={(p) => moveIntoFolder(p, f.id)}\n                    actions={\n                      <>\n                        {canRenameFolder ? (\n                          <IconButton icon=\"pencil-simple\" label={\"Rename \" + f.name} size=\"sm\" variant=\"ghost\" onClick={() => openRename(f)} />\n                        ) : null}\n                        {canMove ? (\n                          <FolderPickerMenu\n                            label={\"Move \" + f.name}\n                            destinations={flattenDestinations(folders, f.id)}\n                            onPick={(target) => moveIntoFolder({ kind: \"folder\", id: f.id }, target)}\n                          />\n                        ) : null}\n                        {canDeleteFolder ? (\n                          <IconButton icon=\"trash-simple\" label={\"Delete \" + f.name} size=\"sm\" variant=\"ghost\" onClick={() => openDelete(f)} />\n                        ) : null}\n                      </>\n                    }\n                  />\n                ))}\n                {currentFiles.map((file) => (\n                  <RowShell\n                    key={file.id}\n                    icon={iconForMime(file.mime, file.name)}\n                    name={file.name}\n                    meta={file.size ? formatBytes(file.size) : undefined}\n                    onOpen={onOpenFile ? () => onOpenFile(file) : undefined}\n                    draggableId={canMove ? { kind: \"file\", id: file.id } : undefined}\n                    actions={\n                      <>\n                        {canMove ? (\n                          <FolderPickerMenu\n                            label={\"Move \" + file.name}\n                            destinations={flattenDestinations(folders)}\n                            onPick={(target) => onMoveFile && onMoveFile(file.id, target)}\n                          />\n                        ) : null}\n                        {canRemoveFile ? (\n                          <IconButton icon=\"trash-simple\" label={\"Remove \" + file.name} size=\"sm\" variant=\"ghost\" onClick={() => onRemoveFile && onRemoveFile(file)} />\n                        ) : null}\n                      </>\n                    }\n                  />\n                ))}\n              </div>\n            )}\n          </LoadingRegion>\n        </div>\n      </div>\n\n      <Modal open={createOpen} title=\"New folder\" onClose={() => setCreateOpen(false)} footer={\n        <>\n          <Button variant=\"secondary\" onClick={() => setCreateOpen(false)}>Cancel</Button>\n          <Button onClick={submitCreate} disabled={!createName.trim()}>Create</Button>\n        </>\n      }>\n        <input\n          className=\"fd-fb-input\"\n          value={createName}\n          onChange={(e) => setCreateName(e.target.value)}\n          onKeyDown={(e) => { if (e.key === \"Enter\") submitCreate(); }}\n          placeholder=\"Folder name\"\n          aria-label=\"Folder name\"\n          autoFocus\n        />\n      </Modal>\n\n      <Modal open={renameTarget != null} title=\"Rename folder\" onClose={() => setRenameTarget(null)} footer={\n        <>\n          <Button variant=\"secondary\" onClick={() => setRenameTarget(null)}>Cancel</Button>\n          <Button onClick={submitRename} disabled={!renameValue.trim()}>Save</Button>\n        </>\n      }>\n        <input\n          className=\"fd-fb-input\"\n          value={renameValue}\n          onChange={(e) => setRenameValue(e.target.value)}\n          onKeyDown={(e) => { if (e.key === \"Enter\") submitRename(); }}\n          placeholder=\"Folder name\"\n          aria-label=\"Folder name\"\n          autoFocus\n        />\n      </Modal>\n\n      <Modal\n        open={deleteTarget != null}\n        title={deleteTarget ? \"Delete “\" + deleteTarget.name + \"”?\" : \"Delete folder?\"}\n        description=\"This can't be undone. The folder must be empty.\"\n        onClose={() => setDeleteTarget(null)}\n        footer={\n          <>\n            <Button variant=\"secondary\" onClick={() => setDeleteTarget(null)}>Cancel</Button>\n            <Button variant=\"danger\" onClick={confirmDelete}>Delete</Button>\n          </>\n        }\n      />\n    </div>\n  );\n\n  if (!canUpload) return content;\n  // The whole browser is one drop target for an OS file drag — Dropzone's own veil covers\n  // the tree and the list alike, and its `onFiles` reports straight through to `onUpload`\n  // with whatever folder is open right now. It never fires for an internal row drag: that\n  // carries the `application/x-fd-filebrowser` MIME Dropzone doesn't look for, only\n  // `Files`, so the two drag systems never collide.\n  return (\n    <Dropzone className=\"fd-fb-dropzone\" onFiles={(picked) => onUpload && onUpload(picked, currentFolderId)} label=\"Drop files to upload\">\n      {content}\n    </Dropzone>\n  );\n}\n\nfunction BreadcrumbCrumb({\n  label,\n  isCurrent,\n  onClick,\n  isDropTarget,\n  onDropPayload,\n}: {\n  label: string;\n  isCurrent: boolean;\n  onClick: () => void;\n  isDropTarget?: boolean;\n  onDropPayload?: (payload: DragPayload) => void;\n}) {\n  const [over, setOver] = React.useState(false);\n  const dragCounter = React.useRef(0);\n  const dropHandlers = isDropTarget\n    ? {\n        onDragEnter: (e: React.DragEvent) => { if (!hasInternalPayload(e)) return; dragCounter.current++; setOver(true); },\n        onDragOver: (e: React.DragEvent) => { if (!hasInternalPayload(e)) return; e.preventDefault(); e.dataTransfer.dropEffect = \"move\"; },\n        onDragLeave: () => { dragCounter.current = Math.max(0, dragCounter.current - 1); if (!dragCounter.current) setOver(false); },\n        onDrop: (e: React.DragEvent) => {\n          if (!hasInternalPayload(e)) return;\n          e.preventDefault();\n          dragCounter.current = 0;\n          setOver(false);\n          const payload = readDragPayload(e);\n          if (payload && onDropPayload) onDropPayload(payload);\n        },\n      }\n    : {};\n  return (\n    <span className={[\"fd-fb-crumb\", over ? \"is-drop-target\" : \"\"].filter(Boolean).join(\" \")} {...dropHandlers}>\n      {isCurrent ? (\n        <span className=\"fd-fb-crumb-current\" aria-current=\"page\">{label}</span>\n      ) : (\n        <button type=\"button\" className=\"fd-fb-crumb-link\" onClick={onClick}>{label}</button>\n      )}\n    </span>\n  );\n}\n","import * as React from \"react\";\nimport type { AppEntry, SessionContextValue } from \"./sessionContext\";\n\n/* Turns the session an app's auth layer hands the shell into the SessionContextValue every\n   session-aware component reads. The shapes below are declared here, not imported: this\n   package never imports app-kit and app-kit never imports this one, so app-kit's\n   `UsableSession<AuthedUserDto>` and `AppSwitcherEntry[]` are checked structurally at the app. */\n\n/** One row of the apps feed. `url`/`icon` are nullable because the identity provider is not\n *  seeded with both for every app. */\nexport interface SessionAppFeedEntry {\n  key: string;\n  name: string;\n  url: string | null;\n  icon: string | null;\n}\n\n/** The signed-in person as the identity provider reports them. */\nexport interface SessionAdapterUser {\n  id: string;\n  name: string;\n  email: string;\n  roles: { key: string; name: string }[];\n  permissions: string[];\n}\n\n/** A usable session: live (`authenticated`) or an identity-provider/auth-store outage that\n *  still has a last-known user (`unavailable`). */\nexport interface AdaptableSession {\n  status: \"authenticated\" | \"unavailable\";\n  user: SessionAdapterUser;\n  apps: SessionAppFeedEntry[];\n  signOut: () => void | Promise<void>;\n}\n\n/**\n * Adapts the apps feed into `AppSwitcher` entries and marks the one whose key is\n * `currentAppKey`. An app with no `url` is dropped rather than rendered as a dead `#` link.\n */\nexport function toSwitcherEntries(apps: SessionAppFeedEntry[], currentAppKey: string): AppEntry[] {\n  return apps\n    .filter((app): app is SessionAppFeedEntry & { url: string } => app.url != null)\n    .map((app) => ({\n      key: app.key,\n      name: app.name,\n      url: app.url,\n      icon: app.icon ?? undefined,\n      current: app.key === currentAppKey,\n    }));\n}\n\n/**\n * Adapts a session into `SessionContextValue`, memoized on the session's own fields.\n * `roles[].id` and `hasRole` both key on the role's `key`, its stable slug.\n *\n * During an outage (`status === \"unavailable\"`) the last-known user is still shown but the\n * cached permissions are display-only: `can`, `canAny` and `hasRole` refuse everything, and\n * `pending` is true so `Gate` renders its neutral pending state instead of \"access denied\".\n */\nexport function useSessionContextValue(\n  session: AdaptableSession,\n  { currentAppKey }: { currentAppKey: string },\n): SessionContextValue {\n  const { user, apps, signOut, status } = session;\n  const authorized = status === \"authenticated\";\n  const pending = status === \"unavailable\";\n  return React.useMemo<SessionContextValue>(\n    () => ({\n      user: { id: user.id, name: user.name, email: user.email, sso: true },\n      roles: user.roles.map((r) => ({ id: r.key, name: r.name })),\n      permissions: user.permissions,\n      can: (permission) => {\n        if (!authorized) return false;\n        const need = Array.isArray(permission) ? permission : [permission];\n        return need.every((p) => user.permissions.includes(p));\n      },\n      canAny: (permissions) => authorized && permissions.some((p) => user.permissions.includes(p)),\n      hasRole: (roleId) => authorized && user.roles.some((r) => r.key === roleId),\n      signOut,\n      apps: toSwitcherEntries(apps, currentAppKey),\n      pending,\n    }),\n    [user, apps, signOut, authorized, pending, currentAppKey],\n  );\n}\n","import * as React from \"react\";\nimport {\n  historyUrlAdapter,\n  readQueryFromUrl,\n  writeQueryToUrl,\n  type QueryPaging,\n  type QueryUrlOptions,\n} from \"./queryUrl\";\n\n/* =============================================================================\n   QueryKit — the one way this app asks a server for a list.\n\n   Two halves:\n\n   1. QueryKit.run(rows, query, cfg)\n      The SERVER side, simulated. Applies search → filters → sort → page in that\n      order and returns the one envelope every list endpoint must return:\n\n        {\n          rows,                                       the current page only\n          pager:  { page, pageSize, total, totalPages, from, to, hasPrev, hasNext },\n          sort:   { key, dir },\n          filter: { applied, q, facets }\n        }\n\n      When the real API lands, this function is deleted — the endpoint returns\n      the same envelope and nothing else changes.\n\n   2. useServerTable({ endpoint, params, defaults, deps })\n      The CLIENT side. Owns one query object, refetches on any change, debounces\n      typing, drops stale responses, and resets to page 1 whenever the result set\n      changes shape (search, filter or sort). Every table in the app uses it, so\n      paging/sorting/filtering behave identically everywhere. It also shows a failed\n      request (`error`, `retry()`), pages by cursor for a list that cannot count its\n      rows (`paging: \"keyset\"`, `loadMore()`), and can keep the query in the address\n      (`url`, see queryUrl.ts).\n\n   Query contract (identical for every list endpoint):\n     page      1-indexed\n     pageSize  10 | 25 | 50 | 100\n     sort      column key\n     dir       \"asc\" | \"desc\"\n     q         free-text search across the endpoint's searchable columns\n     filters   { [filterId]: value } — endpoint-specific, documented per endpoint\n============================================================================= */\n\nexport interface TableQuery {\n  /** 1-indexed. */\n  page: number;\n  pageSize: number;\n  sort: string | null;\n  dir: \"asc\" | \"desc\";\n  /** Free-text search across the endpoint's searchable columns. */\n  q: string;\n  filters: Record<string, unknown>;\n}\nexport interface Pager {\n  page: number; pageSize: number; total: number; totalPages: number;\n  from: number; to: number; hasPrev: boolean; hasNext: boolean;\n}\n/** The envelope EVERY paged list endpoint returns. */\nexport interface ListEnvelope<Row = unknown> {\n  rows: Row[];\n  pager: Pager;\n  sort: { key: string; dir: \"asc\" | \"desc\" } | null;\n  filter: { applied: Record<string, unknown>; q: string; facets: Record<string, Record<string, number>> };\n  aggregate?: Record<string, unknown>;\n}\n/** The envelope a keyset-paged list endpoint returns (`paging: \"keyset\"`): one page of rows and the\n *  cursor of the next, which is how a list that cannot cheaply count its rows (a BigQuery read) pages. */\nexport interface KeysetEnvelope<Row = unknown> {\n  rows: Row[];\n  /** Opaque; null on the last page. Sent back as `after` to read the page that follows. */\n  next: string | null;\n  /** Every row of the match, when the endpoint can say. */\n  total?: number;\n  filter?: { facets: Record<string, Record<string, number>> };\n  aggregate?: Record<string, unknown>;\n}\nexport interface RunConfig<Row = unknown> {\n  searchKeys?: string[];\n  filters?: Record<string, (row: Row, value: any) => boolean>;\n  /** Sort value for a column whose key isn't a plain field. */\n  accessors?: Record<string, (row: Row) => unknown>;\n  /** Option counts, computed over the SEARCHED set so a filter never erases its own alternatives. */\n  facets?: Record<string, (row: Row) => string | number | null>;\n  defaultSort?: { key: string; dir: \"asc\" | \"desc\" };\n  defaultPageSize?: number;\n}\n/** What a table has whichever way its endpoint pages. */\nexport interface ServerTableBase<Row = unknown> {\n  rows: Row[]; pageSize: number;\n  facets: Record<string, Record<string, number>>;\n  aggregate: Record<string, unknown>;\n  query: TableQuery;\n  sort?: { key: string; dir: \"asc\" | \"desc\" };\n  q: string; filters: Record<string, unknown>;\n  loading: boolean;\n  /** True only on the FIRST load — later loads keep showing stale rows. */\n  initialLoading: boolean;\n  /** True while re-querying with previous rows still on screen. Pass straight to\n   *  DataTable's `refreshing`, or to LoadingRegion as state=\"refreshing\". */\n  refreshing: boolean;\n  /** Why the last request failed; null while there is nothing to show. A first load that fails\n   *  leaves `rows` empty; a refresh or a `loadMore` that fails keeps the rows already on screen.\n   *  Cleared by the next request, whether `retry`, `refresh` or a change of query. */\n  error: Error | null;\n  /** Runs again what failed: the query, or the page `loadMore` was reading. */\n  retry(): void;\n  activeFilterCount: number;\n  setPageSize(n: number): void;\n  setQ(q: string): void;\n  toggleSort(key: string): void;\n  setSortKey(key: string, dir?: \"asc\" | \"desc\"): void;\n  /** value may be an updater fn — REQUIRED for toggles, or two fast clicks read the same\n   *  stale array and the first is lost. */\n  setFilter(id: string, value: unknown | ((prev: unknown) => unknown)): void;\n  clearFilter(id: string): void;\n  setFilters(filters: Record<string, unknown>): void;\n  clearFilters(): void;\n  /** Re-queries now, even when the query has not changed. */\n  refresh(): void;\n  /** Changes the rows on screen in place, without reading again: a saved decision updating its\n   *  row. The next answer (a new query, `refresh`, `retry`) replaces them. */\n  patchRows(change: (rows: Row[]) => Row[]): void;\n  queryString: string;\n}\n/** A table over a page-numbered endpoint (`ListEnvelope`): the default. */\nexport interface ServerTable<Row = unknown> extends ServerTableBase<Row> {\n  pager: Pager; total: number; page: number;\n  totalPages: number; from: number; to: number;\n  setPage(p: number): void;\n  /** Same query, unpaged — for CSV export and select-all-matching. */\n  fetchAll(): Promise<Row[]>;\n}\n/** A table over a cursor-paged endpoint (`KeysetEnvelope`): `paging: \"keyset\"`. It has no pages, so no\n *  pager, `setPage` or `fetchAll`; it has the cursor's `loadMore`. */\nexport interface KeysetServerTable<Row = unknown> extends ServerTableBase<Row> {\n  /** Every row of the match, when the endpoint said; null when it cannot count them. */\n  total: number | null;\n  /** Another page follows the last one loaded. */\n  hasMore: boolean;\n  /** The next page is being read (the rows stay as they are, so this is not `refreshing`). */\n  loadingMore: boolean;\n  /** Reads the page after the last one loaded and appends it. A no-op while a read is in flight, the\n   *  first page is loading, or at the end. */\n  loadMore(): void;\n}\nexport interface UseServerTableOptions {\n  endpoint: string;\n  params?: Record<string, unknown>;\n  defaults?: Partial<TableQuery>;\n  /** Extra values that should trigger a refetch. */\n  deps?: unknown[];\n  /** Opts into durable rows-per-page and default sort. Page/search/filters are deliberately\n   *  NOT persisted — they describe one task, and restoring them hides rows the user expects. */\n  prefsKey?: string;\n  /** The request carries `page` and `pageSize`; the envelope is a `ListEnvelope`. */\n  paging?: \"page\";\n  /** Keeps the query in the address (`?q=ohio&sort=crp&page=2`), so a link reproduces the list and\n   *  Back returns to it. The address wins over `defaults`; it is written when the request is sent,\n   *  after the search debounce. Pass `{}` for the browser's own address, or `{ adapter }` over a\n   *  router's search params; `scope` prefixes the params of one list among several. */\n  url?: QueryUrlOptions;\n}\n/** For an endpoint that pages by cursor and cannot cheaply count its rows. The request carries `limit`\n *  (the page size) and, after the first page, `after` (the cursor); the envelope is a `KeysetEnvelope`.\n *  Any change of search, filter or sort starts again from the first page. */\nexport interface UseKeysetTableOptions extends Omit<UseServerTableOptions, \"paging\"> {\n  paging: \"keyset\";\n}\n\n/* MP-243: FilterBar's newer field kinds (multiSelect/range/date) write small typed\n   objects instead of a bare string, so the generic \"is this filter active\" check and the\n   filter-predicate builders below need to recognise those shapes by duck-typing their\n   fields — QueryKit stays independent of FilterBar's own module (a kit importing a\n   specific component's types would invert the normal components-depend-on-kits\n   direction), so this is a structural check, not a nominal one. */\ninterface MultiSelectShaped { operator?: \"in\" | \"notIn\"; values: Array<{ value: unknown }> }\nconst isMultiSelectShaped = (v: unknown): v is MultiSelectShaped =>\n  !!v && typeof v === \"object\" && Array.isArray((v as MultiSelectShaped).values);\ninterface RangeShaped { min?: number; max?: number }\nconst isRangeShaped = (v: unknown): v is RangeShaped =>\n  !!v && typeof v === \"object\" && (\"min\" in (v as object) || \"max\" in (v as object));\ninterface DateShaped { kind: \"withinDays\" | \"between\"; days?: number; from?: string; to?: string }\nconst isDateShaped = (v: unknown): v is DateShaped => !!v && typeof v === \"object\" && \"kind\" in (v as object);\n\n/** The one \"is this filter value active\" rule, shared by activeFilterCount, `run`'s own\n   filtering pass and toQueryString's skip check, so all three agree on every value shape\n   FilterBar can produce and none of them counts an empty multiSelect/range/date object as\n   active. */\nfunction isActiveFilterValue(v: unknown): boolean {\n  if (v == null || v === \"\" || v === false) return false;\n  if (Array.isArray(v)) return v.length > 0;\n  if (isMultiSelectShaped(v)) return v.values.length > 0;\n  if (isRangeShaped(v)) return v.min != null || v.max != null;\n  if (isDateShaped(v)) return v.kind === \"withinDays\" ? v.days != null : !!(v.from && v.to);\n  return true;\n}\n\n/* Filter-predicate builders for RunConfig.filters — covers the three shapes that come\n   up in almost every table: equality/multi-select, tag/array membership, numeric range.\n   A filter is free to skip these and write its own (row, value) => boolean instead. */\nexport function eqFilter<Row>(get: (row: Row) => unknown) {\n  return (row: Row, value: unknown): boolean => {\n    if (Array.isArray(value)) return value.includes(get(row));\n    // MP-243: FilterBar's multiSelect value — { operator, values } — reads as\n    // membership in `values`, negated when the operator is \"notIn\".\n    if (isMultiSelectShaped(value)) {\n      const hit = value.values.some((o) => o.value === get(row));\n      return value.operator === \"notIn\" ? !hit : hit;\n    }\n    return get(row) === value;\n  };\n}\nexport function anyOfFilter<Row>(get: (row: Row) => string[]) {\n  return (row: Row, value: unknown): boolean => {\n    const xs = get(row) ?? [];\n    return Array.isArray(value)\n      ? value.some((x) => xs.includes(String(x)))\n      : xs.includes(String(value));\n  };\n}\nexport function rangeFilter<Row>(get: (row: Row) => number) {\n  return (row: Row, value: unknown): boolean => {\n    const n = get(row);\n    let lo = 0;\n    let hi = Number.POSITIVE_INFINITY;\n    if (Array.isArray(value)) {\n      lo = Number(value[0] ?? 0);\n      hi = value[1] == null ? Number.POSITIVE_INFINITY : Number(value[1]);\n    } else if (isRangeShaped(value)) {\n      // MP-243: FilterBar's range value — { min?, max? }.\n      lo = value.min ?? 0;\n      hi = value.max ?? Number.POSITIVE_INFINITY;\n    }\n    return n >= lo && (hi === Number.POSITIVE_INFINITY || n <= hi);\n  };\n}\n\nconst DEFAULTS: TableQuery = { page: 1, pageSize: 25, sort: null, dir: \"desc\", q: \"\", filters: {} };\n\nfunction compare(a: unknown, b: unknown, dir: \"asc\" | \"desc\"): number {\n  const empty = (v: unknown) => v == null || v === \"\";\n  if (empty(a) && empty(b)) return 0;\n  if (empty(a)) return 1;          // nulls always last, both directions\n  if (empty(b)) return -1;\n  const n = typeof a === \"number\" && typeof b === \"number\"\n    ? a - b\n    : String(a).localeCompare(String(b), undefined, { numeric: true, sensitivity: \"base\" });\n  return dir === \"asc\" ? n : -n;\n}\n\n/* Transport and prefs are injected: setApi() once per app. Without this the kit would\n   have to know an app-specific global, which is exactly what makes a shared kit unshareable. */\ntype Api = { request(id: string, params?: unknown, options?: { signal: AbortSignal }): Promise<unknown> };\ntype PrefsStore = { getTable(key: string): any; setTable(key: string, patch: any): void };\n\nlet API: Api | null = null;\nlet PREFS: PrefsStore | null = null;\n\ndeclare global {\n  interface Window {\n    /* Legacy global fallback for QueryKit.setPrefs() — this is the name of the prefs store\n       in the app query.js was extracted from. Harmless: `PREFS || window.PlannerPrefs` already\n       short-circuits on PREFS first, so a consuming app that never defines this global (as most\n       won't) simply falls through to \"no prefs store\" behaviour. Ported as-is, not renamed. */\n    PlannerPrefs?: PrefsStore;\n  }\n}\n\n/** What one answer leaves on screen, whichever paging produced it. */\ninterface Loaded<Row> {\n  rows: Row[];\n  /** The page-mode envelope's pager; null in keyset mode, which has none. */\n  pager: Pager | null;\n  next: string | null;\n  /** Keyset only: what the endpoint counted, null when it did not. */\n  total: number | null;\n  facets: Record<string, Record<string, number>>;\n  aggregate: Record<string, unknown>;\n}\n\nfunction loadedFrom<Row>(paging: QueryPaging, answer: unknown): Loaded<Row> {\n  if (paging === \"keyset\") {\n    const r = answer as KeysetEnvelope<Row>;\n    return { rows: r.rows, pager: null, next: r.next, total: r.total ?? null, facets: r.filter?.facets ?? {}, aggregate: r.aggregate ?? {} };\n  }\n  const r = answer as ListEnvelope<Row>;\n  return { rows: r.rows, pager: r.pager ?? null, next: null, total: null, facets: r.filter?.facets ?? {}, aggregate: r.aggregate ?? {} };\n}\n\n/** The request a query becomes. Keyset sends the cursor and a limit, never a page. */\nfunction requestFor(params: Record<string, unknown> | undefined, query: TableQuery, paging: QueryPaging, after?: string): Record<string, unknown> {\n  if (paging === \"page\") return { ...(params || {}), ...query };\n  const { sort, dir, q, filters, pageSize } = query;\n  return { ...(params || {}), sort, dir, q, filters, limit: pageSize, ...(after === undefined ? {} : { after }) };\n}\n\n/** `error` is always an Error (or null), so a screen can read `.message` whatever the transport threw. */\nconst toError = (e: unknown): Error => (e instanceof Error ? e : new Error(String(e)));\n\n/** React hook — the only way a screen should talk to a list endpoint. Page-numbered by default;\n *  `paging: \"keyset\"` returns the cursor-paged table (`KeysetServerTable`). */\nfunction useServerTable<Row = unknown>(options: UseServerTableOptions): ServerTable<Row>;\nfunction useServerTable<Row = unknown>(options: UseKeysetTableOptions): KeysetServerTable<Row>;\nfunction useServerTable<Row = unknown>(\n  { endpoint, params, defaults, deps, prefsKey, paging = \"page\", url }: UseServerTableOptions | UseKeysetTableOptions,\n): ServerTable<Row> | KeysetServerTable<Row> {\n  /* prefsKey opts a table into durable rows-per-page and default sort (prefs.js).\n     Page number, search text and filters are deliberately NOT persisted: they\n     describe one task, and restoring them would hide rows the user expects. */\n  /* `base` is the query before the address is read: the kit defaults, the options' defaults and the\n     saved prefs. The address is written as the difference from it and read over it. */\n  const [base] = React.useState<TableQuery>(() => {\n    const store = PREFS || window.PlannerPrefs;\n    const saved = prefsKey && store ? store.getTable(prefsKey) : {};\n    return { ...DEFAULTS, ...(defaults || {}), ...(saved.pageSize ? { pageSize: saved.pageSize } : {}), ...(saved.sort ? { sort: saved.sort, dir: saved.dir || \"desc\" } : {}) };\n  });\n  /* The address is read once, here. After this the hook only ever holds the params it was last given\n     (this read, each notification, each of its own writes) and builds every write from them, so the\n     parameters other parts of the page own ride along without the adapter being asked again. */\n  const [mountParams] = React.useState<URLSearchParams | null>(() => (url ? (url.adapter ?? historyUrlAdapter).read() : null));\n  const address = React.useRef<URLSearchParams | null>(mountParams);\n  const [query, setQuery] = React.useState<TableQuery>(() =>\n    url && mountParams ? readQueryFromUrl(mountParams, url.scope, base, paging) : base);\n  const savePref = React.useCallback((patch: { pageSize?: number; sort?: string; dir?: \"asc\" | \"desc\" }) => {\n    const store = PREFS || window.PlannerPrefs;\n    if (prefsKey && store) store.setTable(prefsKey, patch);\n  }, [prefsKey]);\n  const [res, setRes] = React.useState<Loaded<Row> | null>(null);\n  const [loading, setLoading] = React.useState(true);\n  const [loadingMore, setLoadingMore] = React.useState(false);\n  /* What failed decides what `retry` runs: the query again, or the page `loadMore` was reading. */\n  const [failure, setFailure] = React.useState<{ error: Error; during: \"query\" | \"more\" } | null>(null);\n  const [reloadToken, setReloadToken] = React.useState(0);\n  /* The next page being read, if any. Aborted with the query it belongs to. */\n  const moreController = React.useRef<AbortController | null>(null);\n  const depKey = (deps || []).join(\"|\");\n  const paramKey = JSON.stringify(params || {});\n  const queryKey = JSON.stringify(query);\n\n  /* The table's own lifetime, for a read no query owns (`fetchAll`): aborted when it unmounts. */\n  const lifetime = React.useRef<AbortController | null>(null);\n  React.useEffect(() => {\n    const controller = new AbortController();\n    lifetime.current = controller;\n    return () => controller.abort();\n  }, []);\n\n  /* The latest of what an event handler, a timer or a subscription reads: they outlive the render\n     that made them (an app's adapter is often built inline, fresh each render). */\n  const latest = React.useRef({ res, loading, query, params, endpoint, url, base });\n  // DS-3: a layout effect, so a click in the commit that shows a page already reads that page's state.\n  React.useLayoutEffect(() => { latest.current = { res, loading, query, params, endpoint, url, base }; });\n\n  React.useEffect(() => {\n    const controller = new AbortController();\n    const { signal } = controller;\n    setLoading(true);\n    setLoadingMore(false);\n    setFailure(null);\n    // Debounced so typing in a search box is one request, not one per keystroke —\n    // exactly what we want against the real endpoint. The address follows the same debounce.\n    const t = setTimeout(() => {\n      const { url: u, base: b } = latest.current;\n      if (u && address.current) {\n        const next = writeQueryToUrl(address.current, u.scope, query, b, paging);\n        if (next.toString() !== address.current.toString()) {\n          address.current = next;\n          (u.adapter ?? historyUrlAdapter).write(next);\n        }\n      }\n      QueryKit.getApi().request(endpoint, requestFor(params, query, paging), { signal }).then(\n        (r) => {\n          if (signal.aborted) return;   // a query that was left, answered late\n          setRes(loadedFrom<Row>(paging, r));\n          setLoading(false);\n        },\n        (e: unknown) => {\n          if (signal.aborted) return;\n          // The rows of the last answer stay: a refresh that fails is an error over real content.\n          setFailure({ error: toError(e), during: \"query\" });\n          setLoading(false);\n        },\n      );\n    }, query.q ? 220 : 60);\n    return () => {\n      clearTimeout(t);\n      controller.abort();\n      moreController.current?.abort();\n      moreController.current = null;\n    };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [endpoint, queryKey, paramKey, depKey, paging, reloadToken]);\n\n  /* The address changing underneath the list (Back, Forward, or an app writing it) becomes the query,\n     from the params the notification carries. Subscribed again when the adapter is a new one. */\n  const adapter = url ? (url.adapter ?? historyUrlAdapter) : null;\n  React.useEffect(() => {\n    if (!adapter) return;\n    return adapter.subscribe((params) => {\n      const { url: u, base: b } = latest.current;\n      if (!u) return;\n      // The params come with the notification: no adapter is asked, so none can answer with the\n      // address of a render that has since been replaced.\n      address.current = params;\n      const fromAddress = readQueryFromUrl(params, u.scope, b, paging);\n      setQuery((s) => (JSON.stringify(s) === JSON.stringify(fromAddress) ? s : fromAddress));\n    });\n  }, [adapter, paging]);\n\n  const patch = (p: Partial<TableQuery>, resetPage = true) =>\n    setQuery((s) => ({ ...s, ...p, page: resetPage ? 1 : (p.page != null ? p.page : s.page) }));\n\n  const loadMore = () => {\n    const { res: loaded, loading: querying, query: q, params: p, endpoint: e } = latest.current;\n    if (!loaded || loaded.next === null || querying || moreController.current !== null) return;\n    const controller = new AbortController();\n    const { signal } = controller;\n    moreController.current = controller;\n    setLoadingMore(true);\n    setFailure(null);\n    QueryKit.getApi().request(e, requestFor(p, q, \"keyset\", loaded.next), { signal }).then(\n      (r) => {\n        if (signal.aborted) return;   // the query moved on while this page was being read\n        moreController.current = null;\n        const more = loadedFrom<Row>(\"keyset\", r);\n        setRes((now) => now && { ...more, rows: [...now.rows, ...more.rows], total: more.total ?? now.total });\n        setLoadingMore(false);\n      },\n      (err: unknown) => {\n        if (signal.aborted) return;\n        moreController.current = null;\n        setFailure({ error: toError(err), during: \"more\" });\n        setLoadingMore(false);\n      },\n    );\n  };\n\n  const shared: ServerTableBase<Row> = {\n    rows: res ? res.rows : [],\n    pageSize: query.pageSize,\n    facets: res ? res.facets : {},\n    /** Server-computed totals over the whole match, never the current page. */\n    aggregate: res ? res.aggregate : {},\n    /** The live query object — pass to fetchAll-style calls that need the full match. */\n    query,\n    sort: query.sort ? { key: query.sort, dir: query.dir } : undefined,\n    q: query.q,\n    filters: query.filters,\n    loading,\n    /** True only on the very first load — later loads keep showing stale rows. */\n    initialLoading: loading && !res,\n    error: failure ? failure.error : null,\n    retry: () => { if (failure?.during === \"more\") loadMore(); else setReloadToken((t) => t + 1); },\n    activeFilterCount: Object.values(query.filters).filter(isActiveFilterValue).length,\n    setPageSize: (pageSize: number) => { savePref({ pageSize }); patch({ pageSize }); },\n    setQ: (q: string) => patch({ q }),\n    toggleSort: (key: string) => setQuery((s) => {\n      const dir: \"asc\" | \"desc\" = s.sort === key && s.dir === \"desc\" ? \"asc\" : \"desc\";\n      savePref({ sort: key, dir });\n      return { ...s, page: 1, sort: key, dir };\n    }),\n    setSortKey: (key: string, dir?: \"asc\" | \"desc\") => { savePref({ sort: key, dir: dir || \"desc\" }); setQuery((s) => ({ ...s, page: 1, sort: key, dir: dir || \"desc\" })); },\n    /** value may be an updater fn — required for toggles, or two fast clicks\n        both read the same stale array and the first one is lost. */\n    setFilter: (id: string, value: unknown | ((prev: unknown) => unknown)) => setQuery((s) => ({ ...s, page: 1, filters: { ...s.filters, [id]: typeof value === \"function\" ? (value as (prev: unknown) => unknown)(s.filters[id]) : value } })),\n    clearFilter: (id: string) => setQuery((s) => { const f = { ...s.filters }; delete f[id]; return { ...s, page: 1, filters: f }; }),\n    setFilters: (filters: Record<string, unknown>) => patch({ filters }),\n    clearFilters: () => patch({ filters: {}, q: \"\" }),\n    refresh: () => setReloadToken((t) => t + 1),\n    patchRows: (change: (rows: Row[]) => Row[]) => setRes((now) => now && { ...now, rows: change(now.rows) }),\n    /* True on a re-query while the PREVIOUS rows are still rendered — sort, filter, page.\n       Distinct from `loading` (first load, nothing on screen) because the two need different\n       treatments: skeletons versus a stale overlay on real content. */\n    refreshing: loading && !!res,\n    queryString: QueryKit.toQueryString(query)\n  };\n\n  if (paging === \"keyset\") {\n    return { ...shared, total: res ? res.total : null, hasMore: !!res && res.next !== null, loadingMore, loadMore };\n  }\n  /** The response's pager block, verbatim. */\n  const pager: Pager = (res && res.pager) || { page: query.page, pageSize: query.pageSize, total: 0, totalPages: 1, from: 0, to: 0, hasPrev: false, hasNext: false };\n  return {\n    ...shared,\n    pager,\n    total: pager.total || 0,\n    page: pager.page || query.page,\n    totalPages: pager.totalPages || 1,\n    from: pager.from || 0,\n    to: pager.to || 0,\n    setPage: (page: number) => patch({ page }, false),\n    /** Same query, unpaged — for CSV export and select-all-matching. */\n    fetchAll: () => QueryKit.getApi().request(endpoint, { ...(params || {}), ...query, page: 1, pageSize: 100000 }, { signal: lifetime.current!.signal }).then((r) => (r as ListEnvelope<Row>).rows),\n  };\n}\n\nconst QueryKit = {\n  DEFAULTS,\n  /** Register the app's simulated (or real) transport: an object with .request(id, params). */\n  setApi<T extends Api>(api: T): T { API = api; return api; },\n  getApi(): Api {\n    if (!API) throw new Error(\"QueryKit: call QueryKit.setApi(yourApi) once at app boot — the kit must not guess at app globals.\");\n    return API;\n  },\n  /** Optional durable table preferences store: { getTable(key), setTable(key, patch) }. */\n  setPrefs(p: PrefsStore): void { PREFS = p; },\n\n  /**\n   * @param rows  the full static dataset (stands in for the table)\n   * @param query { page, pageSize, sort, dir, q, filters }\n   * @param cfg   { searchKeys[], filters: {id: (row, value) => boolean},\n   *                accessors: {colKey: (row) => sortableValue},\n   *                facets: {id: (row) => facetValue} }\n   */\n  run<Row>(rows: Row[], query: Partial<TableQuery>, cfg: RunConfig<Row>): ListEnvelope<Row> {\n    const Q: TableQuery = { ...DEFAULTS, ...(query || {}) };\n    const c = cfg;\n    const filters = Q.filters || {};\n\n    // search\n    let out: Row[] = rows;\n    const term = (Q.q || \"\").trim().toLowerCase();\n    if (term && c.searchKeys) {\n      const keys = c.searchKeys;\n      out = out.filter((r) => keys.some((k) => String((r as Record<string, unknown>)[k] ?? \"\").toLowerCase().includes(term)));\n    }\n    const searched = out;\n\n    // filters\n    Object.entries(filters).forEach(([id, val]) => {\n      const fn = c.filters && c.filters[id];\n      if (!isActiveFilterValue(val) || !fn) return;\n      out = out.filter((r) => fn(r, val));\n    });\n    const matched = out;\n\n    // facets — option counts computed over the searched set, so a filter never\n    // erases its own alternatives from the UI.\n    const facets: Record<string, Record<string, number>> = {};\n    if (c.facets) Object.entries(c.facets).forEach(([id, get]) => {\n      const counts: Record<string, number> = {};\n      searched.forEach((r) => { const v = get(r); if (v != null) counts[v] = (counts[v] || 0) + 1; });\n      facets[id] = counts;\n    });\n\n    // sort\n    if (Q.sort) {\n      const get = (c.accessors && c.accessors[Q.sort]) || ((r: Row) => (r as Record<string, unknown>)[Q.sort as string]);\n      out = [...out].sort((a, b) => compare(get(a), get(b), Q.dir));\n    }\n\n    // page\n    const total = matched.length;\n    const pageSize = Math.max(1, Q.pageSize);\n    const totalPages = Math.max(1, Math.ceil(total / pageSize));\n    const page = Math.min(Math.max(1, Q.page), totalPages);\n    const paged = out.slice((page - 1) * pageSize, page * pageSize);\n    return {\n      rows: paged,\n      pager: {\n        page, pageSize, total, totalPages,\n        from: total === 0 ? 0 : (page - 1) * pageSize + 1,\n        to: Math.min(total, page * pageSize),\n        hasPrev: page > 1,\n        hasNext: page < totalPages\n      },\n      sort: Q.sort ? { key: Q.sort, dir: Q.dir } : null,\n      filter: { applied: filters, q: Q.q || \"\", facets }\n    };\n  },\n\n  /** Display form of a query, for the request log and the API spec screen. */\n  toQueryString(query: Partial<TableQuery>): string {\n    const Q: TableQuery = { ...DEFAULTS, ...(query || {}) };\n    const parts: string[] = [];\n    if (Q.page !== 1) parts.push(\"page=\" + Q.page);\n    if (Q.pageSize !== DEFAULTS.pageSize) parts.push(\"pageSize=\" + Q.pageSize);\n    if (Q.sort) parts.push(\"sort=\" + Q.sort + \"&dir=\" + Q.dir);\n    if (Q.q) parts.push(\"q=\" + encodeURIComponent(Q.q));\n    Object.entries(Q.filters || {}).forEach(([k, v]) => {\n      if (!isActiveFilterValue(v)) return;\n      // Arrays serialize as repeated params — ?state=OH&state=MI — the convention\n      // the real endpoints read for multi-select filters.\n      if (Array.isArray(v)) { v.forEach((x) => parts.push(k + \"=\" + encodeURIComponent((x === Infinity ? \"*\" : x) as string | number | boolean))); return; }\n      // MP-243: FilterBar's multiSelect/range/date values are small objects, not bare\n      // strings — serialized meaningfully here so this never falls through to\n      // `String(v)` and prints the literal text \"[object Object]\".\n      if (isMultiSelectShaped(v)) {\n        const prefix = v.operator === \"notIn\" ? \"notIn:\" : \"\";\n        v.values.forEach((o) => parts.push(k + \"=\" + encodeURIComponent(prefix + String(o.value))));\n        return;\n      }\n      if (isRangeShaped(v)) {\n        if (v.min != null) parts.push(k + \".min=\" + encodeURIComponent(String(v.min)));\n        if (v.max != null) parts.push(k + \".max=\" + encodeURIComponent(String(v.max)));\n        return;\n      }\n      if (isDateShaped(v)) {\n        if (v.kind === \"withinDays\") parts.push(k + \"=withinDays:\" + encodeURIComponent(String(v.days)));\n        else { parts.push(k + \".from=\" + encodeURIComponent(String(v.from))); parts.push(k + \".to=\" + encodeURIComponent(String(v.to))); }\n        return;\n      }\n      parts.push(k + \"=\" + encodeURIComponent(v as string | number | boolean));\n    });\n    return parts.join(\"&\");\n  },\n\n  useServerTable\n};\n\nexport { QueryKit, useServerTable };\n","import type { TableQuery } from \"./query\";\n\n/* =============================================================================\n   queryUrl — a list's query (search, filters, sort, page size, page) kept in the\n   address, so a link reproduces the list and the browser's Back returns to it.\n\n   The hook (useServerTable's `url` option) owns WHEN to read and write; this file owns\n   HOW a query becomes search params and back, and where the params live:\n\n     q, sort, dir, page, pageSize   one param each, present only when not the default\n     filters                        ONE param, the JSON of the whole filters object. The\n                                    values are whatever the screen put there (strings,\n                                    arrays, FilterBar's typed objects), so only JSON\n                                    brings back the same type; one param is also the only\n                                    way a cleared default filter can be told from one\n                                    never set.\n\n   A `scope` prefixes every param (`flagged-q`) so several lists share one address, and a\n   write never touches a param that is not the list's own. The address is untrusted\n   input: a value that does not parse is ignored (the default stands), never thrown.\n============================================================================= */\n\n/** Where the params live. The default is the browser's address; an app with a router\n *  passes an adapter over the router's search params so the router stays in step. */\nexport interface QueryUrlAdapter {\n  read(): URLSearchParams;\n  /** Replaces the current history entry's params: a refinement of one list is not a place to go Back to. */\n  write(next: URLSearchParams): void;\n  /** Calls `onChange` with the params as they now are whenever they change (Back, Forward, or a\n   *  `write`), and returns the unsubscribe. The params are passed, never re-read through the adapter,\n   *  because an adapter built per render answers `read()` with the params of the render that built it\n   *  and may notify before React renders again. A notification of the list's own `write` carries the\n   *  params it wrote, which the hook recognises as no change. `read` is called once, when the list mounts. */\n  subscribe(onChange: (params: URLSearchParams) => void): () => void;\n}\n\nexport interface QueryUrlOptions {\n  /** Prefix for this list's params, for a screen with more than one list. */\n  scope?: string;\n  /** Defaults to the browser's address (`historyUrlAdapter`). */\n  adapter?: QueryUrlAdapter;\n}\n\nexport type QueryPaging = \"page\" | \"keyset\";\n\nexport const historyUrlAdapter: QueryUrlAdapter = {\n  read: () => new URLSearchParams(window.location.search),\n  write(next) {\n    const search = next.toString();\n    const url = window.location.pathname + (search ? `?${search}` : \"\") + window.location.hash;\n    // history.state is kept: a router stores its own location key there.\n    window.history.replaceState(window.history.state, \"\", url);\n  },\n  subscribe(onChange) {\n    const onPopState = () => onChange(new URLSearchParams(window.location.search));\n    window.addEventListener(\"popstate\", onPopState);\n    return () => window.removeEventListener(\"popstate\", onPopState);\n  },\n};\n\nconst names = (scope: string | undefined) => {\n  const prefix = scope ? `${scope}-` : \"\";\n  return {\n    q: `${prefix}q`, sort: `${prefix}sort`, dir: `${prefix}dir`,\n    page: `${prefix}page`, pageSize: `${prefix}pageSize`, filters: `${prefix}filters`,\n  };\n};\n\nconst positiveInt = (text: string | null): number | null => {\n  const n = Number(text);\n  return text !== null && Number.isInteger(n) && n >= 1 ? n : null;\n};\n\nfunction parseFilters(text: string | null): Record<string, unknown> | null {\n  if (text === null) return null;\n  try {\n    const parsed: unknown = JSON.parse(text);\n    return parsed !== null && typeof parsed === \"object\" && !Array.isArray(parsed)\n      ? (parsed as Record<string, unknown>)\n      : null;\n  } catch {\n    return null;\n  }\n}\n\n/** The query the address describes: `base` (the options' defaults) for whatever it does not name. */\nexport function readQueryFromUrl(\n  params: URLSearchParams,\n  scope: string | undefined,\n  base: TableQuery,\n  paging: QueryPaging,\n): TableQuery {\n  const n = names(scope);\n  const dir = params.get(n.dir);\n  return {\n    page: paging === \"page\" ? (positiveInt(params.get(n.page)) ?? base.page) : base.page,\n    pageSize: positiveInt(params.get(n.pageSize)) ?? base.pageSize,\n    sort: params.get(n.sort) || base.sort,\n    dir: dir === \"asc\" || dir === \"desc\" ? dir : base.dir,\n    q: params.get(n.q) ?? base.q,\n    filters: parseFilters(params.get(n.filters)) ?? base.filters,\n  };\n}\n\n/** A copy of `params` whose own keys describe `query`: a value equal to `base` is removed, not written. */\nexport function writeQueryToUrl(\n  params: URLSearchParams,\n  scope: string | undefined,\n  query: TableQuery,\n  base: TableQuery,\n  paging: QueryPaging,\n): URLSearchParams {\n  const n = names(scope);\n  const next = new URLSearchParams(params);\n  const set = (name: string, value: string | null, isDefault: boolean) => {\n    if (value === null || isDefault) next.delete(name);\n    else next.set(name, value);\n  };\n  set(n.q, query.q, query.q === base.q);\n  set(n.sort, query.sort, query.sort === base.sort);\n  set(n.dir, query.dir, query.dir === base.dir);\n  set(n.pageSize, String(query.pageSize), query.pageSize === base.pageSize);\n  set(n.page, String(query.page), paging === \"keyset\" || query.page === base.page);\n  const filters = JSON.stringify(query.filters);\n  set(n.filters, filters, filters === JSON.stringify(base.filters));\n  return next;\n}\n","/* =============================================================================\n   MockJobKit — simulates a long-running backend job so a mock/demo transport can\n   answer the `{ jobId }` → poll pattern the same way a real async endpoint would:\n   the initiating call returns immediately with an id, and the caller polls a\n   status endpoint until the work is done.\n\n   Two halves:\n\n   1. MockJobKit.schedule(prefix, latency, stages, compute)\n      The SERVER side, simulated. Registers a job and advances it through `stages`\n      on a jittered timer within `latency`, calling `compute()` on the final tick\n      to produce the result. Returns the job id at once — exactly what a real\n      endpoint returns before doing the work off the request/response cycle.\n\n   2. MockJobKit.get(jobId) / MockJobKit.poll(jobId, opts)\n      The CLIENT side. `get` is the plain status lookup a jobs.get-style endpoint\n      wraps. `poll` is the loop every screen that watches a job actually needs:\n      re-check on an interval, report progress via onTick, resolve with the\n      result once done, throw once failed. Pulled out here because two unrelated\n      screens had each hand-written the identical loop.\n\n   Failure: `compute` may throw. A throw is caught and turned into a \"failed\"\n   status with `error` set to the thrown value's message — the honest way to make\n   MockJobStatus's \"failed\" state one that can actually occur, rather than a value\n   the type claims is reachable but no scheduler ever produces.\n============================================================================= */\n\nexport interface MockJobStatus<TResult = unknown> {\n  id: string;\n  status: \"queued\" | \"running\" | \"done\" | \"failed\";\n  progress?: number;\n  stage?: string;\n  result?: TResult;\n  /** Set only when status is \"failed\" — the thrown value's message. */\n  error?: string;\n}\nexport interface PollOptions<TResult = unknown> {\n  /** Delay between polls, ms. Default 400 — the rate every hand-written poller used. */\n  intervalMs?: number;\n  onTick?: (status: MockJobStatus<TResult>) => void;\n}\n\nlet ridSeq = 0;\nconst rid = (prefix: string) =>\n  `${prefix}_${(++ridSeq).toString(36)}${Math.random().toString(36).slice(2, 6)}`;\nconst jitter = ([lo, hi]: [number, number]) => lo + Math.random() * (hi - lo);\nconst sleep = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms));\n\nconst jobs = new Map<string, MockJobStatus>();\n\n/**\n * @param prefix   id prefix, e.g. \"imp\" → \"imp_1a2b3c\"\n * @param latency  [lo, hi] ms — total time across every stage, jittered within the range\n * @param stages   progress labels in order, e.g. [\"Uploading\", \"Parsing\", \"Validating\"]\n * @param compute  runs once, on the final stage, to produce the result — or throws to fail the job\n */\nfunction schedule<TResult>(\n  prefix: string,\n  latency: [number, number],\n  stages: string[],\n  compute: () => TResult,\n): string {\n  const id = rid(prefix);\n  const list = stages.length ? stages : [\"Working\"];\n  const total = jitter(latency);\n  jobs.set(id, { id, status: \"queued\", progress: 0, stage: list[0] });\n  list.forEach((stage, i) => {\n    const at = (total * (i + 1)) / list.length;\n    setTimeout(() => {\n      if (!jobs.has(id)) return;   // job was cleared out from under this tick\n      if (i === list.length - 1) {\n        try {\n          jobs.set(id, { id, status: \"done\", progress: 1, stage, result: compute() });\n        } catch (err) {\n          jobs.set(id, {\n            id, status: \"failed\", progress: 1, stage,\n            error: err instanceof Error ? err.message : String(err),\n          });\n        }\n      } else {\n        jobs.set(id, { id, status: \"running\", progress: (i + 1) / list.length, stage });\n      }\n    }, at);\n  });\n  return id;\n}\n\n/** Plain status lookup — what a jobs.get-style mock endpoint wraps. Throws if the id is unknown. */\nfunction get<TResult = unknown>(jobId: string): MockJobStatus<TResult> {\n  const job = jobs.get(jobId);\n  if (!job) throw new Error(`MockJobKit: job \"${jobId}\" not found`);\n  // The store is untyped (one Map holds every job in the app) — the caller's TResult\n  // is trusted the same way a real jobs.get response's shape would be.\n  return { ...job } as unknown as MockJobStatus<TResult>;\n}\n\n/** Polls until the job resolves. Resolves with the result on \"done\", throws on \"failed\". */\nasync function poll<TResult = unknown>(jobId: string, opts?: PollOptions<TResult>): Promise<TResult> {\n  const intervalMs = opts?.intervalMs ?? 400;\n  for (;;) {\n    const status = get<TResult>(jobId);\n    opts?.onTick?.(status);\n    if (status.status === \"done\") return status.result as TResult;\n    if (status.status === \"failed\") throw new Error(status.error || `Job failed: ${jobId}`);\n    await sleep(intervalMs);\n  }\n}\n\nexport const MockJobKit = { schedule, get, poll };\n","/* =============================================================================\n   VersionKit — append-only version history with a full-state snapshot per\n   version, so any version can be jumped back to without replaying mutations.\n\n   Extracted from media-planner's plan-version pattern (commitVersion / plan.undo /\n   versions.restore) and generalized: this file has no idea what TState is. A\n   consuming app supplies the whole state shape it wants versioned — a plan, a\n   document, a form draft, whatever — plus an optional `diff` function for\n   describing what changed between two states in whatever shape it cares about.\n\n   Factory, not a namespace: an app can have more than one independently-versioned\n   thing open at once (two plans, a plan and a separate document), and each needs\n   its own version array, its own snapshot map and its own \"current\" pointer.\n   createVersionStore() returns one such instance; SessionKit/RuntimeKit's\n   single-shared-store shape would make the second instance clobber the first.\n\n   History is append-only on purpose: undo() and restoreTo() never delete or\n   rewrite a version, they COMMIT a new one whose state happens to match an\n   earlier snapshot. That is what makes \"undo the undo\" possible and what keeps\n   the version list a true audit trail instead of a mutable pointer. ---------- */\n\n/** One entry in the append-only history. Never mutated after it's appended,\n *  except for `current` flipping to false when a later version is committed. */\nexport interface VersionRecord<TDiff = unknown> {\n  v: number;\n  current: boolean;\n  who: string;\n  when: string;\n  action: string;\n  /** Human-readable change descriptions, as returned by the mutator passed to commit(). */\n  changes: string[];\n  /** Present only when the store was created with a `diff` option. */\n  diff?: TDiff;\n  /** Open bag for caller-specific before/after figures (e.g. a computed total) that\n   *  don't belong in `diff` because they aren't part of the state comparison itself. */\n  meta?: Record<string, unknown>;\n}\n\nexport interface CreateVersionStoreOptions<TState, TDiff = unknown> {\n  /** Defaults to structuredClone. Override if TState holds something it can't clone\n   *  (a class instance, a function) — must still produce a deep, independent copy. */\n  clone?: (state: TState) => TState;\n  /** Computes what a version's `diff` field holds by comparing the state before and\n   *  after the mutation. Omit if the caller has no use for a structured diff — the\n   *  `changes` string list on every record still describes what happened. */\n  diff?: (before: TState, after: TState) => TDiff;\n  /** Timestamp/attribution stamp for `when`. Defaults to `new Date().toISOString()`. */\n  now?: () => string;\n  /** Version number the initial state is recorded under. Defaults to 0. */\n  initialVersion?: number;\n  who?: string;\n  action?: string;\n}\n\nexport interface VersionStore<TState, TDiff = unknown> {\n  /** The live state. Mutating it directly bypasses versioning — always go through commit(). */\n  getState(): TState;\n  /** Newest first, matching the order a version-history panel reads top to bottom. */\n  getVersions(): VersionRecord<TDiff>[];\n  getVersion(v: number): VersionRecord<TDiff> | undefined;\n  /**\n   * Snapshots the state before mutation, runs `mutate` against the live state, then\n   * appends a new version recording what changed and keeps a full-state snapshot of\n   * the result so this version can be restored to or undone past later.\n   */\n  commit(who: string, action: string, mutate: (state: TState) => string[], meta?: Record<string, unknown>): VersionRecord<TDiff>;\n  /** Makes version `v` current by committing its snapshot as a NEW head version —\n   *  history is append-only, so this never rewrites or truncates the list. */\n  restoreTo(v: number, who?: string): VersionRecord<TDiff>;\n  /** Restores the state one version behind the current head, committed as a new head\n   *  version (the inverse of the head's change, recorded rather than erased). Throws\n   *  if the head is already the oldest recorded version. */\n  undo(who?: string): VersionRecord<TDiff>;\n}\n\nexport function createVersionStore<TState, TDiff = unknown>(\n  initialState: TState,\n  options?: CreateVersionStoreOptions<TState, TDiff>,\n): VersionStore<TState, TDiff> {\n  const cloneFn = options?.clone ?? ((value: TState) => structuredClone(value));\n  const diffFn = options?.diff;\n  const now = options?.now ?? (() => new Date().toISOString());\n\n  let headVersion = options?.initialVersion ?? 0;\n  let state = cloneFn(initialState);\n\n  let versions: VersionRecord<TDiff>[] = [\n    {\n      v: headVersion,\n      current: true,\n      who: options?.who ?? \"system\",\n      when: now(),\n      action: options?.action ?? \"Initial state\",\n      changes: [],\n    },\n  ];\n  const snapshots = new Map<number, TState>();\n  snapshots.set(headVersion, cloneFn(state));\n\n  function append(record: Omit<VersionRecord<TDiff>, \"v\" | \"current\">): VersionRecord<TDiff> {\n    headVersion += 1;\n    versions.forEach((v) => { v.current = false; });\n    const version: VersionRecord<TDiff> = { ...record, v: headVersion, current: true };\n    versions = [version, ...versions];\n    snapshots.set(headVersion, cloneFn(state));\n    return version;\n  }\n\n  return {\n    getState(): TState { return state; },\n    getVersions(): VersionRecord<TDiff>[] { return [...versions]; },\n    getVersion(v: number): VersionRecord<TDiff> | undefined { return versions.find((x) => x.v === v); },\n\n    commit(who, action, mutate, meta) {\n      const before = cloneFn(state);\n      const changes = mutate(state);\n      return append({\n        who, when: now(), action, changes, meta,\n        diff: diffFn ? diffFn(before, state) : undefined,\n      });\n    },\n\n    restoreTo(v, who = \"system\") {\n      const snapshot = snapshots.get(v);\n      const original = versions.find((x) => x.v === v);\n      if (!snapshot || !original) throw new Error(`createVersionStore: version ${v} not found`);\n      const before = cloneFn(state);\n      state = cloneFn(snapshot);\n      return append({\n        who, when: now(),\n        action: `Restored v${v}`,\n        changes: [`Restored to v${v} (${original.action})`],\n        diff: diffFn ? diffFn(before, state) : undefined,\n      });\n    },\n\n    undo(who = \"system\") {\n      const head = versions[0];\n      const prevSnapshot = head ? snapshots.get(head.v - 1) : undefined;\n      if (!head || !prevSnapshot) throw new Error(\"createVersionStore: nothing to undo\");\n      const before = cloneFn(state);\n      state = cloneFn(prevSnapshot);\n      return append({\n        who, when: now(),\n        action: `Undid: ${head.action}`,\n        changes: head.changes.map((c) => `↩ ${c}`),\n        diff: diffFn ? diffFn(before, state) : undefined,\n      });\n    },\n  };\n}\n","import * as React from \"react\";\n\n/**\n * MP-221: the \"<route> · <app> · Flytedesk\" title convention every flytedesk app shell\n * hand-typed per route (sms-app's CampaignAnalytics.tsx, QueryTool.tsx, NotFound.tsx,\n * SignIn.tsx and index.html each spelled \" · SMS · Flytedesk\" separately — SMS-5\n * code-quality review item 5). One place composes it now.\n *\n * `routeTitle` is optional so a route with no title of its own (e.g. a bare loading\n * state) still gets a correct \"<app> · Flytedesk\" title instead of a dangling separator.\n */\nexport function formatDocumentTitle(routeTitle: string | undefined | null, appName: string): string {\n  return [routeTitle, appName, \"Flytedesk\"].filter((part) => !!part && part.length > 0).join(\" · \");\n}\n\n/**\n * Sets `document.title` to `formatDocumentTitle(routeTitle, appName)` for as long as the\n * calling component is mounted, and re-applies it whenever either argument changes —\n * e.g. call it once per route component with that route's own title. Does nothing\n * outside a DOM environment (SSR/tests with no `document`).\n */\nexport function useDocumentTitle(routeTitle: string | undefined | null, appName: string): void {\n  React.useEffect(() => {\n    if (typeof document === \"undefined\") return;\n    document.title = formatDocumentTitle(routeTitle, appName);\n  }, [routeTitle, appName]);\n}\n","/** How long one chat call may take before it fails visibly instead of leaving the conversation waiting for ever. */\nexport const CHAT_CALL_DEADLINE_MS = 30_000;\n\nexport class CallDeadlineError extends Error {\n  constructor(readonly call: string, readonly deadlineMs: number) {\n    super(`${call} did not answer within ${deadlineMs}ms`);\n    this.name = \"CallDeadlineError\";\n  }\n}\n\n/** Settles as `work` does, or rejects with a `CallDeadlineError` once `deadlineMs` has passed with no answer. The work\n *  itself is not cancelled (an app's client may offer no way to); the caller just stops waiting. */\nexport function withDeadline<T>(call: string, deadlineMs: number, work: Promise<T>): Promise<T> {\n  let timer: ReturnType<typeof setTimeout> | undefined;\n  const deadline = new Promise<never>((_resolve, reject) => {\n    timer = setTimeout(() => reject(new CallDeadlineError(call, deadlineMs)), deadlineMs);\n  });\n  return Promise.race([work, deadline]).finally(() => clearTimeout(timer));\n}\n","import type { ChatAdapter, ChatMessage, JobStatus, SendMessageResult, StreamHandlers } from \"../../components/chat/chatEngine\";\nimport type { ThreadSummary } from \"../../components/chat/AgentChatPanel\";\nimport type { Attachment } from \"../files\";\nimport { CHAT_CALL_DEADLINE_MS, withDeadline } from \"./deadline\";\n\n/** The exact string the chat engine matches to show its \"isn't reachable\" state (never substring sniffing). */\nexport const CHAT_UNAVAILABLE_MESSAGE = \"chat_unavailable\";\n\n/** What a transport throws when it could not reach its api at all, so the adapter can tell an unreachable chat from a\n *  server's own stable error code (which the panel matches by exact equality and the adapter never rewrites). */\nexport class ChatUnreachableError extends Error {\n  constructor(message = CHAT_UNAVAILABLE_MESSAGE) {\n    super(message);\n    this.name = \"ChatUnreachableError\";\n  }\n}\n\nexport interface ChatThreadRef {\n  thread_id: string;\n}\n\n/** The page the chat is opened on, as the engine passes it when it resolves a thread. */\nexport interface ChatThreadContext {\n  contextType: string;\n  contextId: string;\n}\n\n/** A turn the app runs as a dispatch: start it, then the engine polls its status until it ends. */\nexport interface PollingTurns {\n  /** Starts a turn (a dispatch, not a stream) and answers the job id the engine tracks. `attachments` are the files the\n   *  person added; a transport that cannot carry them must throw rather than drop them. */\n  startTurn: (threadId: string, text: string, attachments?: Attachment[]) => Promise<{ jobId: string }>;\n  /** The turn's status, or null when the server no longer knows the turn. */\n  getTurn: (jobId: string) => Promise<JobStatus | null>;\n  streamTurn?: never;\n}\n\n/** A turn the app runs as one live stream: the engine appends what `handlers` are given, and Stop aborts `signal`. */\nexport interface StreamingTurns {\n  /** Runs the turn to its end. It resolves the turn's final result (no `job_id`: a streaming chat has no turn status\n   *  to poll) and throws `ChatUnreachableError` when the api cannot be reached. It carries no deadline: a live stream\n   *  may run as long as the turn does. */\n  streamTurn: (\n    threadId: string,\n    text: string,\n    handlers: StreamHandlers,\n    signal: AbortSignal,\n    attachments?: Attachment[],\n  ) => Promise<SendMessageResult>;\n  startTurn?: never;\n  getTurn?: never;\n}\n\n/**\n * What an app supplies to put a chat on the design system's panel: its own request client and its own mapping from its\n * wire onto the design system's generic `ChatMessage`, `JobStatus` and `ThreadSummary`. The design system names no route,\n * client or wire type; each member is the app's call, answering the generic shape. Its turns are either polled\n * (`startTurn` + `getTurn`) or streamed (`streamTurn`), never both.\n */\nexport type ChatTransport = {\n  /** The person's current thread. The server always answers one, so a failure means the api is unreachable. */\n  resolveThread: (context: ChatThreadContext) => Promise<ChatThreadRef>;\n  /** A new conversation: the person's newest thread when that one is still empty, else a fresh one. */\n  createThread: () => Promise<ChatThreadRef>;\n  /** The person's threads that hold a message, newest activity first, as the panel's history lists them. */\n  listThreads: (signal: AbortSignal) => Promise<ThreadSummary[]>;\n  getMessages: (threadId: string) => Promise<ChatMessage[]>;\n  /** The Stop button of a polled turn: cancels it upstream. A streamed turn is stopped by aborting its signal. */\n  cancelTurn?: (jobId: string) => Promise<void>;\n} & (PollingTurns | StreamingTurns);\n\nexport interface ChatAdapterOptions {\n  /** Called once a turn has been accepted (a polled turn when its dispatch is accepted, a streamed one at its first\n   *  stream event), so the person's thread list can show a first message. */\n  onTurnStarted?: () => void;\n  deadlineMs?: number;\n}\n\n/** The `ChatAdapter` for `useChatEngine`, over an app's transport. It adds what every chat needs and no app should\n *  re-write: a deadline on every call but a live stream, the exact \"chat_unavailable\" failure of an unreachable api, a\n *  vanished turn read as failed, and the signal that a turn started. `useChatEngine` owns every state-machine rule\n *  (optimistic send, polling, retry). */\nexport function createChatAdapter(\n  transport: ChatTransport,\n  { onTurnStarted, deadlineMs = CHAT_CALL_DEADLINE_MS }: ChatAdapterOptions = {},\n): ChatAdapter {\n  const within = <T>(call: string, work: Promise<T>) => withDeadline(call, deadlineMs, work);\n\n  const common = {\n    async resolveThread(context: ChatThreadContext) {\n      try {\n        const { thread_id } = await within(\"resolveThread\", transport.resolveThread(context));\n        return { thread_id };\n      } catch {\n        throw new Error(CHAT_UNAVAILABLE_MESSAGE);\n      }\n    },\n\n    async getThread(threadId: string) {\n      return { messages: await within(\"getThread\", transport.getMessages(threadId)) };\n    },\n\n    cancelJob: transport.cancelTurn ? (jobId: string) => within(\"cancelJob\", transport.cancelTurn!(jobId)) : undefined,\n  };\n\n  if (transport.streamTurn) {\n    const { streamTurn } = transport;\n    return {\n      ...common,\n      // The engine streams whenever `streamMessage` is present and calls neither of these for a turn that settles.\n      // A streamed turn that answered a job id would have the engine poll one that does not exist: fail loudly.\n      sendMessage: () => Promise.reject(new Error(\"A streaming chat starts its turns with streamMessage.\")),\n      getJob: () => Promise.reject(new Error(\"A streaming chat has no turn status to poll.\")),\n      async streamMessage(threadId, text, handlers, signal, attachments) {\n        // A streamed turn is accepted when its first event arrives, so the thread list shows its first message while the\n        // reply is still coming; a stream that settles with no event at all is accepted when it settles.\n        let started = false;\n        const markStarted = () => {\n          if (started) return;\n          started = true;\n          onTurnStarted?.();\n        };\n        const accepting: StreamHandlers = {\n          onToken: (chunk) => (markStarted(), handlers.onToken(chunk)),\n          onStep: handlers.onStep && ((step) => (markStarted(), handlers.onStep!(step))),\n          onThinking: handlers.onThinking && ((chunk) => (markStarted(), handlers.onThinking!(chunk))),\n        };\n        let result: SendMessageResult;\n        try {\n          result = await streamTurn(threadId, text, accepting, signal, attachments);\n        } catch (err) {\n          if (err instanceof ChatUnreachableError) throw new Error(CHAT_UNAVAILABLE_MESSAGE);\n          throw err;\n        }\n        if (result.job_id) throw new Error(\"A streamed turn must end with its final result, not a job to poll.\");\n        markStarted();\n        return result;\n      },\n    };\n  }\n\n  const { startTurn, getTurn } = transport;\n  return {\n    ...common,\n\n    // `signal` (the engine's Stop-button plumbing) is deliberately not wired to this call: it only starts a dispatch and\n    // never streams, and aborting it could leave a dispatch started server-side with no job id for the engine to track.\n    // Stop is `cancelJob`.\n    async sendMessage(threadId, text, _signal, attachments) {\n      const { jobId } = await within(\"sendMessage\", startTurn(threadId, text, attachments));\n      onTurnStarted?.();\n      return { dispatched: true, job_id: jobId };\n    },\n\n    async getJob(jobId) {\n      const status = await within(\"getJob\", getTurn(jobId));\n      return status ?? ({ status: \"failed\", error: \"turn_not_found\" } satisfies JobStatus);\n    },\n  };\n}\n","import * as React from \"react\";\nimport type { ThreadSummary } from \"../../components/chat/AgentChatPanel\";\nimport { useToast } from \"../../components/feedback/ToastProvider\";\nimport { useLatest } from \"../../components/useLatest\";\nimport type { ChatThreadRef, ChatTransport } from \"./chatAdapter\";\nimport { CHAT_CALL_DEADLINE_MS, withDeadline } from \"./deadline\";\n\nexport const THREADS_LOAD_FAILED = \"Your earlier conversations could not be loaded.\";\nexport const NEW_THREAD_FAILED = \"A new conversation could not be started.\";\n\nexport interface ChatThreads {\n  /** The person's threads that hold a message, newest activity first. */\n  threads: ThreadSummary[];\n  /** Reads the list again: after a New conversation, and after a turn is sent (so a first message shows up). */\n  refresh: () => void;\n  /** New conversation: asks the transport for a thread, hands its id to `onCreated` (to switch the panel to it) and\n   *  re-reads the list. A failure shows an error toast and calls nothing. */\n  startNewThread: (onCreated: (threadId: string) => void) => Promise<void>;\n}\n\nexport interface UseChatThreadsOptions {\n  deadlineMs?: number;\n}\n\n/** The person's chat threads for the panel's History, and its New conversation. The list is read when the panel opens and\n *  on `refresh`. Needs a `ToastProvider`. The transport may be built inline each render: only its latest members are used. */\nexport function useChatThreads(\n  transport: Pick<ChatTransport, \"listThreads\" | \"createThread\">,\n  { deadlineMs = CHAT_CALL_DEADLINE_MS }: UseChatThreadsOptions = {},\n): ChatThreads {\n  const toast = useToast();\n  const [threads, setThreads] = React.useState<ThreadSummary[]>([]);\n  const [reads, setReads] = React.useState(0);\n  const transportRef = useLatest(transport);\n  const deadlineRef = useLatest(deadlineMs);\n  const refresh = React.useCallback(() => setReads((n) => n + 1), []);\n\n  React.useEffect(() => {\n    // A read superseded by a later refresh, or by the panel closing, is aborted and never lands.\n    const controller = new AbortController();\n    const { signal } = controller;\n    withDeadline(\"listThreads\", deadlineRef.current, transportRef.current.listThreads(signal)).then(\n      (listed) => {\n        if (!signal.aborted) setThreads(listed);\n      },\n      () => {\n        if (!signal.aborted) toast.show(THREADS_LOAD_FAILED, { tone: \"error\" });\n      },\n    );\n    return () => controller.abort();\n  }, [reads, toast, transportRef, deadlineRef]);\n\n  const startNewThread = React.useCallback(\n    (onCreated: (threadId: string) => void) =>\n      withDeadline<ChatThreadRef>(\"createThread\", deadlineRef.current, transportRef.current.createThread()).then(\n        ({ thread_id }) => {\n          onCreated(thread_id);\n          refresh();\n        },\n        () => toast.show(NEW_THREAD_FAILED, { tone: \"error\" }),\n      ),\n    [deadlineRef, transportRef, refresh, toast],\n  );\n\n  return { threads, refresh, startNewThread };\n}\n","export interface ExportDownloaderOptions {\n  /** A fresh signed link for the export, or null when the route says it is not downloadable right now (expired, or its\n   *  status changed underneath the click). */\n  mintUrl: (id: string) => Promise<string | null>;\n  /** Where the browser goes to take the file. Its own `Content-Disposition` names it, so the page stays where it is. */\n  navigate?: (url: string) => void;\n}\n\n/** The one-click download of a finished export, shared by the tray and the CSV card so the two never differ. The returned\n *  function resolves once the click has been handled and never rejects: a link that is not available, or cannot be\n *  minted (a network blip, a 500), leaves the page as it is, the next read of the export corrects what the person sees,\n *  and the next click tries again. */\nexport function createExportDownloader({\n  mintUrl,\n  navigate = (url) => window.location.assign(url),\n}: ExportDownloaderOptions): (id: string) => Promise<void> {\n  return (id) =>\n    mintUrl(id).then(\n      (url) => {\n        if (url) navigate(url);\n      },\n      () => {},\n    );\n}\n","import * as React from \"react\";\nimport { useLatest } from \"../../components/useLatest\";\nimport { isLiveExport, type ExportJob } from \"./exportJob\";\n\n/** While any export is PENDING/RUNNING: frequent enough that a person watching the tray sees it move, not so frequent it\n *  hammers the server. */\nexport const EXPORT_POLL_INTERVAL_MS = 3_000;\n\n/** Once nothing is live: still catches an export another tab or the job's own backstop resolves, without polling an\n *  idle tray every few seconds for ever. */\nexport const EXPORT_IDLE_POLL_INTERVAL_MS = 30_000;\n\nexport interface UseExportJobsOptions {\n  /** The person's exports as the server lists them. It lists only what should show: the hook does no filtering, so a\n   *  dismissed or aged-out export leaves the tray because the server stopped listing it. */\n  list: () => Promise<ExportJob[]>;\n  /** Dismisses a finished export from the tray, server-side, so it is gone after a reload too. */\n  acknowledge: (id: string) => Promise<unknown>;\n}\n\nexport interface UseExportJobsResult {\n  exports: ExportJob[];\n  /** Dismisses the export: it leaves the list at once, the server is told, and the list is re-read (which also puts the\n   *  export back if the server could not be told). */\n  ackExport: (id: string) => void;\n  /** Reads the list now instead of at the next poll: an export started elsewhere shows at once. */\n  refresh: () => void;\n}\n\n/** The person's own export jobs, polled while anything is live. Entirely server-persisted: every render derives from the\n *  last list read, so a reload mid-export picks the same export back up from the next poll. Mount it once, above both the\n *  control that starts an export and the tray that shows it, so they share one poll. */\nexport function useExportJobs({ list, acknowledge }: UseExportJobsOptions): UseExportJobsResult {\n  const [rows, setRows] = React.useState<ExportJob[]>([]);\n  const listRef = useLatest(list);\n  const acknowledgeRef = useLatest(acknowledge);\n  // Exports dismissed here whose acknowledgement the server has not answered yet. A list read\n  // that started before the server saw the dismissal still holds them, so it leaves them out.\n  const dismissing = React.useRef(new Set<string>());\n\n  const reload = React.useCallback(\n    () =>\n      listRef.current().then(\n        (fresh) => setRows(fresh.filter((row) => !dismissing.current.has(row.id))),\n        () => {\n          // A transient poll failure: the next tick tries again.\n        },\n      ),\n    [listRef],\n  );\n\n  React.useEffect(() => {\n    void reload();\n  }, [reload]);\n\n  const anyLive = rows.some(isLiveExport);\n\n  React.useEffect(() => {\n    const timer = setInterval(() => void reload(), anyLive ? EXPORT_POLL_INTERVAL_MS : EXPORT_IDLE_POLL_INTERVAL_MS);\n    return () => clearInterval(timer);\n  }, [anyLive, reload]);\n\n  const refresh = React.useCallback(() => void reload(), [reload]);\n  const ackExport = React.useCallback(\n    (id: string) => {\n      // A dismissal that waits for the server answers a tap with nothing but a focus ring for as long as the two round\n      // trips take, so a person taps again: the card goes first, and the server's list is what stays.\n      dismissing.current.add(id);\n      setRows((current) => current.filter((row) => row.id !== id));\n      void acknowledgeRef.current(id).then(\n        () => {\n          dismissing.current.delete(id);\n          return reload();\n        },\n        (error: unknown) => {\n          dismissing.current.delete(id);\n          console.error(`Dismissing export ${id} failed; it is back in the tray.`, error);\n          return reload();\n        },\n      );\n    },\n    [acknowledgeRef, reload],\n  );\n\n  return { exports: rows, ackExport, refresh };\n}\n","import * as React from \"react\";\nimport { JobTray, type Job } from \"../../components/loading/JobTray\";\nimport type { ExportJob } from \"./exportJob\";\n\nexport const EXPORT_KEPT_NOTE = \"Kept for 24 hours\";\nexport const EXPORT_FAILED_FALLBACK = \"Unknown error.\";\n\n/** An export as the tray's card shows it. `useExportJobs`' `list` returns only what should show, so a SUCCEEDED export is downloadable. */\nexport function exportToJob(job: ExportJob, onDownload: (id: string) => void): Job {\n  const base = { id: job.id, title: job.title, note: job.note };\n  if (job.status === \"SUCCEEDED\") {\n    return {\n      ...base,\n      status: \"done\",\n      action: { label: \"Download\", icon: \"download-simple\", onClick: () => onDownload(job.id) },\n      doneNote: EXPORT_KEPT_NOTE,\n    };\n  }\n  if (job.status === \"FAILED\") {\n    return { ...base, status: \"failed\", failureReason: job.failureMessage ?? EXPORT_FAILED_FALLBACK };\n  }\n  return { ...base, status: \"active\" };\n}\n\nexport interface ExportTrayProps {\n  exports: ExportJob[];\n  onDownload: (id: string) => void;\n  onDismiss: (id: string) => void;\n}\n\n/** The person's background exports as a `JobTray` in the shared bottom-right corner stack. With no exports it renders\n *  nothing: an empty card would hold the corner for no reason. */\nexport function ExportTray({ exports, onDownload, onDismiss }: ExportTrayProps) {\n  const jobs = React.useMemo(() => exports.map((job) => exportToJob(job, onDownload)), [exports, onDownload]);\n  return <JobTray jobs={jobs} onDismiss={onDismiss} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEO,SAAS,cAAc,MAAiD;AAC7E,SAAO,QAAQ,QAAQ,MAAM,IAAI,IAAI;AACvC;AAxEA,IAQa,WAwDA,gBAEP;AAlEN;AAAA;AAAA;AAQO,IAAM,YAAgC;AAAA,MAC3C,EAAE,MAAM,MAAM,MAAM,MAAM,MAAM,UAAU;AAAA,MAC1C,EAAE,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,UAAmB;AAClB,qBAAW,QAAQ,OAAO,EAAE;AAC5B,kBAAQ,MAAM,qBAAqB,EAAE,oCAAoC,KAAK;AAC9E,iBAAO,OAAO;AAAA,QAChB;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,gBAAgB,MAAM;AAAA,EACzB;AAEA,SAAO,EAAE,SAAS,MAAM,WAAW,SAAAD,SAAQ;AAC7C;;;ACrFA,IAAAE,UAAuB;AAkCd,IAAAC,wBAAA;AA9BF,IAAM,mBAAmB;AACzB,IAAM,yBAAyB;AAG/B,SAAS,YAAY,KAAgB,YAAuC;AACjF,QAAM,OAAO,EAAE,IAAI,IAAI,IAAI,OAAO,IAAI,OAAO,MAAM,IAAI,KAAK;AAC5D,MAAI,IAAI,WAAW,aAAa;AAC9B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ;AAAA,MACR,QAAQ,EAAE,OAAO,YAAY,MAAM,mBAAmB,SAAS,MAAM,WAAW,IAAI,EAAE,EAAE;AAAA,MACxF,UAAU;AAAA,IACZ;AAAA,EACF;AACA,MAAI,IAAI,WAAW,UAAU;AAC3B,WAAO,EAAE,GAAG,MAAM,QAAQ,UAAU,eAAe,IAAI,kBAAkB,uBAAuB;AAAA,EAClG;AACA,SAAO,EAAE,GAAG,MAAM,QAAQ,SAAS;AACrC;AAUO,SAAS,WAAW,EAAE,SAAAC,UAAS,YAAY,UAAU,GAAoB;AAC9E,QAAMC,QAAa,gBAAQ,MAAMD,SAAQ,IAAI,CAAC,QAAQ,YAAY,KAAK,UAAU,CAAC,GAAG,CAACA,UAAS,UAAU,CAAC;AAC1G,SAAO,+CAAC,WAAQ,MAAMC,OAAM,WAAsB;AACpD;","names":["object","x0","y0","x0","y0","x00","y00","x00","x0","y00","y0","append","object","init_src","identity_default","init_identity","identity_default","x0","y0","init_identity","topology","o","arcs","init_identity","init_src","init_src","Tag","import_jsx_runtime","React","React","import_jsx_runtime","current","import_jsx_runtime","open","returnFocus","import_jsx_runtime","React","React","import_jsx_runtime","React","React","open","open","React","import_react_dom","import_jsx_runtime","ReactDOM","import_jsx_runtime","React","import_jsx_runtime","open","React","import_react_dom","React","open","close","React","open","import_jsx_runtime","open","close","React","import_react_dom","import_jsx_runtime","open","close","import_jsx_runtime","React","React","React","import_jsx_runtime","open","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","React","React","import_react_dom","jobs","import_jsx_runtime","import_jsx_runtime","jobs","React","import_jsx_runtime","textOf","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","SidebarNav","current","open","React","React","import_jsx_runtime","React","open","close","React","React","import_jsx_runtime","open","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","TONES","import_jsx_runtime","TONES","import_jsx_runtime","ICON","React","import_jsx_runtime","current","React","import_jsx_runtime","React","React","React","import_jsx_runtime","uid","import_jsx_runtime","import_jsx_runtime","MARGIN","React","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","open","import_jsx_runtime","import_jsx_runtime","compact","React","React","React","import_jsx_runtime","React","import_jsx_runtime","release","current","React","import_jsx_runtime","mode","open","import_jsx_runtime","React","import_jsx_runtime","part","import_jsx_runtime","mode","toggle","current","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","compact","React","import_jsx_runtime","lineNumbers","open","React","import_jsx_runtime","kind","m","close","buf","Tag","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","abs","s","refresh","React","import_jsx_runtime","open","React","import_jsx_runtime","open","import_jsx_runtime","open","React","import_jsx_runtime","open","current","React","import_jsx_runtime","bucket","React","import_jsx_runtime","className","React","import_react_dom","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","React","current","STATE_SHAPES","import_jsx_runtime","React","import_jsx_runtime","textOf","open","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","open","React","import_jsx_runtime","mode","open","React","import_jsx_runtime","React","import_jsx_runtime","fmt","React","import_jsx_runtime","import_jsx_runtime","compact","React","import_jsx_runtime","MarkdownEditor","read","close","next","React","import_jsx_runtime","host","sqlLang","cmPlaceholder","current","React","import_jsx_runtime","import_jsx_runtime","React","React","import_jsx_runtime","can","open","React","import_jsx_runtime","open","React","React","mode","listeners","React","import_jsx_runtime","import_jsx_runtime","open","React","import_jsx_runtime","React","import_jsx_runtime","saveProfile","values","React","import_jsx_runtime","React","React","React","listeners","import_jsx_runtime","iso","React","import_react_dom","import_jsx_runtime","open","W","close","iso","import_jsx_runtime","compact","can","canAny","hasRole","import_jsx_runtime","mode","open","import_jsx_runtime","import_jsx_runtime","BANDS","React","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","React","React","React","read","current","bucket","id","refresh","React","React","import_jsx_runtime","open","import_jsx_runtime","close","iso","React","import_jsx_runtime","React","import_jsx_runtime","compact","open","current","import_jsx_runtime","refresh","React","import_jsx_runtime","STATUS","React","React","exports","refresh","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","open","React","React","get","r","patch","params","sleep","append","React","part","React","refresh","React","refresh","current","React","import_jsx_runtime","exports","jobs"]}