pdf-skryba 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/CHANGELOG.md +190 -0
  2. package/LICENSE +21 -661
  3. package/README.md +189 -115
  4. package/THIRD-PARTY.md +441 -134
  5. package/dist/first-party/reader.js +14915 -0
  6. package/dist/first-party/reader.js.map +7 -0
  7. package/dist/first-party.js +148 -0
  8. package/dist/first-party.js.map +7 -0
  9. package/dist/index.js +297 -2261
  10. package/dist/index.js.map +4 -4
  11. package/dist/index.min.js +4 -5
  12. package/dist/light.js +23 -305
  13. package/dist/light.js.map +4 -4
  14. package/dist/light.min.js +1 -1
  15. package/dist/types/{packages/doc-read/src/extractor → extractor}/glyph-accents.d.ts +1 -1
  16. package/dist/types/{packages/doc-read/src/extractor → extractor}/glyph-double-draw.d.ts +1 -1
  17. package/dist/types/{packages/doc-read/src/extractor → extractor}/glyph-positions.d.ts +3 -3
  18. package/dist/types/{packages/doc-read/src/extractor → extractor}/glyph-runs.d.ts +2 -2
  19. package/dist/types/{packages/doc-read/src/extractor → extractor}/glyph-window.d.ts +1 -1
  20. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-aside-figures.d.ts +3 -3
  21. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-bands.d.ts +1 -1
  22. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-ccitt-images.d.ts +2 -2
  23. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-cell-paragraphs.d.ts +2 -2
  24. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-column-cut.d.ts +1 -1
  25. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-document-info.d.ts +1 -1
  26. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-document-scale.d.ts +4 -4
  27. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-embedded-images.d.ts +3 -3
  28. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-facts.d.ts +2 -2
  29. package/dist/types/extractor/pdf-flate-images.d.ts +7 -0
  30. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-font-bridge.d.ts +1 -1
  31. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-font-objects.d.ts +2 -2
  32. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/font-text.d.ts +4 -4
  33. package/dist/types/extractor/pdf-fonts/widths.d.ts +4 -0
  34. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-framed-blocks.d.ts +2 -2
  35. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-glyph-source.d.ts +4 -4
  36. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-hidden-text.d.ts +1 -1
  37. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-image-anchors.d.ts +6 -6
  38. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-image-pixels.d.ts +2 -2
  39. package/dist/types/extractor/pdf-image-refusal.d.ts +4 -0
  40. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-image-store.d.ts +2 -2
  41. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-images.d.ts +1 -1
  42. package/dist/types/extractor/pdf-jpeg-images.d.ts +7 -0
  43. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-layers.d.ts +1 -1
  44. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-letter-spacing.d.ts +2 -2
  45. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-line-breaks.d.ts +2 -2
  46. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-lines.d.ts +3 -3
  47. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-links-ours.d.ts +2 -2
  48. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-links.d.ts +3 -3
  49. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-model.d.ts +9 -8
  50. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/content.d.ts +1 -1
  51. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/document.d.ts +1 -1
  52. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/parse.d.ts +1 -1
  53. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/refusal.d.ts +1 -1
  54. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/streams.d.ts +1 -1
  55. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/xref.d.ts +1 -1
  56. package/dist/types/extractor/pdf-objstm-source.d.ts +3 -0
  57. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-open.d.ts +4 -4
  58. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-ops-ours.d.ts +3 -3
  59. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-ops.d.ts +1 -1
  60. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-outline.d.ts +1 -1
  61. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-page-content.d.ts +3 -3
  62. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-page-figures.d.ts +7 -7
  63. package/dist/types/extractor/pdf-page-markers.d.ts +12 -0
  64. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-page-plan.d.ts +4 -4
  65. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-page-stages.d.ts +14 -13
  66. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-page-tables.d.ts +8 -8
  67. package/dist/types/extractor/pdf-page-tabs.d.ts +4 -0
  68. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-paragraphs.d.ts +3 -3
  69. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-paths-ours.d.ts +2 -2
  70. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-reading-order.d.ts +2 -2
  71. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-reference-ours.d.ts +2 -2
  72. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-region-order.d.ts +3 -3
  73. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-rotated-lines.d.ts +1 -1
  74. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-rotated-words.d.ts +1 -1
  75. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-row-url-join.d.ts +1 -1
  76. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-scanned.d.ts +8 -8
  77. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-smask.d.ts +2 -2
  78. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-source.d.ts +13 -13
  79. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-stencil-images.d.ts +3 -3
  80. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-structure.d.ts +1 -1
  81. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-symbol-page.d.ts +2 -2
  82. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-symbol-verdict.d.ts +1 -1
  83. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-table-detector.d.ts +7 -7
  84. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-table-render.d.ts +7 -4
  85. package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf.d.ts +14 -14
  86. package/dist/types/{packages/doc-ir/src/layout → layout}/aligned-grid.d.ts +1 -1
  87. package/dist/types/{packages/doc-ir/src/layout → layout}/baseline-lines.d.ts +1 -1
  88. package/dist/types/{packages/doc-ir/src/layout → layout}/cell-text.d.ts +1 -1
  89. package/dist/types/{packages/doc-ir/src/layout → layout}/column-discriminant.d.ts +1 -1
  90. package/dist/types/{packages/doc-ir/src/layout → layout}/column-grid.d.ts +1 -1
  91. package/dist/types/{packages/doc-ir/src/layout → layout}/cut-word.d.ts +2 -2
  92. package/dist/types/{packages/doc-ir/src/layout → layout}/fragment-cells.d.ts +1 -1
  93. package/dist/types/{packages/doc-ir/src/layout → layout}/geometry.d.ts +10 -9
  94. package/dist/types/{packages/doc-ir/src/layout → layout}/gutter.d.ts +1 -1
  95. package/dist/types/{packages/doc-ir/src/layout → layout}/hyphenation.d.ts +1 -1
  96. package/dist/types/{packages/doc-ir/src/layout → layout}/intersection-cells.d.ts +1 -1
  97. package/dist/types/{packages/doc-ir/src/layout → layout}/merged-cells.d.ts +1 -2
  98. package/dist/types/{packages/doc-ir/src/layout → layout}/page-furniture.d.ts +1 -1
  99. package/dist/types/{packages/doc-ir/src/layout → layout}/text-size.d.ts +1 -1
  100. package/dist/types/{packages/doc-ir/src/layout → layout}/vector-grid.d.ts +1 -1
  101. package/dist/types/lib/link-schemes.d.ts +1 -0
  102. package/dist/types/lib/pdf-first-party-reader.d.ts +11 -0
  103. package/dist/types/lib/pdf-first-party.d.ts +7 -0
  104. package/dist/types/lib/pdf-light.d.ts +15 -0
  105. package/dist/types/lib/pdf.d.ts +5 -0
  106. package/dist/types/lib/reader-options.d.ts +12 -0
  107. package/dist/types/lib/table-leading-bands.d.ts +7 -0
  108. package/dist/types/{packages/doc-read/src/pipeline → pipeline}/cut-paragraph-repair.d.ts +1 -1
  109. package/dist/types/{packages/doc-read/src/pipeline → pipeline}/glued-word-repair.d.ts +1 -1
  110. package/dist/types/{packages/doc-read/src/pipeline → pipeline}/lost-text-repair.d.ts +1 -1
  111. package/dist/types/{packages/doc-read/src/pipeline → pipeline}/pdf-conservation-source.d.ts +1 -1
  112. package/package.json +50 -15
  113. package/dist/types/packages/doc-ir/src/extractor/bytes.d.ts +0 -4
  114. package/dist/types/packages/doc-ir/src/extractor/image-format.d.ts +0 -15
  115. package/dist/types/packages/doc-ir/src/extractor/image-pixel-width.d.ts +0 -3
  116. package/dist/types/packages/doc-ir/src/extractor/png-color.d.ts +0 -4
  117. package/dist/types/packages/doc-ir/src/extractor/png-decode.d.ts +0 -8
  118. package/dist/types/packages/doc-ir/src/extractor/png.d.ts +0 -3
  119. package/dist/types/packages/doc-ir/src/extractor/raw-image.d.ts +0 -6
  120. package/dist/types/packages/doc-ir/src/layout/geometry-types.d.ts +0 -65
  121. package/dist/types/packages/doc-ir/src/layout/painted-paths.d.ts +0 -22
  122. package/dist/types/packages/doc-ir/src/layout/rect-rules.d.ts +0 -77
  123. package/dist/types/packages/doc-ir/src/layout/rect.d.ts +0 -14
  124. package/dist/types/packages/doc-ir/src/lib/blanks.d.ts +0 -1
  125. package/dist/types/packages/doc-ir/src/lib/digest.d.ts +0 -1
  126. package/dist/types/packages/doc-ir/src/lib/ir-walk.d.ts +0 -6
  127. package/dist/types/packages/doc-ir/src/lib/ir.d.ts +0 -133
  128. package/dist/types/packages/doc-ir/src/lib/link-schemes.d.ts +0 -5
  129. package/dist/types/packages/doc-ir/src/lib/page-labels.d.ts +0 -10
  130. package/dist/types/packages/doc-ir/src/lib/reader-error.d.ts +0 -14
  131. package/dist/types/packages/doc-ir/src/lib/reader-limits.d.ts +0 -47
  132. package/dist/types/packages/doc-ir/src/lib/reader-types.d.ts +0 -111
  133. package/dist/types/packages/doc-ir/src/lib/symbol-font.d.ts +0 -3
  134. package/dist/types/packages/doc-ir/src/lib/table-empty-parts.d.ts +0 -16
  135. package/dist/types/packages/doc-ir/src/lib/table-width-cap.d.ts +0 -7
  136. package/dist/types/packages/doc-ir/src/lib/vision-port.d.ts +0 -16
  137. package/dist/types/packages/doc-ir/src/pipeline/detect-language.d.ts +0 -13
  138. package/dist/types/packages/doc-ir/src/pipeline/language-profiles.d.ts +0 -8
  139. package/dist/types/packages/doc-ir/src/pipeline/text-conservation.d.ts +0 -89
  140. package/dist/types/packages/doc-read/src/extractor/pdf-flate-images.d.ts +0 -7
  141. package/dist/types/packages/doc-read/src/extractor/pdf-fonts/widths.d.ts +0 -4
  142. package/dist/types/packages/doc-read/src/extractor/pdf-image-refusal.d.ts +0 -4
  143. package/dist/types/packages/doc-read/src/extractor/pdf-jpeg-images.d.ts +0 -7
  144. package/dist/types/packages/doc-read/src/extractor/pdf-objstm-source.d.ts +0 -3
  145. package/dist/types/packages/doc-read/src/extractor/pdf-page-markers.d.ts +0 -12
  146. package/dist/types/packages/doc-read/src/extractor/pdf-page-tabs.d.ts +0 -4
  147. package/dist/types/packages/doc-read/src/lib/pdf-light.d.ts +0 -15
  148. package/dist/types/packages/doc-read/src/lib/pdf.d.ts +0 -5
  149. package/dist/types/packages/doc-read/src/lib/reader-options.d.ts +0 -12
  150. /package/dist/types/{packages/doc-read/src/extractor → extractor}/codecs/ccitt-fax.d.ts +0 -0
  151. /package/dist/types/{packages/doc-read/src/extractor → extractor}/codecs/ccitt-run-tables.d.ts +0 -0
  152. /package/dist/types/{packages/doc-read/src/extractor → extractor}/document-cache.d.ts +0 -0
  153. /package/dist/types/{packages/doc-read/src/extractor → extractor}/extraction-cost.d.ts +0 -0
  154. /package/dist/types/{packages/doc-read/src/extractor → extractor}/font-weight.d.ts +0 -0
  155. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-colour-ours.d.ts +0 -0
  156. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-decrypt.d.ts +0 -0
  157. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/bounds.d.ts +0 -0
  158. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/cns-cmap-data.d.ts +0 -0
  159. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/glyph-data.d.ts +0 -0
  160. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/jis-cmap-data.d.ts +0 -0
  161. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/names.d.ts +0 -0
  162. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/predefined-cmaps.d.ts +0 -0
  163. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/table-budget.d.ts +0 -0
  164. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/to-unicode.d.ts +0 -0
  165. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-fonts/type1-encoding.d.ts +0 -0
  166. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/bounds.d.ts +0 -0
  167. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-objects/objects.d.ts +0 -0
  168. /package/dist/types/{packages/doc-gate/src/extractor → extractor}/pdf-objstm-guard.d.ts +0 -0
  169. /package/dist/types/{packages/doc-read/src/extractor → extractor}/pdf-text-string.d.ts +0 -0
  170. /package/dist/types/{packages/doc-read/src/extractor → extractor}/text-writing-direction.d.ts +0 -0
  171. /package/dist/types/{packages/doc-ir/src/layout → layout}/grid-band.d.ts +0 -0
  172. /package/dist/types/{packages/doc-ir/src/layout → layout}/heading-sizes.d.ts +0 -0
  173. /package/dist/types/{packages/doc-ir/src/layout → layout}/hidden-repaints.d.ts +0 -0
  174. /package/dist/types/{packages/doc-ir/src/layout → layout}/hyphenation-en.d.ts +0 -0
  175. /package/dist/types/{packages/doc-ir/src/layout → layout}/hyphenation-fr.d.ts +0 -0
  176. /package/dist/types/{packages/doc-ir/src/layout → layout}/image-frontier.d.ts +0 -0
  177. /package/dist/types/{packages/doc-ir/src/layout → layout}/induced-markers.d.ts +0 -0
  178. /package/dist/types/{packages/doc-ir/src/layout → layout}/intervals.d.ts +0 -0
  179. /package/dist/types/{packages/doc-ir/src/layout → layout}/list.d.ts +0 -0
  180. /package/dist/types/{packages/doc-ir/src/layout → layout}/mode.d.ts +0 -0
  181. /package/dist/types/{packages/doc-ir/src/layout → layout}/position-clusters.d.ts +0 -0
  182. /package/dist/types/{packages/doc-ir/src/layout → layout}/straddled-boundaries.d.ts +0 -0
  183. /package/dist/types/{packages/doc-ir/src/layout → layout}/superscript.d.ts +0 -0
  184. /package/dist/types/{packages/doc-ir/src/layout → layout}/tolerances.d.ts +0 -0
  185. /package/dist/types/{packages/doc-ir/src/layout → layout}/word-gap.d.ts +0 -0
  186. /package/dist/types/{packages/doc-read/src/lib → lib}/chunk.d.ts +0 -0
  187. /package/dist/types/{packages/doc-ir/src/lib → lib}/extent.d.ts +0 -0
