@graphty/graph-io 0.3.36 → 0.3.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/chunks/{choose-494CpuXQ.js → choose-CsO24U-5.js} +2 -2
  2. package/dist/chunks/{choose-494CpuXQ.js.map → choose-CsO24U-5.js.map} +1 -1
  3. package/dist/chunks/{constants-BBK4rsQZ.js → constants-BPRiVyBu.js} +2 -2
  4. package/dist/chunks/{constants-BBK4rsQZ.js.map → constants-BPRiVyBu.js.map} +1 -1
  5. package/dist/chunks/{escape-wVIEtLv6.js → escape-BRcyzD77.js} +4 -4
  6. package/dist/chunks/{escape-wVIEtLv6.js.map → escape-BRcyzD77.js.map} +1 -1
  7. package/dist/chunks/{export-Cbt4h_0n.js → export-CTUlibzr.js} +4 -4
  8. package/dist/chunks/export-CTUlibzr.js.map +1 -0
  9. package/dist/chunks/{exporter-CkPnJCXU.js → exporter-2UNIxzcu.js} +3 -3
  10. package/dist/chunks/{exporter-CkPnJCXU.js.map → exporter-2UNIxzcu.js.map} +1 -1
  11. package/dist/chunks/{exporter-LZTIAzkS.js → exporter-B_YFZ4ix.js} +8 -8
  12. package/dist/chunks/exporter-B_YFZ4ix.js.map +1 -0
  13. package/dist/chunks/{exporter-CqnmKk-f.js → exporter-Bn4jdYfd.js} +5 -5
  14. package/dist/chunks/{exporter-CqnmKk-f.js.map → exporter-Bn4jdYfd.js.map} +1 -1
  15. package/dist/chunks/{exporter-DMxRy-0l.js → exporter-flsHFoER.js} +4 -4
  16. package/dist/chunks/{exporter-DMxRy-0l.js.map → exporter-flsHFoER.js.map} +1 -1
  17. package/dist/chunks/{importer-C1VMuEBQ.js → importer-BD3mi2QH.js} +10 -10
  18. package/dist/chunks/importer-BD3mi2QH.js.map +1 -0
  19. package/dist/chunks/{importer-DvPvd4Yy.js → importer-Bgb9sgZZ.js} +9 -9
  20. package/dist/chunks/importer-Bgb9sgZZ.js.map +1 -0
  21. package/dist/chunks/{importer-CSmH218L.js → importer-CEuUmyPe.js} +10 -10
  22. package/dist/chunks/importer-CEuUmyPe.js.map +1 -0
  23. package/dist/chunks/{importer-DMgcD1wI.js → importer-DqMtyYLX.js} +11 -11
  24. package/dist/chunks/importer-DqMtyYLX.js.map +1 -0
  25. package/dist/chunks/{importer-BTSvNJUB.js → importer-Dwqepe_B.js} +3 -3
  26. package/dist/chunks/{importer-BTSvNJUB.js.map → importer-Dwqepe_B.js.map} +1 -1
  27. package/dist/chunks/{importer-BTbjwN10.js → importer-oIUx9u_g.js} +9 -9
  28. package/dist/chunks/importer-oIUx9u_g.js.map +1 -0
  29. package/dist/chunks/{importer-DtKPzhVp.js → importer-yWUPR_nU.js} +13 -13
  30. package/dist/chunks/importer-yWUPR_nU.js.map +1 -0
  31. package/dist/chunks/{json-elements-CxJF-Szz.js → json-elements-AkglPS3m.js} +4 -4
  32. package/dist/chunks/json-elements-AkglPS3m.js.map +1 -0
  33. package/dist/chunks/{ontology-export-p1PsPenq.js → ontology-export-DDoG3egY.js} +2 -2
  34. package/dist/chunks/{ontology-export-p1PsPenq.js.map → ontology-export-DDoG3egY.js.map} +1 -1
  35. package/dist/chunks/{records-BrfHycmg.js → records-ChmWZGuz.js} +2 -2
  36. package/dist/chunks/{records-BrfHycmg.js.map → records-ChmWZGuz.js.map} +1 -1
  37. package/dist/chunks/{text-BD-TzLNm.js → text-Btw3sBe_.js} +2 -2
  38. package/dist/chunks/{text-BD-TzLNm.js.map → text-Btw3sBe_.js.map} +1 -1
  39. package/dist/csv.js +4 -4
  40. package/dist/cx.js +1 -1
  41. package/dist/cx2.js +2 -2
  42. package/dist/cys.js +1 -1
  43. package/dist/dot.js +1 -1
  44. package/dist/gexf.js +30 -30
  45. package/dist/gexf.js.map +1 -1
  46. package/dist/gml.js +8 -8
  47. package/dist/gml.js.map +1 -1
  48. package/dist/graph-io.js +28 -28
  49. package/dist/graph-io.js.map +1 -1
  50. package/dist/graphml.js +2 -2
  51. package/dist/json.js +1 -1
  52. package/dist/neo4j.js +6 -6
  53. package/dist/neo4j.js.map +1 -1
  54. package/dist/obo.js +1 -1
  55. package/dist/pajek.js +1 -1
  56. package/dist/src/common/attributes.d.ts +1 -2
  57. package/dist/src/common/attributes.d.ts.map +1 -1
  58. package/dist/src/common/attributes.js +2 -2
  59. package/dist/src/common/attributes.js.map +1 -1
  60. package/dist/src/common/direction.d.ts +1 -2
  61. package/dist/src/common/direction.d.ts.map +1 -1
  62. package/dist/src/common/direction.js +2 -2
  63. package/dist/src/common/direction.js.map +1 -1
  64. package/dist/src/common/escape.js +1 -1
  65. package/dist/src/common/escape.js.map +1 -1
  66. package/dist/src/common/export.js +1 -1
  67. package/dist/src/common/export.js.map +1 -1
  68. package/dist/src/common/ids.d.ts +1 -2
  69. package/dist/src/common/ids.d.ts.map +1 -1
  70. package/dist/src/common/ids.js +1 -2
  71. package/dist/src/common/ids.js.map +1 -1
  72. package/dist/src/common/input.d.ts +1 -2
  73. package/dist/src/common/input.d.ts.map +1 -1
  74. package/dist/src/common/input.js +2 -2
  75. package/dist/src/common/input.js.map +1 -1
  76. package/dist/src/common/json-elements.js +1 -1
  77. package/dist/src/common/json-elements.js.map +1 -1
  78. package/dist/src/common/options.d.ts +1 -2
  79. package/dist/src/common/options.d.ts.map +1 -1
  80. package/dist/src/common/options.js +1 -1
  81. package/dist/src/common/options.js.map +1 -1
  82. package/dist/src/common/xml.js +1 -1
  83. package/dist/src/common/xml.js.map +1 -1
  84. package/dist/src/formats/cx/importer.js +6 -6
  85. package/dist/src/formats/cx/importer.js.map +1 -1
  86. package/dist/src/formats/cys/importer.js +3 -3
  87. package/dist/src/formats/cys/importer.js.map +1 -1
  88. package/dist/src/formats/cys/tables.js +1 -1
  89. package/dist/src/formats/cys/tables.js.map +1 -1
  90. package/dist/src/formats/dot/exporter.js +3 -3
  91. package/dist/src/formats/dot/exporter.js.map +1 -1
  92. package/dist/src/formats/dot/importer.js +1 -1
  93. package/dist/src/formats/dot/importer.js.map +1 -1
  94. package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
  95. package/dist/src/formats/gexf/exporter.js +24 -27
  96. package/dist/src/formats/gexf/exporter.js.map +1 -1
  97. package/dist/src/formats/gexf/importer.d.ts +1 -2
  98. package/dist/src/formats/gexf/importer.d.ts.map +1 -1
  99. package/dist/src/formats/gexf/importer.js +5 -5
  100. package/dist/src/formats/gexf/importer.js.map +1 -1
  101. package/dist/src/formats/gml/exporter.js +4 -4
  102. package/dist/src/formats/gml/exporter.js.map +1 -1
  103. package/dist/src/formats/gml/syntax.js +1 -1
  104. package/dist/src/formats/gml/syntax.js.map +1 -1
  105. package/dist/src/formats/graphml/exporter.js +3 -3
  106. package/dist/src/formats/graphml/exporter.js.map +1 -1
  107. package/dist/src/formats/graphml/importer.js +2 -2
  108. package/dist/src/formats/graphml/importer.js.map +1 -1
  109. package/dist/src/formats/graphml/tree.js +2 -2
  110. package/dist/src/formats/graphml/tree.js.map +1 -1
  111. package/dist/src/formats/json/exporter.js +1 -1
  112. package/dist/src/formats/json/exporter.js.map +1 -1
  113. package/dist/src/formats/json/importer.js +1 -1
  114. package/dist/src/formats/json/importer.js.map +1 -1
  115. package/dist/src/formats/neo4j/exporter.js +3 -3
  116. package/dist/src/formats/neo4j/exporter.js.map +1 -1
  117. package/dist/src/formats/pajek/exporter.js +4 -4
  118. package/dist/src/formats/pajek/exporter.js.map +1 -1
  119. package/dist/src/formats/xgmml/document.js +6 -6
  120. package/dist/src/formats/xgmml/document.js.map +1 -1
  121. package/dist/src/formats/xgmml/emit.js +2 -2
  122. package/dist/src/formats/xgmml/emit.js.map +1 -1
  123. package/dist/src/formats/xgmml/exporter.js +1 -1
  124. package/dist/src/formats/xgmml/exporter.js.map +1 -1
  125. package/dist/src/formats/xgmml/importer.js +1 -1
  126. package/dist/src/formats/xgmml/importer.js.map +1 -1
  127. package/dist/src/registry.js +2 -2
  128. package/dist/src/registry.js.map +1 -1
  129. package/dist/src/sniff.js +1 -1
  130. package/dist/src/sniff.js.map +1 -1
  131. package/dist/xgmml.js +2 -2
  132. package/package.json +2 -2
  133. package/src/common/attributes.ts +1 -2
  134. package/src/common/direction.ts +2 -2
  135. package/src/common/escape.ts +1 -1
  136. package/src/common/export.ts +1 -1
  137. package/src/common/ids.ts +1 -3
  138. package/src/common/input.ts +2 -2
  139. package/src/common/json-elements.ts +1 -1
  140. package/src/common/options.ts +1 -1
  141. package/src/common/xml.ts +1 -1
  142. package/src/formats/cx/importer.ts +6 -6
  143. package/src/formats/cys/importer.ts +3 -3
  144. package/src/formats/cys/tables.ts +1 -1
  145. package/src/formats/dot/exporter.ts +3 -3
  146. package/src/formats/dot/importer.ts +1 -1
  147. package/src/formats/gexf/exporter.ts +24 -28
  148. package/src/formats/gexf/importer.ts +5 -5
  149. package/src/formats/gml/exporter.ts +4 -4
  150. package/src/formats/gml/syntax.ts +1 -1
  151. package/src/formats/graphml/exporter.ts +3 -3
  152. package/src/formats/graphml/importer.ts +2 -2
  153. package/src/formats/graphml/tree.ts +2 -2
  154. package/src/formats/json/exporter.ts +1 -1
  155. package/src/formats/json/importer.ts +1 -1
  156. package/src/formats/neo4j/exporter.ts +3 -3
  157. package/src/formats/pajek/exporter.ts +4 -4
  158. package/src/formats/xgmml/document.ts +6 -6
  159. package/src/formats/xgmml/emit.ts +2 -2
  160. package/src/formats/xgmml/exporter.ts +1 -1
  161. package/src/formats/xgmml/importer.ts +1 -1
  162. package/src/registry.ts +2 -2
  163. package/src/sniff.ts +1 -1
  164. package/dist/chunks/export-Cbt4h_0n.js.map +0 -1
  165. package/dist/chunks/exporter-LZTIAzkS.js.map +0 -1
  166. package/dist/chunks/importer-BTbjwN10.js.map +0 -1
  167. package/dist/chunks/importer-C1VMuEBQ.js.map +0 -1
  168. package/dist/chunks/importer-CSmH218L.js.map +0 -1
  169. package/dist/chunks/importer-DMgcD1wI.js.map +0 -1
  170. package/dist/chunks/importer-DtKPzhVp.js.map +0 -1
  171. package/dist/chunks/importer-DvPvd4Yy.js.map +0 -1
  172. package/dist/chunks/json-elements-CxJF-Szz.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { GraphBuilder } from "@graphty/graph-format";
