umwd-components 0.1.826 → 0.1.828

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 (440) hide show
  1. package/dist/cjs/node_modules/object-assign/index.js +2 -2
  2. package/dist/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  3. package/dist/cjs/node_modules/prop-types/index.js +1 -1
  4. package/dist/cjs/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  5. package/dist/cjs/node_modules/safe-buffer/index.js +1 -1
  6. package/dist/cjs/src/components/e-commerce/products/EditReturnStockForm.js +1 -1
  7. package/dist/cjs/src/components/logistics/report/ReportMakingComponent.js +1 -1
  8. package/dist/cjs/src/components/logistics/vendor/EditVendorForm.js +1 -1
  9. package/dist/cjs/src/data/actions/logistics/note/createNoteAction.js +1 -1
  10. package/dist/cjs/src/data/actions/logistics/report/createReportAction.js +1 -1
  11. package/dist/cjs/src/index.js +1 -1
  12. package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
  13. package/dist/esm/_virtual/index2.js +2 -2
  14. package/dist/esm/_virtual/index3.js +2 -2
  15. package/dist/esm/_virtual/index4.js +2 -2
  16. package/dist/esm/node_modules/object-assign/index.js +74 -69
  17. package/dist/esm/node_modules/prop-types/factoryWithTypeCheckers.js +2 -2
  18. package/dist/esm/node_modules/prop-types/index.js +1 -1
  19. package/dist/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  20. package/dist/esm/node_modules/safe-buffer/index.js +1 -1
  21. package/dist/esm/src/components/e-commerce/products/EditReturnStockForm.js +11 -22
  22. package/dist/esm/src/components/logistics/report/ReportMakingComponent.js +0 -1
  23. package/dist/esm/src/components/logistics/vendor/EditVendorForm.js +0 -1
  24. package/dist/esm/src/data/actions/logistics/note/createNoteAction.js +0 -2
  25. package/dist/esm/src/data/actions/logistics/report/createReportAction.js +0 -2
  26. package/dist/esm/src/index.js +0 -1
  27. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  28. package/dist/esm/types/data/actions/e-commerce/lead/contactFormAction.d.ts +1 -0
  29. package/dist/esm/types/index.d.ts +0 -3
  30. package/package.json +1 -1
  31. package/dist/cjs/_virtual/_commonjs-dynamic-modules.js +0 -6
  32. package/dist/cjs/_virtual/aes.js +0 -6
  33. package/dist/cjs/_virtual/b64.js +0 -6
  34. package/dist/cjs/_virtual/blowfish.js +0 -6
  35. package/dist/cjs/_virtual/cipher-core.js +0 -6
  36. package/dist/cjs/_virtual/clone.js +0 -6
  37. package/dist/cjs/_virtual/common.js +0 -6
  38. package/dist/cjs/_virtual/context.js +0 -6
  39. package/dist/cjs/_virtual/core2.js +0 -6
  40. package/dist/cjs/_virtual/decode.js +0 -6
  41. package/dist/cjs/_virtual/deflate.js +0 -6
  42. package/dist/cjs/_virtual/dictionary-browser.js +0 -6
  43. package/dist/cjs/_virtual/dictionary.js +0 -6
  44. package/dist/cjs/_virtual/en-us.js +0 -6
  45. package/dist/cjs/_virtual/enc-base64.js +0 -6
  46. package/dist/cjs/_virtual/enc-base64url.js +0 -6
  47. package/dist/cjs/_virtual/enc-utf16.js +0 -6
  48. package/dist/cjs/_virtual/events.js +0 -6
  49. package/dist/cjs/_virtual/evpkdf.js +0 -6
  50. package/dist/cjs/_virtual/format-hex.js +0 -6
  51. package/dist/cjs/_virtual/hmac.js +0 -6
  52. package/dist/cjs/_virtual/huffman.js +0 -6
  53. package/dist/cjs/_virtual/hyphen.js +0 -6
  54. package/dist/cjs/_virtual/index10.js +0 -6
  55. package/dist/cjs/_virtual/index5.js +0 -6
  56. package/dist/cjs/_virtual/index6.js +0 -6
  57. package/dist/cjs/_virtual/index7.js +0 -6
  58. package/dist/cjs/_virtual/index8.js +0 -6
  59. package/dist/cjs/_virtual/index9.js +0 -6
  60. package/dist/cjs/_virtual/inflate.js +0 -6
  61. package/dist/cjs/_virtual/inherits_browser.js +0 -6
  62. package/dist/cjs/_virtual/lib-typedarrays.js +0 -6
  63. package/dist/cjs/_virtual/md5.js +0 -6
  64. package/dist/cjs/_virtual/mode-cfb.js +0 -6
  65. package/dist/cjs/_virtual/mode-ctr-gladman.js +0 -6
  66. package/dist/cjs/_virtual/mode-ctr.js +0 -6
  67. package/dist/cjs/_virtual/mode-ecb.js +0 -6
  68. package/dist/cjs/_virtual/mode-ofb.js +0 -6
  69. package/dist/cjs/_virtual/pad-ansix923.js +0 -6
  70. package/dist/cjs/_virtual/pad-iso10126.js +0 -6
  71. package/dist/cjs/_virtual/pad-iso97971.js +0 -6
  72. package/dist/cjs/_virtual/pad-nopadding.js +0 -6
  73. package/dist/cjs/_virtual/pad-zeropadding.js +0 -6
  74. package/dist/cjs/_virtual/pbkdf2.js +0 -6
  75. package/dist/cjs/_virtual/prefix.js +0 -6
  76. package/dist/cjs/_virtual/rabbit-legacy.js +0 -6
  77. package/dist/cjs/_virtual/rabbit.js +0 -6
  78. package/dist/cjs/_virtual/rc4.js +0 -6
  79. package/dist/cjs/_virtual/ripemd160.js +0 -6
  80. package/dist/cjs/_virtual/scheduler.development.js +0 -6
  81. package/dist/cjs/_virtual/scheduler.production.js +0 -6
  82. package/dist/cjs/_virtual/sha1.js +0 -6
  83. package/dist/cjs/_virtual/sha224.js +0 -6
  84. package/dist/cjs/_virtual/sha256.js +0 -6
  85. package/dist/cjs/_virtual/sha3.js +0 -6
  86. package/dist/cjs/_virtual/sha384.js +0 -6
  87. package/dist/cjs/_virtual/sha512.js +0 -6
  88. package/dist/cjs/_virtual/streams.js +0 -6
  89. package/dist/cjs/_virtual/transform.js +0 -6
  90. package/dist/cjs/_virtual/trees.js +0 -6
  91. package/dist/cjs/_virtual/tripledes.js +0 -6
  92. package/dist/cjs/_virtual/x64-core.js +0 -6
  93. package/dist/cjs/node_modules/@react-pdf/fns/lib/index.js +0 -6
  94. package/dist/cjs/node_modules/@react-pdf/font/lib/index.browser.js +0 -6
  95. package/dist/cjs/node_modules/@react-pdf/image/lib/index.browser.js +0 -6
  96. package/dist/cjs/node_modules/@react-pdf/layout/lib/index.js +0 -6
  97. package/dist/cjs/node_modules/@react-pdf/pdfkit/lib/pdfkit.browser.js +0 -6
  98. package/dist/cjs/node_modules/@react-pdf/png-js/lib/png-js.browser.js +0 -6
  99. package/dist/cjs/node_modules/@react-pdf/primitives/lib/index.js +0 -6
  100. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/index.js +0 -6
  101. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/reconciler-23.js +0 -14
  102. package/dist/cjs/node_modules/@react-pdf/reconciler/lib/reconciler-31.js +0 -26
  103. package/dist/cjs/node_modules/@react-pdf/render/lib/index.js +0 -6
  104. package/dist/cjs/node_modules/@react-pdf/renderer/lib/react-pdf.browser.js +0 -6
  105. package/dist/cjs/node_modules/@react-pdf/stylesheet/lib/index.js +0 -6
  106. package/dist/cjs/node_modules/@react-pdf/textkit/lib/textkit.js +0 -13
  107. package/dist/cjs/node_modules/@swc/helpers/esm/_define_property.js +0 -6
  108. package/dist/cjs/node_modules/abs-svg-path/index.js +0 -6
  109. package/dist/cjs/node_modules/base64-js/index.js +0 -6
  110. package/dist/cjs/node_modules/bidi-js/dist/bidi.js +0 -6
  111. package/dist/cjs/node_modules/brotli/dec/bit_reader.js +0 -6
  112. package/dist/cjs/node_modules/brotli/dec/context.js +0 -6
  113. package/dist/cjs/node_modules/brotli/dec/decode.js +0 -6
  114. package/dist/cjs/node_modules/brotli/dec/dictionary-browser.js +0 -6
  115. package/dist/cjs/node_modules/brotli/dec/dictionary.bin.js +0 -6
  116. package/dist/cjs/node_modules/brotli/dec/dictionary.js +0 -6
  117. package/dist/cjs/node_modules/brotli/dec/huffman.js +0 -6
  118. package/dist/cjs/node_modules/brotli/dec/prefix.js +0 -6
  119. package/dist/cjs/node_modules/brotli/dec/streams.js +0 -6
  120. package/dist/cjs/node_modules/brotli/dec/transform.js +0 -6
  121. package/dist/cjs/node_modules/brotli/decompress.js +0 -6
  122. package/dist/cjs/node_modules/clone/clone.js +0 -6
  123. package/dist/cjs/node_modules/color-name/index.js +0 -6
  124. package/dist/cjs/node_modules/color-string/index.js +0 -6
  125. package/dist/cjs/node_modules/crypto-js/aes.js +0 -6
  126. package/dist/cjs/node_modules/crypto-js/blowfish.js +0 -6
  127. package/dist/cjs/node_modules/crypto-js/cipher-core.js +0 -6
  128. package/dist/cjs/node_modules/crypto-js/core.js +0 -6
  129. package/dist/cjs/node_modules/crypto-js/enc-base64.js +0 -6
  130. package/dist/cjs/node_modules/crypto-js/enc-base64url.js +0 -6
  131. package/dist/cjs/node_modules/crypto-js/enc-utf16.js +0 -6
  132. package/dist/cjs/node_modules/crypto-js/evpkdf.js +0 -6
  133. package/dist/cjs/node_modules/crypto-js/format-hex.js +0 -6
  134. package/dist/cjs/node_modules/crypto-js/hmac.js +0 -6
  135. package/dist/cjs/node_modules/crypto-js/index.js +0 -6
  136. package/dist/cjs/node_modules/crypto-js/lib-typedarrays.js +0 -6
  137. package/dist/cjs/node_modules/crypto-js/md5.js +0 -6
  138. package/dist/cjs/node_modules/crypto-js/mode-cfb.js +0 -6
  139. package/dist/cjs/node_modules/crypto-js/mode-ctr-gladman.js +0 -12
  140. package/dist/cjs/node_modules/crypto-js/mode-ctr.js +0 -6
  141. package/dist/cjs/node_modules/crypto-js/mode-ecb.js +0 -6
  142. package/dist/cjs/node_modules/crypto-js/mode-ofb.js +0 -6
  143. package/dist/cjs/node_modules/crypto-js/pad-ansix923.js +0 -6
  144. package/dist/cjs/node_modules/crypto-js/pad-iso10126.js +0 -6
  145. package/dist/cjs/node_modules/crypto-js/pad-iso97971.js +0 -6
  146. package/dist/cjs/node_modules/crypto-js/pad-nopadding.js +0 -6
  147. package/dist/cjs/node_modules/crypto-js/pad-zeropadding.js +0 -6
  148. package/dist/cjs/node_modules/crypto-js/pbkdf2.js +0 -6
  149. package/dist/cjs/node_modules/crypto-js/rabbit-legacy.js +0 -6
  150. package/dist/cjs/node_modules/crypto-js/rabbit.js +0 -6
  151. package/dist/cjs/node_modules/crypto-js/rc4.js +0 -6
  152. package/dist/cjs/node_modules/crypto-js/ripemd160.js +0 -17
  153. package/dist/cjs/node_modules/crypto-js/sha1.js +0 -6
  154. package/dist/cjs/node_modules/crypto-js/sha224.js +0 -6
  155. package/dist/cjs/node_modules/crypto-js/sha256.js +0 -6
  156. package/dist/cjs/node_modules/crypto-js/sha3.js +0 -6
  157. package/dist/cjs/node_modules/crypto-js/sha384.js +0 -6
  158. package/dist/cjs/node_modules/crypto-js/sha512.js +0 -6
  159. package/dist/cjs/node_modules/crypto-js/tripledes.js +0 -6
  160. package/dist/cjs/node_modules/crypto-js/x64-core.js +0 -6
  161. package/dist/cjs/node_modules/dfa/index.js +0 -6
  162. package/dist/cjs/node_modules/emoji-regex/index.js +0 -6
  163. package/dist/cjs/node_modules/events/events.js +0 -6
  164. package/dist/cjs/node_modules/fast-deep-equal/index.js +0 -6
  165. package/dist/cjs/node_modules/fontkit/dist/browser-module.js +0 -6
  166. package/dist/cjs/node_modules/hsl-to-hex/index.js +0 -6
  167. package/dist/cjs/node_modules/hsl-to-rgb-for-reals/converter.js +0 -6
  168. package/dist/cjs/node_modules/hyphen/hyphen.js +0 -6
  169. package/dist/cjs/node_modules/hyphen/patterns/en-us.js +0 -6
  170. package/dist/cjs/node_modules/inherits/inherits_browser.js +0 -6
  171. package/dist/cjs/node_modules/jay-peg/src/index.js +0 -6
  172. package/dist/cjs/node_modules/jay-peg/src/markers/dac.js +0 -6
  173. package/dist/cjs/node_modules/jay-peg/src/markers/dht.js +0 -6
  174. package/dist/cjs/node_modules/jay-peg/src/markers/dqt.js +0 -6
  175. package/dist/cjs/node_modules/jay-peg/src/markers/dri.js +0 -6
  176. package/dist/cjs/node_modules/jay-peg/src/markers/eoi.js +0 -6
  177. package/dist/cjs/node_modules/jay-peg/src/markers/exif.js +0 -6
  178. package/dist/cjs/node_modules/jay-peg/src/markers/jfif.js +0 -6
  179. package/dist/cjs/node_modules/jay-peg/src/markers/sof.js +0 -6
  180. package/dist/cjs/node_modules/jay-peg/src/markers/soi.js +0 -6
  181. package/dist/cjs/node_modules/jay-peg/src/markers/sos.js +0 -6
  182. package/dist/cjs/node_modules/jay-peg/src/markers/utils.js +0 -6
  183. package/dist/cjs/node_modules/linebreak/dist/module.js +0 -6
  184. package/dist/cjs/node_modules/linebreak/node_modules/base64-js/lib/b64.js +0 -6
  185. package/dist/cjs/node_modules/media-engine/src/index.js +0 -6
  186. package/dist/cjs/node_modules/media-engine/src/operators.js +0 -6
  187. package/dist/cjs/node_modules/media-engine/src/parser.js +0 -6
  188. package/dist/cjs/node_modules/media-engine/src/queries.js +0 -6
  189. package/dist/cjs/node_modules/normalize-svg-path/index.js +0 -6
  190. package/dist/cjs/node_modules/pako/lib/utils/common.js +0 -6
  191. package/dist/cjs/node_modules/pako/lib/zlib/adler32.js +0 -6
  192. package/dist/cjs/node_modules/pako/lib/zlib/constants.js +0 -6
  193. package/dist/cjs/node_modules/pako/lib/zlib/crc32.js +0 -6
  194. package/dist/cjs/node_modules/pako/lib/zlib/deflate.js +0 -6
  195. package/dist/cjs/node_modules/pako/lib/zlib/inffast.js +0 -6
  196. package/dist/cjs/node_modules/pako/lib/zlib/inflate.js +0 -6
  197. package/dist/cjs/node_modules/pako/lib/zlib/inftrees.js +0 -6
  198. package/dist/cjs/node_modules/pako/lib/zlib/messages.js +0 -6
  199. package/dist/cjs/node_modules/pako/lib/zlib/trees.js +0 -6
  200. package/dist/cjs/node_modules/pako/lib/zlib/zstream.js +0 -6
  201. package/dist/cjs/node_modules/parse-svg-path/index.js +0 -6
  202. package/dist/cjs/node_modules/postcss-value-parser/lib/parse.js +0 -6
  203. package/dist/cjs/node_modules/postcss-value-parser/lib/unit.js +0 -6
  204. package/dist/cjs/node_modules/queue/index.js +0 -6
  205. package/dist/cjs/node_modules/restructure/src/Array.js +0 -6
  206. package/dist/cjs/node_modules/restructure/src/Base.js +0 -6
  207. package/dist/cjs/node_modules/restructure/src/Bitfield.js +0 -6
  208. package/dist/cjs/node_modules/restructure/src/Buffer.js +0 -6
  209. package/dist/cjs/node_modules/restructure/src/DecodeStream.js +0 -6
  210. package/dist/cjs/node_modules/restructure/src/EncodeStream.js +0 -6
  211. package/dist/cjs/node_modules/restructure/src/LazyArray.js +0 -6
  212. package/dist/cjs/node_modules/restructure/src/Number.js +0 -6
  213. package/dist/cjs/node_modules/restructure/src/Optional.js +0 -6
  214. package/dist/cjs/node_modules/restructure/src/Pointer.js +0 -6
  215. package/dist/cjs/node_modules/restructure/src/Reserved.js +0 -6
  216. package/dist/cjs/node_modules/restructure/src/String.js +0 -6
  217. package/dist/cjs/node_modules/restructure/src/Struct.js +0 -6
  218. package/dist/cjs/node_modules/restructure/src/VersionedStruct.js +0 -6
  219. package/dist/cjs/node_modules/restructure/src/utils.js +0 -6
  220. package/dist/cjs/node_modules/scheduler/cjs/scheduler.development.js +0 -15
  221. package/dist/cjs/node_modules/scheduler/cjs/scheduler.production.js +0 -15
  222. package/dist/cjs/node_modules/scheduler/index.js +0 -6
  223. package/dist/cjs/node_modules/simple-swizzle/index.js +0 -6
  224. package/dist/cjs/node_modules/simple-swizzle/node_modules/is-arrayish/index.js +0 -6
  225. package/dist/cjs/node_modules/svg-arc-to-cubic-bezier/modules/index.js +0 -6
  226. package/dist/cjs/node_modules/tiny-inflate/index.js +0 -6
  227. package/dist/cjs/node_modules/tslib/tslib.es6.js +0 -6
  228. package/dist/cjs/node_modules/unicode-properties/dist/module.js +0 -6
  229. package/dist/cjs/node_modules/unicode-trie/index.js +0 -6
  230. package/dist/cjs/node_modules/unicode-trie/swap.js +0 -6
  231. package/dist/cjs/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js +0 -6
  232. package/dist/cjs/node_modules/yoga-layout/dist/src/generated/YGEnums.js +0 -6
  233. package/dist/cjs/node_modules/yoga-layout/dist/src/load.js +0 -6
  234. package/dist/cjs/node_modules/yoga-layout/dist/src/wrapAssembly.js +0 -6
  235. package/dist/cjs/src/components/e-commerce/invoice/InvoicePDF.js +0 -7
  236. package/dist/esm/_virtual/_commonjs-dynamic-modules.js +0 -11
  237. package/dist/esm/_virtual/aes.js +0 -9
  238. package/dist/esm/_virtual/b64.js +0 -9
  239. package/dist/esm/_virtual/blowfish.js +0 -9
  240. package/dist/esm/_virtual/cipher-core.js +0 -9
  241. package/dist/esm/_virtual/clone.js +0 -9
  242. package/dist/esm/_virtual/common.js +0 -9
  243. package/dist/esm/_virtual/context.js +0 -9
  244. package/dist/esm/_virtual/core2.js +0 -9
  245. package/dist/esm/_virtual/decode.js +0 -9
  246. package/dist/esm/_virtual/deflate.js +0 -9
  247. package/dist/esm/_virtual/dictionary-browser.js +0 -9
  248. package/dist/esm/_virtual/dictionary.js +0 -9
  249. package/dist/esm/_virtual/en-us.js +0 -9
  250. package/dist/esm/_virtual/enc-base64.js +0 -9
  251. package/dist/esm/_virtual/enc-base64url.js +0 -9
  252. package/dist/esm/_virtual/enc-utf16.js +0 -9
  253. package/dist/esm/_virtual/events.js +0 -9
  254. package/dist/esm/_virtual/evpkdf.js +0 -9
  255. package/dist/esm/_virtual/format-hex.js +0 -9
  256. package/dist/esm/_virtual/hmac.js +0 -9
  257. package/dist/esm/_virtual/huffman.js +0 -9
  258. package/dist/esm/_virtual/hyphen.js +0 -9
  259. package/dist/esm/_virtual/index10.js +0 -9
  260. package/dist/esm/_virtual/index5.js +0 -9
  261. package/dist/esm/_virtual/index6.js +0 -9
  262. package/dist/esm/_virtual/index7.js +0 -9
  263. package/dist/esm/_virtual/index8.js +0 -9
  264. package/dist/esm/_virtual/index9.js +0 -9
  265. package/dist/esm/_virtual/inflate.js +0 -9
  266. package/dist/esm/_virtual/inherits_browser.js +0 -9
  267. package/dist/esm/_virtual/lib-typedarrays.js +0 -9
  268. package/dist/esm/_virtual/md5.js +0 -9
  269. package/dist/esm/_virtual/mode-cfb.js +0 -9
  270. package/dist/esm/_virtual/mode-ctr-gladman.js +0 -9
  271. package/dist/esm/_virtual/mode-ctr.js +0 -9
  272. package/dist/esm/_virtual/mode-ecb.js +0 -9
  273. package/dist/esm/_virtual/mode-ofb.js +0 -9
  274. package/dist/esm/_virtual/pad-ansix923.js +0 -9
  275. package/dist/esm/_virtual/pad-iso10126.js +0 -9
  276. package/dist/esm/_virtual/pad-iso97971.js +0 -9
  277. package/dist/esm/_virtual/pad-nopadding.js +0 -9
  278. package/dist/esm/_virtual/pad-zeropadding.js +0 -9
  279. package/dist/esm/_virtual/pbkdf2.js +0 -9
  280. package/dist/esm/_virtual/prefix.js +0 -9
  281. package/dist/esm/_virtual/rabbit-legacy.js +0 -9
  282. package/dist/esm/_virtual/rabbit.js +0 -9
  283. package/dist/esm/_virtual/rc4.js +0 -9
  284. package/dist/esm/_virtual/ripemd160.js +0 -9
  285. package/dist/esm/_virtual/scheduler.development.js +0 -9
  286. package/dist/esm/_virtual/scheduler.production.js +0 -9
  287. package/dist/esm/_virtual/sha1.js +0 -9
  288. package/dist/esm/_virtual/sha224.js +0 -9
  289. package/dist/esm/_virtual/sha256.js +0 -9
  290. package/dist/esm/_virtual/sha3.js +0 -9
  291. package/dist/esm/_virtual/sha384.js +0 -9
  292. package/dist/esm/_virtual/sha512.js +0 -9
  293. package/dist/esm/_virtual/streams.js +0 -9
  294. package/dist/esm/_virtual/transform.js +0 -9
  295. package/dist/esm/_virtual/trees.js +0 -9
  296. package/dist/esm/_virtual/tripledes.js +0 -9
  297. package/dist/esm/_virtual/x64-core.js +0 -9
  298. package/dist/esm/node_modules/@react-pdf/fns/lib/index.js +0 -254
  299. package/dist/esm/node_modules/@react-pdf/font/lib/index.browser.js +0 -481
  300. package/dist/esm/node_modules/@react-pdf/image/lib/index.browser.js +0 -2217
  301. package/dist/esm/node_modules/@react-pdf/layout/lib/index.js +0 -2982
  302. package/dist/esm/node_modules/@react-pdf/pdfkit/lib/pdfkit.browser.js +0 -47429
  303. package/dist/esm/node_modules/@react-pdf/png-js/lib/png-js.browser.js +0 -12606
  304. package/dist/esm/node_modules/@react-pdf/primitives/lib/index.js +0 -37
  305. package/dist/esm/node_modules/@react-pdf/reconciler/lib/index.js +0 -16
  306. package/dist/esm/node_modules/@react-pdf/reconciler/lib/reconciler-23.js +0 -22
  307. package/dist/esm/node_modules/@react-pdf/reconciler/lib/reconciler-31.js +0 -30
  308. package/dist/esm/node_modules/@react-pdf/render/lib/index.js +0 -2081
  309. package/dist/esm/node_modules/@react-pdf/renderer/lib/react-pdf.browser.js +0 -472
  310. package/dist/esm/node_modules/@react-pdf/stylesheet/lib/index.js +0 -771
  311. package/dist/esm/node_modules/@react-pdf/textkit/lib/textkit.js +0 -2854
  312. package/dist/esm/node_modules/@swc/helpers/esm/_define_property.js +0 -15
  313. package/dist/esm/node_modules/abs-svg-path/index.js +0 -78
  314. package/dist/esm/node_modules/base64-js/index.js +0 -158
  315. package/dist/esm/node_modules/bidi-js/dist/bidi.js +0 -1008
  316. package/dist/esm/node_modules/brotli/dec/bit_reader.js +0 -132
  317. package/dist/esm/node_modules/brotli/dec/context.js +0 -255
  318. package/dist/esm/node_modules/brotli/dec/decode.js +0 -965
  319. package/dist/esm/node_modules/brotli/dec/dictionary-browser.js +0 -35
  320. package/dist/esm/node_modules/brotli/dec/dictionary.bin.js +0 -17
  321. package/dist/esm/node_modules/brotli/dec/dictionary.js +0 -54
  322. package/dist/esm/node_modules/brotli/dec/huffman.js +0 -133
  323. package/dist/esm/node_modules/brotli/dec/prefix.js +0 -70
  324. package/dist/esm/node_modules/brotli/dec/streams.js +0 -44
  325. package/dist/esm/node_modules/brotli/dec/transform.js +0 -264
  326. package/dist/esm/node_modules/brotli/decompress.js +0 -14
  327. package/dist/esm/node_modules/clone/clone.js +0 -272
  328. package/dist/esm/node_modules/color-name/index.js +0 -158
  329. package/dist/esm/node_modules/color-string/index.js +0 -259
  330. package/dist/esm/node_modules/crypto-js/aes.js +0 -251
  331. package/dist/esm/node_modules/crypto-js/blowfish.js +0 -488
  332. package/dist/esm/node_modules/crypto-js/cipher-core.js +0 -909
  333. package/dist/esm/node_modules/crypto-js/core.js +0 -820
  334. package/dist/esm/node_modules/crypto-js/enc-base64.js +0 -149
  335. package/dist/esm/node_modules/crypto-js/enc-base64url.js +0 -161
  336. package/dist/esm/node_modules/crypto-js/enc-utf16.js +0 -162
  337. package/dist/esm/node_modules/crypto-js/evpkdf.js +0 -149
  338. package/dist/esm/node_modules/crypto-js/format-hex.js +0 -80
  339. package/dist/esm/node_modules/crypto-js/hmac.js +0 -156
  340. package/dist/esm/node_modules/crypto-js/index.js +0 -61
  341. package/dist/esm/node_modules/crypto-js/lib-typedarrays.js +0 -89
  342. package/dist/esm/node_modules/crypto-js/md5.js +0 -277
  343. package/dist/esm/node_modules/crypto-js/mode-cfb.js +0 -94
  344. package/dist/esm/node_modules/crypto-js/mode-ctr-gladman.js +0 -130
  345. package/dist/esm/node_modules/crypto-js/mode-ctr.js +0 -72
  346. package/dist/esm/node_modules/crypto-js/mode-ecb.js +0 -54
  347. package/dist/esm/node_modules/crypto-js/mode-ofb.js +0 -68
  348. package/dist/esm/node_modules/crypto-js/pad-ansix923.js +0 -63
  349. package/dist/esm/node_modules/crypto-js/pad-iso10126.js +0 -58
  350. package/dist/esm/node_modules/crypto-js/pad-iso97971.js +0 -54
  351. package/dist/esm/node_modules/crypto-js/pad-nopadding.js +0 -44
  352. package/dist/esm/node_modules/crypto-js/pad-zeropadding.js +0 -61
  353. package/dist/esm/node_modules/crypto-js/pbkdf2.js +0 -160
  354. package/dist/esm/node_modules/crypto-js/rabbit-legacy.js +0 -207
  355. package/dist/esm/node_modules/crypto-js/rabbit.js +0 -209
  356. package/dist/esm/node_modules/crypto-js/rc4.js +0 -156
  357. package/dist/esm/node_modules/crypto-js/ripemd160.js +0 -280
  358. package/dist/esm/node_modules/crypto-js/sha1.js +0 -163
  359. package/dist/esm/node_modules/crypto-js/sha224.js +0 -94
  360. package/dist/esm/node_modules/crypto-js/sha256.js +0 -212
  361. package/dist/esm/node_modules/crypto-js/sha3.js +0 -340
  362. package/dist/esm/node_modules/crypto-js/sha384.js +0 -98
  363. package/dist/esm/node_modules/crypto-js/sha512.js +0 -340
  364. package/dist/esm/node_modules/crypto-js/tripledes.js +0 -796
  365. package/dist/esm/node_modules/crypto-js/x64-core.js +0 -317
  366. package/dist/esm/node_modules/dfa/index.js +0 -101
  367. package/dist/esm/node_modules/emoji-regex/index.js +0 -12
  368. package/dist/esm/node_modules/events/events.js +0 -485
  369. package/dist/esm/node_modules/fast-deep-equal/index.js +0 -56
  370. package/dist/esm/node_modules/fontkit/dist/browser-module.js +0 -13295
  371. package/dist/esm/node_modules/hsl-to-hex/index.js +0 -72
  372. package/dist/esm/node_modules/hsl-to-rgb-for-reals/converter.js +0 -66
  373. package/dist/esm/node_modules/hyphen/hyphen.js +0 -424
  374. package/dist/esm/node_modules/hyphen/patterns/en-us.js +0 -48
  375. package/dist/esm/node_modules/inherits/inherits_browser.js +0 -39
  376. package/dist/esm/node_modules/jay-peg/src/index.js +0 -68
  377. package/dist/esm/node_modules/jay-peg/src/markers/dac.js +0 -25
  378. package/dist/esm/node_modules/jay-peg/src/markers/dht.js +0 -52
  379. package/dist/esm/node_modules/jay-peg/src/markers/dqt.js +0 -26
  380. package/dist/esm/node_modules/jay-peg/src/markers/dri.js +0 -17
  381. package/dist/esm/node_modules/jay-peg/src/markers/eoi.js +0 -17
  382. package/dist/esm/node_modules/jay-peg/src/markers/exif.js +0 -327
  383. package/dist/esm/node_modules/jay-peg/src/markers/jfif.js +0 -24
  384. package/dist/esm/node_modules/jay-peg/src/markers/sof.js +0 -32
  385. package/dist/esm/node_modules/jay-peg/src/markers/soi.js +0 -11
  386. package/dist/esm/node_modules/jay-peg/src/markers/sos.js +0 -57
  387. package/dist/esm/node_modules/jay-peg/src/markers/utils.js +0 -71
  388. package/dist/esm/node_modules/linebreak/dist/module.js +0 -1340
  389. package/dist/esm/node_modules/linebreak/node_modules/base64-js/lib/b64.js +0 -137
  390. package/dist/esm/node_modules/media-engine/src/index.js +0 -26
  391. package/dist/esm/node_modules/media-engine/src/operators.js +0 -36
  392. package/dist/esm/node_modules/media-engine/src/parser.js +0 -147
  393. package/dist/esm/node_modules/media-engine/src/queries.js +0 -64
  394. package/dist/esm/node_modules/normalize-svg-path/index.js +0 -126
  395. package/dist/esm/node_modules/pako/lib/utils/common.js +0 -114
  396. package/dist/esm/node_modules/pako/lib/zlib/adler32.js +0 -57
  397. package/dist/esm/node_modules/pako/lib/zlib/constants.js +0 -78
  398. package/dist/esm/node_modules/pako/lib/zlib/crc32.js +0 -65
  399. package/dist/esm/node_modules/pako/lib/zlib/deflate.js +0 -1880
  400. package/dist/esm/node_modules/pako/lib/zlib/inffast.js +0 -351
  401. package/dist/esm/node_modules/pako/lib/zlib/inflate.js +0 -1557
  402. package/dist/esm/node_modules/pako/lib/zlib/inftrees.js +0 -352
  403. package/dist/esm/node_modules/pako/lib/zlib/messages.js +0 -38
  404. package/dist/esm/node_modules/pako/lib/zlib/trees.js +0 -1232
  405. package/dist/esm/node_modules/pako/lib/zlib/zstream.js +0 -57
  406. package/dist/esm/node_modules/parse-svg-path/index.js +0 -68
  407. package/dist/esm/node_modules/postcss-value-parser/lib/parse.js +0 -333
  408. package/dist/esm/node_modules/postcss-value-parser/lib/unit.js +0 -132
  409. package/dist/esm/node_modules/queue/index.js +0 -211
  410. package/dist/esm/node_modules/restructure/src/Array.js +0 -112
  411. package/dist/esm/node_modules/restructure/src/Base.js +0 -25
  412. package/dist/esm/node_modules/restructure/src/Bitfield.js +0 -47
  413. package/dist/esm/node_modules/restructure/src/Buffer.js +0 -44
  414. package/dist/esm/node_modules/restructure/src/DecodeStream.js +0 -93
  415. package/dist/esm/node_modules/restructure/src/EncodeStream.js +0 -137
  416. package/dist/esm/node_modules/restructure/src/LazyArray.js +0 -82
  417. package/dist/esm/node_modules/restructure/src/Number.js +0 -80
  418. package/dist/esm/node_modules/restructure/src/Optional.js +0 -52
  419. package/dist/esm/node_modules/restructure/src/Pointer.js +0 -175
  420. package/dist/esm/node_modules/restructure/src/Reserved.js +0 -31
  421. package/dist/esm/node_modules/restructure/src/String.js +0 -161
  422. package/dist/esm/node_modules/restructure/src/Struct.js +0 -121
  423. package/dist/esm/node_modules/restructure/src/VersionedStruct.js +0 -147
  424. package/dist/esm/node_modules/restructure/src/utils.js +0 -42
  425. package/dist/esm/node_modules/scheduler/cjs/scheduler.development.js +0 -382
  426. package/dist/esm/node_modules/scheduler/cjs/scheduler.production.js +0 -359
  427. package/dist/esm/node_modules/scheduler/index.js +0 -21
  428. package/dist/esm/node_modules/simple-swizzle/index.js +0 -40
  429. package/dist/esm/node_modules/simple-swizzle/node_modules/is-arrayish/index.js +0 -17
  430. package/dist/esm/node_modules/svg-arc-to-cubic-bezier/modules/index.js +0 -189
  431. package/dist/esm/node_modules/tiny-inflate/index.js +0 -387
  432. package/dist/esm/node_modules/tslib/tslib.es6.js +0 -36
  433. package/dist/esm/node_modules/unicode-properties/dist/module.js +0 -132
  434. package/dist/esm/node_modules/unicode-trie/index.js +0 -150
  435. package/dist/esm/node_modules/unicode-trie/swap.js +0 -33
  436. package/dist/esm/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js +0 -81
  437. package/dist/esm/node_modules/yoga-layout/dist/src/generated/YGEnums.js +0 -217
  438. package/dist/esm/node_modules/yoga-layout/dist/src/load.js +0 -24
  439. package/dist/esm/node_modules/yoga-layout/dist/src/wrapAssembly.js +0 -130
  440. package/dist/esm/src/components/e-commerce/invoice/InvoicePDF.js +0 -181
