@withbuddi/buddi 0.1.0-pre.52 → 0.1.0-pre.53

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 (164) hide show
  1. package/extension/manifest.json +2 -2
  2. package/node_modules/@buddi/install/dist/.tsbuildinfo +1 -1
  3. package/node_modules/@buddi/install/dist/app-layout.d.ts +24 -0
  4. package/node_modules/@buddi/install/dist/app-layout.d.ts.map +1 -1
  5. package/node_modules/@buddi/install/dist/app-layout.js +64 -2
  6. package/node_modules/@buddi/install/dist/app-layout.js.map +1 -1
  7. package/node_modules/@buddi/install/dist/launcher.d.ts.map +1 -1
  8. package/node_modules/@buddi/install/dist/launcher.js +89 -10
  9. package/node_modules/@buddi/install/dist/launcher.js.map +1 -1
  10. package/node_modules/@buddi/install/dist/linux-install.d.ts +41 -0
  11. package/node_modules/@buddi/install/dist/linux-install.d.ts.map +1 -0
  12. package/node_modules/@buddi/install/dist/linux-install.js +86 -0
  13. package/node_modules/@buddi/install/dist/linux-install.js.map +1 -0
  14. package/node_modules/@buddi/install/dist/runtime-info.d.ts +23 -0
  15. package/node_modules/@buddi/install/dist/runtime-info.d.ts.map +1 -0
  16. package/node_modules/@buddi/install/dist/runtime-info.js +69 -0
  17. package/node_modules/@buddi/install/dist/runtime-info.js.map +1 -0
  18. package/node_modules/@buddi/install/dist/supervisor.d.ts.map +1 -1
  19. package/node_modules/@buddi/install/dist/supervisor.js +8 -6
  20. package/node_modules/@buddi/install/dist/supervisor.js.map +1 -1
  21. package/node_modules/@buddi/install/dist/uninstall.d.ts +20 -0
  22. package/node_modules/@buddi/install/dist/uninstall.d.ts.map +1 -1
  23. package/node_modules/@buddi/install/dist/uninstall.js +50 -1
  24. package/node_modules/@buddi/install/dist/uninstall.js.map +1 -1
  25. package/node_modules/@buddi/install/dist/upgrade.d.ts +4 -1
  26. package/node_modules/@buddi/install/dist/upgrade.d.ts.map +1 -1
  27. package/node_modules/@buddi/install/dist/upgrade.js +77 -51
  28. package/node_modules/@buddi/install/dist/upgrade.js.map +1 -1
  29. package/node_modules/@hono/node-server/package.json +2 -2
  30. package/node_modules/@types/node/README.md +1 -1
  31. package/node_modules/@types/node/package.json +2 -2
  32. package/node_modules/@types/node/util.d.ts +6 -3
  33. package/node_modules/content-disposition/README.md +105 -35
  34. package/node_modules/content-disposition/dist/index.d.ts +72 -0
  35. package/node_modules/content-disposition/dist/index.js +388 -0
  36. package/node_modules/content-disposition/dist/index.js.map +1 -0
  37. package/node_modules/content-disposition/package.json +31 -19
  38. package/node_modules/docx/dist/index.cjs +182 -80
  39. package/node_modules/docx/dist/index.d.cts +63 -6
  40. package/node_modules/docx/dist/index.d.ts +63 -6
  41. package/node_modules/docx/dist/index.iife.js +182 -80
  42. package/node_modules/docx/dist/index.mjs +182 -80
  43. package/node_modules/docx/dist/index.umd.cjs +182 -80
  44. package/node_modules/docx/dist/layout.cjs +1 -6
  45. package/node_modules/docx/dist/layout.iife.js +1 -6
  46. package/node_modules/docx/dist/layout.mjs +1 -6
  47. package/node_modules/docx/dist/layout.umd.cjs +1 -6
  48. package/node_modules/docx/package.json +4 -3
  49. package/node_modules/express/Readme.md +15 -9
  50. package/node_modules/express/lib/application.js +2 -2
  51. package/node_modules/express/lib/request.js +32 -19
  52. package/node_modules/express/lib/response.js +27 -30
  53. package/node_modules/express/node_modules/content-type/LICENSE +22 -0
  54. package/node_modules/express/node_modules/content-type/README.md +71 -0
  55. package/node_modules/express/node_modules/content-type/dist/index.d.ts +46 -0
  56. package/node_modules/express/node_modules/content-type/dist/index.js +176 -0
  57. package/node_modules/express/node_modules/content-type/dist/index.js.map +1 -0
  58. package/node_modules/express/node_modules/content-type/package.json +52 -0
  59. package/node_modules/express/package.json +10 -10
  60. package/node_modules/imapflow/CHANGELOG.md +33 -0
  61. package/node_modules/imapflow/dist/cjs/commands/append.d.ts +1 -1
  62. package/node_modules/imapflow/dist/cjs/commands/append.js +15 -4
  63. package/node_modules/imapflow/dist/cjs/commands/compress.js +2 -2
  64. package/node_modules/imapflow/dist/cjs/commands/id.js +5 -3
  65. package/node_modules/imapflow/dist/cjs/commands/idle.js +9 -9
  66. package/node_modules/imapflow/dist/cjs/commands/list.js +2 -2
  67. package/node_modules/imapflow/dist/cjs/commands/namespace.js +18 -14
  68. package/node_modules/imapflow/dist/cjs/commands/quota.js +2 -3
  69. package/node_modules/imapflow/dist/cjs/commands/status.js +2 -4
  70. package/node_modules/imapflow/dist/cjs/connection-deadline.d.ts +1 -1
  71. package/node_modules/imapflow/dist/cjs/connection-deadline.js +2 -4
  72. package/node_modules/imapflow/dist/cjs/download.js +66 -35
  73. package/node_modules/imapflow/dist/cjs/errors.d.ts +15 -0
  74. package/node_modules/imapflow/dist/cjs/errors.js +22 -0
  75. package/node_modules/imapflow/dist/cjs/handler/imap-compiler.d.ts +4 -4
  76. package/node_modules/imapflow/dist/cjs/handler/imap-compiler.js +18 -18
  77. package/node_modules/imapflow/dist/cjs/handler/imap-parser.js +28 -3
  78. package/node_modules/imapflow/dist/cjs/handler/imap-stream.js +9 -8
  79. package/node_modules/imapflow/dist/cjs/handler/limits.d.ts +1 -1
  80. package/node_modules/imapflow/dist/cjs/handler/limits.js +5 -7
  81. package/node_modules/imapflow/dist/cjs/handler/parser-instance.js +23 -38
  82. package/node_modules/imapflow/dist/cjs/handler/token-parser.d.ts +12 -0
  83. package/node_modules/imapflow/dist/cjs/handler/token-parser.js +44 -104
  84. package/node_modules/imapflow/dist/cjs/imap-flow.d.ts +4 -3
  85. package/node_modules/imapflow/dist/cjs/imap-flow.js +98 -72
  86. package/node_modules/imapflow/dist/cjs/package-info.d.ts +1 -1
  87. package/node_modules/imapflow/dist/cjs/package-info.js +1 -1
  88. package/node_modules/imapflow/dist/cjs/proxy-connection.js +2 -5
  89. package/node_modules/imapflow/dist/cjs/search-compiler.js +2 -3
  90. package/node_modules/imapflow/dist/cjs/tools.d.ts +14 -3
  91. package/node_modules/imapflow/dist/cjs/tools.js +30 -18
  92. package/node_modules/imapflow/dist/cjs/types.d.ts +11 -0
  93. package/node_modules/imapflow/dist/esm/commands/append.d.ts +1 -1
  94. package/node_modules/imapflow/dist/esm/commands/append.js +15 -4
  95. package/node_modules/imapflow/dist/esm/commands/compress.js +2 -2
  96. package/node_modules/imapflow/dist/esm/commands/id.js +6 -4
  97. package/node_modules/imapflow/dist/esm/commands/idle.js +9 -9
  98. package/node_modules/imapflow/dist/esm/commands/list.js +3 -3
  99. package/node_modules/imapflow/dist/esm/commands/namespace.js +19 -15
  100. package/node_modules/imapflow/dist/esm/commands/quota.js +3 -4
  101. package/node_modules/imapflow/dist/esm/commands/status.js +2 -4
  102. package/node_modules/imapflow/dist/esm/connection-deadline.d.ts +1 -1
  103. package/node_modules/imapflow/dist/esm/connection-deadline.js +2 -4
  104. package/node_modules/imapflow/dist/esm/download.js +66 -35
  105. package/node_modules/imapflow/dist/esm/errors.d.ts +15 -0
  106. package/node_modules/imapflow/dist/esm/errors.js +21 -0
  107. package/node_modules/imapflow/dist/esm/handler/imap-compiler.d.ts +4 -4
  108. package/node_modules/imapflow/dist/esm/handler/imap-compiler.js +18 -18
  109. package/node_modules/imapflow/dist/esm/handler/imap-parser.js +28 -3
  110. package/node_modules/imapflow/dist/esm/handler/imap-stream.js +9 -8
  111. package/node_modules/imapflow/dist/esm/handler/limits.d.ts +1 -1
  112. package/node_modules/imapflow/dist/esm/handler/limits.js +5 -7
  113. package/node_modules/imapflow/dist/esm/handler/parser-instance.js +23 -38
  114. package/node_modules/imapflow/dist/esm/handler/token-parser.d.ts +12 -0
  115. package/node_modules/imapflow/dist/esm/handler/token-parser.js +44 -104
  116. package/node_modules/imapflow/dist/esm/imap-flow.d.ts +4 -3
  117. package/node_modules/imapflow/dist/esm/imap-flow.js +99 -73
  118. package/node_modules/imapflow/dist/esm/package-info.d.ts +1 -1
  119. package/node_modules/imapflow/dist/esm/package-info.js +1 -1
  120. package/node_modules/imapflow/dist/esm/proxy-connection.js +2 -5
  121. package/node_modules/imapflow/dist/esm/search-compiler.js +2 -3
  122. package/node_modules/imapflow/dist/esm/tools.d.ts +14 -3
  123. package/node_modules/imapflow/dist/esm/tools.js +30 -19
  124. package/node_modules/imapflow/dist/esm/types.d.ts +11 -0
  125. package/node_modules/imapflow/package.json +6 -3
  126. package/node_modules/process-warning/.github/workflows/ci.yml +1 -1
  127. package/node_modules/process-warning/.github/workflows/lock-threads.yml +1 -1
  128. package/node_modules/process-warning/.github/workflows/release.yml +24 -0
  129. package/node_modules/process-warning/README.md +46 -46
  130. package/node_modules/process-warning/package.json +1 -1
  131. package/package.json +2 -2
  132. package/packages/install/dist/.tsbuildinfo +1 -1
  133. package/packages/install/dist/app-layout.d.ts +24 -0
  134. package/packages/install/dist/app-layout.d.ts.map +1 -1
  135. package/packages/install/dist/app-layout.js +64 -2
  136. package/packages/install/dist/app-layout.js.map +1 -1
  137. package/packages/install/dist/launcher.d.ts.map +1 -1
  138. package/packages/install/dist/launcher.js +89 -10
  139. package/packages/install/dist/launcher.js.map +1 -1
  140. package/packages/install/dist/linux-install.d.ts +41 -0
  141. package/packages/install/dist/linux-install.d.ts.map +1 -0
  142. package/packages/install/dist/linux-install.js +86 -0
  143. package/packages/install/dist/linux-install.js.map +1 -0
  144. package/packages/install/dist/runtime-info.d.ts +23 -0
  145. package/packages/install/dist/runtime-info.d.ts.map +1 -0
  146. package/packages/install/dist/runtime-info.js +69 -0
  147. package/packages/install/dist/runtime-info.js.map +1 -0
  148. package/packages/install/dist/supervisor.d.ts.map +1 -1
  149. package/packages/install/dist/supervisor.js +8 -6
  150. package/packages/install/dist/supervisor.js.map +1 -1
  151. package/packages/install/dist/uninstall.d.ts +20 -0
  152. package/packages/install/dist/uninstall.d.ts.map +1 -1
  153. package/packages/install/dist/uninstall.js +50 -1
  154. package/packages/install/dist/uninstall.js.map +1 -1
  155. package/packages/install/dist/upgrade.d.ts +4 -1
  156. package/packages/install/dist/upgrade.d.ts.map +1 -1
  157. package/packages/install/dist/upgrade.js +77 -51
  158. package/packages/install/dist/upgrade.js.map +1 -1
  159. package/packages/web/dist/assets/{index-oxmxR39o.js → index-DgpPl0TR.js} +57 -57
  160. package/packages/web/dist/assets/{lottie_light-DROBTM6Y.js → lottie_light-twPed1FM.js} +1 -1
  161. package/packages/web/dist/build.json +1 -1
  162. package/packages/web/dist/index.html +1 -1
  163. package/packages/web/dist/precache.json +3 -3
  164. package/node_modules/content-disposition/index.js +0 -536
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAsCH,wBAKC;AA0BD,sBAoHC;AAwFD,wCAyBC;AAkED,wBA8CC;AA6CD,wCAOC;AAjcD;;GAEG;AACH,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACvC,MAAM,CAAC,GAAG,cAAa,CAAC,CAAC;IACzB,CAAC,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,CAAC,CAAC;AACX,CAAC,CAAC,EAAgC,CAAC;AAenC;;GAEG;AACH,SAAgB,MAAM,CAAC,QAAiB,EAAE,OAAuB;IAC/D,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,YAAY,CAAC;IAC3C,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEjE,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM;AACrB,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO;AACvB,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC,MAAM;AACvB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM;AACrB,MAAM,MAAM,GAAG,EAAE,CAAC,CAAC,MAAM;A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,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CACjD,CAAC;YACF,GAAG,IAAI,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*!\n * content-disposition\n * Copyright(c) 2014-2017 Douglas Christopher Wilson\n * MIT Licensed\n */\n\nexport interface ContentDisposition {\n /**\n * Content-Disposition type, such as \"attachment\" or \"inline\"\n */\n type: string;\n /**\n * Content-Disposition parameters, such as \"filename\"\n */\n parameters: Record<string, string>;\n}\n\n/**\n * Null object perf optimization. Faster than `Object.create(null)` and `{ __proto__: null }`.\n */\nconst NullObject = /* @__PURE__ */ (() => {\n const C = function () {};\n C.prototype = Object.create(null);\n return C;\n})() as unknown as { new (): any };\n\nexport interface CreateOptions {\n /**\n * Content-Disposition type, defaults to \"attachment\"\n * @default \"attachment\"\n */\n type?: string;\n /**\n * Fallback filename for non-US-ASCII strings. If true, a fallback will be generated by replacing non-US-ASCII characters with \"?\". If false, no fallback will be generated.\n * @default true\n */\n fallback?: string | boolean;\n}\n\n/**\n * Create an attachment Content-Disposition header.\n */\nexport function create(filename?: string, options?: CreateOptions): string {\n const type = options?.type || 'attachment';\n const parameters = createParameters(filename, options?.fallback);\n\n return format({ type, parameters }, { extended: false });\n}\n\nconst SP = 32; // \" \"\nconst HTAB = 9; // \"\\t\"\nconst SEMI = 59; // \";\"\nconst EQ = 61; // \"=\"\nconst DQUOTE = 34; // '\"'\nconst BSLASH = 92; // \"\\\\\"\nconst ASTERISK = 42; // \"*\"\n\nexport interface ParseOptions {\n /**\n * Whether to decode RFC 8187 encoded parameters.\n * @default true\n */\n extended?: boolean;\n /**\n * Parse parameters as sent by browsers in `multipart/form-data`.\n * @default false\n */\n multipart?: boolean;\n}\n\n/**\n * Parse Content-Disposition header string.\n */\nexport function parse(\n header: string,\n options?: ParseOptions,\n): ContentDisposition {\n const len = header.length;\n const multipart = options?.multipart === true;\n const extended = options?.extended !== false;\n let index = skipOWS(header, 0, header.length);\n\n const typeStart = index;\n index = parseToken(header, index, len);\n const typeEnd = trailingOWS(header, typeStart, index);\n const type = header.slice(typeStart, typeEnd).toLowerCase();\n\n const parameters: Record<string, string> = new NullObject();\n\n parameter: while (index < len) {\n index = skipOWS(header, index + 1, len); // Skip over semicolon.\n\n const keyStart = index;\n\n while (index < len) {\n const char = header.charCodeAt(index);\n if (char === SEMI) continue parameter;\n\n if (char === EQ) {\n const keyEnd = trailingOWS(header, keyStart, index);\n const key = header.slice(keyStart, keyEnd).toLowerCase();\n\n index = skipOWS(header, index + 1, len);\n\n if (index < len && header.charCodeAt(index) === DQUOTE) {\n index++;\n\n let value = '';\n\n if (multipart) {\n while (index < len) {\n const code = header.charCodeAt(index++);\n if (code === DQUOTE) {\n index = parseToken(header, index, len);\n if (parameters[key] === undefined) parameters[key] = value;\n break;\n }\n\n if (code === /* % */ 37 && index + 1 < len) {\n const code2 = header.charCodeAt(index);\n const code3 = header.charCodeAt(index + 1);\n\n if (code2 === 50 /* \"2\" */ && code3 === 50 /* \"2\" */) {\n value += '\"';\n index += 2;\n continue;\n }\n\n if (code2 === 48 /* \"0\" */) {\n if (code3 === 100 /* \"d\" */ || code3 === 68 /* \"D\" */) {\n value += '\\r';\n index += 2;\n continue;\n }\n\n if (code3 === 97 /* \"a\" */ || code3 === 65 /* \"A\" */) {\n value += '\\n';\n index += 2;\n continue;\n }\n }\n }\n\n value += String.fromCharCode(code);\n }\n } else {\n while (index < len) {\n const code = header.charCodeAt(index++);\n if (code === DQUOTE) {\n index = parseToken(header, index, len);\n if (parameters[key] === undefined) parameters[key] = value;\n break;\n }\n\n if (code === BSLASH && index < len) {\n value += header[index++];\n continue;\n }\n\n value += String.fromCharCode(code);\n }\n }\n\n continue parameter;\n }\n\n const valueStart = index;\n index = parseToken(header, index, len);\n const valueEnd = trailingOWS(header, valueStart, index);\n const value = header.slice(valueStart, valueEnd);\n\n if (parameters[key] === undefined) {\n parameters[key] = value;\n\n if (extended && key.charCodeAt(key.length - 1) === ASTERISK) {\n const normalizedKey = key.slice(0, -1);\n const decoded = decodeExtended(value);\n if (decoded !== undefined) parameters[normalizedKey] = decoded;\n }\n }\n\n continue parameter;\n }\n\n index++;\n }\n }\n\n return { type, parameters };\n}\n\n/**\n * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including \"%\")\n */\nconst ENCODE_URL_ATTR_CHAR_REGEXP = /[\\x00-\\x20\"'()*,/:;<=>?@[\\\\\\]{}\\x7f]/g; // eslint-disable-line no-control-regex\n\n/**\n * RegExp to match non-US-ASCII characters.\n */\nconst NON_ASCII_REGEXP = /[^\\x20-\\x7e]/g;\n\n/**\n * RegExp to match chars that must be quoted-pair in RFC 2616\n */\nconst QUOTE_REGEXP = /[\\\\\"]/g;\n\n/**\n * Match chars that can't be used in the filename for compatibility.\n */\nconst INVALID_FILENAME_REGEXP = /%[0-9A-Fa-f]{2}/;\n\n/**\n * RegExp for various RFC 2616 grammar\n *\n * parameter = token \"=\" ( token | quoted-string )\n * token = 1*<any CHAR except CTLs or separators>\n * separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n * | \",\" | \";\" | \":\" | \"\\\" | <\">\n * | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n * | \"{\" | \"}\" | SP | HT\n * quoted-string = ( <\"> *(qdtext | quoted-pair ) <\"> )\n * qdtext = <any TEXT except <\">>\n * quoted-pair = \"\\\" CHAR\n * CHAR = <any US-ASCII character (octets 0 - 127)>\n * TEXT = <any OCTET except CTLs, but including LWS>\n * LWS = [CRLF] 1*( SP | HT )\n * CRLF = CR LF\n * CR = <US-ASCII CR, carriage return (13)>\n * LF = <US-ASCII LF, linefeed (10)>\n * SP = <US-ASCII SP, space (32)>\n * HT = <US-ASCII HT, horizontal-tab (9)>\n * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>\n * OCTET = <any 8-bit sequence of data>\n */\nconst TEXT_REGEXP = /^[\\x20-\\x7e\\x80-\\xff]*$/;\nconst ASCII_TEXT_REGEXP = /^[\\x20-\\x7e]*$/;\nconst TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/;\n\n/**\n * Create parameters object from filename and fallback.\n */\nfunction createParameters(\n filename?: string,\n fallback: string | boolean = true,\n): Record<string, string> | undefined {\n if (filename === undefined) return;\n\n if (typeof fallback === 'string') {\n if (!ASCII_TEXT_REGEXP.test(fallback)) {\n throw new TypeError('Fallback must be valid US-ASCII: ' + fallback);\n }\n\n if (fallback === filename) return { filename };\n return { filename: fallback, 'filename*': encodeExtended(filename) };\n }\n\n // Use `filename` when possible, otherwise use `filename*`.\n if (\n ASCII_TEXT_REGEXP.test(filename) &&\n !INVALID_FILENAME_REGEXP.test(filename)\n ) {\n return { filename };\n }\n\n if (fallback === false) {\n return { 'filename*': encodeExtended(filename) };\n }\n\n return {\n filename: getAscii(filename),\n 'filename*': encodeExtended(filename),\n };\n}\n\n/**\n * Decode a RFC 8187 field value (gracefully).\n */\nexport function decodeExtended(str: string): string | undefined {\n const charsetEnd = str.indexOf(\"'\");\n if (charsetEnd <= 0) {\n return undefined;\n }\n\n const languageEnd = str.indexOf(\"'\", charsetEnd + 1);\n if (languageEnd === -1) {\n return undefined;\n }\n\n const charset = str.slice(0, charsetEnd).toLowerCase();\n const encoded = str.slice(languageEnd + 1);\n\n switch (charset) {\n case 'iso-8859-1': {\n return decodeHexEscapes(encoded);\n }\n case 'utf-8':\n case 'utf8': {\n return tryDecodeURIComponent(encoded);\n }\n }\n\n return undefined;\n}\n\n/**\n * Decode URI component but return `undefined` on error.\n */\nfunction tryDecodeURIComponent(str: string): string | undefined {\n try {\n return decodeURIComponent(str);\n } catch {\n return undefined;\n }\n}\n\n/**\n * Parse a token starting at the provided index.\n */\nfunction parseToken(str: string, index: number, len: number): number {\n while (index < len) {\n const char = str.charCodeAt(index);\n if (char === SEMI) break;\n index++;\n }\n return index;\n}\n\n/**\n * Skip RFC 2616 linear whitespace (space / tab).\n */\nfunction skipOWS(str: string, index: number, len: number): number {\n while (index < len) {\n const char = str.charCodeAt(index);\n if (char !== SP && char !== HTAB) break;\n index++;\n }\n return index;\n}\n\n/**\n * Skip RFC 2616 linear whitespace (space / tab) from the end of a string.\n */\nfunction trailingOWS(str: string, start: number, end: number): number {\n while (end > start) {\n const char = str.charCodeAt(end - 1);\n if (char !== SP && char !== HTAB) break;\n end--;\n }\n return end;\n}\n\nexport interface FormatOptions {\n /**\n * Whether to use extended parameter encoding for non-ISO-8859-1 strings.\n * If false, an error will be thrown when formatting such strings.\n * @default true\n */\n extended?: boolean;\n /**\n * Format parameters as sent by browsers in `multipart/form-data`.\n * @default false\n */\n multipart?: boolean;\n}\n\n/**\n * Format object to Content-Disposition header.\n */\nexport function format(\n obj: Partial<ContentDisposition>,\n options?: FormatOptions,\n): string {\n const { type, parameters } = obj;\n const multipart = options?.multipart === true;\n const extended = options?.extended !== false;\n\n if (!type || !TOKEN_REGEXP.test(type)) {\n throw new TypeError('Invalid type: ' + type);\n }\n\n let result = type;\n\n if (parameters) {\n for (const param of Object.keys(parameters)) {\n const value = parameters[param];\n\n if (!TOKEN_REGEXP.test(param)) {\n throw new TypeError('Invalid parameter name: ' + param);\n }\n\n if (multipart) {\n result += '; ' + param + '=' + qmultipart(value);\n continue;\n }\n\n if (TOKEN_REGEXP.test(value)) {\n result += '; ' + param + '=' + value;\n continue;\n }\n\n if (TEXT_REGEXP.test(value)) {\n result += '; ' + param + '=' + qstring(value);\n continue;\n }\n\n if (!extended) {\n throw new TypeError('Invalid parameter value: ' + value);\n }\n\n result += '; ' + param + '*=' + encodeExtended(value);\n }\n }\n\n return result;\n}\n\n/**\n * Get US-ASCII version of string.\n */\nfunction getAscii(val: string): string {\n // simple Unicode -> US-ASCII transformation\n return val.replace(NON_ASCII_REGEXP, '?');\n}\n\n/**\n * Percent encode a single character.\n */\nfunction pencode(char: string): string {\n return '%' + char.charCodeAt(0).toString(16).toUpperCase();\n}\n\n/**\n * Quote a string for HTTP.\n */\nfunction qstring(str: string): string {\n return '\"' + str.replace(QUOTE_REGEXP, '\\\\$&') + '\"';\n}\n\n/**\n * Quote a string for multipart/form-data.\n *\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data\n */\nfunction qmultipart(str: string): string {\n return '\"' + str.replace(/[\\n\\r\"]/g, multipartEscape) + '\"';\n}\n\n/**\n * Escape a multipart/form-data string character.\n */\nfunction multipartEscape(char: string): string {\n if (char === '\\n') return '%0A';\n if (char === '\\r') return '%0D';\n return '%22';\n}\n\n/**\n * Encode a Unicode string for HTTP (RFC 8187).\n */\nexport function encodeExtended(str: string): string {\n const encoded = encodeURIComponent(str).replace(\n ENCODE_URL_ATTR_CHAR_REGEXP,\n pencode,\n );\n\n return \"UTF-8''\" + encoded;\n}\n\n/**\n * Check if a character is a hex digit [0-9A-Fa-f]\n */\nfunction isHexDigit(char: string): boolean {\n const code = char.charCodeAt(0);\n return (\n (code >= 48 && code <= 57) || // 0-9\n (code >= 65 && code <= 70) || // A-F\n (code >= 97 && code <= 102) // a-f\n );\n}\n\n/**\n * Decode hex escapes in a string (e.g., %20 -> space)\n */\nfunction decodeHexEscapes(str: string): string {\n const firstEscape = str.indexOf('%');\n if (firstEscape === -1) return str;\n\n let result = str.slice(0, firstEscape);\n for (let idx = firstEscape; idx < str.length; idx++) {\n if (\n str[idx] === '%' &&\n idx + 2 < str.length &&\n isHexDigit(str[idx + 1]) &&\n isHexDigit(str[idx + 2])\n ) {\n result += String.fromCharCode(\n Number.parseInt(str[idx + 1] + str[idx + 2], 16),\n );\n idx += 2;\n } else {\n result += str[idx];\n }\n }\n return result;\n}\n"]}
@@ -1,9 +1,7 @@
1
1
  {
2
2
  "name": "content-disposition",
3
+ "version": "2.0.1",
3
4
  "description": "Create and parse Content-Disposition header",
4
- "version": "1.1.0",
5
- "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
- "license": "MIT",
7
5
  "keywords": [
8
6
  "content-disposition",
9
7
  "http",
@@ -15,26 +13,40 @@
15
13
  "type": "opencollective",
16
14
  "url": "https://opencollective.com/express"
17
15
  },
18
- "devDependencies": {
19
- "c8": "^10.1.2",
20
- "eslint": "^8.57.1",
21
- "eslint-config-standard": "^14.1.1",
22
- "eslint-plugin-import": "^2.32.0",
23
- "eslint-plugin-markdown": "^3.0.1",
24
- "eslint-plugin-node": "^11.1.0",
25
- "eslint-plugin-promise": "^6.6.0",
26
- "eslint-plugin-standard": "^4.1.0"
27
- },
16
+ "license": "MIT",
17
+ "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
18
+ "type": "commonjs",
19
+ "exports": "./dist/index.js",
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
28
22
  "files": [
29
- "index.js"
23
+ "dist/"
30
24
  ],
25
+ "scripts": {
26
+ "bench": "vitest bench",
27
+ "build": "ts-scripts build",
28
+ "demo": "node demo/server.js",
29
+ "format": "ts-scripts format",
30
+ "lint": "ts-scripts lint",
31
+ "prepare": "ts-scripts install && npm run build",
32
+ "specs": "ts-scripts specs",
33
+ "test": "ts-scripts test"
34
+ },
35
+ "devDependencies": {
36
+ "@borderless/ts-scripts": "^0.15.0",
37
+ "@vitest/coverage-v8": "^3.2.4",
38
+ "typescript": "^5.9.3",
39
+ "vitest": "^3.2.4"
40
+ },
31
41
  "engines": {
32
42
  "node": ">=18"
33
43
  },
34
- "scripts": {
35
- "lint": "eslint .",
36
- "test": "node --test --test-reporter spec",
37
- "test-ci": "c8 --reporter=lcovonly --reporter=text npm test",
38
- "test-cov": "c8 --reporter=html --reporter=text npm test"
44
+ "ts-scripts": {
45
+ "dist": [
46
+ "dist"
47
+ ],
48
+ "project": [
49
+ "tsconfig.build.json"
50
+ ]
39
51
  }
40
52
  }
@@ -12786,7 +12786,7 @@ var import_hash = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
12786
12786
  hash.sha512 = hash.sha.sha512;
12787
12787
  hash.ripemd160 = hash.ripemd.ripemd160;
12788
12788
  })))(), 1);
