@syncfusion/ej2-pdf 1.0.23 → 23.1.38

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 (518) hide show
  1. package/.eslintrc.json +260 -0
  2. package/.gitleaksignore +1 -0
  3. package/CHANGELOG.md +28 -0
  4. package/README.md +17 -0
  5. package/dist/ej2-pdf.umd.min.js +4 -14
  6. package/dist/ej2-pdf.umd.min.js.map +1 -11
  7. package/dist/es6/ej2-pdf.es2015.js +48372 -0
  8. package/dist/es6/ej2-pdf.es2015.js.map +1 -0
  9. package/dist/es6/ej2-pdf.es5.js +50250 -0
  10. package/dist/es6/ej2-pdf.es5.js.map +1 -0
  11. package/dist/global/ej2-pdf.min.js +11 -0
  12. package/dist/global/ej2-pdf.min.js.map +1 -0
  13. package/dist/global/index.d.ts +14 -0
  14. package/index.js +4 -8
  15. package/license +10 -3
  16. package/package.json +58 -16
  17. package/pdf.d.ts +4 -0
  18. package/pdf.js +4 -0
  19. package/src/global.js +1 -0
  20. package/src/index.d.ts +45 -98
  21. package/src/index.js +45 -96
  22. package/src/pdf/core/annotations/annotation-collection.d.ts +289 -0
  23. package/src/pdf/core/annotations/annotation-collection.js +755 -0
  24. package/src/pdf/core/annotations/annotation.d.ts +5865 -0
  25. package/src/pdf/core/annotations/annotation.js +14195 -0
  26. package/src/pdf/core/annotations/index.d.ts +4 -0
  27. package/src/pdf/core/annotations/index.js +4 -0
  28. package/src/pdf/core/annotations/pdf-appearance.d.ts +102 -0
  29. package/src/pdf/core/annotations/pdf-appearance.js +124 -0
  30. package/src/pdf/core/annotations/pdf-paddings.d.ts +8 -0
  31. package/src/pdf/core/annotations/pdf-paddings.js +22 -0
  32. package/src/pdf/core/base-stream.d.ts +86 -0
  33. package/src/pdf/core/base-stream.js +332 -0
  34. package/src/pdf/core/content-parser.d.ts +38 -0
  35. package/src/pdf/core/content-parser.js +359 -0
  36. package/src/pdf/core/decode-stream.d.ts +21 -0
  37. package/src/pdf/core/decode-stream.js +120 -0
  38. package/src/pdf/core/decrypt-stream.d.ts +11 -0
  39. package/src/pdf/core/decrypt-stream.js +53 -0
  40. package/src/pdf/core/enumerator.d.ts +1668 -0
  41. package/src/pdf/core/enumerator.js +1717 -0
  42. package/src/pdf/core/flate-stream.d.ts +13 -0
  43. package/src/pdf/core/flate-stream.js +329 -0
  44. package/src/pdf/core/fonts/index.d.ts +7 -0
  45. package/{dist/es6/implementation/graphics → src/pdf/core}/fonts/index.js +3 -4
  46. package/src/pdf/core/fonts/pdf-font-metrics.d.ts +66 -0
  47. package/src/pdf/core/fonts/pdf-font-metrics.js +192 -0
  48. package/src/pdf/core/fonts/pdf-standard-font.d.ts +1023 -0
  49. package/src/pdf/core/fonts/pdf-standard-font.js +1682 -0
  50. package/src/pdf/core/fonts/pdf-string-format.d.ts +236 -0
  51. package/src/pdf/core/fonts/pdf-string-format.js +213 -0
  52. package/src/pdf/core/fonts/string-layouter.d.ts +68 -0
  53. package/src/pdf/core/fonts/string-layouter.js +437 -0
  54. package/src/pdf/core/fonts/ttf-reader.d.ts +167 -0
  55. package/src/pdf/core/fonts/ttf-reader.js +1150 -0
  56. package/src/pdf/core/fonts/ttf-table.d.ts +132 -0
  57. package/src/pdf/core/fonts/ttf-table.js +74 -0
  58. package/src/pdf/core/fonts/unicode-true-type-font.d.ts +50 -0
  59. package/src/pdf/core/fonts/unicode-true-type-font.js +289 -0
  60. package/src/pdf/core/form/field.d.ts +3011 -0
  61. package/src/pdf/core/form/field.js +6828 -0
  62. package/src/pdf/core/form/form.d.ts +279 -0
  63. package/src/pdf/core/form/form.js +782 -0
  64. package/src/pdf/core/form/index.d.ts +2 -0
  65. package/src/pdf/core/form/index.js +2 -0
  66. package/src/pdf/core/graphics/images/image-decoder.d.ts +38 -0
  67. package/src/pdf/core/graphics/images/image-decoder.js +227 -0
  68. package/src/{implementation → pdf/core}/graphics/images/index.d.ts +0 -5
  69. package/{dist/es6/implementation → src/pdf/core}/graphics/images/index.js +0 -1
  70. package/src/pdf/core/graphics/images/pdf-bitmap.d.ts +73 -0
  71. package/src/pdf/core/graphics/images/pdf-bitmap.js +68 -0
  72. package/src/pdf/core/graphics/images/pdf-image.d.ts +201 -0
  73. package/src/pdf/core/graphics/images/pdf-image.js +201 -0
  74. package/src/pdf/core/graphics/index.d.ts +10 -0
  75. package/src/pdf/core/graphics/index.js +10 -0
  76. package/src/pdf/core/graphics/pdf-graphics.d.ts +956 -0
  77. package/src/pdf/core/graphics/pdf-graphics.js +1860 -0
  78. package/src/pdf/core/graphics/pdf-path.d.ts +34 -0
  79. package/src/pdf/core/graphics/pdf-path.js +177 -0
  80. package/src/pdf/core/graphics/pdf-stream-writer.d.ts +56 -0
  81. package/src/pdf/core/graphics/pdf-stream-writer.js +231 -0
  82. package/src/pdf/core/graphics/pdf-template.d.ts +79 -0
  83. package/src/pdf/core/graphics/pdf-template.js +100 -0
  84. package/src/pdf/core/graphics/rightToLeft/bidirectional.d.ts +69 -0
  85. package/src/pdf/core/graphics/rightToLeft/bidirectional.js +831 -0
  86. package/src/pdf/core/graphics/rightToLeft/index.d.ts +3 -0
  87. package/src/pdf/core/graphics/rightToLeft/index.js +3 -0
  88. package/src/pdf/core/graphics/rightToLeft/text-renderer.d.ts +13 -0
  89. package/src/pdf/core/graphics/rightToLeft/text-renderer.js +116 -0
  90. package/src/pdf/core/graphics/rightToLeft/text-shape.d.ts +48 -0
  91. package/src/pdf/core/graphics/rightToLeft/text-shape.js +289 -0
  92. package/src/pdf/core/import-export/fdf-document.d.ts +37 -0
  93. package/src/pdf/core/import-export/fdf-document.js +667 -0
  94. package/src/pdf/core/import-export/index.d.ts +5 -0
  95. package/src/pdf/core/import-export/index.js +5 -0
  96. package/src/pdf/core/import-export/json-document.d.ts +47 -0
  97. package/src/pdf/core/import-export/json-document.js +1547 -0
  98. package/src/pdf/core/import-export/xfdf-document.d.ts +146 -0
  99. package/src/pdf/core/import-export/xfdf-document.js +2920 -0
  100. package/src/pdf/core/import-export/xml-document.d.ts +14 -0
  101. package/src/pdf/core/import-export/xml-document.js +166 -0
  102. package/src/pdf/core/import-export/xml-writer.d.ts +69 -0
  103. package/src/pdf/core/import-export/xml-writer.js +494 -0
  104. package/src/pdf/core/pdf-catalog.d.ts +18 -0
  105. package/src/pdf/core/pdf-catalog.js +166 -0
  106. package/src/pdf/core/pdf-cross-reference.d.ts +80 -0
  107. package/src/pdf/core/pdf-cross-reference.js +1049 -0
  108. package/src/pdf/core/pdf-document.d.ts +821 -0
  109. package/src/pdf/core/pdf-document.js +1022 -0
  110. package/src/pdf/core/pdf-file-structure.d.ts +54 -0
  111. package/src/pdf/core/pdf-file-structure.js +65 -0
  112. package/src/pdf/core/pdf-outline.d.ts +362 -0
  113. package/src/pdf/core/pdf-outline.js +860 -0
  114. package/src/pdf/core/pdf-page.d.ts +589 -0
  115. package/src/pdf/core/pdf-page.js +1049 -0
  116. package/src/pdf/core/pdf-parser.d.ts +62 -0
  117. package/src/pdf/core/pdf-parser.js +1035 -0
  118. package/src/pdf/core/pdf-primitives.d.ts +87 -0
  119. package/src/pdf/core/pdf-primitives.js +305 -0
  120. package/src/pdf/core/predictor-stream.d.ts +15 -0
  121. package/src/pdf/core/predictor-stream.js +214 -0
  122. package/src/pdf/core/security/encryptor.d.ts +140 -0
  123. package/src/pdf/core/security/encryptor.js +1616 -0
  124. package/src/pdf/core/security/index.d.ts +1 -0
  125. package/src/pdf/core/security/index.js +1 -0
  126. package/src/pdf/core/utils.d.ts +686 -0
  127. package/src/pdf/core/utils.js +3625 -0
  128. package/src/pdf/index.d.ts +44 -0
  129. package/src/pdf/index.js +44 -0
  130. package/tslint.json +111 -0
  131. package/ReadMe.md +0 -13
  132. package/dist/es6/implementation/actions/action.js +0 -44
  133. package/dist/es6/implementation/actions/index.js +0 -2
  134. package/dist/es6/implementation/actions/uri-action.js +0 -38
  135. package/dist/es6/implementation/annotations/action-link-annotation.js +0 -29
  136. package/dist/es6/implementation/annotations/annotation-collection.js +0 -93
  137. package/dist/es6/implementation/annotations/annotation.js +0 -156
  138. package/dist/es6/implementation/annotations/document-link-annotation.js +0 -48
  139. package/dist/es6/implementation/annotations/index.js +0 -7
  140. package/dist/es6/implementation/annotations/link-annotation.js +0 -31
  141. package/dist/es6/implementation/annotations/pdf-text-web-link.js +0 -178
  142. package/dist/es6/implementation/annotations/uri-annotation.js +0 -64
  143. package/dist/es6/implementation/collections/dictionary.js +0 -71
  144. package/dist/es6/implementation/collections/index.js +0 -3
  145. package/dist/es6/implementation/collections/object-object-pair/dictionary.js +0 -84
  146. package/dist/es6/implementation/collections/object-object-pair/index.js +0 -1
  147. package/dist/es6/implementation/collections/utils.js +0 -8
  148. package/dist/es6/implementation/document/automatic-fields/automatic-field-info-collection.js +0 -17
  149. package/dist/es6/implementation/document/automatic-fields/automatic-field-info.js +0 -68
  150. package/dist/es6/implementation/document/automatic-fields/automatic-field.js +0 -145
  151. package/dist/es6/implementation/document/automatic-fields/composite-field.js +0 -61
  152. package/dist/es6/implementation/document/automatic-fields/index.js +0 -7
  153. package/dist/es6/implementation/document/automatic-fields/multiple-value-field.js +0 -36
  154. package/dist/es6/implementation/document/automatic-fields/page-count-field.js +0 -53
  155. package/dist/es6/implementation/document/automatic-fields/pdf-numbers-convertor.js +0 -91
  156. package/dist/es6/implementation/document/automatic-fields/pdf-page-number-field.js +0 -56
  157. package/dist/es6/implementation/document/automatic-fields/pdf-template-value-pair.js +0 -34
  158. package/dist/es6/implementation/document/automatic-fields/single-value-field.js +0 -47
  159. package/dist/es6/implementation/document/index.js +0 -11
  160. package/dist/es6/implementation/document/pdf-catalog.js +0 -38
  161. package/dist/es6/implementation/document/pdf-document-base.js +0 -71
  162. package/dist/es6/implementation/document/pdf-document-template.js +0 -204
  163. package/dist/es6/implementation/document/pdf-document.js +0 -175
  164. package/dist/es6/implementation/drawing/index.js +0 -1
  165. package/dist/es6/implementation/drawing/pdf-drawing.js +0 -80
  166. package/dist/es6/implementation/general/enum.js +0 -6
  167. package/dist/es6/implementation/general/index.js +0 -3
  168. package/dist/es6/implementation/general/pdf-cache-collection.js +0 -24
  169. package/dist/es6/implementation/general/pdf-collection.js +0 -26
  170. package/dist/es6/implementation/general/pdf-destination.js +0 -107
  171. package/dist/es6/implementation/graphics/brushes/index.js +0 -2
  172. package/dist/es6/implementation/graphics/brushes/pdf-brush.js +0 -6
  173. package/dist/es6/implementation/graphics/brushes/pdf-solid-brush.js +0 -53
  174. package/dist/es6/implementation/graphics/constants.js +0 -11
  175. package/dist/es6/implementation/graphics/enum.js +0 -100
  176. package/dist/es6/implementation/graphics/figures/base/element-layouter.js +0 -154
  177. package/dist/es6/implementation/graphics/figures/base/graphics-element.js +0 -18
  178. package/dist/es6/implementation/graphics/figures/base/index.js +0 -3
  179. package/dist/es6/implementation/graphics/figures/base/pdf-shape-element.js +0 -32
  180. package/dist/es6/implementation/graphics/figures/base/shape-layouter.js +0 -55
  181. package/dist/es6/implementation/graphics/figures/base/text-layouter.js +0 -123
  182. package/dist/es6/implementation/graphics/figures/enum.js +0 -11
  183. package/dist/es6/implementation/graphics/figures/index.js +0 -5
  184. package/dist/es6/implementation/graphics/figures/layout-element.js +0 -41
  185. package/dist/es6/implementation/graphics/figures/pdf-template.js +0 -110
  186. package/dist/es6/implementation/graphics/figures/text-element.js +0 -298
  187. package/dist/es6/implementation/graphics/fonts/enum.js +0 -45
  188. package/dist/es6/implementation/graphics/fonts/pdf-font-metrics.js +0 -122
  189. package/dist/es6/implementation/graphics/fonts/pdf-font.js +0 -159
  190. package/dist/es6/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js +0 -357
  191. package/dist/es6/implementation/graphics/fonts/pdf-standard-font.js +0 -124
  192. package/dist/es6/implementation/graphics/fonts/pdf-string-format.js +0 -239
  193. package/dist/es6/implementation/graphics/fonts/string-layouter.js +0 -335
  194. package/dist/es6/implementation/graphics/fonts/string-tokenizer.js +0 -162
  195. package/dist/es6/implementation/graphics/images/byte-array.js +0 -82
  196. package/dist/es6/implementation/graphics/images/image-decoder.js +0 -167
  197. package/dist/es6/implementation/graphics/images/pdf-bitmap.js +0 -41
  198. package/dist/es6/implementation/graphics/images/pdf-image.js +0 -68
  199. package/dist/es6/implementation/graphics/index.js +0 -20
  200. package/dist/es6/implementation/graphics/pdf-color.js +0 -205
  201. package/dist/es6/implementation/graphics/pdf-graphics.js +0 -1034
  202. package/dist/es6/implementation/graphics/pdf-margins.js +0 -75
  203. package/dist/es6/implementation/graphics/pdf-pen.js +0 -180
  204. package/dist/es6/implementation/graphics/pdf-resources.js +0 -223
  205. package/dist/es6/implementation/graphics/pdf-transformation-matrix.js +0 -134
  206. package/dist/es6/implementation/graphics/pdf-transparency.js +0 -22
  207. package/dist/es6/implementation/graphics/unit-convertor.js +0 -33
  208. package/dist/es6/implementation/index.js +0 -85
  209. package/dist/es6/implementation/input-output/cross-table.js +0 -6
  210. package/dist/es6/implementation/input-output/enum.js +0 -5
  211. package/dist/es6/implementation/input-output/index.js +0 -8
  212. package/dist/es6/implementation/input-output/pdf-cross-table.js +0 -346
  213. package/dist/es6/implementation/input-output/pdf-dictionary-properties.js +0 -60
  214. package/dist/es6/implementation/input-output/pdf-main-object-collection.js +0 -115
  215. package/dist/es6/implementation/input-output/pdf-operators.js +0 -75
  216. package/dist/es6/implementation/input-output/pdf-stream-writer.js +0 -364
  217. package/dist/es6/implementation/input-output/pdf-writer.js +0 -44
  218. package/dist/es6/implementation/pages/enum.js +0 -51
  219. package/dist/es6/implementation/pages/index.js +0 -13
  220. package/dist/es6/implementation/pages/page-added-event-arguments.js +0 -19
  221. package/dist/es6/implementation/pages/pdf-document-page-collection.js +0 -120
  222. package/dist/es6/implementation/pages/pdf-page-base.js +0 -104
  223. package/dist/es6/implementation/pages/pdf-page-layer-collection.js +0 -115
  224. package/dist/es6/implementation/pages/pdf-page-layer.js +0 -160
  225. package/dist/es6/implementation/pages/pdf-page-settings.js +0 -126
  226. package/dist/es6/implementation/pages/pdf-page-size.js +0 -36
  227. package/dist/es6/implementation/pages/pdf-page-template-element.js +0 -510
  228. package/dist/es6/implementation/pages/pdf-page.js +0 -130
  229. package/dist/es6/implementation/pages/pdf-section-collection.js +0 -95
  230. package/dist/es6/implementation/pages/pdf-section-page-collection.js +0 -30
  231. package/dist/es6/implementation/pages/pdf-section-templates.js +0 -71
  232. package/dist/es6/implementation/pages/pdf-section.js +0 -388
  233. package/dist/es6/implementation/primitives/index.js +0 -8
  234. package/dist/es6/implementation/primitives/pdf-array.js +0 -199
  235. package/dist/es6/implementation/primitives/pdf-boolean.js +0 -66
  236. package/dist/es6/implementation/primitives/pdf-dictionary.js +0 -220
  237. package/dist/es6/implementation/primitives/pdf-name.js +0 -102
  238. package/dist/es6/implementation/primitives/pdf-number.js +0 -94
  239. package/dist/es6/implementation/primitives/pdf-reference.js +0 -195
  240. package/dist/es6/implementation/primitives/pdf-stream.js +0 -149
  241. package/dist/es6/implementation/primitives/pdf-string.js +0 -143
  242. package/dist/es6/implementation/structured-elements/grid/index.js +0 -1
  243. package/dist/es6/implementation/structured-elements/grid/pdf-grid-cell.js +0 -512
  244. package/dist/es6/implementation/structured-elements/grid/pdf-grid-column.js +0 -125
  245. package/dist/es6/implementation/structured-elements/grid/pdf-grid-row.js +0 -244
  246. package/dist/es6/implementation/structured-elements/grid/pdf-grid.js +0 -989
  247. package/dist/es6/implementation/structured-elements/grid/styles/index.js +0 -2
  248. package/dist/es6/implementation/structured-elements/grid/styles/pdf-borders.js +0 -145
  249. package/dist/es6/implementation/structured-elements/grid/styles/style.js +0 -267
  250. package/dist/es6/implementation/structured-elements/index.js +0 -1
  251. package/dist/es6/implementation/structured-elements/tables/light-tables/enum.js +0 -5
  252. package/dist/es6/index.js +0 -89
  253. package/dist/es6/interfaces/i-pdf-cache.js +0 -1
  254. package/dist/es6/interfaces/i-pdf-changable.js +0 -1
  255. package/dist/es6/interfaces/i-pdf-primitives.js +0 -1
  256. package/dist/es6/interfaces/i-pdf-wrapper.js +0 -1
  257. package/dist/es6/interfaces/i-pdf-writer.js +0 -1
  258. package/dist/es6/interfaces/index.js +0 -1
  259. package/dist/global/ej2-pdf-export.js +0 -15979
  260. package/implementation.d.ts +0 -4
  261. package/implementation.js +0 -8
  262. package/interfaces.d.ts +0 -4
  263. package/interfaces.js +0 -4
  264. package/src/implementation/actions/action.d.ts +0 -50
  265. package/src/implementation/actions/action.js +0 -44
  266. package/src/implementation/actions/index.d.ts +0 -6
  267. package/src/implementation/actions/index.js +0 -9
  268. package/src/implementation/actions/uri-action.d.ts +0 -33
  269. package/src/implementation/actions/uri-action.js +0 -39
  270. package/src/implementation/annotations/action-link-annotation.d.ts +0 -30
  271. package/src/implementation/annotations/action-link-annotation.js +0 -32
  272. package/src/implementation/annotations/annotation-collection.d.ts +0 -77
  273. package/src/implementation/annotations/annotation-collection.js +0 -91
  274. package/src/implementation/annotations/annotation.d.ts +0 -152
  275. package/src/implementation/annotations/annotation.js +0 -146
  276. package/src/implementation/annotations/document-link-annotation.d.ts +0 -89
  277. package/src/implementation/annotations/document-link-annotation.js +0 -51
  278. package/src/implementation/annotations/index.d.ts +0 -11
  279. package/src/implementation/annotations/index.js +0 -14
  280. package/src/implementation/annotations/link-annotation.d.ts +0 -23
  281. package/src/implementation/annotations/link-annotation.js +0 -33
  282. package/src/implementation/annotations/pdf-text-web-link.d.ts +0 -118
  283. package/src/implementation/annotations/pdf-text-web-link.js +0 -173
  284. package/src/implementation/annotations/uri-annotation.d.ts +0 -48
  285. package/src/implementation/annotations/uri-annotation.js +0 -65
  286. package/src/implementation/collections/dictionary.d.ts +0 -76
  287. package/src/implementation/collections/dictionary.js +0 -74
  288. package/src/implementation/collections/index.d.ts +0 -7
  289. package/src/implementation/collections/index.js +0 -10
  290. package/src/implementation/collections/object-object-pair/dictionary.d.ts +0 -62
  291. package/src/implementation/collections/object-object-pair/dictionary.js +0 -88
  292. package/src/implementation/collections/object-object-pair/index.d.ts +0 -5
  293. package/src/implementation/collections/object-object-pair/index.js +0 -8
  294. package/src/implementation/collections/utils.d.ts +0 -27
  295. package/src/implementation/collections/utils.js +0 -13
  296. package/src/implementation/document/automatic-fields/automatic-field-info-collection.d.ts +0 -31
  297. package/src/implementation/document/automatic-fields/automatic-field-info-collection.js +0 -21
  298. package/src/implementation/document/automatic-fields/automatic-field-info.d.ts +0 -67
  299. package/src/implementation/document/automatic-fields/automatic-field-info.js +0 -70
  300. package/src/implementation/document/automatic-fields/automatic-field.d.ts +0 -41
  301. package/src/implementation/document/automatic-fields/automatic-field.js +0 -143
  302. package/src/implementation/document/automatic-fields/composite-field.d.ts +0 -46
  303. package/src/implementation/document/automatic-fields/composite-field.js +0 -64
  304. package/src/implementation/document/automatic-fields/index.d.ts +0 -11
  305. package/src/implementation/document/automatic-fields/index.js +0 -14
  306. package/src/implementation/document/automatic-fields/multiple-value-field.d.ts +0 -18
  307. package/src/implementation/document/automatic-fields/multiple-value-field.js +0 -35
  308. package/src/implementation/document/automatic-fields/page-count-field.d.ts +0 -44
  309. package/src/implementation/document/automatic-fields/page-count-field.js +0 -53
  310. package/src/implementation/document/automatic-fields/pdf-numbers-convertor.d.ts +0 -53
  311. package/src/implementation/document/automatic-fields/pdf-numbers-convertor.js +0 -94
  312. package/src/implementation/document/automatic-fields/pdf-page-number-field.d.ts +0 -51
  313. package/src/implementation/document/automatic-fields/pdf-page-number-field.js +0 -56
  314. package/src/implementation/document/automatic-fields/pdf-template-value-pair.d.ts +0 -38
  315. package/src/implementation/document/automatic-fields/pdf-template-value-pair.js +0 -38
  316. package/src/implementation/document/automatic-fields/single-value-field.d.ts +0 -15
  317. package/src/implementation/document/automatic-fields/single-value-field.js +0 -46
  318. package/src/implementation/document/index.d.ts +0 -15
  319. package/src/implementation/document/index.js +0 -18
  320. package/src/implementation/document/pdf-catalog.d.ts +0 -32
  321. package/src/implementation/document/pdf-catalog.js +0 -38
  322. package/src/implementation/document/pdf-document-base.d.ts +0 -117
  323. package/src/implementation/document/pdf-document-base.js +0 -72
  324. package/src/implementation/document/pdf-document-template.d.ts +0 -166
  325. package/src/implementation/document/pdf-document-template.js +0 -207
  326. package/src/implementation/document/pdf-document.d.ts +0 -206
  327. package/src/implementation/document/pdf-document.js +0 -166
  328. package/src/implementation/drawing/index.d.ts +0 -5
  329. package/src/implementation/drawing/index.js +0 -8
  330. package/src/implementation/drawing/pdf-drawing.d.ts +0 -93
  331. package/src/implementation/drawing/pdf-drawing.js +0 -84
  332. package/src/implementation/general/enum.d.ts +0 -21
  333. package/src/implementation/general/enum.js +0 -10
  334. package/src/implementation/general/index.d.ts +0 -7
  335. package/src/implementation/general/index.js +0 -10
  336. package/src/implementation/general/pdf-cache-collection.d.ts +0 -33
  337. package/src/implementation/general/pdf-cache-collection.js +0 -27
  338. package/src/implementation/general/pdf-collection.d.ts +0 -26
  339. package/src/implementation/general/pdf-collection.js +0 -30
  340. package/src/implementation/general/pdf-destination.d.ts +0 -103
  341. package/src/implementation/general/pdf-destination.js +0 -103
  342. package/src/implementation/graphics/brushes/index.d.ts +0 -6
  343. package/src/implementation/graphics/brushes/index.js +0 -9
  344. package/src/implementation/graphics/brushes/pdf-brush.d.ts +0 -55
  345. package/src/implementation/graphics/brushes/pdf-brush.js +0 -10
  346. package/src/implementation/graphics/brushes/pdf-solid-brush.d.ts +0 -77
  347. package/src/implementation/graphics/brushes/pdf-solid-brush.js +0 -54
  348. package/src/implementation/graphics/constants.d.ts +0 -31
  349. package/src/implementation/graphics/constants.js +0 -15
  350. package/src/implementation/graphics/enum.d.ts +0 -392
  351. package/src/implementation/graphics/enum.js +0 -104
  352. package/src/implementation/graphics/figures/base/element-layouter.d.ts +0 -160
  353. package/src/implementation/graphics/figures/base/element-layouter.js +0 -156
  354. package/src/implementation/graphics/figures/base/graphics-element.d.ts +0 -16
  355. package/src/implementation/graphics/figures/base/graphics-element.js +0 -22
  356. package/src/implementation/graphics/figures/base/index.d.ts +0 -7
  357. package/src/implementation/graphics/figures/base/index.js +0 -10
  358. package/src/implementation/graphics/figures/base/pdf-shape-element.d.ts +0 -28
  359. package/src/implementation/graphics/figures/base/pdf-shape-element.js +0 -34
  360. package/src/implementation/graphics/figures/base/shape-layouter.d.ts +0 -80
  361. package/src/implementation/graphics/figures/base/shape-layouter.js +0 -57
  362. package/src/implementation/graphics/figures/base/text-layouter.d.ts +0 -107
  363. package/src/implementation/graphics/figures/base/text-layouter.js +0 -121
  364. package/src/implementation/graphics/figures/enum.d.ts +0 -37
  365. package/src/implementation/graphics/figures/enum.js +0 -15
  366. package/src/implementation/graphics/figures/index.d.ts +0 -9
  367. package/src/implementation/graphics/figures/index.js +0 -12
  368. package/src/implementation/graphics/figures/layout-element.d.ts +0 -57
  369. package/src/implementation/graphics/figures/layout-element.js +0 -43
  370. package/src/implementation/graphics/figures/pdf-template.d.ts +0 -113
  371. package/src/implementation/graphics/figures/pdf-template.js +0 -106
  372. package/src/implementation/graphics/figures/text-element.d.ts +0 -213
  373. package/src/implementation/graphics/figures/text-element.js +0 -289
  374. package/src/implementation/graphics/fonts/enum.d.ts +0 -179
  375. package/src/implementation/graphics/fonts/enum.js +0 -49
  376. package/src/implementation/graphics/fonts/index.d.ts +0 -12
  377. package/src/implementation/graphics/fonts/index.js +0 -15
  378. package/src/implementation/graphics/fonts/pdf-font-metrics.d.ts +0 -160
  379. package/src/implementation/graphics/fonts/pdf-font-metrics.js +0 -123
  380. package/src/implementation/graphics/fonts/pdf-font.d.ts +0 -187
  381. package/src/implementation/graphics/fonts/pdf-font.js +0 -158
  382. package/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.d.ts +0 -301
  383. package/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js +0 -359
  384. package/src/implementation/graphics/fonts/pdf-standard-font.d.ts +0 -143
  385. package/src/implementation/graphics/fonts/pdf-standard-font.js +0 -121
  386. package/src/implementation/graphics/fonts/pdf-string-format.d.ts +0 -319
  387. package/src/implementation/graphics/fonts/pdf-string-format.js +0 -241
  388. package/src/implementation/graphics/fonts/string-layouter.d.ts +0 -255
  389. package/src/implementation/graphics/fonts/string-layouter.js +0 -336
  390. package/src/implementation/graphics/fonts/string-tokenizer.d.ts +0 -107
  391. package/src/implementation/graphics/fonts/string-tokenizer.js +0 -166
  392. package/src/implementation/graphics/images/byte-array.d.ts +0 -68
  393. package/src/implementation/graphics/images/byte-array.js +0 -86
  394. package/src/implementation/graphics/images/image-decoder.d.ts +0 -227
  395. package/src/implementation/graphics/images/image-decoder.js +0 -164
  396. package/src/implementation/graphics/images/index.js +0 -11
  397. package/src/implementation/graphics/images/pdf-bitmap.d.ts +0 -90
  398. package/src/implementation/graphics/images/pdf-bitmap.js +0 -41
  399. package/src/implementation/graphics/images/pdf-image.d.ts +0 -88
  400. package/src/implementation/graphics/images/pdf-image.js +0 -69
  401. package/src/implementation/graphics/index.d.ts +0 -24
  402. package/src/implementation/graphics/index.js +0 -27
  403. package/src/implementation/graphics/pdf-color.d.ts +0 -170
  404. package/src/implementation/graphics/pdf-color.js +0 -204
  405. package/src/implementation/graphics/pdf-graphics.d.ts +0 -1085
  406. package/src/implementation/graphics/pdf-graphics.js +0 -1017
  407. package/src/implementation/graphics/pdf-margins.d.ts +0 -82
  408. package/src/implementation/graphics/pdf-margins.js +0 -79
  409. package/src/implementation/graphics/pdf-pen.d.ts +0 -237
  410. package/src/implementation/graphics/pdf-pen.js +0 -181
  411. package/src/implementation/graphics/pdf-resources.d.ts +0 -147
  412. package/src/implementation/graphics/pdf-resources.js +0 -215
  413. package/src/implementation/graphics/pdf-transformation-matrix.d.ts +0 -143
  414. package/src/implementation/graphics/pdf-transformation-matrix.js +0 -136
  415. package/src/implementation/graphics/pdf-transparency.d.ts +0 -34
  416. package/src/implementation/graphics/pdf-transparency.js +0 -22
  417. package/src/implementation/graphics/unit-convertor.d.ts +0 -72
  418. package/src/implementation/graphics/unit-convertor.js +0 -37
  419. package/src/implementation/index.d.ts +0 -89
  420. package/src/implementation/index.js +0 -92
  421. package/src/implementation/input-output/cross-table.d.ts +0 -21
  422. package/src/implementation/input-output/cross-table.js +0 -10
  423. package/src/implementation/input-output/enum.d.ts +0 -16
  424. package/src/implementation/input-output/enum.js +0 -9
  425. package/src/implementation/input-output/index.d.ts +0 -12
  426. package/src/implementation/input-output/index.js +0 -15
  427. package/src/implementation/input-output/pdf-cross-table.d.ts +0 -249
  428. package/src/implementation/input-output/pdf-cross-table.js +0 -340
  429. package/src/implementation/input-output/pdf-dictionary-properties.d.ts +0 -283
  430. package/src/implementation/input-output/pdf-dictionary-properties.js +0 -64
  431. package/src/implementation/input-output/pdf-main-object-collection.d.ts +0 -120
  432. package/src/implementation/input-output/pdf-main-object-collection.js +0 -117
  433. package/src/implementation/input-output/pdf-operators.d.ts +0 -352
  434. package/src/implementation/input-output/pdf-operators.js +0 -79
  435. package/src/implementation/input-output/pdf-stream-writer.d.ts +0 -314
  436. package/src/implementation/input-output/pdf-stream-writer.js +0 -363
  437. package/src/implementation/input-output/pdf-writer.d.ts +0 -68
  438. package/src/implementation/input-output/pdf-writer.js +0 -48
  439. package/src/implementation/pages/enum.d.ts +0 -201
  440. package/src/implementation/pages/enum.js +0 -55
  441. package/src/implementation/pages/index.d.ts +0 -17
  442. package/src/implementation/pages/index.js +0 -20
  443. package/src/implementation/pages/page-added-event-arguments.d.ts +0 -30
  444. package/src/implementation/pages/page-added-event-arguments.js +0 -23
  445. package/src/implementation/pages/pdf-document-page-collection.d.ts +0 -92
  446. package/src/implementation/pages/pdf-document-page-collection.js +0 -121
  447. package/src/implementation/pages/pdf-page-base.d.ts +0 -121
  448. package/src/implementation/pages/pdf-page-base.js +0 -104
  449. package/src/implementation/pages/pdf-page-layer-collection.d.ts +0 -99
  450. package/src/implementation/pages/pdf-page-layer-collection.js +0 -113
  451. package/src/implementation/pages/pdf-page-layer.d.ts +0 -160
  452. package/src/implementation/pages/pdf-page-layer.js +0 -159
  453. package/src/implementation/pages/pdf-page-settings.d.ts +0 -111
  454. package/src/implementation/pages/pdf-page-settings.js +0 -126
  455. package/src/implementation/pages/pdf-page-size.d.ts +0 -159
  456. package/src/implementation/pages/pdf-page-size.js +0 -39
  457. package/src/implementation/pages/pdf-page-template-element.d.ts +0 -230
  458. package/src/implementation/pages/pdf-page-template-element.js +0 -509
  459. package/src/implementation/pages/pdf-page.d.ts +0 -153
  460. package/src/implementation/pages/pdf-page.js +0 -127
  461. package/src/implementation/pages/pdf-section-collection.d.ts +0 -109
  462. package/src/implementation/pages/pdf-section-collection.js +0 -91
  463. package/src/implementation/pages/pdf-section-page-collection.d.ts +0 -41
  464. package/src/implementation/pages/pdf-section-page-collection.js +0 -34
  465. package/src/implementation/pages/pdf-section-templates.d.ts +0 -64
  466. package/src/implementation/pages/pdf-section-templates.js +0 -74
  467. package/src/implementation/pages/pdf-section.d.ts +0 -319
  468. package/src/implementation/pages/pdf-section.js +0 -379
  469. package/src/implementation/primitives/index.d.ts +0 -12
  470. package/src/implementation/primitives/index.js +0 -15
  471. package/src/implementation/primitives/pdf-array.d.ts +0 -186
  472. package/src/implementation/primitives/pdf-array.js +0 -201
  473. package/src/implementation/primitives/pdf-boolean.d.ts +0 -84
  474. package/src/implementation/primitives/pdf-boolean.js +0 -70
  475. package/src/implementation/primitives/pdf-dictionary.d.ts +0 -311
  476. package/src/implementation/primitives/pdf-dictionary.js +0 -220
  477. package/src/implementation/primitives/pdf-name.d.ts +0 -121
  478. package/src/implementation/primitives/pdf-name.js +0 -106
  479. package/src/implementation/primitives/pdf-number.d.ts +0 -104
  480. package/src/implementation/primitives/pdf-number.js +0 -98
  481. package/src/implementation/primitives/pdf-reference.d.ts +0 -222
  482. package/src/implementation/primitives/pdf-reference.js +0 -192
  483. package/src/implementation/primitives/pdf-stream.d.ts +0 -111
  484. package/src/implementation/primitives/pdf-stream.js +0 -146
  485. package/src/implementation/primitives/pdf-string.d.ts +0 -212
  486. package/src/implementation/primitives/pdf-string.js +0 -147
  487. package/src/implementation/structured-elements/grid/index.d.ts +0 -0
  488. package/src/implementation/structured-elements/grid/index.js +0 -1
  489. package/src/implementation/structured-elements/grid/pdf-grid-cell.d.ts +0 -248
  490. package/src/implementation/structured-elements/grid/pdf-grid-cell.js +0 -504
  491. package/src/implementation/structured-elements/grid/pdf-grid-column.d.ts +0 -108
  492. package/src/implementation/structured-elements/grid/pdf-grid-column.js +0 -127
  493. package/src/implementation/structured-elements/grid/pdf-grid-row.d.ts +0 -207
  494. package/src/implementation/structured-elements/grid/pdf-grid-row.js +0 -246
  495. package/src/implementation/structured-elements/grid/pdf-grid.d.ts +0 -678
  496. package/src/implementation/structured-elements/grid/pdf-grid.js +0 -982
  497. package/src/implementation/structured-elements/grid/styles/index.d.ts +0 -5
  498. package/src/implementation/structured-elements/grid/styles/index.js +0 -9
  499. package/src/implementation/structured-elements/grid/styles/pdf-borders.d.ts +0 -126
  500. package/src/implementation/structured-elements/grid/styles/pdf-borders.js +0 -146
  501. package/src/implementation/structured-elements/grid/styles/style.d.ts +0 -250
  502. package/src/implementation/structured-elements/grid/styles/style.js +0 -269
  503. package/src/implementation/structured-elements/index.d.ts +0 -0
  504. package/src/implementation/structured-elements/index.js +0 -1
  505. package/src/implementation/structured-elements/tables/light-tables/enum.d.ts +0 -16
  506. package/src/implementation/structured-elements/tables/light-tables/enum.js +0 -9
  507. package/src/interfaces/i-pdf-cache.d.ts +0 -23
  508. package/src/interfaces/i-pdf-cache.js +0 -4
  509. package/src/interfaces/i-pdf-changable.d.ts +0 -17
  510. package/src/interfaces/i-pdf-changable.js +0 -4
  511. package/src/interfaces/i-pdf-primitives.d.ts +0 -45
  512. package/src/interfaces/i-pdf-primitives.js +0 -4
  513. package/src/interfaces/i-pdf-wrapper.d.ts +0 -13
  514. package/src/interfaces/i-pdf-wrapper.js +0 -4
  515. package/src/interfaces/i-pdf-writer.d.ts +0 -29
  516. package/src/interfaces/i-pdf-writer.js +0 -4
  517. package/src/interfaces/index.d.ts +0 -9
  518. package/src/interfaces/index.js +0 -4