package/THIRD-PARTY.md CHANGED
@@ -1,134 +1,441 @@
1
- # Third-party notices
2
-
3
- This package is AGPL-3.0-or-later. It also **redistributes** material owned by others, inside
4
- `dist/index.js`, and carries their notices here.
5
-
6
- ## Adobe CMap resources: `UniCNS-UCS2-H` and `UniJIS-UCS2-H`, code → CID
7
-
8
- `dist/index.js` carries the code → CID tables of Adobe's `UniCNS-UCS2-H` (collection Adobe-CNS1) and
9
- `UniJIS-UCS2-H` (Adobe-Japan1) CMaps, transcribed into three sixteen-bit columns by
10
- `tools/poc/build-cns-cmap.ts` from Adobe's own resources — nothing is taken from any reader. Source:
11
- `adobe-type-tools/cmap-resources`. Their notice:
12
-
13
- > Copyright 1990-2019 Adobe. All rights reserved.
14
- >
15
- > Redistribution and use in source and binary forms, with or without modification, are permitted provided
16
- > that the following conditions are met:
17
- >
18
- > Redistributions of source code must retain the above copyright notice, this list of conditions and the
19
- > following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list
20
- > of conditions and the following disclaimer in the documentation and/or other materials provided with the
21
- > distribution. Neither the name of Adobe nor the names of its contributors may be used to endorse or promote
22
- > products derived from this software without specific prior written permission.
23
- >
24
- > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
25
- > WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26
- > PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
27
- > DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28
- > PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29
- > HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
- > NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
- > POSSIBILITY OF SUCH DAMAGE.
32
-
33
- **What is carried and what is not.** The 16 418 `cidrange` entries of the Chinese table and the 8 533 of the
34
- Japanese one, whole and exact — neither resource holds a `cidchar` block or a `usecmap`, so nothing is
35
- inherited from another file (the generator refuses loudly if either ever appears). Left out: the codespace
36
- declaration (`<0000>–<D7FF>`, `<E000>–<FFFF>`), which the reader already applies by cutting two-byte codes;
37
- and the single `notdefrange` of each (`<0000>–<001F>` → CID 1), the C0 control characters, which this product
38
- never publishes anyway.
39
-
40
- Until 1/11/2026 the bundle embedded instead the predefined CMaps of pdf.js (`pdfjs-dist/cmaps/*.bcmap`), ~594 KB
41
- for every collection; they left with pdf.js. A PDF that relies on any OTHER predefined CMap (`90ms-RKSJ-H`,
42
- `ETen-B5-H`, the GB and KS collections) falls back on the font's own default width `/DW`, and says so in its tests.
43
-
44
- ## PDFium, CCITT fax decoding
45
-
46
- `dist/index.js` carries a port of the fax (CCITT G3 / G4) decoder of PDFium, in TypeScript:
47
- `src/extractor/codecs/ccitt-fax.ts` and its run-length code tables `ccitt-run-tables.ts`, ported
48
- line for line from PDFium's `core/fxcodec/fax/faxmodule.cpp` (the decoding half). The original
49
- notice, in each file:
50
-
51
- > Copyright 2014 The PDFium Authors. Use of this source code is governed by a BSD-style license
52
- > that can be found in the LICENSE file. Original code copyright 2014 Foxit Software Inc.
53
-
54
- The licence text is PDFium's own (BSD-3-Clause, Google Inc. and the PDFium Authors). Redistribution
55
- is permitted under it, provided this notice and the copyright line travel with the code. They do.
56
-
57
- ## JPEG decoder (jpeg-js 0.4.4), vendored
58
-
59
- `dist/index.js` carries the decoder of jpeg-js 0.4.4, kept as published in
60
- `src/extractor/codecs/vendor/jpeg-js-decoder.cjs`, with one function added (`decodeRaw`: the four-component
61
- components before colour conversion). The decoding code is jpgjs, copyright 2011 notmasteryet, under the
62
- Apache License 2.0 (its notice is in the file). The jpeg-js package is under the BSD 3-Clause licence below
63
- (Copyright (c) 2014, Eugene Ware).
64
-
65
- ```
66
- Copyright (c) 2014, Eugene Ware
67
- All rights reserved.
68
-
69
- Redistribution and use in source and binary forms, with or without
70
- modification, are permitted provided that the following conditions are met:
71
-
72
- 1. Redistributions of source code must retain the above copyright
73
- notice, this list of conditions and the following disclaimer.
74
- 2. Redistributions in binary form must reproduce the above copyright
75
- notice, this list of conditions and the following disclaimer in the
76
- documentation and/or other materials provided with the distribution.
77
- 3. Neither the name of Eugene Ware nor the names of its contributors
78
- may be used to endorse or promote products derived from this software
79
- without specific prior written permission.
80
-
81
- THIS SOFTWARE IS PROVIDED BY EUGENE WARE ''AS IS'' AND ANY
82
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
83
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
84
- DISCLAIMED. IN NO EVENT SHALL EUGENE WARE BE LIABLE FOR ANY
85
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
86
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
87
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
88
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
89
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
90
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
91
- ```
92
-
93
- ## Dependencies, not redistributed
94
-
95
- These are **not** in the bundle; a consumer installs them and their licences apply to their own
96
- copies: `parse5` (MIT), `@cantoo/pdf-lib` (MIT).
97
-
98
- ## Why this file exists
99
-
100
- A licence scanner reads the registry metadata, which says AGPL only, and a reader of the README
101
- has no reason to suspect embedded resources. Found by the security review of 30/10/2026, before
102
- the first publication — which would have been irreversible.
103
-
104
- ### PDFium licence (verbatim, BSD part)
105
-
106
- ```
107
- // Copyright 2014 The PDFium Authors
108
- //
109
- // Redistribution and use in source and binary forms, with or without
110
- // modification, are permitted provided that the following conditions are
111
- // met:
112
- //
113
- // * Redistributions of source code must retain the above copyright
114
- // notice, this list of conditions and the following disclaimer.
115
- // * Redistributions in binary form must reproduce the above
116
- // copyright notice, this list of conditions and the following disclaimer
117
- // in the documentation and/or other materials provided with the
118
- // distribution.
119
- // * Neither the name of Google Inc. nor the names of its
120
- // contributors may be used to endorse or promote products derived from
121
- // this software without specific prior written permission.
122
- //
123
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
124
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
125
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
126
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
127
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
128
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
129
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
130
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
131
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
132
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
133
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
134
- ```
1
+ # Third-party notices
2
+
3
+ This package is under the MIT licence (`LICENSE`). Its bundle (`dist/`) also **redistributes**
4
+ material owned by others, each under its own permissive licence. Their notices are carried here,
5
+ as those licences ask. The MIT licence covers the rest.
6
+
7
+ ## Adobe CMap resources: `UniCNS-UCS2-H` and `UniJIS-UCS2-H`, code → CID
8
+
9
+ `dist/index.js` carries the code → CID tables of Adobe's `UniCNS-UCS2-H` (collection Adobe-CNS1) and
10
+ `UniJIS-UCS2-H` (Adobe-Japan1) CMaps, transcribed into three sixteen-bit columns from Adobe's own
11
+ resources — nothing is taken from any reader. Source: `adobe-type-tools/cmap-resources`. Their notice:
12
+
13
+ > Copyright 1990-2019 Adobe. All rights reserved.
14
+ >
15
+ > Redistribution and use in source and binary forms, with or without modification, are permitted provided
16
+ > that the following conditions are met:
17
+ >
18
+ > Redistributions of source code must retain the above copyright notice, this list of conditions and the
19
+ > following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list
20
+ > of conditions and the following disclaimer in the documentation and/or other materials provided with the
21
+ > distribution. Neither the name of Adobe nor the names of its contributors may be used to endorse or promote
22
+ > products derived from this software without specific prior written permission.
23
+ >
24
+ > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
25
+ > WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26
+ > PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
27
+ > DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28
+ > PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29
+ > HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ > NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
+ > POSSIBILITY OF SUCH DAMAGE.
32
+
33
+ **What is carried and what is not.** The 16 418 `cidrange` entries of the Chinese table and the 8 533 of the
34
+ Japanese one, whole and exact — neither resource holds a `cidchar` block or a `usecmap`, so nothing is
35
+ inherited from another file. Left out: the codespace declaration (`<0000>–<D7FF>`, `<E000>–<FFFF>`), which the
36
+ reader already applies by cutting two-byte codes; and the single `notdefrange` of each (`<0000>–<001F>` →
37
+ CID 1), the C0 control characters.
38
+
39
+ A PDF that relies on any OTHER predefined CMap (`90ms-RKSJ-H`, `ETen-B5-H`, the GB and KS collections) falls
40
+ back on the font's own default width `/DW`.
41
+
42
+ ## Adobe Glyph List
43
+
44
+ `dist/index.js` carries the glyph name → Unicode table of the Adobe Glyph List (`glyphlist.txt`), packed
45
+ into one string, and the glyph names of the PDF encodings read through it. The Symbol table of the base
46
+ (`doc-ir`) is built from the same list. Source: `adobe-type-tools/agl-aglfn`. Its notice (BSD 3-Clause):
47
+
48
+ > Copyright 2002-2019 Adobe (http://www.adobe.com/).
49
+ >
50
+ > Redistribution and use in source and binary forms, with or without modification, are permitted provided
51
+ > that the following conditions are met:
52
+ >
53
+ > Redistributions of source code must retain the above copyright notice, this list of conditions and the
54
+ > following disclaimer.
55
+ >
56
+ > Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
57
+ > following disclaimer in the documentation and/or other materials provided with the distribution.
58
+ >
59
+ > Neither the name of Adobe nor the names of its contributors may be used to endorse or promote products
60
+ > derived from this software without specific prior written permission.
61
+ >
62
+ > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
63
+ > WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
64
+ > PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
65
+ > DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
66
+ > PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67
+ > HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
68
+ > NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
69
+ > POSSIBILITY OF SUCH DAMAGE.
70
+
71
+ ## Adobe Font Metrics of the 14 standard PDF fonts (APAFML)
72
+
73
+ `dist/index.js` carries the advance widths of the 14 standard fonts, by glyph name, and the built-in
74
+ encodings of Helvetica, Symbol and ZapfDingbats, all read from Adobe's Core 14 AFM files. The AFM files
75
+ themselves are not distributed. Their notice (SPDX `APAFML`):
76
+
77
+ > Copyright (c) 1985, 1987, 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights
78
+ > Reserved.
79
+ >
80
+ > This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any
81
+ > purpose and without charge, with or without modification, provided that all copyright notices are
82
+ > retained; that the AFM files are not distributed without this file; that all modifications to this file
83
+ > or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not
84
+ > modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files.
85
+
86
+ **Modification, noted as the notice asks.** Only the widths and the encoding slots are kept, rewritten as
87
+ `name=width` lists and arrays of names; every other AFM field (kerning, bounding boxes, composites) is left
88
+ out.
89
+
90
+ ## Code page tables (WinAnsi, MacRoman)
91
+
92
+ The glyph names of `WinAnsiEncoding` and `MacRomanEncoding` are derived from two mapping tables published
93
+ by the Unicode Consortium: `CP1252.TXT` (cp1252 to Unicode, Microsoft) and `ROMAN.TXT` (Mac OS Roman to
94
+ Unicode, © 1994-2002, 2005 Apple Computer, Inc.). Neither file is redistributed: each code was turned into
95
+ a glyph name through the Adobe Glyph List.
96
+
97
+ ## Hyphenation patterns (hyph-utf8): American English and French
98
+
99
+ `dist/index.js` carries the Knuth-Liang hyphenation patterns of the `hyph-utf8` package for American
100
+ English (`hyph-en-us.tex`, 2005-05-30) and French (`hyph-fr.tex`, V2.13 2016/05/12). The TeX comments are
101
+ stripped and the tokens joined by spaces; the tokens themselves are unmodified.
102
+
103
+ American English (the file holds the additional patterns of its author together with the original
104
+ patterns of the Plain TeX `hyphen.tex`). Its notice:
105
+
106
+ > Copyright (C) 1990, 2004, 2005 Gerard D.C. Kuiken
107
+ >
108
+ > Copying and distribution of this file, with or without modification, are permitted in any medium without
109
+ > royalty provided the copyright notice and this notice are preserved.
110
+
111
+ French. Its notice (MIT):
112
+
113
+ > Copyright (C) 1994-2002 Daniel Flipo, Bernard Gaulle, 2016 Arthur Reutenauer
114
+ >
115
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
116
+ > associated documentation files (the "Software"), to deal in the Software without restriction, including
117
+ > without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
118
+ > copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
119
+ > following conditions:
120
+ >
121
+ > The above copyright notice and this permission notice shall be included in all copies or substantial
122
+ > portions of the Software.
123
+ >
124
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
125
+ > LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
126
+ > EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
127
+ > IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
128
+ > USE OR OTHER DEALINGS IN THE SOFTWARE.
129
+
130
+ ## PDFium, CCITT fax decoding
131
+
132
+ `dist/index.js` carries a port of the fax (CCITT G3 / G4) decoder of PDFium, in TypeScript:
133
+ `src/extractor/codecs/ccitt-fax.ts` and its run-length code tables `ccitt-run-tables.ts`, ported
134
+ line for line from PDFium's `core/fxcodec/fax/faxmodule.cpp` (the decoding half). The original
135
+ notice, in each file:
136
+
137
+ > Copyright 2014 The PDFium Authors. Use of this source code is governed by a BSD-style license
138
+ > that can be found in the LICENSE file. Original code copyright 2014 Foxit Software Inc.
139
+
140
+ The licence text is PDFium's own (BSD 3-Clause, Google Inc. and the PDFium Authors), reproduced whole:
141
+
142
+ ```
143
+ // Copyright 2014 The PDFium Authors
144
+ //
145
+ // Redistribution and use in source and binary forms, with or without
146
+ // modification, are permitted provided that the following conditions are
147
+ // met:
148
+ //
149
+ // * Redistributions of source code must retain the above copyright
150
+ // notice, this list of conditions and the following disclaimer.
151
+ // * Redistributions in binary form must reproduce the above
152
+ // copyright notice, this list of conditions and the following disclaimer
153
+ // in the documentation and/or other materials provided with the
154
+ // distribution.
155
+ // * Neither the name of Google Inc. nor the names of its
156
+ // contributors may be used to endorse or promote products derived from
157
+ // this software without specific prior written permission.
158
+ //
159
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
160
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
161
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
162
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
163
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
164
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
165
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
166
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
167
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
168
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
169
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
170
+ ```
171
+
172
+ ## JPEG decoder (jpeg-js 0.4.4), vendored
173
+
174
+ `dist/index.js` carries the decoder of jpeg-js 0.4.4, kept as published in
175
+ `src/extractor/codecs/vendor/jpeg-js-decoder.cjs`. **Changed file, as the Apache licence asks to say:**
176
+ one function is added at its end (`decodeRaw`: the components before colour conversion), marked as
177
+ added in the file. The decoding code is jpgjs, copyright 2011 notmasteryet, under the Apache License 2.0
178
+ (its notice is in the file; the licence text is at the end of this document). The jpeg-js package is
179
+ under the BSD 3-Clause licence below.
180
+
181
+ ```
182
+ Copyright (c) 2014, Eugene Ware
183
+ All rights reserved.
184
+
185
+ Redistribution and use in source and binary forms, with or without
186
+ modification, are permitted provided that the following conditions are met:
187
+
188
+ 1. Redistributions of source code must retain the above copyright
189
+ notice, this list of conditions and the following disclaimer.
190
+ 2. Redistributions in binary form must reproduce the above copyright
191
+ notice, this list of conditions and the following disclaimer in the
192
+ documentation and/or other materials provided with the distribution.
193
+ 3. Neither the name of Eugene Ware nor the names of its contributors
194
+ may be used to endorse or promote products derived from this software
195
+ without specific prior written permission.
196
+
197
+ THIS SOFTWARE IS PROVIDED BY EUGENE WARE ''AS IS'' AND ANY
198
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
199
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
200
+ DISCLAIMED. IN NO EVENT SHALL EUGENE WARE BE LIABLE FOR ANY
201
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
202
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
203
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
204
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
205
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
206
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
207
+ ```
208
+
209
+ ## pdf.js: DeviceCMYK conversion and Symbol table
210
+
211
+ `dist/index.js` carries the polynomial that turns DeviceCMYK into RGB (`src/extractor/pdf-colour-ours.ts`,
212
+ `cmykBytes`), whose coefficients are those of pdf.js (`src/core/colorspace.js`), and the Symbol code →
213
+ Unicode table of the base (`doc-ir`), generated once from the tables of pdf.js. pdf.js is under the Apache
214
+ License 2.0 (text at the end of this document). Its notice:
215
+
216
+ > Copyright 2012 Mozilla Foundation
217
+ >
218
+ > Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
219
+ > compliance with the License. You may obtain a copy of the License at
220
+ >
221
+ > http://www.apache.org/licenses/LICENSE-2.0
222
+ >
223
+ > Unless required by applicable law or agreed to in writing, software distributed under the License is
224
+ > distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
225
+ > See the License for the specific language governing permissions and limitations under the License.
226
+
227
+ ## Dependencies, not redistributed
228
+
229
+ This one is **not** in the bundle; a consumer installs it and its licence applies to their own copy:
230
+ `@cantoo/pdf-lib` (MIT).
231
+
232
+ ## Test documents
233
+
234
+ The test documents of the repository are not part of the package and are not under the MIT licence. Each
235
+ keeps its own licence, written in the `SOURCES.md` of its folder (`fixtures/**/SOURCES.md`).
236
+
237
+ ## Apache License 2.0 (text)
238
+
239
+ ```
240
+ Apache License
241
+ Version 2.0, January 2004
242
+ http://www.apache.org/licenses/
243
+
244
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
245
+
246
+ 1. Definitions.
247
+
248
+ "License" shall mean the terms and conditions for use, reproduction,
249
+ and distribution as defined by Sections 1 through 9 of this document.
250
+
251
+ "Licensor" shall mean the copyright owner or entity authorized by
252
+ the copyright owner that is granting the License.
253
+
254
+ "Legal Entity" shall mean the union of the acting entity and all
255
+ other entities that control, are controlled by, or are under common
256
+ control with that entity. For the purposes of this definition,
257
+ "control" means (i) the power, direct or indirect, to cause the
258
+ direction or management of such entity, whether by contract or
259
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
260
+ outstanding shares, or (iii) beneficial ownership of such entity.
261
+
262
+ "You" (or "Your") shall mean an individual or Legal Entity
263
+ exercising permissions granted by this License.
264
+
265
+ "Source" form shall mean the preferred form for making modifications,
266
+ including but not limited to software source code, documentation
267
+ source, and configuration files.
268
+
269
+ "Object" form shall mean any form resulting from mechanical
270
+ transformation or translation of a Source form, including but
271
+ not limited to compiled object code, generated documentation,
272
+ and conversions to other media types.
273
+
274
+ "Work" shall mean the work of authorship, whether in Source or
275
+ Object form, made available under the License, as indicated by a
276
+ copyright notice that is included in or attached to the work
277
+ (an example is provided in the Appendix below).
278
+
279
+ "Derivative Works" shall mean any work, whether in Source or Object
280
+ form, that is based on (or derived from) the Work and for which the
281
+ editorial revisions, annotations, elaborations, or other modifications
282
+ represent, as a whole, an original work of authorship. For the purposes
283
+ of this License, Derivative Works shall not include works that remain
284
+ separable from, or merely link (or bind by name) to the interfaces of,
285
+ the Work and Derivative Works thereof.
286
+
287
+ "Contribution" shall mean any work of authorship, including
288
+ the original version of the Work and any modifications or additions
289
+ to that Work or Derivative Works thereof, that is intentionally
290
+ submitted to Licensor for inclusion in the Work by the copyright owner
291
+ or by an individual or Legal Entity authorized to submit on behalf of
292
+ the copyright owner. For the purposes of this definition, "submitted"
293
+ means any form of electronic, verbal, or written communication sent
294
+ to the Licensor or its representatives, including but not limited to
295
+ communication on electronic mailing lists, source code control systems,
296
+ and issue tracking systems that are managed by, or on behalf of, the
297
+ Licensor for the purpose of discussing and improving the Work, but
298
+ excluding communication that is conspicuously marked or otherwise
299
+ designated in writing by the copyright owner as "Not a Contribution."
300
+
301
+ "Contributor" shall mean Licensor and any individual or Legal Entity
302
+ on behalf of whom a Contribution has been received by Licensor and
303
+ subsequently incorporated within the Work.
304
+
305
+ 2. Grant of Copyright License. Subject to the terms and conditions of
306
+ this License, each Contributor hereby grants to You a perpetual,
307
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
308
+ copyright license to reproduce, prepare Derivative Works of,
309
+ publicly display, publicly perform, sublicense, and distribute the
310
+ Work and such Derivative Works in Source or Object form.
311
+
312
+ 3. Grant of Patent License. Subject to the terms and conditions of
313
+ this License, each Contributor hereby grants to You a perpetual,
314
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
315
+ (except as stated in this section) patent license to make, have made,
316
+ use, offer to sell, sell, import, and otherwise transfer the Work,
317
+ where such license applies only to those patent claims licensable
318
+ by such Contributor that are necessarily infringed by their
319
+ Contribution(s) alone or by combination of their Contribution(s)
320
+ with the Work to which such Contribution(s) was submitted. If You
321
+ institute patent litigation against any entity (including a
322
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
323
+ or a Contribution incorporated within the Work constitutes direct
324
+ or contributory patent infringement, then any patent licenses
325
+ granted to You under this License for that Work shall terminate
326
+ as of the date such litigation is filed.
327
+
328
+ 4. Redistribution. You may reproduce and distribute copies of the
329
+ Work or Derivative Works thereof in any medium, with or without
330
+ modifications, and in Source or Object form, provided that You
331
+ meet the following conditions:
332
+
333
+ (a) You must give any other recipients of the Work or
334
+ Derivative Works a copy of this License; and
335
+
336
+ (b) You must cause any modified files to carry prominent notices
337
+ stating that You changed the files; and
338
+
339
+ (c) You must retain, in the Source form of any Derivative Works
340
+ that You distribute, all copyright, patent, trademark, and
341
+ attribution notices from the Source form of the Work,
342
+ excluding those notices that do not pertain to any part of
343
+ the Derivative Works; and
344
+
345
+ (d) If the Work includes a "NOTICE" text file as part of its
346
+ distribution, then any Derivative Works that You distribute must
347
+ include a readable copy of the attribution notices contained
348
+ within such NOTICE file, excluding those notices that do not
349
+ pertain to any part of the Derivative Works, in at least one
350
+ of the following places: within a NOTICE text file distributed
351
+ as part of the Derivative Works; within the Source form or
352
+ documentation, if provided along with the Derivative Works; or,
353
+ within a display generated by the Derivative Works, if and
354
+ wherever such third-party notices normally appear. The contents
355
+ of the NOTICE file are for informational purposes only and
356
+ do not modify the License. You may add Your own attribution
357
+ notices within Derivative Works that You distribute, alongside
358
+ or as an addendum to the NOTICE text from the Work, provided
359
+ that such additional attribution notices cannot be construed
360
+ as modifying the License.
361
+
362
+ You may add Your own copyright statement to Your modifications and
363
+ may provide additional or different license terms and conditions
364
+ for use, reproduction, or distribution of Your modifications, or
365
+ for any such Derivative Works as a whole, provided Your use,
366
+ reproduction, and distribution of the Work otherwise complies with
367
+ the conditions stated in this License.
368
+
369
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
370
+ any Contribution intentionally submitted for inclusion in the Work
371
+ by You to the Licensor shall be under the terms and conditions of
372
+ this License, without any additional terms or conditions.
373
+ Notwithstanding the above, nothing herein shall supersede or modify
374
+ the terms of any separate license agreement you may have executed
375
+ with Licensor regarding such Contributions.
376
+
377
+ 6. Trademarks. This License does not grant permission to use the trade
378
+ names, trademarks, service marks, or product names of the Licensor,
379
+ except as required for reasonable and customary use in describing the
380
+ origin of the Work and reproducing the content of the NOTICE file.
381
+
382
+ 7. Disclaimer of Warranty. Unless required by applicable law or
383
+ agreed to in writing, Licensor provides the Work (and each
384
+ Contributor provides its Contributions) on an "AS IS" BASIS,
385
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
386
+ implied, including, without limitation, any warranties or conditions
387
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
388
+ PARTICULAR PURPOSE. You are solely responsible for determining the
389
+ appropriateness of using or redistributing the Work and assume any
390
+ risks associated with Your exercise of permissions under this License.
391
+
392
+ 8. Limitation of Liability. In no event and under no legal theory,
393
+ whether in tort (including negligence), contract, or otherwise,
394
+ unless required by applicable law (such as deliberate and grossly
395
+ negligent acts) or agreed to in writing, shall any Contributor be
396
+ liable to You for damages, including any direct, indirect, special,
397
+ incidental, or consequential damages of any character arising as a
398
+ result of this License or out of the use or inability to use the
399
+ Work (including but not limited to damages for loss of goodwill,
400
+ work stoppage, computer failure or malfunction, or any and all
401
+ other commercial damages or losses), even if such Contributor
402
+ has been advised of the possibility of such damages.
403
+
404
+ 9. Accepting Warranty or Additional Liability. While redistributing
405
+ the Work or Derivative Works thereof, You may choose to offer,
406
+ and charge a fee for, acceptance of support, warranty, indemnity,
407
+ or other liability obligations and/or rights consistent with this
408
+ License. However, in accepting such obligations, You may act only
409
+ on Your own behalf and on Your sole responsibility, not on behalf
410
+ of any other Contributor, and only if You agree to indemnify,
411
+ defend, and hold each Contributor harmless for any liability
412
+ incurred by, or claims asserted against, such Contributor by reason
413
+ of your accepting any such warranty or additional liability.
414
+
415
+ END OF TERMS AND CONDITIONS
416
+
417
+ APPENDIX: How to apply the Apache License to your work.
418
+
419
+ To apply the Apache License to your work, attach the following
420
+ boilerplate notice, with the fields enclosed by brackets "[]"
421
+ replaced with your own identifying information. (Don't include
422
+ the brackets!) The text should be enclosed in the appropriate
423
+ comment syntax for the file format. We also recommend that a
424
+ file or class name and description of purpose be included on the
425
+ same "printed page" as the copyright notice for easier
426
+ identification within third-party archives.
427
+
428
+ Copyright [yyyy] [name of copyright owner]
429
+
430
+ Licensed under the Apache License, Version 2.0 (the "License");
431
+ you may not use this file except in compliance with the License.
432
+ You may obtain a copy of the License at
433
+
434
+ http://www.apache.org/licenses/LICENSE-2.0
435
+
436
+ Unless required by applicable law or agreed to in writing, software
437
+ distributed under the License is distributed on an "AS IS" BASIS,
438
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
439
+ See the License for the specific language governing permissions and
440
+ limitations under the License.
441
+ ```