12789
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
12789
+ var urlAlphabet = "57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9";
12790
12790
  //#endregion
12791
12791
  //#region node_modules/nanoid/non-secure/index.js
12792
12792
  var customAlphabet = (alphabet, defaultSize = 21) => {
@@ -14583,48 +14583,6 @@ var ChildNonVisualProperties = class extends XmlComponent {
14583
14583
  }
14584
14584
  };
14585
14585
  //#endregion
14586
- //#region src/file/drawing/doc-properties/doc-properties-children.ts
14587
- /**
14588
- * Child elements for document properties.
14589
- *
14590
- * This module provides hyperlink elements that can be attached to
14591
- * drawing elements for interactive behavior.
14592
- *
14593
- * @module
14594
- */
14595
- /**
14596
- * Creates a click hyperlink element for a drawing.
14597
- *
14598
- * This element defines what happens when a user clicks on a drawing element.
14599
- *
14600
- * ## XSD Schema
14601
- * ```xml
14602
- * <xsd:complexType name="CT_Hyperlink">
14603
- * <xsd:group ref="EG_PContent" minOccurs="0" maxOccurs="unbounded"/>
14604
- * <xsd:attribute name="tgtFrame" type="s:ST_String"/>
14605
- * <xsd:attribute name="tooltip" type="s:ST_String"/>
14606
- * <xsd:attribute name="docLocation" type="s:ST_String"/>
14607
- * <xsd:attribute name="history" type="s:ST_OnOff"/>
14608
- * <xsd:attribute name="anchor" type="s:ST_String"/>
14609
- * <xsd:attribute ref="r:id"/>
14610
- * </xsd:complexType>
14611
- * ```
14612
- *
14613
- * @param linkId - The relationship ID for the hyperlink target
14614
- * @param hasXmlNs - Whether to include the XML namespace declaration
14615
- * @returns An XML component representing the click hyperlink
14616
- */
14617
- var createHyperlinkClick = (linkId, hasXmlNs) => new BuilderElement({
14618
- name: "a:hlinkClick",
14619
- attributes: _objectSpread2(_objectSpread2({}, hasXmlNs ? { xmlns: {
14620
- key: "xmlns:a",
14621
- value: "http://schemas.openxmlformats.org/drawingml/2006/main"
14622
- } } : {}), {}, { id: {
14623
- key: "r:id",
14624
- value: `rId${linkId}`
14625
- } })
14626
- });
14627
- //#endregion
14628
14586
  //#region src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties-attributes.ts
