@cratis/screenplay-language 4.125.0 → 4.127.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/bundles/compiler/Authoring/QuickFixes.js +2 -2
  2. package/dist/bundles/compiler/Authoring/QuickFixes.js.map +1 -1
  3. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +1 -1
  4. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -1
  5. package/dist/bundles/compiler/Parsing/CaptureParser.js +1 -1
  6. package/dist/bundles/compiler/Parsing/CommandParser.js +1 -1
  7. package/dist/bundles/compiler/Parsing/CommandResponseParser.js +1 -1
  8. package/dist/bundles/compiler/Parsing/CompositionParser.js +1 -1
  9. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js +1 -1
  10. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js.map +1 -1
  11. package/dist/bundles/compiler/Parsing/ConditionParser.js +1 -1
  12. package/dist/bundles/compiler/Parsing/ConstraintParser.js +1 -1
  13. package/dist/bundles/compiler/Parsing/DeclarationParsers.js +1 -1
  14. package/dist/bundles/compiler/Parsing/DependencySourceParser.js +1 -1
  15. package/dist/bundles/compiler/Parsing/DescriptionParser.js +1 -1
  16. package/dist/bundles/compiler/Parsing/EventMetadataParser.js +1 -1
  17. package/dist/bundles/compiler/Parsing/EventSourceParser.js +1 -1
  18. package/dist/bundles/compiler/Parsing/ExpressionParser.js +1 -1
  19. package/dist/bundles/compiler/Parsing/FeatureBody.js +1 -1
  20. package/dist/bundles/compiler/Parsing/GuardedActionParser.js +1 -1
  21. package/dist/bundles/compiler/Parsing/IdentityParser.js +1 -1
  22. package/dist/bundles/compiler/Parsing/ImplementationParser.js +2 -2
  23. package/dist/bundles/compiler/Parsing/InputUses.js +1 -1
  24. package/dist/bundles/compiler/Parsing/InteractionAlternatives.js +1 -1
  25. package/dist/bundles/compiler/Parsing/ModuleBody.js +1 -1
  26. package/dist/bundles/compiler/Parsing/OperationParser.js +1 -1
  27. package/dist/bundles/compiler/Parsing/PolicyParser.js +1 -1
  28. package/dist/bundles/compiler/Parsing/ProducesParser.js +1 -1
  29. package/dist/bundles/compiler/Parsing/ProjectionParser.js +1 -1
  30. package/dist/bundles/compiler/Parsing/PropertyLineParser.js +1 -1
  31. package/dist/bundles/compiler/Parsing/PurposeParser.js +1 -1
  32. package/dist/bundles/compiler/Parsing/QueryParser.js +1 -1
  33. package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js +1 -1
  34. package/dist/bundles/compiler/Parsing/ReactionParser.js +1 -1
  35. package/dist/bundles/compiler/Parsing/ScreenParser.js +1 -1
  36. package/dist/bundles/compiler/Parsing/ScreenplayParser.js +1 -1
  37. package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -1
  38. package/dist/bundles/compiler/Parsing/SeedParser.js +1 -1
  39. package/dist/bundles/compiler/Parsing/SliceParser.js +1 -1
  40. package/dist/bundles/compiler/Parsing/SourceOptionsParser.js +1 -1
  41. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js +1 -1
  42. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js +1 -1
  43. package/dist/bundles/compiler/Parsing/SpecificationParser.js +1 -1
  44. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js +1 -1
  45. package/dist/bundles/compiler/Parsing/TriggerDataParser.js +1 -1
  46. package/dist/bundles/compiler/index.js +1 -1
  47. package/dist/bundles/diagnostic-codes.js +1 -1
  48. package/dist/bundles/diagnostic-codes.js.map +1 -1
  49. package/dist/bundles/validation.js +1 -1
  50. package/dist/bundles/validation.js.map +1 -1
  51. package/dist/diagnostic-codes.d.ts +1 -0
  52. package/dist/diagnostic-codes.d.ts.map +1 -1
  53. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{pattern as t}from"../Text/patterns.js";import{commentStart as n,splitLines as r}from"../Parsing/SourceLineSplitter.js";import{ScreenplaySyntaxWalker as i}from"../Syntax/ScreenplaySyntaxWalker.js";import{parseForAuthoring as a}from"../ScreenplayCompiler.js";function isQuickFixDiagnostic(t){return t===e.LegacyOptionalSuffix||t===e.LegacyComplianceMarker||t===e.RedundantEventId||t===e.PublicTranslationRequiresDirection}function legacyOptionalTypeLength(t,n){return n.code===e.LegacyOptionalSuffix?/^[\p{L}\p{Mn}\p{Nd}\p{Pc}.]+(?:\[\])?\?/u.exec(t.slice(n.location.column-1))?.[0].length??0:0}function prepareQuickFixes(t,o={}){let s=a(t,void 0,o.placement),c=new Set(Array.from({length:14},(e,t)=>`PLAY0${607+t}`)),acceptable=e=>e.success||e.diagnostics.every(e=>e.severity!==`error`||c.has(e.code)),errorCodes=e=>new Set(e.diagnostics.filter(e=>e.severity===`error`).map(e=>e.code));if(!acceptable(s))return()=>[];let l=r(t),u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map;new class extends i{visitEvent(e){u.set(e.location.line,e)}visitSlice(e){d.set(e.location.line,e),super.visitSlice(e)}}().visitApplication(s.value);let f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Map,m=/* @__PURE__ */ new Map,h;for(let e of l)h=u.get(e.number)??h,h!==void 0&&m.set(e.number,h);for(let r of s.diagnostics){f.set(r.code,(f.get(r.code)??0)+1);let i=l[r.location.line-1],c=legacyOptionalTypeLength(i.raw,r);if(c>0)p.set(i.number,{line:i.number,fix:{diagnosticCode:r.code,title:`Use 'optional' instead of '?'`,scope:`occurrence`,edits:[{start:i.startOffset+r.location.column+c-2,length:1,text:` optional`}]}});else if(r.code===e.LegacyComplianceMarker){let e=complianceMarkerEdit(i.raw,i.startOffset);e!==void 0&&p.set(i.number,{line:i.number,fix:{diagnosticCode:r.code,title:`Use bare pii and secret compliance markers`,scope:`occurrence`,edits:[e]}})}else if(r.code===e.PublicTranslationRequiresDirection){let n=d.get(i.number),c=/^\s*/.exec(i.raw)[0],l=t.includes(`\r
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{pattern as t}from"../Text/patterns.js";import{complianceWireName as n}from"../Parsing/ConceptComplianceParser.js";import{commentStart as r,splitLines as i}from"../Parsing/SourceLineSplitter.js";import{ScreenplaySyntaxWalker as a}from"../Syntax/ScreenplaySyntaxWalker.js";import{parseForAuthoring as o}from"../ScreenplayCompiler.js";function isQuickFixDiagnostic(t){return t===e.DuplicateComplianceMarker||t===e.LegacyOptionalSuffix||t===e.LegacyComplianceMarker||t===e.RedundantEventId||t===e.PublicTranslationRequiresDirection}function legacyOptionalTypeLength(t,n){return n.code===e.LegacyOptionalSuffix?/^[\p{L}\p{Mn}\p{Nd}\p{Pc}.]+(?:\[\])?\?/u.exec(t.slice(n.location.column-1))?.[0].length??0:0}function prepareQuickFixes(t,n={}){let s=o(t,void 0,n.placement),c=new Set(Array.from({length:14},(e,t)=>`PLAY0${607+t}`)),acceptable=e=>e.success||e.diagnostics.every(e=>e.severity!==`error`||c.has(e.code)),errorCodes=e=>new Set(e.diagnostics.filter(e=>e.severity===`error`).map(e=>e.code));if(!acceptable(s))return()=>[];let l=i(t),u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map;new class extends a{visitEvent(e){u.set(e.location.line,e)}visitSlice(e){d.set(e.location.line,e),super.visitSlice(e)}}().visitApplication(s.value);let f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Map,m=/* @__PURE__ */ new Map,h=/* @__PURE__ */ new Map,g=/* @__PURE__ */ new Map,_;for(let e of l)_=u.get(e.number)??_,_!==void 0&&g.set(e.number,_);for(let i of s.diagnostics){f.set(i.code,(f.get(i.code)??0)+1);let a=l[i.location.line-1];if(i.code===e.DuplicateComplianceMarker){let e=duplicateComplianceMarkerEdit(a.raw,a.startOffset);e!==void 0&&m.set(a.number,{diagnosticCode:i.code,title:`Remove duplicate compliance markers`,scope:`occurrence`,edits:[e]})}let c=legacyOptionalTypeLength(a.raw,i);if(c>0)p.set(a.number,{line:a.number,fix:{diagnosticCode:i.code,title:`Use 'optional' instead of '?'`,scope:`occurrence`,edits:[{start:a.startOffset+i.location.column+c-2,length:1,text:` optional`}]}});else if(i.code===e.LegacyComplianceMarker){let e=complianceMarkerEdit(a.raw,a.startOffset);e!==void 0&&p.set(a.number,{line:a.number,fix:{diagnosticCode:i.code,title:`Use bare pii and secret compliance markers`,scope:`occurrence`,edits:[e]}})}else if(i.code===e.PublicTranslationRequiresDirection){let r=d.get(a.number),c=/^\s*/.exec(a.raw)[0],l=t.includes(`\r
2
2
  `)?`\r
3
3
  `:`
4
- `,u=[`Inbound`,`Outbound`].map(e=>({direction:e,text:`${l}${c} direction ${e===`Inbound`?`inbound`:`outbound`}`})).filter(n=>{let r=applyQuickFixEdits(t,[{start:i.startOffset+i.raw.length,length:0,text:n.text}]),c=a(r,void 0,o.placement),l=errorCodes(s);return acceptable(c)&&![...errorCodes(c)].some(t=>t===e.PublicTranslationRequiresDirection||!l.has(t))});if(u.length===1){let[{direction:e,text:t}]=u;p.set(i.number,{line:i.number,fix:{diagnosticCode:r.code,title:`Declare 'direction ${e===`Inbound`?`inbound`:`outbound`}'`,scope:`occurrence`,edits:[{start:i.startOffset+i.raw.length,length:0,text:t}]},change:{node:n,replacement:{...n,direction:e}}})}}else if(r.code===e.RedundantEventId&&n(i.raw)<0){let e=m.get(i.number);if(e?.id!==e?.name||e===void 0)continue;p.set(i.number,{line:i.number,fix:{diagnosticCode:r.code,title:`Remove the redundant event id`,scope:`occurrence`,edits:[{start:i.startOffset,length:(l[i.number]?.startOffset??t.length)-i.startOffset,text:``}]},change:{node:e,replacement:{...e,id:null}}})}}let g=[e.LegacyOptionalSuffix,e.LegacyComplianceMarker],_=verificationShape(s),v=/* @__PURE__ */ new Map,y,b=/* @__PURE__ */ new Set,x=/* @__PURE__ */ new Map,verify=(e,n)=>{let r=applyQuickFixEdits(t,e.edits);if(r===void 0)return;let i=a(r,void 0,o.placement);if(acceptable(i)&&verificationShape(i)===(n===void 0?_:verificationShape(s,[n])))return i.diagnostics.filter(t=>t.code===e.diagnosticCode).length===(f.get(e.diagnosticCode)??0)-e.edits.length?e:void 0};return(n,r)=>{let i=typeof n==`number`||n===void 0?void 0:n,c=g.filter(e=>i===void 0?r===void 0||r===e:i.some(t=>t.diagnosticCode===e));for(let t of c.filter(e=>!b.has(e))){let n=[...p.values()].filter(e=>e.fix.diagnosticCode===t);if(n.length>0){let r=verify({diagnosticCode:t,title:t===e.LegacyOptionalSuffix?`Use 'optional' throughout this document`:`Use bare pii and secret throughout this document`,scope:`document`,edits:n.flatMap(e=>e.fix.edits)});r!==void 0&&x.set(t,r)}b.add(t)}let u=c.flatMap(e=>x.has(e)?[x.get(e)]:[]);if(i!==void 0){if(y===void 0){y=/* @__PURE__ */ new Map;let e=l.flatMap(e=>p.has(e.number)?[p.get(e.number)]:[]),n=e.flatMap(e=>e.fix.edits),r=applyQuickFixEdits(t,n);if(n.length>0&&r!==void 0){let t=a(r,void 0,o.placement),n=e.flatMap(e=>e.change===void 0?[]:[e.change]);if(acceptable(t)&&verificationShape(t)===verificationShape(s,n)){let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map;for(let e of t.diagnostics)n.set(e.code,(n.get(e.code)??0)+1);for(let t of e)r.set(t.fix.diagnosticCode,(r.get(t.fix.diagnosticCode)??0)+t.fix.edits.length);if([...r].every(([e,t])=>(n.get(e)??0)===(f.get(e)??0)-t))for(let t of e)y.set(t.line,t.fix)}}}let e=/* @__PURE__ */ new Map;for(let t of i){let n=y.get(t.line);n?.diagnosticCode===t.diagnosticCode&&e.set(t.line,n)}return[...e.values(),...u]}let d=typeof n==`number`?n:void 0,m=d===void 0?void 0:p.get(d),h;return m!==void 0&&d!==void 0&&(r===void 0||m.fix.diagnosticCode===r)&&(v.has(d)||(v.size===32&&v.delete(v.keys().next().value),v.set(d,verify(m.fix,m.change))),h=v.get(d)),[...h===void 0?[]:[h],...u]}}function complianceMarkerEdit(e,n){let r=t(`^(\\s*concept\\s+\\w+\\s*:\\s*\\w+)((?:[^\\S\\r\\n]+@?\\w+)*)`).exec(e);if(r!==null){let e=r[2],t=e.replace(/@pii\b|@?sensitive\b/g,e=>e===`@pii`?`pii`:`secret`);return t===e?void 0:{start:n+r[1].length,length:e.length,text:t}}let i=t(`^(\\s*)(@pii|@?sensitive)\\b`).exec(e);return i===null?void 0:{start:n+i[1].length,length:i[2].length,text:i[2]===`@pii`?`pii`:`secret`}}function verificationShape(e,t=[]){let n=new Map(t.map(e=>[e.node,e.replacement]));return JSON.stringify([e.value,e.triggerData],(e,t)=>[`location`,`usesLocation`,`targetLocation`].includes(e)?void 0:n.get(t)??t)}function applyQuickFixEdits(e,t){let n=[],r=0;for(let i of t){if(i.start<r||i.start<0||i.length<0||i.start+i.length>e.length)return;n.push(e.slice(r,i.start),i.text),r=i.start+i.length}return n.push(e.slice(r)),n.join(``)}export{applyQuickFixEdits,isQuickFixDiagnostic,legacyOptionalTypeLength,prepareQuickFixes};
4
+ `,u=[`Inbound`,`Outbound`].map(e=>({direction:e,text:`${l}${c} direction ${e===`Inbound`?`inbound`:`outbound`}`})).filter(r=>{let i=applyQuickFixEdits(t,[{start:a.startOffset+a.raw.length,length:0,text:r.text}]),c=o(i,void 0,n.placement),l=errorCodes(s);return acceptable(c)&&![...errorCodes(c)].some(t=>t===e.PublicTranslationRequiresDirection||!l.has(t))});if(u.length===1){let[{direction:e,text:t}]=u;p.set(a.number,{line:a.number,fix:{diagnosticCode:i.code,title:`Declare 'direction ${e===`Inbound`?`inbound`:`outbound`}'`,scope:`occurrence`,edits:[{start:a.startOffset+a.raw.length,length:0,text:t}]},change:{node:r,replacement:{...r,direction:e}}})}}else if(i.code===e.RedundantEventId&&r(a.raw)<0){let e=g.get(a.number);if(e?.id!==e?.name||e===void 0)continue;p.set(a.number,{line:a.number,fix:{diagnosticCode:i.code,title:`Remove the redundant event id`,scope:`occurrence`,edits:[{start:a.startOffset,length:(l[a.number]?.startOffset??t.length)-a.startOffset,text:``}]},change:{node:e,replacement:{...e,id:null}}})}}let v=[e.LegacyOptionalSuffix,e.LegacyComplianceMarker],y=verificationShape(s),b=/* @__PURE__ */ new Map,x,S=/* @__PURE__ */ new Set,C=/* @__PURE__ */ new Map,verify=(e,r)=>{let i=applyQuickFixEdits(t,e.edits);if(i===void 0)return;let a=o(i,void 0,n.placement);if(acceptable(a)&&verificationShape(a)===(r===void 0?y:verificationShape(s,[r])))return a.diagnostics.filter(t=>t.code===e.diagnosticCode).length===(f.get(e.diagnosticCode)??0)-e.edits.length?e:void 0};return(r,i)=>{let a=typeof r==`number`||r===void 0?void 0:r,c=a===void 0?typeof r==`number`&&(i===void 0||i===e.DuplicateComplianceMarker)?[r]:[]:a.filter(t=>t.diagnosticCode===e.DuplicateComplianceMarker).map(e=>e.line),u=[...new Set(c)].flatMap(e=>{let t=m.get(e);if(t===void 0)return[];h.has(e)||h.set(e,verify(t));let n=h.get(e);return n===void 0?[]:[n]}),d=v.filter(e=>a===void 0?i===void 0||i===e:a.some(t=>t.diagnosticCode===e));for(let t of d.filter(e=>!S.has(e))){let n=[...p.values()].filter(e=>e.fix.diagnosticCode===t);if(n.length>0){let r=verify({diagnosticCode:t,title:t===e.LegacyOptionalSuffix?`Use 'optional' throughout this document`:`Use bare pii and secret throughout this document`,scope:`document`,edits:n.flatMap(e=>e.fix.edits)});r!==void 0&&C.set(t,r)}S.add(t)}let g=d.flatMap(e=>C.has(e)?[C.get(e)]:[]);if(a!==void 0){if(x===void 0){x=/* @__PURE__ */ new Map;let e=l.flatMap(e=>p.has(e.number)?[p.get(e.number)]:[]),r=e.flatMap(e=>e.fix.edits),i=applyQuickFixEdits(t,r);if(r.length>0&&i!==void 0){let t=o(i,void 0,n.placement),r=e.flatMap(e=>e.change===void 0?[]:[e.change]);if(acceptable(t)&&verificationShape(t)===verificationShape(s,r)){let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map;for(let e of t.diagnostics)n.set(e.code,(n.get(e.code)??0)+1);for(let t of e)r.set(t.fix.diagnosticCode,(r.get(t.fix.diagnosticCode)??0)+t.fix.edits.length);if([...r].every(([e,t])=>(n.get(e)??0)===(f.get(e)??0)-t))for(let t of e)x.set(t.line,t.fix)}}}let e=/* @__PURE__ */ new Map;for(let t of a){let n=x.get(t.line);n?.diagnosticCode===t.diagnosticCode&&e.set(t.line,n)}return[...e.values(),...u,...g]}let _=typeof r==`number`?r:void 0,y=_===void 0?void 0:p.get(_),w;return y!==void 0&&_!==void 0&&(i===void 0||y.fix.diagnosticCode===i)&&(b.has(_)||(b.size===32&&b.delete(b.keys().next().value),b.set(_,verify(y.fix,y.change))),w=b.get(_)),[...w===void 0?[]:[w],...u,...g]}}function duplicateComplianceMarkerEdit(e,r){let i=t(`^(\\s*concept\\s+\\w+\\s*:\\s*\\w+)((?:[^\\S\\r\\n]+@?\\w+)*)`).exec(e);if(i===null)return;let a=i[2],o=/* @__PURE__ */ new Set,s=a.replace(new RegExp(t(`[^\\S\\r\\n]+(@?\\w+)`).source,`gu`),(e,t)=>{let r=n(t);return o.has(r)?``:(o.add(r),e)});return s===a?void 0:{start:r+i[1].length,length:a.length,text:s}}function complianceMarkerEdit(e,n){let r=t(`^(\\s*concept\\s+\\w+\\s*:\\s*\\w+)((?:[^\\S\\r\\n]+@?\\w+)*)`).exec(e);if(r!==null){let e=r[2],t=e.replace(/@pii\b|@?sensitive\b/g,e=>e===`@pii`?`pii`:`secret`);return t===e?void 0:{start:n+r[1].length,length:e.length,text:t}}let i=t(`^(\\s*)(@pii|@?sensitive)\\b`).exec(e);return i===null?void 0:{start:n+i[1].length,length:i[2].length,text:i[2]===`@pii`?`pii`:`secret`}}function verificationShape(e,t=[]){let n=new Map(t.map(e=>[e.node,e.replacement]));return JSON.stringify([e.value,e.triggerData],(e,t)=>[`location`,`usesLocation`,`targetLocation`].includes(e)?void 0:n.get(t)??t)}function applyQuickFixEdits(e,t){let n=[],r=0;for(let i of t){if(i.start<r||i.start<0||i.length<0||i.start+i.length>e.length)return;n.push(e.slice(r,i.start),i.text),r=i.start+i.length}return n.push(e.slice(r)),n.join(``)}export{applyQuickFixEdits,isQuickFixDiagnostic,legacyOptionalTypeLength,prepareQuickFixes};
5
5
  //# sourceMappingURL=QuickFixes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QuickFixes.js","names":["code","DiagnosticCodes","diagnostic","line","original","parseForAuthoring","source","options","publicEventCodes","index","parsed","lines","splitLines","eventsByLine","slicesByLine","ScreenplaySyntaxWalker","event","slice","counts","byLine","events","length","edit","indent","ending","candidates","direction","edited","candidate","originalCodes","commentStart","declaration","spellingCodes","syntax","verified","rangeVerdicts","documentChecked","documentFixes","fix","change","requests","selectedCodes","diagnosticCode","request","documents","edits","candidateSource","changes","remaining","removed","count","selected","occurrenceLine","occurrenceFix","header","pattern","raw","suffix","text","marker","startOffset","directive","replacements","key","value","parts","end"],"sources":["../../../../../../Compiler/Authoring/QuickFixes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { PlayPlacement } from '../Files/PlayPlacement';\nimport { commentStart, splitLines } from '../Parsing/SourceLineSplitter';\nimport { parseForAuthoring } from '../ScreenplayCompiler';\nimport { EventSyntax } from '../Syntax/Declarations';\nimport { SliceSyntax } from '../Syntax/Structure';\nimport { TranslationDirection } from '../Syntax/TranslationDirection';\nimport { ScreenplaySyntaxWalker } from '../Syntax/ScreenplaySyntaxWalker';\nimport { pattern } from '../Text/patterns';\nimport { QuickFixCandidate } from './QuickFixCandidate';\n\nexport interface QuickFixEdit {\n readonly start: number;\n readonly length: number;\n readonly text: string;\n}\n\nexport interface QuickFix {\n readonly diagnosticCode: string;\n readonly title: string;\n readonly scope: 'occurrence' | 'document';\n readonly edits: readonly QuickFixEdit[];\n}\n\nexport interface QuickFixOptions {\n readonly line?: number;\n readonly placement?: PlayPlacement;\n readonly diagnosticCode?: string;\n}\n\nexport function isQuickFixDiagnostic(code: unknown): code is string {\n return code === DiagnosticCodes.LegacyOptionalSuffix || code === DiagnosticCodes.LegacyComplianceMarker || code === DiagnosticCodes.RedundantEventId || code === DiagnosticCodes.PublicTranslationRequiresDirection;\n}\n\n// Diagnostics point at the complete type, not at the suffix. Never derive edits from message text.\nexport function legacyOptionalTypeLength(line: string, diagnostic: Diagnostic): number {\n if (diagnostic.code !== DiagnosticCodes.LegacyOptionalSuffix) return 0;\n return /^[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}.]+(?:\\[\\])?\\?/u.exec(line.slice(diagnostic.location.column - 1))?.[0].length ?? 0;\n}\n\nexport function findQuickFixes(source: string, options: QuickFixOptions = {}): QuickFix[] {\n return prepareQuickFixes(source, options)(options.line, options.diagnosticCode);\n}\n\n// One immutable buffer version owns the analysis and document verdict. Cursor moves reuse them;\n// single-occurrence verdicts have a bounded cache. Range requests verify the independent recipes\n// together once per version, rather than reparsing N times for N intersecting markers.\nexport function prepareQuickFixes(source: string, options: Pick<QuickFixOptions, 'placement'> = {}): (line?: number | readonly { line: number; diagnosticCode: string }[], diagnosticCode?: string) => QuickFix[] {\n const original = parseForAuthoring(source, undefined, options.placement);\n // PLAY0614 and the public-event boundary errors that follow from a missing direction are errors the repair itself removes,\n // so a document whose only errors are public-event boundary errors stays repairable.\n const publicEventCodes: ReadonlySet<string> = new Set(Array.from({ length: 14 }, (_, index) => `PLAY0${607 + index}`));\n const acceptable = (parsed: ReturnType<typeof parseForAuthoring>): boolean => parsed.success || parsed.diagnostics.every(diagnostic => diagnostic.severity !== 'error' || publicEventCodes.has(diagnostic.code));\n const errorCodes = (parsed: ReturnType<typeof parseForAuthoring>): Set<string> => new Set(parsed.diagnostics.filter(diagnostic => diagnostic.severity === 'error').map(diagnostic => diagnostic.code));\n if (!acceptable(original)) return () => [];\n const lines = splitLines(source);\n const eventsByLine = new Map<number, EventSyntax>();\n const slicesByLine = new Map<number, SliceSyntax>();\n // Index inline and standalone declarations once, without scanning the tree per diagnostic.\n const walker = new class extends ScreenplaySyntaxWalker {\n override visitEvent(event: EventSyntax): void { eventsByLine.set(event.location.line, event); }\n override visitSlice(slice: SliceSyntax): void { slicesByLine.set(slice.location.line, slice); super.visitSlice(slice); }\n }();\n walker.visitApplication(original.value);\n const counts = new Map<string, number>();\n const byLine = new Map<number, QuickFixCandidate>();\n const events = new Map<number, EventSyntax>();\n let event: EventSyntax | undefined;\n for (const line of lines) {\n event = eventsByLine.get(line.number) ?? event;\n if (event !== undefined) events.set(line.number, event);\n }\n for (const diagnostic of original.diagnostics) {\n counts.set(diagnostic.code, (counts.get(diagnostic.code) ?? 0) + 1);\n const line = lines[diagnostic.location.line - 1];\n const length = legacyOptionalTypeLength(line.raw, diagnostic);\n if (length > 0) {\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: \"Use 'optional' instead of '?'\", scope: 'occurrence', edits: [{ start: line.startOffset + diagnostic.location.column + length - 2, length: 1, text: ' optional' }] } });\n } else if (diagnostic.code === DiagnosticCodes.LegacyComplianceMarker) {\n const edit = complianceMarkerEdit(line.raw, line.startOffset);\n if (edit !== undefined) byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Use bare pii and secret compliance markers', scope: 'occurrence', edits: [edit] } });\n } else if (diagnostic.code === DiagnosticCodes.PublicTranslationRequiresDirection) {\n // PLAY0614 is only reported on the declaration line of a Translate slice that has no direction.\n const slice = slicesByLine.get(line.number)!;\n // Offer a direction only when exactly one is consistent with the slice: the other would add errors.\n const indent = /^\\s*/.exec(line.raw)![0];\n const ending = source.includes('\\r\\n') ? '\\r\\n' : '\\n';\n const candidates = [TranslationDirection.Inbound, TranslationDirection.Outbound].map(direction => ({ direction, text: `${ending}${indent} direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}` }))\n .filter(candidate => {\n // The insertion point is the end of an existing line, so the edit is always in bounds.\n const edited = applyQuickFixEdits(source, [{ start: line.startOffset + line.raw.length, length: 0, text: candidate.text }])!;\n const parsed = parseForAuthoring(edited, undefined, options.placement);\n const originalCodes = errorCodes(original);\n // Valid when the missing-direction error is gone and the direction introduces no kind of error the document lacked.\n return acceptable(parsed) && ![...errorCodes(parsed)].some(code => code === DiagnosticCodes.PublicTranslationRequiresDirection || !originalCodes.has(code));\n });\n if (candidates.length === 1) {\n const [{ direction, text }] = candidates;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: `Declare 'direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}'`, scope: 'occurrence', edits: [{ start: line.startOffset + line.raw.length, length: 0, text }] },\n change: { node: slice, replacement: { ...slice, direction } as SliceSyntax } });\n }\n } else if (diagnostic.code === DiagnosticCodes.RedundantEventId && commentStart(line.raw) < 0) {\n const declaration = events.get(line.number);\n if (declaration?.id !== declaration?.name || declaration === undefined) continue;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Remove the redundant event id', scope: 'occurrence', edits: [{ start: line.startOffset, length: (lines[line.number]?.startOffset ?? source.length) - line.startOffset, text: '' }] },\n change: { node: declaration, replacement: { ...declaration, id: null } as EventSyntax } });\n }\n }\n const spellingCodes = [DiagnosticCodes.LegacyOptionalSuffix, DiagnosticCodes.LegacyComplianceMarker];\n const syntax = verificationShape(original);\n const verified = new Map<number, QuickFix | undefined>();\n let rangeVerdicts: Map<number, QuickFix> | undefined;\n const documentChecked = new Set<string>();\n const documentFixes = new Map<string, QuickFix>();\n const verify = (fix: QuickFix, change?: QuickFixCandidate['change']): QuickFix | undefined => {\n const candidate = applyQuickFixEdits(source, fix.edits);\n if (candidate === undefined) return undefined;\n const parsed = parseForAuthoring(candidate, undefined, options.placement);\n if (!acceptable(parsed) || verificationShape(parsed) !== (change === undefined ? syntax : verificationShape(original, [change]))) return undefined;\n return parsed.diagnostics.filter(diagnostic => diagnostic.code === fix.diagnosticCode).length === (counts.get(fix.diagnosticCode) ?? 0) - fix.edits.length ? fix : undefined;\n };\n return (line, diagnosticCode) => {\n const requests = typeof line === 'number' || line === undefined ? undefined : line;\n const selectedCodes = spellingCodes.filter(code => requests === undefined ? diagnosticCode === undefined || diagnosticCode === code : requests.some(request => request.diagnosticCode === code));\n for (const code of selectedCodes.filter(code => !documentChecked.has(code))) {\n const candidates = [...byLine.values()].filter(candidate => candidate.fix.diagnosticCode === code);\n if (candidates.length > 0) {\n const fix = verify({ diagnosticCode: code, title: code === DiagnosticCodes.LegacyOptionalSuffix ? \"Use 'optional' throughout this document\" : 'Use bare pii and secret throughout this document', scope: 'document', edits: candidates.flatMap(candidate => candidate.fix.edits) });\n if (fix !== undefined) documentFixes.set(code, fix);\n }\n documentChecked.add(code);\n }\n const documents = selectedCodes.flatMap(code => documentFixes.has(code) ? [documentFixes.get(code)!] : []);\n if (requests !== undefined) {\n if (rangeVerdicts === undefined) {\n rangeVerdicts = new Map();\n // Source order gives ordered, non-overlapping edits without sorting. Recipes replace\n // distinct nodes/lines; the batch must preserve every other modeled member and remove\n // exactly the expected diagnostics before any of its occurrence edits can be offered.\n const candidates = lines.flatMap(line => byLine.has(line.number) ? [byLine.get(line.number)!] : []);\n const edits = candidates.flatMap(candidate => candidate.fix.edits);\n const candidateSource = applyQuickFixEdits(source, edits);\n if (edits.length > 0 && candidateSource !== undefined) {\n const parsed = parseForAuthoring(candidateSource, undefined, options.placement);\n const changes = candidates.flatMap(candidate => candidate.change === undefined ? [] : [candidate.change]);\n if (acceptable(parsed) && verificationShape(parsed) === verificationShape(original, changes)) {\n const remaining = new Map<string, number>();\n const removed = new Map<string, number>();\n for (const diagnostic of parsed.diagnostics) remaining.set(diagnostic.code, (remaining.get(diagnostic.code) ?? 0) + 1);\n for (const candidate of candidates) removed.set(candidate.fix.diagnosticCode, (removed.get(candidate.fix.diagnosticCode) ?? 0) + candidate.fix.edits.length);\n if ([...removed].every(([code, count]) => (remaining.get(code) ?? 0) === (counts.get(code) ?? 0) - count)) {\n for (const candidate of candidates) rangeVerdicts.set(candidate.line, candidate.fix);\n }\n }\n }\n }\n const selected = new Map<number, QuickFix>();\n for (const request of requests) {\n const fix = rangeVerdicts.get(request.line);\n if (fix?.diagnosticCode === request.diagnosticCode) selected.set(request.line, fix);\n }\n return [...selected.values(), ...documents];\n }\n const occurrenceLine = typeof line === 'number' ? line : undefined;\n const selected = occurrenceLine === undefined ? undefined : byLine.get(occurrenceLine);\n let occurrenceFix: QuickFix | undefined;\n if (selected !== undefined && occurrenceLine !== undefined && (diagnosticCode === undefined || selected.fix.diagnosticCode === diagnosticCode)) {\n if (!verified.has(occurrenceLine)) {\n if (verified.size === 32) verified.delete(verified.keys().next().value!);\n verified.set(occurrenceLine, verify(selected.fix, selected.change));\n }\n occurrenceFix = verified.get(occurrenceLine);\n }\n return [...(occurrenceFix === undefined ? [] : [occurrenceFix]), ...documents];\n };\n}\n\nfunction complianceMarkerEdit(raw: string, startOffset: number): QuickFixEdit | undefined {\n // Restrict rewriting to the suffix or leading directive marker, never comments or quoted reasons.\n const header = pattern('^(\\\\s*concept\\\\s+\\\\w+\\\\s*:\\\\s*\\\\w+)((?:[^\\\\S\\\\r\\\\n]+@?\\\\w+)*)').exec(raw);\n if (header !== null) {\n const suffix = header[2];\n const text = suffix.replace(/@pii\\b|@?sensitive\\b/g, marker => marker === '@pii' ? 'pii' : 'secret');\n return text === suffix ? undefined : { start: startOffset + header[1].length, length: suffix.length, text };\n }\n const directive = pattern('^(\\\\s*)(@pii|@?sensitive)\\\\b').exec(raw);\n return directive === null ? undefined : { start: startOffset + directive[1].length, length: directive[2].length, text: directive[2] === '@pii' ? 'pii' : 'secret' };\n}\n\nfunction verificationShape(parsed: ReturnType<typeof parseForAuthoring>, changes: readonly NonNullable<QuickFixCandidate['change']>[] = []): string {\n // Compare every modeled member (including trigger data), ignoring only source locations. A recipe\n // may replace only its original node; no other id or destination is normalized away.\n const replacements = new Map(changes.map(change => [change.node, change.replacement]));\n return JSON.stringify([parsed.value, parsed.triggerData], (key, value: unknown) => ['location', 'usesLocation', 'targetLocation'].includes(key) ? undefined : replacements.get(value as NonNullable<QuickFixCandidate['change']>['node']) ?? value);\n}\n\n// One forward pass; applying N edits by repeatedly slicing the document would be quadratic.\nexport function applyQuickFixEdits(source: string, edits: readonly QuickFixEdit[]): string | undefined {\n const parts: string[] = [];\n let end = 0;\n for (const edit of edits) {\n if (edit.start < end || edit.start < 0 || edit.length < 0 || edit.start + edit.length > source.length) return undefined;\n parts.push(source.slice(end, edit.start), edit.text);\n end = edit.start + edit.length;\n }\n parts.push(source.slice(end));\n return parts.join('');\n}\n"],"mappings":"iYAkCA,SAAgB,qBAAqB,EAA+B,CAChE,OAAOA,IAASC,EAAgB,sBAAwBD,IAASC,EAAgB,wBAA0BD,IAASC,EAAgB,kBAAoBD,IAASC,EAAgB,kCACrL,CAGA,SAAgB,yBAAyB,EAAc,EAAgC,CAEnF,OADIC,EAAW,OAASD,EAAgB,qBACjC,2CAA2C,KAAKE,EAAK,MAAMD,EAAW,SAAS,OAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAU,EAD7C,CAEzE,CASA,SAAgB,kBAAkB,EAAgB,EAA8C,CAAC,EAAiH,CAC9M,IAAME,EAAWC,EAAkBC,EAAQ,IAAA,GAAWC,EAAQ,SAAS,EAGjEC,EAAwC,IAAI,IAAI,MAAM,KAAK,CAAE,OAAQ,EAAG,GAAI,EAAG,IAAU,QAAQ,IAAMC,GAAO,CAAC,EAC/G,WAAc,GAA0DC,EAAO,SAAWA,EAAO,YAAY,MAAM,GAAcR,EAAW,WAAa,SAAWM,EAAiB,IAAIN,EAAW,IAAI,CAAC,EACzM,WAAc,GAA8D,IAAI,IAAIQ,EAAO,YAAY,OAAO,GAAcR,EAAW,WAAa,OAAO,CAAC,CAAC,IAAI,GAAcA,EAAW,IAAI,CAAC,EACrM,GAAI,CAAC,WAAWE,CAAQ,EAAG,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KAAQuB,EAAO,CACtB,GAAIvB,EAAK,MAAQ4C,GAAO5C,EAAK,MAAQ,GAAKA,EAAK,OAAS,GAAKA,EAAK,MAAQA,EAAK,OAAShB,EAAO,OAAQ,OACvG2D,EAAM,KAAK3D,EAAO,MAAM4D,EAAK5C,EAAK,KAAK,EAAGA,EAAK,IAAI,EACnD,EAAMA,EAAK,MAAQA,EAAK,MAC5B,CAEA,OADA2C,EAAM,KAAK3D,EAAO,MAAM4D,CAAG,CAAC,EACrBD,EAAM,KAAK,EAAE,CACxB"}
1
+ {"version":3,"file":"QuickFixes.js","names":["code","DiagnosticCodes","diagnostic","line","original","parseForAuthoring","source","options","publicEventCodes","index","parsed","lines","splitLines","eventsByLine","slicesByLine","ScreenplaySyntaxWalker","event","slice","counts","byLine","duplicateByLine","duplicateVerdicts","events","edit","length","indent","ending","candidates","direction","edited","candidate","originalCodes","commentStart","declaration","spellingCodes","syntax","verified","rangeVerdicts","documentChecked","documentFixes","fix","change","requests","duplicateLines","diagnosticCode","request","duplicates","number","selectedCodes","documents","edits","candidateSource","changes","remaining","removed","count","selected","occurrenceLine","occurrenceFix","header","pattern","raw","suffix","seen","text","wire","complianceWireName","marker","token","startOffset","directive","replacements","key","value","parts","end"],"sources":["../../../../../../Compiler/Authoring/QuickFixes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { PlayPlacement } from '../Files/PlayPlacement';\nimport { complianceWireName } from '../Parsing/ConceptComplianceParser';\nimport { commentStart, splitLines } from '../Parsing/SourceLineSplitter';\nimport { parseForAuthoring } from '../ScreenplayCompiler';\nimport { EventSyntax } from '../Syntax/Declarations';\nimport { SliceSyntax } from '../Syntax/Structure';\nimport { TranslationDirection } from '../Syntax/TranslationDirection';\nimport { ScreenplaySyntaxWalker } from '../Syntax/ScreenplaySyntaxWalker';\nimport { pattern } from '../Text/patterns';\nimport { QuickFixCandidate } from './QuickFixCandidate';\n\nexport interface QuickFixEdit {\n readonly start: number;\n readonly length: number;\n readonly text: string;\n}\n\nexport interface QuickFix {\n readonly diagnosticCode: string;\n readonly title: string;\n readonly scope: 'occurrence' | 'document';\n readonly edits: readonly QuickFixEdit[];\n}\n\nexport interface QuickFixOptions {\n readonly line?: number;\n readonly placement?: PlayPlacement;\n readonly diagnosticCode?: string;\n}\n\nexport function isQuickFixDiagnostic(code: unknown): code is string {\n return code === DiagnosticCodes.DuplicateComplianceMarker || code === DiagnosticCodes.LegacyOptionalSuffix || code === DiagnosticCodes.LegacyComplianceMarker || code === DiagnosticCodes.RedundantEventId || code === DiagnosticCodes.PublicTranslationRequiresDirection;\n}\n\n// Diagnostics point at the complete type, not at the suffix. Never derive edits from message text.\nexport function legacyOptionalTypeLength(line: string, diagnostic: Diagnostic): number {\n if (diagnostic.code !== DiagnosticCodes.LegacyOptionalSuffix) return 0;\n return /^[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}.]+(?:\\[\\])?\\?/u.exec(line.slice(diagnostic.location.column - 1))?.[0].length ?? 0;\n}\n\nexport function findQuickFixes(source: string, options: QuickFixOptions = {}): QuickFix[] {\n return prepareQuickFixes(source, options)(options.line, options.diagnosticCode);\n}\n\n// One immutable buffer version owns the analysis and document verdict. Cursor moves reuse them;\n// single-occurrence verdicts have a bounded cache. Range requests verify the independent recipes\n// together once per version, rather than reparsing N times for N intersecting markers.\nexport function prepareQuickFixes(source: string, options: Pick<QuickFixOptions, 'placement'> = {}): (line?: number | readonly { line: number; diagnosticCode: string }[], diagnosticCode?: string) => QuickFix[] {\n const original = parseForAuthoring(source, undefined, options.placement);\n // PLAY0614 and the public-event boundary errors that follow from a missing direction are errors the repair itself removes,\n // so a document whose only errors are public-event boundary errors stays repairable.\n const publicEventCodes: ReadonlySet<string> = new Set(Array.from({ length: 14 }, (_, index) => `PLAY0${607 + index}`));\n const acceptable = (parsed: ReturnType<typeof parseForAuthoring>): boolean => parsed.success || parsed.diagnostics.every(diagnostic => diagnostic.severity !== 'error' || publicEventCodes.has(diagnostic.code));\n const errorCodes = (parsed: ReturnType<typeof parseForAuthoring>): Set<string> => new Set(parsed.diagnostics.filter(diagnostic => diagnostic.severity === 'error').map(diagnostic => diagnostic.code));\n if (!acceptable(original)) return () => [];\n const lines = splitLines(source);\n const eventsByLine = new Map<number, EventSyntax>();\n const slicesByLine = new Map<number, SliceSyntax>();\n // Index inline and standalone declarations once, without scanning the tree per diagnostic.\n const walker = new class extends ScreenplaySyntaxWalker {\n override visitEvent(event: EventSyntax): void { eventsByLine.set(event.location.line, event); }\n override visitSlice(slice: SliceSyntax): void { slicesByLine.set(slice.location.line, slice); super.visitSlice(slice); }\n }();\n walker.visitApplication(original.value);\n const counts = new Map<string, number>();\n const byLine = new Map<number, QuickFixCandidate>();\n // Duplicate removal and legacy spelling can share a header. Keep their independently verified recipes separate.\n const duplicateByLine = new Map<number, QuickFix>();\n const duplicateVerdicts = new Map<number, QuickFix | undefined>();\n const events = new Map<number, EventSyntax>();\n let event: EventSyntax | undefined;\n for (const line of lines) {\n event = eventsByLine.get(line.number) ?? event;\n if (event !== undefined) events.set(line.number, event);\n }\n for (const diagnostic of original.diagnostics) {\n counts.set(diagnostic.code, (counts.get(diagnostic.code) ?? 0) + 1);\n const line = lines[diagnostic.location.line - 1];\n if (diagnostic.code === DiagnosticCodes.DuplicateComplianceMarker) {\n const edit = duplicateComplianceMarkerEdit(line.raw, line.startOffset);\n if (edit !== undefined) duplicateByLine.set(line.number, { diagnosticCode: diagnostic.code, title: 'Remove duplicate compliance markers', scope: 'occurrence', edits: [edit] });\n }\n const length = legacyOptionalTypeLength(line.raw, diagnostic);\n if (length > 0) {\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: \"Use 'optional' instead of '?'\", scope: 'occurrence', edits: [{ start: line.startOffset + diagnostic.location.column + length - 2, length: 1, text: ' optional' }] } });\n } else if (diagnostic.code === DiagnosticCodes.LegacyComplianceMarker) {\n const edit = complianceMarkerEdit(line.raw, line.startOffset);\n if (edit !== undefined) byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Use bare pii and secret compliance markers', scope: 'occurrence', edits: [edit] } });\n } else if (diagnostic.code === DiagnosticCodes.PublicTranslationRequiresDirection) {\n // PLAY0614 is only reported on the declaration line of a Translate slice that has no direction.\n const slice = slicesByLine.get(line.number)!;\n // Offer a direction only when exactly one is consistent with the slice: the other would add errors.\n const indent = /^\\s*/.exec(line.raw)![0];\n const ending = source.includes('\\r\\n') ? '\\r\\n' : '\\n';\n const candidates = [TranslationDirection.Inbound, TranslationDirection.Outbound].map(direction => ({ direction, text: `${ending}${indent} direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}` }))\n .filter(candidate => {\n // The insertion point is the end of an existing line, so the edit is always in bounds.\n const edited = applyQuickFixEdits(source, [{ start: line.startOffset + line.raw.length, length: 0, text: candidate.text }])!;\n const parsed = parseForAuthoring(edited, undefined, options.placement);\n const originalCodes = errorCodes(original);\n // Valid when the missing-direction error is gone and the direction introduces no kind of error the document lacked.\n return acceptable(parsed) && ![...errorCodes(parsed)].some(code => code === DiagnosticCodes.PublicTranslationRequiresDirection || !originalCodes.has(code));\n });\n if (candidates.length === 1) {\n const [{ direction, text }] = candidates;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: `Declare 'direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}'`, scope: 'occurrence', edits: [{ start: line.startOffset + line.raw.length, length: 0, text }] },\n change: { node: slice, replacement: { ...slice, direction } as SliceSyntax } });\n }\n } else if (diagnostic.code === DiagnosticCodes.RedundantEventId && commentStart(line.raw) < 0) {\n const declaration = events.get(line.number);\n if (declaration?.id !== declaration?.name || declaration === undefined) continue;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Remove the redundant event id', scope: 'occurrence', edits: [{ start: line.startOffset, length: (lines[line.number]?.startOffset ?? source.length) - line.startOffset, text: '' }] },\n change: { node: declaration, replacement: { ...declaration, id: null } as EventSyntax } });\n }\n }\n const spellingCodes = [DiagnosticCodes.LegacyOptionalSuffix, DiagnosticCodes.LegacyComplianceMarker];\n const syntax = verificationShape(original);\n const verified = new Map<number, QuickFix | undefined>();\n let rangeVerdicts: Map<number, QuickFix> | undefined;\n const documentChecked = new Set<string>();\n const documentFixes = new Map<string, QuickFix>();\n const verify = (fix: QuickFix, change?: QuickFixCandidate['change']): QuickFix | undefined => {\n const candidate = applyQuickFixEdits(source, fix.edits);\n if (candidate === undefined) return undefined;\n const parsed = parseForAuthoring(candidate, undefined, options.placement);\n if (!acceptable(parsed) || verificationShape(parsed) !== (change === undefined ? syntax : verificationShape(original, [change]))) return undefined;\n return parsed.diagnostics.filter(diagnostic => diagnostic.code === fix.diagnosticCode).length === (counts.get(fix.diagnosticCode) ?? 0) - fix.edits.length ? fix : undefined;\n };\n return (line, diagnosticCode) => {\n const requests = typeof line === 'number' || line === undefined ? undefined : line;\n const duplicateLines = requests === undefined\n ? typeof line === 'number' && (diagnosticCode === undefined || diagnosticCode === DiagnosticCodes.DuplicateComplianceMarker) ? [line] : []\n : requests.filter(request => request.diagnosticCode === DiagnosticCodes.DuplicateComplianceMarker).map(request => request.line);\n const duplicates = [...new Set(duplicateLines)].flatMap(number => {\n const fix = duplicateByLine.get(number);\n if (fix === undefined) return [];\n if (!duplicateVerdicts.has(number)) duplicateVerdicts.set(number, verify(fix));\n const verified = duplicateVerdicts.get(number);\n return verified === undefined ? [] : [verified];\n });\n const selectedCodes = spellingCodes.filter(code => requests === undefined ? diagnosticCode === undefined || diagnosticCode === code : requests.some(request => request.diagnosticCode === code));\n for (const code of selectedCodes.filter(code => !documentChecked.has(code))) {\n const candidates = [...byLine.values()].filter(candidate => candidate.fix.diagnosticCode === code);\n if (candidates.length > 0) {\n const fix = verify({ diagnosticCode: code, title: code === DiagnosticCodes.LegacyOptionalSuffix ? \"Use 'optional' throughout this document\" : 'Use bare pii and secret throughout this document', scope: 'document', edits: candidates.flatMap(candidate => candidate.fix.edits) });\n if (fix !== undefined) documentFixes.set(code, fix);\n }\n documentChecked.add(code);\n }\n const documents = selectedCodes.flatMap(code => documentFixes.has(code) ? [documentFixes.get(code)!] : []);\n if (requests !== undefined) {\n if (rangeVerdicts === undefined) {\n rangeVerdicts = new Map();\n // Source order gives ordered, non-overlapping edits without sorting. Recipes replace\n // distinct nodes/lines; the batch must preserve every other modeled member and remove\n // exactly the expected diagnostics before any of its occurrence edits can be offered.\n const candidates = lines.flatMap(line => byLine.has(line.number) ? [byLine.get(line.number)!] : []);\n const edits = candidates.flatMap(candidate => candidate.fix.edits);\n const candidateSource = applyQuickFixEdits(source, edits);\n if (edits.length > 0 && candidateSource !== undefined) {\n const parsed = parseForAuthoring(candidateSource, undefined, options.placement);\n const changes = candidates.flatMap(candidate => candidate.change === undefined ? [] : [candidate.change]);\n if (acceptable(parsed) && verificationShape(parsed) === verificationShape(original, changes)) {\n const remaining = new Map<string, number>();\n const removed = new Map<string, number>();\n for (const diagnostic of parsed.diagnostics) remaining.set(diagnostic.code, (remaining.get(diagnostic.code) ?? 0) + 1);\n for (const candidate of candidates) removed.set(candidate.fix.diagnosticCode, (removed.get(candidate.fix.diagnosticCode) ?? 0) + candidate.fix.edits.length);\n if ([...removed].every(([code, count]) => (remaining.get(code) ?? 0) === (counts.get(code) ?? 0) - count)) {\n for (const candidate of candidates) rangeVerdicts.set(candidate.line, candidate.fix);\n }\n }\n }\n }\n const selected = new Map<number, QuickFix>();\n for (const request of requests) {\n const fix = rangeVerdicts.get(request.line);\n if (fix?.diagnosticCode === request.diagnosticCode) selected.set(request.line, fix);\n }\n return [...selected.values(), ...duplicates, ...documents];\n }\n const occurrenceLine = typeof line === 'number' ? line : undefined;\n const selected = occurrenceLine === undefined ? undefined : byLine.get(occurrenceLine);\n let occurrenceFix: QuickFix | undefined;\n if (selected !== undefined && occurrenceLine !== undefined && (diagnosticCode === undefined || selected.fix.diagnosticCode === diagnosticCode)) {\n if (!verified.has(occurrenceLine)) {\n if (verified.size === 32) verified.delete(verified.keys().next().value!);\n verified.set(occurrenceLine, verify(selected.fix, selected.change));\n }\n occurrenceFix = verified.get(occurrenceLine);\n }\n return [...(occurrenceFix === undefined ? [] : [occurrenceFix]), ...duplicates, ...documents];\n };\n}\n\nfunction duplicateComplianceMarkerEdit(raw: string, startOffset: number): QuickFixEdit | undefined {\n const header = pattern('^(\\\\s*concept\\\\s+\\\\w+\\\\s*:\\\\s*\\\\w+)((?:[^\\\\S\\\\r\\\\n]+@?\\\\w+)*)').exec(raw);\n if (header === null) return undefined;\n const suffix = header[2];\n const seen = new Set<string>();\n const text = suffix.replace(new RegExp(pattern('[^\\\\S\\\\r\\\\n]+(@?\\\\w+)').source, 'gu'), (token, marker: string) => {\n const wire = complianceWireName(marker);\n if (seen.has(wire)) return '';\n seen.add(wire);\n return token;\n });\n return text === suffix ? undefined : { start: startOffset + header[1].length, length: suffix.length, text };\n}\n\nfunction complianceMarkerEdit(raw: string, startOffset: number): QuickFixEdit | undefined {\n // Restrict rewriting to the suffix or leading directive marker, never comments or quoted reasons.\n const header = pattern('^(\\\\s*concept\\\\s+\\\\w+\\\\s*:\\\\s*\\\\w+)((?:[^\\\\S\\\\r\\\\n]+@?\\\\w+)*)').exec(raw);\n if (header !== null) {\n const suffix = header[2];\n const text = suffix.replace(/@pii\\b|@?sensitive\\b/g, marker => marker === '@pii' ? 'pii' : 'secret');\n return text === suffix ? undefined : { start: startOffset + header[1].length, length: suffix.length, text };\n }\n const directive = pattern('^(\\\\s*)(@pii|@?sensitive)\\\\b').exec(raw);\n return directive === null ? undefined : { start: startOffset + directive[1].length, length: directive[2].length, text: directive[2] === '@pii' ? 'pii' : 'secret' };\n}\n\nfunction verificationShape(parsed: ReturnType<typeof parseForAuthoring>, changes: readonly NonNullable<QuickFixCandidate['change']>[] = []): string {\n // Compare every modeled member (including trigger data), ignoring only source locations. A recipe\n // may replace only its original node; no other id or destination is normalized away.\n const replacements = new Map(changes.map(change => [change.node, change.replacement]));\n return JSON.stringify([parsed.value, parsed.triggerData], (key, value: unknown) => ['location', 'usesLocation', 'targetLocation'].includes(key) ? undefined : replacements.get(value as NonNullable<QuickFixCandidate['change']>['node']) ?? value);\n}\n\n// One forward pass; applying N edits by repeatedly slicing the document would be quadratic.\nexport function applyQuickFixEdits(source: string, edits: readonly QuickFixEdit[]): string | undefined {\n const parts: string[] = [];\n let end = 0;\n for (const edit of edits) {\n if (edit.start < end || edit.start < 0 || edit.length < 0 || edit.start + edit.length > source.length) return undefined;\n parts.push(source.slice(end, edit.start), edit.text);\n end = edit.start + edit.length;\n }\n parts.push(source.slice(end));\n return parts.join('');\n}\n"],"mappings":"4cAmCA,SAAgB,qBAAqB,EAA+B,CAChE,OAAOA,IAASC,EAAgB,2BAA6BD,IAASC,EAAgB,sBAAwBD,IAASC,EAAgB,wBAA0BD,IAASC,EAAgB,kBAAoBD,IAASC,EAAgB,kCAC3O,CAGA,SAAgB,yBAAyB,EAAc,EAAgC,CAEnF,OADIC,EAAW,OAASD,EAAgB,qBACjC,2CAA2C,KAAKE,EAAK,MAAMD,EAAW,SAAS,OAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAU,EAD7C,CAEzE,CASA,SAAgB,kBAAkB,EAAgB,EAA8C,CAAC,EAAiH,CAC9M,IAAME,EAAWC,EAAkBC,EAAQ,IAAA,GAAWC,EAAQ,SAAS,EAGjEC,EAAwC,IAAI,IAAI,MAAM,KAAK,CAAE,OAAQ,EAAG,GAAI,EAAG,IAAU,QAAQ,IAAMC,GAAO,CAAC,EAC/G,WAAc,GAA0DC,EAAO,SAAWA,EAAO,YAAY,MAAM,GAAcR,EAAW,WAAa,SAAWM,EAAiB,IAAIN,EAAW,IAAI,CAAC,EACzM,WAAc,GAA8D,IAAI,IAAIQ,EAAO,YAAY,OAAO,GAAcR,EAAW,WAAa,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,UAAU,CAAC/B,EAAO,MAAOA,EAAO,WAAW,GAAI,EAAK,IAAmB,CAAC,WAAY,eAAgB,gBAAgB,CAAC,CAAC,SAAS8D,CAAG,EAAI,IAAA,GAAYD,EAAa,IAAIE,CAAyD,GAAKA,CAAK,CACtP,CAGA,SAAgB,mBAAmB,EAAgB,EAAoD,CACnG,IAAMC,EAAkB,CAAC,EACrBC,EAAM,EACV,IAAK,IAAMpD,KAAQ2B,EAAO,CACtB,GAAI3B,EAAK,MAAQoD,GAAOpD,EAAK,MAAQ,GAAKA,EAAK,OAAS,GAAKA,EAAK,MAAQA,EAAK,OAASjB,EAAO,OAAQ,OACvGoE,EAAM,KAAKpE,EAAO,MAAMqE,EAAKpD,EAAK,KAAK,EAAGA,EAAK,IAAI,EACnD,EAAMA,EAAK,MAAQA,EAAK,MAC5B,CAEA,OADAmD,EAAM,KAAKpE,EAAO,MAAMqE,CAAG,CAAC,EACrBD,EAAM,KAAK,EAAE,CACxB"}
@@ -1,2 +1,2 @@
1
- const e={InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`};export{e as DiagnosticCodes};
1
+ const e={InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,DuplicateComplianceMarker:`PLAY0653`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`};export{e as DiagnosticCodes};
2
2
  //# sourceMappingURL=DiagnosticCodes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,WACzB,qCAAsC,WACtC,0BAA2B,WAC3B,wBAAyB,WACzB,+BAAgC,WAChC,uBAAwB,WACxB,mBAAoB,WACpB,4BAA6B,WAC7B,4BAA6B,WAE7B,2BAA4B,WAC5B,uCAAwC,WACxC,yBAA0B,WAC1B,2BAA4B,WAC5B,yBAA0B,WAC1B,yBAA0B,WAC1B,2BAA4B,WAC5B,mCAAoC,WACpC,8BAA+B,WAC/B,wBAAyB,WACzB,0BAA2B,WAC3B,sCAAuC,WACvC,sCAAuC,WACvC,2BAA4B,WAE5B,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACjB,iBAAkB,WAClB,4BAA6B,WAC7B,4BAA6B,WAC7B,uBAAwB,WACxB,yBAA0B,WAC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AC9B,uBAAwB,WACxB,8BAA+B,WAC/B,qBAAsB,WACtB,uBAAwB,WACxB,wBAAyB,WACzB,wBAAyB,WACzB,aAAc,WACd,yBAA0B,WAC1B,4BAA6B,WAC7B,6BAA8B,WAC9B,wBAAyB,WACzB,8BAA+B,WAC/B,sBAAuB,WACvB,mBAAoB,UACxB"}
1
+ {"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n DuplicateComplianceMarker: 'PLAY0653',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,WACzB,qCAAsC,WACtC,0BAA2B,WAC3B,wBAAyB,WACzB,+BAAgC,WAChC,uBAAwB,WACxB,mBAAoB,WACpB,4BAA6B,WAC7B,4BAA6B,WAE7B,2BAA4B,WAC5B,uCAAwC,WACxC,yBAA0B,WAC1B,2BAA4B,WAC5B,yBAA0B,WAC1B,yBAA0B,WAC1B,2BAA4B,WAC5B,mCAAoC,WACpC,8BAA+B,WAC/B,wBAAyB,WACzB,0BAA2B,WAC3B,sCAAuC,WACvC,sCAAuC,WACvC,2BAA4B,WAE5B,2BAA4B,WAC5B,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tC,+BAAgC,WAChC,uCAAwC,WACxC,6BAA8B,WAC9B,oCAAqC,WACrC,mCAAoC,WACpC,6BAA8B,WAC9B,qCAAsC,WACtC,6BAA8B,WAC9B,uBAAwB,WACxB,8BAA+B,WAC/B,qBAAsB,WACtB,uBAAwB,WACxB,wBAAyB,WACzB,wBAAyB,WACzB,aAAc,WACd,yBAA0B,WAC1B,4BAA6B,WAC7B,6BAA8B,WAC9B,wBAAyB,WACzB,8BAA+B,WAC/B,sBAAuB,WACvB,mBAAoB,UACxB"}
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{nativePattern as t,pattern as n}from"../Text/patterns.js";import{stringBodyPattern as r,unescapeString as i}from"../Text/StringLiteral.js";import{parseModeledMappingSource as a}from"./ExpressionParser.js";import{firstWord as o,unescapeIdentifier as s}from"./LineText.js";import{locationOf as c}from"./SourceLine.js";import"../Syntax/CaptureEventsSource.js";import{parseTag as l}from"./DeclarationParsers.js";import{parseProjectionExpression as u}from"./ProjectionExpressionParser.js";const grammar=e=>({legacy:n(e),native:t(e)}),d=grammar(`^capture\\s+([A-Za-z_]\\w*)$`),f=/^[A-Za-z_][\w.]*$/,p=grammar(`^append\\s+([A-Z]\\w*)$`),m=grammar(`^children\\s+([a-z_]\\w*)\\s+identified\\s+by\\s+([\\w.]+)$`),h=grammar(`^nested\\s+([\\w.]+)$`),select=(e,t)=>e.sourceOptions.numericMode===`exact`?t.native:t.legacy,g=t(`^(@?[\\w.]+)\\s*=(?!=|>)\\s*(.+)$`),_=t(`^([a-z_]\\w*)\\s*=\\s*(.+)$`),v=t(`^"(${r})"\\s*=>\\s*(\\w+)$`),y=t(`^split\\s+(\\S+)\\s+by\\s+"(${r})"$`),b=new RegExp(t(`"${r}"|[\\w.]+`).source,`gu`),x=t(`^[\\w.]+$`);function parseCapture(t,n){let r=t;t=t.valueContext;let i=select(t,d).exec(n.content)?.[1]??``;i===``&&t.sourceOptions.numericMode===`exact`&&t.error(e.InvalidCaptureDeclaration,`Invalid capture declaration '${n.content}' - expected 'capture <Name>'`,c(n));let a=null,s=null,l=[],u=[],f=[],p=[];for(let i=t.peekChild(n.indent);i!==void 0;i=t.peekChild(n.indent))switch(t.reader.takeSignificant(),o(i.content)){case`source`:a=parseSource(t,i,r);break;case`key`:s=i.content.substring(3).trim();break;case`map`:l.push(...parseMap(t,i));break;case`append`:pushAppend(t,i,u);break;case`children`:{let n=select(t,m).exec(i.content);if(n===null){t.error(e.InvalidChildrenDeclaration,`Invalid children declaration '${i.content}' - expected 'children <collection> identified by <key>'`,c(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&f.push({kind:`CaptureChildrenSyntax`,property:n[1],identifiedBy:n[2],...r,location:c(i)});break}case`nested`:{let n=select(t,h).exec(i.content);if(n===null){t.error(e.InvalidNestedDeclaration,`Invalid nested declaration '${i.content}' - expected 'nested <Property>'`,c(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&p.push({kind:`CaptureNestedSyntax`,property:n[1],...r,location:c(i)});break}default:t.error(e.UnknownCaptureDirective,`Unexpected '${i.content}' in capture body`,c(i)),t.skipOpaqueBlock(i.indent)}return{kind:`CaptureSyntax`,sourceOptions:t.sourceOptions,name:i,source:a,key:s,map:l,appends:u,children:f,nested:p,location:c(n)}}function parseSource(e,t,n){let r=[];for(let n=e.peekChild(t.indent);n!==void 0;n=e.peekChild(t.indent)){e.reader.takeSignificant();let t=o(n.content);r.push({kind:`CaptureSourceSettingSyntax`,name:t,value:n.content.substring(t.length).trim(),location:c(n)})}let i=t.content.substring(6).trim();return i===`events`&&validateEventsSource(n,t,r),{kind:`CaptureSourceSyntax`,syntaxKind:i,settings:r,location:c(t)}}function validateEventsSource(t,n,r){r.length===0&&t.error(e.InvalidCaptureEventsSource,`'source events' needs at least one 'from <Event>' line naming a public event to consume`,c(n));let i=/* @__PURE__ */ new Set;for(let n of r)n.name===`from`?f.test(n.value)?i.has(n.value)?t.error(e.InvalidCaptureEventsSource,`Event '${n.value}' is already consumed by this 'source events'`,n.location):i.add(n.value):t.error(e.InvalidCaptureEventsSource,`Invalid event '${n.value}' - expected 'from <Event>', optionally qualified with dots`,n.location):t.error(e.InvalidCaptureEventsSource,`'source events' accepts only 'from <Event>' lines, got '${n.name}'`,n.location)}function parseMap(t,n){let r=[];for(let a=t.peekChild(n.indent);a!==void 0;a=t.peekChild(n.indent)){t.reader.takeSignificant();let n=c(a);if(o(a.content)===`split`){let o=y.exec(a.content);if(o===null){t.error(e.InvalidSplitDeclaration,`Invalid split operation '${a.content}' - expected 'split <property> by "<separator>"'`,n),t.skipOpaqueBlock(a.indent);continue}let s=[];for(let n=t.peekChild(a.indent);n!==void 0;n=t.peekChild(a.indent))t.reader.takeSignificant(),x.test(n.content)?s.push(n.content):t.error(e.InvalidSplitTarget,`Invalid split target '${n.content}' - expected a property path`,c(n));o!==null&&r.push({kind:`CaptureSplitSyntax`,source:u(o[1],n,t),separator:i(o[2]),targets:s,location:n});continue}let s=_.exec(a.content);if(s===null){t.error(e.InvalidMapEntry,`Invalid map entry '${a.content}' - expected '<property> = <source> [translate]'`,n),t.skipOpaqueBlock(a.indent);continue}let l=s[2].trim(),d=l.startsWith("`")?l.indexOf("`",1):-1,f=l.startsWith("`")?d>=0&&l.substring(d+1).trim()===`translate`:l.endsWith(` translate`),p=l.startsWith("`")&&d>=0&&(t.sourceOptions.numericMode!==`exact`||f||l.substring(d+1).trim()===``)?l.substring(0,d+1):f?l.substring(0,l.length-10).trimEnd():l,m=[];if(f)for(let n=t.peekChild(a.indent);n!==void 0;n=t.peekChild(a.indent)){t.reader.takeSignificant();let r=v.exec(n.content);r===null?t.error(e.InvalidTranslation,`Invalid translation '${n.content}' - expected '"<source>" => <target>'`,c(n)):m.push({kind:`CaptureTranslationSyntax`,from:i(r[1]),to:r[2],location:c(n)})}r.push({kind:`CaptureMapEntrySyntax`,property:s[1],source:u(p,n,t),translations:m,location:n})}return r}function mapAndAppends(t,n){let r=[],i=[];for(let a=t.peekChild(n.indent);a!==void 0;a=t.peekChild(n.indent))t.reader.takeSignificant(),o(a.content)===`map`?r=parseMap(t,a):o(a.content)===`append`?pushAppend(t,a,i):(t.error(e.UnknownCaptureBlockDirective,`Unexpected '${a.content}' in ${o(n.content)} block - expected 'map' or 'append <EventType>'`,c(a)),t.skipOpaqueBlock(a.indent));return{map:r,appends:i}}function pushAppend(t,n,r){let i=select(t,p).exec(n.content);if(i===null){t.error(e.InvalidAppendDeclaration,`Invalid append declaration '${n.content}' - expected 'append <EventType>'`,c(n)),t.skipOpaqueBlock(n.indent);return}let u=[],d=[],f=null,mapping=(n,r=!1)=>{let i=c(n);if(o(n.content)===`tag`){let e=l(t.valueContext,n,!1);e!==void 0&&d.push(e);return}let f=g.exec(n.content);f===null?t.error(r?e.InvalidPropertyMapping:e.UnknownAppendDirective,`Unexpected '${n.content}' in append body`,i):u.push({kind:`PropertyMappingSyntax`,property:s(f[1]),source:a(f[2],i,t.valueContext),location:i})};for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent))if(t.reader.takeSignificant(),o(e.content)===`when`){f=parseWhen(t,e);for(let n=t.peekChild(e.indent);n!==void 0;n=t.peekChild(e.indent))t.reader.takeSignificant(),mapping(n,!0)}else mapping(e);r.push({kind:`CaptureAppendSyntax`,event:i[1],when:f,mappings:u,tags:d,location:c(n)})}function parseWhen(t,n){let r=n.content.substring(4).trim(),a=c(n),value=(e,t=[],n=null,r=null,i=null)=>({kind:`CaptureWhenSyntax`,syntaxKind:e,properties:t,fromValue:n,toValue:r,expression:i,location:a});if(r===`added`)return value(`Added`);if(r===`removed`)return value(`Removed`);if(r.startsWith("`"))return(!r.endsWith("`")||r.length<2)&&t.error(e.UnterminatedTemplateExpression,`Unterminated template expression in 'when' - expected a closing backtick`,a),value(`Expression`,[],null,null,r);if(r.length===0)return t.error(e.WhenWithoutTrigger,`Expected a trigger after 'when'`,a),null;let o=[...r.match(t.sourceOptions.numericMode===`exact`?/* @__PURE__ */ RegExp(`"(?:[^"\\\\]|\\\\.)*"|[^\\s]+`,`gu`):b)??[]],unquote=e=>e.startsWith(`"`)&&e.endsWith(`"`)?i(e.substring(1,e.length-1)):e;if(o.length===0)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${n.content}'`,a),null;if(o.length===1)return value(`PropertyChanged`,[unquote(o[0])]);if(o[1]===`from`)return o.length===5&&o[3]===`to`?value(`ValueTransition`,[unquote(o[0])],unquote(o[2]),unquote(o[4])):(t.error(e.InvalidWhenTransitionClause,`Invalid 'when ... from ... to ...' clause '${n.content}'`,a),null);if(o[1]!==`or`&&o[1]!==`and`)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${n.content}'`,a),null;if(o.length%2==0)return t.error(e.WhenCombinatorWithoutProperty,`Expected a property after '${o[1]}'`,a),null;let s=[unquote(o[0])];for(let r=1;r<o.length-1;r+=2){if(o[r]!==o[1])return t.error(e.MixedWhenCombinators,`Cannot mix 'and' and 'or' in a single 'when' clause '${n.content}'`,a),null;s.push(unquote(o[r+1]))}return value(o[1]===`or`?`LogicalOr`:`LogicalAnd`,s)}export{parseCapture};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{nativePattern as r,pattern as i}from"../Text/patterns.js";import{locationOf as a}from"./SourceLine.js";import{parseModeledMappingSource as o}from"./ExpressionParser.js";import{firstWord as s,unescapeIdentifier as c}from"./LineText.js";import"../Syntax/CaptureEventsSource.js";import{parseTag as l}from"./DeclarationParsers.js";import{parseProjectionExpression as u}from"./ProjectionExpressionParser.js";const grammar=e=>({legacy:i(e),native:r(e)}),d=grammar(`^capture\\s+([A-Za-z_]\\w*)$`),f=/^[A-Za-z_][\w.]*$/,p=grammar(`^append\\s+([A-Z]\\w*)$`),m=grammar(`^children\\s+([a-z_]\\w*)\\s+identified\\s+by\\s+([\\w.]+)$`),h=grammar(`^nested\\s+([\\w.]+)$`),select=(e,t)=>e.sourceOptions.numericMode===`exact`?t.native:t.legacy,g=r(`^(@?[\\w.]+)\\s*=(?!=|>)\\s*(.+)$`),_=r(`^([a-z_]\\w*)\\s*=\\s*(.+)$`),v=r(`^"(${t})"\\s*=>\\s*(\\w+)$`),y=r(`^split\\s+(\\S+)\\s+by\\s+"(${t})"$`),b=new RegExp(r(`"${t}"|[\\w.]+`).source,`gu`),x=r(`^[\\w.]+$`);function parseCapture(t,n){let r=t;t=t.valueContext;let i=select(t,d).exec(n.content)?.[1]??``;i===``&&t.sourceOptions.numericMode===`exact`&&t.error(e.InvalidCaptureDeclaration,`Invalid capture declaration '${n.content}' - expected 'capture <Name>'`,a(n));let o=null,c=null,l=[],u=[],f=[],p=[];for(let i=t.peekChild(n.indent);i!==void 0;i=t.peekChild(n.indent))switch(t.reader.takeSignificant(),s(i.content)){case`source`:o=parseSource(t,i,r);break;case`key`:c=i.content.substring(3).trim();break;case`map`:l.push(...parseMap(t,i));break;case`append`:pushAppend(t,i,u);break;case`children`:{let n=select(t,m).exec(i.content);if(n===null){t.error(e.InvalidChildrenDeclaration,`Invalid children declaration '${i.content}' - expected 'children <collection> identified by <key>'`,a(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&f.push({kind:`CaptureChildrenSyntax`,property:n[1],identifiedBy:n[2],...r,location:a(i)});break}case`nested`:{let n=select(t,h).exec(i.content);if(n===null){t.error(e.InvalidNestedDeclaration,`Invalid nested declaration '${i.content}' - expected 'nested <Property>'`,a(i)),t.skipOpaqueBlock(i.indent);break}let r=mapAndAppends(t,i);n!==null&&p.push({kind:`CaptureNestedSyntax`,property:n[1],...r,location:a(i)});break}default:t.error(e.UnknownCaptureDirective,`Unexpected '${i.content}' in capture body`,a(i)),t.skipOpaqueBlock(i.indent)}return{kind:`CaptureSyntax`,sourceOptions:t.sourceOptions,name:i,source:o,key:c,map:l,appends:u,children:f,nested:p,location:a(n)}}function parseSource(e,t,n){let r=[];for(let n=e.peekChild(t.indent);n!==void 0;n=e.peekChild(t.indent)){e.reader.takeSignificant();let t=s(n.content);r.push({kind:`CaptureSourceSettingSyntax`,name:t,value:n.content.substring(t.length).trim(),location:a(n)})}let i=t.content.substring(6).trim();return i===`events`&&validateEventsSource(n,t,r),{kind:`CaptureSourceSyntax`,syntaxKind:i,settings:r,location:a(t)}}function validateEventsSource(t,n,r){r.length===0&&t.error(e.InvalidCaptureEventsSource,`'source events' needs at least one 'from <Event>' line naming a public event to consume`,a(n));let i=/* @__PURE__ */ new Set;for(let n of r)n.name===`from`?f.test(n.value)?i.has(n.value)?t.error(e.InvalidCaptureEventsSource,`Event '${n.value}' is already consumed by this 'source events'`,n.location):i.add(n.value):t.error(e.InvalidCaptureEventsSource,`Invalid event '${n.value}' - expected 'from <Event>', optionally qualified with dots`,n.location):t.error(e.InvalidCaptureEventsSource,`'source events' accepts only 'from <Event>' lines, got '${n.name}'`,n.location)}function parseMap(t,r){let i=[];for(let o=t.peekChild(r.indent);o!==void 0;o=t.peekChild(r.indent)){t.reader.takeSignificant();let r=a(o);if(s(o.content)===`split`){let s=y.exec(o.content);if(s===null){t.error(e.InvalidSplitDeclaration,`Invalid split operation '${o.content}' - expected 'split <property> by "<separator>"'`,r),t.skipOpaqueBlock(o.indent);continue}let c=[];for(let n=t.peekChild(o.indent);n!==void 0;n=t.peekChild(o.indent))t.reader.takeSignificant(),x.test(n.content)?c.push(n.content):t.error(e.InvalidSplitTarget,`Invalid split target '${n.content}' - expected a property path`,a(n));s!==null&&i.push({kind:`CaptureSplitSyntax`,source:u(s[1],r,t),separator:n(s[2]),targets:c,location:r});continue}let c=_.exec(o.content);if(c===null){t.error(e.InvalidMapEntry,`Invalid map entry '${o.content}' - expected '<property> = <source> [translate]'`,r),t.skipOpaqueBlock(o.indent);continue}let l=c[2].trim(),d=l.startsWith("`")?l.indexOf("`",1):-1,f=l.startsWith("`")?d>=0&&l.substring(d+1).trim()===`translate`:l.endsWith(` translate`),p=l.startsWith("`")&&d>=0&&(t.sourceOptions.numericMode!==`exact`||f||l.substring(d+1).trim()===``)?l.substring(0,d+1):f?l.substring(0,l.length-10).trimEnd():l,m=[];if(f)for(let r=t.peekChild(o.indent);r!==void 0;r=t.peekChild(o.indent)){t.reader.takeSignificant();let i=v.exec(r.content);i===null?t.error(e.InvalidTranslation,`Invalid translation '${r.content}' - expected '"<source>" => <target>'`,a(r)):m.push({kind:`CaptureTranslationSyntax`,from:n(i[1]),to:i[2],location:a(r)})}i.push({kind:`CaptureMapEntrySyntax`,property:c[1],source:u(p,r,t),translations:m,location:r})}return i}function mapAndAppends(t,n){let r=[],i=[];for(let o=t.peekChild(n.indent);o!==void 0;o=t.peekChild(n.indent))t.reader.takeSignificant(),s(o.content)===`map`?r=parseMap(t,o):s(o.content)===`append`?pushAppend(t,o,i):(t.error(e.UnknownCaptureBlockDirective,`Unexpected '${o.content}' in ${s(n.content)} block - expected 'map' or 'append <EventType>'`,a(o)),t.skipOpaqueBlock(o.indent));return{map:r,appends:i}}function pushAppend(t,n,r){let i=select(t,p).exec(n.content);if(i===null){t.error(e.InvalidAppendDeclaration,`Invalid append declaration '${n.content}' - expected 'append <EventType>'`,a(n)),t.skipOpaqueBlock(n.indent);return}let u=[],d=[],f=null,mapping=(n,r=!1)=>{let i=a(n);if(s(n.content)===`tag`){let e=l(t.valueContext,n,!1);e!==void 0&&d.push(e);return}let f=g.exec(n.content);f===null?t.error(r?e.InvalidPropertyMapping:e.UnknownAppendDirective,`Unexpected '${n.content}' in append body`,i):u.push({kind:`PropertyMappingSyntax`,property:c(f[1]),source:o(f[2],i,t.valueContext),location:i})};for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent))if(t.reader.takeSignificant(),s(e.content)===`when`){f=parseWhen(t,e);for(let n=t.peekChild(e.indent);n!==void 0;n=t.peekChild(e.indent))t.reader.takeSignificant(),mapping(n,!0)}else mapping(e);r.push({kind:`CaptureAppendSyntax`,event:i[1],when:f,mappings:u,tags:d,location:a(n)})}function parseWhen(t,r){let i=r.content.substring(4).trim(),o=a(r),value=(e,t=[],n=null,r=null,i=null)=>({kind:`CaptureWhenSyntax`,syntaxKind:e,properties:t,fromValue:n,toValue:r,expression:i,location:o});if(i===`added`)return value(`Added`);if(i===`removed`)return value(`Removed`);if(i.startsWith("`"))return(!i.endsWith("`")||i.length<2)&&t.error(e.UnterminatedTemplateExpression,`Unterminated template expression in 'when' - expected a closing backtick`,o),value(`Expression`,[],null,null,i);if(i.length===0)return t.error(e.WhenWithoutTrigger,`Expected a trigger after 'when'`,o),null;let s=[...i.match(t.sourceOptions.numericMode===`exact`?/* @__PURE__ */ RegExp(`"(?:[^"\\\\]|\\\\.)*"|[^\\s]+`,`gu`):b)??[]],unquote=e=>e.startsWith(`"`)&&e.endsWith(`"`)?n(e.substring(1,e.length-1)):e;if(s.length===0)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${r.content}'`,o),null;if(s.length===1)return value(`PropertyChanged`,[unquote(s[0])]);if(s[1]===`from`)return s.length===5&&s[3]===`to`?value(`ValueTransition`,[unquote(s[0])],unquote(s[2]),unquote(s[4])):(t.error(e.InvalidWhenTransitionClause,`Invalid 'when ... from ... to ...' clause '${r.content}'`,o),null);if(s[1]!==`or`&&s[1]!==`and`)return t.error(e.InvalidWhenClause,`Invalid 'when' clause '${r.content}'`,o),null;if(s.length%2==0)return t.error(e.WhenCombinatorWithoutProperty,`Expected a property after '${s[1]}'`,o),null;let c=[unquote(s[0])];for(let n=1;n<s.length-1;n+=2){if(s[n]!==s[1])return t.error(e.MixedWhenCombinators,`Cannot mix 'and' and 'or' in a single 'when' clause '${r.content}'`,o),null;c.push(unquote(s[n+1]))}return value(s[1]===`or`?`LogicalOr`:`LogicalAnd`,c)}export{parseCapture};
2
2
  //# sourceMappingURL=CaptureParser.js.map
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{pattern as t}from"../Text/patterns.js";import{dependencySources as n}from"../Syntax/DependencySources.js";import{stringBodyPattern as r,unescapeString as i}from"../Text/StringLiteral.js";import{parseMappingSource as a}from"./ExpressionParser.js";import{firstWord as o}from"./LineText.js";import{locationOf as s}from"./SourceLine.js";import{reportInvalidModifierOrder as c,reportLegacyOptionalSuffix as l,tryParseProperty as u}from"./PropertyLineParser.js";import{combineAuthorize as d,parseAuthorize as f}from"./AuthorizeParser.js";import{parseDescription as p}from"./DescriptionParser.js";import{parseDocumentation as m}from"./DocumentationParser.js";import{parseCondition as h}from"./ConditionParser.js";import{ParserContext as g}from"./ParserContext.js";import{isReactionIdentityLine as _,misplacedReactionIdentity as v}from"./ReactionIdentityParser.js";import{sourceStreamPattern as y}from"../Text/SourceStreamNames.js";import{parseCommandStream as b}from"./EventSourceParser.js";import{isCode as x,isFile as S,parseCode as C,parseFile as w,parseHandler as T,parseImplementationWrapper as E}from"./ImplementationParser.js";import{parseCommandResponse as D,scalarResponsePattern as O}from"./CommandResponseParser.js";import{commandReadSources as k}from"./CommandReadSources.js";import{captureConcurrency as A,captureReads as j}from"./DependencySourceParser.js";import{parseProduces as M}from"./ProducesParser.js";const N=t(`^command\\s+([A-Za-z_]\\w*)$`),P=y(`^stream\\s+[A-Za-z_]\\w*\\.[A-Za-z_]\\w*$`),F=t(`\\bseverity\\s+(\\S+)$`),I=t(`\\bmessage\\s+(?:"(${r})"|(\\$strings\\.\\S*))$`),L=t(`^([\\w.]+)\\s+(.+)$`),R=t(`^(not empty|length ==|all >=|all >|matches|max|min|rule|>=|<=|==|!=|>|<)\\s*(.*)$`),z=y(`^[A-Za-z_]\\w*$`),B=t(`^reads\\s+[A-Z]\\w*\\s+optional(?:\\s|$)`),V={max:`Max`,min:`Min`,">":`GreaterThan`,">=":`GreaterThanOrEqual`,"<":`LessThan`,"<=":`LessThanOrEqual`,"==":`Equal`,"!=":`NotEqual`,"length ==":`Length`,matches:`Matches`,"all >":`AllGreaterThan`,"all >=":`AllGreaterThanOrEqual`},H={information:`Information`,warning:`Warning`,error:`Error`},U=/* @__PURE__ */ new Set([`reads`,`concurrency`]),W=/* @__PURE__ */ new Set([`description`,`documentation`,`handler`,`concurrency`]);function parseCommand(e,t){let n=/* @__PURE__ */ new Set,r=new g(e.reader.fork(),e.path,e.languages);return r.sourceOptions=e.sourceOptions,r.streamCandidates=e.streamCandidates,parseCommandBody(r,t,void 0,n),parseCommandBody(e,t,n)}function parseCommandBody(t,r,i,a){let l=N.exec(r.content)?.[1]??``;l===``&&t.error(e.InvalidCommandDeclaration,`Invalid command declaration '${r.content}' - expected 'command <Name>'`,s(r));let h=[],g=[],y,x=[],S=[],C=[],w=[],E,F=null,I=null,L=null,R=null,z=null,V=[];for(let n=t.peekChild(r.indent);n!==void 0;n=t.peekChild(r.indent)){t.reader.takeSignificant();let r=o(n.content),a=u(n);if(a!==void 0&&(W.has(r)||r===`validate`&&n.content!==`validate csharp`))y=addProperty(t,h,a,l,n,y);else if(r===`returns`){let e=O.exec(n.content);e!==null&&!e[1].startsWith(`@`)&&a!==void 0?i===void 0?(h.push(a),g.push({line:n,candidate:a,response:null})):i.has(a.type.name)?g.push({line:n,candidate:null,response:D(t,n)}):y=addProperty(t,h,a,l,n,y):a===void 0?c(t,n)?t.skipBlock(n.indent):g.push({line:n,candidate:null,response:D(t,n)}):y=addProperty(t,h,a,l,n,y)}else if(r===`stream`&&P.test(n.content)&&a!==void 0&&t.streamCandidates?.hasSource(a.type.name.split(`.`)[0])===!0){let[r,i]=a.type.name.split(`.`),o=t.streamCandidates.hasPropertyType(a.type.name)&&t.streamCandidates.hasUniqueStream(r,i),c=b(t,n,a,o);(z!==null||V.length>0)&&t.error(e.InvalidCommandStream,`A command declares at most one stream route.`,s(n)),o||z!==null?V.push(c):z=c}else if(r===`runs`&&_(n))v(t,n);else if(r===`description`)F=p(t,n,F,`Command '${l}'`);else if(r===`documentation`)I=m(t,n,I,`Command '${l}'`);else if(r===`authorize`)L=d(L,f(t,n));else if(r===`validate`){let e=parseValidate(t,n,`command`);e!==void 0&&x.push(e)}else if(r===`produces`){let e=M(t,n,!0);e!==void 0&&S.push(e)}else if(r===`handler`)R=T(t,n);else if(U.has(r)){let i=j(n);i!==void 0&&w.push(i),r===`concurrency`&&E===void 0&&(E=A(t,n));let a=/^reads\s+([A-Z]\w*)(?:\s+as\s+([a-z_]\w*))?(?:\s+by\s+([a-z_]\w*))?$/.exec(n.content);a!==null&&C.push({readModel:a[1],alias:a[2]??null}),B.test(n.content)&&t.error(e.OptionalReadsNotSupported,`Optional reads are not yet supported (see #308).`,s(n)),t.skipOpaqueBlock(n.indent)}else a===void 0?(c(t,n),t.error(e.UnknownCommandDirective,`Unexpected '${n.content}' in command body`,s(n)),t.skipBlock(n.indent)):y=addProperty(t,h,a,l,n,y)}let H=new Set(g.flatMap(e=>e.candidate===null?[]:[e.candidate])),G=new Set(h.filter(e=>!H.has(e)).map(e=>e.name));g.some(e=>e.candidate!==null&&!G.has(e.candidate.type.name)&&e.candidate.type.name!==`returns`)&&G.add(`returns`);for(let e of G)a?.add(e);let K=null,q=/* @__PURE__ */ new Set;for(let n of g){let r=n.response;if(n.candidate!==null){if(!G.has(n.candidate.type.name))continue;q.add(n.candidate),r={kind:`ScalarCommandResponseSyntax`,source:{kind:`PropertyResponseSourceSyntax`,property:n.candidate.type.name,location:n.candidate.type.location},location:s(n.line)}}r!==null&&(K===null?K=r:t.error(e.InvalidCommandResponse,`A command declares at most one unconditional response.`,s(n.line)))}R!==null&&S.length>0&&t.error(e.CommandWithProducesAndHandler,`Command '${l}' cannot declare both 'produces' and 'handler'`,s(r));let J={kind:`CommandSyntax`,name:l,description:F,documentation:I,authorize:L,properties:h.filter(e=>!q.has(e)),validations:x,produces:S,handler:R,response:K,stream:z,streamCandidates:V,location:s(r)};return k.set(J,C),n.set(J,{reads:w,concurrency:E}),J}function addProperty(t,n,r,i,a,o){return l(t,r.type,a),r.isIdentifier&&o!==void 0&&(t.error(e.DuplicateCommandIdentifier,`Command '${i}' already marks '${o.name}' as identifier - only one property can be the identifier`,r.location),r={...r,isIdentifier:!1}),n.push(r),o??(r.isIdentifier?r:void 0)}function parseValidate(t,n,r){if(n.content===`validate`){let a=t.peekChild(n.indent);if(a!==void 0&&a.content.startsWith("```")){t.reader.takeSignificant();let e=C(t.valueContext,a);return e===null&&t.skipFencedBody(),{kind:`CodeValidateSyntax`,code:e,location:s(n)}}let c=[],l=[],u;for(let a=t.peekChild(n.indent);a!==void 0;a=t.peekChild(n.indent)){if(t.reader.takeSignificant(),r===`concept`){if(t.sourceOptions.numericMode===`legacy`&&a.content.startsWith("```")){t.skipFencedBody();continue}if(u!==void 0&&a.indent<=u&&(u=void 0),u!==void 0||o(a.content)===`implementation`){t.error(e.InvalidValidationRule,`Invalid validation rule '${a.content}'`,s(a)),u??=a.indent;continue}}if(o(a.content)===`require`){let e=h(r===`concept`?t.valueContext:t,a.content.substring(7).trim(),s(a)),n=null,c=`Error`,u=!1;for(let e=t.peekChild(a.indent);e!==void 0;e=t.peekChild(a.indent)){t.reader.takeSignificant();let r=I.exec(e.content);r!==null&&r.index===0?n=r[1]===void 0?r[2]:i(r[1]):o(e.content)===`severity`?(u||(c=H[e.content.substring(8).trim()]??`Error`),u=!0):t.skipOpaqueBlock(e.indent)}e!==null&&l.push({kind:`RequirementSyntax`,condition:e,message:n,severity:c,location:s(a)});continue}let n=parseValidationRule(t,r===`concept`?{...a,content:`value ${a.content}`}:a,r);n!==void 0&&c.push(n)}return{kind:`DeclarativeValidateSyntax`,rules:c,requirements:l,location:s(n)}}if(n.content===`validate csharp`){let e=C(t.valueContext,{...n,content:`csharp`});return e===null&&t.skipOpaqueBlock(n.indent),{kind:`CodeValidateSyntax`,code:e,location:s(n)}}t.error(e.InvalidValidateDeclaration,`Invalid validate declaration '${n.content}' - expected 'validate' or 'validate csharp'`,s(n)),t.skipBlock(n.indent)}function parseValidationRule(t,n,r){let i=r===`concept`?t.valueContext:t,{content:a,message:o}=splitMessage(n.content),c=splitSeverity(i,n,a);if(c===void 0)return;let l=L.exec(c.content);if(l===null){i.error(e.InvalidValidationRule,`Invalid validation rule '${n.content}'`,s(n));return}let u=parseRule(i,l[2],n);if(u===void 0)return;let d=u.kind===`Rule`?parseRuleImplementation(t,n,r===`command`):{file:null,code:null,implementation:null};return{kind:`ValidationRuleSyntax`,property:l[1],rule:u.kind,value:u.value,message:o,severity:c.severity,...d,location:s(n)}}function parseRuleImplementation(t,n,r){let i=t.peekChild(n.indent);if(i===void 0)return{file:null,code:null,implementation:null};t.reader.takeSignificant();let a=r&&o(i.content)===`implementation`,c=a?E(t,i):{file:S(i)?w(t,i):null,code:!S(i)&&x(t,i)?C(t,i):null,implementation:null};!a&&c.file===null&&c.code===null&&(t.error(e.UnknownRuleImplementationDirective,`Unexpected '${i.content}' in rule implementation - expected 'file <path>' or an inline code block`,s(i)),t.skipBlock(i.indent));for(let i=t.peekChild(n.indent);i!==void 0&&(a||r&&o(i.content)===`implementation`);i=t.peekChild(n.indent))t.reader.takeSignificant(),t.error(a&&o(i.content)===`implementation`?e.InvalidImplementationBlock:e.ConflictingImplementationSources,`A named rule has one implementation wrapper and cannot mix wrapped and direct sources.`,s(i)),x(t,i)?C(t,i):t.skipBlock(i.indent);return c}function splitMessage(e){let t=I.exec(e);if(t===null)return{content:e,message:null};let n=t[1]===void 0?t[2]:i(t[1]);return{content:e.substring(0,t.index).trimEnd(),message:n}}function splitSeverity(t,n,r){let i=F.exec(r);if(i===null)return{content:r,severity:`Error`};let a=H[i[1]];if(a===void 0)t.error(e.InvalidValidationSeverity,`Unknown validation severity '${i[1]}' - expected information, warning or error`,s(n));else return{content:r.substring(0,i.index).trimEnd(),severity:a}}function parseRule(t,n,r){if(n===`not empty`)return{kind:`NotEmpty`,value:null};let i=R.exec(n);if(i===null)t.error(e.InvalidValidationRule,`Invalid validation rule '${r.content}'`,s(r));else{if(i[1]===`rule`){let n=i[2].trim();if(!z.test(n)){t.error(e.InvalidRuleName,`Invalid rule name '${n}' in '${r.content}' - expected 'rule <Name>' with an identifier`,s(r));return}return{kind:`Rule`,value:{kind:`PathExpressionSyntax`,path:n,location:s(r)}}}return{kind:V[i[1]],value:a(i[2],s(r),t)}}}export{parseCommand,parseValidate};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{pattern as r}from"../Text/patterns.js";import{locationOf as i}from"./SourceLine.js";import{dependencySources as a}from"../Syntax/DependencySources.js";import{parseMappingSource as o}from"./ExpressionParser.js";import{firstWord as s}from"./LineText.js";import{reportInvalidModifierOrder as c,reportLegacyOptionalSuffix as l,tryParseProperty as u}from"./PropertyLineParser.js";import{combineAuthorize as d,parseAuthorize as f}from"./AuthorizeParser.js";import{parseDescription as p}from"./DescriptionParser.js";import{parseDocumentation as m}from"./DocumentationParser.js";import{parseCondition as h}from"./ConditionParser.js";import{ParserContext as g}from"./ParserContext.js";import{isReactionIdentityLine as _,misplacedReactionIdentity as v}from"./ReactionIdentityParser.js";import{sourceStreamPattern as y}from"../Text/SourceStreamNames.js";import{parseCommandStream as b}from"./EventSourceParser.js";import{isCode as x,isFile as S,parseCode as C,parseFile as w,parseHandler as T,parseImplementationWrapper as E}from"./ImplementationParser.js";import{parseCommandResponse as D,scalarResponsePattern as O}from"./CommandResponseParser.js";import{commandReadSources as k}from"./CommandReadSources.js";import{captureConcurrency as A,captureReads as j}from"./DependencySourceParser.js";import{parseProduces as M}from"./ProducesParser.js";const N=r(`^command\\s+([A-Za-z_]\\w*)$`),P=y(`^stream\\s+[A-Za-z_]\\w*\\.[A-Za-z_]\\w*$`),F=r(`\\bseverity\\s+(\\S+)$`),I=r(`\\bmessage\\s+(?:"(${t})"|(\\$strings\\.\\S*))$`),L=r(`^([\\w.]+)\\s+(.+)$`),R=r(`^(not empty|length ==|all >=|all >|matches|max|min|rule|>=|<=|==|!=|>|<)\\s*(.*)$`),z=y(`^[A-Za-z_]\\w*$`),B=r(`^reads\\s+[A-Z]\\w*\\s+optional(?:\\s|$)`),V={max:`Max`,min:`Min`,">":`GreaterThan`,">=":`GreaterThanOrEqual`,"<":`LessThan`,"<=":`LessThanOrEqual`,"==":`Equal`,"!=":`NotEqual`,"length ==":`Length`,matches:`Matches`,"all >":`AllGreaterThan`,"all >=":`AllGreaterThanOrEqual`},H={information:`Information`,warning:`Warning`,error:`Error`},U=/* @__PURE__ */ new Set([`reads`,`concurrency`]),W=/* @__PURE__ */ new Set([`description`,`documentation`,`handler`,`concurrency`]);function parseCommand(e,t){let n=/* @__PURE__ */ new Set,r=new g(e.reader.fork(),e.path,e.languages);return r.sourceOptions=e.sourceOptions,r.streamCandidates=e.streamCandidates,parseCommandBody(r,t,void 0,n),parseCommandBody(e,t,n)}function parseCommandBody(t,n,r,o){let l=N.exec(n.content)?.[1]??``;l===``&&t.error(e.InvalidCommandDeclaration,`Invalid command declaration '${n.content}' - expected 'command <Name>'`,i(n));let h=[],g=[],y,x=[],S=[],C=[],w=[],E,F=null,I=null,L=null,R=null,z=null,V=[];for(let a=t.peekChild(n.indent);a!==void 0;a=t.peekChild(n.indent)){t.reader.takeSignificant();let n=s(a.content),o=u(a);if(o!==void 0&&(W.has(n)||n===`validate`&&a.content!==`validate csharp`))y=addProperty(t,h,o,l,a,y);else if(n===`returns`){let e=O.exec(a.content);e!==null&&!e[1].startsWith(`@`)&&o!==void 0?r===void 0?(h.push(o),g.push({line:a,candidate:o,response:null})):r.has(o.type.name)?g.push({line:a,candidate:null,response:D(t,a)}):y=addProperty(t,h,o,l,a,y):o===void 0?c(t,a)?t.skipBlock(a.indent):g.push({line:a,candidate:null,response:D(t,a)}):y=addProperty(t,h,o,l,a,y)}else if(n===`stream`&&P.test(a.content)&&o!==void 0&&t.streamCandidates?.hasSource(o.type.name.split(`.`)[0])===!0){let[n,r]=o.type.name.split(`.`),s=t.streamCandidates.hasPropertyType(o.type.name)&&t.streamCandidates.hasUniqueStream(n,r),c=b(t,a,o,s);(z!==null||V.length>0)&&t.error(e.InvalidCommandStream,`A command declares at most one stream route.`,i(a)),s||z!==null?V.push(c):z=c}else if(n===`runs`&&_(a))v(t,a);else if(n===`description`)F=p(t,a,F,`Command '${l}'`);else if(n===`documentation`)I=m(t,a,I,`Command '${l}'`);else if(n===`authorize`)L=d(L,f(t,a));else if(n===`validate`){let e=parseValidate(t,a,`command`);e!==void 0&&x.push(e)}else if(n===`produces`){let e=M(t,a,!0);e!==void 0&&S.push(e)}else if(n===`handler`)R=T(t,a);else if(U.has(n)){let r=j(a);r!==void 0&&w.push(r),n===`concurrency`&&E===void 0&&(E=A(t,a));let o=/^reads\s+([A-Z]\w*)(?:\s+as\s+([a-z_]\w*))?(?:\s+by\s+([a-z_]\w*))?$/.exec(a.content);o!==null&&C.push({readModel:o[1],alias:o[2]??null}),B.test(a.content)&&t.error(e.OptionalReadsNotSupported,`Optional reads are not yet supported (see #308).`,i(a)),t.skipOpaqueBlock(a.indent)}else o===void 0?(c(t,a),t.error(e.UnknownCommandDirective,`Unexpected '${a.content}' in command body`,i(a)),t.skipBlock(a.indent)):y=addProperty(t,h,o,l,a,y)}let H=new Set(g.flatMap(e=>e.candidate===null?[]:[e.candidate])),G=new Set(h.filter(e=>!H.has(e)).map(e=>e.name));g.some(e=>e.candidate!==null&&!G.has(e.candidate.type.name)&&e.candidate.type.name!==`returns`)&&G.add(`returns`);for(let e of G)o?.add(e);let K=null,q=/* @__PURE__ */ new Set;for(let n of g){let r=n.response;if(n.candidate!==null){if(!G.has(n.candidate.type.name))continue;q.add(n.candidate),r={kind:`ScalarCommandResponseSyntax`,source:{kind:`PropertyResponseSourceSyntax`,property:n.candidate.type.name,location:n.candidate.type.location},location:i(n.line)}}r!==null&&(K===null?K=r:t.error(e.InvalidCommandResponse,`A command declares at most one unconditional response.`,i(n.line)))}R!==null&&S.length>0&&t.error(e.CommandWithProducesAndHandler,`Command '${l}' cannot declare both 'produces' and 'handler'`,i(n));let J={kind:`CommandSyntax`,name:l,description:F,documentation:I,authorize:L,properties:h.filter(e=>!q.has(e)),validations:x,produces:S,handler:R,response:K,stream:z,streamCandidates:V,location:i(n)};return k.set(J,C),a.set(J,{reads:w,concurrency:E}),J}function addProperty(t,n,r,i,a,o){return l(t,r.type,a),r.isIdentifier&&o!==void 0&&(t.error(e.DuplicateCommandIdentifier,`Command '${i}' already marks '${o.name}' as identifier - only one property can be the identifier`,r.location),r={...r,isIdentifier:!1}),n.push(r),o??(r.isIdentifier?r:void 0)}function parseValidate(t,r,a){if(r.content===`validate`){let o=t.peekChild(r.indent);if(o!==void 0&&o.content.startsWith("```")){t.reader.takeSignificant();let e=C(t.valueContext,o);return e===null&&t.skipFencedBody(),{kind:`CodeValidateSyntax`,code:e,location:i(r)}}let c=[],l=[],u;for(let o=t.peekChild(r.indent);o!==void 0;o=t.peekChild(r.indent)){if(t.reader.takeSignificant(),a===`concept`){if(t.sourceOptions.numericMode===`legacy`&&o.content.startsWith("```")){t.skipFencedBody();continue}if(u!==void 0&&o.indent<=u&&(u=void 0),u!==void 0||s(o.content)===`implementation`){t.error(e.InvalidValidationRule,`Invalid validation rule '${o.content}'`,i(o)),u??=o.indent;continue}}if(s(o.content)===`require`){let e=h(a===`concept`?t.valueContext:t,o.content.substring(7).trim(),i(o)),r=null,c=`Error`,u=!1;for(let e=t.peekChild(o.indent);e!==void 0;e=t.peekChild(o.indent)){t.reader.takeSignificant();let i=I.exec(e.content);i!==null&&i.index===0?r=i[1]===void 0?i[2]:n(i[1]):s(e.content)===`severity`?(u||(c=H[e.content.substring(8).trim()]??`Error`),u=!0):t.skipOpaqueBlock(e.indent)}e!==null&&l.push({kind:`RequirementSyntax`,condition:e,message:r,severity:c,location:i(o)});continue}let r=parseValidationRule(t,a===`concept`?{...o,content:`value ${o.content}`}:o,a);r!==void 0&&c.push(r)}return{kind:`DeclarativeValidateSyntax`,rules:c,requirements:l,location:i(r)}}if(r.content===`validate csharp`){let e=C(t.valueContext,{...r,content:`csharp`});return e===null&&t.skipOpaqueBlock(r.indent),{kind:`CodeValidateSyntax`,code:e,location:i(r)}}t.error(e.InvalidValidateDeclaration,`Invalid validate declaration '${r.content}' - expected 'validate' or 'validate csharp'`,i(r)),t.skipBlock(r.indent)}function parseValidationRule(t,n,r){let a=r===`concept`?t.valueContext:t,{content:o,message:s}=splitMessage(n.content),c=splitSeverity(a,n,o);if(c===void 0)return;let l=L.exec(c.content);if(l===null){a.error(e.InvalidValidationRule,`Invalid validation rule '${n.content}'`,i(n));return}let u=parseRule(a,l[2],n);if(u===void 0)return;let d=u.kind===`Rule`?parseRuleImplementation(t,n,r===`command`):{file:null,code:null,implementation:null};return{kind:`ValidationRuleSyntax`,property:l[1],rule:u.kind,value:u.value,message:s,severity:c.severity,...d,location:i(n)}}function parseRuleImplementation(t,n,r){let a=t.peekChild(n.indent);if(a===void 0)return{file:null,code:null,implementation:null};t.reader.takeSignificant();let o=r&&s(a.content)===`implementation`,c=o?E(t,a):{file:S(a)?w(t,a):null,code:!S(a)&&x(t,a)?C(t,a):null,implementation:null};!o&&c.file===null&&c.code===null&&(t.error(e.UnknownRuleImplementationDirective,`Unexpected '${a.content}' in rule implementation - expected 'file <path>' or an inline code block`,i(a)),t.skipBlock(a.indent));for(let a=t.peekChild(n.indent);a!==void 0&&(o||r&&s(a.content)===`implementation`);a=t.peekChild(n.indent))t.reader.takeSignificant(),t.error(o&&s(a.content)===`implementation`?e.InvalidImplementationBlock:e.ConflictingImplementationSources,`A named rule has one implementation wrapper and cannot mix wrapped and direct sources.`,i(a)),x(t,a)?C(t,a):t.skipBlock(a.indent);return c}function splitMessage(e){let t=I.exec(e);if(t===null)return{content:e,message:null};let r=t[1]===void 0?t[2]:n(t[1]);return{content:e.substring(0,t.index).trimEnd(),message:r}}function splitSeverity(t,n,r){let a=F.exec(r);if(a===null)return{content:r,severity:`Error`};let o=H[a[1]];if(o===void 0)t.error(e.InvalidValidationSeverity,`Unknown validation severity '${a[1]}' - expected information, warning or error`,i(n));else return{content:r.substring(0,a.index).trimEnd(),severity:o}}function parseRule(t,n,r){if(n===`not empty`)return{kind:`NotEmpty`,value:null};let a=R.exec(n);if(a===null)t.error(e.InvalidValidationRule,`Invalid validation rule '${r.content}'`,i(r));else{if(a[1]===`rule`){let n=a[2].trim();if(!z.test(n)){t.error(e.InvalidRuleName,`Invalid rule name '${n}' in '${r.content}' - expected 'rule <Name>' with an identifier`,i(r));return}return{kind:`Rule`,value:{kind:`PathExpressionSyntax`,path:n,location:i(r)}}}return{kind:V[a[1]],value:o(a[2],i(r),t)}}}export{parseCommand,parseValidate};
2
2
  //# sourceMappingURL=CommandParser.js.map
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{pattern as t}from"../Text/patterns.js";import{unescapeIdentifier as n}from"./LineText.js";import{locationOf as r}from"./SourceLine.js";import{parseTypeRef as i,reportLegacyOptionalSuffix as a,tryParseProperty as o}from"./PropertyLineParser.js";const s=t(`^returns\\s+(@?[A-Za-z_]\\w*)$`),c=t(`^(@?[a-z_]\\w*)(?:\\s+([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?))?\\s*=(?!=|>)\\s*(@?[a-z_]\\w*)$`);function parseCommandResponse(t,l){let u=r(l);if(l.content!==`returns`){let i=s.exec(l.content);if(i===null)return t.error(e.InvalidCommandResponse,`Expected 'returns <property>' or an unconditional 'returns' block.`,u),t.skipBlock(l.indent),null;let a=t.peekChild(l.indent);a!==void 0&&(t.error(e.InvalidCommandResponse,`A scalar response cannot have child directives.`,r(a)),t.skipBlock(l.indent));let o=i.index+i[0].length-i[1].length;return{kind:`ScalarCommandResponseSyntax`,source:{kind:`PropertyResponseSourceSyntax`,property:n(i[1]),location:{...u,column:u.column+o}},location:u}}let d=[];for(let s=t.peekChild(l.indent);s!==void 0;s=t.peekChild(l.indent)){t.reader.takeSignificant();let l=c.exec(s.content);if(l===null){o({...s,content:s.content.split(`=`,1)[0].trimEnd()})?.isSubject?t.error(e.InvalidSubjectOwner,`The subject modifier is only valid on event properties, not response fields (decision 0008: one data subject per event).`,r(s)):t.error(e.InvalidCommandResponse,`Expected '<field> [<Type>] = <property>' in a response block.`,r(s)),t.skipBlock(s.indent);continue}let u=r(s),f=l[2]===void 0?null:i(l[2],{...u,column:u.column+s.content.indexOf(l[2],l[1].length)});f!==null&&a(t,f,s),d.push({kind:`ResponseFieldSyntax`,name:n(l[1]),type:f,source:{kind:`PropertyResponseSourceSyntax`,property:n(l[3]),location:{...u,column:u.column+s.content.lastIndexOf(l[3])}},location:u});let p=t.peekChild(s.indent);p!==void 0&&(t.error(e.InvalidCommandResponse,`A response field cannot have child directives.`,r(p)),t.skipBlock(s.indent))}return{kind:`RecordCommandResponseSyntax`,fields:d,location:u}}export{parseCommandResponse,s as scalarResponsePattern};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{pattern as t}from"../Text/patterns.js";import{locationOf as n}from"./SourceLine.js";import{unescapeIdentifier as r}from"./LineText.js";import{parseTypeRef as i,reportLegacyOptionalSuffix as a,tryParseProperty as o}from"./PropertyLineParser.js";const s=t(`^returns\\s+(@?[A-Za-z_]\\w*)$`),c=t(`^(@?[a-z_]\\w*)(?:\\s+([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?))?\\s*=(?!=|>)\\s*(@?[a-z_]\\w*)$`);function parseCommandResponse(t,l){let u=n(l);if(l.content!==`returns`){let i=s.exec(l.content);if(i===null)return t.error(e.InvalidCommandResponse,`Expected 'returns <property>' or an unconditional 'returns' block.`,u),t.skipBlock(l.indent),null;let a=t.peekChild(l.indent);a!==void 0&&(t.error(e.InvalidCommandResponse,`A scalar response cannot have child directives.`,n(a)),t.skipBlock(l.indent));let o=i.index+i[0].length-i[1].length;return{kind:`ScalarCommandResponseSyntax`,source:{kind:`PropertyResponseSourceSyntax`,property:r(i[1]),location:{...u,column:u.column+o}},location:u}}let d=[];for(let s=t.peekChild(l.indent);s!==void 0;s=t.peekChild(l.indent)){t.reader.takeSignificant();let l=c.exec(s.content);if(l===null){o({...s,content:s.content.split(`=`,1)[0].trimEnd()})?.isSubject?t.error(e.InvalidSubjectOwner,`The subject modifier is only valid on event properties, not response fields (decision 0008: one data subject per event).`,n(s)):t.error(e.InvalidCommandResponse,`Expected '<field> [<Type>] = <property>' in a response block.`,n(s)),t.skipBlock(s.indent);continue}let u=n(s),f=l[2]===void 0?null:i(l[2],{...u,column:u.column+s.content.indexOf(l[2],l[1].length)});f!==null&&a(t,f,s),d.push({kind:`ResponseFieldSyntax`,name:r(l[1]),type:f,source:{kind:`PropertyResponseSourceSyntax`,property:r(l[3]),location:{...u,column:u.column+s.content.lastIndexOf(l[3])}},location:u});let p=t.peekChild(s.indent);p!==void 0&&(t.error(e.InvalidCommandResponse,`A response field cannot have child directives.`,n(p)),t.skipBlock(s.indent))}return{kind:`RecordCommandResponseSyntax`,fields:d,location:u}}export{parseCommandResponse,s as scalarResponsePattern};
2
2
  //# sourceMappingURL=CommandResponseParser.js.map
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{pattern as t}from"../Text/patterns.js";import{stringBodyPattern as n,unescapeString as r}from"../Text/StringLiteral.js";import{parseMappingSource as i}from"./ExpressionParser.js";import{locationOf as a}from"./SourceLine.js";const o=`(?:([A-Za-z_]\\w*)|"(${n})")\\.(\\w+(?:\\.\\w+)*)`,s=t(`^exposure\\s+for\\s+([A-Za-z_]\\w*)$`),c=t(`^instance\\s+([A-Za-z_]\\w*)$`),l=t(`^property\\s+${o}(?:\\s+label\\s+"(${n})")?(?:\\s+operations\\s+([\\w-]+(?:\\s*,\\s*[\\w-]+)*))?(?:\\s+fields\\s+(\\w+(?:\\s*,\\s*\\w+)*))?(?:\\s+reexposes\\s+([A-Za-z_]\\w*))?$`),u=t(`^set\\s+${o}\\s*=\\s*(.+)$`),d=t(`^items\\s+${o}$`),f=t(`^item\\s+(?:([A-Za-z_][\\w-]*)|"(${n})")$`),p=t(`^([A-Za-z_]\\w*)\\s*=\\s*(.+)$`),m=[`add`,`remove`,`reorder`,`edit-fields`],reference=(e,t)=>e[t]??r(e[t+1]),list=e=>e.trim()===`none`?[]:e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);function parseExposure(t,n){let r=s.exec(n.content);r===null&&t.error(e.InvalidExposureDeclaration,`Invalid exposure declaration '${n.content}' - expected 'exposure for <Owner>'`,a(n));let i=[];for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent)){t.reader.takeSignificant();let n=parseExposedProperty(t,e);n!==void 0&&i.push(n)}return{kind:`ExposureSyntax`,owner:r?.[1]??n.content,properties:i,location:a(n)}}function parseInstance(t,n){let r=c.exec(n.content);r===null&&t.error(e.InvalidInstanceContribution,`Invalid instance declaration '${n.content}' - expected 'instance <Screen or Template>'`,a(n));let i=[];for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent)){t.reader.takeSignificant();let n=parseContribution(t,e);n!==void 0&&i.push(n)}return{kind:`InstanceContributionsSyntax`,instance:r?.[1]??n.content,contributions:i,location:a(n)}}function parseExposedProperty(t,n){let i=l.exec(n.content);if(i===null){t.error(e.InvalidExposureDeclaration,`Invalid exposed property '${n.content}' - expected 'property <component>.<path> [label "<text>"] [operations <add|remove|reorder|edit-fields>, ...] [fields <field>, ...] [reexposes <Owner>]'`,a(n));return}let o=i[5]===void 0?[]:list(i[5]),s=o.find(e=>!m.includes(e));if(s!==void 0)t.error(e.InvalidExposureDeclaration,`Unknown collection operation '${s}' - expected add, remove, reorder, edit-fields or none`,a(n));else return{kind:`ExposedPropertySyntax`,component:reference(i,1),path:i[3],label:i[4]===void 0?null:r(i[4]),isCollection:i[5]!==void 0,operations:o,restrictsFields:i[6]!==void 0,editableFields:i[6]===void 0?[]:list(i[6]),reExposes:i[7]??null,location:a(n)}}function parseContribution(t,n){let r=u.exec(n.content);if(r!==null)return t.skipBlock(n.indent),{kind:`InstanceContributionSyntax`,component:reference(r,1),path:r[3],value:i(r[4],a(n),t),items:[],location:a(n)};let o=d.exec(n.content);if(o!==null){let e=[];for(let r=t.peekChild(n.indent);r!==void 0;r=t.peekChild(n.indent)){t.reader.takeSignificant();let n=parseItem(t,r);n!==void 0&&e.push(n)}return{kind:`InstanceContributionSyntax`,component:reference(o,1),path:o[3],value:null,items:e,location:a(n)}}t.error(e.InvalidInstanceContribution,`Invalid instance contribution '${n.content}' - expected 'set <component>.<path> = <value>' or 'items <component>.<path>'`,a(n)),t.skipBlock(n.indent)}function parseItem(t,n){let r=f.exec(n.content);if(r===null){t.error(e.InvalidInstanceContribution,`Invalid contributed item '${n.content}' - expected 'item <id>'`,a(n)),t.skipBlock(n.indent);return}let o=[];for(let r=t.peekChild(n.indent);r!==void 0;r=t.peekChild(n.indent)){t.reader.takeSignificant();let n=p.exec(r.content);n===null?(t.error(e.InvalidInstanceContribution,`Invalid item value '${r.content}' - expected '<field> = <value>'`,a(r)),t.skipBlock(r.indent)):o.push({kind:`ContributedItemValueSyntax`,field:n[1],value:i(n[2],a(r),t),location:a(r)})}return{kind:`ContributedItemSyntax`,id:reference(r,1),values:o,location:a(n)}}export{parseExposure,parseInstance};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{pattern as r}from"../Text/patterns.js";import{locationOf as i}from"./SourceLine.js";import{parseMappingSource as a}from"./ExpressionParser.js";const o=`(?:([A-Za-z_]\\w*)|"(${t})")\\.(\\w+(?:\\.\\w+)*)`,s=r(`^exposure\\s+for\\s+([A-Za-z_]\\w*)$`),c=r(`^instance\\s+([A-Za-z_]\\w*)$`),l=r(`^property\\s+${o}(?:\\s+label\\s+"(${t})")?(?:\\s+operations\\s+([\\w-]+(?:\\s*,\\s*[\\w-]+)*))?(?:\\s+fields\\s+(\\w+(?:\\s*,\\s*\\w+)*))?(?:\\s+reexposes\\s+([A-Za-z_]\\w*))?$`),u=r(`^set\\s+${o}\\s*=\\s*(.+)$`),d=r(`^items\\s+${o}$`),f=r(`^item\\s+(?:([A-Za-z_][\\w-]*)|"(${t})")$`),p=r(`^([A-Za-z_]\\w*)\\s*=\\s*(.+)$`),m=[`add`,`remove`,`reorder`,`edit-fields`],reference=(e,t)=>e[t]??n(e[t+1]),list=e=>e.trim()===`none`?[]:e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);function parseExposure(t,n){let r=s.exec(n.content);r===null&&t.error(e.InvalidExposureDeclaration,`Invalid exposure declaration '${n.content}' - expected 'exposure for <Owner>'`,i(n));let a=[];for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent)){t.reader.takeSignificant();let n=parseExposedProperty(t,e);n!==void 0&&a.push(n)}return{kind:`ExposureSyntax`,owner:r?.[1]??n.content,properties:a,location:i(n)}}function parseInstance(t,n){let r=c.exec(n.content);r===null&&t.error(e.InvalidInstanceContribution,`Invalid instance declaration '${n.content}' - expected 'instance <Screen or Template>'`,i(n));let a=[];for(let e=t.peekChild(n.indent);e!==void 0;e=t.peekChild(n.indent)){t.reader.takeSignificant();let n=parseContribution(t,e);n!==void 0&&a.push(n)}return{kind:`InstanceContributionsSyntax`,instance:r?.[1]??n.content,contributions:a,location:i(n)}}function parseExposedProperty(t,r){let a=l.exec(r.content);if(a===null){t.error(e.InvalidExposureDeclaration,`Invalid exposed property '${r.content}' - expected 'property <component>.<path> [label "<text>"] [operations <add|remove|reorder|edit-fields>, ...] [fields <field>, ...] [reexposes <Owner>]'`,i(r));return}let o=a[5]===void 0?[]:list(a[5]),s=o.find(e=>!m.includes(e));if(s!==void 0)t.error(e.InvalidExposureDeclaration,`Unknown collection operation '${s}' - expected add, remove, reorder, edit-fields or none`,i(r));else return{kind:`ExposedPropertySyntax`,component:reference(a,1),path:a[3],label:a[4]===void 0?null:n(a[4]),isCollection:a[5]!==void 0,operations:o,restrictsFields:a[6]!==void 0,editableFields:a[6]===void 0?[]:list(a[6]),reExposes:a[7]??null,location:i(r)}}function parseContribution(t,n){let r=u.exec(n.content);if(r!==null)return t.skipBlock(n.indent),{kind:`InstanceContributionSyntax`,component:reference(r,1),path:r[3],value:a(r[4],i(n),t),items:[],location:i(n)};let o=d.exec(n.content);if(o!==null){let e=[];for(let r=t.peekChild(n.indent);r!==void 0;r=t.peekChild(n.indent)){t.reader.takeSignificant();let n=parseItem(t,r);n!==void 0&&e.push(n)}return{kind:`InstanceContributionSyntax`,component:reference(o,1),path:o[3],value:null,items:e,location:i(n)}}t.error(e.InvalidInstanceContribution,`Invalid instance contribution '${n.content}' - expected 'set <component>.<path> = <value>' or 'items <component>.<path>'`,i(n)),t.skipBlock(n.indent)}function parseItem(t,n){let r=f.exec(n.content);if(r===null){t.error(e.InvalidInstanceContribution,`Invalid contributed item '${n.content}' - expected 'item <id>'`,i(n)),t.skipBlock(n.indent);return}let o=[];for(let r=t.peekChild(n.indent);r!==void 0;r=t.peekChild(n.indent)){t.reader.takeSignificant();let n=p.exec(r.content);n===null?(t.error(e.InvalidInstanceContribution,`Invalid item value '${r.content}' - expected '<field> = <value>'`,i(r)),t.skipBlock(r.indent)):o.push({kind:`ContributedItemValueSyntax`,field:n[1],value:a(n[2],i(r),t),location:i(r)})}return{kind:`ContributedItemSyntax`,id:reference(r,1),values:o,location:i(n)}}export{parseExposure,parseInstance};
2
2
  //# sourceMappingURL=CompositionParser.js.map
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{pattern as t}from"../Text/patterns.js";import{stringBodyPattern as n,unescapeString as r}from"../Text/StringLiteral.js";import{locationOf as i}from"./SourceLine.js";const a=[`racialOrEthnicOrigin`,`politicalOpinions`,`religiousOrPhilosophicalBeliefs`,`tradeUnionMembership`,`genetic`,`biometric`,`health`,`sexLifeOrSexualOrientation`],o=t(`^(@?[a-z_]\\w*)\\s+(reason|scope|special|criminal)(?:\\s+(.*))?$`),s=t(`^"(${n})"$`);function complianceWireName(e){let t=e.replace(/^@/,``);return t===`personal`?`pii`:t===`secret`?`sensitive`:t}function canonicalComplianceName(e){let t=complianceWireName(e);return t===`sensitive`?`secret`:t}function parseComplianceMarkers(t,n,r){let a=r.trim().split(/\s+/).filter(e=>e.length>0);return reportLegacy(t,n,a),a.map(r=>{let a=complianceWireName(r);return(![`pii`,`sensitive`].includes(a)||r===`@personal`||r===`@secret`)&&t.error(e.UnknownComplianceMarker,`Unknown concept marker '${r}' - expected pii, personal or secret`,i(n)),{kind:`ConceptAttributeSyntax`,name:a,reason:null,scope:null,specialCategory:null,criminal:!1,location:i(n)}})}function parseComplianceDirective(t,n,c,l){let u=o.exec(n.content);if(u===null)return!1;let[,d,f]=u,p=u[3]??``,m=complianceWireName(d),h=canonicalComplianceName(d);if(reportLegacy(t,n,[d]),![`pii`,`sensitive`].includes(m)||d===`@personal`||d===`@secret`)return t.error(e.UnknownComplianceMarker,`Unknown concept marker '${d}' - expected pii, personal or secret`,i(n)),!0;let g=l.findIndex(e=>e.name===m);if(g<0)return t.error(e.AttributeReasonWithoutAttribute,`Concept '${c}' declares '${h} ${f}' without the marker - write 'concept ${c} : <Type> ${h}'`,i(n)),!0;let _=l[g];switch(f){case`reason`:{let a=s.exec(p);return a===null?(t.error(e.UnknownConceptDirective,`Invalid '${h} reason' - expected '${h} reason "<text>"'`,i(n)),!0):_.reason===null?(l[g]={..._,reason:r(a[1])},!0):(t.error(e.DuplicateAttributeReason,`Concept '${c}' already declares a reason for '${h}' - at most one is allowed`,i(n)),!0)}case`scope`:return m!==`sensitive`||![`subject`,`namespace`,`global`].includes(p)?(t.error(e.InvalidSecretScope,`Invalid '${h} scope ${p}' - scope belongs to secret and must be subject, namespace or global`,i(n)),!0):_.scope==null?(l[g]={..._,scope:p},l.some(e=>e.name===`pii`)&&t.warning(e.SecretScopeIgnoredForPii,`Concept '${c}' is pii secret - secret scope is ignored because only Chronicle [PII] renders`,i(n)),!0):(t.error(e.DuplicateSecretScope,`Concept '${c}' already declares secret scope - at most one is allowed`,i(n)),!0);case`special`:case`criminal`:return m!==`pii`||(f===`special`?!a.includes(p):p.length>0)?(t.error(e.InvalidPersonalDataQualifier,`Invalid '${h} ${f}${p.length>0?` ${p}`:``}' - expected 'pii criminal' or 'pii special <category>' with category ${a.join(`, `)}`,i(n)),!0):f===`special`&&_.specialCategory!=null?(t.error(e.DuplicateSpecialCategory,`Concept '${c}' already declares pii special - at most one is allowed`,i(n)),!0):(l[g]=f===`special`?{..._,specialCategory:p}:{..._,criminal:!0},!0);default:return!1}}function reportLegacy(t,n,r){r.some(e=>[`@pii`,`sensitive`,`@sensitive`].includes(e))&&t.information(e.LegacyComplianceMarker,`Legacy compliance spelling - use bare pii for personal data and secret for operational secrets; reason text is preserved`,i(n))}export{canonicalComplianceName,complianceWireName,parseComplianceDirective,parseComplianceMarkers,a as specialCategories};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{pattern as r}from"../Text/patterns.js";import{locationOf as i}from"./SourceLine.js";const a=[`racialOrEthnicOrigin`,`politicalOpinions`,`religiousOrPhilosophicalBeliefs`,`tradeUnionMembership`,`genetic`,`biometric`,`health`,`sexLifeOrSexualOrientation`],o=r(`^(@?[a-z_]\\w*)\\s+(reason|scope|special|criminal)(?:\\s+(.*))?$`),s=r(`^"(${t})"$`);function complianceWireName(e){let t=e.replace(/^@/,``);return t===`personal`?`pii`:t===`secret`?`sensitive`:t}function canonicalComplianceName(e){let t=complianceWireName(e);return t===`sensitive`?`secret`:t}function parseComplianceMarkers(t,n,r,a){let o=a.trim().split(/\s+/).filter(e=>e.length>0);reportLegacy(t,n,o);let s=[],c=/* @__PURE__ */ new Map,l=!1;for(let a of o){let o=complianceWireName(a);(![`pii`,`sensitive`].includes(o)||a===`@personal`||a===`@secret`)&&t.error(e.UnknownComplianceMarker,`Unknown concept marker '${a}' - expected pii, personal or secret`,i(n));let u=c.get(o);if(u!==void 0){if(!l){let o=canonicalComplianceName(a),s=u===a?``:` - '${a===o?u:a}' is the same marker as '${o}'`;t.warning(e.DuplicateComplianceMarker,`Concept '${r}' repeats the '${o}' marker${s} - remove the duplicate`,i(n)),l=!0}}else c.set(o,a),s.push({kind:`ConceptAttributeSyntax`,name:o,reason:null,scope:null,specialCategory:null,criminal:!1,location:i(n)})}return s}function parseComplianceDirective(t,r,c,l){let u=o.exec(r.content);if(u===null)return!1;let[,d,f]=u,p=u[3]??``,m=complianceWireName(d),h=canonicalComplianceName(d);if(reportLegacy(t,r,[d]),![`pii`,`sensitive`].includes(m)||d===`@personal`||d===`@secret`)return t.error(e.UnknownComplianceMarker,`Unknown concept marker '${d}' - expected pii, personal or secret`,i(r)),!0;let g=l.findIndex(e=>e.name===m);if(g<0)return t.error(e.AttributeReasonWithoutAttribute,`Concept '${c}' declares '${h} ${f}' without the marker - write 'concept ${c} : <Type> ${h}'`,i(r)),!0;let _=l[g];switch(f){case`reason`:{let a=s.exec(p);return a===null?(t.error(e.UnknownConceptDirective,`Invalid '${h} reason' - expected '${h} reason "<text>"'`,i(r)),!0):_.reason===null?(l[g]={..._,reason:n(a[1])},!0):(t.error(e.DuplicateAttributeReason,`Concept '${c}' already declares a reason for '${h}' - at most one is allowed`,i(r)),!0)}case`scope`:return m!==`sensitive`||![`subject`,`namespace`,`global`].includes(p)?(t.error(e.InvalidSecretScope,`Invalid '${h} scope ${p}' - scope belongs to secret and must be subject, namespace or global`,i(r)),!0):_.scope==null?(l[g]={..._,scope:p},l.some(e=>e.name===`pii`)&&t.warning(e.SecretScopeIgnoredForPii,`Concept '${c}' is pii secret - secret scope is ignored because only Chronicle [PII] renders`,i(r)),!0):(t.error(e.DuplicateSecretScope,`Concept '${c}' already declares secret scope - at most one is allowed`,i(r)),!0);case`special`:case`criminal`:return m!==`pii`||(f===`special`?!a.includes(p):p.length>0)?(t.error(e.InvalidPersonalDataQualifier,`Invalid '${h} ${f}${p.length>0?` ${p}`:``}' - expected 'pii criminal' or 'pii special <category>' with category ${a.join(`, `)}`,i(r)),!0):f===`special`&&_.specialCategory!=null?(t.error(e.DuplicateSpecialCategory,`Concept '${c}' already declares pii special - at most one is allowed`,i(r)),!0):(l[g]=f===`special`?{..._,specialCategory:p}:{..._,criminal:!0},!0);default:return!1}}function reportLegacy(t,n,r){r.some(e=>[`@pii`,`sensitive`,`@sensitive`].includes(e))&&t.information(e.LegacyComplianceMarker,`Legacy compliance spelling - use bare pii for personal data and secret for operational secrets; reason text is preserved`,i(n))}export{canonicalComplianceName,complianceWireName,parseComplianceDirective,parseComplianceMarkers,a as specialCategories};
2
2
  //# sourceMappingURL=ConceptComplianceParser.js.map