@@ -1,1008 +0,0 @@
1
- /*
2
- * UMWD-Components
3
- * @copyright Jelle Paulus
4
- * @license MIT
5
- */
6
-
7
- function bidiFactory() {
8
- var bidi = (function (exports) {
9
-
10
- // Bidi character types data, auto generated
11
- var DATA = {
12
- "R": "13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",
13
- "EN": "1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",
14
- "ES": "17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",
15
- "ET": "z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",
16
- "AN": "16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",
17
- "CS": "18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",
18
- "B": "a,3,f+2,2v,690",
19
- "S": "9,2,k",
20
- "WS": "c,k,4f4,1vk+a,u,1j,335",
21
- "ON": "x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",
22
- "BN": "0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",
23
- "NSM": "lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",
24
- "AL": "16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",
25
- "LRO": "6ct",
26
- "RLO": "6cu",
27
- "LRE": "6cq",
28
- "RLE": "6cr",
29
- "PDF": "6cs",
30
- "LRI": "6ee",
31
- "RLI": "6ef",
32
- "FSI": "6eg",
33
- "PDI": "6eh"
34
- };
35
-
36
- var TYPES = {};
37
- var TYPES_TO_NAMES = {};
38
- TYPES.L = 1; //L is the default
39
- TYPES_TO_NAMES[1] = 'L';
40
- Object.keys(DATA).forEach(function (type, i) {
41
- TYPES[type] = 1 << (i + 1);
42
- TYPES_TO_NAMES[TYPES[type]] = type;
43
- });
44
- Object.freeze(TYPES);
45
-
46
- var ISOLATE_INIT_TYPES = TYPES.LRI | TYPES.RLI | TYPES.FSI;
47
- var STRONG_TYPES = TYPES.L | TYPES.R | TYPES.AL;
48
- var NEUTRAL_ISOLATE_TYPES = TYPES.B | TYPES.S | TYPES.WS | TYPES.ON | TYPES.FSI | TYPES.LRI | TYPES.RLI | TYPES.PDI;
49
- var BN_LIKE_TYPES = TYPES.BN | TYPES.RLE | TYPES.LRE | TYPES.RLO | TYPES.LRO | TYPES.PDF;
50
- var TRAILING_TYPES = TYPES.S | TYPES.WS | TYPES.B | ISOLATE_INIT_TYPES | TYPES.PDI | BN_LIKE_TYPES;
51
-
52
- var map = null;
53
-
54
- function parseData () {
55
- if (!map) {
56
- //const start = performance.now()
57
- map = new Map();
58
- var loop = function ( type ) {
59
- if (DATA.hasOwnProperty(type)) {
60
- var lastCode = 0;
61
- DATA[type].split(',').forEach(function (range) {
62
- var ref = range.split('+');
63
- var skip = ref[0];
64
- var step = ref[1];
65
- skip = parseInt(skip, 36);
66
- step = step ? parseInt(step, 36) : 0;
67
- map.set(lastCode += skip, TYPES[type]);
68
- for (var i = 0; i < step; i++) {
69
- map.set(++lastCode, TYPES[type]);
70
- }
71
- });
72
- }
73
- };
74
-
75
- for (var type in DATA) loop( type );
76
- //console.log(`char types parsed in ${performance.now() - start}ms`)
77
- }
78
- }
79
-
80
- /**
81
- * @param {string} char
82
- * @return {number}
83
- */
84
- function getBidiCharType (char) {
85
- parseData();
86
- return map.get(char.codePointAt(0)) || TYPES.L
87
- }
88
-
89
- function getBidiCharTypeName(char) {
90
- return TYPES_TO_NAMES[getBidiCharType(char)]
91
- }
92
-
93
- // Bidi bracket pairs data, auto generated
94
- var data$1 = {
95
- "pairs": "14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",
96
- "canonical": "6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"
97
- };
98
-
99
- /**
100
- * Parses an string that holds encoded codepoint mappings, e.g. for bracket pairs or
101
- * mirroring characters, as encoded by scripts/generateBidiData.js. Returns an object
102
- * holding the `map`, and optionally a `reverseMap` if `includeReverse:true`.
103
- * @param {string} encodedString
104
- * @param {boolean} includeReverse - true if you want reverseMap in the output
105
- * @return {{map: Map<number, number>, reverseMap?: Map<number, number>}}
106
- */
107
- function parseCharacterMap (encodedString, includeReverse) {
108
- var radix = 36;
109
- var lastCode = 0;
110
- var map = new Map();
111
- var reverseMap = includeReverse && new Map();
112
- var prevPair;
113
- encodedString.split(',').forEach(function visit(entry) {
114
- if (entry.indexOf('+') !== -1) {
115
- for (var i = +entry; i--;) {
116
- visit(prevPair);
117
- }
118
- } else {
119
- prevPair = entry;
120
- var ref = entry.split('>');
121
- var a = ref[0];
122
- var b = ref[1];
123
- a = String.fromCodePoint(lastCode += parseInt(a, radix));
124
- b = String.fromCodePoint(lastCode += parseInt(b, radix));
125
- map.set(a, b);
126
- includeReverse && reverseMap.set(b, a);
127
- }
128
- });
129
- return { map: map, reverseMap: reverseMap }
130
- }
131
-
132
- var openToClose, closeToOpen, canonical;
133
-
134
- function parse$1 () {
135
- if (!openToClose) {
136
- //const start = performance.now()
137
- var ref = parseCharacterMap(data$1.pairs, true);
138
- var map = ref.map;
139
- var reverseMap = ref.reverseMap;
140
- openToClose = map;
141
- closeToOpen = reverseMap;
142
- canonical = parseCharacterMap(data$1.canonical, false).map;
143
- //console.log(`brackets parsed in ${performance.now() - start}ms`)
144
- }
145
- }
146
-
147
- function openingToClosingBracket (char) {
148
- parse$1();
149
- return openToClose.get(char) || null
150
- }
151
-
152
- function closingToOpeningBracket (char) {
153
- parse$1();
154
- return closeToOpen.get(char) || null
155
- }
156
-
157
- function getCanonicalBracket (char) {
158
- parse$1();
159
- return canonical.get(char) || null
160
- }
161
-
162
- // Local type aliases
163
- var TYPE_L = TYPES.L;
164
- var TYPE_R = TYPES.R;
165
- var TYPE_EN = TYPES.EN;
166
- var TYPE_ES = TYPES.ES;
167
- var TYPE_ET = TYPES.ET;
168
- var TYPE_AN = TYPES.AN;
169
- var TYPE_CS = TYPES.CS;
170
- var TYPE_B = TYPES.B;
171
- var TYPE_S = TYPES.S;
172
- var TYPE_ON = TYPES.ON;
173
- var TYPE_BN = TYPES.BN;
174
- var TYPE_NSM = TYPES.NSM;
175
- var TYPE_AL = TYPES.AL;
176
- var TYPE_LRO = TYPES.LRO;
177
- var TYPE_RLO = TYPES.RLO;
178
- var TYPE_LRE = TYPES.LRE;
179
- var TYPE_RLE = TYPES.RLE;
180
- var TYPE_PDF = TYPES.PDF;
181
- var TYPE_LRI = TYPES.LRI;
182
- var TYPE_RLI = TYPES.RLI;
183
- var TYPE_FSI = TYPES.FSI;
184
- var TYPE_PDI = TYPES.PDI;
185
-
186
- /**
187
- * @typedef {object} GetEmbeddingLevelsResult
188
- * @property {{start, end, level}[]} paragraphs
189
- * @property {Uint8Array} levels
190
- */
191
-
192
- /**
193
- * This function applies the Bidirectional Algorithm to a string, returning the resolved embedding levels
194
- * in a single Uint8Array plus a list of objects holding each paragraph's start and end indices and resolved
195
- * base embedding level.
196
- *
197
- * @param {string} string - The input string
198
- * @param {"ltr"|"rtl"|"auto"} [baseDirection] - Use "ltr" or "rtl" to force a base paragraph direction,
199
- * otherwise a direction will be chosen automatically from each paragraph's contents.
200
- * @return {GetEmbeddingLevelsResult}
201
- */
202
- function getEmbeddingLevels (string, baseDirection) {
203
- var MAX_DEPTH = 125;
204
-
205
- // Start by mapping all characters to their unicode type, as a bitmask integer
206
- var charTypes = new Uint32Array(string.length);
207
- for (var i = 0; i < string.length; i++) {
208
- charTypes[i] = getBidiCharType(string[i]);
209
- }
210
-
211
- var charTypeCounts = new Map(); //will be cleared at start of each paragraph
212
- function changeCharType(i, type) {
213
- var oldType = charTypes[i];
214
- charTypes[i] = type;
215
- charTypeCounts.set(oldType, charTypeCounts.get(oldType) - 1);
216
- if (oldType & NEUTRAL_ISOLATE_TYPES) {
217
- charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) - 1);
218
- }
219
- charTypeCounts.set(type, (charTypeCounts.get(type) || 0) + 1);
220
- if (type & NEUTRAL_ISOLATE_TYPES) {
221
- charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);
222
- }
223
- }
224
-
225
- var embedLevels = new Uint8Array(string.length);
226
- var isolationPairs = new Map(); //init->pdi and pdi->init
227
-
228
- // === 3.3.1 The Paragraph Level ===
229
- // 3.3.1 P1: Split the text into paragraphs
230
- var paragraphs = []; // [{start, end, level}, ...]
231
- var paragraph = null;
232
- for (var i$1 = 0; i$1 < string.length; i$1++) {
233
- if (!paragraph) {
234
- paragraphs.push(paragraph = {
235
- start: i$1,
236
- end: string.length - 1,
237
- // 3.3.1 P2-P3: Determine the paragraph level
238
- level: baseDirection === 'rtl' ? 1 : baseDirection === 'ltr' ? 0 : determineAutoEmbedLevel(i$1, false)
239
- });
240
- }
241
- if (charTypes[i$1] & TYPE_B) {
242
- paragraph.end = i$1;
243
- paragraph = null;
244
- }
245
- }
246
-
247
- var FORMATTING_TYPES = TYPE_RLE | TYPE_LRE | TYPE_RLO | TYPE_LRO | ISOLATE_INIT_TYPES | TYPE_PDI | TYPE_PDF | TYPE_B;
248
- var nextEven = function (n) { return n + ((n & 1) ? 1 : 2); };
249
- var nextOdd = function (n) { return n + ((n & 1) ? 2 : 1); };
250
-
251
- // Everything from here on will operate per paragraph.
252
- for (var paraIdx = 0; paraIdx < paragraphs.length; paraIdx++) {
253
- paragraph = paragraphs[paraIdx];
254
- var statusStack = [{
255
- _level: paragraph.level,
256
- _override: 0, //0=neutral, 1=L, 2=R
257
- _isolate: 0 //bool
258
- }];
259
- var stackTop = (void 0);
260
- var overflowIsolateCount = 0;
261
- var overflowEmbeddingCount = 0;
262
- var validIsolateCount = 0;
263
- charTypeCounts.clear();
264
-
265
- // === 3.3.2 Explicit Levels and Directions ===
266
- for (var i$2 = paragraph.start; i$2 <= paragraph.end; i$2++) {
267
- var charType = charTypes[i$2];
268
- stackTop = statusStack[statusStack.length - 1];
269
-
270
- // Set initial counts
271
- charTypeCounts.set(charType, (charTypeCounts.get(charType) || 0) + 1);
272
- if (charType & NEUTRAL_ISOLATE_TYPES) {
273
- charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);
274
- }
275
-
276
- // Explicit Embeddings: 3.3.2 X2 - X3
277
- if (charType & FORMATTING_TYPES) { //prefilter all formatters
278
- if (charType & (TYPE_RLE | TYPE_LRE)) {
279
- embedLevels[i$2] = stackTop._level; // 5.2
280
- var level = (charType === TYPE_RLE ? nextOdd : nextEven)(stackTop._level);
281
- if (level <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) {
282
- statusStack.push({
283
- _level: level,
284
- _override: 0,
285
- _isolate: 0
286
- });
287
- } else if (!overflowIsolateCount) {
288
- overflowEmbeddingCount++;
289
- }
290
- }
291
-
292
- // Explicit Overrides: 3.3.2 X4 - X5
293
- else if (charType & (TYPE_RLO | TYPE_LRO)) {
294
- embedLevels[i$2] = stackTop._level; // 5.2
295
- var level$1 = (charType === TYPE_RLO ? nextOdd : nextEven)(stackTop._level);
296
- if (level$1 <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) {
297
- statusStack.push({
298
- _level: level$1,
299
- _override: (charType & TYPE_RLO) ? TYPE_R : TYPE_L,
300
- _isolate: 0
301
- });
302
- } else if (!overflowIsolateCount) {
303
- overflowEmbeddingCount++;
304
- }
305
- }
306
-
307
- // Isolates: 3.3.2 X5a - X5c
308
- else if (charType & ISOLATE_INIT_TYPES) {
309
- // X5c - FSI becomes either RLI or LRI
310
- if (charType & TYPE_FSI) {
311
- charType = determineAutoEmbedLevel(i$2 + 1, true) === 1 ? TYPE_RLI : TYPE_LRI;
312
- }
313
-
314
- embedLevels[i$2] = stackTop._level;
315
- if (stackTop._override) {
316
- changeCharType(i$2, stackTop._override);
317
- }
318
- var level$2 = (charType === TYPE_RLI ? nextOdd : nextEven)(stackTop._level);
319
- if (level$2 <= MAX_DEPTH && overflowIsolateCount === 0 && overflowEmbeddingCount === 0) {
320
- validIsolateCount++;
321
- statusStack.push({
322
- _level: level$2,
323
- _override: 0,
324
- _isolate: 1,
325
- _isolInitIndex: i$2
326
- });
327
- } else {
328
- overflowIsolateCount++;
329
- }
330
- }
331
-
332
- // Terminating Isolates: 3.3.2 X6a
333
- else if (charType & TYPE_PDI) {
334
- if (overflowIsolateCount > 0) {
335
- overflowIsolateCount--;
336
- } else if (validIsolateCount > 0) {
337
- overflowEmbeddingCount = 0;
338
- while (!statusStack[statusStack.length - 1]._isolate) {
339
- statusStack.pop();
340
- }
341
- // Add to isolation pairs bidirectional mapping:
342
- var isolInitIndex = statusStack[statusStack.length - 1]._isolInitIndex;
343
- if (isolInitIndex != null) {
344
- isolationPairs.set(isolInitIndex, i$2);
345
- isolationPairs.set(i$2, isolInitIndex);
346
- }
347
- statusStack.pop();
348
- validIsolateCount--;
349
- }
350
- stackTop = statusStack[statusStack.length - 1];
351
- embedLevels[i$2] = stackTop._level;
352
- if (stackTop._override) {
353
- changeCharType(i$2, stackTop._override);
354
- }
355
- }
356
-
357
-
358
- // Terminating Embeddings and Overrides: 3.3.2 X7
359
- else if (charType & TYPE_PDF) {
360
- if (overflowIsolateCount === 0) {
361
- if (overflowEmbeddingCount > 0) {
362
- overflowEmbeddingCount--;
363
- } else if (!stackTop._isolate && statusStack.length > 1) {
364
- statusStack.pop();
365
- stackTop = statusStack[statusStack.length - 1];
366
- }
367
- }
368
- embedLevels[i$2] = stackTop._level; // 5.2
369
- }
370
-
371
- // End of Paragraph: 3.3.2 X8
372
- else if (charType & TYPE_B) {
373
- embedLevels[i$2] = paragraph.level;
374
- }
375
- }
376
-
377
- // Non-formatting characters: 3.3.2 X6
378
- else {
379
- embedLevels[i$2] = stackTop._level;
380
- // NOTE: This exclusion of BN seems to go against what section 5.2 says, but is required for test passage
381
- if (stackTop._override && charType !== TYPE_BN) {
382
- changeCharType(i$2, stackTop._override);
383
- }
384
- }
385
- }
386
-
387
- // === 3.3.3 Preparations for Implicit Processing ===
388
-
389
- // Remove all RLE, LRE, RLO, LRO, PDF, and BN characters: 3.3.3 X9
390
- // Note: Due to section 5.2, we won't remove them, but we'll use the BN_LIKE_TYPES bitset to
391
- // easily ignore them all from here on out.
392
-
393
- // 3.3.3 X10
394
- // Compute the set of isolating run sequences as specified by BD13
395
- var levelRuns = [];
396
- var currentRun = null;
397
- for (var i$3 = paragraph.start; i$3 <= paragraph.end; i$3++) {
398
- var charType$1 = charTypes[i$3];
399
- if (!(charType$1 & BN_LIKE_TYPES)) {
400
- var lvl = embedLevels[i$3];
401
- var isIsolInit = charType$1 & ISOLATE_INIT_TYPES;
402
- var isPDI = charType$1 === TYPE_PDI;
403
- if (currentRun && lvl === currentRun._level) {
404
- currentRun._end = i$3;
405
- currentRun._endsWithIsolInit = isIsolInit;
406
- } else {
407
- levelRuns.push(currentRun = {
408
- _start: i$3,
409
- _end: i$3,
410
- _level: lvl,
411
- _startsWithPDI: isPDI,
412
- _endsWithIsolInit: isIsolInit
413
- });
414
- }
415
- }
416
- }
417
- var isolatingRunSeqs = []; // [{seqIndices: [], sosType: L|R, eosType: L|R}]
418
- for (var runIdx = 0; runIdx < levelRuns.length; runIdx++) {
419
- var run = levelRuns[runIdx];
420
- if (!run._startsWithPDI || (run._startsWithPDI && !isolationPairs.has(run._start))) {
421
- var seqRuns = [currentRun = run];
422
- for (var pdiIndex = (void 0); currentRun && currentRun._endsWithIsolInit && (pdiIndex = isolationPairs.get(currentRun._end)) != null;) {
423
- for (var i$4 = runIdx + 1; i$4 < levelRuns.length; i$4++) {
424
- if (levelRuns[i$4]._start === pdiIndex) {
425
- seqRuns.push(currentRun = levelRuns[i$4]);
426
- break
427
- }
428
- }
429
- }
430
- // build flat list of indices across all runs:
431
- var seqIndices = [];
432
- for (var i$5 = 0; i$5 < seqRuns.length; i$5++) {
433
- var run$1 = seqRuns[i$5];
434
- for (var j = run$1._start; j <= run$1._end; j++) {
435
- seqIndices.push(j);
436
- }
437
- }
438
- // determine the sos/eos types:
439
- var firstLevel = embedLevels[seqIndices[0]];
440
- var prevLevel = paragraph.level;
441
- for (var i$6 = seqIndices[0] - 1; i$6 >= 0; i$6--) {
442
- if (!(charTypes[i$6] & BN_LIKE_TYPES)) { //5.2
443
- prevLevel = embedLevels[i$6];
444
- break
445
- }
446
- }
447
- var lastIndex = seqIndices[seqIndices.length - 1];
448
- var lastLevel = embedLevels[lastIndex];
449
- var nextLevel = paragraph.level;
450
- if (!(charTypes[lastIndex] & ISOLATE_INIT_TYPES)) {
451
- for (var i$7 = lastIndex + 1; i$7 <= paragraph.end; i$7++) {
452
- if (!(charTypes[i$7] & BN_LIKE_TYPES)) { //5.2
453
- nextLevel = embedLevels[i$7];
454
- break
455
- }
456
- }
457
- }
458
- isolatingRunSeqs.push({
459
- _seqIndices: seqIndices,
460
- _sosType: Math.max(prevLevel, firstLevel) % 2 ? TYPE_R : TYPE_L,
461
- _eosType: Math.max(nextLevel, lastLevel) % 2 ? TYPE_R : TYPE_L
462
- });
463
- }
464
- }
465
-
466
- // The next steps are done per isolating run sequence
467
- for (var seqIdx = 0; seqIdx < isolatingRunSeqs.length; seqIdx++) {
468
- var ref = isolatingRunSeqs[seqIdx];
469
- var seqIndices$1 = ref._seqIndices;
470
- var sosType = ref._sosType;
471
- var eosType = ref._eosType;
472
- /**
473
- * All the level runs in an isolating run sequence have the same embedding level.
474
- *
475
- * DO NOT change any `embedLevels[i]` within the current scope.
476
- */
477
- var embedDirection = ((embedLevels[seqIndices$1[0]]) & 1) ? TYPE_R : TYPE_L;
478
-
479
- // === 3.3.4 Resolving Weak Types ===
480
-
481
- // W1 + 5.2. Search backward from each NSM to the first character in the isolating run sequence whose
482
- // bidirectional type is not BN, and set the NSM to ON if it is an isolate initiator or PDI, and to its
483
- // type otherwise. If the NSM is the first non-BN character, change the NSM to the type of sos.
484
- if (charTypeCounts.get(TYPE_NSM)) {
485
- for (var si = 0; si < seqIndices$1.length; si++) {
486
- var i$8 = seqIndices$1[si];
487
- if (charTypes[i$8] & TYPE_NSM) {
488
- var prevType = sosType;
489
- for (var sj = si - 1; sj >= 0; sj--) {
490
- if (!(charTypes[seqIndices$1[sj]] & BN_LIKE_TYPES)) { //5.2 scan back to first non-BN
491
- prevType = charTypes[seqIndices$1[sj]];
492
- break
493
- }
494
- }
495
- changeCharType(i$8, (prevType & (ISOLATE_INIT_TYPES | TYPE_PDI)) ? TYPE_ON : prevType);
496
- }
497
- }
498
- }
499
-
500
- // W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sos)
501
- // is found. If an AL is found, change the type of the European number to Arabic number.
502
- if (charTypeCounts.get(TYPE_EN)) {
503
- for (var si$1 = 0; si$1 < seqIndices$1.length; si$1++) {
504
- var i$9 = seqIndices$1[si$1];
505
- if (charTypes[i$9] & TYPE_EN) {
506
- for (var sj$1 = si$1 - 1; sj$1 >= -1; sj$1--) {
507
- var prevCharType = sj$1 === -1 ? sosType : charTypes[seqIndices$1[sj$1]];
508
- if (prevCharType & STRONG_TYPES) {
509
- if (prevCharType === TYPE_AL) {
510
- changeCharType(i$9, TYPE_AN);
511
- }
512
- break
513
- }
514
- }
515
- }
516
- }
517
- }
518
-
519
- // W3. Change all ALs to R
520
- if (charTypeCounts.get(TYPE_AL)) {
521
- for (var si$2 = 0; si$2 < seqIndices$1.length; si$2++) {
522
- var i$10 = seqIndices$1[si$2];
523
- if (charTypes[i$10] & TYPE_AL) {
524
- changeCharType(i$10, TYPE_R);
525
- }
526
- }
527
- }
528
-
529
- // W4. A single European separator between two European numbers changes to a European number. A single common
530
- // separator between two numbers of the same type changes to that type.
531
- if (charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) {
532
- for (var si$3 = 1; si$3 < seqIndices$1.length - 1; si$3++) {
533
- var i$11 = seqIndices$1[si$3];
534
- if (charTypes[i$11] & (TYPE_ES | TYPE_CS)) {
535
- var prevType$1 = 0, nextType = 0;
536
- for (var sj$2 = si$3 - 1; sj$2 >= 0; sj$2--) {
537
- prevType$1 = charTypes[seqIndices$1[sj$2]];
538
- if (!(prevType$1 & BN_LIKE_TYPES)) { //5.2
539
- break
540
- }
541
- }
542
- for (var sj$3 = si$3 + 1; sj$3 < seqIndices$1.length; sj$3++) {
543
- nextType = charTypes[seqIndices$1[sj$3]];
544
- if (!(nextType & BN_LIKE_TYPES)) { //5.2
545
- break
546
- }
547
- }
548
- if (prevType$1 === nextType && (charTypes[i$11] === TYPE_ES ? prevType$1 === TYPE_EN : (prevType$1 & (TYPE_EN | TYPE_AN)))) {
549
- changeCharType(i$11, prevType$1);
550
- }
551
- }
552
- }
553
- }
554
-
555
- // W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.
556
- if (charTypeCounts.get(TYPE_EN)) {
557
- for (var si$4 = 0; si$4 < seqIndices$1.length; si$4++) {
558
- var i$12 = seqIndices$1[si$4];
559
- if (charTypes[i$12] & TYPE_EN) {
560
- for (var sj$4 = si$4 - 1; sj$4 >= 0 && (charTypes[seqIndices$1[sj$4]] & (TYPE_ET | BN_LIKE_TYPES)); sj$4--) {
561
- changeCharType(seqIndices$1[sj$4], TYPE_EN);
562
- }
563
- for (si$4++; si$4 < seqIndices$1.length && (charTypes[seqIndices$1[si$4]] & (TYPE_ET | BN_LIKE_TYPES | TYPE_EN)); si$4++) {
564
- if (charTypes[seqIndices$1[si$4]] !== TYPE_EN) {
565
- changeCharType(seqIndices$1[si$4], TYPE_EN);
566
- }
567
- }
568
- }
569
- }
570
- }
571
-
572
- // W6. Otherwise, separators and terminators change to Other Neutral.
573
- if (charTypeCounts.get(TYPE_ET) || charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) {
574
- for (var si$5 = 0; si$5 < seqIndices$1.length; si$5++) {
575
- var i$13 = seqIndices$1[si$5];
576
- if (charTypes[i$13] & (TYPE_ET | TYPE_ES | TYPE_CS)) {
577
- changeCharType(i$13, TYPE_ON);
578
- // 5.2 transform adjacent BNs too:
579
- for (var sj$5 = si$5 - 1; sj$5 >= 0 && (charTypes[seqIndices$1[sj$5]] & BN_LIKE_TYPES); sj$5--) {
580
- changeCharType(seqIndices$1[sj$5], TYPE_ON);
581
- }
582
- for (var sj$6 = si$5 + 1; sj$6 < seqIndices$1.length && (charTypes[seqIndices$1[sj$6]] & BN_LIKE_TYPES); sj$6++) {
583
- changeCharType(seqIndices$1[sj$6], TYPE_ON);
584
- }
585
- }
586
- }
587
- }
588
-
589
- // W7. Search backward from each instance of a European number until the first strong type (R, L, or sos)
590
- // is found. If an L is found, then change the type of the European number to L.
591
- // NOTE: implemented in single forward pass for efficiency
592
- if (charTypeCounts.get(TYPE_EN)) {
593
- for (var si$6 = 0, prevStrongType = sosType; si$6 < seqIndices$1.length; si$6++) {
594
- var i$14 = seqIndices$1[si$6];
595
- var type = charTypes[i$14];
596
- if (type & TYPE_EN) {
597
- if (prevStrongType === TYPE_L) {
598
- changeCharType(i$14, TYPE_L);
599
- }
600
- } else if (type & STRONG_TYPES) {
601
- prevStrongType = type;
602
- }
603
- }
604
- }
605
-
606
- // === 3.3.5 Resolving Neutral and Isolate Formatting Types ===
607
-
608
- if (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES)) {
609
- // N0. Process bracket pairs in an isolating run sequence sequentially in the logical order of the text
610
- // positions of the opening paired brackets using the logic given below. Within this scope, bidirectional
611
- // types EN and AN are treated as R.
612
- var R_TYPES_FOR_N_STEPS = (TYPE_R | TYPE_EN | TYPE_AN);
613
- var STRONG_TYPES_FOR_N_STEPS = R_TYPES_FOR_N_STEPS | TYPE_L;
614
-
615
- // * Identify the bracket pairs in the current isolating run sequence according to BD16.
616
- var bracketPairs = [];
617
- {
618
- var openerStack = [];
619
- for (var si$7 = 0; si$7 < seqIndices$1.length; si$7++) {
620
- // NOTE: for any potential bracket character we also test that it still carries a NI
621
- // type, as that may have been changed earlier. This doesn't seem to be explicitly
622
- // called out in the spec, but is required for passage of certain tests.
623
- if (charTypes[seqIndices$1[si$7]] & NEUTRAL_ISOLATE_TYPES) {
624
- var char = string[seqIndices$1[si$7]];
625
- var oppositeBracket = (void 0);
626
- // Opening bracket
627
- if (openingToClosingBracket(char) !== null) {
628
- if (openerStack.length < 63) {
629
- openerStack.push({ char: char, seqIndex: si$7 });
630
- } else {
631
- break
632
- }
633
- }
634
- // Closing bracket
635
- else if ((oppositeBracket = closingToOpeningBracket(char)) !== null) {
636
- for (var stackIdx = openerStack.length - 1; stackIdx >= 0; stackIdx--) {
637
- var stackChar = openerStack[stackIdx].char;
638
- if (stackChar === oppositeBracket ||
639
- stackChar === closingToOpeningBracket(getCanonicalBracket(char)) ||
640
- openingToClosingBracket(getCanonicalBracket(stackChar)) === char
641
- ) {
642
- bracketPairs.push([openerStack[stackIdx].seqIndex, si$7]);
643
- openerStack.length = stackIdx; //pop the matching bracket and all following
644
- break
645
- }
646
- }
647
- }
648
- }
649
- }
650
- bracketPairs.sort(function (a, b) { return a[0] - b[0]; });
651
- }
652
- // * For each bracket-pair element in the list of pairs of text positions
653
- for (var pairIdx = 0; pairIdx < bracketPairs.length; pairIdx++) {
654
- var ref$1 = bracketPairs[pairIdx];
655
- var openSeqIdx = ref$1[0];
656
- var closeSeqIdx = ref$1[1];
657
- // a. Inspect the bidirectional types of the characters enclosed within the bracket pair.
658
- // b. If any strong type (either L or R) matching the embedding direction is found, set the type for both
659
- // brackets in the pair to match the embedding direction.
660
- var foundStrongType = false;
661
- var useStrongType = 0;
662
- for (var si$8 = openSeqIdx + 1; si$8 < closeSeqIdx; si$8++) {
663
- var i$15 = seqIndices$1[si$8];
664
- if (charTypes[i$15] & STRONG_TYPES_FOR_N_STEPS) {
665
- foundStrongType = true;
666
- var lr = (charTypes[i$15] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
667
- if (lr === embedDirection) {
668
- useStrongType = lr;
669
- break
670
- }
671
- }
672
- }
673
- // c. Otherwise, if there is a strong type it must be opposite the embedding direction. Therefore, test
674
- // for an established context with a preceding strong type by checking backwards before the opening paired
675
- // bracket until the first strong type (L, R, or sos) is found.
676
- // 1. If the preceding strong type is also opposite the embedding direction, context is established, so
677
- // set the type for both brackets in the pair to that direction.
678
- // 2. Otherwise set the type for both brackets in the pair to the embedding direction.
679
- if (foundStrongType && !useStrongType) {
680
- useStrongType = sosType;
681
- for (var si$9 = openSeqIdx - 1; si$9 >= 0; si$9--) {
682
- var i$16 = seqIndices$1[si$9];
683
- if (charTypes[i$16] & STRONG_TYPES_FOR_N_STEPS) {
684
- var lr$1 = (charTypes[i$16] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
685
- if (lr$1 !== embedDirection) {
686
- useStrongType = lr$1;
687
- } else {
688
- useStrongType = embedDirection;
689
- }
690
- break
691
- }
692
- }
693
- }
694
- if (useStrongType) {
695
- charTypes[seqIndices$1[openSeqIdx]] = charTypes[seqIndices$1[closeSeqIdx]] = useStrongType;
696
- // * Any number of characters that had original bidirectional character type NSM prior to the application
697
- // of W1 that immediately follow a paired bracket which changed to L or R under N0 should change to match
698
- // the type of their preceding bracket.
699
- if (useStrongType !== embedDirection) {
700
- for (var si$10 = openSeqIdx + 1; si$10 < seqIndices$1.length; si$10++) {
701
- if (!(charTypes[seqIndices$1[si$10]] & BN_LIKE_TYPES)) {
702
- if (getBidiCharType(string[seqIndices$1[si$10]]) & TYPE_NSM) {
703
- charTypes[seqIndices$1[si$10]] = useStrongType;
704
- }
705
- break
706
- }
707
- }
708
- }
709
- if (useStrongType !== embedDirection) {
710
- for (var si$11 = closeSeqIdx + 1; si$11 < seqIndices$1.length; si$11++) {
711
- if (!(charTypes[seqIndices$1[si$11]] & BN_LIKE_TYPES)) {
712
- if (getBidiCharType(string[seqIndices$1[si$11]]) & TYPE_NSM) {
713
- charTypes[seqIndices$1[si$11]] = useStrongType;
714
- }
715
- break
716
- }
717
- }
718
- }
719
- }
720
- }
721
-
722
- // N1. A sequence of NIs takes the direction of the surrounding strong text if the text on both sides has the
723
- // same direction.
724
- // N2. Any remaining NIs take the embedding direction.
725
- for (var si$12 = 0; si$12 < seqIndices$1.length; si$12++) {
726
- if (charTypes[seqIndices$1[si$12]] & NEUTRAL_ISOLATE_TYPES) {
727
- var niRunStart = si$12, niRunEnd = si$12;
728
- var prevType$2 = sosType; //si === 0 ? sosType : (charTypes[seqIndices[si - 1]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L
729
- for (var si2 = si$12 - 1; si2 >= 0; si2--) {
730
- if (charTypes[seqIndices$1[si2]] & BN_LIKE_TYPES) {
731
- niRunStart = si2; //5.2 treat BNs adjacent to NIs as NIs
732
- } else {
733
- prevType$2 = (charTypes[seqIndices$1[si2]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
734
- break
735
- }
736
- }
737
- var nextType$1 = eosType;
738
- for (var si2$1 = si$12 + 1; si2$1 < seqIndices$1.length; si2$1++) {
739
- if (charTypes[seqIndices$1[si2$1]] & (NEUTRAL_ISOLATE_TYPES | BN_LIKE_TYPES)) {
740
- niRunEnd = si2$1;
741
- } else {
742
- nextType$1 = (charTypes[seqIndices$1[si2$1]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
743
- break
744
- }
745
- }
746
- for (var sj$7 = niRunStart; sj$7 <= niRunEnd; sj$7++) {
747
- charTypes[seqIndices$1[sj$7]] = prevType$2 === nextType$1 ? prevType$2 : embedDirection;
748
- }
749
- si$12 = niRunEnd;
750
- }
751
- }
752
- }
753
- }
754
-
755
- // === 3.3.6 Resolving Implicit Levels ===
756
-
757
- for (var i$17 = paragraph.start; i$17 <= paragraph.end; i$17++) {
758
- var level$3 = embedLevels[i$17];
759
- var type$1 = charTypes[i$17];
760
- // I2. For all characters with an odd (right-to-left) embedding level, those of type L, EN or AN go up one level.
761
- if (level$3 & 1) {
762
- if (type$1 & (TYPE_L | TYPE_EN | TYPE_AN)) {
763
- embedLevels[i$17]++;
764
- }
765
- }
766
- // I1. For all characters with an even (left-to-right) embedding level, those of type R go up one level
767
- // and those of type AN or EN go up two levels.
768
- else {
769
- if (type$1 & TYPE_R) {
770
- embedLevels[i$17]++;
771
- } else if (type$1 & (TYPE_AN | TYPE_EN)) {
772
- embedLevels[i$17] += 2;
773
- }
774
- }
775
-
776
- // 5.2: Resolve any LRE, RLE, LRO, RLO, PDF, or BN to the level of the preceding character if there is one,
777
- // and otherwise to the base level.
778
- if (type$1 & BN_LIKE_TYPES) {
779
- embedLevels[i$17] = i$17 === 0 ? paragraph.level : embedLevels[i$17 - 1];
780
- }
781
-
782
- // 3.4 L1.1-4: Reset the embedding level of segment/paragraph separators, and any sequence of whitespace or
783
- // isolate formatting characters preceding them or the end of the paragraph, to the paragraph level.
784
- // NOTE: this will also need to be applied to each individual line ending after line wrapping occurs.
785
- if (i$17 === paragraph.end || getBidiCharType(string[i$17]) & (TYPE_S | TYPE_B)) {
786
- for (var j$1 = i$17; j$1 >= 0 && (getBidiCharType(string[j$1]) & TRAILING_TYPES); j$1--) {
787
- embedLevels[j$1] = paragraph.level;
788
- }
789
- }
790
- }
791
- }
792
-
793
- // DONE! The resolved levels can then be used, after line wrapping, to flip runs of characters
794
- // according to section 3.4 Reordering Resolved Levels
795
- return {
796
- levels: embedLevels,
797
- paragraphs: paragraphs
798
- }
799
-
800
- function determineAutoEmbedLevel (start, isFSI) {
801
- // 3.3.1 P2 - P3
802
- for (var i = start; i < string.length; i++) {
803
- var charType = charTypes[i];
804
- if (charType & (TYPE_R | TYPE_AL)) {
805
- return 1
806
- }
807
- if ((charType & (TYPE_B | TYPE_L)) || (isFSI && charType === TYPE_PDI)) {
808
- return 0
809
- }
810
- if (charType & ISOLATE_INIT_TYPES) {
811
- var pdi = indexOfMatchingPDI(i);
812
- i = pdi === -1 ? string.length : pdi;
813
- }
814
- }
815
- return 0
816
- }
817
-
818
- function indexOfMatchingPDI (isolateStart) {
819
- // 3.1.2 BD9
820
- var isolationLevel = 1;
821
- for (var i = isolateStart + 1; i < string.length; i++) {
822
- var charType = charTypes[i];
823
- if (charType & TYPE_B) {
824
- break
825
- }
826
- if (charType & TYPE_PDI) {
827
- if (--isolationLevel === 0) {
828
- return i
829
- }
830
- } else if (charType & ISOLATE_INIT_TYPES) {
831
- isolationLevel++;
832
- }
833
- }
834
- return -1
835
- }
836
- }
837
-
838
- // Bidi mirrored chars data, auto generated
839
- var data = "14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1";
840
-
841
- var mirrorMap;
842
-
843
- function parse () {
844
- if (!mirrorMap) {
845
- //const start = performance.now()
846
- var ref = parseCharacterMap(data, true);
847
- var map = ref.map;
848
- var reverseMap = ref.reverseMap;
849
- // Combine both maps into one
850
- reverseMap.forEach(function (value, key) {
851
- map.set(key, value);
852
- });
853
- mirrorMap = map;
854
- //console.log(`mirrored chars parsed in ${performance.now() - start}ms`)
855
- }
856
- }
857
-
858
- function getMirroredCharacter (char) {
859
- parse();
860
- return mirrorMap.get(char) || null
861
- }
862
-
863
- /**
864
- * Given a string and its resolved embedding levels, build a map of indices to replacement chars
865
- * for any characters in right-to-left segments that have defined mirrored characters.
866
- * @param string
867
- * @param embeddingLevels
868
- * @param [start]
869
- * @param [end]
870
- * @return {Map<number, string>}
871
- */
872
- function getMirroredCharactersMap(string, embeddingLevels, start, end) {
873
- var strLen = string.length;
874
- start = Math.max(0, start == null ? 0 : +start);
875
- end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);
876
-
877
- var map = new Map();
878
- for (var i = start; i <= end; i++) {
879
- if (embeddingLevels[i] & 1) { //only odd (rtl) levels
880
- var mirror = getMirroredCharacter(string[i]);
881
- if (mirror !== null) {
882
- map.set(i, mirror);
883
- }
884
- }
885
- }
886
- return map
887
- }
888
-
889
- /**
890
- * Given a start and end denoting a single line within a string, and a set of precalculated
891
- * bidi embedding levels, produce a list of segments whose ordering should be flipped, in sequence.
892
- * @param {string} string - the full input string
893
- * @param {GetEmbeddingLevelsResult} embeddingLevelsResult - the result object from getEmbeddingLevels
894
- * @param {number} [start] - first character in a subset of the full string
895
- * @param {number} [end] - last character in a subset of the full string
896
- * @return {number[][]} - the list of start/end segments that should be flipped, in order.
897
- */
898
- function getReorderSegments(string, embeddingLevelsResult, start, end) {
899
- var strLen = string.length;
900
- start = Math.max(0, start == null ? 0 : +start);
901
- end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);
902
-
903
- var segments = [];
904
- embeddingLevelsResult.paragraphs.forEach(function (paragraph) {
905
- var lineStart = Math.max(start, paragraph.start);
906
- var lineEnd = Math.min(end, paragraph.end);
907
- if (lineStart < lineEnd) {
908
- // Local slice for mutation
909
- var lineLevels = embeddingLevelsResult.levels.slice(lineStart, lineEnd + 1);
910
-
911
- // 3.4 L1.4: Reset any sequence of whitespace characters and/or isolate formatting characters at the
912
- // end of the line to the paragraph level.
913
- for (var i = lineEnd; i >= lineStart && (getBidiCharType(string[i]) & TRAILING_TYPES); i--) {
914
- lineLevels[i] = paragraph.level;
915
- }
916
-
917
- // L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels
918
- // not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher.
919
- var maxLevel = paragraph.level;
920
- var minOddLevel = Infinity;
921
- for (var i$1 = 0; i$1 < lineLevels.length; i$1++) {
922
- var level = lineLevels[i$1];
923
- if (level > maxLevel) { maxLevel = level; }
924
- if (level < minOddLevel) { minOddLevel = level | 1; }
925
- }
926
- for (var lvl = maxLevel; lvl >= minOddLevel; lvl--) {
927
- for (var i$2 = 0; i$2 < lineLevels.length; i$2++) {
928
- if (lineLevels[i$2] >= lvl) {
929
- var segStart = i$2;
930
- while (i$2 + 1 < lineLevels.length && lineLevels[i$2 + 1] >= lvl) {
931
- i$2++;
932
- }
933
- if (i$2 > segStart) {
934
- segments.push([segStart + lineStart, i$2 + lineStart]);
935
- }
936
- }
937
- }
938
- }
939
- }
940
- });
941
- return segments
942
- }
943
-
944
- /**
945
- * @param {string} string
946
- * @param {GetEmbeddingLevelsResult} embedLevelsResult
947
- * @param {number} [start]
948
- * @param {number} [end]
949
- * @return {string} the new string with bidi segments reordered
950
- */
951
- function getReorderedString(string, embedLevelsResult, start, end) {
952
- var indices = getReorderedIndices(string, embedLevelsResult, start, end);
953
- var chars = [].concat( string );
954
- indices.forEach(function (charIndex, i) {
955
- chars[i] = (
956
- (embedLevelsResult.levels[charIndex] & 1) ? getMirroredCharacter(string[charIndex]) : null
957
- ) || string[charIndex];
958
- });
959
- return chars.join('')
960
- }
961
-
962
- /**
963
- * @param {string} string
964
- * @param {GetEmbeddingLevelsResult} embedLevelsResult
965
- * @param {number} [start]
966
- * @param {number} [end]
967
- * @return {number[]} an array with character indices in their new bidi order
968
- */
969
- function getReorderedIndices(string, embedLevelsResult, start, end) {
970
- var segments = getReorderSegments(string, embedLevelsResult, start, end);
971
- // Fill an array with indices
972
- var indices = [];
973
- for (var i = 0; i < string.length; i++) {
974
- indices[i] = i;
975
- }
976
- // Reverse each segment in order
977
- segments.forEach(function (ref) {
978
- var start = ref[0];
979
- var end = ref[1];
980
-
981
- var slice = indices.slice(start, end + 1);
982
- for (var i = slice.length; i--;) {
983
- indices[end - i] = slice[i];
984
- }
985
- });
986
- return indices
987
- }
988
-
989
- exports.closingToOpeningBracket = closingToOpeningBracket;
990
- exports.getBidiCharType = getBidiCharType;
991
- exports.getBidiCharTypeName = getBidiCharTypeName;
992
- exports.getCanonicalBracket = getCanonicalBracket;
993
- exports.getEmbeddingLevels = getEmbeddingLevels;
994
- exports.getMirroredCharacter = getMirroredCharacter;
995
- exports.getMirroredCharactersMap = getMirroredCharactersMap;
996
- exports.getReorderSegments = getReorderSegments;
997
- exports.getReorderedIndices = getReorderedIndices;
998
- exports.getReorderedString = getReorderedString;
999
- exports.openingToClosingBracket = openingToClosingBracket;
1000
-
1001
- Object.defineProperty(exports, '__esModule', { value: true });
1002
-
1003
- return exports;
1004
-
1005
- }({}));
1006
- return bidi}
1007
-
1008
- export { bidiFactory as default };