14629
14587
  /**
14630
14588
  * Non-visual properties attributes module.
@@ -14705,7 +14663,7 @@ var NonVisualProperties = class extends XmlComponent {
14705
14663
  for (let i = context.stack.length - 1; i >= 0; i--) {
14706
14664
  const element = context.stack[i];
14707
14665
  if (!(element instanceof ConcreteHyperlink)) continue;
14708
- this.root.push(createHyperlinkClick(element.linkId, false));
14666
+ this.root.push(element.createDrawingClick(context, false));
14709
14667
  break;
14710
14668
  }
14711
14669
  const result = super.prepForXml(context);
@@ -15375,6 +15333,48 @@ var createRelationship = (id, type, target, targetMode) => new BuilderElement({
15375
15333
  }
15376
15334
  });
15377
15335
  //#endregion
15336
+ //#region src/file/drawing/doc-properties/doc-properties-children.ts
15337
+ /**
15338
+ * Child elements for document properties.
15339
+ *
15340
+ * This module provides hyperlink elements that can be attached to
15341
+ * drawing elements for interactive behavior.
15342
+ *
15343
+ * @module
15344
+ */
15345
+ /**
15346
+ * Creates a click hyperlink element for a drawing.
15347
+ *
15348
+ * This element defines what happens when a user clicks on a drawing element.
15349
+ *
15350
+ * ## XSD Schema
15351
+ * ```xml
15352
+ * <xsd:complexType name="CT_Hyperlink">
15353
+ * <xsd:group ref="EG_PContent" minOccurs="0" maxOccurs="unbounded"/>
15354
+ * <xsd:attribute name="tgtFrame" type="s:ST_String"/>
15355
+ * <xsd:attribute name="tooltip" type="s:ST_String"/>
15356
+ * <xsd:attribute name="docLocation" type="s:ST_String"/>
15357
+ * <xsd:attribute name="history" type="s:ST_OnOff"/>
15358
+ * <xsd:attribute name="anchor" type="s:ST_String"/>
15359
+ * <xsd:attribute ref="r:id"/>
15360
+ * </xsd:complexType>
15361
+ * ```
15362
+ *
15363
+ * @param linkId - The relationship ID for the hyperlink target
15364
+ * @param hasXmlNs - Whether to include the XML namespace declaration
15365
+ * @returns An XML component representing the click hyperlink
15366
+ */
15367
+ var createHyperlinkClick = (linkId, hasXmlNs) => new BuilderElement({
15368
+ name: "a:hlinkClick",
15369
+ attributes: _objectSpread2(_objectSpread2({}, hasXmlNs ? { xmlns: {
15370
+ key: "xmlns:a",
15371
+ value: "http://schemas.openxmlformats.org/drawingml/2006/main"
15372
+ } } : {}), {}, { id: {
15373
+ key: "r:id",
15374
+ value: `rId${linkId}`
15375
+ } })
15376
+ });
15377
+ //#endregion
15378
15378
  //#region src/file/drawing/doc-properties/non-visual-drawing-properties.ts
