{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "contract-redline-diff",
  "title": "Contract Redline Diff",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/contract-redline-diff/contract-redline-diff.component.ts",
      "content": "// Ironclad and DocuSign CLM style legal contract redline diff viewer with clause additions,\n// deletions, liability super-cap shift analysis, and attorney comments negotiations sidebar.\n// Port of the Vue/React block 1:1 — same four counsel comments, same pending/resolved\n// filter pills, same accept-tweak / accept-all / reject-all actions, same inline reply draft.\nimport { ChangeDetectionStrategy, Component, Input, computed, signal } from '@angular/core'\nimport {\n  Check,\n  CheckCircle2,\n  Clock,\n  FileMinus2,\n  FilePlus2,\n  FileText,\n  History,\n  LucideAngularModule,\n  MessageSquare,\n  MessageSquareReply,\n  Scale,\n  Send,\n  X,\n  XCircle,\n} from 'lucide-angular'\nimport { cn } from '@/lib/utils'\nimport { UiAvatarComponent, UiAvatarFallbackComponent } from '@/ui/avatar/avatar.component'\nimport { UiBadgeComponent } from '@/ui/badge/badge.component'\nimport { UiButtonComponent } from '@/ui/button/button.component'\nimport {\n  UiCardComponent,\n  UiCardContentComponent,\n  UiCardFooterComponent,\n  UiCardHeaderComponent,\n  UiCardTitleComponent,\n} from '@/ui/card/card.component'\nimport { UiSeparatorComponent } from '@/ui/separator/separator.component'\n\nexport interface CommentItem {\n  id: string\n  clauseId: string\n  clauseTitle: string\n  authorName: string\n  authorRole: string\n  authorInitials: string\n  timestamp: string\n  commentText: string\n  proposedChange: string\n  status: 'pending' | 'resolved'\n  severity?: 'critical' | 'moderate' | 'standard'\n}\n\nexport interface RedlineStats {\n  additions: string\n  additionsSub: string\n  deletions: string\n  deletionsSub: string\n  openComments: number\n  resolvedComments: number\n  liabilityCap: string\n  liabilityCapSub: string\n}\n\nconst defaultComments: CommentItem[] = [\n  {\n    id: 'c-1',\n    clauseId: 'clause-4-2',\n    clauseTitle: 'Section 4.2 · Service Level Agreement Credits',\n    authorName: 'Sarah Lin',\n    authorRole: 'Senior Counsel, Davis Polk & Wardwell LLP',\n    authorInitials: 'SL',\n    timestamp: '2 hours ago',\n    commentText:\n      'Acme enterprise infrastructure requires a 25% credit for downtime exceeding 4 hours given Tier-1 mission-critical workload dependency. We also propose extending the scheduled maintenance notice window to 7 business days.',\n    proposedChange: '25% monthly fee credit (was 10%) · 7 business days notice (was 48 hours)',\n    status: 'pending',\n    severity: 'critical',\n  },\n  {\n    id: 'c-2',\n    clauseId: 'clause-8-1',\n    clauseTitle: 'Section 8.1 · Limitation of Liability & Super-Cap',\n    authorName: 'Marcus Vance',\n    authorRole: 'VP Legal & AGC, Acme Enterprise Corp',\n    authorInitials: 'MV',\n    timestamp: '4 hours ago',\n    commentText:\n      'We cannot agree to a standard 12-month trailing fee liability cap due to GDPR Article 82 joint-controller exposure and confidential IP storage. A $2.5M aggregate super-cap is our committee floor for cloud vendor onboarding.',\n    proposedChange: 'Super-cap of $2,500,000 or 2.5x total contract value for data protection breaches',\n    status: 'pending',\n    severity: 'critical',\n  },\n  {\n    id: 'c-3',\n    clauseId: 'clause-12-3',\n    clauseTitle: 'Section 12.3 · Governing Law & Commercial Arbitration',\n    authorName: 'Elena Rostova',\n    authorRole: 'Partner, Technology Transactions Counsel',\n    authorInitials: 'ER',\n    timestamp: 'Yesterday at 17:45',\n    commentText:\n      'Replaced Delaware Chancery court litigation with AAA expedited commercial arbitration seated in New York to contain cross-border litigation exposure, expedite timeline, and guarantee reciprocal fee shifting.',\n    proposedChange: 'AAA Commercial Arbitration (New York, NY) + Prevailing party attorney fee shifting',\n    status: 'pending',\n    severity: 'moderate',\n  },\n  {\n    id: 'c-4',\n    clauseId: 'clause-2-4',\n    clauseTitle: 'Section 2.4 · Customer Data & AI Model Training',\n    authorName: 'David Kim',\n    authorRole: 'Lead In-House Commercial Counsel',\n    authorInitials: 'DK',\n    timestamp: 'Resolved 5 hours ago',\n    commentText:\n      'Provider confirmed in writing that customer telemetry is strictly quarantined and excluded from foundation LLM model training. Mutually agreed language inserted.',\n    proposedChange: 'Explicit carve-out prohibiting Customer Data ingestion into generative AI training sets',\n    status: 'resolved',\n    severity: 'standard',\n  },\n]\n\nexport type RedlineFilter = 'all' | 'pending' | 'resolved'\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-contract-redline-diff, [ui-contract-redline-diff]',\n  standalone: true,\n  // The block renders its own root <div>: keep this wrapper out of the layout.\n  host: { '[attr.class]': '\"contents\"' },\n  imports: [\n    LucideAngularModule,\n    UiAvatarComponent,\n    UiAvatarFallbackComponent,\n    UiBadgeComponent,\n    UiButtonComponent,\n    UiCardComponent,\n    UiCardContentComponent,\n    UiCardFooterComponent,\n    UiCardHeaderComponent,\n    UiCardTitleComponent,\n    UiSeparatorComponent,\n  ],\n  template: `\n    <div data-slot=\"contract-redline-diff\" [class]=\"rootClass\">\n      <!-- Header Section -->\n      <header class=\"border-border bg-card rounded-xl border p-5 shadow-xs sm:p-6\">\n        <div class=\"flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between\">\n          <div class=\"space-y-2\">\n            <div class=\"flex flex-wrap items-center gap-2.5\">\n              <span class=\"text-muted-foreground font-mono text-xs tracking-wider uppercase\">\n                CLM Contract Workspace &bull; MSA-2026-0882\n              </span>\n              @if (pendingCount() > 0) {\n                <span\n                  ui-badge\n                  wrap\n                  variant=\"outline\"\n                  class=\"border-warning/30 bg-warning/10 text-warning font-mono text-xs font-semibold whitespace-normal\"\n                >\n                  <span class=\"bg-warning mr-1.5 size-1.5 rounded-full\"></span>\n                  {{ pendingCount() }} Pending Redlines &bull; {{ resolvedCount() }} Resolved\n                </span>\n              } @else {\n                <span\n                  ui-badge\n                  wrap\n                  variant=\"outline\"\n                  class=\"border-success/30 bg-success/10 text-success font-mono text-xs font-semibold\"\n                >\n                  <lucide-icon [img]=\"CheckCircle2\" class=\"text-success mr-1 size-3\" aria-hidden=\"true\" />\n                  All Changes Accepted &bull; Ready for Execution\n                </span>\n              }\n            </div>\n\n            <h1 class=\"text-foreground text-2xl font-bold tracking-tight sm:text-3xl\">\n              {{ contractTitle }}\n            </h1>\n\n            <div class=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs sm:text-sm\">\n              <div class=\"text-muted-foreground flex items-center gap-1.5\">\n                <span class=\"text-foreground font-medium\">Counterparty:</span>\n                <span>{{ counterparty }}</span>\n              </div>\n              <span class=\"text-muted-foreground/40 hidden sm:inline\">&bull;</span>\n              <div class=\"text-muted-foreground flex items-center gap-1.5\">\n                <span class=\"text-foreground font-medium\">Outside Counsel:</span>\n                <span>{{ counselFirm }}</span>\n              </div>\n              <span class=\"text-muted-foreground/40 hidden sm:inline\">&bull;</span>\n              <div class=\"text-muted-foreground flex items-center gap-1.5\">\n                <lucide-icon [img]=\"History\" class=\"size-3.5\" aria-hidden=\"true\" />\n                <span>{{ versionComparison }}</span>\n              </div>\n            </div>\n          </div>\n\n          <!-- Header Action Controls -->\n          <div class=\"flex flex-wrap items-center gap-3\">\n            <button\n              ui-button\n              variant=\"outline\"\n              size=\"sm\"\n              class=\"gap-1.5 text-xs font-medium\"\n              (click)=\"handleRejectAll()\"\n            >\n              <lucide-icon [img]=\"XCircle\" class=\"text-muted-foreground size-4\" aria-hidden=\"true\" />\n              <span>Reject Changes</span>\n            </button>\n\n            <button\n              ui-button\n              variant=\"default\"\n              size=\"sm\"\n              class=\"gap-1.5 text-xs font-semibold shadow-xs\"\n              (click)=\"handleAcceptAll()\"\n            >\n              <lucide-icon [img]=\"Check\" class=\"size-4\" aria-hidden=\"true\" />\n              <span>Accept All Changes</span>\n            </button>\n          </div>\n        </div>\n\n        <!-- Action Feedback Banner -->\n        @if (actionBannerMessage(); as banner) {\n          <div\n            class=\"border-primary/20 bg-primary/5 mt-4 flex items-center justify-between rounded-lg border px-4 py-2.5 text-xs\"\n          >\n            <div class=\"text-foreground flex items-center gap-2 font-medium\">\n              <lucide-icon [img]=\"CheckCircle2\" class=\"text-primary size-4 shrink-0\" aria-hidden=\"true\" />\n              <span>{{ banner }}</span>\n            </div>\n            <button\n              type=\"button\"\n              class=\"text-muted-foreground hover:text-foreground focus-visible:ring-ring rounded p-1 focus-visible:ring-2 focus-visible:outline-none\"\n              (click)=\"actionBannerMessage.set(null)\"\n              aria-label=\"Dismiss notification\"\n            >\n              <lucide-icon [img]=\"X\" class=\"size-3.5\" />\n            </button>\n          </div>\n        }\n      </header>\n\n      <!-- 4 Redline Summary Metric Cards -->\n      <section aria-label=\"Redline metrics overview\" class=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n        <!-- Metric 1: Additions / Insertions -->\n        <div ui-card class=\"border-border bg-card shadow-xs\">\n          <div ui-card-header class=\"p-4 pb-2\">\n            <div class=\"flex items-center justify-between\">\n              <h3 ui-card-title class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                Additions / Insertions\n              </h3>\n              <div class=\"bg-success/10 text-success rounded-md p-1.5\">\n                <lucide-icon [img]=\"FilePlus2\" class=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n          </div>\n          <div ui-card-content class=\"space-y-1 p-4 pt-0\">\n            <p class=\"text-success font-mono text-2xl font-bold tracking-tight\">+14 Clauses / Sentences</p>\n            <p class=\"text-muted-foreground text-xs leading-relaxed\">\n              +620 words &bull; Enhanced SLA credits, audit rights &amp; ML carve-outs\n            </p>\n          </div>\n        </div>\n\n        <!-- Metric 2: Deletions / Removals -->\n        <div ui-card class=\"border-border bg-card shadow-xs\">\n          <div ui-card-header class=\"p-4 pb-2\">\n            <div class=\"flex items-center justify-between\">\n              <h3 ui-card-title class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                Deletions / Removals\n              </h3>\n              <div class=\"bg-destructive/10 text-destructive rounded-md p-1.5\">\n                <lucide-icon [img]=\"FileMinus2\" class=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n          </div>\n          <div ui-card-content class=\"space-y-1 p-4 pt-0\">\n            <p class=\"text-destructive font-mono text-2xl font-bold tracking-tight\">-8 Clauses Struck Through</p>\n            <p class=\"text-muted-foreground text-xs leading-relaxed\">\n              -310 words &bull; Excised unilateral termination &amp; uncapped liability\n            </p>\n          </div>\n        </div>\n\n        <!-- Metric 3: Pending Review Comments -->\n        <div ui-card class=\"border-border bg-card shadow-xs\">\n          <div ui-card-header class=\"p-4 pb-2\">\n            <div class=\"flex items-center justify-between\">\n              <h3 ui-card-title class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                Review Comments\n              </h3>\n              <div class=\"bg-warning/10 text-warning rounded-md p-1.5\">\n                <lucide-icon [img]=\"MessageSquare\" class=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n          </div>\n          <div ui-card-content class=\"space-y-1 p-4 pt-0\">\n            <p class=\"text-warning font-mono text-2xl font-bold tracking-tight\">\n              {{ pendingCount() }} Open Counsel Comments\n            </p>\n            <p class=\"text-muted-foreground text-xs leading-relaxed\">\n              {{ resolvedCount() }} resolved &bull; 2 require General Counsel sign-off\n            </p>\n          </div>\n        </div>\n\n        <!-- Metric 4: Liability Cap Shift -->\n        <div ui-card class=\"border-border bg-card shadow-xs\">\n          <div ui-card-header class=\"p-4 pb-2\">\n            <div class=\"flex items-center justify-between\">\n              <h3 ui-card-title class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                Liability Cap Shift\n              </h3>\n              <div class=\"bg-primary/10 text-primary rounded-md p-1.5\">\n                <lucide-icon [img]=\"Scale\" class=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n          </div>\n          <div ui-card-content class=\"space-y-1 p-4 pt-0\">\n            <p class=\"text-primary font-mono text-2xl font-bold tracking-tight\">$1.0M &rarr; $2.5M Super-Cap</p>\n            <p class=\"text-muted-foreground text-xs leading-relaxed\">\n              Shifted from 1x annual fees to 2.5x aggregate contract liability\n            </p>\n          </div>\n        </div>\n      </section>\n\n      <!-- 2-Column Redline Workspace -->\n      <div class=\"grid grid-cols-1 gap-6 lg:grid-cols-12 lg:items-start\">\n        <!-- Left Column: Redlined Document Prose -->\n        <main class=\"space-y-6 lg:col-span-8\">\n          <div class=\"border-border bg-card rounded-xl border shadow-xs\">\n            <!-- Document Controls & Legend Top Bar -->\n            <div\n              class=\"border-border bg-muted/40 flex flex-wrap items-center justify-between gap-3 border-b px-5 py-3.5\"\n            >\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"FileText\" class=\"text-primary size-4\" aria-hidden=\"true\" />\n                <span class=\"text-foreground text-xs font-semibold sm:text-sm\">\n                  Master Services Agreement (MSA) &bull; Draft v3.2\n                </span>\n              </div>\n\n              <!-- Visual Legend -->\n              <div class=\"flex flex-wrap items-center gap-3 text-xs\">\n                <div class=\"flex items-center gap-1.5\">\n                  <span class=\"border-success/30 bg-success/20 inline-block h-3 w-5 rounded border\"></span>\n                  <span class=\"text-muted-foreground\">Insertion (Acme Counsel)</span>\n                </div>\n                <div class=\"flex items-center gap-1.5\">\n                  <span class=\"border-destructive/30 bg-destructive/20 inline-block h-3 w-5 rounded border\"></span>\n                  <span class=\"text-muted-foreground\">Deletion (Struck Out)</span>\n                </div>\n              </div>\n            </div>\n\n            <!-- Document Content Body -->\n            <div class=\"divide-border space-y-8 divide-y px-5 py-6 sm:px-8\">\n              <!-- Section 2: Intellectual Property & Data Ownership -->\n              <section id=\"clause-2-4\" class=\"scroll-mt-6 space-y-3 pt-6 first:pt-0\">\n                <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                  <div class=\"flex items-center gap-2\">\n                    <h2 class=\"text-foreground text-sm font-bold tracking-tight sm:text-base\">\n                      Section 2 &bull; Intellectual Property &amp; Customer Data\n                    </h2>\n                    <span\n                      ui-badge\n                      wrap\n                      variant=\"outline\"\n                      class=\"border-success/30 bg-success/10 text-success font-mono text-xs\"\n                    >\n                      [RESOLVED] &bull; § 2.4 ML Carve-out\n                    </span>\n                  </div>\n                  <button\n                    ui-button\n                    variant=\"ghost\"\n                    size=\"sm\"\n                    class=\"text-muted-foreground hover:text-foreground h-7 gap-1 px-2 text-xs\"\n                    (click)=\"selectComment('c-4', 'clause-2-4')\"\n                  >\n                    <lucide-icon [img]=\"MessageSquare\" class=\"text-success size-3.5\" />\n                    <span>View Resolution</span>\n                  </button>\n                </div>\n\n                <div\n                  class=\"border-border bg-muted/20 space-y-3 rounded-lg border p-4 text-xs leading-relaxed sm:text-sm\"\n                >\n                  <p class=\"text-foreground\">\n                    <strong class=\"text-foreground font-semibold\">2.4 Proprietary Rights &amp; Restrictions.</strong>\n                    Customer retains all right, title, and interest in and to Customer Data, including all Intellectual\n                    Property Rights therein. Provider shall not acquire any ownership interest in or rights to Customer\n                    Data, except for the limited license granted herein to perform the Services.\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      Under no circumstances shall Provider utilize, parse, vectorize, or ingest Customer Data,\n                      confidential telemetry, or user communications to train, fine-tune, or benchmark any public or\n                      proprietary artificial intelligence, large language, or algorithmic model without express prior\n                      written addendum.\n                    </span>\n                  </p>\n                </div>\n              </section>\n\n              <!-- Section 4: Service Level Agreements -->\n              <section id=\"clause-4-2\" class=\"scroll-mt-6 space-y-3 pt-8\">\n                <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                  <div class=\"flex items-center gap-2\">\n                    <h2 class=\"text-foreground text-sm font-bold tracking-tight sm:text-base\">\n                      Section 4 &bull; Service Level Agreements &amp; Availability Commitments\n                    </h2>\n                    <span\n                      ui-badge\n                      wrap\n                      variant=\"outline\"\n                      class=\"border-warning/30 bg-warning/10 text-warning font-mono text-xs\"\n                    >\n                      [DIFF-4.2] &bull; 2 Pending Redlines\n                    </span>\n                  </div>\n                  <button\n                    ui-button\n                    variant=\"outline\"\n                    size=\"sm\"\n                    [class]=\"clauseButtonClass('c-1')\"\n                    (click)=\"selectComment('c-1', 'clause-4-2')\"\n                  >\n                    <lucide-icon [img]=\"MessageSquare\" class=\"text-warning size-3.5\" />\n                    <span>Comment #1 &bull; Sarah Lin</span>\n                  </button>\n                </div>\n\n                <div [class]=\"clauseBoxClass('c-1')\">\n                  <p class=\"text-foreground\">\n                    <strong class=\"text-foreground font-semibold\">4.1 Monthly Uptime Commitment.</strong>\n                    Provider warrants that the Production Cloud Service will achieve a Monthly Uptime Percentage of no\n                    less than\n                    <span\n                      class=\"bg-destructive/10 text-destructive text-destructive rounded px-1 py-0.5 font-medium line-through decoration-rose-500/60\"\n                    >\n                      ninety-nine and one-half percent (99.5%)\n                    </span>\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      ninety-nine and ninety-five hundredths percent (99.95%)\n                    </span>\n                    during each calendar billing month of the applicable Order Term (&ldquo;Service Level\n                    Standard&rdquo;).\n                  </p>\n\n                  <p class=\"text-foreground\">\n                    <strong class=\"text-foreground font-semibold\"\n                      >4.2 SLA Failure Remedies &amp; Maintenance Notice.</strong\n                    >\n                    If Provider fails to meet the Service Level Standard for any calendar month, Customer shall be\n                    entitled to an immediate credit against future invoices equal to\n                    <span\n                      class=\"bg-destructive/10 text-destructive text-destructive rounded px-1 py-0.5 font-medium line-through decoration-rose-500/60\"\n                    >\n                      ten percent (10%)\n                    </span>\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      twenty-five percent (25%)\n                    </span>\n                    of the prorated monthly fees for such month. Scheduled Maintenance windows shall occur solely\n                    between 01:00 and 04:00 UTC on Sunday mornings and require no less than\n                    <span\n                      class=\"bg-destructive/10 text-destructive text-destructive rounded px-1 py-0.5 font-medium line-through decoration-rose-500/60\"\n                    >\n                      forty-eight (48) hours\n                    </span>\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      seven (7) business days\n                    </span>\n                    advance electronic notice to Customer&rsquo;s Lead SRE contact.\n                  </p>\n                </div>\n              </section>\n\n              <!-- Section 8: Limitation of Liability -->\n              <section id=\"clause-8-1\" class=\"scroll-mt-6 space-y-3 pt-8\">\n                <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                  <div class=\"flex items-center gap-2\">\n                    <h2 class=\"text-foreground text-sm font-bold tracking-tight sm:text-base\">\n                      Section 8 &bull; Limitation of Liability &amp; Super-Cap Allocation\n                    </h2>\n                    <span\n                      ui-badge\n                      wrap\n                      variant=\"outline\"\n                      class=\"border-destructive/30 bg-destructive/10 text-destructive font-mono text-xs font-semibold\"\n                    >\n                      [DIFF-8.1] &bull; HIGH IMPACT SHIFT\n                    </span>\n                  </div>\n                  <button\n                    ui-button\n                    variant=\"outline\"\n                    size=\"sm\"\n                    [class]=\"clauseButtonClass('c-2')\"\n                    (click)=\"selectComment('c-2', 'clause-8-1')\"\n                  >\n                    <lucide-icon [img]=\"MessageSquare\" class=\"text-destructive size-3.5\" />\n                    <span>Comment #2 &bull; Marcus Vance</span>\n                  </button>\n                </div>\n\n                <div [class]=\"clauseBoxClass('c-2')\">\n                  <p class=\"text-foreground font-mono text-xs leading-relaxed uppercase\">\n                    <strong class=\"text-foreground font-bold\">8.1 AGGREGATE LIABILITY CAP.</strong>\n                    EXCEPT FOR LIABILITIES ARISING FROM A BREACH OF CONFIDENTIALITY UNDER SECTION 6, FRAUD, OR\n                    INDEMNIFICATION OBLIGATIONS UNDER SECTION 10, NEITHER PARTY&rsquo;S MAXIMUM AGGREGATE LIABILITY\n                    UNDER THIS AGREEMENT SHALL EXCEED\n                    <span\n                      class=\"bg-destructive/10 text-destructive text-destructive rounded px-1 py-0.5 font-medium line-through decoration-rose-500/60\"\n                    >\n                      THE TOTAL FEES ACTUALLY PAID BY CUSTOMER TO PROVIDER IN THE TWELVE (12) MONTHS PRECEDING THE EVENT\n                      GIVING RISE TO LIABILITY.\n                    </span>\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      THE GREATER OF TWO MILLION FIVE HUNDRED THOUSAND UNITED STATES DOLLARS ($2,500,000 USD) OR TWO AND\n                      ONE-HALF TIMES (2.5X) THE AGGREGATE FEES PAYABLE OVER THE ENTIRE ORDER FORM DURATION\n                      (&ldquo;SUPER-CAP&rdquo;).\n                    </span>\n                  </p>\n\n                  <p class=\"text-foreground\">\n                    <strong class=\"text-foreground font-semibold\">8.2 Direct Damages Carve-Out.</strong>\n                    Notwithstanding anything to the contrary, the mutual waiver of consequential damages in Section 8.3\n                    shall not preclude or limit recovery of\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      reasonable third-party forensic incident investigation expenses, statutory breach notification\n                      mailings, and credit monitoring services required under GDPR, HIPAA, or State Data Privacy laws.\n                    </span>\n                  </p>\n                </div>\n              </section>\n\n              <!-- Section 12: Governing Law & Arbitration -->\n              <section id=\"clause-12-3\" class=\"scroll-mt-6 space-y-3 pt-8\">\n                <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                  <div class=\"flex items-center gap-2\">\n                    <h2 class=\"text-foreground text-sm font-bold tracking-tight sm:text-base\">\n                      Section 12 &bull; Governing Law, Venue &amp; Arbitration\n                    </h2>\n                    <span\n                      ui-badge\n                      wrap\n                      variant=\"outline\"\n                      class=\"border-primary/30 bg-primary/10 text-primary font-mono text-xs\"\n                    >\n                      [DIFF-12.3] &bull; Modified Venue\n                    </span>\n                  </div>\n                  <button\n                    ui-button\n                    variant=\"outline\"\n                    size=\"sm\"\n                    [class]=\"clauseButtonClass('c-3')\"\n                    (click)=\"selectComment('c-3', 'clause-12-3')\"\n                  >\n                    <lucide-icon [img]=\"MessageSquare\" class=\"text-primary size-3.5\" />\n                    <span>Comment #3 &bull; Elena Rostova</span>\n                  </button>\n                </div>\n\n                <div [class]=\"clauseBoxClass('c-3')\">\n                  <p class=\"text-foreground\">\n                    <strong class=\"text-foreground font-semibold\">12.1 Applicable Law.</strong>\n                    This Agreement shall be governed by, construed, and enforced in accordance with the substantive laws\n                    of the State of Delaware, without reference to its conflict-of-law principles.\n                  </p>\n\n                  <p class=\"text-foreground\">\n                    <strong class=\"text-foreground font-semibold\"\n                      >12.3 Binding Commercial Arbitration &amp; Fee Recovery.</strong\n                    >\n                    Any controversy, dispute, or claim arising out of or relating to this Agreement, or the breach\n                    thereof, shall be resolved by\n                    <span\n                      class=\"bg-destructive/10 text-destructive text-destructive rounded px-1 py-0.5 font-medium line-through decoration-rose-500/60\"\n                    >\n                      the state or federal courts situated in Wilmington, Delaware.\n                    </span>\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      binding arbitration administered by the American Arbitration Association (AAA) in accordance with\n                      its Commercial Arbitration Rules, before a single neutral arbitrator seated in the City and State\n                      of New York.\n                    </span>\n                    <span\n                      class=\"bg-success/10 text-success text-success rounded px-1 py-0.5 font-medium underline decoration-emerald-500/40\"\n                    >\n                      The prevailing party in any proceeding to enforce or interpret this Agreement shall be entitled to\n                      recover from the non-prevailing party all reasonable attorneys&rsquo; fees, arbitrator\n                      compensation, and expert witness disbursements incurred in connection therewith.\n                    </span>\n                  </p>\n                </div>\n              </section>\n            </div>\n          </div>\n        </main>\n\n        <!-- Right Column: Attorney Comments & Negotiations Sidebar -->\n        <aside class=\"space-y-4 lg:sticky lg:top-6 lg:col-span-4\">\n          <div class=\"border-border bg-card space-y-4 rounded-xl border p-4 shadow-xs\">\n            <!-- Sidebar Header -->\n            <div class=\"flex items-center justify-between pb-1\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"MessageSquare\" class=\"text-primary size-4\" aria-hidden=\"true\" />\n                <h2 class=\"text-foreground text-sm font-bold tracking-tight\">Counsel Comments &amp; Markups</h2>\n              </div>\n              <span class=\"text-muted-foreground font-mono text-xs font-medium\">\n                {{ filteredComments().length }} items\n              </span>\n            </div>\n\n            <!-- Filter Pills -->\n            <div class=\"bg-muted/60 flex items-center gap-1.5 rounded-lg p-1\">\n              <button type=\"button\" [class]=\"filterPillClass('all')\" (click)=\"selectedFilter.set('all')\">\n                All ({{ comments().length }})\n              </button>\n              <button type=\"button\" [class]=\"filterPillClass('pending')\" (click)=\"selectedFilter.set('pending')\">\n                Pending ({{ pendingCount() }})\n              </button>\n              <button type=\"button\" [class]=\"filterPillClass('resolved')\" (click)=\"selectedFilter.set('resolved')\">\n                Resolved ({{ resolvedCount() }})\n              </button>\n            </div>\n\n            <ui-separator />\n\n            <!-- Comments Feed -->\n            <div class=\"space-y-3.5\">\n              @for (comment of filteredComments(); track comment.id) {\n                <div\n                  ui-card\n                  role=\"button\"\n                  tabindex=\"0\"\n                  [attr.aria-pressed]=\"activeCommentId() === comment.id\"\n                  [class]=\"commentCardClass(comment)\"\n                  (click)=\"selectComment(comment.id, comment.clauseId)\"\n                  (keydown.enter)=\"selectComment(comment.id, comment.clauseId)\"\n                  (keydown.space)=\"$event.preventDefault(); selectComment(comment.id, comment.clauseId)\"\n                >\n                  <div ui-card-header class=\"p-3.5 pb-2\">\n                    <div class=\"flex flex-wrap items-start justify-between gap-2\">\n                      <div class=\"flex items-center gap-2.5\">\n                        <ui-avatar class=\"border-border size-7 border\">\n                          <ui-avatar-fallback class=\"bg-primary/10 text-primary font-mono text-xs font-bold\">\n                            {{ comment.authorInitials }}\n                          </ui-avatar-fallback>\n                        </ui-avatar>\n                        <div>\n                          <p class=\"text-foreground text-xs leading-none font-semibold\">\n                            {{ comment.authorName }}\n                          </p>\n                          <p class=\"text-muted-foreground mt-0.5 max-w-[170px] truncate text-xs\">\n                            {{ comment.authorRole }}\n                          </p>\n                        </div>\n                      </div>\n\n                      <span ui-badge wrap variant=\"outline\" [class]=\"commentStatusClass(comment)\">\n                        {{ comment.status === 'resolved' ? 'Resolved' : 'Pending' }}\n                      </span>\n                    </div>\n                  </div>\n\n                  <div ui-card-content class=\"space-y-2.5 p-3.5 pt-0 text-xs\">\n                    <!-- Clause context pill -->\n                    <div class=\"bg-muted/50 text-muted-foreground rounded px-2 py-1 font-mono text-xs\">\n                      {{ comment.clauseTitle }}\n                    </div>\n\n                    <!-- Comment narrative -->\n                    <p class=\"text-foreground leading-relaxed\">&ldquo;{{ comment.commentText }}&rdquo;</p>\n\n                    <!-- Proposed change box -->\n                    <div class=\"border-success/20 bg-success/5 rounded border p-2 text-xs\">\n                      <span class=\"text-success mb-0.5 block font-semibold\"> Proposed Redline Tweak: </span>\n                      <span class=\"text-muted-foreground\">\n                        {{ comment.proposedChange }}\n                      </span>\n                    </div>\n\n                    <div class=\"text-muted-foreground flex items-center justify-between pt-1 text-xs\">\n                      <span class=\"flex items-center gap-1\">\n                        <lucide-icon [img]=\"Clock\" class=\"size-3\" aria-hidden=\"true\" />\n                        {{ comment.timestamp }}\n                      </span>\n                    </div>\n                  </div>\n\n                  <div\n                    ui-card-footer\n                    class=\"border-border bg-muted/10 flex items-center justify-between gap-2 border-t p-2.5\"\n                  >\n                    <button\n                      ui-button\n                      variant=\"outline\"\n                      size=\"sm\"\n                      class=\"h-7 gap-1 text-xs\"\n                      (click)=\"toggleReply(comment.id); $event.stopPropagation()\"\n                    >\n                      <lucide-icon [img]=\"MessageSquareReply\" class=\"text-muted-foreground size-3\" aria-hidden=\"true\" />\n                      <span>Reply</span>\n                    </button>\n\n                    <button\n                      ui-button\n                      [variant]=\"comment.status === 'resolved' ? 'outline' : 'default'\"\n                      size=\"sm\"\n                      [class]=\"acceptButtonClass(comment)\"\n                      (click)=\"toggleAcceptTweak(comment.id); $event.stopPropagation()\"\n                    >\n                      <lucide-icon [img]=\"Check\" class=\"size-3\" aria-hidden=\"true\" />\n                      <span>{{ comment.status === 'resolved' ? 'Reopen' : 'Accept Tweak' }}</span>\n                    </button>\n                  </div>\n\n                  <!-- Inline Thread Reply Input -->\n                  @if (replyingCommentId() === comment.id) {\n                    <div class=\"border-border bg-background space-y-2 border-t p-3\" (click)=\"$event.stopPropagation()\">\n                      <textarea\n                        [value]=\"replyDraftText()\"\n                        (input)=\"replyDraftText.set($any($event.target).value)\"\n                        placeholder=\"Draft reply to counsel thread...\"\n                        class=\"border-border bg-card placeholder:text-muted-foreground focus-visible:ring-ring w-full resize-none rounded-md border p-2 text-xs focus-visible:ring-2 focus-visible:outline-none\"\n                        rows=\"2\"\n                      ></textarea>\n                      <div class=\"flex items-center justify-end gap-2\">\n                        <button\n                          ui-button\n                          variant=\"ghost\"\n                          size=\"sm\"\n                          class=\"h-6 px-2 text-xs\"\n                          (click)=\"replyingCommentId.set(null)\"\n                        >\n                          Cancel\n                        </button>\n                        <button\n                          ui-button\n                          variant=\"default\"\n                          size=\"sm\"\n                          class=\"h-6 gap-1 px-2.5 text-xs font-semibold\"\n                          (click)=\"submitReply(comment.id)\"\n                        >\n                          <lucide-icon [img]=\"Send\" class=\"size-3\" aria-hidden=\"true\" />\n                          <span>Send</span>\n                        </button>\n                      </div>\n                    </div>\n                  }\n                </div>\n              }\n            </div>\n          </div>\n        </aside>\n      </div>\n    </div>\n  `,\n})\nexport class UiContractRedlineDiffComponent {\n  protected readonly Check = Check\n  protected readonly CheckCircle2 = CheckCircle2\n  protected readonly Clock = Clock\n  protected readonly FileMinus2 = FileMinus2\n  protected readonly FilePlus2 = FilePlus2\n  protected readonly FileText = FileText\n  protected readonly History = History\n  protected readonly MessageSquare = MessageSquare\n  protected readonly MessageSquareReply = MessageSquareReply\n  protected readonly Scale = Scale\n  protected readonly Send = Send\n  protected readonly X = X\n  protected readonly XCircle = XCircle\n\n  @Input() contractTitle = 'Master Services Agreement · Redline Review v3.2 vs v3.1'\n  @Input() counterparty = 'Acme Enterprise Corp'\n  @Input() counselFirm = 'Davis Polk & Wardwell LLP'\n  @Input() versionComparison = 'v3.2 (Counterparty Redlines) vs v3.1 (Baseline Executed)'\n  @Input() initialStats?: RedlineStats\n  @Input() set initialComments(v: CommentItem[] | undefined) {\n    if (v) this.comments.set(v.map((c) => ({ ...c })))\n  }\n  @Input('class') className?: string\n\n  readonly comments = signal<CommentItem[]>(defaultComments.map((c) => ({ ...c })))\n  readonly activeCommentId = signal('c-1')\n  readonly selectedFilter = signal<RedlineFilter>('all')\n  readonly replyingCommentId = signal<string | null>(null)\n  readonly replyDraftText = signal('')\n  readonly actionBannerMessage = signal<string | null>(null)\n\n  readonly pendingCount = computed(() => this.comments().filter((c) => c.status === 'pending').length)\n  readonly resolvedCount = computed(() => this.comments().filter((c) => c.status === 'resolved').length)\n\n  readonly filteredComments = computed(() => {\n    const filter = this.selectedFilter()\n    if (filter === 'pending') return this.comments().filter((c) => c.status === 'pending')\n    if (filter === 'resolved') return this.comments().filter((c) => c.status === 'resolved')\n    return this.comments()\n  })\n\n  get rootClass(): string {\n    return cn('bg-background text-foreground w-full space-y-6', this.className)\n  }\n\n  clauseButtonClass(id: string): string {\n    return cn(\n      'h-7 gap-1.5 px-2.5 text-xs',\n      this.activeCommentId() === id\n        ? 'border-primary bg-primary/10 text-primary font-semibold'\n        : 'text-muted-foreground',\n    )\n  }\n\n  clauseBoxClass(id: string): string {\n    return cn(\n      'border-border bg-card space-y-4 rounded-lg border p-4 text-xs leading-relaxed transition-colors sm:p-5 sm:text-sm',\n      this.activeCommentId() === id && 'ring-primary/40 ring-2',\n    )\n  }\n\n  filterPillClass(filter: RedlineFilter): string {\n    return cn(\n      'focus-visible:ring-ring flex-1 rounded-md px-2 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none',\n      this.selectedFilter() === filter\n        ? 'bg-background text-foreground font-semibold shadow-xs'\n        : 'text-muted-foreground hover:text-foreground',\n    )\n  }\n\n  commentCardClass(comment: CommentItem): string {\n    return cn(\n      'border-border hover:border-primary/40 focus-visible:ring-ring cursor-pointer transition-colors focus-visible:ring-2 focus-visible:outline-none',\n      this.activeCommentId() === comment.id ? 'border-primary/60 bg-muted/20 ring-primary/30 ring-1' : 'bg-card',\n      comment.status === 'resolved' && 'opacity-75',\n    )\n  }\n\n  commentStatusClass(comment: CommentItem): string {\n    return cn(\n      'shrink-0 font-mono text-xs',\n      comment.status === 'resolved'\n        ? 'border-success/30 bg-success/10 text-success'\n        : 'border-warning/30 bg-warning/10 text-warning',\n    )\n  }\n\n  acceptButtonClass(comment: CommentItem): string {\n    return cn('h-7 gap-1 text-xs', comment.status === 'resolved' ? 'text-muted-foreground' : 'font-medium')\n  }\n\n  selectComment(id: string, clauseId?: string): void {\n    this.activeCommentId.set(id)\n    if (clauseId && typeof document !== 'undefined') {\n      const el = document.getElementById(clauseId)\n      // jsdom and hidden containers have no scrollIntoView: selecting must still work.\n      if (el && typeof el.scrollIntoView === 'function') {\n        el.scrollIntoView({ behavior: 'smooth', block: 'center' })\n      }\n    }\n  }\n\n  toggleAcceptTweak(id: string): void {\n    const comment = this.comments().find((c) => c.id === id)\n    if (!comment) return\n    const nextStatus = comment.status === 'pending' ? 'resolved' : 'pending'\n    this.comments.update((prev) => prev.map((c) => (c.id === id ? { ...c, status: nextStatus } : c)))\n    this.actionBannerMessage.set(\n      nextStatus === 'resolved'\n        ? `Accepted proposed language for \"${comment.clauseTitle}\"`\n        : `Reopened review for \"${comment.clauseTitle}\"`,\n    )\n  }\n\n  handleAcceptAll(): void {\n    this.comments.update((prev) => prev.map((c) => ({ ...c, status: 'resolved' as const })))\n    this.actionBannerMessage.set('All 3 pending redlines and attorney comments have been accepted into draft v3.3')\n  }\n\n  handleRejectAll(): void {\n    this.comments.update((prev) => prev.map((c) => ({ ...c, status: 'pending' as const })))\n    this.actionBannerMessage.set('Redline proposals flagged for revision. Counterparty notified of rejection.')\n  }\n\n  toggleReply(id: string): void {\n    if (this.replyingCommentId() === id) {\n      this.replyingCommentId.set(null)\n      this.replyDraftText.set('')\n    } else {\n      this.replyingCommentId.set(id)\n      this.replyDraftText.set('')\n    }\n  }\n\n  submitReply(id: string): void {\n    if (!this.replyDraftText().trim()) return\n    const target = this.comments().find((c) => c.id === id)\n    this.actionBannerMessage.set(`Reply posted to counsel thread on ${target?.clauseTitle}`)\n    this.replyingCommentId.set(null)\n    this.replyDraftText.set('')\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/contract-redline-diff/contract-redline-diff.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/contract-redline-diff/index.ts",
      "content": "export {\n  UiContractRedlineDiffComponent,\n  type CommentItem,\n  type RedlineFilter,\n  type RedlineStats,\n} from './contract-redline-diff.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/contract-redline-diff/index.ts"
    }
  ],
  "dependencies": [
    "lucide-angular"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/angular/avatar.json",
    "https://uipkge.dev/r/angular/badge.json",
    "https://uipkge.dev/r/angular/button.json",
    "https://uipkge.dev/r/angular/card.json",
    "https://uipkge.dev/r/angular/separator.json"
  ],
  "description": "Ironclad and DocuSign CLM style legal contract redline diff viewer with clause additions, deletions, liability super-cap shift analysis, and attorney comments negotiations sidebar.",
  "categories": [
    "legal",
    "app",
    "management"
  ]
}