2
- import { a7 as chooseGraph, a8 as ImportReportBuilder } from "./export-Cbt4h_0n.js";
2
+ import { a7 as chooseGraph, a8 as ImportReportBuilder } from "./export-CTUlibzr.js";
3
3
  async function importChosenGraph(importer, input, sink, options) {
4
4
  const importAll = importer.importAll?.bind(importer);
5
5
  if (importAll === void 0) {
@@ -53,4 +53,4 @@ async function replayable(input) {
53
53
  export {
54
54
  importChosenGraph as i
55
55
  };
56
- //# sourceMappingURL=choose-494CpuXQ.js.map
56
+ //# sourceMappingURL=choose-CsO24U-5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"choose-494CpuXQ.js","sources":["../../src/common/choose.ts"],"sourcesContent":["/**\n * The graph choice of an importer that can read every graph of a file (importAll) but has no cheap\n * listing: `graphIndex` / `graphName` passed to its import() directly, as the registry would honor\n * them, so a caller with its own builder is not silently given the first graph.\n */\n\nimport { GraphBuilder, type GraphSink } from \"@graphty/graph-format\";\n\nimport {\n type CommonImportOptions,\n type GraphChoiceOptions,\n type GraphImporter,\n type ImportInput,\n type ImportReport,\n} from \"../types.js\";\nimport { chooseGraph } from \"./options.js\";\nimport { ImportReportBuilder } from \"./report.js\";\n\n/**\n * Read the graph `graphIndex` or `graphName` chooses into the sink: every graph is read once into a\n * scratch builder to learn the names (E_GRAPH_NOT_FOUND lists them), then the input again with the\n * chosen graph going to the sink.\n * @param importer - the importer, which has importAll()\n * @param input - the input\n * @param sink - the caller's sink\n * @param options - the import options, with the choice\n * @returns the chosen graph's report\n */\nexport async function importChosenGraph<O>(\n importer: GraphImporter<O>,\n input: ImportInput,\n sink: GraphSink,\n options: (O & CommonImportOptions & GraphChoiceOptions) | undefined,\n): Promise<ImportReport> {\n const importAll = importer.importAll?.bind(importer);\n if (importAll === undefined) {\n return importer.import(input, sink, options);\n }\n const replay = await replayable(input);\n const scratch: GraphBuilder[] = [];\n await importAll(replay, (i) => (scratch[i] = new GraphBuilder({ directed: false })), {\n ...options,\n onProgress: undefined,\n } as O & CommonImportOptions);\n const names = scratch.map((b) => {\n try {\n return b.freeze().meta.name;\n } catch {\n return null;\n }\n });\n const chosen = chooseGraph(names, options, new ImportReportBuilder(importer.format, 0));\n const reports = await importAll(\n replay,\n (i) => (i === chosen ? sink : new GraphBuilder({ directed: false })),\n options,\n );\n return reports[chosen];\n}\n\n/**\n * The input as a string or bytes that can be read twice.\n * @param input - the input\n * @returns the same text or bytes, or the stream's bytes\n */\nasync function replayable(input: ImportInput): Promise<string | Uint8Array> {\n if (typeof input === \"string\" || input instanceof Uint8Array) {\n return input;\n }\n const parts: Uint8Array[] = [];\n const encoder = new TextEncoder();\n if (typeof (input as ReadableStream<Uint8Array>).getReader === \"function\") {\n const reader = (input as ReadableStream<Uint8Array>).getReader();\n for (let r = await reader.read(); !r.done; r = await reader.read()) {\n parts.push(r.value);\n }\n } else {\n for await (const chunk of input as AsyncIterable<string | Uint8Array>) {\n parts.push(typeof chunk === \"string\" ? encoder.encode(chunk) : chunk);\n }\n }\n const out = new Uint8Array(parts.reduce((n, p) => n + p.byteLength, 0));\n let offset = 0;\n for (const part of parts) {\n out.set(part, offset);\n offset += part.byteLength;\n }\n return out;\n}\n"],"names":[],"mappings":";;AA4BA,eAAsB,kBAClB,UACA,OACA,MACA,SACqB;AACrB,QAAM,YAAY,SAAS,WAAW,KAAK,QAAQ;AACnD,MAAI,cAAc,QAAW;AACzB,WAAO,SAAS,OAAO,OAAO,MAAM,OAAO;AAAA,EAC/C;AACA,QAAM,SAAS,MAAM,WAAW,KAAK;AACrC,QAAM,UAA0B,CAAA;AAChC,QAAM,UAAU,QAAQ,CAAC,MAAO,QAAQ,CAAC,IAAI,IAAI,aAAa,EAAE,UAAU,MAAA,CAAO,GAAI;AAAA,IACjF,GAAG;AAAA,IACH,YAAY;AAAA,EAAA,CACY;AAC5B,QAAM,QAAQ,QAAQ,IAAI,CAAC,MAAM;AAC7B,QAAI;AACA,aAAO,EAAE,SAAS,KAAK;AAAA,IAC3B,QAAQ;AACJ,aAAO;AAAA,IACX;AAAA,EACJ,CAAC;AACD,QAAM,SAAS,YAAY,OAAO,SAAS,IAAI,oBAAoB,SAAS,QAAQ,CAAC,CAAC;AACtF,QAAM,UAAU,MAAM;AAAA,IAClB;AAAA,IACA,CAAC,MAAO,MAAM,SAAS,OAAO,IAAI,aAAa,EAAE,UAAU,OAAO;AAAA,IAClE;AAAA,EAAA;AAEJ,SAAO,QAAQ,MAAM;AACzB;AAOA,eAAe,WAAW,OAAkD;AACxE,MAAI,OAAO,UAAU,YAAY,iBAAiB,YAAY;AAC1D,WAAO;AAAA,EACX;AACA,QAAM,QAAsB,CAAA;AAC5B,QAAM,UAAU,IAAI,YAAA;AACpB,MAAI,OAAQ,MAAqC,cAAc,YAAY;AACvE,UAAM,SAAU,MAAqC,UAAA;AACrD,aAAS,IAAI,MAAM,OAAO,KAAA,GAAQ,CAAC,EAAE,MAAM,IAAI,MAAM,OAAO,KAAA,GAAQ;AAChE,YAAM,KAAK,EAAE,KAAK;AAAA,IACtB;AAAA,EACJ,OAAO;AACH,qBAAiB,SAAS,OAA6C;AACnE,YAAM,KAAK,OAAO,UAAU,WAAW,QAAQ,OAAO,KAAK,IAAI,KAAK;AAAA,IACxE;AAAA,EACJ;AACA,QAAM,MAAM,IAAI,WAAW,MAAM,OAAO,CAAC,GAAG,MAAM,IAAI,EAAE,YAAY,CAAC,CAAC;AACtE,MAAI,SAAS;AACb,aAAW,QAAQ,OAAO;AACtB,QAAI,IAAI,MAAM,MAAM;AACpB,cAAU,KAAK;AAAA,EACnB;AACA,SAAO;AACX;"}
1
+ {"version":3,"file":"choose-CsO24U-5.js","sources":["../../src/common/choose.ts"],"sourcesContent":["/**\n * The graph choice of an importer that can read every graph of a file (importAll) but has no cheap\n * listing: `graphIndex` / `graphName` passed to its import() directly, as the registry would honor\n * them, so a caller with its own builder is not silently given the first graph.\n */\n\nimport { GraphBuilder, type GraphSink } from \"@graphty/graph-format\";\n\nimport {\n type CommonImportOptions,\n type GraphChoiceOptions,\n type GraphImporter,\n type ImportInput,\n type ImportReport,\n} from \"../types.js\";\nimport { chooseGraph } from \"./options.js\";\nimport { ImportReportBuilder } from \"./report.js\";\n\n/**\n * Read the graph `graphIndex` or `graphName` chooses into the sink: every graph is read once into a\n * scratch builder to learn the names (E_GRAPH_NOT_FOUND lists them), then the input again with the\n * chosen graph going to the sink.\n * @param importer - the importer, which has importAll()\n * @param input - the input\n * @param sink - the caller's sink\n * @param options - the import options, with the choice\n * @returns the chosen graph's report\n */\nexport async function importChosenGraph<O>(\n importer: GraphImporter<O>,\n input: ImportInput,\n sink: GraphSink,\n options: (O & CommonImportOptions & GraphChoiceOptions) | undefined,\n): Promise<ImportReport> {\n const importAll = importer.importAll?.bind(importer);\n if (importAll === undefined) {\n return importer.import(input, sink, options);\n }\n const replay = await replayable(input);\n const scratch: GraphBuilder[] = [];\n await importAll(replay, (i) => (scratch[i] = new GraphBuilder({ directed: false })), {\n ...options,\n onProgress: undefined,\n } as O & CommonImportOptions);\n const names = scratch.map((b) => {\n try {\n return b.freeze().meta.name;\n } catch {\n return null;\n }\n });\n const chosen = chooseGraph(names, options, new ImportReportBuilder(importer.format, 0));\n const reports = await importAll(\n replay,\n (i) => (i === chosen ? sink : new GraphBuilder({ directed: false })),\n options,\n );\n return reports[chosen];\n}\n\n/**\n * The input as a string or bytes that can be read twice.\n * @param input - the input\n * @returns the same text or bytes, or the stream's bytes\n */\nasync function replayable(input: ImportInput): Promise<string | Uint8Array> {\n if (typeof input === \"string\" || input instanceof Uint8Array) {\n return input;\n }\n const parts: Uint8Array[] = [];\n const encoder = new TextEncoder();\n if (typeof (input as ReadableStream<Uint8Array>).getReader === \"function\") {\n const reader = (input as ReadableStream<Uint8Array>).getReader();\n for (let r = await reader.read(); !r.done; r = await reader.read()) {\n parts.push(r.value);\n }\n } else {\n for await (const chunk of input as AsyncIterable<string | Uint8Array>) {\n parts.push(typeof chunk === \"string\" ? encoder.encode(chunk) : chunk);\n }\n }\n const out = new Uint8Array(parts.reduce((n, p) => n + p.byteLength, 0));\n let offset = 0;\n for (const part of parts) {\n out.set(part, offset);\n offset += part.byteLength;\n }\n return out;\n}\n"],"names":[],"mappings":";;AA4BA,eAAsB,kBAClB,UACA,OACA,MACA,SACqB;AACrB,QAAM,YAAY,SAAS,WAAW,KAAK,QAAQ;AACnD,MAAI,cAAc,QAAW;AACzB,WAAO,SAAS,OAAO,OAAO,MAAM,OAAO;AAAA,EAC/C;AACA,QAAM,SAAS,MAAM,WAAW,KAAK;AACrC,QAAM,UAA0B,CAAA;AAChC,QAAM,UAAU,QAAQ,CAAC,MAAO,QAAQ,CAAC,IAAI,IAAI,aAAa,EAAE,UAAU,MAAA,CAAO,GAAI;AAAA,IACjF,GAAG;AAAA,IACH,YAAY;AAAA,EAAA,CACY;AAC5B,QAAM,QAAQ,QAAQ,IAAI,CAAC,MAAM;AAC7B,QAAI;AACA,aAAO,EAAE,SAAS,KAAK;AAAA,IAC3B,QAAQ;AACJ,aAAO;AAAA,IACX;AAAA,EACJ,CAAC;AACD,QAAM,SAAS,YAAY,OAAO,SAAS,IAAI,oBAAoB,SAAS,QAAQ,CAAC,CAAC;AACtF,QAAM,UAAU,MAAM;AAAA,IAClB;AAAA,IACA,CAAC,MAAO,MAAM,SAAS,OAAO,IAAI,aAAa,EAAE,UAAU,OAAO;AAAA,IAClE;AAAA,EAAA;AAEJ,SAAO,QAAQ,MAAM;AACzB;AAOA,eAAe,WAAW,OAAkD;AACxE,MAAI,OAAO,UAAU,YAAY,iBAAiB,YAAY;AAC1D,WAAO;AAAA,EACX;AACA,QAAM,QAAsB,CAAA;AAC5B,QAAM,UAAU,IAAI,YAAA;AACpB,MAAI,OAAQ,MAAqC,cAAc,YAAY;AACvE,UAAM,SAAU,MAAqC,UAAA;AACrD,aAAS,IAAI,MAAM,OAAO,KAAA,GAAQ,CAAC,EAAE,MAAM,IAAI,MAAM,OAAO,KAAA,GAAQ;AAChE,YAAM,KAAK,EAAE,KAAK;AAAA,IACtB;AAAA,EACJ,OAAO;AACH,qBAAiB,SAAS,OAA6C;AACnE,YAAM,KAAK,OAAO,UAAU,WAAW,QAAQ,OAAO,KAAK,IAAI,KAAK;AAAA,IACxE;AAAA,EACJ;AACA,QAAM,MAAM,IAAI,WAAW,MAAM,OAAO,CAAC,GAAG,MAAM,IAAI,EAAE,YAAY,CAAC,CAAC;AACtE,MAAI,SAAS;AACb,aAAW,QAAQ,OAAO;AACtB,QAAI,IAAI,MAAM,MAAM;AACpB,cAAU,KAAK;AAAA,EACnB;AACA,SAAO;AACX;"}
@@ -1,4 +1,4 @@
1
- import { M as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, d as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, P as PRECISION_CODE, B as BAD_DEFAULT_CODE, U as UNKNOWN_ATTR_TYPE_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, O as OPTION_IGNORED_CODE, I as ID_MERGED_CODE, f as STRAY_TEXT_CODE, g as UNKNOWN_ELEMENT_CODE, h as UNKNOWN_XML_ATTRIBUTE_CODE, i as DANGLING_REFERENCE_CODE, H as HYPEREDGE_CODE, j as COUNT_MISMATCH_CODE, k as COUNT_HINT_CODE, l as MULTIPLE_GRAPHS_CODE, m as DUPLICATE_EDGE_ID_CODE, n as DUPLICATE_NODE_CODE, o as DUPLICATE_ATTRIBUTE_CODE, q as UNKNOWN_PARENT_CODE, s as MISSING_ENDPOINT_CODE, t as MISSING_ID_CODE, u as DUPLICATE_KEY_CODE, N as NO_GRAPH_CODE, E as EMPTY_INPUT_CODE, v as ENCODING_CONFLICT_CODE, w as UNKNOWN_ENCODING_CODE, x as ENCODING_FALLBACK_CODE, y as INVALID_ENCODING_CODE, z as INVALID_UTF8_CODE, X as XML_SYNTAX_CODE, A as COLUMN_TYPE_CODE, F as ELEMENT_ISSUE, G as INPUT_ISSUE, J as ID_TEXT_TYPE_CODE, K as ROLE_DROPPED_CODE, Q as PARENTS_DROPPED_CODE, T as MUTUAL_AS_UNDIRECTED_CODE } from "./export-Cbt4h_0n.js";
1
+ import { M as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, d as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, P as PRECISION_CODE, B as BAD_DEFAULT_CODE, U as UNKNOWN_ATTR_TYPE_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, O as OPTION_IGNORED_CODE, I as ID_MERGED_CODE, f as STRAY_TEXT_CODE, g as UNKNOWN_ELEMENT_CODE, h as UNKNOWN_XML_ATTRIBUTE_CODE, i as DANGLING_REFERENCE_CODE, H as HYPEREDGE_CODE, j as COUNT_MISMATCH_CODE, k as COUNT_HINT_CODE, l as MULTIPLE_GRAPHS_CODE, m as DUPLICATE_EDGE_ID_CODE, n as DUPLICATE_NODE_CODE, o as DUPLICATE_ATTRIBUTE_CODE, q as UNKNOWN_PARENT_CODE, s as MISSING_ENDPOINT_CODE, t as MISSING_ID_CODE, u as DUPLICATE_KEY_CODE, N as NO_GRAPH_CODE, E as EMPTY_INPUT_CODE, v as ENCODING_CONFLICT_CODE, w as UNKNOWN_ENCODING_CODE, x as ENCODING_FALLBACK_CODE, y as INVALID_ENCODING_CODE, z as INVALID_UTF8_CODE, X as XML_SYNTAX_CODE, A as COLUMN_TYPE_CODE, F as ELEMENT_ISSUE, G as INPUT_ISSUE, J as ID_TEXT_TYPE_CODE, K as ROLE_DROPPED_CODE, Q as PARENTS_DROPPED_CODE, T as MUTUAL_AS_UNDIRECTED_CODE } from "./export-CTUlibzr.js";
2
2
  const GRAPHML_NAMESPACE = "http://graphml.graphdrawing.org/xmlns";
3
3
  const YFILES_NAMESPACE = "http://www.yworks.com/xml/graphml";
4
4
  const XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance";
@@ -228,4 +228,4 @@ export {
228
228
  EXTENSIONS as f,
229
229
  ORIGINAL_ID_COLUMN as g
230
230
  };
231
- //# sourceMappingURL=constants-BBK4rsQZ.js.map
231
+ //# sourceMappingURL=constants-BPRiVyBu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants-BBK4rsQZ.js","sources":["../../src/formats/graphml/constants.ts"],"sourcesContent":["/**\n * What the GraphML importer and exporter share: the namespace, the format facts, the reserved\n * column names of the XML-attribute-derived columns, the `meta.extra`\n * keys the importer records for the exporter, and the issue and loss codes.\n */\n\nimport {\n BAD_DEFAULT_CODE,\n COLUMN_RENAMED_CODE,\n COLUMN_TYPE_CODE,\n COUNT_HINT_CODE,\n COUNT_MISMATCH_CODE,\n DANGLING_REFERENCE_CODE,\n DIRECTION_FORCED_CODE,\n DIRECTION_REFUSED_CODE,\n DUPLICATE_ATTRIBUTE_CODE,\n DUPLICATE_EDGE_ID_CODE,\n DUPLICATE_KEY_CODE,\n DUPLICATE_NODE_CODE,\n ELEMENT_ISSUE,\n EMPTY_INPUT_CODE,\n ENCODING_CONFLICT_CODE,\n ENCODING_FALLBACK_CODE,\n HYPEREDGE_CODE,\n ID_MERGED_CODE,\n ID_TEXT_TYPE_CODE,\n INPUT_ISSUE,\n INVALID_ENCODING_CODE,\n INVALID_UTF8_CODE,\n MISSING_ENDPOINT_CODE,\n MISSING_ID_CODE,\n MIXED_DIRECTION_CODE,\n MULTIPLE_GRAPHS_CODE,\n MUTUAL_AS_UNDIRECTED_CODE,\n NO_GRAPH_CODE,\n OPTION_IGNORED_CODE,\n PARENTS_DROPPED_CODE,\n PRECISION_CODE,\n ROLE_DROPPED_CODE,\n ROLE_TAKEN_CODE,\n SINK_OPTION_CODE,\n STRAY_TEXT_CODE,\n UNKNOWN_ATTR_TYPE_CODE,\n UNKNOWN_ELEMENT_CODE,\n UNKNOWN_ENCODING_CODE,\n UNKNOWN_PARENT_CODE,\n UNKNOWN_XML_ATTRIBUTE_CODE,\n XML_SYNTAX_CODE,\n} from \"../../common/codes.js\";\n\n/**\n * The GraphML namespace.\n * @category Plugin helpers\n */\nexport const GRAPHML_NAMESPACE = \"http://graphml.graphdrawing.org/xmlns\";\n\n/**\n * The yFiles extension namespace, declared as `xmlns:y` when a yfiles column is written.\n * @category Plugin helpers\n */\nexport const YFILES_NAMESPACE = \"http://www.yworks.com/xml/graphml\";\n\n/**\n * The XML Schema instance namespace and the schema location the exporter writes.\n * @category Plugin helpers\n */\nexport const XSI_NAMESPACE = \"http://www.w3.org/2001/XMLSchema-instance\";\n\n/**\n * The GraphML schema location written by the exporter.\n * @category Plugin helpers\n */\nexport const SCHEMA_LOCATION =\n \"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\";\n\n/**\n * The format name.\n * @category Plugin helpers\n */\nexport const FORMAT = \"graphml\";\n\n/**\n * File extensions.\n * @category Plugin helpers\n */\nexport const EXTENSIONS: readonly string[] = Object.freeze([\".graphml\", \".xml\"]);\n\n/**\n * MIME types.\n * @category Plugin helpers\n */\nexport const MIME_TYPES: readonly string[] = Object.freeze([\"application/graphml+xml\", \"application/xml\", \"text/xml\"]);\n\n/**\n * The `attr.name` of the node key that carries ids rewritten by `sanitizeIds: \"mangle\"`.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_ATTRIBUTE = \"graphty:originalId\";\n\n/**\n * The node column that keeps original ids when `restoreMangledIds` is off.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_COLUMN = \"graphty.originalId\";\n\n/**\n * The edge column of the `id` XML attribute (role id, unique).\n * @category Plugin helpers\n */\nexport const EDGE_ID_COLUMN = \"id\";\n\n/**\n * The edge columns of the `sourceport` / `targetport` XML attributes (roles sourcePort / targetPort).\n * @category Plugin helpers\n */\nexport const SOURCE_PORT_COLUMN = \"sourceport\";\n\n/**\n * The edge column of the `targetport` XML attribute.\n * @category Plugin helpers\n */\nexport const TARGET_PORT_COLUMN = \"targetport\";\n\n/**\n * The node column of the containing node of a nested graph (u32, role parent, refersTo node).\n * @category Plugin helpers\n */\nexport const PARENT_COLUMN = \"parent\";\n\n/**\n * The bool node column marking the hub nodes synthesized for hyperedges under `hyperedges: \"star\"`.\n * @category Plugin helpers\n */\nexport const HYPEREDGE_HUB_COLUMN = \"graphty.hyperedge\";\n\n/**\n * The column name a node key titled `label` receives the `label` role under.\n * @category Plugin helpers\n */\nexport const LABEL_COLUMN = \"label\";\n\n/**\n * Edge column names reserved for the XML-attribute-derived columns; a key titled like one is renamed `<name>#<id>`.\n * @category Plugin helpers\n */\nexport const RESERVED_EDGE_NAMES: ReadonlySet<string> = new Set([\n EDGE_ID_COLUMN,\n SOURCE_PORT_COLUMN,\n TARGET_PORT_COLUMN,\n]);\n\n/**\n * Node column names reserved for the XML-derived columns.\n * @category Plugin helpers\n */\nexport const RESERVED_NODE_NAMES: ReadonlySet<string> = new Set([PARENT_COLUMN]);\n\n/**\n * The `meta.extra` key under which the importer records what the exporter needs.\n * @category Plugin helpers\n */\nexport const META_KEY = \"graphml\";\n\n/**\n * What the importer stores under `meta.extra.graphml`.\n * @category Plugin helpers\n */\nexport interface GraphmlMeta {\n /** The top-level `<graph id>`, or null. */\n readonly graphId: string | null;\n /** The top-level `edgedefault` as written, so a mixed file re-exports with the same layout. */\n readonly edgedefault: \"directed\" | \"undirected\" | null;\n /** The `xmlns:<prefix>` declarations of the root element (yFiles and the like). */\n readonly namespaces: Readonly<Record<string, string>>;\n}\n\n/**\n * The issue codes the GraphML importer records, by name: the codes shared\n * with the other importers and the GraphML-specific ones. A key is the code\n * without its severity and format prefixes.\n * @category Built-in formats\n */\nexport const GRAPHML_ISSUE = Object.freeze({\n ...INPUT_ISSUE,\n ...ELEMENT_ISSUE,\n /**\n * A value that does not parse as the type its attribute declares (\"x\" in an integer attribute). The value is\n * left unset; the node or edge is kept.\n */\n COLUMN_TYPE: COLUMN_TYPE_CODE,\n /** The input is not well-formed XML. The import stops. */\n XML_SYNTAX: XML_SYNTAX_CODE,\n /** The input is not valid UTF-8. The import stops. */\n INVALID_UTF8: INVALID_UTF8_CODE,\n /**\n * Some bytes are not valid in the encoding that was chosen (by a byte order mark, the file's declaration or the\n * `encoding` option). The import stops.\n */\n INVALID_ENCODING: INVALID_ENCODING_CODE,\n /** Bytes that are not UTF-8 and declare no encoding were read as windows-1252. */\n ENCODING_FALLBACK: ENCODING_FALLBACK_CODE,\n /** A declared encoding the platform cannot decode was ignored. */\n UNKNOWN_ENCODING: UNKNOWN_ENCODING_CODE,\n /** A declared encoding the byte order mark contradicts (the mark wins). */\n ENCODING_CONFLICT: ENCODING_CONFLICT_CODE,\n /** The input holds no XML at all: it is empty, whitespace or a byte order mark only. The import stops. */\n EMPTY_INPUT: EMPTY_INPUT_CODE,\n /** The root element is not `<graphml>`. The import stops. */\n NOT_GRAPHML: \"E_NOT_GRAPHML\",\n /** The `<graphml>` root is in a namespace other than GraphML's; it is read as GraphML. */\n NAMESPACE: \"W_GRAPHML_NAMESPACE\",\n /** The document has no `<graph>`. The import stops. */\n NO_GRAPH: NO_GRAPH_CODE,\n /** A `<key>` without an id. */\n KEY_MISSING_ID: \"E_GRAPHML_KEY_MISSING_ID\",\n /** Two `<key>` elements with the same id. */\n DUPLICATE_KEY: DUPLICATE_KEY_CODE,\n /** A key declared for hyperedges, ports or endpoints (never used). */\n KEY_DOMAIN_UNSUPPORTED: \"W_GRAPHML_KEY_DOMAIN_UNSUPPORTED\",\n /** A `<node>` without an id. */\n MISSING_ID: MISSING_ID_CODE,\n /** An `<edge>` without a source or a target. */\n MISSING_ENDPOINT: MISSING_ENDPOINT_CODE,\n /** An edge endpoint that names no declared node under `addMissingNodes: false`; the edge is skipped. */\n UNKNOWN_NODE: \"E_UNKNOWN_NODE\",\n /** An edge endpoint that names a nested `<graph>`, not a node; a node of that id is created. */\n GRAPH_ENDPOINT: \"W_GRAPHML_GRAPH_ENDPOINT\",\n /** The nodes of a nested graph whose container node was skipped lose their parent. */\n UNKNOWN_PARENT: UNKNOWN_PARENT_CODE,\n /** Two `<data>` of one key on one element, two `<default>` in one key, or two weight keys; one is kept. */\n DUPLICATE_ATTRIBUTE: DUPLICATE_ATTRIBUTE_CODE,\n /** A `<data>` whose key was never declared. */\n UNKNOWN_KEY: \"E_GRAPHML_UNKNOWN_KEY\",\n /** A `<key>` declared after `<data>` that used it; those values were already reported and dropped. */\n KEY_DECLARED_LATE: \"W_GRAPHML_KEY_DECLARED_LATE\",\n /** A `<data>` whose key is declared for another domain. */\n KEY_DOMAIN: \"W_GRAPHML_KEY_DOMAIN\",\n /** A `<data>` without a key attribute. */\n DATA_MISSING_KEY: \"E_GRAPHML_DATA_MISSING_KEY\",\n /** A `<key>` whose `for` is not a GraphML domain. */\n KEY_FOR_INVALID: \"E_GRAPHML_KEY_FOR_INVALID\",\n /** Data of a nested `<graph>`; only the top-level graph has attributes. */\n NESTED_GRAPH_DATA: \"W_GRAPHML_NESTED_GRAPH_DATA\",\n /** Data of a hyperedge expanded to a star or clique. */\n HYPEREDGE_DATA_DROPPED: \"W_GRAPHML_HYPEREDGE_DATA_DROPPED\",\n /** Nested elements in the `<data>` of a typed (non-yfiles) key. */\n DATA_NESTED: \"E_GRAPHML_DATA_NESTED\",\n /** A `<node>` declared twice. */\n DUPLICATE_NODE: DUPLICATE_NODE_CODE,\n /** An edge id already used by another edge. */\n DUPLICATE_EDGE_ID: DUPLICATE_EDGE_ID_CODE,\n /** A `directed` attribute that is neither true nor false. */\n INVALID_DIRECTED: \"E_GRAPHML_INVALID_DIRECTED\",\n /** An `edgedefault` that is neither directed nor undirected. */\n INVALID_EDGEDEFAULT: \"E_GRAPHML_INVALID_EDGEDEFAULT\",\n /** A `<graph>` without edgedefault; the `defaultDirected` option applies. */\n EDGEDEFAULT_MISSING: \"W_GRAPHML_EDGEDEFAULT_MISSING\",\n /**\n * The file holds more than one top-level `<graph>`; their nodes and edges are merged into one graph.\n * `importAllGraphs()` reads every one.\n */\n MULTIPLE_GRAPHS: MULTIPLE_GRAPHS_CODE,\n /**\n * A node or edge count the file announces is too large to reserve room for; it is ignored and the elements are\n * read as they come.\n */\n COUNT_HINT: COUNT_HINT_CODE,\n /**\n * A `parse.nodes` or `parse.edges` count disagrees with what the graph holds. The elements are read as they are.\n */\n COUNT_MISMATCH: COUNT_MISMATCH_CODE,\n /** A hyperedge under `hyperedges: \"error\"`. */\n HYPEREDGE: HYPEREDGE_CODE,\n /** Hyperedges skipped under `hyperedges: \"skip\"`. */\n HYPEREDGE_SKIPPED: \"W_GRAPHML_HYPEREDGE_SKIPPED\",\n /** An endpoint of a hyperedge without a node, or with an unknown type. */\n HYPEREDGE_ENDPOINT: \"E_GRAPHML_HYPEREDGE_ENDPOINT\",\n /** `<port>` declarations (and their data) are not kept; sourceport / targetport edge attributes are. */\n PORT_DECLARATION: \"W_GRAPHML_PORT_DECLARATION\",\n /** A `sourceport` / `targetport` naming a port its node does not declare (once, with the count). */\n DANGLING_REFERENCE: DANGLING_REFERENCE_CODE,\n /** A `<graph>` inside an `<edge>` (legal GraphML): it and the nodes and edges it holds are dropped. */\n EDGE_GRAPH_DROPPED: \"W_GRAPHML_EDGE_GRAPH_DROPPED\",\n /** A `<node>` whose id is that of a hub `hyperedges: \"star\"` created; the node is merged into the hub. */\n HUB_ID_CLASH: \"W_GRAPHML_HUB_ID_CLASH\",\n /** A `graphty:originalId` value that is not text, or arrives after the node was added (after its nested graph). */\n ORIGINAL_ID_IGNORED: \"W_GRAPHML_ORIGINAL_ID_IGNORED\",\n /** A yFiles graphics value (a geometry coordinate, a width) that is not a number; it is not mapped. */\n YFILES_VALUE: \"W_GRAPHML_YFILES_VALUE\",\n /**\n * A GraphML `parse.*` attribute (`parse.nodeids`, `parse.order`, ...) that graph-io does not act on; the file is\n * read normally.\n */\n PARSE_HINT_IGNORED: \"W_GRAPHML_PARSE_HINT_IGNORED\",\n /** An XML attribute GraphML does not define (or the importer does not keep) on an element; it is not kept. */\n UNKNOWN_XML_ATTRIBUTE: UNKNOWN_XML_ATTRIBUTE_CODE,\n /** A `<locator>` element. */\n LOCATOR_DROPPED: \"W_GRAPHML_LOCATOR_DROPPED\",\n /** A `<desc>` of a node, an edge or a hyperedge. */\n DESC_DROPPED: \"W_GRAPHML_DESC_DROPPED\",\n /** An element the GraphML schema does not define at that place. */\n UNKNOWN_ELEMENT: UNKNOWN_ELEMENT_CODE,\n /** Non-whitespace text where the schema allows only elements. */\n STRAY_TEXT: STRAY_TEXT_CODE,\n /** Two distinct id texts merged into one number under `ids: \"number\"`. */\n ID_MERGED: ID_MERGED_CODE,\n /** You set an option this format does not use; it had no effect. The message names the option. */\n OPTION_IGNORED: OPTION_IGNORED_CODE,\n /** A yFiles key under `yfiles: \"skip\"`. */\n YFILES_SKIPPED: \"W_GRAPHML_YFILES_SKIPPED\",\n /**\n * An attribute was renamed `<name>#<suffix>` because another attribute already has its name, for example\n * two attributes declared with the same name.\n */\n COLUMN_RENAMED: COLUMN_RENAMED_CODE,\n /**\n * You read into a graph builder that already has an id, label or position attribute, so this file's one is kept as\n * a plain attribute.\n */\n ROLE_TAKEN: ROLE_TAKEN_CODE,\n /** A declared type the format does not define (kept as string). */\n UNKNOWN_ATTR_TYPE: UNKNOWN_ATTR_TYPE_CODE,\n /** A default that does not parse as the declared type. */\n BAD_DEFAULT: BAD_DEFAULT_CODE,\n /** An integer beyond 2^53 was stored as the nearest 64-bit float; pass `long: \"string\"` to keep every digit. */\n PRECISION: PRECISION_CODE,\n /**\n * You read into your own graph builder, which was created with a different `addMissingNodes`, `duplicateEdges`,\n * `selfLoops` or `weightDtype` than the option you passed; the builder's setting applies.\n */\n SINK_OPTION: SINK_OPTION_CODE,\n /**\n * You read into a graph builder whose direction is already set, or which already holds edges, so the file is read\n * with the builder's direction instead of its own.\n */\n DIRECTION_REFUSED: DIRECTION_REFUSED_CODE,\n /** Edges of the other direction were read with the direction `onMixedDirection` chose. */\n DIRECTION_FORCED: DIRECTION_FORCED_CODE,\n /**\n * The graph has both directed and undirected edges and `onMixedDirection` is \"error\". An import stops; a save to a\n * format that holds one direction per file fails with E_DIRECTED. Pass \"directed\" or \"undirected\" to read or write\n * it anyway.\n */\n MIXED_DIRECTION: MIXED_DIRECTION_CODE,\n});\n\n/**\n * Loss note codes of the GraphML importer (report.lossy) and exporter (check()): the GraphML\n * ones; the generic ones (dtypes, lists, json text, positions, visual and temporal roles,\n * extension tables, id charsets, the weight key clash, name changes) are those of `LOSS`.\n * @category Built-in formats\n */\nexport const GRAPHML_LOSS = Object.freeze({\n /** YFiles nested XML kept as a JSON tree: structure preserved, not byte-exact. */\n YFILES_JSON: \"W_GRAPHML_YFILES_JSON\",\n /** A mutual pair written as one undirected edge; the mark is lost. */\n MUTUAL_AS_UNDIRECTED: MUTUAL_AS_UNDIRECTED_CODE,\n /** A `parents` (multi-parent) column cannot be written as nested graphs. */\n PARENTS_DROPPED: PARENTS_DROPPED_CODE,\n /** An attribute with a role the format has no place for is written as a plain attribute; the role is lost. */\n ROLE_DROPPED: ROLE_DROPPED_CODE,\n /** Containment order differs from index order; node indices change after a round trip. */\n HIERARCHY_REORDERED: \"W_GRAPHML_HIERARCHY_REORDERED\",\n /** Nodes whose parent chain never reaches a root are written at the top level. */\n PARENT_CYCLE: \"W_GRAPHML_PARENT_CYCLE\",\n /** Node ids that read back as a different type, such as the text \"7\" as the number 7. */\n ID_TEXT_TYPE: ID_TEXT_TYPE_CODE,\n /** A numeric edge id column reads back as string. */\n EDGE_ID_TEXT: \"W_GRAPHML_EDGE_ID_TEXT\",\n /** A `yfiles.*` graphics column that no longer matches its yFiles tree: only the tree is written. */\n YFILES_GRAPHICS_STALE: \"W_GRAPHML_YFILES_GRAPHICS_STALE\",\n /** A yEd graphics value that is not valid XML; the save fails with E_COLUMN_TYPE. */\n YFILES_TREE: \"E_GRAPHML_YFILES_TREE\",\n});\n"],"names":[],"mappings":";AAsDO,MAAM,oBAAoB;AAM1B,MAAM,mBAAmB;AAMzB,MAAM,gBAAgB;AAMtB,MAAM,kBACT;AAMG,MAAM,SAAS;AAMf,MAAM,aAAgC,OAAO,OAA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EjB,cAAc;AAAA;AAAA,EAEd,qBAAqB;AAAA;AAAA,EAErB,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA,EAEd,uBAAuB;AAAA;AAAA,EAEvB,aAAa;AACjB,CAAC;"}
1
+ {"version":3,"file":"constants-BPRiVyBu.js","sources":["../../src/formats/graphml/constants.ts"],"sourcesContent":["/**\n * What the GraphML importer and exporter share: the namespace, the format facts, the reserved\n * column names of the XML-attribute-derived columns, the `meta.extra`\n * keys the importer records for the exporter, and the issue and loss codes.\n */\n\nimport {\n BAD_DEFAULT_CODE,\n COLUMN_RENAMED_CODE,\n COLUMN_TYPE_CODE,\n COUNT_HINT_CODE,\n COUNT_MISMATCH_CODE,\n DANGLING_REFERENCE_CODE,\n DIRECTION_FORCED_CODE,\n DIRECTION_REFUSED_CODE,\n DUPLICATE_ATTRIBUTE_CODE,\n DUPLICATE_EDGE_ID_CODE,\n DUPLICATE_KEY_CODE,\n DUPLICATE_NODE_CODE,\n ELEMENT_ISSUE,\n EMPTY_INPUT_CODE,\n ENCODING_CONFLICT_CODE,\n ENCODING_FALLBACK_CODE,\n HYPEREDGE_CODE,\n ID_MERGED_CODE,\n ID_TEXT_TYPE_CODE,\n INPUT_ISSUE,\n INVALID_ENCODING_CODE,\n INVALID_UTF8_CODE,\n MISSING_ENDPOINT_CODE,\n MISSING_ID_CODE,\n MIXED_DIRECTION_CODE,\n MULTIPLE_GRAPHS_CODE,\n MUTUAL_AS_UNDIRECTED_CODE,\n NO_GRAPH_CODE,\n OPTION_IGNORED_CODE,\n PARENTS_DROPPED_CODE,\n PRECISION_CODE,\n ROLE_DROPPED_CODE,\n ROLE_TAKEN_CODE,\n SINK_OPTION_CODE,\n STRAY_TEXT_CODE,\n UNKNOWN_ATTR_TYPE_CODE,\n UNKNOWN_ELEMENT_CODE,\n UNKNOWN_ENCODING_CODE,\n UNKNOWN_PARENT_CODE,\n UNKNOWN_XML_ATTRIBUTE_CODE,\n XML_SYNTAX_CODE,\n} from \"../../common/codes.js\";\n\n/**\n * The GraphML namespace.\n * @category Plugin helpers\n */\nexport const GRAPHML_NAMESPACE = \"http://graphml.graphdrawing.org/xmlns\";\n\n/**\n * The yFiles extension namespace, declared as `xmlns:y` when a yfiles column is written.\n * @category Plugin helpers\n */\nexport const YFILES_NAMESPACE = \"http://www.yworks.com/xml/graphml\";\n\n/**\n * The XML Schema instance namespace and the schema location the exporter writes.\n * @category Plugin helpers\n */\nexport const XSI_NAMESPACE = \"http://www.w3.org/2001/XMLSchema-instance\";\n\n/**\n * The GraphML schema location written by the exporter.\n * @category Plugin helpers\n */\nexport const SCHEMA_LOCATION =\n \"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\";\n\n/**\n * The format name.\n * @category Plugin helpers\n */\nexport const FORMAT = \"graphml\";\n\n/**\n * File extensions.\n * @category Plugin helpers\n */\nexport const EXTENSIONS: readonly string[] = Object.freeze([\".graphml\", \".xml\"]);\n\n/**\n * MIME types.\n * @category Plugin helpers\n */\nexport const MIME_TYPES: readonly string[] = Object.freeze([\"application/graphml+xml\", \"application/xml\", \"text/xml\"]);\n\n/**\n * The `attr.name` of the node key that carries ids rewritten by `sanitizeIds: \"mangle\"`.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_ATTRIBUTE = \"graphty:originalId\";\n\n/**\n * The node column that keeps original ids when `restoreMangledIds` is off.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_COLUMN = \"graphty.originalId\";\n\n/**\n * The edge column of the `id` XML attribute (role id, unique).\n * @category Plugin helpers\n */\nexport const EDGE_ID_COLUMN = \"id\";\n\n/**\n * The edge columns of the `sourceport` / `targetport` XML attributes (roles sourcePort / targetPort).\n * @category Plugin helpers\n */\nexport const SOURCE_PORT_COLUMN = \"sourceport\";\n\n/**\n * The edge column of the `targetport` XML attribute.\n * @category Plugin helpers\n */\nexport const TARGET_PORT_COLUMN = \"targetport\";\n\n/**\n * The node column of the containing node of a nested graph (u32, role parent, refersTo node).\n * @category Plugin helpers\n */\nexport const PARENT_COLUMN = \"parent\";\n\n/**\n * The bool node column marking the hub nodes synthesized for hyperedges under `hyperedges: \"star\"`.\n * @category Plugin helpers\n */\nexport const HYPEREDGE_HUB_COLUMN = \"graphty.hyperedge\";\n\n/**\n * The column name a node key titled `label` receives the `label` role under.\n * @category Plugin helpers\n */\nexport const LABEL_COLUMN = \"label\";\n\n/**\n * Edge column names reserved for the XML-attribute-derived columns; a key titled like one is renamed `<name>#<id>`.\n * @category Plugin helpers\n */\nexport const RESERVED_EDGE_NAMES: ReadonlySet<string> = new Set([\n EDGE_ID_COLUMN,\n SOURCE_PORT_COLUMN,\n TARGET_PORT_COLUMN,\n]);\n\n/**\n * Node column names reserved for the XML-derived columns.\n * @category Plugin helpers\n */\nexport const RESERVED_NODE_NAMES: ReadonlySet<string> = new Set([PARENT_COLUMN]);\n\n/**\n * The `meta.extra` key under which the importer records what the exporter needs.\n * @category Plugin helpers\n */\nexport const META_KEY = \"graphml\";\n\n/**\n * What the importer stores under `meta.extra.graphml`.\n * @category Plugin helpers\n */\nexport interface GraphmlMeta {\n /** The top-level `<graph id>`, or null. */\n readonly graphId: string | null;\n /** The top-level `edgedefault` as written, so a mixed file re-exports with the same layout. */\n readonly edgedefault: \"directed\" | \"undirected\" | null;\n /** The `xmlns:<prefix>` declarations of the root element (yFiles and the like). */\n readonly namespaces: Readonly<Record<string, string>>;\n}\n\n/**\n * The issue codes the GraphML importer records, by name: the codes shared\n * with the other importers and the GraphML-specific ones. A key is the code\n * without its severity and format prefixes.\n * @category Built-in formats\n */\nexport const GRAPHML_ISSUE = Object.freeze({\n ...INPUT_ISSUE,\n ...ELEMENT_ISSUE,\n /**\n * A value that does not parse as the type its attribute declares (\"x\" in an integer attribute). The value is\n * left unset; the node or edge is kept.\n */\n COLUMN_TYPE: COLUMN_TYPE_CODE,\n /** The input is not well-formed XML. The import stops. */\n XML_SYNTAX: XML_SYNTAX_CODE,\n /** The input is not valid UTF-8. The import stops. */\n INVALID_UTF8: INVALID_UTF8_CODE,\n /**\n * Some bytes are not valid in the encoding that was chosen (by a byte order mark, the file's declaration or the\n * `encoding` option). The import stops.\n */\n INVALID_ENCODING: INVALID_ENCODING_CODE,\n /** Bytes that are not UTF-8 and declare no encoding were read as windows-1252. */\n ENCODING_FALLBACK: ENCODING_FALLBACK_CODE,\n /** A declared encoding the platform cannot decode was ignored. */\n UNKNOWN_ENCODING: UNKNOWN_ENCODING_CODE,\n /** A declared encoding the byte order mark contradicts (the mark wins). */\n ENCODING_CONFLICT: ENCODING_CONFLICT_CODE,\n /** The input holds no XML at all: it is empty, whitespace or a byte order mark only. The import stops. */\n EMPTY_INPUT: EMPTY_INPUT_CODE,\n /** The root element is not `<graphml>`. The import stops. */\n NOT_GRAPHML: \"E_NOT_GRAPHML\",\n /** The `<graphml>` root is in a namespace other than GraphML's; it is read as GraphML. */\n NAMESPACE: \"W_GRAPHML_NAMESPACE\",\n /** The document has no `<graph>`. The import stops. */\n NO_GRAPH: NO_GRAPH_CODE,\n /** A `<key>` without an id. */\n KEY_MISSING_ID: \"E_GRAPHML_KEY_MISSING_ID\",\n /** Two `<key>` elements with the same id. */\n DUPLICATE_KEY: DUPLICATE_KEY_CODE,\n /** A key declared for hyperedges, ports or endpoints (never used). */\n KEY_DOMAIN_UNSUPPORTED: \"W_GRAPHML_KEY_DOMAIN_UNSUPPORTED\",\n /** A `<node>` without an id. */\n MISSING_ID: MISSING_ID_CODE,\n /** An `<edge>` without a source or a target. */\n MISSING_ENDPOINT: MISSING_ENDPOINT_CODE,\n /** An edge endpoint that names no declared node under `addMissingNodes: false`; the edge is skipped. */\n UNKNOWN_NODE: \"E_UNKNOWN_NODE\",\n /** An edge endpoint that names a nested `<graph>`, not a node; a node of that id is created. */\n GRAPH_ENDPOINT: \"W_GRAPHML_GRAPH_ENDPOINT\",\n /** The nodes of a nested graph whose container node was skipped lose their parent. */\n UNKNOWN_PARENT: UNKNOWN_PARENT_CODE,\n /** Two `<data>` of one key on one element, two `<default>` in one key, or two weight keys; one is kept. */\n DUPLICATE_ATTRIBUTE: DUPLICATE_ATTRIBUTE_CODE,\n /** A `<data>` whose key was never declared. */\n UNKNOWN_KEY: \"E_GRAPHML_UNKNOWN_KEY\",\n /** A `<key>` declared after `<data>` that used it; those values were already reported and dropped. */\n KEY_DECLARED_LATE: \"W_GRAPHML_KEY_DECLARED_LATE\",\n /** A `<data>` whose key is declared for another domain. */\n KEY_DOMAIN: \"W_GRAPHML_KEY_DOMAIN\",\n /** A `<data>` without a key attribute. */\n DATA_MISSING_KEY: \"E_GRAPHML_DATA_MISSING_KEY\",\n /** A `<key>` whose `for` is not a GraphML domain. */\n KEY_FOR_INVALID: \"E_GRAPHML_KEY_FOR_INVALID\",\n /** Data of a nested `<graph>`; only the top-level graph has attributes. */\n NESTED_GRAPH_DATA: \"W_GRAPHML_NESTED_GRAPH_DATA\",\n /** Data of a hyperedge expanded to a star or clique. */\n HYPEREDGE_DATA_DROPPED: \"W_GRAPHML_HYPEREDGE_DATA_DROPPED\",\n /** Nested elements in the `<data>` of a typed (non-yfiles) key. */\n DATA_NESTED: \"E_GRAPHML_DATA_NESTED\",\n /** A `<node>` declared twice. */\n DUPLICATE_NODE: DUPLICATE_NODE_CODE,\n /** An edge id already used by another edge. */\n DUPLICATE_EDGE_ID: DUPLICATE_EDGE_ID_CODE,\n /** A `directed` attribute that is neither true nor false. */\n INVALID_DIRECTED: \"E_GRAPHML_INVALID_DIRECTED\",\n /** An `edgedefault` that is neither directed nor undirected. */\n INVALID_EDGEDEFAULT: \"E_GRAPHML_INVALID_EDGEDEFAULT\",\n /** A `<graph>` without edgedefault; the `defaultDirected` option applies. */\n EDGEDEFAULT_MISSING: \"W_GRAPHML_EDGEDEFAULT_MISSING\",\n /**\n * The file holds more than one top-level `<graph>`; their nodes and edges are merged into one graph.\n * `importAllGraphs()` reads every one.\n */\n MULTIPLE_GRAPHS: MULTIPLE_GRAPHS_CODE,\n /**\n * A node or edge count the file announces is too large to reserve room for; it is ignored and the elements are\n * read as they come.\n */\n COUNT_HINT: COUNT_HINT_CODE,\n /**\n * A `parse.nodes` or `parse.edges` count disagrees with what the graph holds. The elements are read as they are.\n */\n COUNT_MISMATCH: COUNT_MISMATCH_CODE,\n /** A hyperedge under `hyperedges: \"error\"`. */\n HYPEREDGE: HYPEREDGE_CODE,\n /** Hyperedges skipped under `hyperedges: \"skip\"`. */\n HYPEREDGE_SKIPPED: \"W_GRAPHML_HYPEREDGE_SKIPPED\",\n /** An endpoint of a hyperedge without a node, or with an unknown type. */\n HYPEREDGE_ENDPOINT: \"E_GRAPHML_HYPEREDGE_ENDPOINT\",\n /** `<port>` declarations (and their data) are not kept; sourceport / targetport edge attributes are. */\n PORT_DECLARATION: \"W_GRAPHML_PORT_DECLARATION\",\n /** A `sourceport` / `targetport` naming a port its node does not declare (once, with the count). */\n DANGLING_REFERENCE: DANGLING_REFERENCE_CODE,\n /** A `<graph>` inside an `<edge>` (legal GraphML): it and the nodes and edges it holds are dropped. */\n EDGE_GRAPH_DROPPED: \"W_GRAPHML_EDGE_GRAPH_DROPPED\",\n /** A `<node>` whose id is that of a hub `hyperedges: \"star\"` created; the node is merged into the hub. */\n HUB_ID_CLASH: \"W_GRAPHML_HUB_ID_CLASH\",\n /** A `graphty:originalId` value that is not text, or arrives after the node was added (after its nested graph). */\n ORIGINAL_ID_IGNORED: \"W_GRAPHML_ORIGINAL_ID_IGNORED\",\n /** A yFiles graphics value (a geometry coordinate, a width) that is not a number; it is not mapped. */\n YFILES_VALUE: \"W_GRAPHML_YFILES_VALUE\",\n /**\n * A GraphML `parse.*` attribute (`parse.nodeids`, `parse.order`, ...) that graph-io does not act on; the file is\n * read normally.\n */\n PARSE_HINT_IGNORED: \"W_GRAPHML_PARSE_HINT_IGNORED\",\n /** An XML attribute GraphML does not define (or the importer does not keep) on an element; it is not kept. */\n UNKNOWN_XML_ATTRIBUTE: UNKNOWN_XML_ATTRIBUTE_CODE,\n /** A `<locator>` element. */\n LOCATOR_DROPPED: \"W_GRAPHML_LOCATOR_DROPPED\",\n /** A `<desc>` of a node, an edge or a hyperedge. */\n DESC_DROPPED: \"W_GRAPHML_DESC_DROPPED\",\n /** An element the GraphML schema does not define at that place. */\n UNKNOWN_ELEMENT: UNKNOWN_ELEMENT_CODE,\n /** Non-whitespace text where the schema allows only elements. */\n STRAY_TEXT: STRAY_TEXT_CODE,\n /** Two distinct id texts merged into one number under `ids: \"number\"`. */\n ID_MERGED: ID_MERGED_CODE,\n /** You set an option this format does not use; it had no effect. The message names the option. */\n OPTION_IGNORED: OPTION_IGNORED_CODE,\n /** A yFiles key under `yfiles: \"skip\"`. */\n YFILES_SKIPPED: \"W_GRAPHML_YFILES_SKIPPED\",\n /**\n * An attribute was renamed `<name>#<suffix>` because another attribute already has its name, for example\n * two attributes declared with the same name.\n */\n COLUMN_RENAMED: COLUMN_RENAMED_CODE,\n /**\n * You read into a graph builder that already has an id, label or position attribute, so this file's one is kept as\n * a plain attribute.\n */\n ROLE_TAKEN: ROLE_TAKEN_CODE,\n /** A declared type the format does not define (kept as string). */\n UNKNOWN_ATTR_TYPE: UNKNOWN_ATTR_TYPE_CODE,\n /** A default that does not parse as the declared type. */\n BAD_DEFAULT: BAD_DEFAULT_CODE,\n /** An integer beyond 2^53 was stored as the nearest 64-bit float; pass `long: \"string\"` to keep every digit. */\n PRECISION: PRECISION_CODE,\n /**\n * You read into your own graph builder, which was created with a different `addMissingNodes`, `duplicateEdges`,\n * `selfLoops` or `weightDtype` than the option you passed; the builder's setting applies.\n */\n SINK_OPTION: SINK_OPTION_CODE,\n /**\n * You read into a graph builder whose direction is already set, or which already holds edges, so the file is read\n * with the builder's direction instead of its own.\n */\n DIRECTION_REFUSED: DIRECTION_REFUSED_CODE,\n /** Edges of the other direction were read with the direction `onMixedDirection` chose. */\n DIRECTION_FORCED: DIRECTION_FORCED_CODE,\n /**\n * The graph has both directed and undirected edges and `onMixedDirection` is \"error\". An import stops; a save to a\n * format that holds one direction per file fails with E_DIRECTED. Pass \"directed\" or \"undirected\" to read or write\n * it anyway.\n */\n MIXED_DIRECTION: MIXED_DIRECTION_CODE,\n});\n\n/**\n * Loss note codes of the GraphML importer (report.lossy) and exporter (check()): the GraphML\n * ones; the generic ones (dtypes, lists, json text, positions, visual and temporal roles,\n * extension tables, id charsets, the weight key clash, name changes) are those of `LOSS`.\n * @category Built-in formats\n */\nexport const GRAPHML_LOSS = Object.freeze({\n /** YFiles nested XML kept as a JSON tree: structure preserved, not byte-exact. */\n YFILES_JSON: \"W_GRAPHML_YFILES_JSON\",\n /** A mutual pair written as one undirected edge; the mark is lost. */\n MUTUAL_AS_UNDIRECTED: MUTUAL_AS_UNDIRECTED_CODE,\n /** A `parents` (multi-parent) column cannot be written as nested graphs. */\n PARENTS_DROPPED: PARENTS_DROPPED_CODE,\n /** An attribute with a role the format has no place for is written as a plain attribute; the role is lost. */\n ROLE_DROPPED: ROLE_DROPPED_CODE,\n /** Containment order differs from index order; node indices change after a round trip. */\n HIERARCHY_REORDERED: \"W_GRAPHML_HIERARCHY_REORDERED\",\n /** Nodes whose parent chain never reaches a root are written at the top level. */\n PARENT_CYCLE: \"W_GRAPHML_PARENT_CYCLE\",\n /** Node ids that read back as a different type, such as the text \"7\" as the number 7. */\n ID_TEXT_TYPE: ID_TEXT_TYPE_CODE,\n /** A numeric edge id column reads back as string. */\n EDGE_ID_TEXT: \"W_GRAPHML_EDGE_ID_TEXT\",\n /** A `yfiles.*` graphics column that no longer matches its yFiles tree: only the tree is written. */\n YFILES_GRAPHICS_STALE: \"W_GRAPHML_YFILES_GRAPHICS_STALE\",\n /** A yEd graphics value that is not valid XML; the save fails with E_COLUMN_TYPE. */\n YFILES_TREE: \"E_GRAPHML_YFILES_TREE\",\n});\n"],"names":[],"mappings":";AAsDO,MAAM,oBAAoB;AAM1B,MAAM,mBAAmB;AAMzB,MAAM,gBAAgB;AAMtB,MAAM,kBACT;AAMG,MAAM,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AAA,EAEtB,iBAAiB;AAAA;AAAA,EAEjB,cAAc;AAAA;AAAA,EAEd,qBAAqB;AAAA;AAAA,EAErB,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA,EAEd,uBAAuB;AAAA;AAAA,EAEvB,aAAa;AACjB,CAAC;"}
@@ -1,5 +1,5 @@
1
1
  import { GraphFormatError } from "@graphty/graph-format";
2
- import { aw as isNameChar, ax as XML_ILLEGAL_CHAR_CODE, b as plural, $ as agree } from "./export-Cbt4h_0n.js";
2
+ import { aw as isNameChar, ax as XML_ILLEGAL_CHAR_CODE, b as plural, $ as agree } from "./export-CTUlibzr.js";
3
3
  class XmlSyntaxError extends Error {
4
4
  /**
5
5
  * Create the error.
@@ -1133,7 +1133,7 @@ ${held}`);
1133
1133
  * @param name - the element name
1134
1134
  */
1135
1135
  endElement(name) {
1136
- const open = this.stack.length > 0 ? this.stack[this.stack.length - 1] : null;
1136
+ const open = this.stack.at(-1) ?? null;
1137
1137
  if (open === null) {
1138
1138
  throw new XmlSyntaxError(`unexpected end tag </${name}>`, this.line);
1139
1139
  }
@@ -1254,7 +1254,7 @@ function isDotIdentifier(text) {
1254
1254
  return true;
1255
1255
  }
1256
1256
  function isWritableDotText(text) {
1257
- return !text.endsWith("\\") && !text.includes('\\"') && !/\\[\r\n]/.test(text);
1257
+ return !text.endsWith("\\") && !text.includes(String.raw`\"`) && !/\\[\r\n]/.test(text);
1258
1258
  }
1259
1259
  function quoteDotId(text) {
1260
1260
  if (isBareDotId(text)) {
@@ -1309,4 +1309,4 @@ export {
1309
1309
  tokenizeXml as t,
1310
1310
  xmlIllegalTextNotes as x
1311
1311
  };
1312
- //# sourceMappingURL=escape-wVIEtLv6.js.map
1312
+ //# sourceMappingURL=escape-BRcyzD77.js.map