15379
15379
  /**
15380
15380
  * Non-visual drawing properties (`CT_NonVisualDrawingProps`) of the shapes, pictures and groups inside a drawing:
@@ -15569,7 +15569,7 @@ var DocProperties = class extends XmlComponent {
15569
15569
  } else for (let i = context.stack.length - 1; i >= 0; i--) {
15570
15570
  const element = context.stack[i];
15571
15571
  if (!(element instanceof ConcreteHyperlink)) continue;
15572
- this.root.push(createHyperlinkClick(element.linkId, true));
15572
+ this.root.push(element.createDrawingClick(context, true));
15573
15573
  break;
15574
15574
  }
15575
15575
  if (this.decorative) this.root.push(createDecorativeExtensionList(true));
@@ -18957,20 +18957,44 @@ var HyperlinkType = {
18957
18957
  * ```
18958
18958
  */
18959
18959
  var ConcreteHyperlink = class extends XmlComponent {
18960
- constructor(children, relationshipId, anchor) {
18960
+ /**
18961
+ * @param children - Inline content of the hyperlink
18962
+ * @param relationshipId - Id of the external relationship, without the rId prefix
18963
+ * @param anchor - Bookmark name or external URL fragment
18964
+ * @param externalLink - The full address of an external hyperlink, so the relationship id is kept alongside its anchor
18965
+ */
18966
+ constructor(children, relationshipId, anchor, externalLink) {
18961
18967
  super("w:hyperlink");
18962
18968
  _defineProperty(this, "linkId", void 0);
18969
+ _defineProperty(this, "drawingLink", void 0);
18963
18970
  this.linkId = relationshipId;
18971
+ this.drawingLink = anchor && externalLink !== void 0 ? new DrawingLink(externalLink) : void 0;
18964
18972
  const attributes = new HyperlinkAttributes({
18965
18973
  history: 1,
18966
18974
  anchor: anchor ? anchor : void 0,
18967
- id: !anchor ? `rId${this.linkId}` : void 0
18975
+ id: !anchor || externalLink !== void 0 ? `rId${this.linkId}` : void 0
18968
18976
  });
18969
18977
  this.root.push(attributes);
18970
18978
  children.forEach((child) => {
18971
18979
  this.root.push(child);
18972
18980
  });
18973
18981
  }
18982
+ /**
18983
+ * Creates the `a:hlinkClick` of a picture in the hyperlink, which links to the same address.
18984
+ *
18985
+ * The hyperlink decides which relationship its pictures use, rather than the pictures reading `linkId`, because only it
18986
+ * knows whether that relationship has lost the fragment to `w:anchor`. The picture's relationship is added as the
18987
+ * picture is written, through the context's relationships, so it lands in the part the picture is in, both when
18988
+ * packing and when patching.
18989
+ *
18990
+ * @param context - The context the picture is written in, whose relationships get the picture's link if it has its own
18991
+ * @param declareNamespace - Declares the DrawingML namespace, for elements outside `a:graphic` such as `wp:docPr`
18992
+ */
18993
+ createDrawingClick(context, declareNamespace) {
18994
+ if (!this.drawingLink) return createHyperlinkClick(this.linkId, declareNamespace);
18995
+ this.drawingLink.addRelationship(context);
18996
+ return this.drawingLink.createClick(declareNamespace);
18997
+ }
18974
18998
  };
18975
18999
  /**
18976
19000
  * Represents an internal hyperlink to a bookmark within the document.
@@ -19019,6 +19043,11 @@ var InternalHyperlink = class extends ConcreteHyperlink {
19019
19043
  * External hyperlinks create a relationship to an external resource (URL).
19020
19044
  * The relationship is created during document preparation and the hyperlink
19021
19045
  * is converted to a ConcreteHyperlink with the relationship ID.
19046
+ * URL fragments of at most 255 UTF-16 units are written as anchors, preserving any additional # characters.
19047
+ * Longer fragments stay in the original relationship URI to avoid exceeding Word's anchor limit;
19048
+ * those links retain the existing limitations for fragments with multiple # characters.
19049
+ * Word appends the anchor to the relationship target as described in MS-OI29500 §17.16.22:
19050
+ * https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/df06e423-11a6-4a36-bfb3-82139e531781
19022
19051
  *
19023
19052
  * Reference: http://officeopenxml.com/WPhyperlink.php
19024
19053
  *
@@ -19032,6 +19061,7 @@ var InternalHyperlink = class extends ConcreteHyperlink {
19032
19061
  * <xsd:group ref="EG_PContent" minOccurs="0" maxOccurs="unbounded"/>
19033
19062
  * <xsd:attribute ref="r:id"/>
19034
19063
  * <xsd:attribute name="history" type="s:ST_OnOff" use="optional"/>
19064
+ * <xsd:attribute name="anchor" type="s:ST_String" use="optional"/>
19035
19065
  * </xsd:complexType>
19036
19066
  * ```
19037
19067
  *
@@ -19480,6 +19510,29 @@ var PageReference = class extends Run {
19480
19510
  }
19481
19511
  };
19482
19512
  //#endregion
19513
+ //#region src/file/paragraph/links/external-hyperlink-target.ts
19514
+ /**
19515
+ * External hyperlink targets and fragments for WordprocessingML.
19516
+ *
19517
+ * Word appends the anchor to the relationship target, separated by a # character.
19518
+ * Reference: https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/df06e423-11a6-4a36-bfb3-82139e531781
19519
+ *
19520
+ * @module
19521
+ */
19522
+ var MAX_ANCHOR_LENGTH = 255;
19523
+ /**
19524
+ * Splits a nonempty fragment that fits Word's anchor limit without decoding or normalizing either part.
19525
+ * Longer fragments stay in the original relationship URI, retaining its existing multi-hash limitations.
19526
+ */
19527
+ var externalHyperlinkTarget = (link) => {
19528
+ const index = link.indexOf("#");
19529
+ const fragmentLength = link.length - index - 1;
19530
+ return index > 0 && fragmentLength > 0 && fragmentLength <= MAX_ANCHOR_LENGTH ? {
19531
+ target: link.slice(0, index),
19532
+ anchor: link.slice(index + 1)
19533
+ } : { target: link };
19534
+ };
19535
+ //#endregion
19483
19536
  //#region src/file/fonts/font.ts
19484
19537
  /**
19485
19538
  * Font module for WordprocessingML documents.
@@ -19618,32 +19671,26 @@ var createFont = ({ name, altName, panose1, charset, family, notTrueType, pitch,
19618
19671
  ]
19619
19672
  });
19620
19673
  //#endregion
19621
- //#region src/file/fonts/create-regular-font.ts
19674
+ //#region src/file/fonts/create-embedded-font.ts
19622
19675
  /**
19623
- * Creates a regular embedded font with default settings.
19676
+ * Creates an embedded font with default settings.
19624
19677
  *
19625
19678
  * This helper function creates a font definition with standard font signature
19626
19679
  * values that work for most common fonts. The signature specifies Unicode
19627
19680
  * and code page ranges supported by the font.
19628
19681
  *
19629
- * @param options - Font creation options
19630
- * @param options.name - Font name
19631
- * @param options.index - Font relationship index
19632
- * @param options.fontKey - Unique font key (GUID) for obfuscation
19633
- * @param options.characterSet - Optional character set identifier
19634
- *
19635
19682
  * @returns XmlComponent representing the font definition
19636
19683
  *
19637
19684
  * @example
19638
19685
  * ```typescript
19639
- * const font = createRegularFont({
19686
+ * const font = createEmbeddedFont({
19640
19687
  * name: "Arial",
19641
- * index: 1,
19642
- * fontKey: "12345678-1234-1234-1234-123456789012"
19688
+ * embedRegular: { id: "rId1", fontKey: "12345678-1234-1234-1234-123456789012" },
19689
+ * embedBold: { id: "rId2", fontKey: "12345678-1234-1234-1234-123456789013" },
19643
19690
  * });
19644
19691
  * ```
19645
19692
  */
19646
- var createRegularFont = ({ name, index, fontKey, characterSet }) => createFont({
19693
+ var createEmbeddedFont = ({ name, characterSet, embedRegular, embedBold, embedItalic, embedBoldItalic }) => createFont({
19647
19694
  name,
19648
19695
  sig: {
19649
19696
  usb0: "E0002AFF",
@@ -19656,10 +19703,10 @@ var createRegularFont = ({ name, index, fontKey, characterSet }) => createFont({
19656
19703
  charset: characterSet,
19657
19704
  family: "auto",
19658
19705
  pitch: "variable",
19659
- embedRegular: {
19660
- fontKey,
19661
- id: `rId${index}`
19662
- }
19706
+ embedRegular,
19707
+ embedBold,
19708
+ embedItalic,
19709
+ embedBoldItalic
19663
19710
  });
19664
19711
  //#endregion
19665
19712
  //#region src/file/fonts/font-table.ts
@@ -19737,25 +19784,47 @@ var createFontTable = (fonts) => new BuilderElement({
19737
19784
  value: "w14 w15 w16se w16cid w16 w16cex w16sdtdh"
19738
19785
  }
19739
19786
  },
19740
- children: fonts.map((font, i) => createRegularFont({
19741
- name: font.name,
19742
- index: i + 1,
19743
- fontKey: font.fontKey,
19744
- characterSet: font.characterSet
19745
- }))
19787
+ children: fonts.map(createEmbeddedFont)
19746
19788
  });
19747
19789
  //#endregion
19748
19790
  //#region src/file/fonts/font-wrapper.ts
19791
+ var FACES = [
19792
+ {
19793
+ option: "data",
19794
+ element: "embedRegular",
19795
+ bold: false,
19796
+ italic: false
19797
+ },
19798
+ {
19799
+ option: "bold",
19800
+ element: "embedBold",
19801
+ bold: true,
19802
+ italic: false
19803
+ },
19804
+ {
19805
+ option: "italic",
19806
+ element: "embedItalic",
19807
+ bold: false,
19808
+ italic: true
19809
+ },
19810
+ {
19811
+ option: "boldItalic",
19812
+ element: "embedBoldItalic",
19813
+ bold: true,
19814
+ italic: true
19815
+ }
19816
+ ];
19749
19817
  /**
19750
19818
  * Wrapper class for managing the font table and its relationships.
19751
19819
  *
19752
19820
  * Creates a font table with embedded font files and manages the relationships
19753
- * required for font embedding. Each font is assigned a unique key for obfuscation.
19821
+ * required for font embedding. Each face of a font is embedded as a file of its own,
19822
+ * with a unique key for obfuscation.
19754
19823
  *
19755
19824
  * @example
19756
19825
  * ```typescript
19757
19826
  * const fontWrapper = new FontWrapper([
19758
- * { name: "CustomFont", data: fontBuffer }
19827
+ * { name: "CustomFont", data: fontBuffer, bold: boldFontBuffer }
19759
19828
  * ]);
19760
19829
  * ```
19761
19830
  */
@@ -19764,12 +19833,43 @@ var FontWrapper = class {
19764
19833
  _defineProperty(this, "options", void 0);
19765
19834
  _defineProperty(this, "fontTable", void 0);
19766
19835
  _defineProperty(this, "relationships", void 0);
19767
- _defineProperty(this, "fontOptionsWithKey", []);
19836
+ _defineProperty(
19837
+ this,
19838
+ /** @deprecated Use `files`, which has the file and key of each face a font embeds, not only the regular face's key */
19839
+ "fontOptionsWithKey",
19840
+ []
19841
+ );
19842
+ _defineProperty(
19843
+ this,
19844
+ /** The files of the faces the fonts embed, in order: the Nth is `fonts/font<N>.odttf`, with the relationship `rId<N>` */
19845
+ "files",
19846
+ []
19847
+ );
19768
19848
  this.options = options;
19769
- this.fontOptionsWithKey = options.map((o) => _objectSpread2(_objectSpread2({}, o), {}, { fontKey: uniqueUuid() }));
19770
- this.fontTable = createFontTable(this.fontOptionsWithKey);
19849
+ const faces = options.map((font) => FACES.flatMap(({ option, element, bold, italic }) => {
19850
+ const data = font[option];
19851
+ return data ? [{
19852
+ element,
19853
+ file: {
19854
+ name: font.name,
19855
+ data,
19856
+ bold,
19857
+ italic,
19858
+ fontKey: uniqueUuid()
19859
+ }
19860
+ }] : [];
19861
+ }));
19862
+ this.files = faces.flatMap((ofFont) => ofFont.map(({ file }) => file));
19863
+ this.fontOptionsWithKey = options.map((font, index) => _objectSpread2(_objectSpread2({}, font), {}, { fontKey: faces[index][0].file.fontKey }));
19864
+ this.fontTable = createFontTable(options.map((font, index) => _objectSpread2({
19865
+ name: font.name,
19866
+ characterSet: font.characterSet
19867
+ }, Object.fromEntries(faces[index].map(({ element, file }) => [element, {
19868
+ id: `rId${this.files.indexOf(file) + 1}`,
19869
+ fontKey: file.fontKey
19870
+ }])))));
19771
19871
  this.relationships = new Relationships();
19772
- for (let i = 0; i < options.length; i++) this.relationships.addRelationship(i + 1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font", `fonts/font${i + 1}.odttf`);
19872
+ for (let i = 0; i < this.files.length; i++) this.relationships.addRelationship(i + 1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font", `fonts/font${i + 1}.odttf`);
19773
19873
  }
19774
19874
  get View() {
19775
19875
  return this.fontTable;
@@ -20292,8 +20392,9 @@ var Paragraph = class extends FileChild {
20292
20392
  prepForXml(context) {
20293
20393
  for (const element of this.root) if (element instanceof ExternalHyperlink) {
20294
20394
  const index = this.root.indexOf(element);
20295
- const concreteHyperlink = new ConcreteHyperlink(element.options.children, uniqueId());
20296
- context.viewWrapper.Relationships.addRelationship(concreteHyperlink.linkId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", element.options.link, TargetModeType.EXTERNAL);
20395
+ const { target, anchor } = externalHyperlinkTarget(element.options.link);
20396
+ const concreteHyperlink = new ConcreteHyperlink(element.options.children, uniqueId(), anchor, element.options.link);
20397
+ context.viewWrapper.Relationships.addRelationship(concreteHyperlink.linkId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", target, TargetModeType.EXTERNAL);
20297
20398
  this.root[index] = concreteHyperlink;
20298
20399
  }
20299
20400
  return super.prepForXml(context);
@@ -35468,7 +35569,7 @@ var Compiler = class {
35468
35569
  zip.file(`word/media/${data.fileName}`, data.data);
35469
35570
  zip.file(`word/media/${data.fallback.fileName}`, data.fallback.data);
35470
35571
  }
35471
- for (const [i, { data: buffer, fontKey }] of file.FontTable.fontOptionsWithKey.entries()) zip.file(`word/fonts/font${i + 1}.odttf`, obfuscate(buffer, fontKey));
35572
+ for (const [i, { data: buffer, fontKey }] of file.FontTable.files.entries()) zip.file(`word/fonts/font${i + 1}.odttf`, obfuscate(buffer, fontKey));
35472
35573
  return zip;
35473
35574
  }
35474
35575
  xmlifyFile(file, prettify) {
@@ -37763,12 +37864,13 @@ var patchDocument = function() {
37763
37864
  json: element,
37764
37865
  patch: _objectSpread2(_objectSpread2({}, patchValue), {}, { children: patchValue.children.flatMap((child) => child instanceof Bookmark ? child.writtenAs : [child]).map((child) => {
37765
37866
  if (child instanceof ExternalHyperlink) {
37766
- const concreteHyperlink = new ConcreteHyperlink(child.options.children, uniqueId());
37867
+ const { target, anchor } = externalHyperlinkTarget(child.options.link);
37868
+ const concreteHyperlink = new ConcreteHyperlink(child.options.children, uniqueId(), anchor, child.options.link);
37767
37869
  hyperlinkRelationships.push({
37768
37870
  key,
37769
37871
  id: concreteHyperlink.linkId,
37770
37872
  type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
37771
- target: child.options.link,
37873
+ target,
37772
37874
  targetMode: TargetModeType.EXTERNAL
37773
37875
  });
37774
37876
  return concreteHyperlink;