@compas-oscd/open-scd 0.34.23 → 0.34.25

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.
@@ -2,8 +2,8 @@ import { __decorate } from "tslib";
2
2
  import { newEditEvent, newEditEventV2 } from '@openscd/core';
3
3
  import { property, LitElement, customElement, html, } from 'lit-element';
4
4
  import { get } from 'lit-translate';
5
- import { newLogEvent } from '@openscd/core/foundation/deprecated/history.js';
6
- import { newValidateEvent } from '@openscd/core/foundation/deprecated/validation.js';
5
+ import { newLogEvent } from '@openscd/core/foundation/deprecated/history';
6
+ import { newValidateEvent } from '@openscd/core/foundation/deprecated/validation';
7
7
  import { isComplex, isInsert, isRemove, isUpdate, } from '@openscd/core';
8
8
  import { convertEditActiontoV1 } from './editor/edit-action-to-v1-converter.js';
9
9
  import { convertEditV1toV2 } from './editor/edit-v1-to-v2-converter.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../src/addons/Editor.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,YAAY,EACZ,cAAc,EAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,aAAa,EAEb,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAOpC,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAGrF,OAAO,EAGL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGjE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QACL,qCAAqC;QAErC,QAAG,GAAuB,IAAI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C;CACF,CAAA;AAvFC;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;uCACA;AAEH;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AAEX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAoB;AAK/C;IAHC,QAAQ,CAAC;QACR,IAAI,EAAE,MAAM;KACb,CAAC;wCACiB;AAdR,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA0FtB;SA1FY,UAAU;AA4FvB,SAAS,qBAAqB,CAAC,KAA2B;IACxD,MAAM,WAAW,GAAG,KAAK,CAAC,MAAc,CAAC;IACzC,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC3G,CAAC;AAED,SAAS,qCAAqC,CAAC,KAA2B;IACxE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAc,CAAC;IACzC,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import {\n EditEventV2,\n OpenEvent,\n newEditEvent,\n newEditEventV2,\n XMLEditor\n} from '@openscd/core';\nimport {\n property,\n LitElement,\n customElement,\n TemplateResult,\n html,\n} from 'lit-element';\nimport { get } from 'lit-translate';\n\nimport {\n EditorAction,\n EditorActionEvent,\n} from '@openscd/core/foundation/deprecated/editor.js';\n\nimport { newLogEvent } from '@openscd/core/foundation/deprecated/history.js';\nimport { newValidateEvent } from '@openscd/core/foundation/deprecated/validation.js';\nimport { OpenDocEvent } from '@openscd/core/foundation/deprecated/open-event.js';\n\nimport {\n Edit,\n EditEvent,\n isComplex,\n isInsert,\n isRemove,\n isUpdate,\n} from '@openscd/core';\n\nimport { convertEditActiontoV1 } from './editor/edit-action-to-v1-converter.js';\nimport { convertEditV1toV2 } from './editor/edit-v1-to-v2-converter.js';\n\n@customElement('oscd-editor')\nexport class OscdEditor extends LitElement {\n /** The `XMLDocument` to be edited */\n @property({ attribute: false })\n doc: XMLDocument | null = null;\n /** The name of the current [[`doc`]] */\n @property({ type: String }) docName = '';\n /** The UUID of the current [[`doc`]] */\n @property({ type: String }) docId = '';\n /** XML Editor to apply changes to the scd */\n @property({ type: Object }) editor!: XMLEditor;\n\n @property({\n type: Object,\n })\n host!: HTMLElement;\n\n private onAction(event: EditorActionEvent<EditorAction>) {\n const edit = convertEditActiontoV1(event.detail.action);\n const editV2 = convertEditV1toV2(edit);\n\n this.host.dispatchEvent(newEditEventV2(editV2));\n }\n\n handleEditEvent(event: EditEvent) {\n /**\n * This is a compatibility fix for plugins based on open energy tools edit events\n * because their edit event look slightly different\n * see https://github.com/OpenEnergyTools/open-scd-core/blob/main/foundation/edit-event-v1.ts for details\n */\n if (isOpenEnergyEditEvent(event)) {\n event = convertOpenEnergyEditEventToEditEvent(event);\n }\n\n const edit = event.detail.edit;\n const editV2 = convertEditV1toV2(edit);\n\n this.host.dispatchEvent(newEditEventV2(editV2));\n }\n\n /**\n *\n * @deprecated [Move to handleOpenDoc instead]\n */\n private async onOpenDoc(event: OpenDocEvent) {\n this.doc = event.detail.doc;\n this.docName = event.detail.docName;\n this.docId = event.detail.docId ?? '';\n\n await this.updateComplete;\n\n this.dispatchEvent(newValidateEvent());\n\n this.dispatchEvent(\n newLogEvent({\n kind: 'info',\n title: get('openSCD.loaded', { name: this.docName }),\n })\n );\n }\n\n handleOpenDoc({ detail: { docName, doc } }: OpenEvent) {\n this.doc = doc;\n this.docName = docName;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n // Deprecated editor action API, use 'oscd-edit' instead.\n this.host.addEventListener('editor-action', this.onAction.bind(this));\n // Deprecated edit event API, use 'oscd-edit-v2' instead.\n this.host.addEventListener('oscd-edit', event => this.handleEditEvent(event));\n\n this.host.addEventListener('oscd-edit-v2', event => this.handleEditEventV2(event));\n this.host.addEventListener('open-doc', this.onOpenDoc);\n this.host.addEventListener('oscd-open', this.handleOpenDoc);\n }\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n\n async handleEditEventV2(event: EditEventV2) {\n const { edit, title, squash } = event.detail;\n\n this.editor.commit(edit, { title, squash });\n\n await this.updateComplete;\n this.dispatchEvent(newValidateEvent());\n }\n}\n\nfunction isOpenEnergyEditEvent(event: CustomEvent<unknown>): boolean {\n const eventDetail = event.detail as Edit;\n return isComplex(eventDetail) || isInsert(eventDetail) || isUpdate(eventDetail) || isRemove(eventDetail);\n}\n\nfunction convertOpenEnergyEditEventToEditEvent(event: CustomEvent<unknown>): EditEvent {\n const eventDetail = event.detail as Edit;\n return newEditEvent(eventDetail);\n}\n"]}