@@ -0,0 +1,831 @@
1
+ import { Dictionary } from './../../pdf-primitives';
2
+ var _Bidirectional = /** @class */ (function () {
3
+ /**
4
+ * Creates a new instance of the `_Bidirectional` class.
5
+ *
6
+ * @private
7
+ */
8
+ function _Bidirectional() {
9
+ this._indexes = [];
10
+ this._indexLevels = [];
11
+ this._mirroringShape = new Dictionary();
12
+ this._update();
13
+ }
14
+ _Bidirectional.prototype._doMirrorShaping = function (text) {
15
+ var result = [];
16
+ for (var i = 0; i < text.length; i++) {
17
+ if (((this._indexLevels[Number.parseInt(i.toString(), 10)] & 1) === 1)
18
+ && this._mirroringShape.containsKey(text[Number.parseInt(i.toString(), 10)].charCodeAt(0))) {
19
+ var value = text[Number.parseInt(i.toString(), 10)].charCodeAt(0); // eslint-disable-line
20
+ result[Number.parseInt(i.toString(), 10)] = String.fromCharCode(this._mirroringShape.getValue(value));
21
+ }
22
+ else {
23
+ result[Number.parseInt(i.toString(), 10)] = text[Number.parseInt(i.toString(), 10)].toString();
24
+ }
25
+ }
26
+ var res = '';
27
+ for (var j = 0; j < result.length; j++) {
28
+ res = res + result[Number.parseInt(j.toString(), 10)];
29
+ }
30
+ return res;
31
+ };
32
+ _Bidirectional.prototype._getLogicalToVisualString = function (inputText, isRtl) {
33
+ var rtlCharacters = new _RtlCharacters();
34
+ this._indexLevels = rtlCharacters._getVisualOrder(inputText, isRtl);
35
+ this._setDefaultIndexLevel();
36
+ this._doOrder(0, this._indexLevels.length - 1);
37
+ var text = this._doMirrorShaping(inputText);
38
+ var resultBuilder = '';
39
+ for (var i = 0; i < this._indexes.length; i++) {
40
+ var index = this._indexes[Number.parseInt(i.toString(), 10)];
41
+ resultBuilder += text[Number.parseInt(index.toString(), 10)];
42
+ }
43
+ return resultBuilder.toString();
44
+ };
45
+ _Bidirectional.prototype._setDefaultIndexLevel = function () {
46
+ for (var i = 0; i < this._indexLevels.length; i++) {
47
+ this._indexes[Number.parseInt(i.toString(), 10)] = i;
48
+ }
49
+ };
50
+ _Bidirectional.prototype._doOrder = function (sIndex, eIndex) {
51
+ var max = this._indexLevels[Number.parseInt(sIndex.toString(), 10)];
52
+ var min = max;
53
+ var odd = max;
54
+ var even = max;
55
+ for (var i = sIndex + 1; i <= eIndex; ++i) {
56
+ var data = this._indexLevels[Number.parseInt(i.toString(), 10)];
57
+ if (data > max) {
58
+ max = data;
59
+ }
60
+ else if (data < min) {
61
+ min = data;
62
+ }
63
+ odd &= data;
64
+ even |= data;
65
+ }
66
+ if ((even & 1) === 0) {
67
+ return;
68
+ }
69
+ if ((odd & 1) === 1) {
70
+ this._reArrange(sIndex, eIndex + 1);
71
+ return;
72
+ }
73
+ min |= 1;
74
+ while (max >= min) {
75
+ var pstart = sIndex;
76
+ while (true) { // eslint-disable-line
77
+ while (pstart <= eIndex) {
78
+ if (this._indexLevels[Number.parseInt(pstart.toString(), 10)] >= max) {
79
+ break;
80
+ }
81
+ pstart += 1;
82
+ }
83
+ if (pstart > eIndex) {
84
+ break;
85
+ }
86
+ var pend = pstart + 1;
87
+ while (pend <= eIndex) {
88
+ if (this._indexLevels[Number.parseInt(pend.toString(), 10)] < max) {
89
+ break;
90
+ }
91
+ pend += 1;
92
+ }
93
+ this._reArrange(pstart, pend);
94
+ pstart = pend + 1;
95
+ }
96
+ max -= 1;
97
+ }
98
+ };
99
+ _Bidirectional.prototype._reArrange = function (i, j) {
100
+ var length = (i + j) / 2;
101
+ --j;
102
+ for (; i < length; ++i, --j) {
103
+ var temp = this._indexes[Number.parseInt(i.toString(), 10)];
104
+ this._indexes[Number.parseInt(i.toString(), 10)] = this._indexes[Number.parseInt(j.toString(), 10)];
105
+ this._indexes[Number.parseInt(j.toString(), 10)] = temp;
106
+ }
107
+ };
108
+ _Bidirectional.prototype._update = function () {
109
+ this._mirroringShape.setValue(40, 41);
110
+ this._mirroringShape.setValue(41, 40);
111
+ this._mirroringShape.setValue(60, 62);
112
+ this._mirroringShape.setValue(62, 60);
113
+ this._mirroringShape.setValue(91, 93);
114
+ this._mirroringShape.setValue(93, 91);
115
+ this._mirroringShape.setValue(123, 125);
116
+ this._mirroringShape.setValue(125, 123);
117
+ this._mirroringShape.setValue(171, 187);
118
+ this._mirroringShape.setValue(187, 171);
119
+ this._mirroringShape.setValue(8249, 8250);
120
+ this._mirroringShape.setValue(8250, 8249);
121
+ this._mirroringShape.setValue(8261, 8262);
122
+ this._mirroringShape.setValue(8262, 8261);
123
+ this._mirroringShape.setValue(8317, 8318);
124
+ this._mirroringShape.setValue(8318, 8317);
125
+ this._mirroringShape.setValue(8333, 8334);
126
+ this._mirroringShape.setValue(8334, 8333);
127
+ this._mirroringShape.setValue(8712, 8715);
128
+ this._mirroringShape.setValue(8713, 8716);
129
+ this._mirroringShape.setValue(8714, 8717);
130
+ this._mirroringShape.setValue(8715, 8712);
131
+ this._mirroringShape.setValue(8716, 8713);
132
+ this._mirroringShape.setValue(8717, 8714);
133
+ this._mirroringShape.setValue(8725, 10741);
134
+ this._mirroringShape.setValue(8764, 8765);
135
+ this._mirroringShape.setValue(8765, 8764);
136
+ this._mirroringShape.setValue(8771, 8909);
137
+ this._mirroringShape.setValue(8786, 8787);
138
+ this._mirroringShape.setValue(8787, 8786);
139
+ this._mirroringShape.setValue(8788, 8789);
140
+ this._mirroringShape.setValue(8789, 8788);
141
+ this._mirroringShape.setValue(8804, 8805);
142
+ this._mirroringShape.setValue(8805, 8804);
143
+ this._mirroringShape.setValue(8806, 8807);
144
+ this._mirroringShape.setValue(8807, 8806);
145
+ this._mirroringShape.setValue(8808, 8809);
146
+ this._mirroringShape.setValue(8809, 8808);
147
+ this._mirroringShape.setValue(8810, 8811);
148
+ this._mirroringShape.setValue(8811, 8810);
149
+ this._mirroringShape.setValue(8814, 8815);
150
+ this._mirroringShape.setValue(8815, 8814);
151
+ this._mirroringShape.setValue(8816, 8817);
152
+ this._mirroringShape.setValue(8817, 8816);
153
+ this._mirroringShape.setValue(8818, 8819);
154
+ this._mirroringShape.setValue(8819, 8818);
155
+ this._mirroringShape.setValue(8820, 8821);
156
+ this._mirroringShape.setValue(8821, 8820);
157
+ this._mirroringShape.setValue(8822, 8823);
158
+ this._mirroringShape.setValue(8823, 8822);
159
+ this._mirroringShape.setValue(8824, 8825);
160
+ this._mirroringShape.setValue(8825, 8824);
161
+ this._mirroringShape.setValue(8826, 8827);
162
+ this._mirroringShape.setValue(8827, 8826);
163
+ this._mirroringShape.setValue(8828, 8829);
164
+ this._mirroringShape.setValue(8829, 8828);
165
+ this._mirroringShape.setValue(8830, 8831);
166
+ this._mirroringShape.setValue(8831, 8830);
167
+ this._mirroringShape.setValue(8832, 8833);
168
+ this._mirroringShape.setValue(8833, 8832);
169
+ this._mirroringShape.setValue(8834, 8835);
170
+ this._mirroringShape.setValue(8835, 8834);
171
+ this._mirroringShape.setValue(8836, 8837);
172
+ this._mirroringShape.setValue(8837, 8836);
173
+ this._mirroringShape.setValue(8838, 8839);
174
+ this._mirroringShape.setValue(8839, 8838);
175
+ this._mirroringShape.setValue(8840, 8841);
176
+ this._mirroringShape.setValue(8841, 8840);
177
+ this._mirroringShape.setValue(8842, 8843);
178
+ this._mirroringShape.setValue(8843, 8842);
179
+ this._mirroringShape.setValue(8847, 8848);
180
+ this._mirroringShape.setValue(8848, 8847);
181
+ this._mirroringShape.setValue(8849, 8850);
182
+ this._mirroringShape.setValue(8850, 8849);
183
+ this._mirroringShape.setValue(8856, 10680);
184
+ this._mirroringShape.setValue(8866, 8867);
185
+ this._mirroringShape.setValue(8867, 8866);
186
+ this._mirroringShape.setValue(8870, 10974);
187
+ this._mirroringShape.setValue(8872, 10980);
188
+ this._mirroringShape.setValue(8873, 10979);
189
+ this._mirroringShape.setValue(8875, 10981);
190
+ this._mirroringShape.setValue(8880, 8881);
191
+ this._mirroringShape.setValue(8881, 8880);
192
+ this._mirroringShape.setValue(8882, 8883);
193
+ this._mirroringShape.setValue(8883, 8882);
194
+ this._mirroringShape.setValue(8884, 8885);
195
+ this._mirroringShape.setValue(8885, 8884);
196
+ this._mirroringShape.setValue(8886, 8887);
197
+ this._mirroringShape.setValue(8887, 8886);
198
+ this._mirroringShape.setValue(8905, 8906);
199
+ this._mirroringShape.setValue(8906, 8905);
200
+ this._mirroringShape.setValue(8907, 8908);
201
+ this._mirroringShape.setValue(8908, 8907);
202
+ this._mirroringShape.setValue(8909, 8771);
203
+ this._mirroringShape.setValue(8912, 8913);
204
+ this._mirroringShape.setValue(8913, 8912);
205
+ this._mirroringShape.setValue(8918, 8919);
206
+ this._mirroringShape.setValue(8919, 8918);
207
+ this._mirroringShape.setValue(8920, 8921);
208
+ this._mirroringShape.setValue(8921, 8920);
209
+ this._mirroringShape.setValue(8922, 8923);
210
+ this._mirroringShape.setValue(8923, 8922);
211
+ this._mirroringShape.setValue(8924, 8925);
212
+ this._mirroringShape.setValue(8925, 8924);
213
+ this._mirroringShape.setValue(8926, 8927);
214
+ this._mirroringShape.setValue(8927, 8926);
215
+ this._mirroringShape.setValue(8928, 8929);
216
+ this._mirroringShape.setValue(8929, 8928);
217
+ this._mirroringShape.setValue(8930, 8931);
218
+ this._mirroringShape.setValue(8931, 8930);
219
+ this._mirroringShape.setValue(8932, 8933);
220
+ this._mirroringShape.setValue(8933, 8932);
221
+ this._mirroringShape.setValue(8934, 8935);
222
+ this._mirroringShape.setValue(8935, 8934);
223
+ this._mirroringShape.setValue(8936, 8937);
224
+ this._mirroringShape.setValue(8937, 8936);
225
+ this._mirroringShape.setValue(8938, 8939);
226
+ this._mirroringShape.setValue(8939, 8938);
227
+ this._mirroringShape.setValue(8940, 8941);
228
+ this._mirroringShape.setValue(8941, 8940);
229
+ this._mirroringShape.setValue(8944, 8945);
230
+ this._mirroringShape.setValue(8945, 8944);
231
+ this._mirroringShape.setValue(8946, 8954);
232
+ this._mirroringShape.setValue(8947, 8955);
233
+ this._mirroringShape.setValue(8948, 8956);
234
+ this._mirroringShape.setValue(8950, 8957);
235
+ this._mirroringShape.setValue(8951, 8958);
236
+ this._mirroringShape.setValue(8954, 8946);
237
+ this._mirroringShape.setValue(8955, 8947);
238
+ this._mirroringShape.setValue(8956, 8948);
239
+ this._mirroringShape.setValue(8957, 8950);
240
+ this._mirroringShape.setValue(8958, 8951);
241
+ this._mirroringShape.setValue(8968, 8969);
242
+ this._mirroringShape.setValue(8969, 8968);
243
+ this._mirroringShape.setValue(8970, 8971);
244
+ this._mirroringShape.setValue(8971, 8970);
245
+ this._mirroringShape.setValue(9001, 9002);
246
+ this._mirroringShape.setValue(9002, 9001);
247
+ this._mirroringShape.setValue(10088, 10089);
248
+ this._mirroringShape.setValue(10089, 10088);
249
+ this._mirroringShape.setValue(10090, 10091);
250
+ this._mirroringShape.setValue(10091, 10090);
251
+ this._mirroringShape.setValue(10092, 10093);
252
+ this._mirroringShape.setValue(10093, 10092);
253
+ this._mirroringShape.setValue(10094, 10095);
254
+ this._mirroringShape.setValue(10095, 10094);
255
+ this._mirroringShape.setValue(10096, 10097);
256
+ this._mirroringShape.setValue(10097, 10096);
257
+ this._mirroringShape.setValue(10098, 10099);
258
+ this._mirroringShape.setValue(10099, 10098);
259
+ this._mirroringShape.setValue(10100, 10101);
260
+ this._mirroringShape.setValue(10101, 10100);
261
+ this._mirroringShape.setValue(10197, 10198);
262
+ this._mirroringShape.setValue(10198, 10197);
263
+ this._mirroringShape.setValue(10205, 10206);
264
+ this._mirroringShape.setValue(10206, 10205);
265
+ this._mirroringShape.setValue(10210, 10211);
266
+ this._mirroringShape.setValue(10211, 10210);
267
+ this._mirroringShape.setValue(10212, 10213);
268
+ this._mirroringShape.setValue(10213, 10212);
269
+ this._mirroringShape.setValue(10214, 10215);
270
+ this._mirroringShape.setValue(10215, 10214);
271
+ this._mirroringShape.setValue(10216, 10217);
272
+ this._mirroringShape.setValue(10217, 10216);
273
+ this._mirroringShape.setValue(10218, 10219);
274
+ this._mirroringShape.setValue(10219, 10218);
275
+ this._mirroringShape.setValue(10627, 10628);
276
+ this._mirroringShape.setValue(10628, 10627);
277
+ this._mirroringShape.setValue(10629, 10630);
278
+ this._mirroringShape.setValue(10630, 10629);
279
+ this._mirroringShape.setValue(10631, 10632);
280
+ this._mirroringShape.setValue(10632, 10631);
281
+ this._mirroringShape.setValue(10633, 10634);
282
+ this._mirroringShape.setValue(10634, 10633);
283
+ this._mirroringShape.setValue(10635, 10636);
284
+ this._mirroringShape.setValue(10636, 10635);
285
+ this._mirroringShape.setValue(10637, 10640);
286
+ this._mirroringShape.setValue(10638, 10639);
287
+ this._mirroringShape.setValue(10639, 10638);
288
+ this._mirroringShape.setValue(10640, 10637);
289
+ this._mirroringShape.setValue(10641, 10642);
290
+ this._mirroringShape.setValue(10642, 10641);
291
+ this._mirroringShape.setValue(10643, 10644);
292
+ this._mirroringShape.setValue(10644, 10643);
293
+ this._mirroringShape.setValue(10645, 10646);
294
+ this._mirroringShape.setValue(10646, 10645);
295
+ this._mirroringShape.setValue(10647, 10648);
296
+ this._mirroringShape.setValue(10648, 10647);
297
+ this._mirroringShape.setValue(10680, 8856);
298
+ this._mirroringShape.setValue(10688, 10689);
299
+ this._mirroringShape.setValue(10689, 10688);
300
+ this._mirroringShape.setValue(10692, 10693);
301
+ this._mirroringShape.setValue(10693, 10692);
302
+ this._mirroringShape.setValue(10703, 10704);
303
+ this._mirroringShape.setValue(10704, 10703);
304
+ this._mirroringShape.setValue(10705, 10706);
305
+ this._mirroringShape.setValue(10706, 10705);
306
+ this._mirroringShape.setValue(10708, 10709);
307
+ this._mirroringShape.setValue(10709, 10708);
308
+ this._mirroringShape.setValue(10712, 10713);
309
+ this._mirroringShape.setValue(10713, 10712);
310
+ this._mirroringShape.setValue(10714, 10715);
311
+ this._mirroringShape.setValue(10715, 10714);
312
+ this._mirroringShape.setValue(10741, 8725);
313
+ this._mirroringShape.setValue(10744, 10745);
314
+ this._mirroringShape.setValue(10745, 10744);
315
+ this._mirroringShape.setValue(10748, 10749);
316
+ this._mirroringShape.setValue(10749, 10748);
317
+ this._mirroringShape.setValue(10795, 10796);
318
+ this._mirroringShape.setValue(10796, 10795);
319
+ this._mirroringShape.setValue(10797, 10796);
320
+ this._mirroringShape.setValue(10798, 10797);
321
+ this._mirroringShape.setValue(10804, 10805);
322
+ this._mirroringShape.setValue(10805, 10804);
323
+ this._mirroringShape.setValue(10812, 10813);
324
+ this._mirroringShape.setValue(10813, 10812);
325
+ this._mirroringShape.setValue(10852, 10853);
326
+ this._mirroringShape.setValue(10853, 10852);
327
+ this._mirroringShape.setValue(10873, 10874);
328
+ this._mirroringShape.setValue(10874, 10873);
329
+ this._mirroringShape.setValue(10877, 10878);
330
+ this._mirroringShape.setValue(10878, 10877);
331
+ this._mirroringShape.setValue(10879, 10880);
332
+ this._mirroringShape.setValue(10880, 10879);
333
+ this._mirroringShape.setValue(10881, 10882);
334
+ this._mirroringShape.setValue(10882, 10881);
335
+ this._mirroringShape.setValue(10883, 10884);
336
+ this._mirroringShape.setValue(10884, 10883);
337
+ this._mirroringShape.setValue(10891, 10892);
338
+ this._mirroringShape.setValue(10892, 10891);
339
+ this._mirroringShape.setValue(10897, 10898);
340
+ this._mirroringShape.setValue(10898, 10897);
341
+ this._mirroringShape.setValue(10899, 10900);
342
+ this._mirroringShape.setValue(10900, 10899);
343
+ this._mirroringShape.setValue(10901, 10902);
344
+ this._mirroringShape.setValue(10902, 10901);
345
+ this._mirroringShape.setValue(10903, 10904);
346
+ this._mirroringShape.setValue(10904, 10903);
347
+ this._mirroringShape.setValue(10905, 10906);
348
+ this._mirroringShape.setValue(10906, 10905);
349
+ this._mirroringShape.setValue(10907, 10908);
350
+ this._mirroringShape.setValue(10908, 10907);
351
+ this._mirroringShape.setValue(10913, 10914);
352
+ this._mirroringShape.setValue(10914, 10913);
353
+ this._mirroringShape.setValue(10918, 10919);
354
+ this._mirroringShape.setValue(10919, 10918);
355
+ this._mirroringShape.setValue(10920, 10921);
356
+ this._mirroringShape.setValue(10921, 10920);
357
+ this._mirroringShape.setValue(10922, 10923);
358
+ this._mirroringShape.setValue(10923, 10922);
359
+ this._mirroringShape.setValue(10924, 10925);
360
+ this._mirroringShape.setValue(10925, 10924);
361
+ this._mirroringShape.setValue(10927, 10928);
362
+ this._mirroringShape.setValue(10928, 10927);
363
+ this._mirroringShape.setValue(10931, 10932);
364
+ this._mirroringShape.setValue(10932, 10931);
365
+ this._mirroringShape.setValue(10939, 10940);
366
+ this._mirroringShape.setValue(10940, 10939);
367
+ this._mirroringShape.setValue(10941, 10942);
368
+ this._mirroringShape.setValue(10942, 10941);
369
+ this._mirroringShape.setValue(10943, 10944);
370
+ this._mirroringShape.setValue(10944, 10943);
371
+ this._mirroringShape.setValue(10945, 10946);
372
+ this._mirroringShape.setValue(10946, 10945);
373
+ this._mirroringShape.setValue(10947, 10948);
374
+ this._mirroringShape.setValue(10948, 10947);
375
+ this._mirroringShape.setValue(10949, 10950);
376
+ this._mirroringShape.setValue(10950, 10949);
377
+ this._mirroringShape.setValue(10957, 10958);
378
+ this._mirroringShape.setValue(10958, 10957);
379
+ this._mirroringShape.setValue(10959, 10960);
380
+ this._mirroringShape.setValue(10960, 10959);
381
+ this._mirroringShape.setValue(10961, 10962);
382
+ this._mirroringShape.setValue(10962, 10961);
383
+ this._mirroringShape.setValue(10963, 10964);
384
+ this._mirroringShape.setValue(10964, 10963);
385
+ this._mirroringShape.setValue(10965, 10966);
386
+ this._mirroringShape.setValue(10966, 10965);
387
+ this._mirroringShape.setValue(10974, 8870);
388
+ this._mirroringShape.setValue(10979, 8873);
389
+ this._mirroringShape.setValue(10980, 8872);
390
+ this._mirroringShape.setValue(10981, 8875);
391
+ this._mirroringShape.setValue(10988, 10989);
392
+ this._mirroringShape.setValue(10989, 10988);
393
+ this._mirroringShape.setValue(10999, 11000);
394
+ this._mirroringShape.setValue(11000, 10999);
395
+ this._mirroringShape.setValue(11001, 11002);
396
+ this._mirroringShape.setValue(11002, 11001);
397
+ this._mirroringShape.setValue(12296, 12297);
398
+ this._mirroringShape.setValue(12297, 12296);
399
+ this._mirroringShape.setValue(12298, 12299);
400
+ this._mirroringShape.setValue(12299, 12298);
401
+ this._mirroringShape.setValue(12300, 12301);
402
+ this._mirroringShape.setValue(12301, 12300);
403
+ this._mirroringShape.setValue(12302, 12303);
404
+ this._mirroringShape.setValue(12303, 12302);
405
+ this._mirroringShape.setValue(12304, 12305);
406
+ this._mirroringShape.setValue(12305, 12304);
407
+ this._mirroringShape.setValue(12308, 12309);
408
+ this._mirroringShape.setValue(12309, 12308);
409
+ this._mirroringShape.setValue(12310, 12311);
410
+ this._mirroringShape.setValue(12311, 12310);
411
+ this._mirroringShape.setValue(12312, 12313);
412
+ this._mirroringShape.setValue(12313, 12312);
413
+ this._mirroringShape.setValue(12314, 12315);
414
+ this._mirroringShape.setValue(12315, 12314);
415
+ this._mirroringShape.setValue(65288, 65289);
416
+ this._mirroringShape.setValue(65289, 65288);
417
+ this._mirroringShape.setValue(65308, 65310);
418
+ this._mirroringShape.setValue(65310, 65308);
419
+ this._mirroringShape.setValue(65339, 65341);
420
+ this._mirroringShape.setValue(65341, 65339);
421
+ this._mirroringShape.setValue(65371, 65373);
422
+ this._mirroringShape.setValue(65373, 65371);
423
+ this._mirroringShape.setValue(65375, 65376);
424
+ this._mirroringShape.setValue(65376, 65375);
425
+ this._mirroringShape.setValue(65378, 65379);
426
+ this._mirroringShape.setValue(65379, 65378);
427
+ };
428
+ return _Bidirectional;
429
+ }());
430
+ export { _Bidirectional };
431
+ var _RtlCharacters = /** @class */ (function () {
432
+ /**
433
+ * Creates an instance of the 'RtlCharacters' class.
434
+ *
435
+ * @private
436
+ */
437
+ function _RtlCharacters() {
438
+ this._type = [];
439
+ this._textOrder = -1;
440
+ this._rtlCharacterTypes = new Array(65536);
441
+ this.L = 0;
442
+ this.lre = 1;
443
+ this.lro = 2;
444
+ this.R = 3;
445
+ this.AL = 4;
446
+ this.rle = 5;
447
+ this.rlo = 6;
448
+ this.pdf = 7;
449
+ this.EN = 8;
450
+ this.ES = 9;
451
+ this.ET = 10;
452
+ this.AN = 11;
453
+ this.CS = 12;
454
+ this.nsm = 13;
455
+ this.BN = 14;
456
+ this.B = 15;
457
+ this.S = 16;
458
+ this.WS = 17;
459
+ this.ON = 18;
460
+ this._charTypes = [
461
+ this.L, this.EN, this.BN, this.ES, this.ES, this.S, this.ET, this.ET, this.B, this.AN, this.AN, this.S, this.CS, this.CS,
462
+ this.WS, this.nsm, this.nsm, this.B, this.BN, 27, this.BN, 28, 30, this.B, 31, 31, this.S, 32, 32, this.WS, 33, 34, this.ON, 35,
463
+ 37, this.ET, 38, 42, this.ON, 43, 43, this.ET, 44, 44, this.CS, 45, 45, this.ET, 46, 46, this.CS, 47, 47, this.CS, 48, 57, this.EN,
464
+ 58, 58, this.CS, 59, 64, this.ON, 65, 90, this.L, 91, 96, this.ON, 97, 122, this.L, 123, 126, this.ON, 127, 132, this.BN, 133, 133,
465
+ this.B, 134, 159, this.BN, 160, 160, this.CS, 161, 161, this.ON, 162, 165, this.ET, 166, 169, this.ON, 170, 170, this.L, 171, 175,
466
+ this.ON, 176, 177, this.ET, 178, 179, this.EN, 180, 180, this.ON, 181, 181, this.L, 182, 184, this.ON, 185, 185, this.EN, 186, 186,
467
+ this.L, 187, 191, this.ON, 192, 214, this.L, 215, 215, this.ON, 216, 246, this.L, 247, 247, this.ON, 248, 696, this.L, 697, 698,
468
+ this.ON, 699, 705, this.L, 706, 719, this.ON, 720, 721, this.L, 722, 735, this.ON, 736, 740, this.L, 741, 749, this.ON, 750, 750,
469
+ this.L, 751, 767, this.ON, 768, 855, this.nsm, 856, 860, this.L, 861, 879, this.nsm, 880, 883, this.L, 884, 885, this.ON, 886, 893,
470
+ this.L, 894, 894, this.ON, 895, 899, this.L, 900, 901, this.ON, 902, 902, this.L, 903, 903, this.ON, 904, 1013, this.L, 1014, 1014,
471
+ this.ON, 1015, 1154, this.L, 1155, 1158, this.nsm, 1159, 1159, this.L, 1160, 1161, this.nsm, 1162, 1417, this.L, 1418, 1418,
472
+ this.ON, 1419, 1424, this.L, 1425, 1441, this.nsm, 1442, 1442, this.L, 1443, 1465, this.nsm, 1466, 1466, this.L, 1467, 1469,
473
+ this.nsm, 1470, 1470, this.R, 1471, 1471, this.nsm, 1472, 1472, this.R, 1473, 1474, this.nsm, 1475, 1475, this.R, 1476, 1476,
474
+ this.nsm, 1477, 1487, this.L, 1488, 1514, this.R, 1515, 1519, this.L, 1520, 1524, this.R, 1525, 1535, this.L, 1536, 1539, this.AL,
475
+ 1540, 1547, this.L, 1548, 1548, this.CS, 1549, 1549, this.AL, 1550, 1551, this.ON, 1552, 1557, this.nsm, 1558, 1562, this.L, 1563,
476
+ 1563, this.AL, 1564, 1566, this.L, 1567, 1567, this.AL, 1568, 1568, this.L, 1569, 1594, this.AL, 1595, 1599, this.L, 1600, 1610,
477
+ this.AL, 1611, 1624, this.nsm, 1625, 1631, this.L, 1632, 1641, this.AN, 1642, 1642, this.ET, 1643, 1644, this.AN, 1645, 1647,
478
+ this.AL, 1648, 1648, this.nsm, 1649, 1749, this.AL, 1750, 1756, this.nsm, 1757, 1757, this.AL, 1758, 1764, this.nsm, 1765, 1766,
479
+ this.AL, 1767, 1768, this.nsm, 1769, 1769, this.ON, 1770, 1773, this.nsm, 1774, 1775, this.AL, 1776, 1785, this.EN, 1786, 1805,
480
+ this.AL, 1806, 1806, this.L, 1807, 1807, this.BN, 1808, 1808, this.AL, 1809, 1809, this.nsm, 1810, 1839, this.AL, 1840, 1866,
481
+ this.nsm, 1867, 1868, this.L, 1869, 1871, this.AL, 1872, 1919, this.L, 1920, 1957, this.AL, 1958, 1968, this.nsm, 1969, 1969,
482
+ this.AL, 1970, 2304, this.L, 2305, 2306, this.nsm, 2307, 2363, this.L, 2364, 2364, this.nsm, 2365, 2368, this.L, 2369, 2376,
483
+ this.nsm, 2377, 2380, this.L, 2381, 2381, this.nsm, 2382, 2384, this.L, 2385, 2388, this.nsm, 2389, 2401, this.L, 2402, 2403,
484
+ this.nsm, 2404, 2432, this.L, 2433, 2433, this.nsm, 2434, 2491, this.L, 2492, 2492, this.nsm, 2493, 2496, this.L, 2497, 2500,
485
+ this.nsm, 2501, 2508, this.L, 2509, 2509, this.nsm, 2510, 2529, this.L, 2530, 2531, this.nsm, 2532, 2545, this.L, 2546, 2547,
486
+ this.ET, 2548, 2560, this.L, 2561, 2562, this.nsm, 2563, 2619, this.L, 2620, 2620, this.nsm, 2621, 2624, this.L, 2625, 2626,
487
+ this.nsm, 2627, 2630, this.L, 2631, 2632, this.nsm, 2633, 2634, this.L, 2635, 2637, this.nsm, 2638, 2671, this.L, 2672, 2673,
488
+ this.nsm, 2674, 2688, this.L, 2689, 2690, this.nsm, 2691, 2747, this.L, 2748, 2748, this.nsm, 2749, 2752, this.L, 2753, 2757,
489
+ this.nsm, 2758, 2758, this.L, 2759, 2760, this.nsm, 2761, 2764, this.L, 2765, 2765, this.nsm, 2766, 2785, this.L, 2786, 2787,
490
+ this.nsm, 2788, 2800, this.L, 2801, 2801, this.ET, 2802, 2816, this.L, 2817, 2817, this.nsm, 2818, 2875, this.L, 2876, 2876,
491
+ this.nsm, 2877, 2878, this.L, 2879, 2879, this.nsm, 2880, 2880, this.L, 2881, 2883, this.nsm, 2884, 2892, this.L, 2893, 2893,
492
+ this.nsm, 2894, 2901, this.L, 2902, 2902, this.nsm, 2903, 2945, this.L, 2946, 2946, this.nsm, 2947, 3007, this.L, 3008, 3008,
493
+ this.nsm, 3009, 3020, this.L, 3021, 3021, this.nsm, 3022, 3058, this.L, 3059, 3064, this.ON, 3065, 3065, this.ET, 3066, 3066,
494
+ this.ON, 3067, 3133, this.L, 3134, 3136, this.nsm, 3137, 3141, this.L, 3142, 3144, this.nsm, 3145, 3145, this.L, 3146, 3149,
495
+ this.nsm, 3150, 3156, this.L, 3157, 3158, this.nsm, 3159, 3259, this.L, 3260, 3260, this.nsm, 3261, 3275, this.L, 3276, 3277,
496
+ this.nsm, 3278, 3392, this.L, 3393, 3395, this.nsm, 3396, 3404, this.L, 3405, 3405, this.nsm, 3406, 3529, this.L, 3530, 3530,
497
+ this.nsm, 3531, 3537, this.L, 3538, 3540, this.nsm, 3541, 3541, this.L, 3542, 3542, this.nsm, 3543, 3632, this.L, 3633, 3633,
498
+ this.nsm, 3634, 3635, this.L, 3636, 3642, this.nsm, 3643, 3646, this.L, 3647, 3647, this.ET, 3648, 3654, this.L, 3655, 3662,
499
+ this.nsm, 3663, 3760, this.L, 3761, 3761, this.nsm, 3762, 3763, this.L, 3764, 3769, this.nsm, 3770, 3770, this.L, 3771, 3772,
500
+ this.nsm, 3773, 3783, this.L, 3784, 3789, this.nsm, 3790, 3863, this.L, 3864, 3865, this.nsm, 3866, 3892, this.L, 3893, 3893,
501
+ this.nsm, 3894, 3894, this.L, 3895, 3895, this.nsm, 3896, 3896, this.L, 3897, 3897, this.nsm, 3898, 3901, this.ON, 3902, 3952,
502
+ this.L, 3953, 3966, this.nsm, 3967, 3967, this.L, 3968, 3972, this.nsm, 3973, 3973, this.L, 3974, 3975, this.nsm, 3976, 3983,
503
+ this.L, 3984, 3991, this.nsm, 3992, 3992, this.L, 3993, 4028, this.nsm, 4029, 4037, this.L, 4038, 4038, this.nsm, 4039, 4140,
504
+ this.L, 4141, 4144, this.nsm, 4145, 4145, this.L, 4146, 4146, this.nsm, 4147, 4149, this.L, 4150, 4151, this.nsm, 4152, 4152,
505
+ this.L, 4153, 4153, this.nsm, 4154, 4183, this.L, 4184, 4185, this.nsm, 4186, 5759, this.L, 5760, 5760, this.WS, 5761, 5786,
506
+ this.L, 5787, 5788, this.ON, 5789, 5905, this.L, 5906, 5908, this.nsm, 5909, 5937, this.L, 5938, 5940, this.nsm, 5941, 5969,
507
+ this.L, 5970, 5971, this.nsm, 5972, 6001, this.L, 6002, 6003, this.nsm, 6004, 6070, this.L, 6071, 6077, this.nsm, 6078, 6085,
508
+ this.L, 6086, 6086, this.nsm, 6087, 6088, this.L, 6089, 6099, this.nsm, 6100, 6106, this.L, 6107, 6107, this.ET, 6108, 6108,
509
+ this.L, 6109, 6109, this.nsm, 6110, 6127, this.L, 6128, 6137, this.ON, 6138, 6143, this.L, 6144, 6154, this.ON, 6155, 6157,
510
+ this.nsm, 6158, 6158, this.WS, 6159, 6312, this.L, 6313, 6313, this.nsm, 6314, 6431, this.L, 6432, 6434, this.nsm, 6435, 6438,
511
+ this.L, 6439, 6443, this.nsm, 6444, 6449, this.L, 6450, 6450, this.nsm, 6451, 6456, this.L, 6457, 6459, this.nsm, 6460, 6463,
512
+ this.L, 6464, 6464, this.ON, 6465, 6467, this.L, 6468, 6469, this.ON, 6470, 6623, this.L, 6624, 6655, this.ON, 6656, 8124, this.L,
513
+ 8125, 8125, this.ON, 8126, 8126, this.L, 8127, 8129, this.ON, 8130, 8140, this.L, 8141, 8143, this.ON, 8144, 8156, this.L, 8157,
514
+ 8159, this.ON, 8160, 8172, this.L, 8173, 8175, this.ON, 8176, 8188, this.L, 8189, 8190, this.ON, 8191, 8191, this.L, 8192, 8202,
515
+ this.WS, 8203, 8205, this.BN, 8206, 8206, this.L, 8207, 8207, this.R, 8208, 8231, this.ON, 8232, 8232, this.WS, 8233, 8233, this.B,
516
+ 8234, 8234, this.lre, 8235, 8235, this.rle, 8236, 8236, this.pdf, 8237, 8237, this.lro, 8238, 8238, this.rlo, 8239, 8239, this.WS,
517
+ 8240, 8244, this.ET, 8245, 8276, this.ON, 8277, 8278, this.L, 8279, 8279, this.ON, 8280, 8286, this.L, 8287, 8287, this.WS, 8288,
518
+ 8291, this.BN, 8292, 8297, this.L, 8298, 8303, this.BN, 8304, 8304, this.EN, 8305, 8307, this.L, 8308, 8313, this.EN, 8314, 8315,
519
+ this.ET, 8316, 8318, this.ON, 8319, 8319, this.L, 8320, 8329, this.EN, 8330, 8331, this.ET, 8332, 8334, this.ON, 8335, 8351,
520
+ this.L, 8352, 8369, this.ET, 8370, 8399, this.L, 8400, 8426, this.nsm, 8427, 8447, this.L, 8448, 8449, this.ON, 8450, 8450, this.L,
521
+ 8451, 8454, this.ON, 8455, 8455, this.L, 8456, 8457, this.ON, 8458, 8467, this.L, 8468, 8468, this.ON, 8469, 8469, this.L, 8470,
522
+ 8472, this.ON, 8473, 8477, this.L, 8478, 8483, this.ON, 8484, 8484, this.L, 8485, 8485, this.ON, 8486, 8486, this.L, 8487, 8487,
523
+ this.ON, 8488, 8488, this.L, 8489, 8489, this.ON, 8490, 8493, this.L, 8494, 8494, this.ET, 8495, 8497, this.L, 8498, 8498, this.ON,
524
+ 8499, 8505, this.L, 8506, 8507, this.ON, 8508, 8511, this.L, 8512, 8516, this.ON, 8517, 8521, this.L, 8522, 8523, this.ON, 8524,
525
+ 8530, this.L, 8531, 8543, this.ON, 8544, 8591, this.L, 8592, 8721, this.ON, 8722, 8723, this.ET, 8724, 9013, this.ON, 9014, 9082,
526
+ this.L, 9083, 9108, this.ON, 9109, 9109, this.L, 9110, 9168, this.ON, 9169, 9215, this.L, 9216, 9254, this.ON, 9255, 9279, this.L,
527
+ 9280, 9290, this.ON, 9291, 9311, this.L, 9312, 9371, this.EN, 9372, 9449, this.L, 9450, 9450, this.EN, 9451, 9751, this.ON, 9752,
528
+ 9752, this.L, 9753, 9853, this.ON, 9854, 9855, this.L, 9856, 9873, this.ON, 9874, 9887, this.L, 9888, 9889, this.ON, 9890, 9984,
529
+ this.L, 9985, 9988, this.ON, 9989, 9989, this.L, 9990, 9993, this.ON, 9994, 9995, this.L, 9996, 10023, this.ON, 10024, 10024,
530
+ this.L, 10025, 10059, this.ON, 10060, 10060, this.L, 10061, 10061, this.ON, 10062, 10062, this.L, 10063, 10066, this.ON, 10067,
531
+ 10069, this.L, 10070, 10070, this.ON, 10071, 10071, this.L, 10072, 10078, this.ON, 10079, 10080, this.L, 10081, 10132, this.ON,
532
+ 10133, 10135, this.L, 10136, 10159, this.ON, 10160, 10160, this.L, 10161, 10174, this.ON, 10175, 10191, this.L, 10192, 10219,
533
+ this.ON, 10220, 10223, this.L, 10224, 11021, this.ON, 11022, 11903, this.L, 11904, 11929, this.ON, 11930, 11930, this.L, 11931,
534
+ 12019, this.ON, 12020, 12031, this.L, 12032, 12245, this.ON, 12246, 12271, this.L, 12272, 12283, this.ON, 12284, 12287, this.L,
535
+ 12288, 12288, this.WS, 12289, 12292, this.ON, 12293, 12295, this.L, 12296, 12320, this.ON, 12321, 12329, this.L, 12330, 12335,
536
+ this.nsm, 12336, 12336, this.ON, 12337, 12341, this.L, 12342, 12343, this.ON, 12344, 12348, this.L, 12349, 12351, this.ON, 12352,
537
+ 12440, this.L, 12441, 12442, this.nsm, 12443, 12444, this.ON, 12445, 12447, this.L, 12448, 12448, this.ON, 12449, 12538, this.L,
538
+ 12539, 12539, this.ON, 12540, 12828, this.L, 12829, 12830, this.ON, 12831, 12879, this.L, 12880, 12895, this.ON, 12896, 12923,
539
+ this.L, 12924, 12925, this.ON, 12926, 12976, this.L, 12977, 12991, this.ON, 12992, 13003, this.L, 13004, 13007, this.ON, 13008,
540
+ 13174, this.L, 13175, 13178, this.ON, 13179, 13277, this.L, 13278, 13279, this.ON, 13280, 13310, this.L, 13311, 13311, this.ON,
541
+ 13312, 19903, this.L, 19904, 19967, this.ON, 19968, 42127, this.L, 42128, 42182, this.ON, 42183, 64284, this.L, 64285, 64285,
542
+ this.R, 64286, 64286, this.nsm, 64287, 64296, this.R, 64297, 64297, this.ET, 64298, 64310, this.R, 64311, 64311, this.L, 64312,
543
+ 64316, this.R, 64317, 64317, this.L, 64318, 64318, this.R, 64319, 64319, this.L, 64320, 64321, this.R, 64322, 64322, this.L, 64323,
544
+ 64324, this.R, 64325, 64325, this.L, 64326, 64335, this.R, 64336, 64433, this.AL, 64434, 64466, this.L, 64467, 64829, this.AL,
545
+ 64830, 64831, this.ON, 64832, 64847, this.L, 64848, 64911, this.AL, 64912, 64913, this.L, 64914, 64967, this.AL, 64968, 65007,
546
+ this.L, 65008, 65020, this.AL, 65021, 65021, this.ON, 65022, 65023, this.L, 65024, 65039, this.nsm, 65040, 65055, this.L, 65056,
547
+ 65059, this.nsm, 65060, 65071, this.L, 65072, 65103, this.ON, 65104, 65104, this.CS, 65105, 65105, this.ON, 65106, 65106, this.CS,
548
+ 65107, 65107, this.L, 65108, 65108, this.ON, 65109, 65109, this.CS, 65110, 65118, this.ON, 65119, 65119, this.ET, 65120, 65121,
549
+ this.ON, 65122, 65123, this.ET, 65124, 65126, this.ON, 65127, 65127, this.L, 65128, 65128, this.ON, 65129, 65130, this.ET, 65131,
550
+ 65131, this.ON, 65132, 65135, this.L, 65136, 65140, this.AL, 65141, 65141, this.L, 65142, 65276, this.AL, 65277, 65278, this.L,
551
+ 65279, 65279, this.BN, 65280, 65280, this.L, 65281, 65282, this.ON, 65283, 65285, this.ET, 65286, 65290, this.ON, 65291, 65291,
552
+ this.ET, 65292, 65292, this.CS, 65293, 65293, this.ET, 65294, 65294, this.CS, 65295, 65295, this.ES, 65296, 65305, this.EN, 65306,
553
+ 65306, this.CS, 65307, 65312, this.ON, 65313, 65338, this.L, 65339, 65344, this.ON, 65345, 65370, this.L, 65371, 65381, this.ON,
554
+ 65382, 65503, this.L, 65504, 65505, this.ET, 65506, 65508, this.ON, 65509, 65510, this.ET, 65511, 65511, this.L, 65512, 65518,
555
+ this.ON, 65519, 65528, this.L, 65529, 65531, this.BN, 65532, 65533, this.ON, 65534, 65535, this.L
556
+ ];
557
+ for (var i = 0; i < this._charTypes.length; ++i) {
558
+ var start = this._charTypes[Number.parseInt(i.toString(), 10)];
559
+ var end = this._charTypes[++i];
560
+ var b = this._charTypes[++i];
561
+ while (start <= end) {
562
+ this._rtlCharacterTypes[start++] = b;
563
+ }
564
+ }
565
+ }
566
+ _RtlCharacters.prototype._getVisualOrder = function (inputText, isRtl) {
567
+ this._type = this._getCharacterCode(inputText);
568
+ this._textOrder = isRtl ? this.lre : this.L;
569
+ this._doVisualOrder();
570
+ var result = [];
571
+ for (var i = 0; i < this._levels.length; i++) {
572
+ result[Number.parseInt(i.toString(), 10)] = this._levels[Number.parseInt(i.toString(), 10)];
573
+ }
574
+ return result;
575
+ };
576
+ _RtlCharacters.prototype._getCharacterCode = function (text) {
577
+ var characterCodes = [];
578
+ for (var i = 0; i < text.length; i++) {
579
+ var value = text[Number.parseInt(i.toString(), 10)].charCodeAt(0); // eslint-disable-line
580
+ characterCodes[Number.parseInt(i.toString(), 10)] = this._rtlCharacterTypes[Number.parseInt(value.toString(), 10)];
581
+ }
582
+ return characterCodes;
583
+ };
584
+ _RtlCharacters.prototype._setDefaultLevels = function () {
585
+ for (var i = 0; i < this._length; i++) {
586
+ this._levels[Number.parseInt(i.toString(), 10)] = this._textOrder;
587
+ }
588
+ };
589
+ _RtlCharacters.prototype._setLevels = function () {
590
+ this._setDefaultLevels();
591
+ for (var n = 0; n < this._length; ++n) {
592
+ var level = this._levels[Number.parseInt(n.toString(), 10)];
593
+ this._levels[Number.parseInt(n.toString(), 10)] = level;
594
+ }
595
+ };
596
+ _RtlCharacters.prototype._updateLevels = function (index, level, length) {
597
+ if ((level & 1) === 0) {
598
+ for (var i = index; i < length; ++i) {
599
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.R) {
600
+ this._levels[Number.parseInt(i.toString(), 10)] += 1;
601
+ }
602
+ else if (this._result[Number.parseInt(i.toString(), 10)] !== this.L) {
603
+ this._levels[Number.parseInt(i.toString(), 10)] += 2;
604
+ }
605
+ }
606
+ }
607
+ else {
608
+ for (var i = index; i < length; ++i) {
609
+ if (this._result[Number.parseInt(i.toString(), 10)] !== this.R) {
610
+ this._levels[Number.parseInt(i.toString(), 10)] += 1;
611
+ }
612
+ }
613
+ }
614
+ };
615
+ _RtlCharacters.prototype._doVisualOrder = function () {
616
+ this._length = this._type.length;
617
+ this._result = this._type;
618
+ this._levels = [];
619
+ this._setLevels();
620
+ this._length = this._getEmbeddedCharactersLength();
621
+ var preview = this._textOrder;
622
+ var i = 0;
623
+ while (i < this._length) {
624
+ var level = this._levels[Number.parseInt(i.toString(), 10)];
625
+ var preType = ((Math.max(preview, level) & 0x1) === 0) ? this.L : this.R;
626
+ var length_1 = i + 1;
627
+ while (length_1 < this._length && this._levels[Number.parseInt(length_1.toString(), 10)] === level) {
628
+ ++length_1;
629
+ }
630
+ var success = length_1 < this._length ? this._levels[Number.parseInt(length_1.toString(), 10)] : this._textOrder;
631
+ var type = ((Math.max(success, level) & 0x1) === 0) ? this.L : this.R;
632
+ this._check(i, length_1, level, preType, type);
633
+ this._updateLevels(i, level, length_1);
634
+ preview = level;
635
+ i = length_1;
636
+ }
637
+ this._checkEmbeddedCharacters(this._length);
638
+ };
639
+ _RtlCharacters.prototype._getEmbeddedCharactersLength = function () {
640
+ var index = 0;
641
+ for (var i = 0; i < this._length; ++i) {
642
+ if (!(this._type[Number.parseInt(i.toString(), 10)] === this.lre || this._type[Number.parseInt(i.toString(), 10)] === this.rle
643
+ || this._type[Number.parseInt(i.toString(), 10)] === this.lro ||
644
+ this._type[Number.parseInt(i.toString(), 10)] === this.rlo || this._type[Number.parseInt(i.toString(), 10)] === this.pdf
645
+ || this._type[Number.parseInt(i.toString(), 10)] === this.BN)) {
646
+ this._result[Number.parseInt(index.toString(), 10)] = this._result[Number.parseInt(i.toString(), 10)];
647
+ this._levels[Number.parseInt(index.toString(), 10)] = this._levels[Number.parseInt(i.toString(), 10)];
648
+ index++;
649
+ }
650
+ }
651
+ return index;
652
+ };
653
+ _RtlCharacters.prototype._checkEmbeddedCharacters = function (length) {
654
+ for (var i = this._type.length - 1; i >= 0; --i) {
655
+ if (this._type[Number.parseInt(i.toString(), 10)] === this.lre || this._type[Number.parseInt(i.toString(), 10)] === this.rle
656
+ || this._type[Number.parseInt(i.toString(), 10)] === this.lro ||
657
+ this._type[Number.parseInt(i.toString(), 10)] === this.rlo || this._type[Number.parseInt(i.toString(), 10)] === this.pdf
658
+ || this._type[Number.parseInt(i.toString(), 10)] === this.BN) {
659
+ this._result[Number.parseInt(i.toString(), 10)] = this._type[Number.parseInt(i.toString(), 10)];
660
+ this._levels[Number.parseInt(i.toString(), 10)] = -1;
661
+ }
662
+ else {
663
+ length -= 1;
664
+ this._result[Number.parseInt(i.toString(), 10)] = this._result[Number.parseInt(length.toString(), 10)];
665
+ this._levels[Number.parseInt(i.toString(), 10)] = this._levels[Number.parseInt(length.toString(), 10)];
666
+ }
667
+ }
668
+ for (var i = 0; i < this._type.length; i++) {
669
+ if (this._levels[Number.parseInt(i.toString(), 10)] === -1) {
670
+ this._levels[Number.parseInt(i.toString(), 10)] = this._levels[i - 1];
671
+ }
672
+ }
673
+ };
674
+ _RtlCharacters.prototype._check = function (index, length, level, startType, endType) {
675
+ var charType = startType;
676
+ for (var i = index; i < length; ++i) {
677
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.nsm) {
678
+ this._result[Number.parseInt(i.toString(), 10)] = charType;
679
+ }
680
+ else {
681
+ charType = this._result[Number.parseInt(i.toString(), 10)];
682
+ }
683
+ }
684
+ this._checkEuropeanDigits(index, length, level, startType, endType);
685
+ };
686
+ _RtlCharacters.prototype._checkEuropeanDigits = function (index, length, level, startType, endType) {
687
+ for (var i = index; i < length; ++i) {
688
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.EN) {
689
+ for (var j = i - 1; j >= index; --j) {
690
+ if (this._result[Number.parseInt(j.toString(), 10)] === this.L ||
691
+ this._result[Number.parseInt(j.toString(), 10)] === this.R ||
692
+ this._result[Number.parseInt(j.toString(), 10)] === this.AL) {
693
+ if (this._result[Number.parseInt(j.toString(), 10)] === this.AL) {
694
+ this._result[Number.parseInt(i.toString(), 10)] = this.AN;
695
+ }
696
+ break;
697
+ }
698
+ }
699
+ }
700
+ }
701
+ this._checkArabicCharacters(index, length, level, startType, endType);
702
+ };
703
+ _RtlCharacters.prototype._checkArabicCharacters = function (index, length, level, startType, endType) {
704
+ for (var i = index; i < length; ++i) {
705
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.AL) {
706
+ this._result[Number.parseInt(i.toString(), 10)] = this.R;
707
+ }
708
+ }
709
+ this._checkEuropeanNumberSeparator(index, length, level, startType, endType);
710
+ };
711
+ _RtlCharacters.prototype._checkEuropeanNumberSeparator = function (index, length, level, startType, endType) {
712
+ for (var i = index + 1; i < length - 1; ++i) {
713
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.ES ||
714
+ this._result[Number.parseInt(i.toString(), 10)] === this.CS) {
715
+ var preview = this._result[i - 1];
716
+ var success = this._result[i + 1];
717
+ if (preview === this.EN && success === this.EN) {
718
+ this._result[Number.parseInt(i.toString(), 10)] = this.EN;
719
+ }
720
+ else if (this._result[Number.parseInt(i.toString(), 10)] === this.CS && preview === this.AN && success === this.AN) {
721
+ this._result[Number.parseInt(i.toString(), 10)] = this.AN;
722
+ }
723
+ }
724
+ }
725
+ this._checkEuropeanNumberTerminator(index, length, level, startType, endType);
726
+ };
727
+ _RtlCharacters.prototype._checkEuropeanNumberTerminator = function (index, length, level, startType, endType) {
728
+ for (var i = index; i < length; ++i) {
729
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.ET) {
730
+ var s = i;
731
+ var b = [];
732
+ b.push(this.ET);
733
+ var l = this._getLength(s, length, b);
734
+ var data = s === index ? startType : this._result[s - 1];
735
+ if (data !== this.EN) {
736
+ data = (l === length) ? endType : this._result[Number.parseInt(l.toString(), 10)];
737
+ }
738
+ i = l;
739
+ }
740
+ }
741
+ this._checkOtherNeutrals(index, length, level, startType, endType);
742
+ };
743
+ _RtlCharacters.prototype._checkOtherNeutrals = function (index, length, level, startType, endType) {
744
+ for (var i = index; i < length; ++i) {
745
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.ES || this._result[Number.parseInt(i.toString(), 10)] === this.ET
746
+ || this._result[Number.parseInt(i.toString(), 10)] === this.CS) {
747
+ this._result[Number.parseInt(i.toString(), 10)] = this.ON;
748
+ }
749
+ }
750
+ this._checkOtherCharacters(index, length, level, startType, endType);
751
+ };
752
+ _RtlCharacters.prototype._checkOtherCharacters = function (index, length, level, startType, endType) {
753
+ for (var i = index; i < length; ++i) {
754
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.EN) {
755
+ var pst = startType;
756
+ for (var j = i - 1; j >= index; --j) {
757
+ if (this._result[Number.parseInt(j.toString(), 10)] === this.L ||
758
+ this._result[Number.parseInt(j.toString(), 10)] === this.R) {
759
+ pst = this._result[Number.parseInt(j.toString(), 10)];
760
+ break;
761
+ }
762
+ }
763
+ if (pst === this.L) {
764
+ this._result[Number.parseInt(i.toString(), 10)] = this.L;
765
+ }
766
+ }
767
+ }
768
+ this._checkCharacters(index, length, level, startType, endType);
769
+ };
770
+ _RtlCharacters.prototype._getLength = function (index, length, validSet) {
771
+ --index;
772
+ while (++index < length) {
773
+ var t = this._result[Number.parseInt(index.toString(), 10)];
774
+ for (var i = 0; i < validSet.length; ++i) {
775
+ if (t === validSet[Number.parseInt(i.toString(), 10)]) {
776
+ index = this._getLength(++index, length, validSet);
777
+ }
778
+ }
779
+ return index;
780
+ }
781
+ return length;
782
+ };
783
+ _RtlCharacters.prototype._checkCharacters = function (index, length, level, startType, endType) {
784
+ for (var i = index; i < length; ++i) {
785
+ if (this._result[Number.parseInt(i.toString(), 10)] === this.WS ||
786
+ this._result[Number.parseInt(i.toString(), 10)] === this.ON ||
787
+ this._result[Number.parseInt(i.toString(), 10)] === this.B ||
788
+ this._result[Number.parseInt(i.toString(), 10)] === this.S) {
789
+ var s = i;
790
+ var byte = [this.B, this.S, this.WS, this.ON];
791
+ var l = this._getLength(s, length, byte);
792
+ var lt = 0;
793
+ var tt = 0;
794
+ var rt = 0;
795
+ if (s === index) {
796
+ lt = startType;
797
+ }
798
+ else {
799
+ lt = this._result[s - 1];
800
+ if (lt === this.AN) {
801
+ lt = this.R;
802
+ }
803
+ else if (lt === this.EN) {
804
+ lt = this.R;
805
+ }
806
+ }
807
+ if (l === length) {
808
+ tt = endType;
809
+ }
810
+ else {
811
+ tt = this._result[Number.parseInt(l.toString(), 10)];
812
+ if (tt === this.AN) {
813
+ tt = this.R;
814
+ }
815
+ }
816
+ if (lt === tt) {
817
+ rt = lt;
818
+ }
819
+ else {
820
+ rt = ((level & 0x1) === 0) ? this.L : this.R;
821
+ }
822
+ for (var j = s; j < l; ++j) {
823
+ this._result[Number.parseInt(j.toString(), 10)] = rt;
824
+ }
825
+ i = l;
826
+ }
827
+ }
828
+ };
829
+ return _RtlCharacters;
830
+ }());
831
+ export { _RtlCharacters };