1
+ {"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../src/addons/Editor.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,YAAY,EACZ,cAAc,EAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,aAAa,EAEb,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAOpC,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGlF,OAAO,EAGL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGjE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QACL,qCAAqC;QAErC,QAAG,GAAuB,IAAI,CAAC;QAC/B,wCAAwC;QACZ,YAAO,GAAG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AAE,SAAS,EAAE,KAAK,EAAE,CAAC;uCACA;AAEH;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AAEX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAoB;AAK/C;IAHC,QAAQ,CAAC;QACR,IAAI,EAAE,MAAM;KACb,CAAC;wCACiB;AAdR,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA0FtB;SA1FY,UAAU;AA4FvB,SAAS,qBAAqB,CAAC,KAA2B;IACxD,MAAM,WAAW,GAAG,KAAK,CAAC,MAAc,CAAC;IACzC,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC3G,CAAC;AAED,SAAS,qCAAqC,CAAC,KAA2B;IACxE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAc,CAAC;IACzC,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import {\n EditEventV2,\n OpenEvent,\n newEditEvent,\n newEditEventV2,\n XMLEditor\n} from '@openscd/core';\nimport {\n property,\n LitElement,\n customElement,\n TemplateResult,\n html,\n} from 'lit-element';\nimport { get } from 'lit-translate';\n\nimport {\n EditorAction,\n EditorActionEvent,\n} from '@openscd/core/foundation/deprecated/editor';\n\nimport { newLogEvent } from '@openscd/core/foundation/deprecated/history';\nimport { newValidateEvent } from '@openscd/core/foundation/deprecated/validation';\nimport { OpenDocEvent } from '@openscd/core/foundation/deprecated/open-event';\n\nimport {\n Edit,\n EditEvent,\n isComplex,\n isInsert,\n isRemove,\n isUpdate,\n} from '@openscd/core';\n\nimport { convertEditActiontoV1 } from './editor/edit-action-to-v1-converter.js';\nimport { convertEditV1toV2 } from './editor/edit-v1-to-v2-converter.js';\n\n@customElement('oscd-editor')\nexport class OscdEditor extends LitElement {\n /** The `XMLDocument` to be edited */\n @property({ attribute: false })\n doc: XMLDocument | null = null;\n /** The name of the current [[`doc`]] */\n @property({ type: String }) docName = '';\n /** The UUID of the current [[`doc`]] */\n @property({ type: String }) docId = '';\n /** XML Editor to apply changes to the scd */\n @property({ type: Object }) editor!: XMLEditor;\n\n @property({\n type: Object,\n })\n host!: HTMLElement;\n\n private onAction(event: EditorActionEvent<EditorAction>) {\n const edit = convertEditActiontoV1(event.detail.action);\n const editV2 = convertEditV1toV2(edit);\n\n this.host.dispatchEvent(newEditEventV2(editV2));\n }\n\n handleEditEvent(event: EditEvent) {\n /**\n * This is a compatibility fix for plugins based on open energy tools edit events\n * because their edit event look slightly different\n * see https://github.com/OpenEnergyTools/open-scd-core/blob/main/foundation/edit-event-v1.ts for details\n */\n if (isOpenEnergyEditEvent(event)) {\n event = convertOpenEnergyEditEventToEditEvent(event);\n }\n\n const edit = event.detail.edit;\n const editV2 = convertEditV1toV2(edit);\n\n this.host.dispatchEvent(newEditEventV2(editV2));\n }\n\n /**\n *\n * @deprecated [Move to handleOpenDoc instead]\n */\n private async onOpenDoc(event: OpenDocEvent) {\n this.doc = event.detail.doc;\n this.docName = event.detail.docName;\n this.docId = event.detail.docId ?? '';\n\n await this.updateComplete;\n\n this.dispatchEvent(newValidateEvent());\n\n this.dispatchEvent(\n newLogEvent({\n kind: 'info',\n title: get('openSCD.loaded', { name: this.docName }),\n })\n );\n }\n\n handleOpenDoc({ detail: { docName, doc } }: OpenEvent) {\n this.doc = doc;\n this.docName = docName;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n // Deprecated editor action API, use 'oscd-edit' instead.\n this.host.addEventListener('editor-action', this.onAction.bind(this));\n // Deprecated edit event API, use 'oscd-edit-v2' instead.\n this.host.addEventListener('oscd-edit', event => this.handleEditEvent(event));\n\n this.host.addEventListener('oscd-edit-v2', event => this.handleEditEventV2(event));\n this.host.addEventListener('open-doc', this.onOpenDoc);\n this.host.addEventListener('oscd-open', this.handleOpenDoc);\n }\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n\n async handleEditEventV2(event: EditEventV2) {\n const { edit, title, squash } = event.detail;\n\n this.editor.commit(edit, { title, squash });\n\n await this.updateComplete;\n this.dispatchEvent(newValidateEvent());\n }\n}\n\nfunction isOpenEnergyEditEvent(event: CustomEvent<unknown>): boolean {\n const eventDetail = event.detail as Edit;\n return isComplex(eventDetail) || isInsert(eventDetail) || isUpdate(eventDetail) || isRemove(eventDetail);\n}\n\nfunction convertOpenEnergyEditEventToEditEvent(event: CustomEvent<unknown>): EditEvent {\n const eventDetail = event.detail as Edit;\n return newEditEvent(eventDetail);\n}\n"]}
@@ -78,7 +78,7 @@ export declare class OscdHistory extends LitElement {
78
78
  private formatTime;
79
79
  private renderLog;
80
80
  private renderHistory;
81
- private renderIssueEntry;
81
+ protected renderIssueEntry(issue: IssueDetail): TemplateResult;
82
82
  renderValidatorsIssues(issues: IssueDetail[]): TemplateResult[];
83
83
  private renderIssues;
84
84
  private renderFilterButtons;
@@ -1 +1 @@
1
- {"version":3,"file":"History.d.ts","sourceRoot":"","sources":["../../src/addons/History.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,cAAc,EAEd,UAAU,EACX,MAAM,aAAa,CAAC;AAIrB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,2BAA2B,CAAC;AACnC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kCAAkC,CAAC;AAC1C,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAIL,SAAS,EACT,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,EAAE,CAAC;wCACJ;AAGM;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAoB;AAG/C;IADC,QAAQ,EAAE;8CACkC;AAG7C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACR;AAGnB;IADC,KAAK,EAAE;gDACkB;AAG1B;IADC,KAAK,EAAE;4CACoB;AAEb;IAAd,KAAK,CAAC,MAAM,CAAC;0CAAgB;AACX;IAAlB,KAAK,CAAC,UAAU,CAAC;8CAAoB;AAChB;IAArB,KAAK,CAAC,aAAa,CAAC;iDAAuB;AAC3B;IAAhB,KAAK,CAAC,QAAQ,CAAC;4CAAoB;AACjB;IAAlB,KAAK,CAAC,UAAU,CAAC;8CAAsB;AACxB;IAAf,KAAK,CAAC,OAAO,CAAC;2CAAmB;AACjB;IAAhB,KAAK,CAAC,QAAQ,CAAC;4CAAoB;AA1BzB,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAmcvB;SAncY,WAAW","sourcesContent":["import {\n html,\n state,\n property,\n query,\n TemplateResult,\n customElement,\n LitElement,\n} from 'lit-element';\n\nimport { get } from 'lit-translate';\n\nimport '@material/mwc-button';\nimport '@material/mwc-dialog';\nimport '@material/mwc-icon';\nimport '@material/mwc-icon-button';\nimport '@material/mwc-icon-button-toggle';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-list-item';\nimport '@material/mwc-snackbar';\nimport { Dialog } from '@material/mwc-dialog';\nimport { Snackbar } from '@material/mwc-snackbar';\n\nimport '../filtered-list.js';\n\nimport {\n CommitDetail,\n CommitEntry,\n InfoDetail,\n InfoEntry,\n IssueDetail,\n IssueEvent,\n LogEntry,\n LogEntryType,\n LogEvent,\n} from '@openscd/core/foundation/deprecated/history.js';\n\nimport { getFilterIcon, iconColors } from '../icons/icons.js';\n\nexport const historyStateEvent = 'history-state';\nexport interface HistoryState {\n editCount: number;\n canUndo: boolean;\n canRedo: boolean;\n}\nexport type HistoryStateEvent = CustomEvent<HistoryState>;\n\nfunction newHistoryStateEvent(state: HistoryState): HistoryStateEvent {\n return new CustomEvent(historyStateEvent, { detail: state });\n}\n\nimport { Plugin } from '../plugin.js';\nimport { XMLEditor } from '@openscd/core';\n\nimport { getLogText } from './history/get-log-text.js';\n\ninterface HistoryItem {\n title: string;\n message?: string;\n time: number;\n isActive: boolean;\n}\n\nconst icons = {\n info: 'info',\n warning: 'warning',\n error: 'report',\n};\n\nfunction getPluginName(src: string): string {\n\n let storedPluginsString = localStorage.getItem('plugins');\n if(!storedPluginsString) {\n storedPluginsString = '[]';\n }\n\n const storedPlugins = JSON.parse(storedPluginsString) as Plugin[];\n const wantedPlugin = storedPlugins.find((p: Plugin) => p.src === src);\n\n if(!wantedPlugin) {\n return `pluginnotfound: ${src} in ${storedPluginsString}`;\n }\n\n const name = wantedPlugin.name;\n\n if(!name){\n return `pluginhasnoname:${src}`;\n }\n\n return name;\n\n}\n\nexport enum HistoryUIKind {\n log = 'log',\n history = 'history',\n diagnostic = 'diagnostic',\n}\nexport interface HistoryUIDetail {\n show: boolean;\n kind: HistoryUIKind;\n}\n\nexport type HistoryUIEvent = CustomEvent<HistoryUIDetail>;\n\nexport function newHistoryUIEvent(\n show: boolean,\n kind: HistoryUIKind,\n eventInitDict?: CustomEventInit<Partial<HistoryUIDetail>>\n): HistoryUIEvent {\n return new CustomEvent<HistoryUIDetail>('history-dialog-ui', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: {\n show,\n kind,\n ...eventInitDict?.detail,\n },\n });\n}\n\nexport interface EmptyIssuesDetail {\n pluginSrc: string;\n}\n\nexport type EmptyIssuesEvent = CustomEvent<EmptyIssuesDetail>;\n\nexport function newEmptyIssuesEvent(\n pluginSrc: string,\n eventInitDict?: CustomEventInit<Partial<EmptyIssuesDetail>>\n): EmptyIssuesEvent {\n return new CustomEvent<EmptyIssuesDetail>('empty-issues', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: { pluginSrc, ...eventInitDict?.detail },\n });\n}\n\nexport function newUndoEvent(): CustomEvent {\n return new CustomEvent('undo', { bubbles: true, composed: true });\n}\n\nexport function newRedoEvent(): CustomEvent {\n return new CustomEvent('redo', { bubbles: true, composed: true });\n}\n\n@customElement('oscd-history')\nexport class OscdHistory extends LitElement {\n /** All [[`LogEntry`]]s received so far through [[`LogEvent`]]s. */\n @property({ type: Array })\n log: InfoEntry[] = [];\n\n /** XML Editor to apply changes to the scd */\n @property({ type: Object }) editor!: XMLEditor;\n\n @property()\n diagnoses = new Map<string, IssueDetail[]>();\n\n @property({ type: Object })\n host!: HTMLElement;\n\n @state()\n latestIssue!: IssueDetail;\n\n @state()\n history: HistoryItem[] = [];\n\n @query('#log') logUI!: Dialog;\n @query('#history') historyUI!: Dialog;\n @query('#diagnostic') diagnosticUI!: Dialog;\n @query('#error') errorUI!: Snackbar;\n @query('#warning') warningUI!: Snackbar;\n @query('#info') infoUI!: Snackbar;\n @query('#issue') issueUI!: Snackbar;\n\n private unsubscribers: (() => any)[] = [];\n\n private onIssue(de: IssueEvent): void {\n const issues = this.diagnoses.get(de.detail.validatorId);\n\n if (!issues) this.diagnoses.set(de.detail.validatorId, [de.detail]);\n else issues?.push(de.detail);\n\n this.latestIssue = de.detail;\n this.issueUI.close();\n this.issueUI.show();\n }\n\n undo(): void {\n this.editor.undo();\n }\n redo(): void {\n this.editor.redo();\n }\n\n private onReset() {\n this.log = [];\n this.editor.reset();\n this.updateHistory();\n }\n\n private onInfo(detail: InfoDetail) {\n const entry: InfoEntry = {\n time: new Date(),\n ...detail,\n };\n\n this.log.push(entry);\n if (!this.logUI.open) {\n const ui = {\n error: this.errorUI,\n warning: this.warningUI,\n info: this.infoUI,\n }[detail.kind];\n\n ui.close();\n ui.show();\n }\n if (detail.kind == 'error') {\n this.errorUI.close(); // hack to reset timeout\n this.errorUI.show();\n }\n this.requestUpdate('log', []);\n }\n\n private onLog(le: LogEvent): void {\n switch (le.detail.kind) {\n case 'reset':\n this.onReset();\n break;\n case 'action':\n // No longer needed\n break;\n default:\n this.onInfo(le.detail);\n break;\n }\n }\n\n private historyUIHandler(e: HistoryUIEvent): void {\n const ui = {\n log: this.logUI,\n history: this.historyUI,\n diagnostic: this.diagnosticUI,\n }[e.detail.kind];\n\n if (e.detail.show) ui.show();\n else ui.close();\n }\n\n private emptyIssuesHandler(e: EmptyIssuesEvent): void {\n if (this.diagnoses.get(e.detail.pluginSrc))\n this.diagnoses.get(e.detail.pluginSrc)!.length = 0;\n }\n\n private handleKeyPress(e: KeyboardEvent): void {\n const ctrlAnd = (key: string) => e.key === key && e.ctrlKey;\n\n if (ctrlAnd('y')) this.redo();\n if (ctrlAnd('z')) this.undo();\n if (ctrlAnd('l')) this.logUI.open ? this.logUI.close() : this.logUI.show();\n if (ctrlAnd('d'))\n this.diagnosticUI.open\n ? this.diagnosticUI.close()\n : this.diagnosticUI.show();\n }\n\n private updateHistory(): void {\n const { past, future } = this.editor;\n\n const activeIndex = past.length - 1;\n const allEntries = [ ...past, ...future ];\n\n this.history = allEntries.map((e, index) => {\n const { title, message } = getLogText(e.redo as any);\n\n return {\n isActive: index === activeIndex,\n time: e.time,\n title: e.title ?? title,\n message\n };\n });\n }\n\n constructor() {\n super();\n this.undo = this.undo.bind(this);\n this.redo = this.redo.bind(this);\n this.onLog = this.onLog.bind(this);\n this.onIssue = this.onIssue.bind(this);\n this.historyUIHandler = this.historyUIHandler.bind(this);\n this.emptyIssuesHandler = this.emptyIssuesHandler.bind(this);\n this.handleKeyPress = this.handleKeyPress.bind(this);\n document.onkeydown = this.handleKeyPress;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.unsubscribers.push(\n this.editor.subscribe(e => this.updateHistory()),\n this.editor.subscribeUndoRedo(e => this.updateHistory())\n );\n\n this.host.addEventListener('log', this.onLog);\n this.host.addEventListener('issue', this.onIssue);\n this.host.addEventListener('history-dialog-ui', this.historyUIHandler);\n this.host.addEventListener('empty-issues', this.emptyIssuesHandler);\n this.diagnoses.clear();\n }\n\n disconnectedCallback(): void {\n this.unsubscribers.forEach(u => u());\n }\n\n renderLogEntry(\n entry: InfoEntry,\n index: number,\n log: LogEntry[]\n ): TemplateResult {\n return html` <abbr title=\"${entry.title}\">\n <mwc-list-item\n class=\"${entry.kind}\"\n graphic=\"icon\"\n ?twoline=${!!entry.message}\n >\n <span>\n <!-- FIXME: replace tt with mwc-chip asap -->\n <tt>${entry.time?.toLocaleString()}</tt>\n ${entry.title}</span\n >\n <span slot=\"secondary\">${entry.message}</span>\n <mwc-icon\n slot=\"graphic\"\n style=\"--mdc-theme-text-icon-on-background:var(${iconColors[\n entry.kind\n ]})\"\n >${icons[entry.kind]}</mwc-icon\n >\n </mwc-list-item></abbr\n >`;\n }\n\n renderHistoryEntry(\n entry: HistoryItem\n ): TemplateResult {\n return html` <abbr title=\"${entry.title}\">\n <mwc-list-item\n ?twoline=${!!entry.message}\n ?activated=${entry.isActive}\n >\n <span>\n <tt>${this.formatTime(entry.time)}</tt>\n ${entry.title}\n </span>\n <span slot=\"secondary\">${entry.message}</span>\n </mwc-list-item>\n </abbr>`;\n }\n\n private formatTime(time: number): string {\n const date = new Date(time);\n const hours = date.getHours();\n const minutes = date.getMinutes();\n return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`\n }\n\n private renderLog(): TemplateResult[] | TemplateResult {\n if (this.log.length > 0)\n return this.log.slice().reverse().map(this.renderLogEntry, this);\n else\n return html`<mwc-list-item disabled graphic=\"icon\">\n <span>${get('log.placeholder')}</span>\n <mwc-icon slot=\"graphic\">info</mwc-icon>\n </mwc-list-item>`;\n }\n\n private renderHistory(): TemplateResult[] | TemplateResult {\n if (this.history.length > 0)\n return this.history.slice().reverse().map(e => this.renderHistoryEntry(e));\n else\n return html`<mwc-list-item disabled graphic=\"icon\">\n <span>${get('history.placeholder')}</span>\n <mwc-icon slot=\"graphic\">info</mwc-icon>\n </mwc-list-item>`;\n }\n\n private renderIssueEntry(issue: IssueDetail): TemplateResult {\n return html` <abbr title=\"${issue.title + '\\n' + issue.message}\"\n ><mwc-list-item ?twoline=${!!issue.message}>\n <span> ${issue.title}</span>\n <span slot=\"secondary\">${issue.message}</span>\n </mwc-list-item></abbr\n >`;\n }\n\n renderValidatorsIssues(issues: IssueDetail[]): TemplateResult[] {\n if (issues.length === 0) return [html``];\n return [\n html`\n <mwc-list-item noninteractive>\n ${getPluginName(issues[0].validatorId)}\n </mwc-list-item>\n `,\n html`<li divider padded role=\"separator\"></li>`,\n ...issues.map(issue => this.renderIssueEntry(issue)),\n ];\n }\n\n private renderIssues(): TemplateResult[] | TemplateResult {\n const issueItems: TemplateResult[] = [];\n\n this.diagnoses.forEach(issues => {\n this.renderValidatorsIssues(issues).forEach(issueItem =>\n issueItems.push(issueItem)\n );\n });\n\n return issueItems.length\n ? issueItems\n : html`<mwc-list-item disabled graphic=\"icon\">\n <span>${get('diag.placeholder')}</span>\n <mwc-icon slot=\"graphic\">info</mwc-icon>\n </mwc-list-item>`;\n }\n\n private renderFilterButtons() {\n return (<LogEntryType[]>Object.keys(icons)).map(\n kind => html`<mwc-icon-button-toggle id=\"${kind}filter\" on\n >${getFilterIcon(kind, false)}\n ${getFilterIcon(kind, true)}</mwc-icon-button-toggle\n >`\n );\n }\n\n private renderLogDialog(): TemplateResult {\n return html` <mwc-dialog id=\"log\" heading=\"${get('log.name')}\">\n ${this.renderFilterButtons()}\n <mwc-list id=\"content\" wrapFocus>${this.renderLog()}</mwc-list>\n <mwc-button slot=\"primaryAction\" dialogaction=\"close\"\n >${get('close')}</mwc-button\n >\n </mwc-dialog>`;\n }\n\n private renderHistoryUI(): TemplateResult {\n return html` <mwc-dialog id=\"history\" heading=\"${get('history.name')}\">\n <mwc-list id=\"content\" wrapFocus>${this.renderHistory()}</mwc-list>\n <mwc-button\n icon=\"undo\"\n label=\"${get('undo')}\"\n ?disabled=${!this.editor.canUndo}\n @click=${this.undo}\n slot=\"secondaryAction\"\n ></mwc-button>\n <mwc-button\n icon=\"redo\"\n label=\"${get('redo')}\"\n ?disabled=${!this.editor.canRedo}\n @click=${this.redo}\n slot=\"secondaryAction\"\n ></mwc-button>\n <mwc-button slot=\"primaryAction\" dialogaction=\"close\"\n >${get('close')}</mwc-button\n >\n </mwc-dialog>`;\n }\n\n render(): TemplateResult {\n return html`<slot></slot>\n <style>\n #log > mwc-icon-button-toggle {\n position: absolute;\n top: 8px;\n right: 14px;\n }\n #log > mwc-icon-button-toggle:nth-child(2) {\n right: 62px;\n }\n #log > mwc-icon-button-toggle:nth-child(3) {\n right: 110px;\n }\n #log > mwc-icon-button-toggle:nth-child(4) {\n right: 158px;\n }\n #content mwc-list-item.info,\n #content mwc-list-item.warning,\n #content mwc-list-item.error {\n display: none;\n }\n #infofilter[on] ~ #content mwc-list-item.info {\n display: flex;\n }\n #warningfilter[on] ~ #content mwc-list-item.warning {\n display: flex;\n }\n #errorfilter[on] ~ #content mwc-list-item.error {\n display: flex;\n }\n\n #infofilter[on] {\n color: var(--cyan);\n }\n\n #warningfilter[on] {\n color: var(--yellow);\n }\n\n #errorfilter[on] {\n color: var(--red);\n }\n\n #actionfilter[on] {\n color: var(--blue);\n }\n\n #log,\n #history {\n --mdc-dialog-min-width: 92vw;\n }\n\n #log > #filterContainer {\n position: absolute;\n top: 14px;\n right: 14px;\n }\n </style>\n ${this.renderLogDialog()} ${this.renderHistoryUI()}\n <mwc-dialog id=\"diagnostic\" heading=\"${get('diag.name')}\">\n <filtered-list id=\"content\" wrapFocus>\n ${this.renderIssues()}\n </filtered-list>\n <mwc-button slot=\"primaryAction\" dialogaction=\"close\">\n ${get('close')}\n </mwc-button>\n </mwc-dialog>\n\n <mwc-snackbar\n id=\"info\"\n timeoutMs=\"4000\"\n labelText=\"${this.log\n .slice()\n .reverse()\n .find(le => le.kind === 'info')?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>\n <mwc-snackbar\n id=\"warning\"\n timeoutMs=\"6000\"\n labelText=\"${this.log\n .slice()\n .reverse()\n .find(le => le.kind === 'warning')?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-button\n slot=\"action\"\n icon=\"history\"\n @click=${() => this.logUI.show()}\n >${get('log.snackbar.show')}</mwc-button\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>\n <mwc-snackbar\n id=\"error\"\n timeoutMs=\"10000\"\n labelText=\"${this.log\n .slice()\n .reverse()\n .find(le => le.kind === 'error')?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-button\n slot=\"action\"\n icon=\"history\"\n @click=${() => this.logUI.show()}\n >${get('log.snackbar.show')}</mwc-button\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>\n <mwc-snackbar\n id=\"issue\"\n timeoutMs=\"10000\"\n labelText=\"${this.latestIssue?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-button\n slot=\"action\"\n icon=\"rule\"\n @click=${() => this.diagnosticUI.show()}\n >${get('log.snackbar.show')}</mwc-button\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>`;\n }\n}\n\ndeclare global {\n interface ElementEventMap {\n [historyStateEvent]: HistoryStateEvent;\n 'history-dialog-ui': CustomEvent<HistoryUIDetail>;\n 'empty-issues': CustomEvent<EmptyIssuesDetail>;\n }\n}\n"]}
1
+ {"version":3,"file":"History.js","sourceRoot":"","sources":["../../src/addons/History.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,KAAK,EAEL,aAAa,EACb,UAAU,GACX,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AA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AE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAoB;AAG/C;IADC,QAAQ,EAAE;8CACkC;AAG7C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACR;AAGnB;IADC,KAAK,EAAE;gDACkB;AAG1B;IADC,KAAK,EAAE;4CACoB;AAEb;IAAd,KAAK,CAAC,MAAM,CAAC;0CAAgB;AACX;IAAlB,KAAK,CAAC,UAAU,CAAC;8CAAoB;AAChB;IAArB,KAAK,CAAC,aAAa,CAAC;iDAAuB;AAC3B;IAAhB,KAAK,CAAC,QAAQ,CAAC;4CAAoB;AACjB;IAAlB,KAAK,CAAC,UAAU,CAAC;8CAAsB;AACxB;IAAf,KAAK,CAAC,OAAO,CAAC;2CAAmB;AACjB;IAAhB,KAAK,CAAC,QAAQ,CAAC;4CAAoB;AA1BzB,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAmcvB;SAncY,WAAW","sourcesContent":["import {\n html,\n state,\n property,\n query,\n TemplateResult,\n customElement,\n LitElement,\n} from 'lit-element';\n\nimport { get } from 'lit-translate';\n\nimport '@material/mwc-button';\nimport '@material/mwc-dialog';\nimport '@material/mwc-icon';\nimport '@material/mwc-icon-button';\nimport '@material/mwc-icon-button-toggle';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-list-item';\nimport '@material/mwc-snackbar';\nimport { Dialog } from '@material/mwc-dialog';\nimport { Snackbar } from '@material/mwc-snackbar';\n\nimport '../filtered-list.js';\n\nimport {\n CommitDetail,\n CommitEntry,\n InfoDetail,\n InfoEntry,\n IssueDetail,\n IssueEvent,\n LogEntry,\n LogEntryType,\n LogEvent,\n} from '@openscd/core/foundation/deprecated/history.js';\n\nimport { getFilterIcon, iconColors } from '../icons/icons.js';\n\nexport const historyStateEvent = 'history-state';\nexport interface HistoryState {\n editCount: number;\n canUndo: boolean;\n canRedo: boolean;\n}\nexport type HistoryStateEvent = CustomEvent<HistoryState>;\n\nfunction newHistoryStateEvent(state: HistoryState): HistoryStateEvent {\n return new CustomEvent(historyStateEvent, { detail: state });\n}\n\nimport { Plugin } from '../plugin.js';\nimport { XMLEditor } from '@openscd/core';\n\nimport { getLogText } from './history/get-log-text.js';\n\ninterface HistoryItem {\n title: string;\n message?: string;\n time: number;\n isActive: boolean;\n}\n\nconst icons = {\n info: 'info',\n warning: 'warning',\n error: 'report',\n};\n\nfunction getPluginName(src: string): string {\n\n let storedPluginsString = localStorage.getItem('plugins');\n if(!storedPluginsString) {\n storedPluginsString = '[]';\n }\n\n const storedPlugins = JSON.parse(storedPluginsString) as Plugin[];\n const wantedPlugin = storedPlugins.find((p: Plugin) => p.src === src);\n\n if(!wantedPlugin) {\n return `pluginnotfound: ${src} in ${storedPluginsString}`;\n }\n\n const name = wantedPlugin.name;\n\n if(!name){\n return `pluginhasnoname:${src}`;\n }\n\n return name;\n\n}\n\nexport enum HistoryUIKind {\n log = 'log',\n history = 'history',\n diagnostic = 'diagnostic',\n}\nexport interface HistoryUIDetail {\n show: boolean;\n kind: HistoryUIKind;\n}\n\nexport type HistoryUIEvent = CustomEvent<HistoryUIDetail>;\n\nexport function newHistoryUIEvent(\n show: boolean,\n kind: HistoryUIKind,\n eventInitDict?: CustomEventInit<Partial<HistoryUIDetail>>\n): HistoryUIEvent {\n return new CustomEvent<HistoryUIDetail>('history-dialog-ui', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: {\n show,\n kind,\n ...eventInitDict?.detail,\n },\n });\n}\n\nexport interface EmptyIssuesDetail {\n pluginSrc: string;\n}\n\nexport type EmptyIssuesEvent = CustomEvent<EmptyIssuesDetail>;\n\nexport function newEmptyIssuesEvent(\n pluginSrc: string,\n eventInitDict?: CustomEventInit<Partial<EmptyIssuesDetail>>\n): EmptyIssuesEvent {\n return new CustomEvent<EmptyIssuesDetail>('empty-issues', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: { pluginSrc, ...eventInitDict?.detail },\n });\n}\n\nexport function newUndoEvent(): CustomEvent {\n return new CustomEvent('undo', { bubbles: true, composed: true });\n}\n\nexport function newRedoEvent(): CustomEvent {\n return new CustomEvent('redo', { bubbles: true, composed: true });\n}\n\n@customElement('oscd-history')\nexport class OscdHistory extends LitElement {\n /** All [[`LogEntry`]]s received so far through [[`LogEvent`]]s. */\n @property({ type: Array })\n log: InfoEntry[] = [];\n\n /** XML Editor to apply changes to the scd */\n @property({ type: Object }) editor!: XMLEditor;\n\n @property()\n diagnoses = new Map<string, IssueDetail[]>();\n\n @property({ type: Object })\n host!: HTMLElement;\n\n @state()\n latestIssue!: IssueDetail;\n\n @state()\n history: HistoryItem[] = [];\n\n @query('#log') logUI!: Dialog;\n @query('#history') historyUI!: Dialog;\n @query('#diagnostic') diagnosticUI!: Dialog;\n @query('#error') errorUI!: Snackbar;\n @query('#warning') warningUI!: Snackbar;\n @query('#info') infoUI!: Snackbar;\n @query('#issue') issueUI!: Snackbar;\n\n private unsubscribers: (() => any)[] = [];\n\n private onIssue(de: IssueEvent): void {\n const issues = this.diagnoses.get(de.detail.validatorId);\n\n if (!issues) this.diagnoses.set(de.detail.validatorId, [de.detail]);\n else issues?.push(de.detail);\n\n this.latestIssue = de.detail;\n this.issueUI.close();\n this.issueUI.show();\n }\n\n undo(): void {\n this.editor.undo();\n }\n redo(): void {\n this.editor.redo();\n }\n\n private onReset() {\n this.log = [];\n this.editor.reset();\n this.updateHistory();\n }\n\n private onInfo(detail: InfoDetail) {\n const entry: InfoEntry = {\n time: new Date(),\n ...detail,\n };\n\n this.log.push(entry);\n if (!this.logUI.open) {\n const ui = {\n error: this.errorUI,\n warning: this.warningUI,\n info: this.infoUI,\n }[detail.kind];\n\n ui.close();\n ui.show();\n }\n if (detail.kind == 'error') {\n this.errorUI.close(); // hack to reset timeout\n this.errorUI.show();\n }\n this.requestUpdate('log', []);\n }\n\n private onLog(le: LogEvent): void {\n switch (le.detail.kind) {\n case 'reset':\n this.onReset();\n break;\n case 'action':\n // No longer needed\n break;\n default:\n this.onInfo(le.detail);\n break;\n }\n }\n\n private historyUIHandler(e: HistoryUIEvent): void {\n const ui = {\n log: this.logUI,\n history: this.historyUI,\n diagnostic: this.diagnosticUI,\n }[e.detail.kind];\n\n if (e.detail.show) ui.show();\n else ui.close();\n }\n\n private emptyIssuesHandler(e: EmptyIssuesEvent): void {\n if (this.diagnoses.get(e.detail.pluginSrc))\n this.diagnoses.get(e.detail.pluginSrc)!.length = 0;\n }\n\n private handleKeyPress(e: KeyboardEvent): void {\n const ctrlAnd = (key: string) => e.key === key && e.ctrlKey;\n\n if (ctrlAnd('y')) this.redo();\n if (ctrlAnd('z')) this.undo();\n if (ctrlAnd('l')) this.logUI.open ? this.logUI.close() : this.logUI.show();\n if (ctrlAnd('d'))\n this.diagnosticUI.open\n ? this.diagnosticUI.close()\n : this.diagnosticUI.show();\n }\n\n private updateHistory(): void {\n const { past, future } = this.editor;\n\n const activeIndex = past.length - 1;\n const allEntries = [ ...past, ...future ];\n\n this.history = allEntries.map((e, index) => {\n const { title, message } = getLogText(e.redo as any);\n\n return {\n isActive: index === activeIndex,\n time: e.time,\n title: e.title ?? title,\n message\n };\n });\n }\n\n constructor() {\n super();\n this.undo = this.undo.bind(this);\n this.redo = this.redo.bind(this);\n this.onLog = this.onLog.bind(this);\n this.onIssue = this.onIssue.bind(this);\n this.historyUIHandler = this.historyUIHandler.bind(this);\n this.emptyIssuesHandler = this.emptyIssuesHandler.bind(this);\n this.handleKeyPress = this.handleKeyPress.bind(this);\n document.onkeydown = this.handleKeyPress;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.unsubscribers.push(\n this.editor.subscribe(e => this.updateHistory()),\n this.editor.subscribeUndoRedo(e => this.updateHistory())\n );\n\n this.host.addEventListener('log', this.onLog);\n this.host.addEventListener('issue', this.onIssue);\n this.host.addEventListener('history-dialog-ui', this.historyUIHandler);\n this.host.addEventListener('empty-issues', this.emptyIssuesHandler);\n this.diagnoses.clear();\n }\n\n disconnectedCallback(): void {\n this.unsubscribers.forEach(u => u());\n }\n\n renderLogEntry(\n entry: InfoEntry,\n index: number,\n log: LogEntry[]\n ): TemplateResult {\n return html` <abbr title=\"${entry.title}\">\n <mwc-list-item\n class=\"${entry.kind}\"\n graphic=\"icon\"\n ?twoline=${!!entry.message}\n >\n <span>\n <!-- FIXME: replace tt with mwc-chip asap -->\n <tt>${entry.time?.toLocaleString()}</tt>\n ${entry.title}</span\n >\n <span slot=\"secondary\">${entry.message}</span>\n <mwc-icon\n slot=\"graphic\"\n style=\"--mdc-theme-text-icon-on-background:var(${iconColors[\n entry.kind\n ]})\"\n >${icons[entry.kind]}</mwc-icon\n >\n </mwc-list-item></abbr\n >`;\n }\n\n renderHistoryEntry(\n entry: HistoryItem\n ): TemplateResult {\n return html` <abbr title=\"${entry.title}\">\n <mwc-list-item\n ?twoline=${!!entry.message}\n ?activated=${entry.isActive}\n >\n <span>\n <tt>${this.formatTime(entry.time)}</tt>\n ${entry.title}\n </span>\n <span slot=\"secondary\">${entry.message}</span>\n </mwc-list-item>\n </abbr>`;\n }\n\n private formatTime(time: number): string {\n const date = new Date(time);\n const hours = date.getHours();\n const minutes = date.getMinutes();\n return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`\n }\n\n private renderLog(): TemplateResult[] | TemplateResult {\n if (this.log.length > 0)\n return this.log.slice().reverse().map(this.renderLogEntry, this);\n else\n return html`<mwc-list-item disabled graphic=\"icon\">\n <span>${get('log.placeholder')}</span>\n <mwc-icon slot=\"graphic\">info</mwc-icon>\n </mwc-list-item>`;\n }\n\n private renderHistory(): TemplateResult[] | TemplateResult {\n if (this.history.length > 0)\n return this.history.slice().reverse().map(e => this.renderHistoryEntry(e));\n else\n return html`<mwc-list-item disabled graphic=\"icon\">\n <span>${get('history.placeholder')}</span>\n <mwc-icon slot=\"graphic\">info</mwc-icon>\n </mwc-list-item>`;\n }\n\n protected renderIssueEntry(issue: IssueDetail): TemplateResult {\n return html` <abbr title=\"${issue.title + '\\n' + issue.message}\"\n ><mwc-list-item ?twoline=${!!issue.message}>\n <span> ${issue.title}</span>\n <span slot=\"secondary\">${issue.message}</span>\n </mwc-list-item></abbr\n >`;\n }\n\n renderValidatorsIssues(issues: IssueDetail[]): TemplateResult[] {\n if (issues.length === 0) return [html``];\n return [\n html`\n <mwc-list-item noninteractive>\n ${getPluginName(issues[0].validatorId)}\n </mwc-list-item>\n `,\n html`<li divider padded role=\"separator\"></li>`,\n ...issues.map(issue => this.renderIssueEntry(issue)),\n ];\n }\n\n private renderIssues(): TemplateResult[] | TemplateResult {\n const issueItems: TemplateResult[] = [];\n\n this.diagnoses.forEach(issues => {\n this.renderValidatorsIssues(issues).forEach(issueItem =>\n issueItems.push(issueItem)\n );\n });\n\n return issueItems.length\n ? issueItems\n : html`<mwc-list-item disabled graphic=\"icon\">\n <span>${get('diag.placeholder')}</span>\n <mwc-icon slot=\"graphic\">info</mwc-icon>\n </mwc-list-item>`;\n }\n\n private renderFilterButtons() {\n return (<LogEntryType[]>Object.keys(icons)).map(\n kind => html`<mwc-icon-button-toggle id=\"${kind}filter\" on\n >${getFilterIcon(kind, false)}\n ${getFilterIcon(kind, true)}</mwc-icon-button-toggle\n >`\n );\n }\n\n private renderLogDialog(): TemplateResult {\n return html` <mwc-dialog id=\"log\" heading=\"${get('log.name')}\">\n ${this.renderFilterButtons()}\n <mwc-list id=\"content\" wrapFocus>${this.renderLog()}</mwc-list>\n <mwc-button slot=\"primaryAction\" dialogaction=\"close\"\n >${get('close')}</mwc-button\n >\n </mwc-dialog>`;\n }\n\n private renderHistoryUI(): TemplateResult {\n return html` <mwc-dialog id=\"history\" heading=\"${get('history.name')}\">\n <mwc-list id=\"content\" wrapFocus>${this.renderHistory()}</mwc-list>\n <mwc-button\n icon=\"undo\"\n label=\"${get('undo')}\"\n ?disabled=${!this.editor.canUndo}\n @click=${this.undo}\n slot=\"secondaryAction\"\n ></mwc-button>\n <mwc-button\n icon=\"redo\"\n label=\"${get('redo')}\"\n ?disabled=${!this.editor.canRedo}\n @click=${this.redo}\n slot=\"secondaryAction\"\n ></mwc-button>\n <mwc-button slot=\"primaryAction\" dialogaction=\"close\"\n >${get('close')}</mwc-button\n >\n </mwc-dialog>`;\n }\n\n render(): TemplateResult {\n return html`<slot></slot>\n <style>\n #log > mwc-icon-button-toggle {\n position: absolute;\n top: 8px;\n right: 14px;\n }\n #log > mwc-icon-button-toggle:nth-child(2) {\n right: 62px;\n }\n #log > mwc-icon-button-toggle:nth-child(3) {\n right: 110px;\n }\n #log > mwc-icon-button-toggle:nth-child(4) {\n right: 158px;\n }\n #content mwc-list-item.info,\n #content mwc-list-item.warning,\n #content mwc-list-item.error {\n display: none;\n }\n #infofilter[on] ~ #content mwc-list-item.info {\n display: flex;\n }\n #warningfilter[on] ~ #content mwc-list-item.warning {\n display: flex;\n }\n #errorfilter[on] ~ #content mwc-list-item.error {\n display: flex;\n }\n\n #infofilter[on] {\n color: var(--cyan);\n }\n\n #warningfilter[on] {\n color: var(--yellow);\n }\n\n #errorfilter[on] {\n color: var(--red);\n }\n\n #actionfilter[on] {\n color: var(--blue);\n }\n\n #log,\n #history {\n --mdc-dialog-min-width: 92vw;\n }\n\n #log > #filterContainer {\n position: absolute;\n top: 14px;\n right: 14px;\n }\n </style>\n ${this.renderLogDialog()} ${this.renderHistoryUI()}\n <mwc-dialog id=\"diagnostic\" heading=\"${get('diag.name')}\">\n <filtered-list id=\"content\" wrapFocus>\n ${this.renderIssues()}\n </filtered-list>\n <mwc-button slot=\"primaryAction\" dialogaction=\"close\">\n ${get('close')}\n </mwc-button>\n </mwc-dialog>\n\n <mwc-snackbar\n id=\"info\"\n timeoutMs=\"4000\"\n labelText=\"${this.log\n .slice()\n .reverse()\n .find(le => le.kind === 'info')?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>\n <mwc-snackbar\n id=\"warning\"\n timeoutMs=\"6000\"\n labelText=\"${this.log\n .slice()\n .reverse()\n .find(le => le.kind === 'warning')?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-button\n slot=\"action\"\n icon=\"history\"\n @click=${() => this.logUI.show()}\n >${get('log.snackbar.show')}</mwc-button\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>\n <mwc-snackbar\n id=\"error\"\n timeoutMs=\"10000\"\n labelText=\"${this.log\n .slice()\n .reverse()\n .find(le => le.kind === 'error')?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-button\n slot=\"action\"\n icon=\"history\"\n @click=${() => this.logUI.show()}\n >${get('log.snackbar.show')}</mwc-button\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>\n <mwc-snackbar\n id=\"issue\"\n timeoutMs=\"10000\"\n labelText=\"${this.latestIssue?.title ??\n get('log.snackbar.placeholder')}\"\n >\n <mwc-button\n slot=\"action\"\n icon=\"rule\"\n @click=${() => this.diagnosticUI.show()}\n >${get('log.snackbar.show')}</mwc-button\n >\n <mwc-icon-button icon=\"close\" slot=\"dismiss\"></mwc-icon-button>\n </mwc-snackbar>`;\n }\n}\n\ndeclare global {\n interface ElementEventMap {\n [historyStateEvent]: HistoryStateEvent;\n 'history-dialog-ui': CustomEvent<HistoryUIDetail>;\n 'empty-issues': CustomEvent<EmptyIssuesDetail>;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { EditorAction } from '@openscd/core/foundation/deprecated/editor.js';
1
+ import { EditorAction } from '@openscd/core/foundation/deprecated/editor';
2
2
  import { Edit } from '@openscd/core';
3
3
  export declare function convertEditActiontoV1(action: EditorAction): Edit;
4
4
  //# sourceMappingURL=edit-action-to-v1-converter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edit-action-to-v1-converter.d.ts","sourceRoot":"","sources":["../../../src/addons/editor/edit-action-to-v1-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAWb,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,IAAI,EAAsC,MAAM,eAAe,CAAC;AAIzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAMhE"}
1
+ {"version":3,"file":"edit-action-to-v1-converter.d.ts","sourceRoot":"","sources":["../../../src/addons/editor/edit-action-to-v1-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAWb,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,IAAI,EAAsC,MAAM,eAAe,CAAC;AAIzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAMhE"}
@@ -1,4 +1,4 @@
1
- import { isCreate, isDelete, isMove, isReplace, isSimple, isUpdate } from '@openscd/core/foundation/deprecated/editor.js';
1
+ import { isCreate, isDelete, isMove, isReplace, isSimple, isUpdate } from '@openscd/core/foundation/deprecated/editor';
2
2
  import { getReference } from '../../foundation.js';
3
3
  export function convertEditActiontoV1(action) {
4
4
  if (isSimple(action)) {
@@ -1 +1 @@
1
- {"version":3,"file":"edit-action-to-v1-converter.js","sourceRoot":"","sources":["../../../src/addons/editor/edit-action-to-v1-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EAKT,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAU,MAAM,qBAAqB,CAAC;AAG3D,MAAM,UAAU,qBAAqB,CAAC,MAAoB;IACxD,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE;QACpB,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;KACpC;SAAM;QACL,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;KAChD;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAoB;IAC/C,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE;QACpB,OAAO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,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;IAEhD,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;KACxE;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC;IAEjD,MAAM,MAAM,GAAW,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACpD,MAAM,MAAM,GAAW;QACrB,MAAM;QACN,IAAI,EAAE,OAAO;QACb,SAAS;KACV,CAAC;IAEF,OAAO;QACL,MAAM;QACN,MAAM;KACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n Create,\n Delete,\n EditorAction,\n isCreate,\n isDelete,\n isMove,\n isReplace,\n isSimple,\n isUpdate,\n Move,\n Replace,\n SimpleAction,\n Update\n} from '@openscd/core/foundation/deprecated/editor.js';\nimport { Edit, Insert, Remove, Update as UpdateV2 } from '@openscd/core';\nimport { getReference, SCLTag } from '../../foundation.js';\n\n\nexport function convertEditActiontoV1(action: EditorAction): Edit {\n if (isSimple(action)) {\n return convertSimpleAction(action);\n } else {\n return action.actions.map(convertSimpleAction);\n }\n}\n\nfunction convertSimpleAction(action: SimpleAction): Edit {\n if (isCreate(action)) {\n return convertCreate(action);\n } else if (isDelete(action)) {\n return convertDelete(action);\n } else if (isUpdate(action)) {\n return convertUpdate(action);\n } else if (isMove(action)) {\n return convertMove(action);\n } else if (isReplace(action)) {\n return convertReplace(action);\n }\n\n throw new Error('Unknown action type');\n}\n\nfunction convertCreate(action: Create): Insert {\n let reference: Node | null = null;\n if (\n action.new.reference === undefined &&\n action.new.element instanceof Element &&\n action.new.parent instanceof Element\n ) {\n reference = getReference(\n action.new.parent,\n <SCLTag>action.new.element.tagName\n );\n } else {\n reference = action.new.reference ?? null; \n }\n\n return {\n parent: action.new.parent,\n node: action.new.element,\n reference\n };\n}\n\nfunction convertDelete(action: Delete): Remove {\n return {\n node: action.old.element\n };\n}\n\nfunction convertUpdate(action: Update): UpdateV2 {\n const oldAttributesToRemove: Record<string, string | null> = {};\n Array.from(action.element.attributes).forEach(attr => {\n oldAttributesToRemove[attr.name] = null;\n });\n\n const attributes = {\n ...oldAttributesToRemove,\n ...action.newAttributes\n };\n\n return {\n element: action.element,\n attributes\n };\n}\n\nfunction convertMove(action: Move): Insert {\n if (action.new.reference === undefined) {\n action.new.reference = getReference(\n action.new.parent,\n <SCLTag>action.old.element.tagName\n );\n }\n\n return {\n parent: action.new.parent,\n node: action.old.element,\n reference: action.new.reference ?? null\n }\n}\n\nfunction convertReplace(action: Replace): Edit {\n const oldChildren = action.old.element.children;\n // We have to clone the children, because otherwise undoing the action would remove the children from the old element, because append removes the old parent\n const copiedChildren = Array.from(oldChildren).map(e => e.cloneNode(true));\n\n const newNode = action.new.element.cloneNode(true) as Element;\n newNode.append(...Array.from(copiedChildren));\n const parent = action.old.element.parentElement;\n\n if (!parent) {\n throw new Error('Replace action called without parent in old element');\n }\n\n const reference = action.old.element.nextSibling;\n\n const remove: Remove = { node: action.old.element };\n const insert: Insert = {\n parent,\n node: newNode,\n reference\n };\n\n return [\n remove,\n insert\n ];\n}\n"]}
1
+ {"version":3,"file":"edit-action-to-v1-converter.js","sourceRoot":"","sources":["../../../src/addons/editor/edit-action-to-v1-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EAKT,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAU,MAAM,qBAAqB,CAAC;AAG3D,MAAM,UAAU,qBAAqB,CAAC,MAAoB;IACxD,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE;QACpB,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;KACpC;SAAM;QACL,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;KAChD;AAC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OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;IAEhD,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;KACxE;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC;IAEjD,MAAM,MAAM,GAAW,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACpD,MAAM,MAAM,GAAW;QACrB,MAAM;QACN,IAAI,EAAE,OAAO;QACb,SAAS;KACV,CAAC;IAEF,OAAO;QACL,MAAM;QACN,MAAM;KACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n Create,\n Delete,\n EditorAction,\n isCreate,\n isDelete,\n isMove,\n isReplace,\n isSimple,\n isUpdate,\n Move,\n Replace,\n SimpleAction,\n Update\n} from '@openscd/core/foundation/deprecated/editor';\nimport { Edit, Insert, Remove, Update as UpdateV2 } from '@openscd/core';\nimport { getReference, SCLTag } from '../../foundation.js';\n\n\nexport function convertEditActiontoV1(action: EditorAction): Edit {\n if (isSimple(action)) {\n return convertSimpleAction(action);\n } else {\n return action.actions.map(convertSimpleAction);\n }\n}\n\nfunction convertSimpleAction(action: SimpleAction): Edit {\n if (isCreate(action)) {\n return convertCreate(action);\n } else if (isDelete(action)) {\n return convertDelete(action);\n } else if (isUpdate(action)) {\n return convertUpdate(action);\n } else if (isMove(action)) {\n return convertMove(action);\n } else if (isReplace(action)) {\n return convertReplace(action);\n }\n\n throw new Error('Unknown action type');\n}\n\nfunction convertCreate(action: Create): Insert {\n let reference: Node | null = null;\n if (\n action.new.reference === undefined &&\n action.new.element instanceof Element &&\n action.new.parent instanceof Element\n ) {\n reference = getReference(\n action.new.parent,\n <SCLTag>action.new.element.tagName\n );\n } else {\n reference = action.new.reference ?? null; \n }\n\n return {\n parent: action.new.parent,\n node: action.new.element,\n reference\n };\n}\n\nfunction convertDelete(action: Delete): Remove {\n return {\n node: action.old.element\n };\n}\n\nfunction convertUpdate(action: Update): UpdateV2 {\n const oldAttributesToRemove: Record<string, string | null> = {};\n Array.from(action.element.attributes).forEach(attr => {\n oldAttributesToRemove[attr.name] = null;\n });\n\n const attributes = {\n ...oldAttributesToRemove,\n ...action.newAttributes\n };\n\n return {\n element: action.element,\n attributes\n };\n}\n\nfunction convertMove(action: Move): Insert {\n if (action.new.reference === undefined) {\n action.new.reference = getReference(\n action.new.parent,\n <SCLTag>action.old.element.tagName\n );\n }\n\n return {\n parent: action.new.parent,\n node: action.old.element,\n reference: action.new.reference ?? null\n }\n}\n\nfunction convertReplace(action: Replace): Edit {\n const oldChildren = action.old.element.children;\n // We have to clone the children, because otherwise undoing the action would remove the children from the old element, because append removes the old parent\n const copiedChildren = Array.from(oldChildren).map(e => e.cloneNode(true));\n\n const newNode = action.new.element.cloneNode(true) as Element;\n newNode.append(...Array.from(copiedChildren));\n const parent = action.old.element.parentElement;\n\n if (!parent) {\n throw new Error('Replace action called without parent in old element');\n }\n\n const reference = action.old.element.nextSibling;\n\n const remove: Remove = { node: action.old.element };\n const insert: Insert = {\n parent,\n node: newNode,\n reference\n };\n\n return [\n remove,\n insert\n ];\n}\n"]}
@@ -6,7 +6,7 @@ import { TextField } from '@material/mwc-textfield';
6
6
  import AceEditor from 'ace-custom-element';
7
7
  import { WizardTextField } from './wizard-textfield.js';
8
8
  import { WizardSelect } from './wizard-select.js';
9
- import { EditorAction } from '@openscd/core/foundation/deprecated/editor.js';
9
+ import { EditorAction } from '@openscd/core/foundation/deprecated/editor';
10
10
  export declare const wizardInputSelector = "wizard-textfield, mwc-textfield, ace-editor, mwc-select, wizard-select, wizard-checkbox";
11
11
  export type WizardInputElement = WizardTextField | TextField | (AceEditor & {
12
12
  checkValidity: () => boolean;
@@ -1 +1 @@
1
- {"version":3,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MAAM,CAAC,CAAC,CAAC;gBACtE,IAAI,YAAY;oBAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAC5C,OAAO,YAAY,CAAC;YACtB,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAE,EAAE,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,UAAqB;IAErB,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7E,OAAO,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { LitElement, TemplateResult } from 'lit-element';\nimport { directive, Part } from 'lit-html';\n\nimport { List } from '@material/mwc-list';\nimport { Select } from '@material/mwc-select';\nimport { TextField } from '@material/mwc-textfield';\nimport AceEditor from 'ace-custom-element';\n\nimport { getChildElementsByTagName } from '@openscd/xml';\n\nimport { WizardTextField } from './wizard-textfield.js';\nimport { WizardSelect } from './wizard-select.js';\nimport { WizardCheckbox } from './wizard-checkbox.js';\n\nimport { EditorAction } from '@openscd/core/foundation/deprecated/editor.js';\n\nexport const wizardInputSelector =\n 'wizard-textfield, mwc-textfield, ace-editor, mwc-select, wizard-select, wizard-checkbox';\nexport type WizardInputElement =\n | WizardTextField\n | TextField\n | (AceEditor & {\n checkValidity: () => boolean;\n validityTransform: (\n newValue: string,\n nativeValidity: ValidityState\n ) => ValidityState;\n validationMessage: string;\n validity: ValidityState;\n label: string;\n requestUpdate(name?: PropertyKey, oldValue?: unknown): Promise<unknown>;\n })\n // TODO(c-dinkel): extend component\n | Select\n | WizardSelect;\n\nexport type WizardAction = EditorAction | WizardFactory;\n\n/** @returns [[`EditorAction`]]s to dispatch on [[`WizardDialog`]] commit. */\nexport type WizardActor = (\n inputs: WizardInputElement[],\n wizard: Element,\n list?: List | null\n) => WizardAction[];\n\nexport function isWizardFactory(\n maybeFactory: WizardAction | Wizard | null\n): maybeFactory is WizardFactory {\n return typeof maybeFactory === 'function';\n}\n\n/** @returns the validity of `input` depending on type. */\nexport function checkValidity(input: WizardInputElement): boolean {\n if (input instanceof WizardTextField || input instanceof Select)\n return input.checkValidity();\n else return true;\n}\n\n/** reports the validity of `input` depending on type. */\nexport function reportValidity(input: WizardInputElement): boolean {\n if (input instanceof WizardTextField || input instanceof Select)\n return input.reportValidity();\n else return true;\n}\n\n/** @returns the `value` or `maybeValue` of `input` depending on type. */\nexport function getValue(input: WizardInputElement): string | null {\n if (\n input instanceof WizardTextField ||\n input instanceof WizardSelect ||\n input instanceof WizardCheckbox\n )\n return input.maybeValue;\n else return input.value ?? null;\n}\n\n/** @returns the `multiplier` of `input` if available. */\nexport function getMultiplier(input: WizardInputElement): string | null {\n if (input instanceof WizardTextField) return input.multiplier;\n else return null;\n}\n\n/** Inputs as `TextField`, `Select` or `Checkbox `used in`wizard-dialog` */\nexport type WizardInput =\n | WizardInputTextField\n | WizardInputSelect\n | WizardInputCheckbox;\n\ninterface WizardInputBase {\n /** maps attribute key */\n label: string;\n /** maps attribute value */\n maybeValue: string | null;\n /** whether attribute is optional */\n nullable?: boolean;\n /** whether the input shall be disabled */\n disabled?: boolean;\n /** helper text */\n helper?: string;\n /** initial focused element in `wizard-dialog` (once per dialog) */\n dialogInitialFocus?: boolean;\n}\n\ninterface WizardInputTextField extends WizardInputBase {\n kind: 'TextField';\n /** wether the input might be empty string */\n required?: boolean;\n /** pattern definition from schema */\n pattern?: string;\n /** minimal characters allowed */\n minLength?: number;\n /** maximal characters allowed */\n maxLength?: number;\n /** message text explaining invalid inputs */\n validationMessage?: string;\n /** suffix definition - overwrites unit multiplier definition */\n suffix?: string;\n /** SI unit for specific suffix definition */\n unit?: string;\n /** in comibination with unit defines specific suffix */\n multiplier?: string | null;\n /** array of multipliers allowed for the input */\n multipliers?: (string | null)[];\n /** used for specific input type e.g. number */\n type?: string;\n /** minimal valid number in combination with type number */\n min?: number;\n /** maximal valid number in combination with type number */\n max?: number;\n /** value displaxed when input is nulled */\n default?: string;\n}\n\ninterface WizardInputSelect extends WizardInputBase {\n kind: 'Select';\n /** selectabled values */\n values: string[];\n /** value displayed with input is nulled */\n default?: string;\n /** message explaining invalid inputs */\n valadationMessage?: string;\n}\n\ninterface WizardInputCheckbox extends WizardInputBase {\n kind: 'Checkbox';\n /** wether checkbox is checked with nulled input */\n default?: boolean;\n}\n\n/** @returns [[`WizardAction`]]s to dispatch on [[`WizardDialog`]] menu action. */\nexport type WizardMenuActor = (wizard: Element) => void;\n\n/** User interactions rendered in the wizard-dialog menu */\nexport interface MenuAction {\n label: string;\n icon?: string;\n action: WizardMenuActor;\n}\n\n/** Represents a page of a wizard dialog */\nexport interface WizardPage {\n title: string;\n content?: (TemplateResult | WizardInput)[];\n primary?: {\n icon: string;\n label: string;\n action: WizardActor;\n auto?: boolean;\n };\n secondary?: {\n icon: string;\n label: string;\n action: WizardActor;\n };\n initial?: boolean;\n element?: Element;\n menuActions?: MenuAction[];\n}\nexport type Wizard = WizardPage[];\nexport type WizardFactory = () => Wizard;\n\n/** If `wizard === null`, close the current wizard, else queue `wizard`. */\nexport interface WizardDetail {\n wizard: WizardFactory | null;\n subwizard?: boolean;\n}\nexport type WizardEvent = CustomEvent<WizardDetail>;\nexport function newWizardEvent(\n wizardOrFactory?: Wizard | WizardFactory,\n eventInitDict?: CustomEventInit<Partial<WizardDetail>>\n): WizardEvent {\n if (!wizardOrFactory)\n return new CustomEvent<WizardDetail>('wizard', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: { wizard: null, ...eventInitDict?.detail },\n });\n\n const wizard = isWizardFactory(wizardOrFactory)\n ? wizardOrFactory\n : () => wizardOrFactory;\n\n return new CustomEvent<WizardDetail>('wizard', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: { wizard, ...eventInitDict?.detail },\n });\n}\n\nexport function newSubWizardEvent(\n wizardOrFactory?: Wizard | WizardFactory\n): WizardEvent {\n return newWizardEvent(wizardOrFactory, { detail: { subwizard: true } });\n}\n\n/** @returns a reference to `element` with segments delimited by '/'. */\n// TODO(c-dinkel): replace with identity (FIXME)\nexport function referencePath(element: Element): string {\n let path = '';\n let nextParent: Element | null = element.parentElement;\n while (nextParent?.getAttribute('name')) {\n path = '/' + nextParent.getAttribute('name') + path;\n nextParent = nextParent.parentElement;\n }\n return path;\n}\n\nexport type SclEdition = '2003' | '2007B' | '2007B4';\nexport function getSclSchemaVersion(doc: Document): SclEdition {\n const scl: Element = doc.documentElement;\n const edition =\n (scl.getAttribute('version') ?? '2003') +\n (scl.getAttribute('revision') ?? '') +\n (scl.getAttribute('release') ?? '');\n return <SclEdition>edition;\n}\n\n/**\n * Extract the 'name' attribute from the given XML element.\n * @param element - The element to extract name from.\n * @returns the name, or undefined if there is no name.\n */\nexport function getNameAttribute(element: Element): string | undefined {\n const name = element.getAttribute('name');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'ldName' attribute from the given XML element.\n * @param element - The element to extract ldName from.\n * @returns the ldName, or undefined if there is no ldName.\n */\nexport function getLdNameAttribute(element: Element): string | undefined {\n const name = element.getAttribute('ldName');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'desc' attribute from the given XML element.\n * @param element - The element to extract description from.\n * @returns the name, or undefined if there is no description.\n */\nexport function getDescriptionAttribute(element: Element): string | undefined {\n const name = element.getAttribute('desc');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'pathName' attribute from the given XML element.\n * @param element - The element to extract path name from.\n * @returns the name, or undefined if there is no path name.\n */\nexport function getPathNameAttribute(element: Element): string | undefined {\n const name = element.getAttribute('pathName');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'inst' attribute from the given XML element.\n * @param element - The element to extract instance from.\n * @returns the instance, or undefined if there is no instance.\n */\nexport function getInstanceAttribute(element: Element): string | undefined {\n const inst = element.getAttribute('inst');\n return inst ? inst : undefined;\n}\n\nexport function pathParts(identity: string): [string, string] {\n const path = identity.split('>');\n const end = path.pop() ?? '';\n const start = path.join('>');\n return [start, end];\n}\n\nconst voidSelector = ':not(*)';\n\nfunction hitemIdentity(e: Element): string {\n return `${e.getAttribute('version')}\\t${e.getAttribute('revision')}`;\n}\n\nfunction hitemSelector(tagName: SCLTag, identity: string): string {\n const [version, revision] = identity.split('\\t');\n\n if (!version || !revision) return voidSelector;\n\n return `${tagName}[version=\"${version}\"][revision=\"${revision}\"]`;\n}\n\nfunction terminalIdentity(e: Element): string {\n return identity(e.parentElement) + '>' + e.getAttribute('connectivityNode');\n}\n\nfunction terminalSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, connectivityNode] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [`${tagName}[connectivityNode=\"${connectivityNode}\"]`]\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction lNodeIdentity(e: Element): string {\n const [iedName, ldInst, prefix, lnClass, lnInst, lnType] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'lnType',\n ].map(name => e.getAttribute(name));\n if (iedName === 'None')\n return `${identity(e.parentElement)}>(${lnClass} ${lnType} ${lnInst})`;\n return `${iedName} ${ldInst || '(Client)'}/${prefix ?? ''} ${lnClass} ${\n lnInst ?? ''\n }`;\n}\n\nfunction lNodeSelector(tagName: SCLTag, identity: string): string {\n if (identity.endsWith(')')) {\n const [parentIdentity, childIdentity] = pathParts(identity);\n const [lnClass, lnType, lnInst] = childIdentity\n .substring(1, childIdentity.length - 1)\n .split(' ');\n\n if (!lnClass || !lnType) return voidSelector;\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [`${tagName}[iedName=\"None\"][lnClass=\"${lnClass}\"][lnType=\"${lnType}\"][lnInst=\"${lnInst}\"]`]\n )\n .map(strings => strings.join(''))\n .join(',');\n }\n\n const [iedName, ldInst, prefix, lnClass, lnInst] = identity.split(/[ /]/);\n\n if (!iedName || !ldInst || !lnClass) return voidSelector;\n\n const [\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n ] = [\n [`[iedName=\"${iedName}\"]`],\n ldInst === '(Client)'\n ? [':not([ldInst])', '[ldInst=\"\"]']\n : [`[ldInst=\"${ldInst}\"]`],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n ];\n\n return crossProduct(\n [tagName],\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction kDCIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${e.getAttribute(\n 'iedName'\n )} ${e.getAttribute('apName')}`;\n}\n\nfunction kDCSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n const [iedName, apName] = childIdentity.split(' ');\n return `${selector(\n 'IED',\n parentIdentity\n )}>${tagName}[iedName=\"${iedName}\"][apName=\"${apName}\"]`;\n}\n\nfunction associationIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${\n e.getAttribute('associationID') ?? ''\n }`;\n}\n\nfunction associationSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, associationID] = pathParts(identity);\n\n if (!associationID) return voidSelector;\n\n return `${selector(\n 'Server',\n parentIdentity\n )}>${tagName}[associationID=\"${associationID}\"]`;\n}\n\nfunction lDeviceIdentity(e: Element): string {\n return `${identity(e.closest('IED')!)}>>${e.getAttribute('inst')}`;\n}\n\nfunction lDeviceSelector(tagName: SCLTag, identity: string): string {\n const [iedName, inst] = identity.split('>>');\n\n if (!inst) return voidSelector;\n\n return `IED[name=\"${iedName}\"] ${tagName}[inst=\"${inst}\"]`;\n}\n\nfunction iEDNameIdentity(e: Element): string {\n const iedName = e.textContent;\n const [apRef, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${apRef ? apRef : ''} ${\n ldInst ? ldInst : ''\n }/${prefix ?? ''} ${lnClass ?? ''} ${lnInst ?? ''}`;\n}\n\nfunction iEDNameSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [iedName, apRef, ldInst, prefix, lnClass, lnInst] =\n childIdentity.split(/[ /]/);\n\n const [\n parentSelectors,\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n ] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n [`${iedName}`],\n apRef ? [`[apRef=\"${apRef}\"]`] : [':not([apRef])', '[apRef=\"\"]'],\n ldInst ? [`[ldInst=\"${ldInst}\"]`] : [':not([ldInst])', '[ldInst=\"\"]'],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction fCDAIdentity(e: Element): string {\n const [ldInst, prefix, lnClass, lnInst, doName, daName, fc, ix] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'fc',\n 'ix',\n ].map(name => e.getAttribute(name));\n const dataPath = `${ldInst}/${prefix ?? ''} ${lnClass} ${\n lnInst ?? ''\n }.${doName} ${daName ? daName : ''}`;\n return `${identity(e.parentElement)}>${dataPath} (${fc}${\n ix ? ' [' + ix + ']' : ''\n })`;\n}\n\nfunction fCDASelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [ldInst, prefix, lnClass, lnInst] = childIdentity.split(/[ /.]/);\n\n const matchDoDa = childIdentity.match(\n /.([A-Z][A-Za-z0-9.]*) ([A-Za-z0-9.]*) \\(/\n );\n const doName = matchDoDa && matchDoDa[1] ? matchDoDa[1] : '';\n const daName = matchDoDa && matchDoDa[2] ? matchDoDa[2] : '';\n\n const matchFx = childIdentity.match(/\\(([A-Z]{2})/);\n const matchIx = childIdentity.match(/ \\[([0-9]{1,2})\\]/);\n\n const fc = matchFx && matchFx[1] ? matchFx[1] : '';\n const ix = matchIx && matchIx[1] ? matchIx[1] : '';\n\n const [\n parentSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n fcSelectors,\n ixSelectors,\n ] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n [`[ldInst=\"${ldInst}\"]`],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n [`[doName=\"${doName}\"]`],\n daName ? [`[daName=\"${daName}\"]`] : [':not([daName])', '[daName=\"\"]'],\n [`[fc=\"${fc}\"]`],\n ix ? [`[ix=\"${ix}\"]`] : [':not([ix])', '[ix=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n fcSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction extRefIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n const parentIdentity = identity(e.parentElement);\n const iedName = e.getAttribute('iedName');\n const intAddr = e.getAttribute('intAddr');\n const intAddrIndex = Array.from(\n e.parentElement.querySelectorAll(`ExtRef[intAddr=\"${intAddr}\"]`)\n ).indexOf(e);\n if (intAddr) return `${parentIdentity}>${intAddr}[${intAddrIndex}]`;\n const [\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n serviceType,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n srcCBName,\n ] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'serviceType',\n 'srcLDInst',\n 'srcPrefix',\n 'srcLNClass',\n 'srcLNInst',\n 'srcCBName',\n ].map(name => e.getAttribute(name));\n\n const cbPath = srcCBName\n ? `${serviceType}:${srcCBName} ${srcLDInst ?? ''}/${srcPrefix ?? ''} ${\n srcLNClass ?? ''\n } ${srcLNInst ?? ''}`\n : '';\n const dataPath = `${iedName} ${ldInst}/${prefix ?? ''} ${lnClass} ${\n lnInst ?? ''\n } ${doName} ${daName ? daName : ''}`;\n return `${parentIdentity}>${cbPath ? cbPath + ' ' : ''}${dataPath}${\n intAddr ? '@' + `${intAddr}` : ''\n }`;\n}\n\nfunction extRefSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n if (childIdentity.endsWith(']')) {\n const [intAddr] = childIdentity.split('[');\n const intAddrSelectors = [`[intAddr=\"${intAddr}\"]`];\n\n return crossProduct(parentSelectors, ['>'], [tagName], intAddrSelectors)\n .map(strings => strings.join(''))\n .join(',');\n }\n\n let iedName,\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n serviceType,\n srcCBName,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n intAddr;\n\n if (!childIdentity.includes(':') && !childIdentity.includes('@')) {\n [iedName, ldInst, prefix, lnClass, lnInst, doName, daName] =\n childIdentity.split(/[ /]/);\n } else if (childIdentity.includes(':') && !childIdentity.includes('@')) {\n [\n serviceType,\n srcCBName,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n iedName,\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n ] = childIdentity.split(/[ /:]/);\n } else if (!childIdentity.includes(':') && childIdentity.includes('@')) {\n [iedName, ldInst, prefix, lnClass, lnInst, doName, daName, intAddr] =\n childIdentity.split(/[ /@]/);\n } else {\n [\n serviceType,\n srcCBName,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n iedName,\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n intAddr,\n ] = childIdentity.split(/[ /:@]/);\n }\n\n const [\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n serviceTypeSelectors,\n srcCBNameSelectors,\n srcLDInstSelectors,\n srcPrefixSelectors,\n srcLNClassSelectors,\n srcLNInstSelectors,\n intAddrSelectors,\n ] = [\n iedName ? [`[iedName=\"${iedName}\"]`] : [':not([iedName])'],\n ldInst ? [`[ldInst=\"${ldInst}\"]`] : [':not([ldInst])', '[ldInst=\"\"]'],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n lnClass ? [`[lnClass=\"${lnClass}\"]`] : [':not([lnClass])'],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n doName ? [`[doName=\"${doName}\"]`] : [':not([doName])'],\n daName ? [`[daName=\"${daName}\"]`] : [':not([daName])', '[daName=\"\"]'],\n serviceType\n ? [`[serviceType=\"${serviceType}\"]`]\n : [':not([serviceType])', '[serviceType=\"\"]'],\n srcCBName\n ? [`[srcCBName=\"${srcCBName}\"]`]\n : [':not([srcCBName])', '[srcCBName=\"\"]'],\n srcLDInst\n ? [`[srcLDInst=\"${srcLDInst}\"]`]\n : [':not([srcLDInst])', '[srcLDInst=\"\"]'],\n srcPrefix\n ? [`[srcPrefix=\"${srcPrefix}\"]`]\n : [':not([srcPrefix])', '[srcPrefix=\"\"]'],\n srcLNClass\n ? [`[srcLNClass=\"${srcLNClass}\"]`]\n : [':not([srcLNClass])', '[srcLNClass=\"\"]'],\n srcLNInst\n ? [`[srcLNInst=\"${srcLNInst}\"]`]\n : [':not([srcLNInst])', '[srcLNInst=\"\"]'],\n intAddr ? [`[intAddr=\"${intAddr}\"]`] : [':not([intAddr])', '[intAddr=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n serviceTypeSelectors,\n srcCBNameSelectors,\n srcLDInstSelectors,\n srcPrefixSelectors,\n srcLNClassSelectors,\n srcLNInstSelectors,\n intAddrSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction lNIdentity(e: Element): string {\n const [prefix, lnClass, inst] = ['prefix', 'lnClass', 'inst'].map(name =>\n e.getAttribute(name)\n );\n return `${identity(e.parentElement)}>${prefix ?? ''} ${lnClass} ${inst}`;\n}\n\nfunction lNSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n const [prefix, lnClass, inst] = childIdentity.split(' ');\n\n if (!lnClass) return voidSelector;\n\n const [prefixSelectors, lnClassSelectors, instSelectors] = [\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n [`[inst=\"${inst}\"]`],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n prefixSelectors,\n lnClassSelectors,\n instSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction clientLNIdentity(e: Element): string {\n const [apRef, iedName, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${\n apRef ? apRef : ''\n } ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst}`;\n}\n\nfunction clientLNSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n const [iedName, apRef, ldInst, prefix, lnClass, lnInst] =\n childIdentity.split(/[ /]/);\n\n const [\n iedNameSelectors,\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n ] = [\n iedName ? [`[iedName=\"${iedName}\"]`] : [':not([iedName])', '[iedName=\"\"]'],\n apRef ? [`[apRef=\"${apRef}\"]`] : [':not([apRef])', '[apRef=\"\"]'],\n ldInst ? [`[ldInst=\"${ldInst}\"]`] : [':not([ldInst])', '[ldInst=\"\"]'],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n iedNameSelectors,\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction ixNamingIdentity(e: Element): string {\n const [name, ix] = ['name', 'ix'].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${name}${ix ? '[' + ix + ']' : ''}`;\n}\n\nfunction ixNamingSelector(\n tagName: SCLTag,\n identity: string,\n depth = -1\n): string {\n if (depth === -1) depth = identity.split('>').length;\n\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [_0, name, _1, ix] =\n childIdentity.match(/([^[]*)(\\[([0-9]*)\\])?/) ?? [];\n\n if (!name) return voidSelector;\n\n if (depth === 0) return `${tagName}[name=\"${name}\"]`;\n\n const parentSelectors = tags[tagName].parents\n .flatMap(parentTag =>\n parentTag === 'SDI'\n ? ixNamingSelector(parentTag, parentIdentity, depth - 1).split(',')\n : selector(parentTag, parentIdentity).split(',')\n )\n .filter(selector => !selector.startsWith(voidSelector));\n\n if (parentSelectors.length === 0) return voidSelector;\n\n const [nameSelectors, ixSelectors] = [\n [`[name=\"${name}\"]`],\n ix ? [`[ix=\"${ix}\"]`] : ['[ix=\"\"]', ':not([ix])'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n nameSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction valIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n const sGroup = e.getAttribute('sGroup');\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('sGroup') === sGroup)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${sGroup ? sGroup + '.' : ''} ${index}`;\n}\n\nfunction valSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [sGroup, indexText] = childIdentity.split(' ');\n const index = parseFloat(indexText);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n const [nameSelectors, ixSelectors] = [\n sGroup ? [`[sGroup=\"${sGroup}\"]`] : [''],\n index ? [`:nth-child(${index + 1})`] : [''],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n nameSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction connectedAPIdentity(e: Element): string {\n const [iedName, apName] = ['iedName', 'apName'].map(name =>\n e.getAttribute(name)\n );\n return `${iedName} ${apName}`;\n}\n\nfunction connectedAPSelector(tagName: SCLTag, identity: string): string {\n const [iedName, apName] = identity.split(' ');\n if (!iedName || !apName) return voidSelector;\n return `${tagName}[iedName=\"${iedName}\"][apName=\"${apName}\"]`;\n}\n\nfunction controlBlockIdentity(e: Element): string {\n const [ldInst, cbName] = ['ldInst', 'cbName'].map(name =>\n e.getAttribute(name)\n );\n return `${ldInst} ${cbName}`;\n}\n\nfunction controlBlockSelector(tagName: SCLTag, identity: string): string {\n const [ldInst, cbName] = identity.split(' ');\n\n if (!ldInst || !cbName) return voidSelector;\n\n return `${tagName}[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`;\n}\n\nfunction physConnIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n if (!e.parentElement.querySelector('PhysConn[type=\"RedConn\"]')) return NaN;\n const pcType = e.getAttribute('type');\n if (\n e.parentElement.children.length > 1 &&\n pcType !== 'Connection' &&\n pcType !== 'RedConn'\n )\n return NaN;\n return `${identity(e.parentElement)}>${pcType}`;\n}\n\nfunction physConnSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, pcType] = pathParts(identity);\n\n const [parentSelectors, typeSelectors] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n pcType ? [`[type=\"${pcType}\"]`] : [''],\n ];\n\n return crossProduct(parentSelectors, ['>'], [tagName], typeSelectors)\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction pIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n const eParent = e.parentElement;\n const eType = e.getAttribute('type');\n if (eParent.tagName === 'PhysConn')\n return `${identity(e.parentElement)}>${eType}`;\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('type') === eType)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${eType} [${index}]`;\n}\n\nfunction pSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [type] = childIdentity.split(' ');\n const index =\n childIdentity &&\n childIdentity.match(/\\[([0-9]+)\\]/) &&\n childIdentity.match(/\\[([0-9]+)\\]/)![1]\n ? parseFloat(childIdentity.match(/\\[([0-9]+)\\]/)![1])\n : NaN;\n\n const [parentSelectors, typeSelectors, ixSelectors] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n [`[type=\"${type}\"]`],\n index ? [`:nth-child(${index + 1})`] : [''],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n typeSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction enumValIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${e.getAttribute('ord')}`;\n}\n\nfunction enumValSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, ord] = pathParts(identity);\n return `${selector('EnumType', parentIdentity)}>${tagName}[ord=\"${ord}\"]`;\n}\n\nfunction protNsIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${e.getAttribute('type') || '8-MMS'}\\t${\n e.textContent\n }`;\n}\n\nfunction protNsSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [type, value] = childIdentity.split('\\t');\n\n const [parentSelectors] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n [`[type=\"${type}\"]`],\n ['>'],\n [value]\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction sCLIdentity(): string {\n return '';\n}\n\nfunction sCLSelector(): string {\n return ':root';\n}\n\nfunction namingIdentity(e: Element): string {\n return e.parentElement!.tagName === 'SCL'\n ? e.getAttribute('name')!\n : `${identity(e.parentElement)}>${e.getAttribute('name')}`;\n}\n\nfunction namingSelector(tagName: SCLTag, identity: string, depth = -1): string {\n if (depth === -1) depth = identity.split('>').length;\n\n const [parentIdentity, name] = pathParts(identity);\n if (!name) return voidSelector;\n if (depth === 0) return `${tagName}[name=\"${name}\"]`;\n\n const parents = tags[tagName].parents;\n if (!parents) return voidSelector;\n\n const parentSelectors = parents\n .flatMap(parentTag =>\n tags[parentTag].selector === tags['Substation'].selector\n ? namingSelector(parentTag, parentIdentity, depth - 1).split(',')\n : selector(parentTag, parentIdentity).split(',')\n )\n .filter(selector => !selector.startsWith(voidSelector));\n\n if (parentSelectors.length === 0) return voidSelector;\n\n return crossProduct(parentSelectors, ['>'], [tagName], [`[name=\"${name}\"]`])\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction singletonIdentity(e: Element): string {\n return identity(e.parentElement).toString();\n}\n\nfunction singletonSelector(tagName: SCLTag, identity: string): string {\n const parents = tags[tagName].parents;\n if (!parents) return voidSelector;\n\n const parentSelectors = parents\n .flatMap(parentTag => selector(parentTag, identity).split(','))\n .filter(selector => !selector.startsWith(voidSelector));\n\n if (parentSelectors.length === 0) return voidSelector;\n\n return crossProduct(parentSelectors, ['>'], [tagName])\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction idNamingIdentity(e: Element): string {\n return `#${e.id}`;\n}\n\nfunction idNamingSelector(tagName: SCLTag, identity: string): string {\n const id = identity.replace(/^#/, '');\n\n if (!id) return voidSelector;\n\n return `${tagName}[id=\"${id}\"]`;\n}\n\ntype IdentityFunction = (e: Element) => string | number;\ntype SelectorFunction = (tagName: SCLTag, identity: string) => string;\n\nconst tAbstractConductingEquipment = [\n 'TransformerWinding',\n 'ConductingEquipment',\n] as const;\n\nconst tEquipment = [\n 'GeneralEquipment',\n 'PowerTransformer',\n ...tAbstractConductingEquipment,\n] as const;\nconst tEquipmentContainer = ['Substation', 'VoltageLevel', 'Bay'] as const;\nconst tGeneralEquipmentContainer = ['Process', 'Line'] as const;\nconst tAbstractEqFuncSubFunc = ['EqSubFunction', 'EqFunction'] as const;\n\nconst tPowerSystemResource = [\n 'SubFunction',\n 'Function',\n 'TapChanger',\n 'SubEquipment',\n ...tEquipment,\n ...tEquipmentContainer,\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n] as const;\nconst tLNodeContainer = ['ConnectivityNode', ...tPowerSystemResource] as const;\nconst tCertificate = ['GOOSESecurity', 'SMVSecurity'] as const;\nconst tNaming = ['SubNetwork', ...tCertificate, ...tLNodeContainer] as const;\n\nconst tAbstractDataAttribute = ['BDA', 'DA'] as const;\nconst tControlWithIEDName = ['SampledValueControl', 'GSEControl'] as const;\nconst tControlWithTriggerOpt = ['LogControl', 'ReportControl'] as const;\nconst tControl = [...tControlWithIEDName, ...tControlWithTriggerOpt] as const;\nconst tControlBlock = ['GSE', 'SMV'] as const;\nconst tUnNaming = [\n 'ConnectedAP',\n 'PhysConn',\n 'SDO',\n 'DO',\n 'DAI',\n 'SDI',\n 'DOI',\n 'Inputs',\n 'RptEnabled',\n 'Server',\n 'ServerAt',\n 'SettingControl',\n 'Communication',\n 'Log',\n 'LDevice',\n 'DataSet',\n 'AccessPoint',\n 'IED',\n 'NeutralPoint',\n ...tControl,\n ...tControlBlock,\n ...tAbstractDataAttribute,\n] as const;\n\nconst tAnyLN = ['LN0', 'LN'] as const;\n\nconst tAnyContentFromOtherNamespace = [\n 'Text',\n 'Private',\n 'Hitem',\n 'AccessControl',\n] as const;\n\nconst tCert = ['Subject', 'IssuerName'] as const;\nconst tDurationInMilliSec = ['MinTime', 'MaxTime'] as const;\n\nconst tIDNaming = ['LNodeType', 'DOType', 'DAType', 'EnumType'] as const;\n\nconst tServiceYesNo = [\n 'FileHandling',\n 'TimeSyncProt',\n 'CommProt',\n 'SGEdit',\n 'ConfSG',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'GetCBValues',\n 'GSEDir',\n 'ConfLdName',\n] as const;\n\nconst tServiceWithMaxAndMaxAttributes = ['DynDataSet', 'ConfDataSet'] as const;\n\nconst tServiceWithMax = [\n 'GSSE',\n 'GOOSE',\n 'ConfReportControl',\n 'SMVsc',\n ...tServiceWithMaxAndMaxAttributes,\n] as const;\n\nconst tServiceWithMaxNonZero = ['ConfLogControl', 'ConfSigRef'] as const;\n\nconst tServiceSettings = [\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n] as const;\n\nconst tBaseElement = ['SCL', ...tNaming, ...tUnNaming, ...tIDNaming] as const;\n\nconst sCLTags = [\n ...tBaseElement,\n ...tAnyContentFromOtherNamespace,\n 'Header',\n 'LNode',\n 'Val',\n 'Voltage',\n 'Services',\n ...tCert,\n ...tDurationInMilliSec,\n 'Association',\n 'FCDA',\n 'ClientLN',\n 'IEDName',\n 'ExtRef',\n 'Protocol',\n ...tAnyLN,\n ...tServiceYesNo,\n 'DynAssociation',\n 'SettingGroups',\n ...tServiceWithMax,\n ...tServiceWithMaxNonZero,\n ...tServiceSettings,\n 'ConfLNs',\n 'ClientServices',\n 'SupSubscription',\n 'ValueHandling',\n 'RedProt',\n 'McSecurity',\n 'KDC',\n 'Address',\n 'P',\n 'ProtNs',\n 'EnumVal',\n 'Terminal',\n 'BitRate',\n 'Authentication',\n 'DataTypeTemplates',\n 'History',\n 'OptFields',\n 'SmvOpts',\n 'TrgOps',\n 'SamplesPerSec',\n 'SmpRate',\n 'SecPerSamples',\n] as const;\n\nexport type SCLTag = (typeof sCLTags)[number];\n\nconst tagSet = new Set<string>(sCLTags);\n\nfunction isSCLTag(tag: string): tag is SCLTag {\n return tagSet.has(tag);\n}\n\nconst tBaseNameSequence = ['Text', 'Private'] as const;\nconst tNamingSequence = [...tBaseNameSequence] as const;\nconst tUnNamingSequence = [...tBaseNameSequence] as const;\nconst tIDNamingSequence = [...tBaseNameSequence] as const;\n\nconst tAbstractDataAttributeSequence = [...tUnNamingSequence, 'Val'] as const;\nconst tLNodeContainerSequence = [...tNamingSequence, 'LNode'] as const;\nconst tPowerSystemResourceSequence = [...tLNodeContainerSequence] as const;\nconst tEquipmentSequence = [...tPowerSystemResourceSequence] as const;\nconst tEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'PowerTransformer',\n 'GeneralEquipment',\n] as const;\nconst tAbstractConductingEquipmentSequence = [\n ...tEquipmentSequence,\n 'Terminal',\n] as const;\nconst tControlBlockSequence = [...tUnNamingSequence, 'Address'] as const;\nconst tControlSequence = [...tNamingSequence] as const;\nconst tControlWithIEDNameSequence = [...tControlSequence, 'IEDName'] as const;\nconst tAnyLNSequence = [\n ...tUnNamingSequence,\n 'DataSet',\n 'ReportControl',\n 'LogControl',\n 'DOI',\n 'Inputs',\n 'Log',\n] as const;\nconst tGeneralEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'Function',\n] as const;\nconst tControlWithTriggerOptSequence = [...tControlSequence, 'TrgOps'] as const;\nconst tAbstractEqFuncSubFuncSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'EqSubFunction',\n] as const;\n\nexport const tags: Record<\n SCLTag,\n {\n identity: IdentityFunction;\n selector: SelectorFunction;\n parents: SCLTag[];\n children: SCLTag[];\n }\n> = {\n AccessControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['LDevice'],\n children: [],\n },\n AccessPoint: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['IED'],\n children: [\n ...tNamingSequence,\n 'Server',\n 'LN',\n 'ServerAt',\n 'Services',\n 'GOOSESecurity',\n 'SMVSecurity',\n ],\n },\n Address: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ConnectedAP', 'GSE', 'SMV'],\n children: ['P'],\n },\n Association: {\n identity: associationIdentity,\n selector: associationSelector,\n parents: ['Server'],\n children: [],\n },\n Authentication: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Server'],\n children: [],\n },\n BDA: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['DAType'],\n children: [...tAbstractDataAttributeSequence],\n },\n BitRate: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SubNetwork'],\n children: [],\n },\n Bay: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['VoltageLevel'],\n children: [\n ...tEquipmentContainerSequence,\n 'ConductingEquipment',\n 'ConnectivityNode',\n 'Function',\n ],\n },\n ClientLN: {\n identity: clientLNIdentity,\n selector: clientLNSelector,\n parents: ['RptEnabled'],\n children: [],\n },\n ClientServices: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: ['TimeSyncProt', 'McSecurity'],\n },\n CommProt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Communication: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'SubNetwork'],\n },\n ConductingEquipment: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Process', 'Line', 'SubFunction', 'Function', 'Bay'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n ConfDataSet: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfLdName: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfLNs: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfLogControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfReportControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfSG: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SettingGroups'],\n children: [],\n },\n ConfSigRef: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConnectedAP: {\n identity: connectedAPIdentity,\n selector: connectedAPSelector,\n parents: ['SubNetwork'],\n children: [...tUnNamingSequence, 'Address', 'GSE', 'SMV', 'PhysConn'],\n },\n ConnectivityNode: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Bay', 'Line'],\n children: [...tLNodeContainerSequence],\n },\n DA: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['DOType'],\n children: [...tAbstractDataAttributeSequence],\n },\n DAI: {\n identity: ixNamingIdentity,\n selector: ixNamingSelector,\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'Val'],\n },\n DAType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'BDA', 'ProtNs'],\n },\n DO: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['LNodeType'],\n children: [...tUnNamingSequence],\n },\n DOI: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n DOType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'SDO', 'DA'],\n },\n DataObjectDirectory: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n DataSet: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tNamingSequence, 'FCDA'],\n },\n DataSetDirectory: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n DataTypeTemplates: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SCL'],\n children: ['LNodeType', 'DOType', 'DAType', 'EnumType'],\n },\n DynAssociation: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n DynDataSet: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n EnumType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'EnumVal'],\n },\n EnumVal: {\n identity: enumValIdentity,\n selector: enumValSelector,\n parents: ['EnumType'],\n children: [],\n },\n EqFunction: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [\n 'GeneralEquipment',\n 'TapChanger',\n 'TransformerWinding',\n 'PowerTransformer',\n 'SubEquipment',\n 'ConductingEquipment',\n ],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n EqSubFunction: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['EqSubFunction', 'EqFunction'],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n ExtRef: {\n identity: extRefIdentity,\n selector: extRefSelector,\n parents: ['Inputs'],\n children: [],\n },\n FCDA: {\n identity: fCDAIdentity,\n selector: fCDASelector,\n parents: ['DataSet'],\n children: [],\n },\n FileHandling: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Function: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Bay', 'VoltageLevel', 'Substation', 'Process', 'Line'],\n children: [\n ...tPowerSystemResourceSequence,\n 'SubFunction',\n 'GeneralEquipment',\n 'ConductingEquipment',\n ],\n },\n GeneralEquipment: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [\n 'SubFunction',\n 'Function',\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n ...tEquipmentContainer,\n ],\n children: [...tEquipmentSequence, 'EqFunction'],\n },\n GetCBValues: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GetDataObjectDefinition: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GetDataSetValue: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GetDirectory: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GOOSE: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GOOSESecurity: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n GSE: {\n identity: controlBlockIdentity,\n selector: controlBlockSelector,\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence, 'MinTime', 'MaxTime'],\n },\n GSEDir: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GSEControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'Protocol'],\n },\n GSESettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GSSE: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Header: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SCL'],\n children: ['Text', 'History'],\n },\n History: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Header'],\n children: ['Hitem'],\n },\n Hitem: {\n identity: hitemIdentity,\n selector: hitemSelector,\n parents: ['History'],\n children: [],\n },\n IED: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'Services', 'AccessPoint', 'KDC'],\n },\n IEDName: {\n identity: iEDNameIdentity,\n selector: iEDNameSelector,\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n Inputs: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'ExtRef'],\n },\n IssuerName: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n KDC: {\n identity: kDCIdentity,\n selector: kDCSelector,\n parents: ['IED'],\n children: [],\n },\n LDevice: {\n identity: lDeviceIdentity,\n selector: lDeviceSelector,\n parents: ['Server'],\n children: [...tUnNamingSequence, 'LN0', 'LN', 'AccessControl'],\n },\n LN: {\n identity: lNIdentity,\n selector: lNSelector,\n parents: ['AccessPoint', 'LDevice'],\n children: [...tAnyLNSequence],\n },\n LN0: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['LDevice'],\n children: [\n ...tAnyLNSequence,\n 'GSEControl',\n 'SampledValueControl',\n 'SettingControl',\n ],\n },\n LNode: {\n identity: lNodeIdentity,\n selector: lNodeSelector,\n parents: [...tLNodeContainer],\n children: [...tUnNamingSequence],\n },\n LNodeType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'DO'],\n },\n Line: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'Voltage',\n 'ConductingEquipment',\n ],\n },\n Log: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tUnNamingSequence],\n },\n LogControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence],\n },\n LogSettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n MaxTime: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSE'],\n children: [],\n },\n McSecurity: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSESettings', 'SMVSettings', 'ClientServices'],\n children: [],\n },\n MinTime: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSE'],\n children: [],\n },\n NeutralPoint: {\n identity: terminalIdentity,\n selector: terminalSelector,\n parents: ['TransformerWinding'],\n children: [...tUnNamingSequence],\n },\n OptFields: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ReportControl'],\n children: [],\n },\n P: {\n identity: pIdentity,\n selector: pSelector,\n parents: ['Address', 'PhysConn'],\n children: [],\n },\n PhysConn: {\n identity: physConnIdentity,\n selector: physConnSelector,\n parents: ['ConnectedAP'],\n children: [...tUnNamingSequence, 'P'],\n },\n PowerTransformer: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tEquipmentContainer],\n children: [\n ...tEquipmentSequence,\n 'TransformerWinding',\n 'SubEquipment',\n 'EqFunction',\n ],\n },\n Private: {\n identity: () => NaN,\n selector: () => voidSelector,\n parents: [],\n children: [],\n },\n Process: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'ConductingEquipment',\n 'Substation',\n 'Line',\n 'Process',\n ],\n },\n ProtNs: {\n identity: protNsIdentity,\n selector: protNsSelector,\n parents: ['DAType', 'DA'],\n children: [],\n },\n Protocol: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n ReadWrite: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n RedProt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ReportControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence, 'OptFields', 'RptEnabled'],\n },\n ReportSettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n RptEnabled: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ReportControl'],\n children: [...tUnNamingSequence, 'ClientLN'],\n },\n SamplesPerSec: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SMVSettings'],\n children: [],\n },\n SampledValueControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'SmvOpts'],\n },\n SecPerSamples: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SMVSettings'],\n children: [],\n },\n SCL: {\n identity: sCLIdentity,\n selector: sCLSelector,\n parents: [],\n children: [\n ...tBaseNameSequence,\n 'Header',\n 'Substation',\n 'Communication',\n 'IED',\n 'DataTypeTemplates',\n 'Line',\n 'Process',\n ],\n },\n SDI: {\n identity: ixNamingIdentity,\n selector: ixNamingSelector,\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n SDO: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['DOType'],\n children: [...tNamingSequence],\n },\n Server: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['AccessPoint'],\n children: [\n ...tUnNamingSequence,\n 'Authentication',\n 'LDevice',\n 'Association',\n ],\n },\n ServerAt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['AccessPoint'],\n children: [...tUnNamingSequence],\n },\n Services: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['IED', 'AccessPoint'],\n children: [\n 'DynAssociation',\n 'SettingGroups',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ConfDataSet',\n 'DynDataSet',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'ConfReportControl',\n 'GetCBValues',\n 'ConfLogControl',\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n 'GSEDir',\n 'GOOSE',\n 'GSSE',\n 'SMVsc',\n 'FileHandling',\n 'ConfLNs',\n 'ClientServices',\n 'ConfLdName',\n 'SupSubscription',\n 'ConfSigRef',\n 'ValueHandling',\n 'RedProt',\n 'TimeSyncProt',\n 'CommProt',\n ],\n },\n SetDataSetValue: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n SettingControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['LN0'],\n children: [...tUnNamingSequence],\n },\n SettingGroups: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: ['SGEdit', 'ConfSG'],\n },\n SGEdit: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SettingGroups'],\n children: [],\n },\n SmpRate: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SMVSettings'],\n children: [],\n },\n SMV: {\n identity: controlBlockIdentity,\n selector: controlBlockSelector,\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence],\n },\n SmvOpts: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SampledValueControl'],\n children: [],\n },\n SMVsc: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n SMVSecurity: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n SMVSettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: ['SmpRate', 'SamplesPerSec', 'SecPerSamples', 'McSecurity'],\n },\n SubEquipment: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [\n 'TapChanger',\n 'PowerTransformer',\n 'ConductingEquipment',\n 'TransformerWinding',\n ...tAbstractConductingEquipment,\n ],\n children: [...tPowerSystemResourceSequence, 'EqFunction'],\n },\n SubFunction: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['SubFunction', 'Function'],\n children: [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'ConductingEquipment',\n 'SubFunction',\n ],\n },\n SubNetwork: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Communication'],\n children: [...tNamingSequence, 'BitRate', 'ConnectedAP'],\n },\n Subject: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n Substation: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['SCL'],\n children: [...tEquipmentContainerSequence, 'VoltageLevel', 'Function'],\n },\n SupSubscription: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n TapChanger: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['TransformerWinding'],\n children: [...tPowerSystemResourceSequence, 'SubEquipment', 'EqFunction'],\n },\n Terminal: {\n identity: terminalIdentity,\n selector: terminalSelector,\n parents: [...tEquipment],\n children: [...tUnNamingSequence],\n },\n Text: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: sCLTags.filter(tag => tag !== 'Text' && tag !== 'Private'),\n children: [],\n },\n TimerActivatedControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n TimeSyncProt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services', 'ClientServices'],\n children: [],\n },\n TransformerWinding: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['PowerTransformer'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'TapChanger',\n 'NeutralPoint',\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n TrgOps: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ReportControl'],\n children: [],\n },\n Val: {\n identity: valIdentity,\n selector: valSelector,\n parents: ['DAI', 'DA', 'BDA'],\n children: [],\n },\n ValueHandling: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Voltage: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['VoltageLevel'],\n children: [],\n },\n VoltageLevel: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Substation'],\n children: [...tEquipmentContainerSequence, 'Voltage', 'Bay', 'Function'],\n },\n};\n\nexport function getReference(parent: Element, tag: SCLTag): Element | null {\n const parentTag = parent.tagName;\n const children = Array.from(parent.children);\n\n if (\n parentTag === 'Services' ||\n parentTag === 'SettingGroups' ||\n !isSCLTag(parentTag)\n )\n return children.find(child => child.tagName === tag) ?? null;\n\n const sequence = tags[parentTag]?.children ?? [];\n let index = sequence.findIndex(element => element === tag);\n\n if (index < 0) return null;\n\n let nextSibling: Element | undefined;\n while (index < sequence.length && !nextSibling) {\n nextSibling = children.find(child => child.tagName === sequence[index]);\n index++;\n }\n\n return nextSibling ?? null;\n}\n\nfunction selector(tagName: string, identity: string | number): string {\n if (typeof identity !== 'string') return voidSelector;\n\n if (isSCLTag(tagName)) return tags[tagName].selector(tagName, identity);\n\n return tagName;\n}\n\nexport function find(\n root: XMLDocument | Element | DocumentFragment,\n tagName: string,\n identity: string | number\n): Element | null {\n if (typeof identity !== 'string' || !isSCLTag(tagName)) return null;\n\n const element = root.querySelector(tags[tagName].selector(tagName, identity));\n\n if (element === null || isPublic(element)) return element;\n\n return (\n Array.from(\n root.querySelectorAll(tags[tagName].selector(tagName, identity))\n ).find(isPublic) ?? null\n );\n}\n\n/** @returns a string uniquely identifying `e` in its document, or NaN if `e`\n * is unidentifiable. */\nexport function identity(e: Element | null): string | number {\n if (e === null) return NaN;\n if (e.closest('Private')) return NaN;\n const tag = e.tagName;\n\n if (isSCLTag(tag)) return tags[tag].identity(e);\n\n return NaN;\n}\n\n/** @returns whether `a` and `b` are considered identical by IEC-61850 */\nexport function isSame(a: Element, b: Element): boolean {\n if (a.tagName === 'Private')\n return isSame(a.parentElement!, b.parentElement!) && a.isEqualNode(b);\n return a.tagName === b.tagName && identity(a) === identity(b);\n}\n\nexport function isEqual(a: Element, b: Element): boolean {\n if (a.closest('Private') || b.closest('Private')) return a.isEqualNode(b);\n\n const attributeNames = new Set(\n a.getAttributeNames().concat(b.getAttributeNames())\n );\n for (const name of attributeNames)\n if (a.getAttribute(name) !== b.getAttribute(name)) return false;\n\n if (a.childElementCount === 0)\n return (\n b.childElementCount === 0 &&\n a.textContent?.trim() === b.textContent?.trim()\n );\n\n const aChildren = Array.from(a.children);\n const bChildren = Array.from(b.children);\n\n for (const aChild of aChildren) {\n const twindex = bChildren.findIndex(bChild => isEqual(aChild, bChild));\n if (twindex === -1) return false;\n bChildren.splice(twindex, 1);\n }\n\n for (const bChild of bChildren)\n if (!aChildren.find(aChild => isEqual(bChild, aChild))) return false;\n\n return true;\n}\n\n/** A directive rendering its argument `rendered` only if `rendered !== {}`. */\nexport const ifImplemented = directive(rendered => (part: Part) => {\n if (Object.keys(rendered).length) part.setValue(rendered);\n else part.setValue('');\n});\n\n/** Constructor type for defining `LitElement` mixins. */\nexport type LitElementConstructor = new (...args: any[]) => LitElement;\n\n/** The type returned by `MyMixin(...)` is `Mixin<typeof MyMixin>`. */\nexport type Mixin<T extends (...args: any[]) => any> = InstanceType<\n ReturnType<T>\n>;\n\nconst nameStartChar =\n '[:_A-Za-z]|[\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|[\\u0370-\\u037D]' +\n '|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]' +\n '|[\\u3001-\\uD7FF]|[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]';\nconst nameChar =\n nameStartChar + '|[.0-9\\\\-]|\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]';\nconst name = nameStartChar + '(' + nameChar + ')*';\nconst nmToken = '\\\\S+';\n\nexport const patterns = {\n string:\n '([\\u0009-\\u000A]|[\\u000D]|[\\u0020-\\u007E]|[\\u0085]|[\\u00A0-\\uD7FF]' +\n '|[\\uE000-\\uFFFD])*',\n normalizedString:\n '([\\u0020-\\u007E]|[\\u0085]|[\\u00A0-\\uD7FF]|[\\uE000-\\uFFFD])*',\n name,\n nmToken,\n names: name + '( ' + name + ')*',\n nmTokens: nmToken + '( ' + nmToken + ')*',\n decimal: '[+\\\\-]?[0-9]+(([.][0-9]*)?|([.][0-9]+))',\n unsigned: '[+]?[0-9]+(([.][0-9]*)?|([.][0-9]+))',\n integer: '[+\\\\-]?[0-9]+([0-9]*)',\n alphanumericFirstUpperCase: '[A-Z][0-9,A-Z,a-z]*',\n alphanumericFirstLowerCase: '[a-z][0-9,A-Z,a-z]*',\n lnClass: '(LLN0)|[A-Z]{4,4}',\n};\n\n/** Sorts selected `ListItem`s to the top and disabled ones to the bottom. */\nexport function compareNames(a: Element | string, b: Element | string): number {\n if (typeof a === 'string' && typeof b === 'string') return a.localeCompare(b);\n\n if (typeof a === 'object' && typeof b === 'string')\n return (a.getAttribute('name') ?? '').localeCompare(b);\n\n if (typeof a === 'string' && typeof b === 'object')\n return a.localeCompare(b.getAttribute('name')!);\n\n if (typeof a === 'object' && typeof b === 'object')\n return (a.getAttribute('name') ?? '').localeCompare(\n b.getAttribute('name') ?? ''\n );\n\n return 0;\n}\n\n/** @returns the cartesian product of `arrays` */\nexport function crossProduct<T>(...arrays: T[][]): T[][] {\n return arrays.reduce<T[][]>(\n (a, b) => <T[][]>a.flatMap(d => b.map(e => [d, e].flat())),\n [[]]\n );\n}\n\n/** @returns the depth of `t` if it is an object or array, zero otherwise. */\nexport function depth(t: Record<string, unknown>, mem = new WeakSet()): number {\n if (mem.has(t)) return Infinity;\n else\n switch (t?.constructor) {\n case Object:\n case Array:\n mem.add(t);\n return (\n 1 +\n Math.max(\n -1,\n ...Object.values(t).map(_ => depth(<Record<string, unknown>>_, mem))\n )\n );\n default:\n return 0;\n }\n}\n\nexport function findFCDAs(extRef: Element): Element[] {\n if (extRef.tagName !== 'ExtRef' || extRef.closest('Private')) return [];\n\n const [iedName, ldInst, prefix, lnClass, lnInst, doName, daName] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n ].map(name => extRef.getAttribute(name));\n const ied = Array.from(extRef.ownerDocument.getElementsByTagName('IED')).find(\n element =>\n element.getAttribute('name') === iedName && !element.closest('Private')\n );\n if (!ied) return [];\n\n return Array.from(ied.getElementsByTagName('FCDA'))\n .filter(item => !item.closest('Private'))\n .filter(\n fcda =>\n (fcda.getAttribute('ldInst') ?? '') === (ldInst ?? '') &&\n (fcda.getAttribute('prefix') ?? '') === (prefix ?? '') &&\n (fcda.getAttribute('lnClass') ?? '') === (lnClass ?? '') &&\n (fcda.getAttribute('lnInst') ?? '') === (lnInst ?? '') &&\n (fcda.getAttribute('doName') ?? '') === (doName ?? '') &&\n (fcda.getAttribute('daName') ?? '') === (daName ?? '')\n );\n}\n\nconst serviceTypeControlBlockTags: Partial<Record<string, string[]>> = {\n GOOSE: ['GSEControl'],\n SMV: ['SampledValueControl'],\n Report: ['ReportControl'],\n NONE: ['LogControl', 'GSEControl', 'SampledValueControl', 'ReportControl'],\n};\n\nexport function findControlBlocks(extRef: Element): Set<Element> {\n const fcdas = findFCDAs(extRef);\n const cbTags =\n serviceTypeControlBlockTags[extRef.getAttribute('serviceType') ?? 'NONE'] ??\n [];\n const controlBlocks = new Set(\n fcdas.flatMap(fcda => {\n const dataSet = fcda.parentElement!;\n const dsName = dataSet.getAttribute('name') ?? '';\n const anyLN = dataSet.parentElement!;\n return cbTags\n .flatMap(tag => Array.from(anyLN.getElementsByTagName(tag)))\n .filter(cb => cb.getAttribute('datSet') === dsName);\n })\n );\n return controlBlocks;\n}\n\nexport function isPublic(element: Element): boolean {\n return !element.closest('Private');\n}\n\n/** @returns the version of the SCL project */\nexport function getVersion(element: Element): string {\n const header = Array.from(\n element.ownerDocument.getElementsByTagName('Header')\n ).filter(item => !item.closest('Private'));\n\n return header[0].getAttribute('version') ?? '2003';\n}\n\n/** maximum value for `lnInst` attribute */\nconst maxLnInst = 99;\nconst lnInstRange = Array(maxLnInst)\n .fill(1)\n .map((_, i) => `${i + 1}`);\n\n/**\n * @param parent - The LNodes' parent element to be scanned once for `lnInst`\n * values already in use. Be sure to create a new generator every time the\n * children of this element change.\n * @returns a function generating increasing unused `lnInst` values for\n * `lnClass` LNodes within `parent` on subsequent invocations\n */\nexport function newLnInstGenerator(\n parent: Element\n): (lnClass: string) => string | undefined {\n const generators = new Map<string, () => string | undefined>();\n\n return (lnClass: string) => {\n if (!generators.has(lnClass)) {\n const lnInsts = new Set(\n getChildElementsByTagName(parent, 'LNode')\n .filter(lnode => lnode.getAttribute('lnClass') === lnClass)\n .map(lNode => lNode.getAttribute('lnInst')!)\n );\n\n generators.set(lnClass, () => {\n const uniqueLnInst = lnInstRange.find(lnInst => !lnInsts.has(lnInst));\n if (uniqueLnInst) lnInsts.add(uniqueLnInst);\n return uniqueLnInst;\n });\n }\n\n return generators.get(lnClass)!();\n };\n}\n\n/**\n * @param lnElements - The LN elements to be scanned for `inst`\n * values already in use.\n * @returns first available inst value for LN or undefined if no inst is available\n */\nexport function minAvailableLogicalNodeInstance(\n lnElements: Element[]\n): string | undefined {\n const lnInsts = new Set(lnElements.map(ln => ln.getAttribute('inst') || ''));\n return lnInstRange.find(lnInst => !lnInsts.has(lnInst));\n}\n\ndeclare global {\n interface ElementEventMap {\n ['wizard']: WizardEvent;\n }\n}\n"]}
1
+ {"version":3,"file":"foundation.js","sourceRoot":"","sources":["../src/foundation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAQ,MAAM,UAAU,CAAC;AAG3C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,MAAM,CAAC,MAAM,mBAAmB,GAC9B,yFAAyF,CAAC;AA4B5F,MAAM,UAAU,eAAe,CAC7B,YAA0C;IAE1C,OAAO,OAAO,YAAY,KAAK,UAAU,CAAC;AAC5C,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,IAAI,KAAK,YAAY,eAAe,IAAI,KAAK,YAAY,MAAM;QAC7D,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;;Q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AAG,CAAC,YAAY,CAAC,CAAC;gBAC5C,OAAO,YAAY,CAAC;YACtB,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAE,EAAE,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,UAAqB;IAErB,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7E,OAAO,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { LitElement, TemplateResult } from 'lit-element';\nimport { directive, Part } from 'lit-html';\n\nimport { List } from '@material/mwc-list';\nimport { Select } from '@material/mwc-select';\nimport { TextField } from '@material/mwc-textfield';\nimport AceEditor from 'ace-custom-element';\n\nimport { getChildElementsByTagName } from '@openscd/xml';\n\nimport { WizardTextField } from './wizard-textfield.js';\nimport { WizardSelect } from './wizard-select.js';\nimport { WizardCheckbox } from './wizard-checkbox.js';\n\nimport { EditorAction } from '@openscd/core/foundation/deprecated/editor';\n\nexport const wizardInputSelector =\n 'wizard-textfield, mwc-textfield, ace-editor, mwc-select, wizard-select, wizard-checkbox';\nexport type WizardInputElement =\n | WizardTextField\n | TextField\n | (AceEditor & {\n checkValidity: () => boolean;\n validityTransform: (\n newValue: string,\n nativeValidity: ValidityState\n ) => ValidityState;\n validationMessage: string;\n validity: ValidityState;\n label: string;\n requestUpdate(name?: PropertyKey, oldValue?: unknown): Promise<unknown>;\n })\n // TODO(c-dinkel): extend component\n | Select\n | WizardSelect;\n\nexport type WizardAction = EditorAction | WizardFactory;\n\n/** @returns [[`EditorAction`]]s to dispatch on [[`WizardDialog`]] commit. */\nexport type WizardActor = (\n inputs: WizardInputElement[],\n wizard: Element,\n list?: List | null\n) => WizardAction[];\n\nexport function isWizardFactory(\n maybeFactory: WizardAction | Wizard | null\n): maybeFactory is WizardFactory {\n return typeof maybeFactory === 'function';\n}\n\n/** @returns the validity of `input` depending on type. */\nexport function checkValidity(input: WizardInputElement): boolean {\n if (input instanceof WizardTextField || input instanceof Select)\n return input.checkValidity();\n else return true;\n}\n\n/** reports the validity of `input` depending on type. */\nexport function reportValidity(input: WizardInputElement): boolean {\n if (input instanceof WizardTextField || input instanceof Select)\n return input.reportValidity();\n else return true;\n}\n\n/** @returns the `value` or `maybeValue` of `input` depending on type. */\nexport function getValue(input: WizardInputElement): string | null {\n if (\n input instanceof WizardTextField ||\n input instanceof WizardSelect ||\n input instanceof WizardCheckbox\n )\n return input.maybeValue;\n else return input.value ?? null;\n}\n\n/** @returns the `multiplier` of `input` if available. */\nexport function getMultiplier(input: WizardInputElement): string | null {\n if (input instanceof WizardTextField) return input.multiplier;\n else return null;\n}\n\n/** Inputs as `TextField`, `Select` or `Checkbox `used in`wizard-dialog` */\nexport type WizardInput =\n | WizardInputTextField\n | WizardInputSelect\n | WizardInputCheckbox;\n\ninterface WizardInputBase {\n /** maps attribute key */\n label: string;\n /** maps attribute value */\n maybeValue: string | null;\n /** whether attribute is optional */\n nullable?: boolean;\n /** whether the input shall be disabled */\n disabled?: boolean;\n /** helper text */\n helper?: string;\n /** initial focused element in `wizard-dialog` (once per dialog) */\n dialogInitialFocus?: boolean;\n}\n\ninterface WizardInputTextField extends WizardInputBase {\n kind: 'TextField';\n /** wether the input might be empty string */\n required?: boolean;\n /** pattern definition from schema */\n pattern?: string;\n /** minimal characters allowed */\n minLength?: number;\n /** maximal characters allowed */\n maxLength?: number;\n /** message text explaining invalid inputs */\n validationMessage?: string;\n /** suffix definition - overwrites unit multiplier definition */\n suffix?: string;\n /** SI unit for specific suffix definition */\n unit?: string;\n /** in comibination with unit defines specific suffix */\n multiplier?: string | null;\n /** array of multipliers allowed for the input */\n multipliers?: (string | null)[];\n /** used for specific input type e.g. number */\n type?: string;\n /** minimal valid number in combination with type number */\n min?: number;\n /** maximal valid number in combination with type number */\n max?: number;\n /** value displaxed when input is nulled */\n default?: string;\n}\n\ninterface WizardInputSelect extends WizardInputBase {\n kind: 'Select';\n /** selectabled values */\n values: string[];\n /** value displayed with input is nulled */\n default?: string;\n /** message explaining invalid inputs */\n valadationMessage?: string;\n}\n\ninterface WizardInputCheckbox extends WizardInputBase {\n kind: 'Checkbox';\n /** wether checkbox is checked with nulled input */\n default?: boolean;\n}\n\n/** @returns [[`WizardAction`]]s to dispatch on [[`WizardDialog`]] menu action. */\nexport type WizardMenuActor = (wizard: Element) => void;\n\n/** User interactions rendered in the wizard-dialog menu */\nexport interface MenuAction {\n label: string;\n icon?: string;\n action: WizardMenuActor;\n}\n\n/** Represents a page of a wizard dialog */\nexport interface WizardPage {\n title: string;\n content?: (TemplateResult | WizardInput)[];\n primary?: {\n icon: string;\n label: string;\n action: WizardActor;\n auto?: boolean;\n };\n secondary?: {\n icon: string;\n label: string;\n action: WizardActor;\n };\n initial?: boolean;\n element?: Element;\n menuActions?: MenuAction[];\n}\nexport type Wizard = WizardPage[];\nexport type WizardFactory = () => Wizard;\n\n/** If `wizard === null`, close the current wizard, else queue `wizard`. */\nexport interface WizardDetail {\n wizard: WizardFactory | null;\n subwizard?: boolean;\n}\nexport type WizardEvent = CustomEvent<WizardDetail>;\nexport function newWizardEvent(\n wizardOrFactory?: Wizard | WizardFactory,\n eventInitDict?: CustomEventInit<Partial<WizardDetail>>\n): WizardEvent {\n if (!wizardOrFactory)\n return new CustomEvent<WizardDetail>('wizard', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: { wizard: null, ...eventInitDict?.detail },\n });\n\n const wizard = isWizardFactory(wizardOrFactory)\n ? wizardOrFactory\n : () => wizardOrFactory;\n\n return new CustomEvent<WizardDetail>('wizard', {\n bubbles: true,\n composed: true,\n ...eventInitDict,\n detail: { wizard, ...eventInitDict?.detail },\n });\n}\n\nexport function newSubWizardEvent(\n wizardOrFactory?: Wizard | WizardFactory\n): WizardEvent {\n return newWizardEvent(wizardOrFactory, { detail: { subwizard: true } });\n}\n\n/** @returns a reference to `element` with segments delimited by '/'. */\n// TODO(c-dinkel): replace with identity (FIXME)\nexport function referencePath(element: Element): string {\n let path = '';\n let nextParent: Element | null = element.parentElement;\n while (nextParent?.getAttribute('name')) {\n path = '/' + nextParent.getAttribute('name') + path;\n nextParent = nextParent.parentElement;\n }\n return path;\n}\n\nexport type SclEdition = '2003' | '2007B' | '2007B4';\nexport function getSclSchemaVersion(doc: Document): SclEdition {\n const scl: Element = doc.documentElement;\n const edition =\n (scl.getAttribute('version') ?? '2003') +\n (scl.getAttribute('revision') ?? '') +\n (scl.getAttribute('release') ?? '');\n return <SclEdition>edition;\n}\n\n/**\n * Extract the 'name' attribute from the given XML element.\n * @param element - The element to extract name from.\n * @returns the name, or undefined if there is no name.\n */\nexport function getNameAttribute(element: Element): string | undefined {\n const name = element.getAttribute('name');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'ldName' attribute from the given XML element.\n * @param element - The element to extract ldName from.\n * @returns the ldName, or undefined if there is no ldName.\n */\nexport function getLdNameAttribute(element: Element): string | undefined {\n const name = element.getAttribute('ldName');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'desc' attribute from the given XML element.\n * @param element - The element to extract description from.\n * @returns the name, or undefined if there is no description.\n */\nexport function getDescriptionAttribute(element: Element): string | undefined {\n const name = element.getAttribute('desc');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'pathName' attribute from the given XML element.\n * @param element - The element to extract path name from.\n * @returns the name, or undefined if there is no path name.\n */\nexport function getPathNameAttribute(element: Element): string | undefined {\n const name = element.getAttribute('pathName');\n return name ? name : undefined;\n}\n\n/**\n * Extract the 'inst' attribute from the given XML element.\n * @param element - The element to extract instance from.\n * @returns the instance, or undefined if there is no instance.\n */\nexport function getInstanceAttribute(element: Element): string | undefined {\n const inst = element.getAttribute('inst');\n return inst ? inst : undefined;\n}\n\nexport function pathParts(identity: string): [string, string] {\n const path = identity.split('>');\n const end = path.pop() ?? '';\n const start = path.join('>');\n return [start, end];\n}\n\nconst voidSelector = ':not(*)';\n\nfunction hitemIdentity(e: Element): string {\n return `${e.getAttribute('version')}\\t${e.getAttribute('revision')}`;\n}\n\nfunction hitemSelector(tagName: SCLTag, identity: string): string {\n const [version, revision] = identity.split('\\t');\n\n if (!version || !revision) return voidSelector;\n\n return `${tagName}[version=\"${version}\"][revision=\"${revision}\"]`;\n}\n\nfunction terminalIdentity(e: Element): string {\n return identity(e.parentElement) + '>' + e.getAttribute('connectivityNode');\n}\n\nfunction terminalSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, connectivityNode] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [`${tagName}[connectivityNode=\"${connectivityNode}\"]`]\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction lNodeIdentity(e: Element): string {\n const [iedName, ldInst, prefix, lnClass, lnInst, lnType] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'lnType',\n ].map(name => e.getAttribute(name));\n if (iedName === 'None')\n return `${identity(e.parentElement)}>(${lnClass} ${lnType} ${lnInst})`;\n return `${iedName} ${ldInst || '(Client)'}/${prefix ?? ''} ${lnClass} ${\n lnInst ?? ''\n }`;\n}\n\nfunction lNodeSelector(tagName: SCLTag, identity: string): string {\n if (identity.endsWith(')')) {\n const [parentIdentity, childIdentity] = pathParts(identity);\n const [lnClass, lnType, lnInst] = childIdentity\n .substring(1, childIdentity.length - 1)\n .split(' ');\n\n if (!lnClass || !lnType) return voidSelector;\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [`${tagName}[iedName=\"None\"][lnClass=\"${lnClass}\"][lnType=\"${lnType}\"][lnInst=\"${lnInst}\"]`]\n )\n .map(strings => strings.join(''))\n .join(',');\n }\n\n const [iedName, ldInst, prefix, lnClass, lnInst] = identity.split(/[ /]/);\n\n if (!iedName || !ldInst || !lnClass) return voidSelector;\n\n const [\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n ] = [\n [`[iedName=\"${iedName}\"]`],\n ldInst === '(Client)'\n ? [':not([ldInst])', '[ldInst=\"\"]']\n : [`[ldInst=\"${ldInst}\"]`],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n ];\n\n return crossProduct(\n [tagName],\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction kDCIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${e.getAttribute(\n 'iedName'\n )} ${e.getAttribute('apName')}`;\n}\n\nfunction kDCSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n const [iedName, apName] = childIdentity.split(' ');\n return `${selector(\n 'IED',\n parentIdentity\n )}>${tagName}[iedName=\"${iedName}\"][apName=\"${apName}\"]`;\n}\n\nfunction associationIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${\n e.getAttribute('associationID') ?? ''\n }`;\n}\n\nfunction associationSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, associationID] = pathParts(identity);\n\n if (!associationID) return voidSelector;\n\n return `${selector(\n 'Server',\n parentIdentity\n )}>${tagName}[associationID=\"${associationID}\"]`;\n}\n\nfunction lDeviceIdentity(e: Element): string {\n return `${identity(e.closest('IED')!)}>>${e.getAttribute('inst')}`;\n}\n\nfunction lDeviceSelector(tagName: SCLTag, identity: string): string {\n const [iedName, inst] = identity.split('>>');\n\n if (!inst) return voidSelector;\n\n return `IED[name=\"${iedName}\"] ${tagName}[inst=\"${inst}\"]`;\n}\n\nfunction iEDNameIdentity(e: Element): string {\n const iedName = e.textContent;\n const [apRef, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${apRef ? apRef : ''} ${\n ldInst ? ldInst : ''\n }/${prefix ?? ''} ${lnClass ?? ''} ${lnInst ?? ''}`;\n}\n\nfunction iEDNameSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [iedName, apRef, ldInst, prefix, lnClass, lnInst] =\n childIdentity.split(/[ /]/);\n\n const [\n parentSelectors,\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n ] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n [`${iedName}`],\n apRef ? [`[apRef=\"${apRef}\"]`] : [':not([apRef])', '[apRef=\"\"]'],\n ldInst ? [`[ldInst=\"${ldInst}\"]`] : [':not([ldInst])', '[ldInst=\"\"]'],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction fCDAIdentity(e: Element): string {\n const [ldInst, prefix, lnClass, lnInst, doName, daName, fc, ix] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'fc',\n 'ix',\n ].map(name => e.getAttribute(name));\n const dataPath = `${ldInst}/${prefix ?? ''} ${lnClass} ${\n lnInst ?? ''\n }.${doName} ${daName ? daName : ''}`;\n return `${identity(e.parentElement)}>${dataPath} (${fc}${\n ix ? ' [' + ix + ']' : ''\n })`;\n}\n\nfunction fCDASelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [ldInst, prefix, lnClass, lnInst] = childIdentity.split(/[ /.]/);\n\n const matchDoDa = childIdentity.match(\n /.([A-Z][A-Za-z0-9.]*) ([A-Za-z0-9.]*) \\(/\n );\n const doName = matchDoDa && matchDoDa[1] ? matchDoDa[1] : '';\n const daName = matchDoDa && matchDoDa[2] ? matchDoDa[2] : '';\n\n const matchFx = childIdentity.match(/\\(([A-Z]{2})/);\n const matchIx = childIdentity.match(/ \\[([0-9]{1,2})\\]/);\n\n const fc = matchFx && matchFx[1] ? matchFx[1] : '';\n const ix = matchIx && matchIx[1] ? matchIx[1] : '';\n\n const [\n parentSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n fcSelectors,\n ixSelectors,\n ] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n [`[ldInst=\"${ldInst}\"]`],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n [`[doName=\"${doName}\"]`],\n daName ? [`[daName=\"${daName}\"]`] : [':not([daName])', '[daName=\"\"]'],\n [`[fc=\"${fc}\"]`],\n ix ? [`[ix=\"${ix}\"]`] : [':not([ix])', '[ix=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n fcSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction extRefIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n const parentIdentity = identity(e.parentElement);\n const iedName = e.getAttribute('iedName');\n const intAddr = e.getAttribute('intAddr');\n const intAddrIndex = Array.from(\n e.parentElement.querySelectorAll(`ExtRef[intAddr=\"${intAddr}\"]`)\n ).indexOf(e);\n if (intAddr) return `${parentIdentity}>${intAddr}[${intAddrIndex}]`;\n const [\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n serviceType,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n srcCBName,\n ] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'serviceType',\n 'srcLDInst',\n 'srcPrefix',\n 'srcLNClass',\n 'srcLNInst',\n 'srcCBName',\n ].map(name => e.getAttribute(name));\n\n const cbPath = srcCBName\n ? `${serviceType}:${srcCBName} ${srcLDInst ?? ''}/${srcPrefix ?? ''} ${\n srcLNClass ?? ''\n } ${srcLNInst ?? ''}`\n : '';\n const dataPath = `${iedName} ${ldInst}/${prefix ?? ''} ${lnClass} ${\n lnInst ?? ''\n } ${doName} ${daName ? daName : ''}`;\n return `${parentIdentity}>${cbPath ? cbPath + ' ' : ''}${dataPath}${\n intAddr ? '@' + `${intAddr}` : ''\n }`;\n}\n\nfunction extRefSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n if (childIdentity.endsWith(']')) {\n const [intAddr] = childIdentity.split('[');\n const intAddrSelectors = [`[intAddr=\"${intAddr}\"]`];\n\n return crossProduct(parentSelectors, ['>'], [tagName], intAddrSelectors)\n .map(strings => strings.join(''))\n .join(',');\n }\n\n let iedName,\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n serviceType,\n srcCBName,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n intAddr;\n\n if (!childIdentity.includes(':') && !childIdentity.includes('@')) {\n [iedName, ldInst, prefix, lnClass, lnInst, doName, daName] =\n childIdentity.split(/[ /]/);\n } else if (childIdentity.includes(':') && !childIdentity.includes('@')) {\n [\n serviceType,\n srcCBName,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n iedName,\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n ] = childIdentity.split(/[ /:]/);\n } else if (!childIdentity.includes(':') && childIdentity.includes('@')) {\n [iedName, ldInst, prefix, lnClass, lnInst, doName, daName, intAddr] =\n childIdentity.split(/[ /@]/);\n } else {\n [\n serviceType,\n srcCBName,\n srcLDInst,\n srcPrefix,\n srcLNClass,\n srcLNInst,\n iedName,\n ldInst,\n prefix,\n lnClass,\n lnInst,\n doName,\n daName,\n intAddr,\n ] = childIdentity.split(/[ /:@]/);\n }\n\n const [\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n serviceTypeSelectors,\n srcCBNameSelectors,\n srcLDInstSelectors,\n srcPrefixSelectors,\n srcLNClassSelectors,\n srcLNInstSelectors,\n intAddrSelectors,\n ] = [\n iedName ? [`[iedName=\"${iedName}\"]`] : [':not([iedName])'],\n ldInst ? [`[ldInst=\"${ldInst}\"]`] : [':not([ldInst])', '[ldInst=\"\"]'],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n lnClass ? [`[lnClass=\"${lnClass}\"]`] : [':not([lnClass])'],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n doName ? [`[doName=\"${doName}\"]`] : [':not([doName])'],\n daName ? [`[daName=\"${daName}\"]`] : [':not([daName])', '[daName=\"\"]'],\n serviceType\n ? [`[serviceType=\"${serviceType}\"]`]\n : [':not([serviceType])', '[serviceType=\"\"]'],\n srcCBName\n ? [`[srcCBName=\"${srcCBName}\"]`]\n : [':not([srcCBName])', '[srcCBName=\"\"]'],\n srcLDInst\n ? [`[srcLDInst=\"${srcLDInst}\"]`]\n : [':not([srcLDInst])', '[srcLDInst=\"\"]'],\n srcPrefix\n ? [`[srcPrefix=\"${srcPrefix}\"]`]\n : [':not([srcPrefix])', '[srcPrefix=\"\"]'],\n srcLNClass\n ? [`[srcLNClass=\"${srcLNClass}\"]`]\n : [':not([srcLNClass])', '[srcLNClass=\"\"]'],\n srcLNInst\n ? [`[srcLNInst=\"${srcLNInst}\"]`]\n : [':not([srcLNInst])', '[srcLNInst=\"\"]'],\n intAddr ? [`[intAddr=\"${intAddr}\"]`] : [':not([intAddr])', '[intAddr=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n iedNameSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n doNameSelectors,\n daNameSelectors,\n serviceTypeSelectors,\n srcCBNameSelectors,\n srcLDInstSelectors,\n srcPrefixSelectors,\n srcLNClassSelectors,\n srcLNInstSelectors,\n intAddrSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction lNIdentity(e: Element): string {\n const [prefix, lnClass, inst] = ['prefix', 'lnClass', 'inst'].map(name =>\n e.getAttribute(name)\n );\n return `${identity(e.parentElement)}>${prefix ?? ''} ${lnClass} ${inst}`;\n}\n\nfunction lNSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n const [prefix, lnClass, inst] = childIdentity.split(' ');\n\n if (!lnClass) return voidSelector;\n\n const [prefixSelectors, lnClassSelectors, instSelectors] = [\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n [`[inst=\"${inst}\"]`],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n prefixSelectors,\n lnClassSelectors,\n instSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction clientLNIdentity(e: Element): string {\n const [apRef, iedName, ldInst, prefix, lnClass, lnInst] = [\n 'apRef',\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n ].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${iedName} ${\n apRef ? apRef : ''\n } ${ldInst}/${prefix ?? ''} ${lnClass} ${lnInst}`;\n}\n\nfunction clientLNSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n const [iedName, apRef, ldInst, prefix, lnClass, lnInst] =\n childIdentity.split(/[ /]/);\n\n const [\n iedNameSelectors,\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors,\n ] = [\n iedName ? [`[iedName=\"${iedName}\"]`] : [':not([iedName])', '[iedName=\"\"]'],\n apRef ? [`[apRef=\"${apRef}\"]`] : [':not([apRef])', '[apRef=\"\"]'],\n ldInst ? [`[ldInst=\"${ldInst}\"]`] : [':not([ldInst])', '[ldInst=\"\"]'],\n prefix ? [`[prefix=\"${prefix}\"]`] : [':not([prefix])', '[prefix=\"\"]'],\n [`[lnClass=\"${lnClass}\"]`],\n lnInst ? [`[lnInst=\"${lnInst}\"]`] : [':not([lnInst])', '[lnInst=\"\"]'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n iedNameSelectors,\n apRefSelectors,\n ldInstSelectors,\n prefixSelectors,\n lnClassSelectors,\n lnInstSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction ixNamingIdentity(e: Element): string {\n const [name, ix] = ['name', 'ix'].map(name => e.getAttribute(name));\n return `${identity(e.parentElement)}>${name}${ix ? '[' + ix + ']' : ''}`;\n}\n\nfunction ixNamingSelector(\n tagName: SCLTag,\n identity: string,\n depth = -1\n): string {\n if (depth === -1) depth = identity.split('>').length;\n\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [_0, name, _1, ix] =\n childIdentity.match(/([^[]*)(\\[([0-9]*)\\])?/) ?? [];\n\n if (!name) return voidSelector;\n\n if (depth === 0) return `${tagName}[name=\"${name}\"]`;\n\n const parentSelectors = tags[tagName].parents\n .flatMap(parentTag =>\n parentTag === 'SDI'\n ? ixNamingSelector(parentTag, parentIdentity, depth - 1).split(',')\n : selector(parentTag, parentIdentity).split(',')\n )\n .filter(selector => !selector.startsWith(voidSelector));\n\n if (parentSelectors.length === 0) return voidSelector;\n\n const [nameSelectors, ixSelectors] = [\n [`[name=\"${name}\"]`],\n ix ? [`[ix=\"${ix}\"]`] : ['[ix=\"\"]', ':not([ix])'],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n nameSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction valIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n const sGroup = e.getAttribute('sGroup');\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('sGroup') === sGroup)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${sGroup ? sGroup + '.' : ''} ${index}`;\n}\n\nfunction valSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [sGroup, indexText] = childIdentity.split(' ');\n const index = parseFloat(indexText);\n\n const parentSelectors = tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n );\n\n const [nameSelectors, ixSelectors] = [\n sGroup ? [`[sGroup=\"${sGroup}\"]`] : [''],\n index ? [`:nth-child(${index + 1})`] : [''],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n nameSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction connectedAPIdentity(e: Element): string {\n const [iedName, apName] = ['iedName', 'apName'].map(name =>\n e.getAttribute(name)\n );\n return `${iedName} ${apName}`;\n}\n\nfunction connectedAPSelector(tagName: SCLTag, identity: string): string {\n const [iedName, apName] = identity.split(' ');\n if (!iedName || !apName) return voidSelector;\n return `${tagName}[iedName=\"${iedName}\"][apName=\"${apName}\"]`;\n}\n\nfunction controlBlockIdentity(e: Element): string {\n const [ldInst, cbName] = ['ldInst', 'cbName'].map(name =>\n e.getAttribute(name)\n );\n return `${ldInst} ${cbName}`;\n}\n\nfunction controlBlockSelector(tagName: SCLTag, identity: string): string {\n const [ldInst, cbName] = identity.split(' ');\n\n if (!ldInst || !cbName) return voidSelector;\n\n return `${tagName}[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`;\n}\n\nfunction physConnIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n if (!e.parentElement.querySelector('PhysConn[type=\"RedConn\"]')) return NaN;\n const pcType = e.getAttribute('type');\n if (\n e.parentElement.children.length > 1 &&\n pcType !== 'Connection' &&\n pcType !== 'RedConn'\n )\n return NaN;\n return `${identity(e.parentElement)}>${pcType}`;\n}\n\nfunction physConnSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, pcType] = pathParts(identity);\n\n const [parentSelectors, typeSelectors] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n pcType ? [`[type=\"${pcType}\"]`] : [''],\n ];\n\n return crossProduct(parentSelectors, ['>'], [tagName], typeSelectors)\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction pIdentity(e: Element): string | number {\n if (!e.parentElement) return NaN;\n const eParent = e.parentElement;\n const eType = e.getAttribute('type');\n if (eParent.tagName === 'PhysConn')\n return `${identity(e.parentElement)}>${eType}`;\n const index = Array.from(e.parentElement.children)\n .filter(child => child.getAttribute('type') === eType)\n .findIndex(child => child.isSameNode(e));\n return `${identity(e.parentElement)}>${eType} [${index}]`;\n}\n\nfunction pSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [type] = childIdentity.split(' ');\n const index =\n childIdentity &&\n childIdentity.match(/\\[([0-9]+)\\]/) &&\n childIdentity.match(/\\[([0-9]+)\\]/)![1]\n ? parseFloat(childIdentity.match(/\\[([0-9]+)\\]/)![1])\n : NaN;\n\n const [parentSelectors, typeSelectors, ixSelectors] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n [`[type=\"${type}\"]`],\n index ? [`:nth-child(${index + 1})`] : [''],\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n typeSelectors,\n ixSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction enumValIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${e.getAttribute('ord')}`;\n}\n\nfunction enumValSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, ord] = pathParts(identity);\n return `${selector('EnumType', parentIdentity)}>${tagName}[ord=\"${ord}\"]`;\n}\n\nfunction protNsIdentity(e: Element): string {\n return `${identity(e.parentElement)}>${e.getAttribute('type') || '8-MMS'}\\t${\n e.textContent\n }`;\n}\n\nfunction protNsSelector(tagName: SCLTag, identity: string): string {\n const [parentIdentity, childIdentity] = pathParts(identity);\n\n const [type, value] = childIdentity.split('\\t');\n\n const [parentSelectors] = [\n tags[tagName].parents.flatMap(parentTag =>\n selector(parentTag, parentIdentity).split(',')\n ),\n ];\n\n return crossProduct(\n parentSelectors,\n ['>'],\n [tagName],\n [`[type=\"${type}\"]`],\n ['>'],\n [value]\n )\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction sCLIdentity(): string {\n return '';\n}\n\nfunction sCLSelector(): string {\n return ':root';\n}\n\nfunction namingIdentity(e: Element): string {\n return e.parentElement!.tagName === 'SCL'\n ? e.getAttribute('name')!\n : `${identity(e.parentElement)}>${e.getAttribute('name')}`;\n}\n\nfunction namingSelector(tagName: SCLTag, identity: string, depth = -1): string {\n if (depth === -1) depth = identity.split('>').length;\n\n const [parentIdentity, name] = pathParts(identity);\n if (!name) return voidSelector;\n if (depth === 0) return `${tagName}[name=\"${name}\"]`;\n\n const parents = tags[tagName].parents;\n if (!parents) return voidSelector;\n\n const parentSelectors = parents\n .flatMap(parentTag =>\n tags[parentTag].selector === tags['Substation'].selector\n ? namingSelector(parentTag, parentIdentity, depth - 1).split(',')\n : selector(parentTag, parentIdentity).split(',')\n )\n .filter(selector => !selector.startsWith(voidSelector));\n\n if (parentSelectors.length === 0) return voidSelector;\n\n return crossProduct(parentSelectors, ['>'], [tagName], [`[name=\"${name}\"]`])\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction singletonIdentity(e: Element): string {\n return identity(e.parentElement).toString();\n}\n\nfunction singletonSelector(tagName: SCLTag, identity: string): string {\n const parents = tags[tagName].parents;\n if (!parents) return voidSelector;\n\n const parentSelectors = parents\n .flatMap(parentTag => selector(parentTag, identity).split(','))\n .filter(selector => !selector.startsWith(voidSelector));\n\n if (parentSelectors.length === 0) return voidSelector;\n\n return crossProduct(parentSelectors, ['>'], [tagName])\n .map(strings => strings.join(''))\n .join(',');\n}\n\nfunction idNamingIdentity(e: Element): string {\n return `#${e.id}`;\n}\n\nfunction idNamingSelector(tagName: SCLTag, identity: string): string {\n const id = identity.replace(/^#/, '');\n\n if (!id) return voidSelector;\n\n return `${tagName}[id=\"${id}\"]`;\n}\n\ntype IdentityFunction = (e: Element) => string | number;\ntype SelectorFunction = (tagName: SCLTag, identity: string) => string;\n\nconst tAbstractConductingEquipment = [\n 'TransformerWinding',\n 'ConductingEquipment',\n] as const;\n\nconst tEquipment = [\n 'GeneralEquipment',\n 'PowerTransformer',\n ...tAbstractConductingEquipment,\n] as const;\nconst tEquipmentContainer = ['Substation', 'VoltageLevel', 'Bay'] as const;\nconst tGeneralEquipmentContainer = ['Process', 'Line'] as const;\nconst tAbstractEqFuncSubFunc = ['EqSubFunction', 'EqFunction'] as const;\n\nconst tPowerSystemResource = [\n 'SubFunction',\n 'Function',\n 'TapChanger',\n 'SubEquipment',\n ...tEquipment,\n ...tEquipmentContainer,\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n] as const;\nconst tLNodeContainer = ['ConnectivityNode', ...tPowerSystemResource] as const;\nconst tCertificate = ['GOOSESecurity', 'SMVSecurity'] as const;\nconst tNaming = ['SubNetwork', ...tCertificate, ...tLNodeContainer] as const;\n\nconst tAbstractDataAttribute = ['BDA', 'DA'] as const;\nconst tControlWithIEDName = ['SampledValueControl', 'GSEControl'] as const;\nconst tControlWithTriggerOpt = ['LogControl', 'ReportControl'] as const;\nconst tControl = [...tControlWithIEDName, ...tControlWithTriggerOpt] as const;\nconst tControlBlock = ['GSE', 'SMV'] as const;\nconst tUnNaming = [\n 'ConnectedAP',\n 'PhysConn',\n 'SDO',\n 'DO',\n 'DAI',\n 'SDI',\n 'DOI',\n 'Inputs',\n 'RptEnabled',\n 'Server',\n 'ServerAt',\n 'SettingControl',\n 'Communication',\n 'Log',\n 'LDevice',\n 'DataSet',\n 'AccessPoint',\n 'IED',\n 'NeutralPoint',\n ...tControl,\n ...tControlBlock,\n ...tAbstractDataAttribute,\n] as const;\n\nconst tAnyLN = ['LN0', 'LN'] as const;\n\nconst tAnyContentFromOtherNamespace = [\n 'Text',\n 'Private',\n 'Hitem',\n 'AccessControl',\n] as const;\n\nconst tCert = ['Subject', 'IssuerName'] as const;\nconst tDurationInMilliSec = ['MinTime', 'MaxTime'] as const;\n\nconst tIDNaming = ['LNodeType', 'DOType', 'DAType', 'EnumType'] as const;\n\nconst tServiceYesNo = [\n 'FileHandling',\n 'TimeSyncProt',\n 'CommProt',\n 'SGEdit',\n 'ConfSG',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'GetCBValues',\n 'GSEDir',\n 'ConfLdName',\n] as const;\n\nconst tServiceWithMaxAndMaxAttributes = ['DynDataSet', 'ConfDataSet'] as const;\n\nconst tServiceWithMax = [\n 'GSSE',\n 'GOOSE',\n 'ConfReportControl',\n 'SMVsc',\n ...tServiceWithMaxAndMaxAttributes,\n] as const;\n\nconst tServiceWithMaxNonZero = ['ConfLogControl', 'ConfSigRef'] as const;\n\nconst tServiceSettings = [\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n] as const;\n\nconst tBaseElement = ['SCL', ...tNaming, ...tUnNaming, ...tIDNaming] as const;\n\nconst sCLTags = [\n ...tBaseElement,\n ...tAnyContentFromOtherNamespace,\n 'Header',\n 'LNode',\n 'Val',\n 'Voltage',\n 'Services',\n ...tCert,\n ...tDurationInMilliSec,\n 'Association',\n 'FCDA',\n 'ClientLN',\n 'IEDName',\n 'ExtRef',\n 'Protocol',\n ...tAnyLN,\n ...tServiceYesNo,\n 'DynAssociation',\n 'SettingGroups',\n ...tServiceWithMax,\n ...tServiceWithMaxNonZero,\n ...tServiceSettings,\n 'ConfLNs',\n 'ClientServices',\n 'SupSubscription',\n 'ValueHandling',\n 'RedProt',\n 'McSecurity',\n 'KDC',\n 'Address',\n 'P',\n 'ProtNs',\n 'EnumVal',\n 'Terminal',\n 'BitRate',\n 'Authentication',\n 'DataTypeTemplates',\n 'History',\n 'OptFields',\n 'SmvOpts',\n 'TrgOps',\n 'SamplesPerSec',\n 'SmpRate',\n 'SecPerSamples',\n] as const;\n\nexport type SCLTag = (typeof sCLTags)[number];\n\nconst tagSet = new Set<string>(sCLTags);\n\nfunction isSCLTag(tag: string): tag is SCLTag {\n return tagSet.has(tag);\n}\n\nconst tBaseNameSequence = ['Text', 'Private'] as const;\nconst tNamingSequence = [...tBaseNameSequence] as const;\nconst tUnNamingSequence = [...tBaseNameSequence] as const;\nconst tIDNamingSequence = [...tBaseNameSequence] as const;\n\nconst tAbstractDataAttributeSequence = [...tUnNamingSequence, 'Val'] as const;\nconst tLNodeContainerSequence = [...tNamingSequence, 'LNode'] as const;\nconst tPowerSystemResourceSequence = [...tLNodeContainerSequence] as const;\nconst tEquipmentSequence = [...tPowerSystemResourceSequence] as const;\nconst tEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'PowerTransformer',\n 'GeneralEquipment',\n] as const;\nconst tAbstractConductingEquipmentSequence = [\n ...tEquipmentSequence,\n 'Terminal',\n] as const;\nconst tControlBlockSequence = [...tUnNamingSequence, 'Address'] as const;\nconst tControlSequence = [...tNamingSequence] as const;\nconst tControlWithIEDNameSequence = [...tControlSequence, 'IEDName'] as const;\nconst tAnyLNSequence = [\n ...tUnNamingSequence,\n 'DataSet',\n 'ReportControl',\n 'LogControl',\n 'DOI',\n 'Inputs',\n 'Log',\n] as const;\nconst tGeneralEquipmentContainerSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'Function',\n] as const;\nconst tControlWithTriggerOptSequence = [...tControlSequence, 'TrgOps'] as const;\nconst tAbstractEqFuncSubFuncSequence = [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'EqSubFunction',\n] as const;\n\nexport const tags: Record<\n SCLTag,\n {\n identity: IdentityFunction;\n selector: SelectorFunction;\n parents: SCLTag[];\n children: SCLTag[];\n }\n> = {\n AccessControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['LDevice'],\n children: [],\n },\n AccessPoint: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['IED'],\n children: [\n ...tNamingSequence,\n 'Server',\n 'LN',\n 'ServerAt',\n 'Services',\n 'GOOSESecurity',\n 'SMVSecurity',\n ],\n },\n Address: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ConnectedAP', 'GSE', 'SMV'],\n children: ['P'],\n },\n Association: {\n identity: associationIdentity,\n selector: associationSelector,\n parents: ['Server'],\n children: [],\n },\n Authentication: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Server'],\n children: [],\n },\n BDA: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['DAType'],\n children: [...tAbstractDataAttributeSequence],\n },\n BitRate: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SubNetwork'],\n children: [],\n },\n Bay: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['VoltageLevel'],\n children: [\n ...tEquipmentContainerSequence,\n 'ConductingEquipment',\n 'ConnectivityNode',\n 'Function',\n ],\n },\n ClientLN: {\n identity: clientLNIdentity,\n selector: clientLNSelector,\n parents: ['RptEnabled'],\n children: [],\n },\n ClientServices: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: ['TimeSyncProt', 'McSecurity'],\n },\n CommProt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Communication: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'SubNetwork'],\n },\n ConductingEquipment: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Process', 'Line', 'SubFunction', 'Function', 'Bay'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n ConfDataSet: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfLdName: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfLNs: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfLogControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfReportControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConfSG: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SettingGroups'],\n children: [],\n },\n ConfSigRef: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ConnectedAP: {\n identity: connectedAPIdentity,\n selector: connectedAPSelector,\n parents: ['SubNetwork'],\n children: [...tUnNamingSequence, 'Address', 'GSE', 'SMV', 'PhysConn'],\n },\n ConnectivityNode: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Bay', 'Line'],\n children: [...tLNodeContainerSequence],\n },\n DA: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['DOType'],\n children: [...tAbstractDataAttributeSequence],\n },\n DAI: {\n identity: ixNamingIdentity,\n selector: ixNamingSelector,\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'Val'],\n },\n DAType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'BDA', 'ProtNs'],\n },\n DO: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['LNodeType'],\n children: [...tUnNamingSequence],\n },\n DOI: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n DOType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'SDO', 'DA'],\n },\n DataObjectDirectory: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n DataSet: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tNamingSequence, 'FCDA'],\n },\n DataSetDirectory: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n DataTypeTemplates: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SCL'],\n children: ['LNodeType', 'DOType', 'DAType', 'EnumType'],\n },\n DynAssociation: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n DynDataSet: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n EnumType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'EnumVal'],\n },\n EnumVal: {\n identity: enumValIdentity,\n selector: enumValSelector,\n parents: ['EnumType'],\n children: [],\n },\n EqFunction: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [\n 'GeneralEquipment',\n 'TapChanger',\n 'TransformerWinding',\n 'PowerTransformer',\n 'SubEquipment',\n 'ConductingEquipment',\n ],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n EqSubFunction: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['EqSubFunction', 'EqFunction'],\n children: [...tAbstractEqFuncSubFuncSequence],\n },\n ExtRef: {\n identity: extRefIdentity,\n selector: extRefSelector,\n parents: ['Inputs'],\n children: [],\n },\n FCDA: {\n identity: fCDAIdentity,\n selector: fCDASelector,\n parents: ['DataSet'],\n children: [],\n },\n FileHandling: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Function: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Bay', 'VoltageLevel', 'Substation', 'Process', 'Line'],\n children: [\n ...tPowerSystemResourceSequence,\n 'SubFunction',\n 'GeneralEquipment',\n 'ConductingEquipment',\n ],\n },\n GeneralEquipment: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [\n 'SubFunction',\n 'Function',\n ...tGeneralEquipmentContainer,\n ...tAbstractEqFuncSubFunc,\n ...tEquipmentContainer,\n ],\n children: [...tEquipmentSequence, 'EqFunction'],\n },\n GetCBValues: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GetDataObjectDefinition: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GetDataSetValue: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GetDirectory: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GOOSE: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GOOSESecurity: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n GSE: {\n identity: controlBlockIdentity,\n selector: controlBlockSelector,\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence, 'MinTime', 'MaxTime'],\n },\n GSEDir: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GSEControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'Protocol'],\n },\n GSESettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n GSSE: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Header: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SCL'],\n children: ['Text', 'History'],\n },\n History: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Header'],\n children: ['Hitem'],\n },\n Hitem: {\n identity: hitemIdentity,\n selector: hitemSelector,\n parents: ['History'],\n children: [],\n },\n IED: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['SCL'],\n children: [...tUnNamingSequence, 'Services', 'AccessPoint', 'KDC'],\n },\n IEDName: {\n identity: iEDNameIdentity,\n selector: iEDNameSelector,\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n Inputs: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: [...tAnyLN],\n children: [...tUnNamingSequence, 'ExtRef'],\n },\n IssuerName: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n KDC: {\n identity: kDCIdentity,\n selector: kDCSelector,\n parents: ['IED'],\n children: [],\n },\n LDevice: {\n identity: lDeviceIdentity,\n selector: lDeviceSelector,\n parents: ['Server'],\n children: [...tUnNamingSequence, 'LN0', 'LN', 'AccessControl'],\n },\n LN: {\n identity: lNIdentity,\n selector: lNSelector,\n parents: ['AccessPoint', 'LDevice'],\n children: [...tAnyLNSequence],\n },\n LN0: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['LDevice'],\n children: [\n ...tAnyLNSequence,\n 'GSEControl',\n 'SampledValueControl',\n 'SettingControl',\n ],\n },\n LNode: {\n identity: lNodeIdentity,\n selector: lNodeSelector,\n parents: [...tLNodeContainer],\n children: [...tUnNamingSequence],\n },\n LNodeType: {\n identity: idNamingIdentity,\n selector: idNamingSelector,\n parents: ['DataTypeTemplates'],\n children: [...tIDNamingSequence, 'DO'],\n },\n Line: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'Voltage',\n 'ConductingEquipment',\n ],\n },\n Log: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tUnNamingSequence],\n },\n LogControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence],\n },\n LogSettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n MaxTime: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSE'],\n children: [],\n },\n McSecurity: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSESettings', 'SMVSettings', 'ClientServices'],\n children: [],\n },\n MinTime: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSE'],\n children: [],\n },\n NeutralPoint: {\n identity: terminalIdentity,\n selector: terminalSelector,\n parents: ['TransformerWinding'],\n children: [...tUnNamingSequence],\n },\n OptFields: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ReportControl'],\n children: [],\n },\n P: {\n identity: pIdentity,\n selector: pSelector,\n parents: ['Address', 'PhysConn'],\n children: [],\n },\n PhysConn: {\n identity: physConnIdentity,\n selector: physConnSelector,\n parents: ['ConnectedAP'],\n children: [...tUnNamingSequence, 'P'],\n },\n PowerTransformer: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tEquipmentContainer],\n children: [\n ...tEquipmentSequence,\n 'TransformerWinding',\n 'SubEquipment',\n 'EqFunction',\n ],\n },\n Private: {\n identity: () => NaN,\n selector: () => voidSelector,\n parents: [],\n children: [],\n },\n Process: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Process', 'SCL'],\n children: [\n ...tGeneralEquipmentContainerSequence,\n 'ConductingEquipment',\n 'Substation',\n 'Line',\n 'Process',\n ],\n },\n ProtNs: {\n identity: protNsIdentity,\n selector: protNsSelector,\n parents: ['DAType', 'DA'],\n children: [],\n },\n Protocol: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GSEControl', 'SampledValueControl'],\n children: [],\n },\n ReadWrite: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n RedProt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n ReportControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [...tAnyLN],\n children: [...tControlWithTriggerOptSequence, 'OptFields', 'RptEnabled'],\n },\n ReportSettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n RptEnabled: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ReportControl'],\n children: [...tUnNamingSequence, 'ClientLN'],\n },\n SamplesPerSec: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SMVSettings'],\n children: [],\n },\n SampledValueControl: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['LN0'],\n children: [...tControlWithIEDNameSequence, 'SmvOpts'],\n },\n SecPerSamples: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SMVSettings'],\n children: [],\n },\n SCL: {\n identity: sCLIdentity,\n selector: sCLSelector,\n parents: [],\n children: [\n ...tBaseNameSequence,\n 'Header',\n 'Substation',\n 'Communication',\n 'IED',\n 'DataTypeTemplates',\n 'Line',\n 'Process',\n ],\n },\n SDI: {\n identity: ixNamingIdentity,\n selector: ixNamingSelector,\n parents: ['DOI', 'SDI'],\n children: [...tUnNamingSequence, 'SDI', 'DAI'],\n },\n SDO: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['DOType'],\n children: [...tNamingSequence],\n },\n Server: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['AccessPoint'],\n children: [\n ...tUnNamingSequence,\n 'Authentication',\n 'LDevice',\n 'Association',\n ],\n },\n ServerAt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['AccessPoint'],\n children: [...tUnNamingSequence],\n },\n Services: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['IED', 'AccessPoint'],\n children: [\n 'DynAssociation',\n 'SettingGroups',\n 'GetDirectory',\n 'GetDataObjectDefinition',\n 'DataObjectDirectory',\n 'GetDataSetValue',\n 'SetDataSetValue',\n 'DataSetDirectory',\n 'ConfDataSet',\n 'DynDataSet',\n 'ReadWrite',\n 'TimerActivatedControl',\n 'ConfReportControl',\n 'GetCBValues',\n 'ConfLogControl',\n 'ReportSettings',\n 'LogSettings',\n 'GSESettings',\n 'SMVSettings',\n 'GSEDir',\n 'GOOSE',\n 'GSSE',\n 'SMVsc',\n 'FileHandling',\n 'ConfLNs',\n 'ClientServices',\n 'ConfLdName',\n 'SupSubscription',\n 'ConfSigRef',\n 'ValueHandling',\n 'RedProt',\n 'TimeSyncProt',\n 'CommProt',\n ],\n },\n SetDataSetValue: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n SettingControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['LN0'],\n children: [...tUnNamingSequence],\n },\n SettingGroups: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: ['SGEdit', 'ConfSG'],\n },\n SGEdit: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SettingGroups'],\n children: [],\n },\n SmpRate: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SMVSettings'],\n children: [],\n },\n SMV: {\n identity: controlBlockIdentity,\n selector: controlBlockSelector,\n parents: ['ConnectedAP'],\n children: [...tControlBlockSequence],\n },\n SmvOpts: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['SampledValueControl'],\n children: [],\n },\n SMVsc: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n SMVSecurity: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['AccessPoint'],\n children: [...tNamingSequence, 'Subject', 'IssuerName'],\n },\n SMVSettings: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: ['SmpRate', 'SamplesPerSec', 'SecPerSamples', 'McSecurity'],\n },\n SubEquipment: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: [\n 'TapChanger',\n 'PowerTransformer',\n 'ConductingEquipment',\n 'TransformerWinding',\n ...tAbstractConductingEquipment,\n ],\n children: [...tPowerSystemResourceSequence, 'EqFunction'],\n },\n SubFunction: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['SubFunction', 'Function'],\n children: [\n ...tPowerSystemResourceSequence,\n 'GeneralEquipment',\n 'ConductingEquipment',\n 'SubFunction',\n ],\n },\n SubNetwork: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Communication'],\n children: [...tNamingSequence, 'BitRate', 'ConnectedAP'],\n },\n Subject: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['GOOSESecurity', 'SMVSecurity'],\n children: [],\n },\n Substation: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['SCL'],\n children: [...tEquipmentContainerSequence, 'VoltageLevel', 'Function'],\n },\n SupSubscription: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n TapChanger: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['TransformerWinding'],\n children: [...tPowerSystemResourceSequence, 'SubEquipment', 'EqFunction'],\n },\n Terminal: {\n identity: terminalIdentity,\n selector: terminalSelector,\n parents: [...tEquipment],\n children: [...tUnNamingSequence],\n },\n Text: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: sCLTags.filter(tag => tag !== 'Text' && tag !== 'Private'),\n children: [],\n },\n TimerActivatedControl: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n TimeSyncProt: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services', 'ClientServices'],\n children: [],\n },\n TransformerWinding: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['PowerTransformer'],\n children: [\n ...tAbstractConductingEquipmentSequence,\n 'TapChanger',\n 'NeutralPoint',\n 'EqFunction',\n 'SubEquipment',\n ],\n },\n TrgOps: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['ReportControl'],\n children: [],\n },\n Val: {\n identity: valIdentity,\n selector: valSelector,\n parents: ['DAI', 'DA', 'BDA'],\n children: [],\n },\n ValueHandling: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['Services'],\n children: [],\n },\n Voltage: {\n identity: singletonIdentity,\n selector: singletonSelector,\n parents: ['VoltageLevel'],\n children: [],\n },\n VoltageLevel: {\n identity: namingIdentity,\n selector: namingSelector,\n parents: ['Substation'],\n children: [...tEquipmentContainerSequence, 'Voltage', 'Bay', 'Function'],\n },\n};\n\nexport function getReference(parent: Element, tag: SCLTag): Element | null {\n const parentTag = parent.tagName;\n const children = Array.from(parent.children);\n\n if (\n parentTag === 'Services' ||\n parentTag === 'SettingGroups' ||\n !isSCLTag(parentTag)\n )\n return children.find(child => child.tagName === tag) ?? null;\n\n const sequence = tags[parentTag]?.children ?? [];\n let index = sequence.findIndex(element => element === tag);\n\n if (index < 0) return null;\n\n let nextSibling: Element | undefined;\n while (index < sequence.length && !nextSibling) {\n nextSibling = children.find(child => child.tagName === sequence[index]);\n index++;\n }\n\n return nextSibling ?? null;\n}\n\nfunction selector(tagName: string, identity: string | number): string {\n if (typeof identity !== 'string') return voidSelector;\n\n if (isSCLTag(tagName)) return tags[tagName].selector(tagName, identity);\n\n return tagName;\n}\n\nexport function find(\n root: XMLDocument | Element | DocumentFragment,\n tagName: string,\n identity: string | number\n): Element | null {\n if (typeof identity !== 'string' || !isSCLTag(tagName)) return null;\n\n const element = root.querySelector(tags[tagName].selector(tagName, identity));\n\n if (element === null || isPublic(element)) return element;\n\n return (\n Array.from(\n root.querySelectorAll(tags[tagName].selector(tagName, identity))\n ).find(isPublic) ?? null\n );\n}\n\n/** @returns a string uniquely identifying `e` in its document, or NaN if `e`\n * is unidentifiable. */\nexport function identity(e: Element | null): string | number {\n if (e === null) return NaN;\n if (e.closest('Private')) return NaN;\n const tag = e.tagName;\n\n if (isSCLTag(tag)) return tags[tag].identity(e);\n\n return NaN;\n}\n\n/** @returns whether `a` and `b` are considered identical by IEC-61850 */\nexport function isSame(a: Element, b: Element): boolean {\n if (a.tagName === 'Private')\n return isSame(a.parentElement!, b.parentElement!) && a.isEqualNode(b);\n return a.tagName === b.tagName && identity(a) === identity(b);\n}\n\nexport function isEqual(a: Element, b: Element): boolean {\n if (a.closest('Private') || b.closest('Private')) return a.isEqualNode(b);\n\n const attributeNames = new Set(\n a.getAttributeNames().concat(b.getAttributeNames())\n );\n for (const name of attributeNames)\n if (a.getAttribute(name) !== b.getAttribute(name)) return false;\n\n if (a.childElementCount === 0)\n return (\n b.childElementCount === 0 &&\n a.textContent?.trim() === b.textContent?.trim()\n );\n\n const aChildren = Array.from(a.children);\n const bChildren = Array.from(b.children);\n\n for (const aChild of aChildren) {\n const twindex = bChildren.findIndex(bChild => isEqual(aChild, bChild));\n if (twindex === -1) return false;\n bChildren.splice(twindex, 1);\n }\n\n for (const bChild of bChildren)\n if (!aChildren.find(aChild => isEqual(bChild, aChild))) return false;\n\n return true;\n}\n\n/** A directive rendering its argument `rendered` only if `rendered !== {}`. */\nexport const ifImplemented = directive(rendered => (part: Part) => {\n if (Object.keys(rendered).length) part.setValue(rendered);\n else part.setValue('');\n});\n\n/** Constructor type for defining `LitElement` mixins. */\nexport type LitElementConstructor = new (...args: any[]) => LitElement;\n\n/** The type returned by `MyMixin(...)` is `Mixin<typeof MyMixin>`. */\nexport type Mixin<T extends (...args: any[]) => any> = InstanceType<\n ReturnType<T>\n>;\n\nconst nameStartChar =\n '[:_A-Za-z]|[\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|[\\u0370-\\u037D]' +\n '|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]' +\n '|[\\u3001-\\uD7FF]|[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]';\nconst nameChar =\n nameStartChar + '|[.0-9\\\\-]|\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]';\nconst name = nameStartChar + '(' + nameChar + ')*';\nconst nmToken = '\\\\S+';\n\nexport const patterns = {\n string:\n '([\\u0009-\\u000A]|[\\u000D]|[\\u0020-\\u007E]|[\\u0085]|[\\u00A0-\\uD7FF]' +\n '|[\\uE000-\\uFFFD])*',\n normalizedString:\n '([\\u0020-\\u007E]|[\\u0085]|[\\u00A0-\\uD7FF]|[\\uE000-\\uFFFD])*',\n name,\n nmToken,\n names: name + '( ' + name + ')*',\n nmTokens: nmToken + '( ' + nmToken + ')*',\n decimal: '[+\\\\-]?[0-9]+(([.][0-9]*)?|([.][0-9]+))',\n unsigned: '[+]?[0-9]+(([.][0-9]*)?|([.][0-9]+))',\n integer: '[+\\\\-]?[0-9]+([0-9]*)',\n alphanumericFirstUpperCase: '[A-Z][0-9,A-Z,a-z]*',\n alphanumericFirstLowerCase: '[a-z][0-9,A-Z,a-z]*',\n lnClass: '(LLN0)|[A-Z]{4,4}',\n};\n\n/** Sorts selected `ListItem`s to the top and disabled ones to the bottom. */\nexport function compareNames(a: Element | string, b: Element | string): number {\n if (typeof a === 'string' && typeof b === 'string') return a.localeCompare(b);\n\n if (typeof a === 'object' && typeof b === 'string')\n return (a.getAttribute('name') ?? '').localeCompare(b);\n\n if (typeof a === 'string' && typeof b === 'object')\n return a.localeCompare(b.getAttribute('name')!);\n\n if (typeof a === 'object' && typeof b === 'object')\n return (a.getAttribute('name') ?? '').localeCompare(\n b.getAttribute('name') ?? ''\n );\n\n return 0;\n}\n\n/** @returns the cartesian product of `arrays` */\nexport function crossProduct<T>(...arrays: T[][]): T[][] {\n return arrays.reduce<T[][]>(\n (a, b) => <T[][]>a.flatMap(d => b.map(e => [d, e].flat())),\n [[]]\n );\n}\n\n/** @returns the depth of `t` if it is an object or array, zero otherwise. */\nexport function depth(t: Record<string, unknown>, mem = new WeakSet()): number {\n if (mem.has(t)) return Infinity;\n else\n switch (t?.constructor) {\n case Object:\n case Array:\n mem.add(t);\n return (\n 1 +\n Math.max(\n -1,\n ...Object.values(t).map(_ => depth(<Record<string, unknown>>_, mem))\n )\n );\n default:\n return 0;\n }\n}\n\nexport function findFCDAs(extRef: Element): Element[] {\n if (extRef.tagName !== 'ExtRef' || extRef.closest('Private')) return [];\n\n const [iedName, ldInst, prefix, lnClass, lnInst, doName, daName] = [\n 'iedName',\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n ].map(name => extRef.getAttribute(name));\n const ied = Array.from(extRef.ownerDocument.getElementsByTagName('IED')).find(\n element =>\n element.getAttribute('name') === iedName && !element.closest('Private')\n );\n if (!ied) return [];\n\n return Array.from(ied.getElementsByTagName('FCDA'))\n .filter(item => !item.closest('Private'))\n .filter(\n fcda =>\n (fcda.getAttribute('ldInst') ?? '') === (ldInst ?? '') &&\n (fcda.getAttribute('prefix') ?? '') === (prefix ?? '') &&\n (fcda.getAttribute('lnClass') ?? '') === (lnClass ?? '') &&\n (fcda.getAttribute('lnInst') ?? '') === (lnInst ?? '') &&\n (fcda.getAttribute('doName') ?? '') === (doName ?? '') &&\n (fcda.getAttribute('daName') ?? '') === (daName ?? '')\n );\n}\n\nconst serviceTypeControlBlockTags: Partial<Record<string, string[]>> = {\n GOOSE: ['GSEControl'],\n SMV: ['SampledValueControl'],\n Report: ['ReportControl'],\n NONE: ['LogControl', 'GSEControl', 'SampledValueControl', 'ReportControl'],\n};\n\nexport function findControlBlocks(extRef: Element): Set<Element> {\n const fcdas = findFCDAs(extRef);\n const cbTags =\n serviceTypeControlBlockTags[extRef.getAttribute('serviceType') ?? 'NONE'] ??\n [];\n const controlBlocks = new Set(\n fcdas.flatMap(fcda => {\n const dataSet = fcda.parentElement!;\n const dsName = dataSet.getAttribute('name') ?? '';\n const anyLN = dataSet.parentElement!;\n return cbTags\n .flatMap(tag => Array.from(anyLN.getElementsByTagName(tag)))\n .filter(cb => cb.getAttribute('datSet') === dsName);\n })\n );\n return controlBlocks;\n}\n\nexport function isPublic(element: Element): boolean {\n return !element.closest('Private');\n}\n\n/** @returns the version of the SCL project */\nexport function getVersion(element: Element): string {\n const header = Array.from(\n element.ownerDocument.getElementsByTagName('Header')\n ).filter(item => !item.closest('Private'));\n\n return header[0].getAttribute('version') ?? '2003';\n}\n\n/** maximum value for `lnInst` attribute */\nconst maxLnInst = 99;\nconst lnInstRange = Array(maxLnInst)\n .fill(1)\n .map((_, i) => `${i + 1}`);\n\n/**\n * @param parent - The LNodes' parent element to be scanned once for `lnInst`\n * values already in use. Be sure to create a new generator every time the\n * children of this element change.\n * @returns a function generating increasing unused `lnInst` values for\n * `lnClass` LNodes within `parent` on subsequent invocations\n */\nexport function newLnInstGenerator(\n parent: Element\n): (lnClass: string) => string | undefined {\n const generators = new Map<string, () => string | undefined>();\n\n return (lnClass: string) => {\n if (!generators.has(lnClass)) {\n const lnInsts = new Set(\n getChildElementsByTagName(parent, 'LNode')\n .filter(lnode => lnode.getAttribute('lnClass') === lnClass)\n .map(lNode => lNode.getAttribute('lnInst')!)\n );\n\n generators.set(lnClass, () => {\n const uniqueLnInst = lnInstRange.find(lnInst => !lnInsts.has(lnInst));\n if (uniqueLnInst) lnInsts.add(uniqueLnInst);\n return uniqueLnInst;\n });\n }\n\n return generators.get(lnClass)!();\n };\n}\n\n/**\n * @param lnElements - The LN elements to be scanned for `inst`\n * values already in use.\n * @returns first available inst value for LN or undefined if no inst is available\n */\nexport function minAvailableLogicalNodeInstance(\n lnElements: Element[]\n): string | undefined {\n const lnInsts = new Set(lnElements.map(ln => ln.getAttribute('inst') || ''));\n return lnInstRange.find(lnInst => !lnInsts.has(lnInst));\n}\n\ndeclare global {\n interface ElementEventMap {\n ['wizard']: WizardEvent;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"wizards.js","sourceRoot":"","sources":["../src/wizards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wCAAwC,CAAC;AAChD,OAAO,kCAAkC,CAAC;AAG1C,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,cAAc,GAGf,MAAM,iBAAiB,CAAC;AAczB,SAAS,QAAQ,CAAC,OAAgB;IAChC,MAAM,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE7B,OAAO,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,iBAAiB,CACxB,SAAmC,EACnC,UAA2B,EAC3B,IAAa,EACb,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oBACX,CAAC,CAAC,SAAS;;0BAEL,IAAI,CAAC,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;;uBAE7C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;sBACrC,IAAI,CAAC,IAAI;oBACX,IAAI,CAAC,MAAM;oBACX,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;oBACzC,CAAC,CAAC,IAAI,CAAA,UAAU;oBAChB,CAAC,CAAC,GAAG;sBACL,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;;;uBAGvC,IAAI,CAAC,IAAI;oBACV,CAAC,CAAC,IAAI,CAAC,MAAM;wBACX,CAAC,CAAC,YAAY;wBACd,CAAC,CAAC,QAAQ;oBACZ,CAAC,CAAC,KAAK;;uCAEU,CAC1B;;SAEJ;aACF;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { html } from 'lit-element';\nimport { repeat } from 'lit-html/directives/repeat';\nimport { get } from 'lit-translate';\n\nimport '@material/mwc-icon';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-check-list-item';\nimport '@material/mwc-list/mwc-list-item';\nimport { ListItem } from '@material/mwc-list/mwc-list-item';\n\nimport {\n identity,\n isEqual,\n isSame,\n newWizardEvent,\n Wizard,\n WizardActor,\n} from './foundation.js';\nimport { EditorAction, SimpleAction } from '@openscd/core/foundation/deprecated/editor.js';\ninterface MergeOptions {\n title?: string;\n selected?: (diff: Diff<Element | string>) => boolean;\n disabled?: (diff: Diff<Element | string>) => boolean;\n auto?: (sink: Element, source: Element) => boolean;\n}\n\nexport type Diff<T> =\n | { ours: T; theirs: null }\n | { ours: null; theirs: T }\n | { ours: T; theirs: T };\n\nfunction describe(element: Element): string {\n const id = identity(element);\n\n return typeof id === 'string' ? id.replace(/^>/, '') : get('unidentifiable');\n}\n\nfunction mergeWizardAction(\n attrDiffs: [string, Diff<string>][],\n childDiffs: Diff<Element>[],\n sink: Element,\n source: Element,\n options?: MergeOptions\n): WizardActor {\n return (_, wizard: Element): EditorAction[] => {\n const actions: SimpleAction[] = [];\n const checkList = wizard.shadowRoot!.querySelector('mwc-list')!;\n\n const selectedAttrDiffs = (<ListItem[]>checkList.selected)\n .filter(item => item.classList.contains('attr'))\n .map(item => attrDiffs[item.value as unknown as number]);\n\n const newSink = <Element>sink.cloneNode(false);\n const parent = selectedAttrDiffs.length ? newSink : sink;\n if (selectedAttrDiffs.length) {\n if (sink.childElementCount === 0) newSink.textContent = sink.textContent;\n for (const [name, diff] of selectedAttrDiffs)\n if (name === 'value') {\n newSink.textContent = diff.theirs;\n } else if (diff.theirs === null) newSink.removeAttribute(name);\n else newSink.setAttribute(name, diff.theirs);\n actions.push({ old: { element: sink }, new: { element: newSink } });\n }\n\n let acted = false;\n\n const selectedChildDiffs = (<ListItem[]>checkList.selected)\n .filter(item => item.classList.contains('child'))\n .map(item => childDiffs[item.value as unknown as number]);\n if (selectedChildDiffs.length) {\n for (const diff of selectedChildDiffs)\n if (!diff.ours)\n actions.push({\n new: { parent, element: diff.theirs },\n });\n else if (!diff.theirs)\n actions.push({\n old: {\n parent,\n element: diff.ours,\n reference: diff.ours.nextSibling,\n },\n });\n else {\n acted = true;\n wizard.dispatchEvent(\n newWizardEvent(\n mergeWizard(diff.ours, diff.theirs, {\n ...options,\n title: undefined,\n })\n )\n );\n }\n }\n\n if (actions.length === 0 && !acted) wizard.dispatchEvent(newWizardEvent());\n\n return [\n {\n actions,\n title: get('merge.log', {\n sink: describe(sink),\n source: describe(source),\n tag: sink.tagName,\n }),\n },\n ];\n };\n}\n\nexport function mergeWizard(\n sink: Element,\n source: Element,\n options?: MergeOptions\n): Wizard {\n const attrDiffs: [string, Diff<string>][] = [];\n const ourText = sink.textContent ?? '';\n const theirText = source.textContent ?? '';\n\n if (\n sink.childElementCount === 0 &&\n source.childElementCount === 0 &&\n theirText !== ourText\n )\n attrDiffs.push(['value', { ours: ourText, theirs: theirText }]);\n\n const attributeNames = new Set(\n source.getAttributeNames().concat(sink.getAttributeNames())\n );\n\n for (const name of attributeNames)\n if (source.getAttribute(name) !== sink.getAttribute(name))\n attrDiffs.push([\n name,\n <Diff<string>>{\n theirs: source.getAttribute(name),\n ours: sink.getAttribute(name),\n },\n ]);\n\n const childDiffs: Diff<Element>[] = [];\n const ourChildren = Array.from(sink.children);\n const theirChildren = Array.from(source.children);\n\n theirChildren.forEach(theirs => {\n const twinIndex = ourChildren.findIndex(ourChild =>\n isSame(theirs, ourChild)\n );\n const ours = twinIndex > -1 ? ourChildren[twinIndex] : null;\n\n if (ours) ourChildren.splice(twinIndex, 1);\n if (ours && isEqual(theirs, ours)) return;\n\n if (!ours || !isEqual(theirs, ours)) childDiffs.push({ theirs, ours });\n });\n\n ourChildren.forEach(ours => childDiffs.push({ theirs: null, ours }));\n\n return [\n {\n title:\n options?.title ??\n get('merge.defaultTitle', {\n sink: describe(sink),\n source: describe(source),\n tag: sink.tagName,\n }),\n primary: {\n label: get('merge.title'),\n icon: 'merge_type',\n action: mergeWizardAction(attrDiffs, childDiffs, sink, source, options),\n auto: options?.auto?.(sink, source) ?? false,\n },\n content: [\n html`\n <mwc-list multi>\n ${repeat(\n attrDiffs,\n e => e,\n ([name, diff], index) =>\n html`<mwc-check-list-item\n value=${index}\n class=\"attr\"\n twoline\n left\n hasMeta\n .selected=${options?.selected?.(diff) ?? false}\n .disabled=${options?.disabled?.(diff) ?? false}\n style=\"--mdc-checkbox-checked-color: var(--mdc-theme-${diff.ours\n ? diff.theirs\n ? 'secondary'\n : 'error'\n : 'primary'});\"\n >\n <span>${name}</span>\n <span slot=\"secondary\"\n >${diff.ours ?? ''}\n ${diff.ours && diff.theirs ? html`&cularr;` : ' '}\n ${diff.theirs ?? ''}</span\n >\n <mwc-icon slot=\"meta\"\n >${diff.ours\n ? diff.theirs\n ? 'edit'\n : 'delete'\n : 'add'}</mwc-icon\n >\n </mwc-check-list-item>`\n )}\n ${childDiffs.length\n ? html`<mwc-list-item noninteractive\n >${get('merge.children')}</mwc-list-item\n >\n <li padded divider role=\"separator\"></li>`\n : ''}\n ${repeat(\n childDiffs,\n e => e,\n (diff, index) =>\n html`<mwc-check-list-item\n value=${index}\n class=\"child\"\n twoline\n left\n hasMeta\n .selected=${options?.selected?.(diff) ?? false}\n .disabled=${options?.disabled?.(diff) ?? false}\n style=\"--mdc-checkbox-checked-color: var(--mdc-theme-${diff.ours\n ? diff.theirs\n ? 'secondary'\n : 'error'\n : 'primary'});\"\n >\n <span>${diff.ours?.tagName ?? diff.theirs?.tagName}</span>\n <span slot=\"secondary\"\n >${diff.ours ? describe(diff.ours) : ''}\n ${diff.ours &&\n diff.theirs &&\n describe(diff.ours) + describe(diff.theirs)\n ? html`&cularr;`\n : ' '}\n ${diff.theirs ? describe(diff.theirs) : ''}</span\n >\n <mwc-icon slot=\"meta\"\n >${diff.ours\n ? diff.theirs\n ? 'merge_type'\n : 'delete'\n : 'add'}</mwc-icon\n >\n </mwc-check-list-item>`\n )}\n </mwc-list>\n `,\n ],\n },\n ];\n}\n"]}
1
+ {"version":3,"file":"wizards.js","sourceRoot":"","sources":["../src/wizards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wCAAwC,CAAC;AAChD,OAAO,kCAAkC,CAAC;AAG1C,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,cAAc,GAGf,MAAM,iBAAiB,CAAC;AAczB,SAAS,QAAQ,CAAC,OAAgB;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KAAK,EAAE,EAAE,CACd,IAAI,CAAA;0BACM,KAAK;;;;;8BAKD,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK;8BAClC,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK;yEACS,IAAI,CAAC,IAAI;oBAC9D,CAAC,CAAC,IAAI,CAAC,MAAM;wBACX,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,OAAO;oBACX,CAAC,CAAC,SAAS;;0BAEL,IAAI,CAAC,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;;uBAE7C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;sBACrC,IAAI,CAAC,IAAI;oBACX,IAAI,CAAC,MAAM;oBACX,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;oBACzC,CAAC,CAAC,IAAI,CAAA,UAAU;oBAChB,CAAC,CAAC,GAAG;sBACL,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;;;uBAGvC,IAAI,CAAC,IAAI;oBACV,CAAC,CAAC,IAAI,CAAC,MAAM;wBACX,CAAC,CAAC,YAAY;wBACd,CAAC,CAAC,QAAQ;oBACZ,CAAC,CAAC,KAAK;;uCAEU,CAC1B;;SAEJ;aACF;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { html } from 'lit-element';\nimport { repeat } from 'lit-html/directives/repeat';\nimport { get } from 'lit-translate';\n\nimport '@material/mwc-icon';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-check-list-item';\nimport '@material/mwc-list/mwc-list-item';\nimport { ListItem } from '@material/mwc-list/mwc-list-item';\n\nimport {\n identity,\n isEqual,\n isSame,\n newWizardEvent,\n Wizard,\n WizardActor,\n} from './foundation.js';\nimport { EditorAction, SimpleAction } from '@openscd/core/foundation/deprecated/editor';\ninterface MergeOptions {\n title?: string;\n selected?: (diff: Diff<Element | string>) => boolean;\n disabled?: (diff: Diff<Element | string>) => boolean;\n auto?: (sink: Element, source: Element) => boolean;\n}\n\nexport type Diff<T> =\n | { ours: T; theirs: null }\n | { ours: null; theirs: T }\n | { ours: T; theirs: T };\n\nfunction describe(element: Element): string {\n const id = identity(element);\n\n return typeof id === 'string' ? id.replace(/^>/, '') : get('unidentifiable');\n}\n\nfunction mergeWizardAction(\n attrDiffs: [string, Diff<string>][],\n childDiffs: Diff<Element>[],\n sink: Element,\n source: Element,\n options?: MergeOptions\n): WizardActor {\n return (_, wizard: Element): EditorAction[] => {\n const actions: SimpleAction[] = [];\n const checkList = wizard.shadowRoot!.querySelector('mwc-list')!;\n\n const selectedAttrDiffs = (<ListItem[]>checkList.selected)\n .filter(item => item.classList.contains('attr'))\n .map(item => attrDiffs[item.value as unknown as number]);\n\n const newSink = <Element>sink.cloneNode(false);\n const parent = selectedAttrDiffs.length ? newSink : sink;\n if (selectedAttrDiffs.length) {\n if (sink.childElementCount === 0) newSink.textContent = sink.textContent;\n for (const [name, diff] of selectedAttrDiffs)\n if (name === 'value') {\n newSink.textContent = diff.theirs;\n } else if (diff.theirs === null) newSink.removeAttribute(name);\n else newSink.setAttribute(name, diff.theirs);\n actions.push({ old: { element: sink }, new: { element: newSink } });\n }\n\n let acted = false;\n\n const selectedChildDiffs = (<ListItem[]>checkList.selected)\n .filter(item => item.classList.contains('child'))\n .map(item => childDiffs[item.value as unknown as number]);\n if (selectedChildDiffs.length) {\n for (const diff of selectedChildDiffs)\n if (!diff.ours)\n actions.push({\n new: { parent, element: diff.theirs },\n });\n else if (!diff.theirs)\n actions.push({\n old: {\n parent,\n element: diff.ours,\n reference: diff.ours.nextSibling,\n },\n });\n else {\n acted = true;\n wizard.dispatchEvent(\n newWizardEvent(\n mergeWizard(diff.ours, diff.theirs, {\n ...options,\n title: undefined,\n })\n )\n );\n }\n }\n\n if (actions.length === 0 && !acted) wizard.dispatchEvent(newWizardEvent());\n\n return [\n {\n actions,\n title: get('merge.log', {\n sink: describe(sink),\n source: describe(source),\n tag: sink.tagName,\n }),\n },\n ];\n };\n}\n\nexport function mergeWizard(\n sink: Element,\n source: Element,\n options?: MergeOptions\n): Wizard {\n const attrDiffs: [string, Diff<string>][] = [];\n const ourText = sink.textContent ?? '';\n const theirText = source.textContent ?? '';\n\n if (\n sink.childElementCount === 0 &&\n source.childElementCount === 0 &&\n theirText !== ourText\n )\n attrDiffs.push(['value', { ours: ourText, theirs: theirText }]);\n\n const attributeNames = new Set(\n source.getAttributeNames().concat(sink.getAttributeNames())\n );\n\n for (const name of attributeNames)\n if (source.getAttribute(name) !== sink.getAttribute(name))\n attrDiffs.push([\n name,\n <Diff<string>>{\n theirs: source.getAttribute(name),\n ours: sink.getAttribute(name),\n },\n ]);\n\n const childDiffs: Diff<Element>[] = [];\n const ourChildren = Array.from(sink.children);\n const theirChildren = Array.from(source.children);\n\n theirChildren.forEach(theirs => {\n const twinIndex = ourChildren.findIndex(ourChild =>\n isSame(theirs, ourChild)\n );\n const ours = twinIndex > -1 ? ourChildren[twinIndex] : null;\n\n if (ours) ourChildren.splice(twinIndex, 1);\n if (ours && isEqual(theirs, ours)) return;\n\n if (!ours || !isEqual(theirs, ours)) childDiffs.push({ theirs, ours });\n });\n\n ourChildren.forEach(ours => childDiffs.push({ theirs: null, ours }));\n\n return [\n {\n title:\n options?.title ??\n get('merge.defaultTitle', {\n sink: describe(sink),\n source: describe(source),\n tag: sink.tagName,\n }),\n primary: {\n label: get('merge.title'),\n icon: 'merge_type',\n action: mergeWizardAction(attrDiffs, childDiffs, sink, source, options),\n auto: options?.auto?.(sink, source) ?? false,\n },\n content: [\n html`\n <mwc-list multi>\n ${repeat(\n attrDiffs,\n e => e,\n ([name, diff], index) =>\n html`<mwc-check-list-item\n value=${index}\n class=\"attr\"\n twoline\n left\n hasMeta\n .selected=${options?.selected?.(diff) ?? false}\n .disabled=${options?.disabled?.(diff) ?? false}\n style=\"--mdc-checkbox-checked-color: var(--mdc-theme-${diff.ours\n ? diff.theirs\n ? 'secondary'\n : 'error'\n : 'primary'});\"\n >\n <span>${name}</span>\n <span slot=\"secondary\"\n >${diff.ours ?? ''}\n ${diff.ours && diff.theirs ? html`&cularr;` : ' '}\n ${diff.theirs ?? ''}</span\n >\n <mwc-icon slot=\"meta\"\n >${diff.ours\n ? diff.theirs\n ? 'edit'\n : 'delete'\n : 'add'}</mwc-icon\n >\n </mwc-check-list-item>`\n )}\n ${childDiffs.length\n ? html`<mwc-list-item noninteractive\n >${get('merge.children')}</mwc-list-item\n >\n <li padded divider role=\"separator\"></li>`\n : ''}\n ${repeat(\n childDiffs,\n e => e,\n (diff, index) =>\n html`<mwc-check-list-item\n value=${index}\n class=\"child\"\n twoline\n left\n hasMeta\n .selected=${options?.selected?.(diff) ?? false}\n .disabled=${options?.disabled?.(diff) ?? false}\n style=\"--mdc-checkbox-checked-color: var(--mdc-theme-${diff.ours\n ? diff.theirs\n ? 'secondary'\n : 'error'\n : 'primary'});\"\n >\n <span>${diff.ours?.tagName ?? diff.theirs?.tagName}</span>\n <span slot=\"secondary\"\n >${diff.ours ? describe(diff.ours) : ''}\n ${diff.ours &&\n diff.theirs &&\n describe(diff.ours) + describe(diff.theirs)\n ? html`&cularr;`\n : ' '}\n ${diff.theirs ? describe(diff.theirs) : ''}</span\n >\n <mwc-icon slot=\"meta\"\n >${diff.ours\n ? diff.theirs\n ? 'merge_type'\n : 'delete'\n : 'add'}</mwc-icon\n >\n </mwc-check-list-item>`\n )}\n </mwc-list>\n `,\n ],\n },\n ];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compas-oscd/open-scd",
3
- "version": "0.34.23",
3
+ "version": "0.34.25",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/com-pas/open-scd.git",