@kne-components/components-core 0.1.13 → 0.1.14

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 (225) hide show
  1. package/build/asset-manifest.json +146 -146
  2. package/build/index.html +1 -1
  3. package/build/remoteEntry.js +1 -1
  4. package/build/remoteEntry.js.map +1 -1
  5. package/build/static/css/1151.afd8edff.chunk.css +2 -0
  6. package/build/static/css/{1151.ec1bbfc0.chunk.css.map → 1151.afd8edff.chunk.css.map} +1 -1
  7. package/build/static/css/1153.5df2226a.chunk.css +2 -0
  8. package/build/static/css/{1153.bd20b743.chunk.css.map → 1153.5df2226a.chunk.css.map} +1 -1
  9. package/build/static/css/1454.83e40ef7.chunk.css +2 -0
  10. package/build/static/css/{1454.c0a0991e.chunk.css.map → 1454.83e40ef7.chunk.css.map} +1 -1
  11. package/build/static/css/1554.424ed55d.chunk.css +2 -0
  12. package/build/static/css/{1554.a585edf1.chunk.css.map → 1554.424ed55d.chunk.css.map} +1 -1
  13. package/build/static/css/192.e7738624.chunk.css +2 -0
  14. package/build/static/css/{192.73637503.chunk.css.map → 192.e7738624.chunk.css.map} +1 -1
  15. package/build/static/css/1932.f022467b.chunk.css +2 -0
  16. package/build/static/css/{1932.0bf35bc9.chunk.css.map → 1932.f022467b.chunk.css.map} +1 -1
  17. package/build/static/css/{2503.48eb44fa.chunk.css → 2503.4204d383.chunk.css} +2 -2
  18. package/build/static/css/{2503.48eb44fa.chunk.css.map → 2503.4204d383.chunk.css.map} +1 -1
  19. package/build/static/css/{2517.5b666562.chunk.css → 2517.259d62a7.chunk.css} +2 -2
  20. package/build/static/css/{2517.5b666562.chunk.css.map → 2517.259d62a7.chunk.css.map} +1 -1
  21. package/build/static/css/2637.87819440.chunk.css +2 -0
  22. package/build/static/css/2637.87819440.chunk.css.map +1 -0
  23. package/build/static/css/2716.46fec554.chunk.css +2 -0
  24. package/build/static/css/{2716.6f49ddb5.chunk.css.map → 2716.46fec554.chunk.css.map} +1 -1
  25. package/build/static/css/{2730.e0efe797.chunk.css → 2730.6f2af18f.chunk.css} +2 -2
  26. package/build/static/css/{2730.e0efe797.chunk.css.map → 2730.6f2af18f.chunk.css.map} +1 -1
  27. package/build/static/css/2921.c7ef7d3a.chunk.css +2 -0
  28. package/build/static/css/2921.c7ef7d3a.chunk.css.map +1 -0
  29. package/build/static/css/3333.e451f29c.chunk.css +2 -0
  30. package/build/static/css/{3333.7d0ae50b.chunk.css.map → 3333.e451f29c.chunk.css.map} +1 -1
  31. package/build/static/css/{3843.ea9110c1.chunk.css → 3843.611095e5.chunk.css} +2 -2
  32. package/build/static/css/{3843.ea9110c1.chunk.css.map → 3843.611095e5.chunk.css.map} +1 -1
  33. package/build/static/css/4666.d40200d6.chunk.css +2 -0
  34. package/build/static/css/{4666.6b5dde12.chunk.css.map → 4666.d40200d6.chunk.css.map} +1 -1
  35. package/build/static/css/5196.aefd49f4.chunk.css +2 -0
  36. package/build/static/css/{5196.29f6749e.chunk.css.map → 5196.aefd49f4.chunk.css.map} +1 -1
  37. package/build/static/css/5362.92765283.chunk.css +2 -0
  38. package/build/static/css/{5362.db0ec87d.chunk.css.map → 5362.92765283.chunk.css.map} +1 -1
  39. package/build/static/css/5600.ab1d4eee.chunk.css +2 -0
  40. package/build/static/css/{5600.bc21bda7.chunk.css.map → 5600.ab1d4eee.chunk.css.map} +1 -1
  41. package/build/static/css/5673.7089f80f.chunk.css +2 -0
  42. package/build/static/css/{5673.79f68b31.chunk.css.map → 5673.7089f80f.chunk.css.map} +1 -1
  43. package/build/static/css/5941.1c0190d9.chunk.css +2 -0
  44. package/build/static/css/5941.1c0190d9.chunk.css.map +1 -0
  45. package/build/static/css/{5996.a2ddbe9b.chunk.css → 5996.d0868cd0.chunk.css} +2 -2
  46. package/build/static/css/{5996.a2ddbe9b.chunk.css.map → 5996.d0868cd0.chunk.css.map} +1 -1
  47. package/build/static/css/7227.66d245e3.chunk.css +2 -0
  48. package/build/static/css/{7227.c8f5f467.chunk.css.map → 7227.66d245e3.chunk.css.map} +1 -1
  49. package/build/static/css/8148.d602f232.chunk.css +2 -0
  50. package/build/static/css/8148.d602f232.chunk.css.map +1 -0
  51. package/build/static/css/{8725.baf97c0e.chunk.css → 8725.62429529.chunk.css} +2 -2
  52. package/build/static/css/{8725.baf97c0e.chunk.css.map → 8725.62429529.chunk.css.map} +1 -1
  53. package/build/static/css/9053.cec89ad2.chunk.css +2 -0
  54. package/build/static/css/{9053.6a1a6919.chunk.css.map → 9053.cec89ad2.chunk.css.map} +1 -1
  55. package/build/static/css/931.402bde58.chunk.css +2 -0
  56. package/build/static/css/{931.7a220088.chunk.css.map → 931.402bde58.chunk.css.map} +1 -1
  57. package/build/static/css/9689.27826790.chunk.css +2 -0
  58. package/build/static/css/{9689.7397d527.chunk.css.map → 9689.27826790.chunk.css.map} +1 -1
  59. package/build/static/css/9911.e76960cf.chunk.css +2 -0
  60. package/build/static/css/{9911.75d3b627.chunk.css.map → 9911.e76960cf.chunk.css.map} +1 -1
  61. package/build/static/js/1153.3ffe6820.chunk.js +3 -0
  62. package/build/static/js/{1153.0d52625e.chunk.js.map → 1153.3ffe6820.chunk.js.map} +1 -1
  63. package/build/static/js/{1454.c087b2eb.chunk.js → 1454.fa2e61ce.chunk.js} +3 -3
  64. package/build/static/js/{1454.c087b2eb.chunk.js.map → 1454.fa2e61ce.chunk.js.map} +1 -1
  65. package/build/static/js/1554.9103d1ed.chunk.js +3 -0
  66. package/build/static/js/{1554.2e647156.chunk.js.map → 1554.9103d1ed.chunk.js.map} +1 -1
  67. package/build/static/js/{1664.169d6c37.chunk.js → 1664.c2d4b079.chunk.js} +2 -2
  68. package/build/static/js/{1664.169d6c37.chunk.js.map → 1664.c2d4b079.chunk.js.map} +1 -1
  69. package/build/static/js/{192.db4b6754.chunk.js → 192.44c8bd78.chunk.js} +2 -2
  70. package/build/static/js/{192.db4b6754.chunk.js.map → 192.44c8bd78.chunk.js.map} +1 -1
  71. package/build/static/js/{1922.c52450c3.chunk.js → 1922.e69b6391.chunk.js} +2 -2
  72. package/build/static/js/1922.e69b6391.chunk.js.map +1 -0
  73. package/build/static/js/1932.da6a09a3.chunk.js +2 -0
  74. package/build/static/js/{1932.a0e955f3.chunk.js.map → 1932.da6a09a3.chunk.js.map} +1 -1
  75. package/build/static/js/2503.39ffc95c.chunk.js +2 -0
  76. package/build/static/js/{2503.e9de0bb4.chunk.js.map → 2503.39ffc95c.chunk.js.map} +1 -1
  77. package/build/static/js/2517.90539021.chunk.js +2 -0
  78. package/build/static/js/{2517.bfbef0e3.chunk.js.map → 2517.90539021.chunk.js.map} +1 -1
  79. package/build/static/js/{2637.4a57844b.chunk.js → 2637.80375073.chunk.js} +2 -2
  80. package/build/static/js/2637.80375073.chunk.js.map +1 -0
  81. package/build/static/js/2716.0ff4ed71.chunk.js +3 -0
  82. package/build/static/js/{2716.303242fa.chunk.js.map → 2716.0ff4ed71.chunk.js.map} +1 -1
  83. package/build/static/js/2730.e30ca887.chunk.js +2 -0
  84. package/build/static/js/{2730.40a28c60.chunk.js.map → 2730.e30ca887.chunk.js.map} +1 -1
  85. package/build/static/js/2921.3c63e4bf.chunk.js +2 -0
  86. package/build/static/js/2921.3c63e4bf.chunk.js.map +1 -0
  87. package/build/static/js/{2950.5e36a971.chunk.js → 2950.ba94676e.chunk.js} +2 -2
  88. package/build/static/js/{2950.5e36a971.chunk.js.map → 2950.ba94676e.chunk.js.map} +1 -1
  89. package/build/static/js/3245.e987bbef.chunk.js +3 -0
  90. package/build/static/js/{3245.3eeca0e4.chunk.js.LICENSE.txt → 3245.e987bbef.chunk.js.LICENSE.txt} +3 -3
  91. package/build/static/js/3245.e987bbef.chunk.js.map +1 -0
  92. package/build/static/js/{3333.40a6c257.chunk.js → 3333.db7e928a.chunk.js} +2 -2
  93. package/build/static/js/{3333.40a6c257.chunk.js.map → 3333.db7e928a.chunk.js.map} +1 -1
  94. package/build/static/js/3805.8b4f9a3a.chunk.js +2 -0
  95. package/build/static/js/3805.8b4f9a3a.chunk.js.map +1 -0
  96. package/build/static/js/{3843.a9b49a31.chunk.js → 3843.36ccc92a.chunk.js} +2 -2
  97. package/build/static/js/{3843.a9b49a31.chunk.js.map → 3843.36ccc92a.chunk.js.map} +1 -1
  98. package/build/static/js/4168.cb27218c.chunk.js +2 -0
  99. package/build/static/js/4168.cb27218c.chunk.js.map +1 -0
  100. package/build/static/js/4666.05463332.chunk.js +2 -0
  101. package/build/static/js/{4666.d14420a6.chunk.js.map → 4666.05463332.chunk.js.map} +1 -1
  102. package/build/static/js/5196.79f43391.chunk.js +2 -0
  103. package/build/static/js/{5196.a2cba1ec.chunk.js.map → 5196.79f43391.chunk.js.map} +1 -1
  104. package/build/static/js/5362.cff3d5e8.chunk.js +3 -0
  105. package/build/static/js/{5362.5fc27935.chunk.js.map → 5362.cff3d5e8.chunk.js.map} +1 -1
  106. package/build/static/js/5600.bec6c7cf.chunk.js +2 -0
  107. package/build/static/js/{5600.85ba4bf2.chunk.js.map → 5600.bec6c7cf.chunk.js.map} +1 -1
  108. package/build/static/js/{5673.1fab0476.chunk.js → 5673.bf4ca2d8.chunk.js} +2 -2
  109. package/build/static/js/{5673.1fab0476.chunk.js.map → 5673.bf4ca2d8.chunk.js.map} +1 -1
  110. package/build/static/js/5941.4931c1a5.chunk.js +2 -0
  111. package/build/static/js/5941.4931c1a5.chunk.js.map +1 -0
  112. package/build/static/js/{5996.71e827a6.chunk.js → 5996.f894206e.chunk.js} +2 -2
  113. package/build/static/js/{5996.71e827a6.chunk.js.map → 5996.f894206e.chunk.js.map} +1 -1
  114. package/build/static/js/6213.dd73c376.chunk.js +2 -0
  115. package/build/static/js/6213.dd73c376.chunk.js.map +1 -0
  116. package/build/static/js/6499.afdde7b5.chunk.js +2 -0
  117. package/build/static/js/6499.afdde7b5.chunk.js.map +1 -0
  118. package/build/static/js/6900.7c1ed7ed.chunk.js +2 -0
  119. package/build/static/js/6900.7c1ed7ed.chunk.js.map +1 -0
  120. package/build/static/js/{7227.4db45669.chunk.js → 7227.6ee897e5.chunk.js} +3 -3
  121. package/build/static/js/{7227.4db45669.chunk.js.map → 7227.6ee897e5.chunk.js.map} +1 -1
  122. package/build/static/js/7285.58da05db.chunk.js +2 -0
  123. package/build/static/js/7285.58da05db.chunk.js.map +1 -0
  124. package/build/static/js/7777.5f0afc1a.chunk.js +2 -0
  125. package/build/static/js/{7777.55b9c954.chunk.js.map → 7777.5f0afc1a.chunk.js.map} +1 -1
  126. package/build/static/js/{8016.ffba9f87.chunk.js → 8016.c5fbb5c2.chunk.js} +2 -2
  127. package/build/static/js/{8016.ffba9f87.chunk.js.map → 8016.c5fbb5c2.chunk.js.map} +1 -1
  128. package/build/static/js/{8111.97de8531.chunk.js → 8111.769b1db8.chunk.js} +2 -2
  129. package/build/static/js/{8111.97de8531.chunk.js.map → 8111.769b1db8.chunk.js.map} +1 -1
  130. package/build/static/js/8148.c8cb3414.chunk.js +3 -0
  131. package/build/static/js/8148.c8cb3414.chunk.js.map +1 -0
  132. package/build/static/js/{8151.e9794f31.chunk.js → 8151.05b581fa.chunk.js} +2 -2
  133. package/build/static/js/{8151.e9794f31.chunk.js.map → 8151.05b581fa.chunk.js.map} +1 -1
  134. package/build/static/js/8267.b4d00822.chunk.js +2 -0
  135. package/build/static/js/{8267.a19b2789.chunk.js.map → 8267.b4d00822.chunk.js.map} +1 -1
  136. package/build/static/js/8564.8f01b47a.chunk.js +2 -0
  137. package/build/static/js/8564.8f01b47a.chunk.js.map +1 -0
  138. package/build/static/js/{8725.8c209220.chunk.js → 8725.d7295a22.chunk.js} +2 -2
  139. package/build/static/js/{8725.8c209220.chunk.js.map → 8725.d7295a22.chunk.js.map} +1 -1
  140. package/build/static/js/{9053.94b035ac.chunk.js → 9053.5c8e2f20.chunk.js} +3 -3
  141. package/build/static/js/{9053.94b035ac.chunk.js.map → 9053.5c8e2f20.chunk.js.map} +1 -1
  142. package/build/static/js/{931.75a9d316.chunk.js → 931.04a5ad55.chunk.js} +2 -2
  143. package/build/static/js/{931.75a9d316.chunk.js.map → 931.04a5ad55.chunk.js.map} +1 -1
  144. package/build/static/js/9666.6ab09d66.chunk.js +2 -0
  145. package/build/static/js/9666.6ab09d66.chunk.js.map +1 -0
  146. package/build/static/js/{9911.7aee726d.chunk.js → 9911.5b68f0f3.chunk.js} +2 -2
  147. package/build/static/js/{9911.7aee726d.chunk.js.map → 9911.5b68f0f3.chunk.js.map} +1 -1
  148. package/build/static/js/main.e37e72f0.js +2 -0
  149. package/build/static/js/main.e37e72f0.js.map +1 -0
  150. package/package.json +1 -1
  151. package/build/static/css/1151.ec1bbfc0.chunk.css +0 -2
  152. package/build/static/css/1153.bd20b743.chunk.css +0 -2
  153. package/build/static/css/1454.c0a0991e.chunk.css +0 -2
  154. package/build/static/css/1554.a585edf1.chunk.css +0 -2
  155. package/build/static/css/192.73637503.chunk.css +0 -2
  156. package/build/static/css/1932.0bf35bc9.chunk.css +0 -2
  157. package/build/static/css/2637.ae1f2887.chunk.css +0 -2
  158. package/build/static/css/2637.ae1f2887.chunk.css.map +0 -1
  159. package/build/static/css/2716.6f49ddb5.chunk.css +0 -2
  160. package/build/static/css/2921.935ed0ce.chunk.css +0 -2
  161. package/build/static/css/2921.935ed0ce.chunk.css.map +0 -1
  162. package/build/static/css/3333.7d0ae50b.chunk.css +0 -2
  163. package/build/static/css/4666.6b5dde12.chunk.css +0 -2
  164. package/build/static/css/5196.29f6749e.chunk.css +0 -2
  165. package/build/static/css/5362.db0ec87d.chunk.css +0 -2
  166. package/build/static/css/5600.bc21bda7.chunk.css +0 -2
  167. package/build/static/css/5673.79f68b31.chunk.css +0 -2
  168. package/build/static/css/5941.6743598e.chunk.css +0 -2
  169. package/build/static/css/5941.6743598e.chunk.css.map +0 -1
  170. package/build/static/css/7227.c8f5f467.chunk.css +0 -2
  171. package/build/static/css/8148.7a78b9f0.chunk.css +0 -2
  172. package/build/static/css/8148.7a78b9f0.chunk.css.map +0 -1
  173. package/build/static/css/9053.6a1a6919.chunk.css +0 -2
  174. package/build/static/css/931.7a220088.chunk.css +0 -2
  175. package/build/static/css/9689.7397d527.chunk.css +0 -2
  176. package/build/static/css/9911.75d3b627.chunk.css +0 -2
  177. package/build/static/js/1153.0d52625e.chunk.js +0 -3
  178. package/build/static/js/1554.2e647156.chunk.js +0 -3
  179. package/build/static/js/1922.c52450c3.chunk.js.map +0 -1
  180. package/build/static/js/1932.a0e955f3.chunk.js +0 -2
  181. package/build/static/js/2503.e9de0bb4.chunk.js +0 -2
  182. package/build/static/js/2517.bfbef0e3.chunk.js +0 -2
  183. package/build/static/js/2637.4a57844b.chunk.js.map +0 -1
  184. package/build/static/js/2716.303242fa.chunk.js +0 -3
  185. package/build/static/js/2730.40a28c60.chunk.js +0 -2
  186. package/build/static/js/2921.a64b88fb.chunk.js +0 -2
  187. package/build/static/js/2921.a64b88fb.chunk.js.map +0 -1
  188. package/build/static/js/3245.3eeca0e4.chunk.js +0 -3
  189. package/build/static/js/3245.3eeca0e4.chunk.js.map +0 -1
  190. package/build/static/js/3805.6149ae4b.chunk.js +0 -2
  191. package/build/static/js/3805.6149ae4b.chunk.js.map +0 -1
  192. package/build/static/js/4168.bc1cc45c.chunk.js +0 -2
  193. package/build/static/js/4168.bc1cc45c.chunk.js.map +0 -1
  194. package/build/static/js/4666.d14420a6.chunk.js +0 -2
  195. package/build/static/js/5196.a2cba1ec.chunk.js +0 -2
  196. package/build/static/js/5362.5fc27935.chunk.js +0 -3
  197. package/build/static/js/5600.85ba4bf2.chunk.js +0 -2
  198. package/build/static/js/5941.178c2afc.chunk.js +0 -2
  199. package/build/static/js/5941.178c2afc.chunk.js.map +0 -1
  200. package/build/static/js/6213.8d51d652.chunk.js +0 -2
  201. package/build/static/js/6213.8d51d652.chunk.js.map +0 -1
  202. package/build/static/js/6499.3dcf0f88.chunk.js +0 -2
  203. package/build/static/js/6499.3dcf0f88.chunk.js.map +0 -1
  204. package/build/static/js/6900.67ca7456.chunk.js +0 -2
  205. package/build/static/js/6900.67ca7456.chunk.js.map +0 -1
  206. package/build/static/js/7285.e023f277.chunk.js +0 -2
  207. package/build/static/js/7285.e023f277.chunk.js.map +0 -1
  208. package/build/static/js/7777.55b9c954.chunk.js +0 -2
  209. package/build/static/js/8148.71868223.chunk.js +0 -3
  210. package/build/static/js/8148.71868223.chunk.js.map +0 -1
  211. package/build/static/js/8267.a19b2789.chunk.js +0 -2
  212. package/build/static/js/8564.c755faf3.chunk.js +0 -2
  213. package/build/static/js/8564.c755faf3.chunk.js.map +0 -1
  214. package/build/static/js/9666.7b24426a.chunk.js +0 -2
  215. package/build/static/js/9666.7b24426a.chunk.js.map +0 -1
  216. package/build/static/js/main.d3a20250.js +0 -2
  217. package/build/static/js/main.d3a20250.js.map +0 -1
  218. /package/build/static/js/{1153.0d52625e.chunk.js.LICENSE.txt → 1153.3ffe6820.chunk.js.LICENSE.txt} +0 -0
  219. /package/build/static/js/{1454.c087b2eb.chunk.js.LICENSE.txt → 1454.fa2e61ce.chunk.js.LICENSE.txt} +0 -0
  220. /package/build/static/js/{1554.2e647156.chunk.js.LICENSE.txt → 1554.9103d1ed.chunk.js.LICENSE.txt} +0 -0
  221. /package/build/static/js/{2716.303242fa.chunk.js.LICENSE.txt → 2716.0ff4ed71.chunk.js.LICENSE.txt} +0 -0
  222. /package/build/static/js/{5362.5fc27935.chunk.js.LICENSE.txt → 5362.cff3d5e8.chunk.js.LICENSE.txt} +0 -0
  223. /package/build/static/js/{7227.4db45669.chunk.js.LICENSE.txt → 7227.6ee897e5.chunk.js.LICENSE.txt} +0 -0
  224. /package/build/static/js/{8148.71868223.chunk.js.LICENSE.txt → 8148.c8cb3414.chunk.js.LICENSE.txt} +0 -0
  225. /package/build/static/js/{9053.94b035ac.chunk.js.LICENSE.txt → 9053.5c8e2f20.chunk.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- (self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[4168],{46749:(module,__unused_webpack_exports,__webpack_require__)=>{var _classStaticPrivateMethodGet=__webpack_require__(8443).default,_defineProperty=__webpack_require__(43693).default,_classPrivateMethodInitSpec=__webpack_require__(93312).default,_classPrivateMethodGet=__webpack_require__(70137).default,_classStaticPrivateFieldSpecSet=__webpack_require__(31399).default,_classStaticPrivateFieldSpecGet=__webpack_require__(82435).default,_classPrivateFieldInitSpec=__webpack_require__(42459).default,_classPrivateFieldGet=__webpack_require__(44972).default,_classPrivateFieldSet=__webpack_require__(32808).default,factory;globalThis,factory=()=>(()=>{"use strict";var __webpack_modules__=[,(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.RenderingIntentFlag=t.PromiseCapability=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.MAX_IMAGE_SIZE_TO_CACHE=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=function(e,t){e||n(t)},t.bytesToString=function(e){"object"===typeof e&&void 0!==(null===e||void 0===e?void 0:e.length)||n("Invalid argument for bytesToString");const t=e.length,s=8192;if(t<s)return String.fromCharCode.apply(null,e);const i=[];for(let a=0;a<t;a+=s){const n=Math.min(a+s,t),r=e.subarray(a,n);i.push(String.fromCharCode.apply(null,r))}return i.join("")},t.createValidAbsoluteUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(s&&"string"===typeof e){if(s.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);(null===t||void 0===t?void 0:t.length)>=2&&(e="http://".concat(e))}if(s.tryConvertEncoding)try{e=u(e)}catch(i){}}const a=t?new URL(e,t):new URL(e);if(function(e){switch(null===e||void 0===e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(i){}return null},t.getModificationDate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return i},t.info=function(e){i>=s.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===typeof e&&void 0!==(null===e||void 0===e?void 0:e.byteLength)},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(let s=0,i=e.length;s<i;s++)if(e[s]!==t[s])return!1;return!0},t.normalizeUnicode=function(e){return f||(f=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,g=new Map([["\ufb05","\u017ft"]])),e.replaceAll(f,((e,t,s)=>t?t.normalize("NFKC"):g.get(s)))},t.objectFromMap=function(e){const t=Object.create(null);for(const[s,i]of e)t[s]=i;return t},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(i=e)},t.shadow=r,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=l,t.stringToPDFString=function(e){if(e[0]>="\xef"){let t;if("\xfe"===e[0]&&"\xff"===e[1]?t="utf-16be":"\xff"===e[0]&&"\xfe"===e[1]?t="utf-16le":"\xef"===e[0]&&"\xbb"===e[1]&&"\xbf"===e[2]&&(t="utf-8"),t)try{const s=new TextDecoder(t,{fatal:!0}),i=l(e);return s.decode(i)}catch(s){a('stringToPDFString: "'.concat(s,'".'))}}const t=[];for(let i=0,a=e.length;i<a;i++){const s=h[e.charCodeAt(i)];t.push(s?String.fromCharCode(s):e.charAt(i))}return t.join("")},t.stringToUTF8String=u,t.unreachable=n,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=a,t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.MAX_IMAGE_SIZE_TO_CACHE=1e7,t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35,t.BASELINE_FACTOR=.25925925925925924,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},t.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"};const s={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=s,t.CMapCompressionType={NONE:0,BINARY:1},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let i=s.WARNINGS;function a(e){i>=s.WARNINGS&&console.log("Warning: ".concat(e))}function n(e){throw new Error(e)}function r(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(e,t,{value:s,enumerable:!i,configurable:!0,writable:!1}),s}const o=function(){function e(t,s){this.constructor===e&&n("Cannot initialize BaseException."),this.message=t,this.name=s}return e.prototype=new Error,e.constructor=e,e}();function l(e){"string"!==typeof e&&n("Invalid argument for stringToBytes");const t=e.length,s=new Uint8Array(t);for(let i=0;i<t;++i)s[i]=255&e.charCodeAt(i);return s}t.BaseException=o,t.PasswordException=class extends o{constructor(e,t){super(e,"PasswordException"),this.code=t}},t.UnknownErrorException=class extends o{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},t.InvalidPDFException=class extends o{constructor(e){super(e,"InvalidPDFException")}},t.MissingPDFException=class extends o{constructor(e){super(e,"MissingPDFException")}},t.UnexpectedResponseException=class extends o{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},t.FormatError=class extends o{constructor(e){super(e,"FormatError")}},t.AbortException=class extends o{constructor(e){super(e,"AbortException")}},t.FeatureTest=class{static get isLittleEndian(){return r(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return r(this,"isEvalSupported",function(){try{return new Function(""),!0}catch(e){return!1}}())}static get isOffscreenCanvasSupported(){return r(this,"isOffscreenCanvasSupported","undefined"!==typeof OffscreenCanvas)}static get platform(){return"undefined"===typeof navigator?r(this,"platform",{isWin:!1,isMac:!1}):r(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}};const c=[...Array(256).keys()].map((e=>e.toString(16).padStart(2,"0")));class d{static makeHexColor(e,t,s){return"#".concat(c[e]).concat(c[t]).concat(c[s])}static scaleMinMax(e,t){let s;e[0]?(e[0]<0&&(s=t[0],t[0]=t[1],t[1]=s),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(s=t[2],t[2]=t[3],t[3]=s),t[2]*=e[3],t[3]*=e[3]):(s=t[0],t[0]=t[2],t[2]=s,s=t[1],t[1]=t[3],t[3]=s,e[1]<0&&(s=t[2],t[2]=t[3],t[3]=s),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(s=t[0],t[0]=t[1],t[1]=s),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const s=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/s,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/s]}static getAxialAlignedBoundingBox(e,t){const s=d.applyTransform(e,t),i=d.applyTransform(e.slice(2,4),t),a=d.applyTransform([e[0],e[3]],t),n=d.applyTransform([e[2],e[1]],t);return[Math.min(s[0],i[0],a[0],n[0]),Math.min(s[1],i[1],a[1],n[1]),Math.max(s[0],i[0],a[0],n[0]),Math.max(s[1],i[1],a[1],n[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],s=e[0]*t[0]+e[1]*t[2],i=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],n=e[2]*t[1]+e[3]*t[3],r=(s+n)/2,o=Math.sqrt((s+n)**2-4*(s*n-a*i))/2,l=r+o||1,c=r-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const s=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),i=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(s>i)return null;const a=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),n=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return a>n?null:[s,a,i,n]}static bezierBoundingBox(e,t,s,i,a,n,r,o){const l=[],c=[[],[]];let d,h,u,p,f,g,v,m;for(let P=0;P<2;++P)if(0===P?(h=6*e-12*s+6*a,d=-3*e+9*s-9*a+3*r,u=3*s-3*e):(h=6*t-12*i+6*n,d=-3*t+9*i-9*n+3*o,u=3*i-3*t),Math.abs(d)<1e-12){if(Math.abs(h)<1e-12)continue;p=-u/h,0<p&&p<1&&l.push(p)}else v=h*h-4*u*d,m=Math.sqrt(v),v<0||(f=(-h+m)/(2*d),0<f&&f<1&&l.push(f),g=(-h-m)/(2*d),0<g&&g<1&&l.push(g));let _,b=l.length;const y=b;for(;b--;)p=l[b],_=1-p,c[0][b]=_*_*_*e+3*_*_*p*s+3*_*p*p*a+p*p*p*r,c[1][b]=_*_*_*t+3*_*_*p*i+3*_*p*p*n+p*p*p*o;return c[0][y]=e,c[1][y]=t,c[0][y+1]=r,c[1][y+1]=o,c[0].length=c[1].length=y+2,[Math.min(...c[0]),Math.min(...c[1]),Math.max(...c[0]),Math.max(...c[1])]}}t.Util=d;const h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function u(e){return decodeURIComponent(escape(e))}var p=new WeakMap;t.PromiseCapability=class{constructor(){_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1}),this.promise=new Promise(((e,t)=>{this.resolve=t=>{_classPrivateFieldSet(this,p,!0),e(t)},this.reject=e=>{_classPrivateFieldSet(this,p,!0),t(e)}}))}get settled(){return _classPrivateFieldGet(this,p)}};let f=null,g=null},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_is_node=__w_pdfjs_require__(10),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_xfa_text=__w_pdfjs_require__(19);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultFilterFactory=_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:e,NodeCMapReaderFactory:t,NodeFilterFactory:s,NodeStandardFontDataFactory:i}=__w_pdfjs_require__(20);exports.DefaultCanvasFactory=DefaultCanvasFactory=e,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=t,exports.DefaultFilterFactory=DefaultFilterFactory=s,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=i}if(_is_node.isNodeJS){const{PDFNodeStream:e}=__w_pdfjs_require__(21);createPDFNetworkStream=t=>new e(t)}else{const{PDFNetworkStream:e}=__w_pdfjs_require__(24),{PDFFetchStream:t}=__w_pdfjs_require__(25);createPDFNetworkStream=s=>(0,_display_utils.isValidFetchUrl)(s.url)?new t(s):new e(s)}function getDocument(e){var t,s;if("string"===typeof e||e instanceof URL?e={url:e}:(0,_util.isArrayBuffer)(e)&&(e={data:e}),"object"!==typeof e)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const i=new PDFDocumentLoadingTask,{docId:a}=i,n=e.url?getUrlProp(e.url):null,r=e.data?getDataProp(e.data):null,o=e.httpHeaders||null,l=!0===e.withCredentials,c=null!==(t=e.password)&&void 0!==t?t:null,d=e.range instanceof PDFDataRangeTransport?e.range:null,h=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let u=e.worker instanceof PDFWorker?e.worker:null;const p=e.verbosity,f="string"!==typeof e.docBaseUrl||(0,_display_utils.isDataScheme)(e.docBaseUrl)?null:e.docBaseUrl,g="string"===typeof e.cMapUrl?e.cMapUrl:null,v=!1!==e.cMapPacked,m=e.CMapReaderFactory||DefaultCMapReaderFactory,_="string"===typeof e.standardFontDataUrl?e.standardFontDataUrl:null,b=e.StandardFontDataFactory||DefaultStandardFontDataFactory,y=!0!==e.stopAtErrors,P=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,A=!1!==e.isEvalSupported,S="boolean"===typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!_is_node.isNodeJS,F=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,w="boolean"===typeof e.disableFontFace?e.disableFontFace:_is_node.isNodeJS,x=!0===e.fontExtraProperties,E=!0===e.enableXfa,C=e.ownerDocument||globalThis.document,M=!0===e.disableRange,k=!0===e.disableStream,T=!0===e.disableAutoFetch,R=!0===e.pdfBug,I=d?d.length:null!==(s=e.length)&&void 0!==s?s:NaN,D="boolean"===typeof e.useSystemFonts?e.useSystemFonts:!_is_node.isNodeJS&&!w,O="boolean"===typeof e.useWorkerFetch?e.useWorkerFetch:m===_display_utils.DOMCMapReaderFactory&&b===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(g,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(_,document.baseURI),G=e.canvasFactory||new DefaultCanvasFactory({ownerDocument:C}),L=e.filterFactory||new DefaultFilterFactory({docId:a,ownerDocument:C});(0,_util.setVerbosityLevel)(p);const N={canvasFactory:G,filterFactory:L};if(O||(N.cMapReaderFactory=new m({baseUrl:g,isCompressed:v}),N.standardFontDataFactory=new b({baseUrl:_})),!u){const e={verbosity:p,port:_worker_options.GlobalWorkerOptions.workerPort};u=e.port?PDFWorker.fromPort(e):new PDFWorker(e),i._worker=u}const j={docId:a,apiVersion:"3.6.172",data:r,password:c,disableAutoFetch:T,rangeChunkSize:h,length:I,docBaseUrl:f,enableXfa:E,evaluatorOptions:{maxImageSize:P,disableFontFace:w,ignoreErrors:y,isEvalSupported:A,isOffscreenCanvasSupported:S,canvasMaxAreaInBytes:F,fontExtraProperties:x,useSystemFonts:D,cMapUrl:O?g:null,standardFontDataUrl:O?_:null}},W={ignoreErrors:y,isEvalSupported:A,disableFontFace:w,fontExtraProperties:x,enableXfa:E,ownerDocument:C,disableAutoFetch:T,pdfBug:R,styleElement:null};return u.promise.then((function(){if(i.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(u,j),t=new Promise((function(e){let t;d?t=new _transport_stream.PDFDataTransportStream({length:I,initialData:d.initialData,progressiveDone:d.progressiveDone,contentDispositionFilename:d.contentDispositionFilename,disableRange:M,disableStream:k},d):r||(t=createPDFNetworkStream({url:n,length:I,httpHeaders:o,withCredentials:l,rangeChunkSize:h,disableRange:M,disableStream:k})),e(t)}));return Promise.all([e,t]).then((function(e){let[t,s]=e;if(i.destroyed)throw new Error("Loading aborted");const n=new _message_handler.MessageHandler(a,t,u.port),r=new WorkerTransport(n,i,s,W,N);i._transport=r,n.send("Ready",null)}))})).catch(i._capability.reject),i}async function _fetchDocument(e,t){if(e.destroyed)throw new Error("Worker was destroyed");const s=await e.messageHandler.sendWithPromise("GetDocRequest",t,t.data?[t.data.buffer]:null);if(e.destroyed)throw new Error("Worker was destroyed");return s}function getUrlProp(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch(t){if(_is_node.isNodeJS&&"string"===typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(e){if(_is_node.isNodeJS&&"undefined"!==typeof Buffer&&e instanceof Buffer)return(0,_display_utils.deprecated)("Please provide binary data as `Uint8Array`, rather than `Buffer`."),new Uint8Array(e);if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"===typeof e)return(0,_util.stringToBytes)(e);if("object"===typeof e&&!isNaN(null===e||void 0===e?void 0:e.length)||(0,_util.isArrayBuffer)(e))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}class PDFDocumentLoadingTask{constructor(){var e,t;this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d".concat((_classStaticPrivateFieldSpecSet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId,(e=_classStaticPrivateFieldSpecGet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId),t=e++,e)),t)),this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e;this.destroyed=!0,await(null===(e=this._transport)||void 0===e?void 0:e.destroy()),this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}var _docId={writable:!0,value:0};exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=e,this.initialData=t,this.progressiveDone=s,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const s of this._rangeListeners)s(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const s of this._progressListeners)s(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;var _delayedCleanupTimeout=new WeakMap,_pendingCleanup=new WeakMap,_tryCleanup=new WeakSet,_abortDelayedCleanup=new WeakSet;class PDFPageProxy{constructor(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_classPrivateMethodInitSpec(this,_abortDelayedCleanup),_classPrivateMethodInitSpec(this,_tryCleanup),_classPrivateFieldInitSpec(this,_delayedCleanupTimeout,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_pendingCleanup,{writable:!0,value:!1}),this._pageIndex=e,this._pageInfo=t,this._transport=s,this._stats=i?new _display_utils.StatTimer:null,this._pdfBug=i,this.commonObjs=s.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:e,rotation:t=this.rotate,offsetX:s=0,offsetY:i=0,dontFlip:a=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:s,offsetY:i,dontFlip:a})}getAnnotations(){let{intent:e="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return(null===(e=this._transport._htmlForXfa)||void 0===e?void 0:e.children[this._pageIndex])||null}render(e){var t,s,i;let{canvasContext:a,viewport:n,intent:r="display",annotationMode:o=_util.AnnotationMode.ENABLE,transform:l=null,background:c=null,optionalContentConfigPromise:d=null,annotationCanvasMap:h=null,pageColors:u=null,printAnnotationStorage:p=null}=e;if(null!==(t=arguments[0])&&void 0!==t&&t.canvasFactory)throw new Error("render no longer accepts the `canvasFactory`-option, please pass it to the `getDocument`-function instead.");null===(s=this._stats)||void 0===s||s.time("Overall");const f=this._transport.getRenderingIntent(r,o,p);_classPrivateFieldSet(this,_pendingCleanup,!1),_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),d||(d=this._transport.getOptionalContentConfig());let g=this._intentStates.get(f.cacheKey);g||(g=Object.create(null),this._intentStates.set(f.cacheKey,g)),g.streamReaderCancelTimeout&&(clearTimeout(g.streamReaderCancelTimeout),g.streamReaderCancelTimeout=null);const v=!!(f.renderingIntent&_util.RenderingIntentFlag.PRINT);var m;g.displayReadyCapability||(g.displayReadyCapability=new _util.PromiseCapability,g.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(m=this._stats)||void 0===m||m.time("Page Request"),this._pumpOperatorList(f));const _=e=>{var t,s;g.renderTasks.delete(b),(this._maybeCleanupAfterRender||v)&&_classPrivateFieldSet(this,_pendingCleanup,!0),_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!v),e?(b.capability.reject(e),this._abortOperatorList({intentState:g,reason:e instanceof Error?e:new Error(e)})):b.capability.resolve(),null===(t=this._stats)||void 0===t||t.timeEnd("Rendering"),null===(s=this._stats)||void 0===s||s.timeEnd("Overall")},b=new InternalRenderTask({callback:_,params:{canvasContext:a,viewport:n,transform:l,background:c},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:h,operatorList:g.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!v,pdfBug:this._pdfBug,pageColors:u});((i=g).renderTasks||(i.renderTasks=new Set)).add(b);const y=b.task;return Promise.all([g.displayReadyCapability.promise,d]).then((e=>{var t;let[s,i]=e;_classPrivateFieldGet(this,_pendingCleanup)?_():(null===(t=this._stats)||void 0===t||t.time("Rendering"),b.initializeGraphics({transparency:s,optionalContentConfig:i}),b.operatorListChanged())})).catch(_),y}getOperatorList(){let{intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE,printAnnotationStorage:s=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=this._transport.getRenderingIntent(e,t,s,!0);let a,n=this._intentStates.get(i.cacheKey);var r,o;return n||(n=Object.create(null),this._intentStates.set(i.cacheKey,n)),n.opListReadCapability||(a=Object.create(null),a.operatorListChanged=function(){n.operatorList.lastChunk&&(n.opListReadCapability.resolve(n.operatorList),n.renderTasks.delete(a))},n.opListReadCapability=new _util.PromiseCapability,((r=n).renderTasks||(r.renderTasks=new Set)).add(a),n.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(o=this._stats)||void 0===o||o.time("Page Request"),this._pumpOperatorList(i)),n.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:e=!1,disableNormalization:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((e=>_xfa_text.XfaText.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,s){const i=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){i.read().then((function(s){let{value:i,done:n}=s;n?e(a):(Object.assign(a.styles,i.styles),a.items.push(...i.items),t())}),s)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const s of t.renderTasks)e.push(s.completed),s.cancel();return this.objs.clear(),_classPrivateFieldSet(this,_pendingCleanup,!1),_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),Promise.all(e)}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateFieldSet(this,_pendingCleanup,!0);const t=_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!1);return e&&t&&this._stats&&(this._stats=new _display_utils.StatTimer),t}_startRenderPage(e,t){var s,i;const a=this._intentStates.get(t);a&&(null===(s=this._stats)||void 0===s||s.timeEnd("Page Request"),null===(i=a.displayReadyCapability)||void 0===i||i.resolve(e))}_renderPageChunk(e,t){for(let s=0,i=e.length;s<i;s++)t.operatorList.fnArray.push(e.fnArray[s]),t.operatorList.argsArray.push(e.argsArray[s]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const s of t.renderTasks)s.operatorListChanged();e.lastChunk&&_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!0)}_pumpOperatorList(e){let{renderingIntent:t,cacheKey:s,annotationStorageMap:i}=e;const a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:s,annotationStorage:i}).getReader(),n=this._intentStates.get(s);n.streamReader=a;const r=()=>{a.read().then((e=>{let{value:t,done:s}=e;s?n.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,n),r())}),(e=>{if(n.streamReader=null,!this._transport.destroyed){if(n.operatorList){n.operatorList.lastChunk=!0;for(const e of n.renderTasks)e.operatorListChanged();_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!0)}if(n.displayReadyCapability)n.displayReadyCapability.reject(e);else{if(!n.opListReadCapability)throw e;n.opListReadCapability.reject(e)}}}))};r()}_abortOperatorList(e){let{intentState:t,reason:s,force:i=!1}=e;if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!i){if(t.renderTasks.size>0)return;if(s instanceof _display_utils.RenderingCancelledException){let e=RENDERING_CANCELLED_TIMEOUT;return s.extraDelay>0&&s.extraDelay<1e3&&(e+=s.extraDelay),void(t.streamReaderCancelTimeout=setTimeout((()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:s,force:!0})}),e))}}if(t.streamReader.cancel(new _util.AbortException(s.message)).catch((()=>{})),t.streamReader=null,!this._transport.destroyed){for(const[e,s]of this._intentStates)if(s===t){this._intentStates.delete(e);break}this.cleanup()}}}get stats(){return this._stats}}function _tryCleanup2(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),!_classPrivateFieldGet(this,_pendingCleanup))return!1;if(e)return _classPrivateFieldSet(this,_delayedCleanupTimeout,setTimeout((()=>{_classPrivateFieldSet(this,_delayedCleanupTimeout,null),_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!1)}),DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:t,operatorList:s}of this._intentStates.values())if(t.size>0||!s.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),_classPrivateFieldSet(this,_pendingCleanup,!1),!0}function _abortDelayedCleanup2(){_classPrivateFieldGet(this,_delayedCleanupTimeout)&&(clearTimeout(_classPrivateFieldGet(this,_delayedCleanupTimeout)),_classPrivateFieldSet(this,_delayedCleanupTimeout,null))}exports.PDFPageProxy=PDFPageProxy;var _listeners=new WeakMap,_deferred=new WeakMap;class LoopbackPort{constructor(){_classPrivateFieldInitSpec(this,_listeners,{writable:!0,value:new Set}),_classPrivateFieldInitSpec(this,_deferred,{writable:!0,value:Promise.resolve()})}postMessage(e,t){const s={data:structuredClone(e,t?{transfer:t}:null)};_classPrivateFieldGet(this,_deferred).then((()=>{for(const e of _classPrivateFieldGet(this,_listeners))e.call(this,s)}))}addEventListener(e,t){_classPrivateFieldGet(this,_listeners).add(t)}removeEventListener(e,t){_classPrivateFieldGet(this,_listeners).delete(t)}terminate(){_classPrivateFieldGet(this,_listeners).clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"===typeof document){var _document;const e=null===(_document=document)||void 0===_document||null===(_document=_document.currentScript)||void 0===_document?void 0:_document.src;e&&(PDFWorkerUtil.fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(e,t){let s;try{if(s=new URL(e),!s.origin||"null"===s.origin)return!1}catch(a){return!1}const i=new URL(t,s);return s.origin===i.origin},PDFWorkerUtil.createCDNWrapper=function(e){const t='importScripts("'.concat(e,'");');return URL.createObjectURL(new Blob([t]))};class PDFWorker{constructor(){let{name:e=null,port:t=null,verbosity:s=(0,_util.getVerbosityLevel)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t&&_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).has(t))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=e,this.destroyed=!1,this.verbosity=s,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,t)return _classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).set(t,this),void this._initializeFromPort(t);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:t}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t),s=new _message_handler.MessageHandler("main","worker",e),i=()=>{e.removeEventListener("error",a),s.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},a=()=>{this._webWorker||i()};e.addEventListener("error",a),s.on("test",(t=>{e.removeEventListener("error",a),this.destroyed?i():t?(this._messageHandler=s,this._port=e,this._webWorker=e,this._readyCapability.resolve(),s.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),s.destroy(),e.terminate())})),s.on("ready",(t=>{if(e.removeEventListener("error",a),this.destroyed)i();else try{n()}catch(s){this._setupFakeWorker()}}));const n=()=>{const e=new Uint8Array;s.send("test",e,[e.buffer])};return void n()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const s="fake".concat(PDFWorkerUtil.fakeWorkerId++),i=new _message_handler.MessageHandler(s+"_worker",s,t);e.setup(i,t);const a=new _message_handler.MessageHandler(s,s+"_worker",t);this._messageHandler=a,this._readyCapability.resolve(),a.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(e.message,'".')))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(null===e||void 0===e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return _classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts).has(e.port)?_classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts).get(e.port):new PDFWorker(e)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(t){return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}var _workerPorts={writable:!0,value:new WeakMap};exports.PDFWorker=PDFWorker;var _methodPromises=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_cacheSimpleMethod=new WeakSet;class WorkerTransport{constructor(e,t,s,i,a){_classPrivateMethodInitSpec(this,_cacheSimpleMethod),_classPrivateFieldInitSpec(this,_methodPromises,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map}),this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this._params=i,this.canvasFactory=a.canvasFactory,this.filterFactory=a.filterFactory,this.cMapReaderFactory=a.cMapReaderFactory,this.standardFontDataFactory=a.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=s,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=_util.RenderingIntentFlag.DISPLAY,n=null;switch(e){case"any":a=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":a=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case _util.AnnotationMode.DISABLE:a+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:a+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:a+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,n=(a&_util.RenderingIntentFlag.PRINT&&s instanceof _annotation_storage.PrintAnnotationStorage?s:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(t))}return i&&(a+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:a,cacheKey:"".concat(a,"_").concat(_annotation_storage.AnnotationStorage.getHash(n)),annotationStorageMap:n}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const s of _classPrivateFieldGet(this,_pageCache).values())e.push(s._destroy());_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),_classPrivateFieldGet(this,_methodPromises).clear(),this.filterFactory.destroy(),this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function(e){let{value:s,done:i}=e;i?t.close():((0,_util.assert)(s instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(s),1,[s]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(e=>{const s=new _util.PromiseCapability,i=this._fullReader;return i.headersReady.then((()=>{var e;i.isStreamingSupported&&i.isRangeSupported||(this._lastProgress&&(null===(e=t.onProgress)||void 0===e||e.call(t,this._lastProgress)),i.onProgress=e=>{var s;null===(s=t.onProgress)||void 0===s||s.call(t,{loaded:e.loaded,total:e.total})});s.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),s.reject),s.promise})),e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const s=this._networkStream.getRangeReader(e.begin,e.end);s?(t.onPull=()=>{s.read().then((function(e){let{value:s,done:i}=e;i?t.close():((0,_util.assert)(s instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(s),1,[s]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{s.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(e=>{let{pdfInfo:s}=e;this._numPages=s.numPages,this._htmlForXfa=s.htmlForXfa,delete s.htmlForXfa,t._capability.resolve(new PDFDocumentProxy(s,this))})),e.on("DocException",(function(e){let s;switch(e.name){case"PasswordException":s=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":s=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":s=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":s=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":s=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}t._capability.reject(s)})),e.on("PasswordRequest",(e=>{if(this._passwordCapability=new _util.PromiseCapability,t.onPassword){const i=e=>{e instanceof Error?this._passwordCapability.reject(e):this._passwordCapability.resolve({password:e})};try{t.onPassword(i,e.code)}catch(s){this._passwordCapability.reject(s)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise})),e.on("DataLoaded",(e=>{var s;null===(s=t.onProgress)||void 0===s||s.call(t,{loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{this.destroyed||_classPrivateFieldGet(this,_pageCache).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(t=>{var s;let[i,a,n]=t;if(!this.destroyed&&!this.commonObjs.has(i))switch(a){case"Font":const t=this._params;if("error"in n){const e=n.error;(0,_util.warn)("Error during font loading: ".concat(e)),this.commonObjs.resolve(i,e);break}const r=t.pdfBug&&null!==(s=globalThis.FontInspector)&&void 0!==s&&s.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,o=new _font_loader.FontFaceObject(n,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,inspectFont:r});this.fontLoader.bind(o).catch((t=>e.sendWithPromise("FontFallback",{id:i}))).finally((()=>{!t.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(i,o)}));break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(i,n);break;default:throw new Error("Got unknown common object type ".concat(a))}})),e.on("obj",(e=>{let[t,s,i,a]=e;if(this.destroyed)return;const n=_classPrivateFieldGet(this,_pageCache).get(s);if(!n.objs.has(t))switch(i){case"Image":if(n.objs.resolve(t,a),a){let e;if(a.bitmap){const{width:t,height:s}=a;e=t*s*4}else{var r;e=(null===(r=a.data)||void 0===r?void 0:r.length)||0}e>_util.MAX_IMAGE_SIZE_TO_CACHE&&(n._maybeCleanupAfterRender=!0)}break;case"Pattern":n.objs.resolve(t,a);break;default:throw new Error("Got unknown object type ".concat(i))}})),e.on("DocProgress",(e=>{var s;this.destroyed||null===(s=t.onProgress)||void 0===s||s.call(t,{loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),e.on("FetchStandardFontData",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var e,t;return this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,s=_classPrivateFieldGet(this,_pagePromises).get(t);if(s)return s;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw new Error("Transport destroyed");const s=new PDFPageProxy(t,e,this,this._params.pdfBug);return _classPrivateFieldGet(this,_pageCache).set(t,s),s}));return _classPrivateFieldGet(this,_pagePromises).set(t,i),i}getPageIndex(e){return"object"!==typeof e||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"GetFieldObjects")}hasJSActions(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((e=>new _optional_content_config.OptionalContentConfig(e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=_classPrivateFieldGet(this,_methodPromises).get(e);if(t)return t;const s=this.messageHandler.sendWithPromise(e,null).then((e=>{var t,s,i,a;return{info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:null!==(t=null===(s=this._fullReader)||void 0===s?void 0:s.filename)&&void 0!==t?t:null,contentLength:null!==(i=null===(a=this._fullReader)||void 0===a?void 0:a.contentLength)&&void 0!==i?i:null}}));return _classPrivateFieldGet(this,_methodPromises).set(e,s),s}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of _classPrivateFieldGet(this,_pageCache).values())if(!e.cleanup())throw new Error("startCleanup: Page ".concat(e.pageNumber," is currently rendering."));this.commonObjs.clear(),e||this.fontLoader.clear(),_classPrivateFieldGet(this,_methodPromises).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:e,enableXfa:t}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e,enableXfa:t})}}function _cacheSimpleMethod2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=_classPrivateFieldGet(this,_methodPromises).get(e);if(s)return s;const i=this.messageHandler.sendWithPromise(e,t);return _classPrivateFieldGet(this,_methodPromises).set(e,i),i}var _objs=new WeakMap,_ensureObj=new WeakSet;class PDFObjects{constructor(){_classPrivateMethodInitSpec(this,_ensureObj),_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){const s=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);return s.capability.promise.then((()=>t(s.data))),null}const s=_classPrivateFieldGet(this,_objs)[e];if(null===s||void 0===s||!s.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return s.data}has(e){const t=_classPrivateFieldGet(this,_objs)[e];return(null===t||void 0===t?void 0:t.capability.settled)||!1}resolve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);s.data=t,s.capability.resolve()}clear(){for(const t in _classPrivateFieldGet(this,_objs)){var e;const{data:s}=_classPrivateFieldGet(this,_objs)[t];null===s||void 0===s||null===(e=s.bitmap)||void 0===e||e.close()}_classPrivateFieldSet(this,_objs,Object.create(null))}}function _ensureObj2(e){const t=_classPrivateFieldGet(this,_objs)[e];return t||(_classPrivateFieldGet(this,_objs)[e]={capability:new _util.PromiseCapability,data:null})}var _internalRenderTask=new WeakMap;class RenderTask{constructor(e){_classPrivateFieldInitSpec(this,_internalRenderTask,{writable:!0,value:null}),_classPrivateFieldSet(this,_internalRenderTask,e),this.onContinue=null}get promise(){return _classPrivateFieldGet(this,_internalRenderTask).capability.promise}cancel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;_classPrivateFieldGet(this,_internalRenderTask).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=_classPrivateFieldGet(this,_internalRenderTask).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=_classPrivateFieldGet(this,_internalRenderTask);return e.form||e.canvas&&(null===t||void 0===t?void 0:t.size)>0}}exports.RenderTask=RenderTask;class InternalRenderTask{constructor(e){let{callback:t,params:s,objs:i,commonObjs:a,annotationCanvasMap:n,operatorList:r,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:d=!1,pdfBug:h=!1,pageColors:u=null}=e;this.callback=t,this.params=s,this.objs=i,this.commonObjs=a,this.annotationCanvasMap=n,this.operatorListIdx=null,this.operatorList=r,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=h,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===d&&"undefined"!==typeof window,this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=s.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics(e){var t,s;let{transparency:i=!1,optionalContentConfig:a}=e;if(this.cancelled)return;if(this._canvas){if(_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).add(this._canvas)}this._pdfBug&&null!==(t=globalThis.StepperManager)&&void 0!==t&&t.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:n,viewport:r,transform:o,background:l}=this.params;this.gfx=new _canvas.CanvasGraphics(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:a},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:r,transparency:i,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,null===(s=this.graphicsReadyCallback)||void 0===s||s.call(this)}cancel(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,null===(e=this.gfx)||void 0===e||e.endDrawing(),this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas",s))}operatorListChanged(){var e;this.graphicsReady?(null===(e=this.stepper)||void 0===e||e.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(this.pageColors),this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas),this.callback())))}}var _canvasInUse={writable:!0,value:new WeakSet};const version="3.6.172";exports.version=version;const build="4d3dfe254";exports.build=build},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var i=s(1),a=s(4),n=s(8),r=new WeakMap,o=new WeakMap,l=new WeakSet;class c{constructor(){_classPrivateMethodInitSpec(this,l),_classPrivateFieldInitSpec(this,r,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,o,{writable:!0,value:new Map}),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const s=_classPrivateFieldGet(this,o).get(e);return void 0===s?t:Object.assign(t,s)}getRawValue(e){return _classPrivateFieldGet(this,o).get(e)}remove(e){if(_classPrivateFieldGet(this,o).delete(e),0===_classPrivateFieldGet(this,o).size&&this.resetModified(),"function"===typeof this.onAnnotationEditor){for(const e of _classPrivateFieldGet(this,o).values())if(e instanceof a.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e,t){const s=_classPrivateFieldGet(this,o).get(e);let i=!1;if(void 0!==s)for(const[a,n]of Object.entries(t))s[a]!==n&&(i=!0,s[a]=n);else i=!0,_classPrivateFieldGet(this,o).set(e,t);i&&_classPrivateMethodGet(this,l,d).call(this),t instanceof a.AnnotationEditor&&"function"===typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return _classPrivateFieldGet(this,o).has(e)}getAll(){return _classPrivateFieldGet(this,o).size>0?(0,i.objectFromMap)(_classPrivateFieldGet(this,o)):null}setAll(e){for(const[t,s]of Object.entries(e))this.setValue(t,s)}get size(){return _classPrivateFieldGet(this,o).size}resetModified(){_classPrivateFieldGet(this,r)&&(_classPrivateFieldSet(this,r,!1),"function"===typeof this.onResetModified&&this.onResetModified())}get print(){return new u(this)}get serializable(){if(0===_classPrivateFieldGet(this,o).size)return null;const e=new Map;for(const[t,s]of _classPrivateFieldGet(this,o)){const i=s instanceof a.AnnotationEditor?s.serialize():s;i&&e.set(t,i)}return e}static getHash(e){if(!e)return"";const t=new n.MurmurHash3_64;for(const[s,i]of e)t.update("".concat(s,":").concat(JSON.stringify(i)));return t.hexdigest()}}function d(){_classPrivateFieldGet(this,r)||(_classPrivateFieldSet(this,r,!0),"function"===typeof this.onSetModified&&this.onSetModified())}t.AnnotationStorage=c;var h=new WeakMap;class u extends c{constructor(e){super(),_classPrivateFieldInitSpec(this,h,{writable:!0,value:null}),_classPrivateFieldSet(this,h,structuredClone(e.serializable))}get print(){(0,i.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return _classPrivateFieldGet(this,h)}}t.PrintAnnotationStorage=u},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0;var i=s(5),a=s(1),n=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap;class h{constructor(e){_classPrivateFieldInitSpec(this,n,{writable:!0,value:this.focusin.bind(this)}),_classPrivateFieldInitSpec(this,r,{writable:!0,value:this.focusout.bind(this)}),_classPrivateFieldInitSpec(this,o,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,l,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:!1}),_defineProperty(this,"_uiManager",null),_classPrivateFieldInitSpec(this,d,{writable:!0,value:h._zIndex++}),this.constructor===h&&(0,a.unreachable)("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager;const{rotation:t,rawDims:{pageWidth:s,pageHeight:i,pageX:u,pageY:p}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[s,i],this.pageTranslation=[u,p];const[f,g]=this.parentDimensions;this.x=e.x/f,this.y=e.y/g,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,a.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=_classPrivateFieldGet(this,d)}setParent(e){null!==e&&(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions),this.parent=e}focusin(e){_classPrivateFieldGet(this,o)?_classPrivateFieldSet(this,o,!1):this.parent.setSelected(this)}focusout(e){var t;if(!this.isAttachedToDOM)return;const s=e.relatedTarget;null!==s&&void 0!==s&&s.closest("#".concat(this.id))||(e.preventDefault(),null!==(t=this.parent)&&void 0!==t&&t.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}dragstart(e){const t=this.parent.div.getBoundingClientRect();this.startX=e.clientX-t.x,this.startY=e.clientY-t.y,e.dataTransfer.setData("text/plain",this.id),e.dataTransfer.effectAllowed="move"}setAt(e,t,s,i){const[a,n]=this.parentDimensions;[s,i]=this.screenToPageTranslation(s,i),this.x=(e+s)/a,this.y=(t+i)/n,this.div.style.left="".concat(100*this.x,"%"),this.div.style.top="".concat(100*this.y,"%")}translate(e,t){const[s,i]=this.parentDimensions;[e,t]=this.screenToPageTranslation(e,t),this.x+=e/s,this.y+=t/i,this.div.style.left="".concat(100*this.x,"%"),this.div.style.top="".concat(100*this.y,"%")}screenToPageTranslation(e,t){switch(this.parentRotation){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{realScale:e}=this._uiManager.viewParameters,[t,s]=this.pageDimensions;return[t*e,s*e]}setDims(e,t){const[s,i]=this.parentDimensions;this.div.style.width="".concat(100*e/s,"%"),this.div.style.height="".concat(100*t/i,"%")}fixDims(){const{style:e}=this.div,{height:t,width:s}=e,i=s.endsWith("%"),a=t.endsWith("%");if(i&&a)return;const[n,r]=this.parentDimensions;i||(e.width="".concat(100*parseFloat(s)/n,"%")),a||(e.height="".concat(100*parseFloat(t)/r,"%"))}getInitialTranslation(){return[0,0]}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",_classPrivateFieldGet(this,n)),this.div.addEventListener("focusout",_classPrivateFieldGet(this,r));const[e,t]=this.getInitialTranslation();return this.translate(e,t),(0,i.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(e){const{isMac:t}=a.FeatureTest.platform;0!==e.button||e.ctrlKey&&t?e.preventDefault():(e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this),_classPrivateFieldSet(this,o,!0))}getRect(e,t){const s=this.parentScale,[i,a]=this.pageDimensions,[n,r]=this.pageTranslation,o=e/s,l=t/s,c=this.x*i,d=this.y*a,h=this.width*i,u=this.height*a;switch(this.rotation){case 0:return[c+o+n,a-d-l-u+r,c+o+h+n,a-d-l+r];case 90:return[c+l+n,a-d+o+r,c+l+u+n,a-d+o+h+r];case 180:return[c-o-h+n,a-d+l+r,c-o+n,a-d+l+u+r];case 270:return[c-l-u+n,a-d-o-h+r,c-l+n,a-d-o+r];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[s,i,a,n]=e,r=a-s,o=n-i;switch(this.rotation){case 0:return[s,t-n,r,o];case 90:return[s,t-i,o,r];case 180:return[a,t-i,r,o];case 270:return[a,t-n,o,r];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){_classPrivateFieldSet(this,c,!0)}disableEditMode(){_classPrivateFieldSet(this,c,!1)}isInEditMode(){return _classPrivateFieldGet(this,c)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var e;null===(e=this.div)||void 0===e||e.addEventListener("focusin",_classPrivateFieldGet(this,n))}serialize(){(0,a.unreachable)("An editor must be serializable")}static deserialize(e,t,s){const i=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:s});i.rotation=e.rotation;const[a,n]=i.pageDimensions,[r,o,l,c]=i.getRectInCurrentCoords(e.rect,n);return i.x=r/a,i.y=o/n,i.width=l/a,i.height=c/n,i}remove(){this.div.removeEventListener("focusin",_classPrivateFieldGet(this,n)),this.div.removeEventListener("focusout",_classPrivateFieldGet(this,r)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var e;null===(e=this.div)||void 0===e||e.classList.add("selectedEditor")}unselect(){var e;null===(e=this.div)||void 0===e||e.classList.remove("selectedEditor")}updateParams(e,t){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return _classPrivateFieldGet(this,l)}set isEditing(e){_classPrivateFieldSet(this,l,e),e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}}_defineProperty(h,"_colorManager",new i.ColorManager),_defineProperty(h,"_zIndex",1),t.AnnotationEditor=h},(e,t,s)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=function(e,t,s){for(const i of s)t.addEventListener(i,e[i].bind(e))},t.opacityToHex=function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")};var a=s(1),n=s(6),r=new WeakMap;class o{constructor(){_classPrivateFieldInitSpec(this,r,{writable:!0,value:0})}getId(){var e,t;return"".concat(a.AnnotationEditorPrefix).concat((_classPrivateFieldSet(this,r,(e=_classPrivateFieldGet(this,r),t=e++,e)),t))}}var l=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap;class u{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;_classPrivateFieldInitSpec(this,l,{writable:!0,value:[]}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,h,{writable:!0,value:-1}),_classPrivateFieldSet(this,d,e)}add(e){let{cmd:t,undo:s,mustExec:i,type:a=NaN,overwriteIfSameType:n=!1,keepUndo:r=!1}=e;if(i&&t(),_classPrivateFieldGet(this,c))return;const o={cmd:t,undo:s,type:a};if(-1===_classPrivateFieldGet(this,h))return _classPrivateFieldGet(this,l).length>0&&(_classPrivateFieldGet(this,l).length=0),_classPrivateFieldSet(this,h,0),void _classPrivateFieldGet(this,l).push(o);if(n&&_classPrivateFieldGet(this,l)[_classPrivateFieldGet(this,h)].type===a)return r&&(o.undo=_classPrivateFieldGet(this,l)[_classPrivateFieldGet(this,h)].undo),void(_classPrivateFieldGet(this,l)[_classPrivateFieldGet(this,h)]=o);const u=_classPrivateFieldGet(this,h)+1;u===_classPrivateFieldGet(this,d)?_classPrivateFieldGet(this,l).splice(0,1):(_classPrivateFieldSet(this,h,u),u<_classPrivateFieldGet(this,l).length&&_classPrivateFieldGet(this,l).splice(u)),_classPrivateFieldGet(this,l).push(o)}undo(){-1!==_classPrivateFieldGet(this,h)&&(_classPrivateFieldSet(this,c,!0),_classPrivateFieldGet(this,l)[_classPrivateFieldGet(this,h)].undo(),_classPrivateFieldSet(this,c,!1),_classPrivateFieldSet(this,h,_classPrivateFieldGet(this,h)-1))}redo(){_classPrivateFieldGet(this,h)<_classPrivateFieldGet(this,l).length-1&&(_classPrivateFieldSet(this,h,_classPrivateFieldGet(this,h)+1),_classPrivateFieldSet(this,c,!0),_classPrivateFieldGet(this,l)[_classPrivateFieldGet(this,h)].cmd(),_classPrivateFieldSet(this,c,!1))}hasSomethingToUndo(){return-1!==_classPrivateFieldGet(this,h)}hasSomethingToRedo(){return _classPrivateFieldGet(this,h)<_classPrivateFieldGet(this,l).length-1}destroy(){_classPrivateFieldSet(this,l,null)}}t.CommandManager=u;var p=new WeakSet;class f{constructor(e){_classPrivateMethodInitSpec(this,p),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=a.FeatureTest.platform;for(const[s,i]of e)for(const e of s){const s=e.startsWith("mac+");t&&s?(this.callbacks.set(e.slice(4),i),this.allKeys.add(e.split("+").at(-1))):t||s||(this.callbacks.set(e,i),this.allKeys.add(e.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const s=this.callbacks.get(_classPrivateMethodGet(this,p,g).call(this,t));s&&(s.bind(e)(),t.stopPropagation(),t.preventDefault())}}function g(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t}t.KeyboardManager=f;class v{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return(0,n.getColorValues)(e),(0,a.shadow)(this,"_colors",e)}convert(e){const t=(0,n.getRGB)(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[s,i]of this._colors)if(i.every(((e,s)=>e===t[s])))return v._colorsMapping.get(s);return t}getHexCode(e){const t=this._colors.get(e);return t?a.Util.makeHexColor(...t):e}}_defineProperty(v,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),t.ColorManager=v;var m=new WeakMap,_=new WeakMap,b=new WeakMap,y=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakMap,F=new WeakMap,w=new WeakMap,x=new WeakMap,E=new WeakMap,C=new WeakMap,M=new WeakMap,k=new WeakMap,T=new WeakMap,R=new WeakMap,I=new WeakMap,D=new WeakMap,O=new WeakMap,G=new WeakMap,L=new WeakMap,N=new WeakMap,j=new WeakMap,W=new WeakSet,B=new WeakSet,U=new WeakSet,q=new WeakSet,H=new WeakSet,V=new WeakSet,z=new WeakSet,X=new WeakSet,Y=new WeakSet,K=new WeakSet,J=new WeakSet;class Q{constructor(e,t,s){_classPrivateMethodInitSpec(this,J),_classPrivateMethodInitSpec(this,K),_classPrivateMethodInitSpec(this,Y),_classPrivateMethodInitSpec(this,X),_classPrivateMethodInitSpec(this,z),_classPrivateMethodInitSpec(this,V),_classPrivateMethodInitSpec(this,H),_classPrivateMethodInitSpec(this,q),_classPrivateMethodInitSpec(this,U),_classPrivateMethodInitSpec(this,B),_classPrivateMethodInitSpec(this,W),_classPrivateFieldInitSpec(this,m,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,b,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,y,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,P,{writable:!0,value:new u}),_classPrivateFieldInitSpec(this,A,{writable:!0,value:0}),_classPrivateFieldInitSpec(this,S,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,F,{writable:!0,value:new Set}),_classPrivateFieldInitSpec(this,w,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,x,{writable:!0,value:new o}),_classPrivateFieldInitSpec(this,E,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,C,{writable:!0,value:a.AnnotationEditorType.NONE}),_classPrivateFieldInitSpec(this,M,{writable:!0,value:new Set}),_classPrivateFieldInitSpec(this,k,{writable:!0,value:this.copy.bind(this)}),_classPrivateFieldInitSpec(this,T,{writable:!0,value:this.cut.bind(this)}),_classPrivateFieldInitSpec(this,R,{writable:!0,value:this.paste.bind(this)}),_classPrivateFieldInitSpec(this,I,{writable:!0,value:this.keydown.bind(this)}),_classPrivateFieldInitSpec(this,D,{writable:!0,value:this.onEditingAction.bind(this)}),_classPrivateFieldInitSpec(this,O,{writable:!0,value:this.onPageChanging.bind(this)}),_classPrivateFieldInitSpec(this,G,{writable:!0,value:this.onScaleChanging.bind(this)}),_classPrivateFieldInitSpec(this,L,{writable:!0,value:this.onRotationChanging.bind(this)}),_classPrivateFieldInitSpec(this,N,{writable:!0,value:{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}}),_classPrivateFieldInitSpec(this,j,{writable:!0,value:null}),_classPrivateFieldSet(this,j,e),_classPrivateFieldSet(this,w,t),_classPrivateFieldGet(this,w)._on("editingaction",_classPrivateFieldGet(this,D)),_classPrivateFieldGet(this,w)._on("pagechanging",_classPrivateFieldGet(this,O)),_classPrivateFieldGet(this,w)._on("scalechanging",_classPrivateFieldGet(this,G)),_classPrivateFieldGet(this,w)._on("rotationchanging",_classPrivateFieldGet(this,L)),_classPrivateFieldSet(this,y,s),this.viewParameters={realScale:n.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){_classPrivateMethodGet(this,B,$).call(this),_classPrivateFieldGet(this,w)._off("editingaction",_classPrivateFieldGet(this,D)),_classPrivateFieldGet(this,w)._off("pagechanging",_classPrivateFieldGet(this,O)),_classPrivateFieldGet(this,w)._off("scalechanging",_classPrivateFieldGet(this,G)),_classPrivateFieldGet(this,w)._off("rotationchanging",_classPrivateFieldGet(this,L));for(const e of _classPrivateFieldGet(this,b).values())e.destroy();_classPrivateFieldGet(this,b).clear(),_classPrivateFieldGet(this,_).clear(),_classPrivateFieldGet(this,F).clear(),_classPrivateFieldSet(this,m,null),_classPrivateFieldGet(this,M).clear(),_classPrivateFieldGet(this,P).destroy()}onPageChanging(e){let{pageNumber:t}=e;_classPrivateFieldSet(this,A,t-1)}focusMainContainer(){_classPrivateFieldGet(this,j).focus()}addShouldRescale(e){_classPrivateFieldGet(this,F).add(e)}removeShouldRescale(e){_classPrivateFieldGet(this,F).delete(e)}onScaleChanging(e){let{scale:t}=e;this.commitOrRemove(),this.viewParameters.realScale=t*n.PixelsPerInch.PDF_TO_CSS_UNITS;for(const s of _classPrivateFieldGet(this,F))s.onScaleChanging()}onRotationChanging(e){let{pagesRotation:t}=e;this.commitOrRemove(),this.viewParameters.rotation=t}addToAnnotationStorage(e){e.isEmpty()||!_classPrivateFieldGet(this,y)||_classPrivateFieldGet(this,y).has(e.id)||_classPrivateFieldGet(this,y).setValue(e.id,e)}copy(e){if(e.preventDefault(),_classPrivateFieldGet(this,m)&&_classPrivateFieldGet(this,m).commitOrRemove(),!this.hasSelection)return;const t=[];for(const s of _classPrivateFieldGet(this,M))s.isEmpty()||t.push(s.serialize());0!==t.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();let t=e.clipboardData.getData("application/pdfjs");if(!t)return;try{t=JSON.parse(t)}catch(i){return void(0,a.warn)('paste: "'.concat(i.message,'".'))}if(!Array.isArray(t))return;this.unselectAll();const s=_classPrivateFieldGet(this,b).get(_classPrivateFieldGet(this,A));try{const e=[];for(const n of t){const t=s.deserialize(n);if(!t)return;e.push(t)}const i=()=>{for(const t of e)_classPrivateMethodGet(this,Y,re).call(this,t);_classPrivateMethodGet(this,J,le).call(this,e)},a=()=>{for(const t of e)t.remove()};this.addCommands({cmd:i,undo:a,mustExec:!0})}catch(i){(0,a.warn)('paste: "'.concat(i.message,'".'))}}keydown(e){var t;null!==(t=this.getActive())&&void 0!==t&&t.shouldGetKeyboardEvents()||Q._keyboardManager.exec(this,e)}onEditingAction(e){["undo","redo","delete","selectAll"].includes(e.name)&&this[e.name]()}setEditingState(e){e?(_classPrivateMethodGet(this,W,Z).call(this),_classPrivateMethodGet(this,U,ee).call(this),_classPrivateMethodGet(this,H,se).call(this,{isEditing:_classPrivateFieldGet(this,C)!==a.AnnotationEditorType.NONE,isEmpty:_classPrivateMethodGet(this,K,oe).call(this),hasSomethingToUndo:_classPrivateFieldGet(this,P).hasSomethingToUndo(),hasSomethingToRedo:_classPrivateFieldGet(this,P).hasSomethingToRedo(),hasSelectedEditor:!1})):(_classPrivateMethodGet(this,B,$).call(this),_classPrivateMethodGet(this,q,te).call(this),_classPrivateMethodGet(this,H,se).call(this,{isEditing:!1}))}registerEditorTypes(e){if(!_classPrivateFieldGet(this,S)){_classPrivateFieldSet(this,S,e);for(const e of _classPrivateFieldGet(this,S))_classPrivateMethodGet(this,V,ie).call(this,e.defaultPropertiesToUpdate)}}getId(){return _classPrivateFieldGet(this,x).getId()}get currentLayer(){return _classPrivateFieldGet(this,b).get(_classPrivateFieldGet(this,A))}get currentPageIndex(){return _classPrivateFieldGet(this,A)}addLayer(e){_classPrivateFieldGet(this,b).set(e.pageIndex,e),_classPrivateFieldGet(this,E)?e.enable():e.disable()}removeLayer(e){_classPrivateFieldGet(this,b).delete(e.pageIndex)}updateMode(e){if(_classPrivateFieldSet(this,C,e),e===a.AnnotationEditorType.NONE)this.setEditingState(!1),_classPrivateMethodGet(this,X,ne).call(this);else{this.setEditingState(!0),_classPrivateMethodGet(this,z,ae).call(this);for(const t of _classPrivateFieldGet(this,b).values())t.updateMode(e)}}updateToolbar(e){e!==_classPrivateFieldGet(this,C)&&_classPrivateFieldGet(this,w).dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(_classPrivateFieldGet(this,S)){for(const s of _classPrivateFieldGet(this,M))s.updateParams(e,t);for(const s of _classPrivateFieldGet(this,S))s.updateDefaultParams(e,t)}}getEditors(e){const t=[];for(const s of _classPrivateFieldGet(this,_).values())s.pageIndex===e&&t.push(s);return t}getEditor(e){return _classPrivateFieldGet(this,_).get(e)}addEditor(e){_classPrivateFieldGet(this,_).set(e.id,e)}removeEditor(e){var t;_classPrivateFieldGet(this,_).delete(e.id),this.unselect(e),null===(t=_classPrivateFieldGet(this,y))||void 0===t||t.remove(e.id)}setActiveEditor(e){_classPrivateFieldGet(this,m)!==e&&(_classPrivateFieldSet(this,m,e),e&&_classPrivateMethodGet(this,V,ie).call(this,e.propertiesToUpdate))}toggleSelected(e){if(_classPrivateFieldGet(this,M).has(e))return _classPrivateFieldGet(this,M).delete(e),e.unselect(),void _classPrivateMethodGet(this,H,se).call(this,{hasSelectedEditor:this.hasSelection});_classPrivateFieldGet(this,M).add(e),e.select(),_classPrivateMethodGet(this,V,ie).call(this,e.propertiesToUpdate),_classPrivateMethodGet(this,H,se).call(this,{hasSelectedEditor:!0})}setSelected(e){for(const t of _classPrivateFieldGet(this,M))t!==e&&t.unselect();_classPrivateFieldGet(this,M).clear(),_classPrivateFieldGet(this,M).add(e),e.select(),_classPrivateMethodGet(this,V,ie).call(this,e.propertiesToUpdate),_classPrivateMethodGet(this,H,se).call(this,{hasSelectedEditor:!0})}isSelected(e){return _classPrivateFieldGet(this,M).has(e)}unselect(e){e.unselect(),_classPrivateFieldGet(this,M).delete(e),_classPrivateMethodGet(this,H,se).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==_classPrivateFieldGet(this,M).size}undo(){_classPrivateFieldGet(this,P).undo(),_classPrivateMethodGet(this,H,se).call(this,{hasSomethingToUndo:_classPrivateFieldGet(this,P).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:_classPrivateMethodGet(this,K,oe).call(this)})}redo(){_classPrivateFieldGet(this,P).redo(),_classPrivateMethodGet(this,H,se).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:_classPrivateFieldGet(this,P).hasSomethingToRedo(),isEmpty:_classPrivateMethodGet(this,K,oe).call(this)})}addCommands(e){_classPrivateFieldGet(this,P).add(e),_classPrivateMethodGet(this,H,se).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:_classPrivateMethodGet(this,K,oe).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[..._classPrivateFieldGet(this,M)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)_classPrivateMethodGet(this,Y,re).call(this,t)},mustExec:!0})}commitOrRemove(){var e;null===(e=_classPrivateFieldGet(this,m))||void 0===e||e.commitOrRemove()}selectAll(){for(const e of _classPrivateFieldGet(this,M))e.commit();_classPrivateMethodGet(this,J,le).call(this,_classPrivateFieldGet(this,_).values())}unselectAll(){if(_classPrivateFieldGet(this,m))_classPrivateFieldGet(this,m).commitOrRemove();else if(0!==_classPrivateFieldGet(this,M).size){for(const e of _classPrivateFieldGet(this,M))e.unselect();_classPrivateFieldGet(this,M).clear(),_classPrivateMethodGet(this,H,se).call(this,{hasSelectedEditor:!1})}}isActive(e){return _classPrivateFieldGet(this,m)===e}getActive(){return _classPrivateFieldGet(this,m)}getMode(){return _classPrivateFieldGet(this,C)}}function Z(){_classPrivateFieldGet(this,j).addEventListener("keydown",_classPrivateFieldGet(this,I))}function $(){_classPrivateFieldGet(this,j).removeEventListener("keydown",_classPrivateFieldGet(this,I))}function ee(){document.addEventListener("copy",_classPrivateFieldGet(this,k)),document.addEventListener("cut",_classPrivateFieldGet(this,T)),document.addEventListener("paste",_classPrivateFieldGet(this,R))}function te(){document.removeEventListener("copy",_classPrivateFieldGet(this,k)),document.removeEventListener("cut",_classPrivateFieldGet(this,T)),document.removeEventListener("paste",_classPrivateFieldGet(this,R))}function se(e){Object.entries(e).some((e=>{let[t,s]=e;return _classPrivateFieldGet(this,N)[t]!==s}))&&_classPrivateFieldGet(this,w).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(_classPrivateFieldGet(this,N),e)})}function ie(e){_classPrivateFieldGet(this,w).dispatch("annotationeditorparamschanged",{source:this,details:e})}function ae(){if(!_classPrivateFieldGet(this,E)){_classPrivateFieldSet(this,E,!0);for(const e of _classPrivateFieldGet(this,b).values())e.enable()}}function ne(){if(this.unselectAll(),_classPrivateFieldGet(this,E)){_classPrivateFieldSet(this,E,!1);for(const e of _classPrivateFieldGet(this,b).values())e.disable()}}function re(e){const t=_classPrivateFieldGet(this,b).get(e.pageIndex);t?t.addOrRebuild(e):this.addEditor(e)}function oe(){if(0===_classPrivateFieldGet(this,_).size)return!0;if(1===_classPrivateFieldGet(this,_).size)for(const e of _classPrivateFieldGet(this,_).values())return e.isEmpty();return!1}function le(e){_classPrivateFieldGet(this,M).clear();for(const t of e)t.isEmpty()||(_classPrivateFieldGet(this,M).add(t),t.select());_classPrivateMethodGet(this,H,se).call(this,{hasSelectedEditor:!0})}_defineProperty(Q,"_keyboardManager",new f([[["ctrl+a","mac+meta+a"],(i=Q).prototype.selectAll],[["ctrl+z","mac+meta+z"],i.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],i.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],i.prototype.delete],[["Escape","mac+Escape"],i.prototype.unselectAll]])),t.AnnotationEditorUIManager=Q},(e,t,s)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMFilterFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=t.AnnotationPrefix=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getColorValues=function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const s of e.keys()){t.style.color=s;const i=window.getComputedStyle(t).color;e.set(s,I(i))}t.remove()},t.getCurrentTransform=function(e){const{a:t,b:s,c:i,d:a,e:n,f:r}=e.getTransform();return[t,s,i,a,n,r]},t.getCurrentTransformInverse=function(e){const{a:t,b:s,c:i,d:a,e:n,f:r}=e.getTransform().invertSelf();return[t,s,i,a,n,r]},t.getFilenameFromUrl=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||([e]=e.split(/[#?]/,1)),e.substring(e.lastIndexOf("/")+1)},t.getPdfFilenameFromUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(k(e))return(0,n.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const s=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let a=s.exec(i[1])||s.exec(i[2])||s.exec(i[3]);if(a&&(a=a[0],a.includes("%")))try{a=s.exec(decodeURIComponent(a))[0]}catch(r){}return a||t},t.getRGB=I,t.getXfaPageViewport=function(e,t){let{scale:s=1,rotation:i=0}=t;const{width:a,height:n}=e.attributes.style,r=[0,0,parseInt(a),parseInt(n)];return new C({viewBox:r,scale:s,rotation:i})},t.isDataScheme=k,t.isPdfFile=function(e){return"string"===typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=T,t.loadScript=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(((s,i)=>{const a=document.createElement("script");a.src=e,a.onload=function(e){t&&a.remove(),s(e)},a.onerror=function(){i(new Error("Cannot load script at: ".concat(a.src)))},(document.head||document.documentElement).append(a)}))},t.setLayerDimensions=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t instanceof C){const{pageWidth:i,pageHeight:a}=t.rawDims,{style:n}=e,r="calc(var(--scale-factor) * ".concat(i,"px)"),o="calc(var(--scale-factor) * ".concat(a,"px)");s&&t.rotation%180!==0?(n.width=o,n.height=r):(n.width=r,n.height=o)}i&&e.setAttribute("data-main-rotation",t.rotation)};var a=s(7),n=s(1);const r="http://www.w3.org/2000/svg";t.AnnotationPrefix="pdfjs_internal_id_";class o{}i=o,_defineProperty(o,"CSS",96),_defineProperty(o,"PDF",72),_defineProperty(o,"PDF_TO_CSS_UNITS",i.CSS/i.PDF),t.PixelsPerInch=o;var l=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,f=new WeakMap,g=new WeakMap,v=new WeakMap,m=new WeakMap,_=new WeakSet;class b extends a.BaseFilterFactory{constructor(){let{docId:e,ownerDocument:t=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),_classPrivateMethodInitSpec(this,_),_classPrivateFieldInitSpec(this,m,{get:P,set:void 0}),_classPrivateFieldInitSpec(this,v,{get:y,set:void 0}),_classPrivateFieldInitSpec(this,l,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,h,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,u,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,p,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,f,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,g,{writable:!0,value:0}),_classPrivateFieldSet(this,d,e),_classPrivateFieldSet(this,h,t)}addFilter(e){var t,s;if(!e)return"none";let i,a,n,o,l=_classPrivateFieldGet(this,v).get(e);if(l)return l;if(1===e.length){const t=e[0],s=new Array(256);for(let e=0;e<256;e++)s[e]=t[e]/255;o=i=a=n=s.join(",")}else{const[t,s,r]=e,l=new Array(256),c=new Array(256),d=new Array(256);for(let e=0;e<256;e++)l[e]=t[e]/255,c[e]=s[e]/255,d[e]=r[e]/255;i=l.join(","),a=c.join(","),n=d.join(","),o="".concat(i).concat(a).concat(n)}if(l=_classPrivateFieldGet(this,v).get(o),l)return _classPrivateFieldGet(this,v).set(e,l),l;const c="g_".concat(_classPrivateFieldGet(this,d),"_transfer_map_").concat((_classPrivateFieldSet(this,g,(t=_classPrivateFieldGet(this,g),s=t++,t)),s)),u="url(#".concat(c,")");_classPrivateFieldGet(this,v).set(e,u),_classPrivateFieldGet(this,v).set(o,u);const p=_classPrivateFieldGet(this,h).createElementNS(r,"filter",r);p.setAttribute("id",c),p.setAttribute("color-interpolation-filters","sRGB");const f=_classPrivateFieldGet(this,h).createElementNS(r,"feComponentTransfer");return p.append(f),_classPrivateMethodGet(this,_,A).call(this,f,"feFuncR",i),_classPrivateMethodGet(this,_,A).call(this,f,"feFuncG",a),_classPrivateMethodGet(this,_,A).call(this,f,"feFuncB",n),_classPrivateFieldGet(this,m).append(p),u}addHCMFilter(e,t){var s;const i="".concat(e,"-").concat(t);if(_classPrivateFieldGet(this,p)===i)return _classPrivateFieldGet(this,f);if(_classPrivateFieldSet(this,p,i),_classPrivateFieldSet(this,f,"none"),null===(s=_classPrivateFieldGet(this,u))||void 0===s||s.remove(),!e||!t)return _classPrivateFieldGet(this,f);_classPrivateFieldGet(this,m).style.color=e;const a=I(e=getComputedStyle(_classPrivateFieldGet(this,m)).getPropertyValue("color"));e=n.Util.makeHexColor(...a),_classPrivateFieldGet(this,m).style.color=t;const o=I(t=getComputedStyle(_classPrivateFieldGet(this,m)).getPropertyValue("color"));if(t=n.Util.makeHexColor(...o),_classPrivateFieldGet(this,m).style.color="","#000000"===e&&"#ffffff"===t||e===t)return _classPrivateFieldGet(this,f);const l=new Array(256);for(let n=0;n<=255;n++){const e=n/255;l[n]=e<=.03928?e/12.92:((e+.055)/1.055)**2.4}const c=l.join(","),g="g_".concat(_classPrivateFieldGet(this,d),"_hcm_filter"),v=_classPrivateFieldSet(this,u,_classPrivateFieldGet(this,h).createElementNS(r,"filter",r));v.setAttribute("id",g),v.setAttribute("color-interpolation-filters","sRGB");let b=_classPrivateFieldGet(this,h).createElementNS(r,"feComponentTransfer");v.append(b),_classPrivateMethodGet(this,_,A).call(this,b,"feFuncR",c),_classPrivateMethodGet(this,_,A).call(this,b,"feFuncG",c),_classPrivateMethodGet(this,_,A).call(this,b,"feFuncB",c);const y=_classPrivateFieldGet(this,h).createElementNS(r,"feColorMatrix");y.setAttribute("type","matrix"),y.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),v.append(y),b=_classPrivateFieldGet(this,h).createElementNS(r,"feComponentTransfer"),v.append(b);const P=(e,t)=>{const s=a[e]/255,i=o[e]/255,n=new Array(t+1);for(let a=0;a<=t;a++)n[a]=s+a/t*(i-s);return n.join(",")};return _classPrivateMethodGet(this,_,A).call(this,b,"feFuncR",P(0,5)),_classPrivateMethodGet(this,_,A).call(this,b,"feFuncG",P(1,5)),_classPrivateMethodGet(this,_,A).call(this,b,"feFuncB",P(2,5)),_classPrivateFieldGet(this,m).append(v),_classPrivateFieldSet(this,f,"url(#".concat(g,")")),_classPrivateFieldGet(this,f)}destroy(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&_classPrivateFieldGet(this,f)||(_classPrivateFieldGet(this,c)&&(_classPrivateFieldGet(this,c).parentNode.parentNode.remove(),_classPrivateFieldSet(this,c,null)),_classPrivateFieldGet(this,l)&&(_classPrivateFieldGet(this,l).clear(),_classPrivateFieldSet(this,l,null)),_classPrivateFieldSet(this,g,0))}}function y(){return _classPrivateFieldGet(this,l)||_classPrivateFieldSet(this,l,new Map)}function P(){if(!_classPrivateFieldGet(this,c)){const e=_classPrivateFieldGet(this,h).createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;const s=_classPrivateFieldGet(this,h).createElementNS(r,"svg");s.setAttribute("width",0),s.setAttribute("height",0),_classPrivateFieldSet(this,c,_classPrivateFieldGet(this,h).createElementNS(r,"defs")),e.append(s),s.append(_classPrivateFieldGet(this,c)),_classPrivateFieldGet(this,h).body.append(e)}return _classPrivateFieldGet(this,c)}function A(e,t,s){const i=_classPrivateFieldGet(this,h).createElementNS(r,t);i.setAttribute("type","discrete"),i.setAttribute("tableValues",s),e.append(i)}t.DOMFilterFactory=b;class S extends a.BaseCanvasFactory{constructor(){let{ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._document=e}_createCanvas(e,t){const s=this._document.createElement("canvas");return s.width=e,s.height=t,s}}async function F(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(T(e,document.baseURI)){const s=await fetch(e);if(!s.ok)throw new Error(s.statusText);return t?new Uint8Array(await s.arrayBuffer()):(0,n.stringToBytes)(await s.text())}return new Promise(((s,i)=>{const a=new XMLHttpRequest;a.open("GET",e,!0),t&&(a.responseType="arraybuffer"),a.onreadystatechange=()=>{if(a.readyState===XMLHttpRequest.DONE){if(200===a.status||0===a.status){let e;if(t&&a.response?e=new Uint8Array(a.response):!t&&a.responseText&&(e=(0,n.stringToBytes)(a.responseText)),e)return void s(e)}i(new Error(a.statusText))}},a.send(null)}))}t.DOMCanvasFactory=S;class w extends a.BaseCMapReaderFactory{_fetchData(e,t){return F(e,this.isCompressed).then((e=>({cMapData:e,compressionType:t})))}}t.DOMCMapReaderFactory=w;class x extends a.BaseStandardFontDataFactory{_fetchData(e){return F(e,!0)}}t.DOMStandardFontDataFactory=x;class E extends a.BaseSVGFactory{_createSVG(e){return document.createElementNS(r,e)}}t.DOMSVGFactory=E;class C{constructor(e){let{viewBox:t,scale:s,rotation:i,offsetX:a=0,offsetY:n=0,dontFlip:r=!1}=e;this.viewBox=t,this.scale=s,this.rotation=i,this.offsetX=a,this.offsetY=n;const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2;let c,d,h,u,p,f,g,v;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,d=0,h=0,u=1;break;case 90:c=0,d=1,h=1,u=0;break;case 270:c=0,d=-1,h=-1,u=0;break;case 0:c=1,d=0,h=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}r&&(h=-h,u=-u),0===c?(p=Math.abs(l-t[1])*s+a,f=Math.abs(o-t[0])*s+n,g=(t[3]-t[1])*s,v=(t[2]-t[0])*s):(p=Math.abs(o-t[0])*s+a,f=Math.abs(l-t[1])*s+n,g=(t[2]-t[0])*s,v=(t[3]-t[1])*s),this.transform=[c*s,d*s,h*s,u*s,p-c*s*o-h*s*l,f-d*s*o-u*s*l],this.width=g,this.height=v}get rawDims(){const{viewBox:e}=this;return(0,n.shadow)(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone(){let{scale:e=this.scale,rotation:t=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:a=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new C({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:s,offsetY:i,dontFlip:a})}convertToViewportPoint(e,t){return n.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=n.Util.applyTransform([e[0],e[1]],this.transform),s=n.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],s[0],s[1]]}convertToPdfPoint(e,t){return n.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=C;class M extends n.BaseException{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(e,"RenderingCancelledException"),this.type=t,this.extraDelay=s}}function k(e){const t=e.length;let s=0;for(;s<t&&""===e[s].trim();)s++;return"data:"===e.substring(s,s+5).toLowerCase()}function T(e,t){try{const{protocol:s}=t?new URL(e,t):new URL(e);return"http:"===s||"https:"===s}catch(s){return!1}}let R;function I(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):((0,n.warn)('Not a valid color format: "'.concat(e,'"')),[0,0,0])}t.RenderingCancelledException=M,t.StatTimer=class{constructor(){_defineProperty(this,"started",Object.create(null)),_defineProperty(this,"times",[])}time(e){e in this.started&&(0,n.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,n.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:s}of this.times)t=Math.max(s.length,t);for(const{name:s,start:i,end:a}of this.times)e.push("".concat(s.padEnd(t)," ").concat(a-i,"ms\n"));return e.join("")}},t.PDFDateString=class{static toDateObject(e){if(!e||"string"!==typeof e)return null;R||(R=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=R.exec(e);if(!t)return null;const s=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;let n=parseInt(t[4],10);n=n>=0&&n<=23?n:0;let r=parseInt(t[5],10);r=r>=0&&r<=59?r:0;let o=parseInt(t[6],10);o=o>=0&&o<=59?o:0;const l=t[7]||"Z";let c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;let d=parseInt(t[9],10)||0;return d=d>=0&&d<=59?d:0,"-"===l?(n+=c,r+=d):"+"===l&&(n-=c,r-=d),new Date(Date.UTC(s,i,a,n,r,o))}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseFilterFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var i=s(1);class a{constructor(){this.constructor===a&&(0,i.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(e){return"none"}addHCMFilter(e,t){return"none"}destroy(){}}t.BaseFilterFactory=a;class n{constructor(){this.constructor===n&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(e,t);return{canvas:s,context:s.getContext("2d")}}reset(e,t,s){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||s<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=s}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){(0,i.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=n;class r{constructor(e){let{baseUrl:t=null,isCompressed:s=!0}=e;this.constructor===r&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=s}async fetch(e){let{name:t}=e;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const s=this.baseUrl+t+(this.isCompressed?".bcmap":""),a=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return this._fetchData(s,a).catch((e=>{throw new Error("Unable to load ".concat(this.isCompressed?"binary ":"","CMap at: ").concat(s))}))}_fetchData(e,t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=r;class o{constructor(e){let{baseUrl:t=null}=e;this.constructor===o&&(0,i.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch(e){let{filename:t}=e;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!t)throw new Error("Font filename must be specified.");const s="".concat(this.baseUrl).concat(t);return this._fetchData(s).catch((e=>{throw new Error("Unable to load font data at: ".concat(s))}))}_fetchData(e){(0,i.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=o;class l{constructor(){this.constructor===l&&(0,i.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),s||(i.setAttribute("width","".concat(e,"px")),i.setAttribute("height","".concat(t,"px"))),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),i}createElement(e){if("string"!==typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){(0,i.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=l},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var i=s(1);const a=3285377520,n=4294901760,r=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:a,this.h2=e?4294967295&e:a}update(e){let t,s;if("string"===typeof e){t=new Uint8Array(2*e.length),s=0;for(let i=0,a=e.length;i<a;i++){const a=e.charCodeAt(i);a<=255?t[s++]=a:(t[s++]=a>>>8,t[s++]=255&a)}}else{if(!(0,i.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice(),s=t.byteLength}const a=s>>2,o=s-4*a,l=new Uint32Array(t.buffer,0,a);let c=0,d=0,h=this.h1,u=this.h2;const p=3432918353,f=461845907,g=11601,v=13715;for(let i=0;i<a;i++)1&i?(c=l[i],c=c*p&n|c*g&r,c=c<<15|c>>>17,c=c*f&n|c*v&r,h^=c,h=h<<13|h>>>19,h=5*h+3864292196):(d=l[i],d=d*p&n|d*g&r,d=d<<15|d>>>17,d=d*f&n|d*v&r,u^=d,u=u<<13|u>>>19,u=5*u+3864292196);switch(c=0,o){case 3:c^=t[4*a+2]<<16;case 2:c^=t[4*a+1]<<8;case 1:c^=t[4*a],c=c*p&n|c*g&r,c=c<<15|c>>>17,c=c*f&n|c*v&r,1&a?h^=c:u^=c}this.h1=h,this.h2=u}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&n|36045*e&r,t=4283543511*t&n|(2950163797*(t<<16|e>>>16)&n)>>>16,e^=t>>>1,e=444984403*e&n|60499*e&r,t=3301882366*t&n|(3120437893*(t<<16|e>>>16)&n)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var i=s(1),a=s(10);t.FontLoader=class{constructor(e){let{ownerDocument:t=globalThis.document,styleElement:s=null}=e;this._document=t,this.nativeFontFaces=[],this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(s){throw(0,i.warn)("Failed to load font '".concat(t.family,"': '").concat(s,"'.")),e.disableFontFace=!0,s}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((t=>{const s=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,s)}))}}get isFontLoadingAPISupported(){var e;const t=!(null===(e=this._document)||void 0===e||!e.fonts);return(0,i.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let e=!1;return(a.isNodeJS||"undefined"!==typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,s={done:!1,complete:function(){for((0,i.assert)(!s.done,"completeRequest() cannot be called twice."),s.done=!0;t.length>0&&t[0].done;){const e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(s),s}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,i.shadow)(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,t){function s(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,s,i){return e.substring(0,t)+i+e.substring(t+s)}let n,r;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let c=0;const d="lt".concat(Date.now()).concat(this.loadTestFontId++);let h=this._loadTestFont;h=a(h,976,d.length,d);const u=1482184792;let p=s(h,16);for(n=0,r=d.length-3;n<r;n+=4)p=p-u+s(d,n)|0;n<d.length&&(p=p-u+s(d+"XXX",n)|0),h=a(h,16,4,(0,i.string32)(p));const f="url(data:font/opentype;base64,".concat(btoa(h),");"),g='@font-face {font-family:"'.concat(d,'";src:').concat(f,"}");this.insertRule(g);const v=this._document.createElement("div");v.style.visibility="hidden",v.style.width=v.style.height="10px",v.style.position="absolute",v.style.top=v.style.left="0px";for(const i of[e.loadedName,d]){const e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=i,v.append(e)}this._document.body.append(v),function e(t,s){if(++c>30)return(0,i.warn)("Load test font never loaded."),void s();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?s():setTimeout(e.bind(null,t,s))}(d,(()=>{v.remove(),t.complete()}))}},t.FontFaceObject=class{constructor(e,t){let{isEvalSupported:s=!0,disableFontFace:i=!1,ignoreErrors:a=!1,inspectFont:n=null}=t;this.compiledGlyphs=Object.create(null);for(const r in e)this[r]=e[r];this.isEvalSupported=!1!==s,this.disableFontFace=!0===i,this.ignoreErrors=!0===a,this._inspectFont=n}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});return null===(e=this._inspectFont)||void 0===e||e.call(this,this),t}createFontFaceRule(){var e;if(!this.data||this.disableFontFace)return null;const t=(0,i.bytesToString)(this.data),s="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");let a;if(this.cssFontInfo){let e="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(e+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),a='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(e,"src:").concat(s,"}")}else a='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(s,"}");return null===(e=this._inspectFont)||void 0===e||e.call(this,this,s),a}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let s;try{s=e.get(this.loadedName+"_path_"+t)}catch(a){if(!this.ignoreErrors)throw a;return(0,i.warn)('getPathGenerator - ignoring character: "'.concat(a,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.FeatureTest.isEvalSupported){const e=[];for(const t of s){const s=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",s,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const i of s)"scale"===i.cmd&&(i.args=[t,-t]),e[i.cmd].apply(e,i.args)}}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const s="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=s},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var i=s(1),a=s(6),n=s(12),r=s(13),o=s(10);const l=4096,c=16;class d{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,s){let i;return void 0!==this.cache[e]?(i=this.cache[e],this.canvasFactory.reset(i,t,s)):(i=this.canvasFactory.create(t,s),this.cache[e]=i),i}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function h(e,t,s,i,n,r,o,l,c,d){const[h,u,p,f,g,v]=(0,a.getCurrentTransform)(e);if(0===u&&0===p){const a=o*h+g,m=Math.round(a),_=l*f+v,b=Math.round(_),y=(o+c)*h+g,P=Math.abs(Math.round(y)-m)||1,A=(l+d)*f+v,S=Math.abs(Math.round(A)-b)||1;return e.setTransform(Math.sign(h),0,0,Math.sign(f),m,b),e.drawImage(t,s,i,n,r,0,0,P,S),e.setTransform(h,u,p,f,g,v),[P,S]}if(0===h&&0===f){const a=l*p+g,m=Math.round(a),_=o*u+v,b=Math.round(_),y=(l+d)*p+g,P=Math.abs(Math.round(y)-m)||1,A=(o+c)*u+v,S=Math.abs(Math.round(A)-b)||1;return e.setTransform(0,Math.sign(u),Math.sign(p),0,m,b),e.drawImage(t,s,i,n,r,0,0,S,P),e.setTransform(h,u,p,f,g,v),[S,P]}return e.drawImage(t,s,i,n,r,o,l,c,d),[Math.hypot(h,u)*c,Math.hypot(p,f)*d]}class u{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=i.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=i.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,s){[t,s]=i.Util.applyTransform([t,s],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,s),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,s)}updateRectMinMax(e,t){const s=i.Util.applyTransform(t,e),a=i.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,s[0],a[0]),this.minY=Math.min(this.minY,s[1],a[1]),this.maxX=Math.max(this.maxX,s[0],a[0]),this.maxY=Math.max(this.maxY,s[1],a[1])}updateScalingPathMinMax(e,t){i.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,s,a,n,r,o,l,c,d){const h=i.Util.bezierBoundingBox(t,s,a,n,r,o,l,c);if(d)return d[0]=Math.min(d[0],h[0],h[2]),d[1]=Math.max(d[1],h[0],h[2]),d[2]=Math.min(d[2],h[1],h[3]),void(d[3]=Math.max(d[3],h[1],h[3]));this.updateRectMinMax(e,h)}getPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=[this.minX,this.minY,this.maxX,this.maxY];if(e===n.PathType.STROKE){t||(0,i.unreachable)("Stroke bounding box must include transform.");const e=i.Util.singularValueDecompose2dScale(t),a=e[0]*this.lineWidth/2,n=e[1]*this.lineWidth/2;s[0]-=a,s[1]-=n,s[2]+=a,s[3]+=n}return s}updateClipFromPath(){const e=i.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function p(e,t){if("undefined"!==typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0);const s=t.height,a=t.width,n=s%c,r=(s-n)/c,o=0===n?r:r+1,l=e.createImageData(a,c);let d,h=0;const u=t.data,p=l.data;let f,g,v,m;if(t.kind===i.ImageKind.GRAYSCALE_1BPP){const t=u.byteLength,s=new Uint32Array(p.buffer,0,p.byteLength>>2),m=s.length,_=a+7>>3,b=4294967295,y=i.FeatureTest.isLittleEndian?4278190080:255;for(f=0;f<o;f++){for(v=f<r?c:n,d=0,g=0;g<v;g++){const e=t-h;let i=0;const n=e>_?a:8*e-7,r=-8&n;let o=0,l=0;for(;i<r;i+=8)l=u[h++],s[d++]=128&l?b:y,s[d++]=64&l?b:y,s[d++]=32&l?b:y,s[d++]=16&l?b:y,s[d++]=8&l?b:y,s[d++]=4&l?b:y,s[d++]=2&l?b:y,s[d++]=1&l?b:y;for(;i<n;i++)0===o&&(l=u[h++],o=128),s[d++]=l&o?b:y,o>>=1}for(;d<m;)s[d++]=0;e.putImageData(l,0,f*c)}}else if(t.kind===i.ImageKind.RGBA_32BPP){for(g=0,m=a*c*4,f=0;f<r;f++)p.set(u.subarray(h,h+m)),h+=m,e.putImageData(l,0,g),g+=c;f<o&&(m=a*n*4,p.set(u.subarray(h,h+m)),e.putImageData(l,0,g))}else{if(t.kind!==i.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));for(v=c,m=a*v,f=0;f<o;f++){for(f>=r&&(v=n,m=a*v),d=0,g=m;g--;)p[d++]=u[h++],p[d++]=u[h++],p[d++]=u[h++],p[d++]=255;e.putImageData(l,0,f*c)}}}function f(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0);const s=t.height,i=t.width,a=s%c,n=(s-a)/c,o=0===a?n:n+1,l=e.createImageData(i,c);let d=0;const h=t.data,u=l.data;for(let p=0;p<o;p++){const t=p<n?c:a;({srcPos:d}=(0,r.convertBlackAndWhiteToRGBA)({src:h,srcPos:d,dest:u,width:i,height:t,nonBlackColor:0})),e.putImageData(l,0,p*c)}}function g(e,t){const s=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const i of s)void 0!==e[i]&&(t[i]=e[i]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function v(e){e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),o.isNodeJS||(e.filter="none")}function m(e,t,s,i){const a=e.length;for(let n=3;n<a;n+=4){const a=e[n];if(0===a)e[n-3]=t,e[n-2]=s,e[n-1]=i;else if(a<255){const r=255-a;e[n-3]=e[n-3]*a+t*r>>8,e[n-2]=e[n-2]*a+s*r>>8,e[n-1]=e[n-1]*a+i*r>>8}}}function _(e,t,s){const i=e.length;for(let a=3;a<i;a+=4){const i=s?s[e[a]]:e[a];t[a]=t[a]*i*.00392156862745098|0}}function b(e,t,s){const i=e.length;for(let a=3;a<i;a+=4){const i=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=s?t[a]*s[i>>8]>>8:t[a]*i>>16}}function y(e,t,s,i){const a=i[0],n=i[1],r=i[2]-a,o=i[3]-n;0!==r&&0!==o&&(function(e,t,s,i,a,n,r,o,l,c,d){const h=!!n,u=h?n[0]:0,p=h?n[1]:0,f=h?n[2]:0;let g;g="Luminosity"===a?b:_;const v=Math.min(i,Math.ceil(1048576/s));for(let _=0;_<i;_+=v){const a=Math.min(v,i-_),n=e.getImageData(o-c,_+(l-d),s,a),b=t.getImageData(o,_+l,s,a);h&&m(n.data,u,p,f),g(n.data,b.data,r),t.putImageData(b,o,_+l)}}(t.context,s,r,o,t.subtype,t.backdrop,t.transferMap,a,n,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(s.canvas,0,0),e.restore())}function P(e,t){const s=i.Util.singularValueDecompose2dScale(e);s[0]=Math.fround(s[0]),s[1]=Math.fround(s[1]);const n=Math.fround((globalThis.devicePixelRatio||1)*a.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:s[0]<=n||s[1]<=n}const A=["butt","round","square"],S=["miter","round","bevel"],F={},w={};var x=new WeakSet,E=new WeakSet;class C{constructor(e,t,s,i,a,n,r,o){let{optionalContentConfig:l,markedContentStack:c=null}=n;_classPrivateMethodInitSpec(this,E),_classPrivateMethodInitSpec(this,x),this.ctx=e,this.current=new u(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=s,this.canvasFactory=i,this.filterFactory=a,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=c||[],this.optionalContentConfig=l,this.cachedCanvases=new d(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=r,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=o,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing(e){let{transform:t,viewport:s,transparency:i=!1,background:n=null}=e;const r=this.ctx.canvas.width,o=this.ctx.canvas.height,l=this.ctx.fillStyle;if(this.ctx.fillStyle=n||"#ffffff",this.ctx.fillRect(0,0,r,o),this.ctx.fillStyle=l,i){const e=this.cachedCanvases.getCanvas("transparent",r,o);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...(0,a.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),v(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...s.transform),this.viewportScale=s.scale,this.baseTransform=(0,a.getCurrentTransform)(this.ctx)}executeOperatorList(e,t,s,a){const n=e.argsArray,r=e.fnArray;let o=t||0;const l=n.length;if(l===o)return o;const c=l-o>10&&"function"===typeof s,d=c?Date.now()+15:0;let h=0;const u=this.commonObjs,p=this.objs;let f;for(;;){if(void 0!==a&&o===a.nextBreakPoint)return a.breakIt(o,s),o;if(f=r[o],f!==i.OPS.dependency)this[f].apply(this,n[o]);else for(const e of n[o]){const t=e.startsWith("g_")?u:p;if(!t.has(e))return t.get(e,s),o}if(o++,o===l)return o;if(c&&++h>10){if(Date.now()>d)return s(),o;h=0}}}endDrawing(){_classPrivateMethodGet(this,x,M).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!==typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),_classPrivateMethodGet(this,E,k).call(this)}_scaleImage(e,t){const s=e.width,i=e.height;let a,n,r=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=s,c=i,d="prescale1";for(;r>2&&l>1||o>2&&c>1;){let t=l,s=c;r>2&&l>1&&(t=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),r/=l/t),o>2&&c>1&&(s=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2,o/=c/s),a=this.cachedCanvases.getCanvas(d,t,s),n=a.context,n.clearRect(0,0,t,s),n.drawImage(e,0,0,l,c,0,0,t,s),e=a.canvas,l=t,c=s,d="prescale1"===d?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:c}}_createMaskCanvas(e){const t=this.ctx,{width:s,height:r}=e,o=this.current.fillColor,l=this.current.patternFill,c=(0,a.getCurrentTransform)(t);let d,u,p,g;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer;u=JSON.stringify(l?c:[c.slice(0,4),o]),d=this._cachedBitmapsMap.get(t),d||(d=new Map,this._cachedBitmapsMap.set(t,d));const s=d.get(u);if(s&&!l)return{canvas:s,offsetX:Math.round(Math.min(c[0],c[2])+c[4]),offsetY:Math.round(Math.min(c[1],c[3])+c[5])};p=s}p||(g=this.cachedCanvases.getCanvas("maskCanvas",s,r),f(g.context,e));let v=i.Util.transform(c,[1/s,0,0,-1/r,0,0]);v=i.Util.transform(v,[1,0,0,1,0,-r]);const m=i.Util.applyTransform([0,0],v),_=i.Util.applyTransform([s,r],v),b=i.Util.normalizeRect([m[0],m[1],_[0],_[1]]),y=Math.round(b[2]-b[0])||1,A=Math.round(b[3]-b[1])||1,S=this.cachedCanvases.getCanvas("fillCanvas",y,A),F=S.context,w=Math.min(m[0],_[0]),x=Math.min(m[1],_[1]);F.translate(-w,-x),F.transform(...v),p||(p=this._scaleImage(g.canvas,(0,a.getCurrentTransformInverse)(F)),p=p.img,d&&l&&d.set(u,p)),F.imageSmoothingEnabled=P((0,a.getCurrentTransform)(F),e.interpolate),h(F,p,0,0,p.width,p.height,0,0,s,r),F.globalCompositeOperation="source-in";const E=i.Util.transform((0,a.getCurrentTransformInverse)(F),[1,0,0,1,-w,-x]);return F.fillStyle=l?o.getPattern(t,this,E,n.PathType.FILL):o,F.fillRect(0,0,s,r),d&&!l&&(this.cachedCanvases.delete("fillCanvas"),d.set(u,S.canvas)),{canvas:S.canvas,offsetX:Math.round(w),offsetY:Math.round(x)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=A[e]}setLineJoin(e){this.ctx.lineJoin=S[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const s=this.ctx;void 0!==s.setLineDash&&(s.setLineDash(e),s.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,s]of e)switch(t){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s[0],s[1]);break;case"CA":this.current.strokeAlpha=s;break;case"ca":this.current.fillAlpha=s,this.ctx.globalAlpha=s;break;case"BM":this.ctx.globalCompositeOperation=s;break;case"SMask":this.current.activeSMask=s?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(s)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,s="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(s,e,t);this.suspendedCtx=this.ctx,this.ctx=i.context;const n=this.ctx;n.setTransform(...(0,a.getCurrentTransform)(this.suspendedCtx)),g(this.suspendedCtx,n),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,s){t.translate(e,s),this.__originalTranslate(e,s)},e.scale=function(e,s){t.scale(e,s),this.__originalScale(e,s)},e.transform=function(e,s,i,a,n,r){t.transform(e,s,i,a,n,r),this.__originalTransform(e,s,i,a,n,r)},e.setTransform=function(e,s,i,a,n,r){t.setTransform(e,s,i,a,n,r),this.__originalSetTransform(e,s,i,a,n,r)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,s){t.moveTo(e,s),this.__originalMoveTo(e,s)},e.lineTo=function(e,s){t.lineTo(e,s),this.__originalLineTo(e,s)},e.bezierCurveTo=function(e,s,i,a,n,r){t.bezierCurveTo(e,s,i,a,n,r),this.__originalBezierCurveTo(e,s,i,a,n,r)},e.rect=function(e,s,i,a){t.rect(e,s,i,a),this.__originalRect(e,s,i,a)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(n,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),g(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask;y(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(g(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),g(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}transform(e,t,s,i,a,n){this.ctx.transform(e,t,s,i,a,n),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}constructPath(e,t,s){const n=this.ctx,r=this.current;let o,l,c=r.x,d=r.y;const h=(0,a.getCurrentTransform)(n),u=0===h[0]&&0===h[3]||0===h[1]&&0===h[2],p=u?s.slice(0):null;for(let a=0,f=0,g=e.length;a<g;a++)switch(0|e[a]){case i.OPS.rectangle:c=t[f++],d=t[f++];const e=t[f++],s=t[f++],a=c+e,g=d+s;n.moveTo(c,d),0===e||0===s?n.lineTo(a,g):(n.lineTo(a,d),n.lineTo(a,g),n.lineTo(c,g)),u||r.updateRectMinMax(h,[c,d,a,g]),n.closePath();break;case i.OPS.moveTo:c=t[f++],d=t[f++],n.moveTo(c,d),u||r.updatePathMinMax(h,c,d);break;case i.OPS.lineTo:c=t[f++],d=t[f++],n.lineTo(c,d),u||r.updatePathMinMax(h,c,d);break;case i.OPS.curveTo:o=c,l=d,c=t[f+4],d=t[f+5],n.bezierCurveTo(t[f],t[f+1],t[f+2],t[f+3],c,d),r.updateCurvePathMinMax(h,o,l,t[f],t[f+1],t[f+2],t[f+3],c,d,p),f+=6;break;case i.OPS.curveTo2:o=c,l=d,n.bezierCurveTo(c,d,t[f],t[f+1],t[f+2],t[f+3]),r.updateCurvePathMinMax(h,o,l,c,d,t[f],t[f+1],t[f+2],t[f+3],p),c=t[f+2],d=t[f+3],f+=4;break;case i.OPS.curveTo3:o=c,l=d,c=t[f+2],d=t[f+3],n.bezierCurveTo(t[f],t[f+1],c,d,c,d),r.updateCurvePathMinMax(h,o,l,t[f],t[f+1],c,d,c,d,p),f+=4;break;case i.OPS.closePath:n.closePath()}u&&r.updateScalingPathMinMax(h,p),r.setCurrentPoint(c,d)}closePath(){this.ctx.closePath()}stroke(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.ctx,s=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"===typeof s&&null!==s&&void 0!==s&&s.getPattern?(t.save(),t.strokeStyle=s.getPattern(t,this,(0,a.getCurrentTransformInverse)(t),n.PathType.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.ctx,s=this.current.fillColor;let i=!1;this.current.patternFill&&(t.save(),t.fillStyle=s.getPattern(t,this,(0,a.getCurrentTransformInverse)(t),n.PathType.FILL),i=!0);const r=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==r&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath(r)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=F}eoClip(){this.pendingClip=w}beginText(){this.current.textMatrix=i.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(const s of e)t.setTransform(...s.transform),t.translate(s.x,s.y),s.addToPath(t,s.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){const s=this.commonObjs.get(e),a=this.current;if(!s)throw new Error("Can't find font for ".concat(e));if(a.fontMatrix=s.fontMatrix||i.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,i.warn)("Invalid font matrix for font "+e),t<0?(t=-t,a.fontDirection=-1):a.fontDirection=1,this.current.font=s,this.current.fontSize=t,s.isType3Font)return;const n=s.loadedName||"sans-serif";let r="normal";s.black?r="900":s.bold&&(r="bold");const o=s.italic?"italic":"normal",l='"'.concat(n,'", ').concat(s.fallbackName);let c=t;t<16?c=16:t>100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font="".concat(o," ").concat(r," ").concat(c,"px ").concat(l)}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,s,i,a,n){this.current.textMatrix=[e,t,s,i,a,n],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,s,n){const r=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,d=o.fontSize/o.fontSizeScale,h=c&i.TextRenderingMode.FILL_STROKE_MASK,u=!!(c&i.TextRenderingMode.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile;let f;(l.disableFontFace||u||p)&&(f=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||p?(r.save(),r.translate(t,s),r.beginPath(),f(r,d),n&&r.setTransform(...n),h!==i.TextRenderingMode.FILL&&h!==i.TextRenderingMode.FILL_STROKE||r.fill(),h!==i.TextRenderingMode.STROKE&&h!==i.TextRenderingMode.FILL_STROKE||r.stroke(),r.restore()):(h!==i.TextRenderingMode.FILL&&h!==i.TextRenderingMode.FILL_STROKE||r.fillText(e,t,s),h!==i.TextRenderingMode.STROKE&&h!==i.TextRenderingMode.FILL_STROKE||r.strokeText(e,t,s)),u&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,a.getCurrentTransform)(r),x:t,y:s,fontSize:d,addToPath:f})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let s=!1;for(let i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){s=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",s)}showText(e){const t=this.current,s=t.font;if(s.isType3Font)return this.showType3Text(e);const r=t.fontSize;if(0===r)return;const o=this.ctx,l=t.fontSizeScale,c=t.charSpacing,d=t.wordSpacing,h=t.fontDirection,u=t.textHScale*h,p=e.length,f=s.vertical,g=f?1:-1,v=s.defaultVMetrics,m=r*t.fontMatrix[0],_=t.textRenderingMode===i.TextRenderingMode.FILL&&!s.disableFontFace&&!t.patternFill;let b;if(o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),h>0?o.scale(u,-1):o.scale(u,1),t.patternFill){o.save();const e=t.fillColor.getPattern(o,this,(0,a.getCurrentTransformInverse)(o),n.PathType.FILL);b=(0,a.getCurrentTransform)(o),o.restore(),o.fillStyle=e}let y=t.lineWidth;const P=t.textMatrixScale;if(0===P||0===y){const e=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;e!==i.TextRenderingMode.STROKE&&e!==i.TextRenderingMode.FILL_STROKE||(y=this.getSinglePixelWidth())}else y/=P;if(1!==l&&(o.scale(l,l),y/=l),o.lineWidth=y,s.isInvalidPDFjsFont){const s=[];let i=0;for(const t of e)s.push(t.unicode),i+=t.width;return o.fillText(s.join(""),0,0),t.x+=i*m*u,o.restore(),void this.compose()}let A,S=0;for(A=0;A<p;++A){const t=e[A];if("number"===typeof t){S+=g*t*r/1e3;continue}let i=!1;const a=(t.isSpace?d:0)+c,n=t.fontChar,u=t.accent;let p,y,P,F=t.width;if(f){const e=t.vmetric||v,s=-(t.vmetric?e[1]:.5*F)*m,i=e[2]*m;F=e?-e[0]:F,p=s/l,y=(S+i)/l}else p=S/l,y=0;if(s.remeasure&&F>0){const e=1e3*o.measureText(n).width/r*l;if(F<e&&this.isFontSubpixelAAEnabled){const t=F/e;i=!0,o.save(),o.scale(t,1),p/=t}else F!==e&&(p+=(F-e)/2e3*r/l)}if(this.contentVisible&&(t.isInFont||s.missingFile))if(_&&!u)o.fillText(n,p,y);else if(this.paintChar(n,p,y,b),u){const e=p+r*u.offset.x/l,t=y-r*u.offset.y/l;this.paintChar(u.fontChar,e,t,b)}P=f?F*m-a*h:F*m+a*h,S+=P,i&&o.restore()}f?t.y-=S:t.x+=S*u,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,s=this.current,a=s.font,n=s.fontSize,r=s.fontDirection,o=a.vertical?1:-1,l=s.charSpacing,c=s.wordSpacing,d=s.textHScale*r,h=s.fontMatrix||i.FONT_IDENTITY_MATRIX,u=e.length;let p,f,g,v;if(s.textRenderingMode!==i.TextRenderingMode.INVISIBLE&&0!==n){for(this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...s.textMatrix),t.translate(s.x,s.y),t.scale(d,r),p=0;p<u;++p){if(f=e[p],"number"===typeof f){v=o*f*n/1e3,this.ctx.translate(v,0),s.x+=v*d;continue}const r=(f.isSpace?c:0)+l,u=a.charProcOperatorList[f.operatorListId];u?(this.contentVisible&&(this.processingType3=f,this.save(),t.scale(n,n),t.transform(...h),this.executeOperatorList(u),this.restore()),g=i.Util.applyTransform([f.width,0],h)[0]*n+r,t.translate(g,0),s.x+=g*d):(0,i.warn)('Type3 character "'.concat(f.operatorListId,'" is not available.'))}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,s,i,a,n){this.ctx.rect(s,i,a-s,n-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if("TilingPattern"===e[0]){const s=e[1],i=this.baseTransform||(0,a.getCurrentTransform)(this.ctx),r={createCanvasGraphics:e=>new C(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new n.TilingPattern(e,s,this.ctx,r,i)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,s){const a=i.Util.makeHexColor(e,t,s);this.ctx.strokeStyle=a,this.current.strokeColor=a}setFillRGBColor(e,t,s){const a=i.Util.makeHexColor(e,t,s);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}_getPattern(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,n.getShadingPattern)(this.getObject(e)),this.cachedPatterns.set(e,t)),s&&(t.matrix=s),t}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const s=this._getPattern(e);t.fillStyle=s.getPattern(t,this,(0,a.getCurrentTransformInverse)(t),n.PathType.SHADING);const r=(0,a.getCurrentTransformInverse)(t);if(r){const e=t.canvas,s=e.width,a=e.height,n=i.Util.applyTransform([0,0],r),o=i.Util.applyTransform([0,a],r),l=i.Util.applyTransform([s,0],r),c=i.Util.applyTransform([s,a],r),d=Math.min(n[0],o[0],l[0],c[0]),h=Math.min(n[1],o[1],l[1],c[1]),u=Math.max(n[0],o[0],l[0],c[0]),p=Math.max(n[1],o[1],l[1],c[1]);this.ctx.fillRect(d,h,u-d,p-h)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,i.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,i.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform(...e),this.baseTransform=(0,a.getCurrentTransform)(this.ctx),t)){const e=t[2]-t[0],s=t[3]-t[1];this.ctx.rect(t[0],t[1],e,s),this.current.updateRectMinMax((0,a.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||(0,i.info)("TODO: Support non-isolated groups."),e.knockout&&(0,i.warn)("Knockout groups not supported.");const s=(0,a.getCurrentTransform)(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let n=i.Util.getAxialAlignedBoundingBox(e.bbox,(0,a.getCurrentTransform)(t));const r=[0,0,t.canvas.width,t.canvas.height];n=i.Util.intersect(n,r)||[0,0,0,0];const o=Math.floor(n[0]),c=Math.floor(n[1]);let d=Math.max(Math.ceil(n[2])-o,1),h=Math.max(Math.ceil(n[3])-c,1),u=1,p=1;d>l&&(u=d/l,d=l),h>l&&(p=h/l,h=l),this.current.startNewPathAndClipBox([0,0,d,h]);let f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);const v=this.cachedCanvases.getCanvas(f,d,h),m=v.context;m.scale(1/u,1/p),m.translate(-o,-c),m.transform(...s),e.smask?this.smaskStack.push({canvas:v.canvas,context:m,offsetX:o,offsetY:c,scaleX:u,scaleY:p,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,c),t.scale(u,p),t.save()),g(t,m),this.ctx=m,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,s=this.groupStack.pop();if(this.ctx=s,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=(0,a.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const s=i.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(s)}}beginAnnotation(e,t,s,n,r){if(_classPrivateMethodGet(this,x,M).call(this),v(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(t)&&4===t.length){const n=t[2]-t[0],o=t[3]-t[1];if(r&&this.annotationCanvasMap){(s=s.slice())[4]-=t[0],s[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=n,t[3]=o;const[r,l]=i.Util.singularValueDecompose2dScale((0,a.getCurrentTransform)(this.ctx)),{viewportScale:c}=this,d=Math.ceil(n*this.outputScaleX*c),h=Math.ceil(o*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(d,h);const{canvas:u,context:p}=this.annotationCanvas;this.annotationCanvasMap.set(e,u),this.annotationCanvas.savedCtx=this.ctx,this.ctx=p,this.ctx.save(),this.ctx.setTransform(r,0,0,-l,0,o*l),v(this.ctx)}else v(this.ctx),this.ctx.rect(t[0],t[1],n,o),this.ctx.clip(),this.endPath()}this.current=new u(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...s),this.transform(...n)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),_classPrivateMethodGet(this,E,k).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const s=this.ctx,i=this.processingType3;if(i&&(void 0===i.compiled&&(i.compiled=function(e){const{width:t,height:s}=e;if(t>1e3||s>1e3)return null;const i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),a=t+1;let n,r,o,l=new Uint8Array(a*(s+1));const c=t+7&-8;let d=new Uint8Array(c*s),h=0;for(const g of e.data){let e=128;for(;e>0;)d[h++]=g&e?0:255,e>>=1}let u=0;for(h=0,0!==d[h]&&(l[0]=1,++u),r=1;r<t;r++)d[h]!==d[h+1]&&(l[r]=d[h]?2:1,++u),h++;for(0!==d[h]&&(l[r]=2,++u),n=1;n<s;n++){h=n*c,o=n*a,d[h-c]!==d[h]&&(l[o]=d[h]?1:8,++u);let e=(d[h]?4:0)+(d[h-c]?8:0);for(r=1;r<t;r++)e=(e>>2)+(d[h+1]?4:0)+(d[h-c+1]?8:0),i[e]&&(l[o+r]=i[e],++u),h++;if(d[h-c]!==d[h]&&(l[o+r]=d[h]?2:4,++u),u>1e3)return null}for(h=c*(s-1),o=n*a,0!==d[h]&&(l[o]=8,++u),r=1;r<t;r++)d[h]!==d[h+1]&&(l[o+r]=d[h]?4:8,++u),h++;if(0!==d[h]&&(l[o+r]=4,++u),u>1e3)return null;const p=new Int32Array([0,a,-1,0,-a,0,0,0,1]),f=new Path2D;for(n=0;u&&n<=s;n++){let e=n*a;const s=e+t;for(;e<s&&!l[e];)e++;if(e===s)continue;f.moveTo(e%a,n);const i=e;let r=l[e];do{const t=p[r];do{e+=t}while(!l[e]);const s=l[e];5!==s&&10!==s?(r=s,l[e]=0):(r=s&51*r>>4,l[e]&=r>>2|r<<2),f.lineTo(e%a,e/a|0),l[e]||--u}while(i!==e);--n}return d=null,l=null,function(e){e.save(),e.scale(1/t,-1/s),e.translate(0,-s),e.fill(f),e.beginPath(),e.restore()}}(e)),i.compiled))return void i.compiled(s);const a=this._createMaskCanvas(e),n=a.canvas;s.save(),s.setTransform(1,0,0,1,0,0),s.drawImage(n,a.offsetX,a.offsetY),s.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;e=this.getObject(e.data,e);const l=this.ctx;l.save();const c=(0,a.getCurrentTransform)(l);l.transform(t,s,n,r,0,0);const d=this._createMaskCanvas(e);l.setTransform(1,0,0,1,d.offsetX-c[4],d.offsetY-c[5]);for(let a=0,h=o.length;a<h;a+=2){const e=i.Util.transform(c,[t,s,n,r,o[a],o[a+1]]),[h,u]=i.Util.applyTransform([0,0],e);l.drawImage(d.canvas,h,u)}l.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,s=this.current.fillColor,i=this.current.patternFill;for(const r of e){const{data:e,width:o,height:l,transform:c}=r,d=this.cachedCanvases.getCanvas("maskCanvas",o,l),u=d.context;u.save(),f(u,this.getObject(e,r)),u.globalCompositeOperation="source-in",u.fillStyle=i?s.getPattern(u,this,(0,a.getCurrentTransformInverse)(t),n.PathType.FILL):s,u.fillRect(0,0,o,l),u.restore(),t.save(),t.transform(...c),t.scale(1,-1),h(t,d.canvas,0,0,o,l,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,i.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,s,a){if(!this.contentVisible)return;const n=this.getObject(e);if(!n)return void(0,i.warn)("Dependent image isn't ready yet");const r=n.width,o=n.height,l=[];for(let i=0,c=a.length;i<c;i+=2)l.push({transform:[t,0,0,s,a[i],a[i+1]],x:0,y:0,w:r,h:o});this.paintInlineImageXObjectGroup(n,l)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap;const{bitmap:t,width:s,height:i}=e,a=this.cachedCanvases.getCanvas("inlineImage",s,i),n=a.context;return n.filter=this.current.transferMaps,n.drawImage(t,0,0),n.filter="none",a.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,s=e.height,i=this.ctx;let n;if(this.save(),o.isNodeJS||(i.filter="none"),i.scale(1/t,-1/s),e.bitmap)n=this.applyTransferMapsToBitmap(e);else if("function"===typeof HTMLElement&&e instanceof HTMLElement||!e.data)n=e;else{const i=this.cachedCanvases.getCanvas("inlineImage",t,s).context;p(i,e),n=this.applyTransferMapsToCanvas(i)}const r=this._scaleImage(n,(0,a.getCurrentTransformInverse)(i));i.imageSmoothingEnabled=P((0,a.getCurrentTransform)(i),e.interpolate),h(i,r.img,0,0,r.paintWidth,r.paintHeight,0,-s,t,s),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const s=this.ctx;let i;if(e.bitmap)i=e.bitmap;else{const t=e.width,s=e.height,a=this.cachedCanvases.getCanvas("inlineImage",t,s).context;p(a,e),i=this.applyTransferMapsToCanvas(a)}for(const a of t)s.save(),s.transform(...a.transform),s.scale(1,-1),h(s,i,a.x,a.y,a.w,a.h,0,-1,1,1),s.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const s=this.ctx;this.pendingClip&&(t||(this.pendingClip===w?s.clip("evenodd"):s.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),s.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=(0,a.getCurrentTransform)(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),s=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(s,i)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(!this._cachedScaleForStroking){const{lineWidth:e}=this.current,t=(0,a.getCurrentTransform)(this.ctx);let s,i;if(0===t[1]&&0===t[2]){const a=Math.abs(t[0]),n=Math.abs(t[3]);if(0===e)s=1/a,i=1/n;else{const t=a*e,r=n*e;s=t<1?1/t:1,i=r<1?1/r:1}}else{const a=Math.abs(t[0]*t[3]-t[2]*t[1]),n=Math.hypot(t[0],t[1]),r=Math.hypot(t[2],t[3]);if(0===e)s=r/a,i=n/a;else{const t=e*a;s=r>t?r/t:1,i=n>t?n/t:1}}this._cachedScaleForStroking=[s,i]}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:s}=this.current,[i,n]=this.getScaleForStroking();if(t.lineWidth=s||1,1===i&&1===n)return void t.stroke();let r,o,l;e&&(r=(0,a.getCurrentTransform)(t),o=t.getLineDash().slice(),l=t.lineDashOffset),t.scale(i,n);const c=Math.max(i,n);t.setLineDash(t.getLineDash().map((e=>e/c))),t.lineDashOffset/=c,t.stroke(),e&&(t.setTransform(...r),t.setLineDash(o),t.lineDashOffset=l)}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}function M(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}function k(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}t.CanvasGraphics=C;for(const T in i.OPS)void 0!==C.prototype[T]&&(C.prototype[i.OPS[T]]=C.prototype[T])},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new l(e);case"Mesh":return new h(e);case"Dummy":return new u}throw new Error("Unknown IR type: ".concat(e[0]))};var i=s(1),a=s(6);const n={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function r(e,t){if(!t)return;const s=t[2]-t[0],i=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],s,i),e.clip(a)}t.PathType=n;class o{constructor(){this.constructor===o&&(0,i.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,i.unreachable)("Abstract method `getPattern` called.")}}class l extends o{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const s of this._colorStops)t.addColorStop(s[0],s[1]);return t}getPattern(e,t,s,o){let l;if(o===n.STROKE||o===n.FILL){const n=t.current.getClippedPathBoundingBox(o,(0,a.getCurrentTransform)(e))||[0,0,0,0],c=Math.ceil(n[2]-n[0])||1,d=Math.ceil(n[3]-n[1])||1,h=t.cachedCanvases.getCanvas("pattern",c,d,!0),u=h.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-n[0],-n[1]),s=i.Util.transform(s,[1,0,0,1,n[0],n[1]]),u.transform(...t.baseTransform),this.matrix&&u.transform(...this.matrix),r(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),l=e.createPattern(h.canvas,"no-repeat");const p=new DOMMatrix(s);l.setTransform(p)}else r(e,this._bbox),l=this._createGradient(e);return l}}function c(e,t,s,i,a,n,r,o){const l=t.coords,c=t.colors,d=e.data,h=4*e.width;let u;l[s+1]>l[i+1]&&(u=s,s=i,i=u,u=n,n=r,r=u),l[i+1]>l[a+1]&&(u=i,i=a,a=u,u=r,r=o,o=u),l[s+1]>l[i+1]&&(u=s,s=i,i=u,u=n,n=r,r=u);const p=(l[s]+t.offsetX)*t.scaleX,f=(l[s+1]+t.offsetY)*t.scaleY,g=(l[i]+t.offsetX)*t.scaleX,v=(l[i+1]+t.offsetY)*t.scaleY,m=(l[a]+t.offsetX)*t.scaleX,_=(l[a+1]+t.offsetY)*t.scaleY;if(f>=_)return;const b=c[n],y=c[n+1],P=c[n+2],A=c[r],S=c[r+1],F=c[r+2],w=c[o],x=c[o+1],E=c[o+2],C=Math.round(f),M=Math.round(_);let k,T,R,I,D,O,G,L;for(let N=C;N<=M;N++){if(N<v){let e;e=N<f?0:(f-N)/(f-v),k=p-(p-g)*e,T=b-(b-A)*e,R=y-(y-S)*e,I=P-(P-F)*e}else{let e;e=N>_?1:v===_?0:(v-N)/(v-_),k=g-(g-m)*e,T=A-(A-w)*e,R=S-(S-x)*e,I=F-(F-E)*e}let e;e=N<f?0:N>_?1:(f-N)/(f-_),D=p-(p-m)*e,O=b-(b-w)*e,G=y-(y-x)*e,L=P-(P-E)*e;const t=Math.round(Math.min(k,D)),s=Math.round(Math.max(k,D));let i=h*N+4*t;for(let a=t;a<=s;a++)e=(k-a)/(k-D),e<0?e=0:e>1&&(e=1),d[i++]=T-(T-O)*e|0,d[i++]=R-(R-G)*e|0,d[i++]=I-(I-L)*e|0,d[i++]=255}}function d(e,t,s){const i=t.coords,a=t.colors;let n,r;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(i.length/o)-1,d=o-1;for(n=0;n<l;n++){let t=n*o;for(let n=0;n<d;n++,t++)c(e,s,i[t],i[t+1],i[t+o],a[t],a[t+1],a[t+o]),c(e,s,i[t+o+1],i[t+1],i[t+o],a[t+o+1],a[t+1],a[t+o])}break;case"triangles":for(n=0,r=i.length;n<r;n+=3)c(e,s,i[n],i[n+1],i[n+2],a[n],a[n+1],a[n+2]);break;default:throw new Error("illegal figure")}}class h extends o{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,s){const i=Math.floor(this._bounds[0]),a=Math.floor(this._bounds[1]),n=Math.ceil(this._bounds[2])-i,r=Math.ceil(this._bounds[3])-a,o=Math.min(Math.ceil(Math.abs(n*e[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(r*e[1]*1.1)),3e3),c=n/o,h=r/l,u={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-a,scaleX:1/c,scaleY:1/h},p=o+4,f=l+4,g=s.getCanvas("mesh",p,f,!1),v=g.context,m=v.createImageData(o,l);if(t){const e=m.data;for(let s=0,i=e.length;s<i;s+=4)e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=255}for(const _ of this._figures)d(m,_,u);return v.putImageData(m,2,2),{canvas:g.canvas,offsetX:i-2*c,offsetY:a-2*h,scaleX:c,scaleY:h}}getPattern(e,t,s,o){let l;if(r(e,this._bbox),o===n.SHADING)l=i.Util.singularValueDecompose2dScale((0,a.getCurrentTransform)(e));else if(l=i.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=i.Util.singularValueDecompose2dScale(this.matrix);l=[l[0]*e[0],l[1]*e[1]]}const c=this._createMeshCanvas(l,o===n.SHADING?null:this._background,t.cachedCanvases);return o!==n.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(c.offsetX,c.offsetY),e.scale(c.scaleX,c.scaleY),e.createPattern(c.canvas,"no-repeat")}}class u extends o{getPattern(){return"hotpink"}}const p=1,f=2;class g{constructor(e,t,s,i,a){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=s,this.canvasGraphicsFactory=i,this.baseTransform=a}createPatternCanvas(e){const t=this.operatorList,s=this.bbox,n=this.xstep,r=this.ystep,o=this.paintType,l=this.tilingType,c=this.color,d=this.canvasGraphicsFactory;(0,i.info)("TilingType: "+l);const h=s[0],u=s[1],p=s[2],f=s[3],g=i.Util.singularValueDecompose2dScale(this.matrix),v=i.Util.singularValueDecompose2dScale(this.baseTransform),m=[g[0]*v[0],g[1]*v[1]],_=this.getSizeAndScale(n,this.ctx.canvas.width,m[0]),b=this.getSizeAndScale(r,this.ctx.canvas.height,m[1]),y=e.cachedCanvases.getCanvas("pattern",_.size,b.size,!0),P=y.context,A=d.createCanvasGraphics(P);A.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(A,o,c);let S=h,F=u,w=p,x=f;return h<0&&(S=0,w+=Math.abs(h)),u<0&&(F=0,x+=Math.abs(u)),P.translate(-_.scale*S,-b.scale*F),A.transform(_.scale,0,0,b.scale,0,0),P.save(),this.clipBbox(A,S,F,w,x),A.baseTransform=(0,a.getCurrentTransform)(A.ctx),A.executeOperatorList(t),A.endDrawing(),{canvas:y.canvas,scaleX:_.scale,scaleY:b.scale,offsetX:S,offsetY:F}}getSizeAndScale(e,t,s){e=Math.abs(e);const i=Math.max(g.MAX_PATTERN_SIZE,t);let a=Math.ceil(e*s);return a>=i?a=i:s=a/e,{scale:s,size:a}}clipBbox(e,t,s,i,n){const r=i-t,o=n-s;e.ctx.rect(t,s,r,o),e.current.updateRectMinMax((0,a.getCurrentTransform)(e.ctx),[t,s,i,n]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,s){const a=e.ctx,n=e.current;switch(t){case p:const e=this.ctx;a.fillStyle=e.fillStyle,a.strokeStyle=e.strokeStyle,n.fillColor=e.fillStyle,n.strokeColor=e.strokeStyle;break;case f:const r=i.Util.makeHexColor(s[0],s[1],s[2]);a.fillStyle=r,a.strokeStyle=r,n.fillColor=r,n.strokeColor=r;break;default:throw new i.FormatError("Unsupported paint type: ".concat(t))}}getPattern(e,t,s,a){let r=s;a!==n.SHADING&&(r=i.Util.transform(r,t.baseTransform),this.matrix&&(r=i.Util.transform(r,this.matrix)));const o=this.createPatternCanvas(t);let l=new DOMMatrix(r);l=l.translate(o.offsetX,o.offsetY),l=l.scale(1/o.scaleX,1/o.scaleY);const c=e.createPattern(o.canvas,"repeat");return c.setTransform(l),c}}_defineProperty(g,"MAX_PATTERN_SIZE",3e3),t.TilingPattern=g},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=a,t.convertToRGBA=function(e){switch(e.kind){case i.ImageKind.GRAYSCALE_1BPP:return a(e);case i.ImageKind.RGB_24BPP:return function(e){let{src:t,srcPos:s=0,dest:a,destPos:n=0,width:r,height:o}=e,l=0;const c=t.length>>2,d=new Uint32Array(t.buffer,s,c);if(i.FeatureTest.isLittleEndian){for(;l<c-2;l+=3,n+=4){const e=d[l],t=d[l+1],s=d[l+2];a[n]=4278190080|e,a[n+1]=e>>>24|t<<8|4278190080,a[n+2]=t>>>16|s<<16|4278190080,a[n+3]=s>>>8|4278190080}for(let e=4*l,s=t.length;e<s;e+=3)a[n++]=t[e]|t[e+1]<<8|t[e+2]<<16|4278190080}else{for(;l<c-2;l+=3,n+=4){const e=d[l],t=d[l+1],s=d[l+2];a[n]=255|e,a[n+1]=e<<24|t>>>8|255,a[n+2]=t<<16|s>>>16|255,a[n+3]=s<<8|255}for(let e=4*l,s=t.length;e<s;e+=3)a[n++]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|255}return{srcPos:s,destPos:n}}(e)}return null},t.grayToRGBA=function(e,t){if(i.FeatureTest.isLittleEndian)for(let s=0,i=e.length;s<i;s++)t[s]=65793*e[s]|4278190080;else for(let s=0,i=e.length;s<i;s++)t[s]=16843008*e[s]|255};var i=s(1);function a(e){let{src:t,srcPos:s=0,dest:a,width:n,height:r,nonBlackColor:o=4294967295,inverseDecode:l=!1}=e;const c=i.FeatureTest.isLittleEndian?4278190080:255,[d,h]=l?[o,c]:[c,o],u=n>>3,p=7&n,f=t.length;a=new Uint32Array(a.buffer);let g=0;for(let i=0;i<r;i++){for(const i=s+u;s<i;s++){const e=s<f?t[s]:255;a[g++]=128&e?h:d,a[g++]=64&e?h:d,a[g++]=32&e?h:d,a[g++]=16&e?h:d,a[g++]=8&e?h:d,a[g++]=4&e?h:d,a[g++]=2&e?h:d,a[g++]=1&e?h:d}if(0===p)continue;const e=s<f?t[s++]:255;for(let t=0;t<p;t++)a[g++]=e&1<<7-t?h:d}return{srcPos:s,destPos:g}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const s=Object.create(null);t.GlobalWorkerOptions=s,s.workerPort=null,s.workerSrc=""},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var i=s(1);const a=1,n=2,r=1,o=2,l=3,c=4,d=5,h=6,u=7,p=8;function f(e){switch(e instanceof Error||"object"===typeof e&&null!==e||(0,i.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new i.AbortException(e.message);case"MissingPDFException":return new i.MissingPDFException(e.message);case"PasswordException":return new i.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new i.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new i.UnknownErrorException(e.message,e.details);default:return new i.UnknownErrorException(e.message,e.toString())}}var g=new WeakSet,v=new WeakSet,m=new WeakSet;function _(e){const t=e.streamId,s=this.sourceName,a=e.sourceName,n=this.comObj,r=this,o=this.actionHandler[e.action],h={enqueue(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=r,l>0&&this.desiredSize<=0&&(this.sinkCapability=new i.PromiseCapability,this.ready=this.sinkCapability.promise),n.postMessage({sourceName:s,targetName:a,stream:c,streamId:t,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:s,targetName:a,stream:l,streamId:t}),delete r.streamSinks[t])},error(e){(0,i.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:s,targetName:a,stream:d,streamId:t,reason:f(e)}))},sinkCapability:new i.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};h.sinkCapability.resolve(),h.ready=h.sinkCapability.promise,this.streamSinks[t]=h,new Promise((function(t){t(o(e.data,h))})).then((function(){n.postMessage({sourceName:s,targetName:a,stream:p,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:s,targetName:a,stream:p,streamId:t,reason:f(e)})}))}function b(e){const t=e.streamId,s=this.sourceName,a=e.sourceName,n=this.comObj,g=this.streamControllers[t],v=this.streamSinks[t];switch(e.stream){case p:e.success?g.startCall.resolve():g.startCall.reject(f(e.reason));break;case u:e.success?g.pullCall.resolve():g.pullCall.reject(f(e.reason));break;case h:if(!v){n.postMessage({sourceName:s,targetName:a,stream:u,streamId:t,success:!0});break}v.desiredSize<=0&&e.desiredSize>0&&v.sinkCapability.resolve(),v.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null===(t=v.onPull)||void 0===t?void 0:t.call(v))})).then((function(){n.postMessage({sourceName:s,targetName:a,stream:u,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:s,targetName:a,stream:u,streamId:t,reason:f(e)})}));break;case c:if((0,i.assert)(g,"enqueue should have stream controller"),g.isClosed)break;g.controller.enqueue(e.chunk);break;case l:if((0,i.assert)(g,"close should have stream controller"),g.isClosed)break;g.isClosed=!0,g.controller.close(),_classPrivateMethodGet(this,m,y).call(this,g,t);break;case d:(0,i.assert)(g,"error should have stream controller"),g.controller.error(f(e.reason)),_classPrivateMethodGet(this,m,y).call(this,g,t);break;case o:e.success?g.cancelCall.resolve():g.cancelCall.reject(f(e.reason)),_classPrivateMethodGet(this,m,y).call(this,g,t);break;case r:if(!v)break;new Promise((function(t){var s;t(null===(s=v.onCancel)||void 0===s?void 0:s.call(v,f(e.reason)))})).then((function(){n.postMessage({sourceName:s,targetName:a,stream:o,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:s,targetName:a,stream:o,streamId:t,reason:f(e)})})),v.sinkCapability.reject(f(e.reason)),v.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async function y(e,t){var s,i,a;await Promise.allSettled([null===(s=e.startCall)||void 0===s?void 0:s.promise,null===(i=e.pullCall)||void 0===i?void 0:i.promise,null===(a=e.cancelCall)||void 0===a?void 0:a.promise]),delete this.streamControllers[t]}t.MessageHandler=class{constructor(e,t,s){_classPrivateMethodInitSpec(this,m),_classPrivateMethodInitSpec(this,v),_classPrivateMethodInitSpec(this,g),this.sourceName=e,this.targetName=t,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void _classPrivateMethodGet(this,v,b).call(this,t);if(t.callback){const e=t.callbackId,s=this.callbackCapabilities[e];if(!s)throw new Error("Cannot resolve callback ".concat(e));if(delete this.callbackCapabilities[e],t.callback===a)s.resolve(t.data);else{if(t.callback!==n)throw new Error("Unexpected callback case");s.reject(f(t.reason))}return}const i=this.actionHandler[t.action];if(!i)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){const e=this.sourceName,r=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(i){s.postMessage({sourceName:e,targetName:r,callback:a,callbackId:t.callbackId,data:i})}),(function(i){s.postMessage({sourceName:e,targetName:r,callback:n,callbackId:t.callbackId,reason:f(i)})}))}else t.streamId?_classPrivateMethodGet(this,g,_).call(this,t):i(t.data)},s.addEventListener("message",this._onComObjOnMessage)}on(e,t){const s=this.actionHandler;if(s[e])throw new Error('There is already an actionName called "'.concat(e,'"'));s[e]=t}send(e,t,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},s)}sendWithPromise(e,t,s){const a=this.callbackId++,n=new i.PromiseCapability;this.callbackCapabilities[a]=n;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:a,data:t},s)}catch(r){n.reject(r)}return n.promise}sendWithStream(e,t,s,a){const n=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:s=>{const r=new i.PromiseCapability;return this.streamControllers[n]={controller:s,startCall:r,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:o,targetName:l,action:e,streamId:n,data:t,desiredSize:s.desiredSize},a),r.promise},pull:e=>{const t=new i.PromiseCapability;return this.streamControllers[n].pullCall=t,c.postMessage({sourceName:o,targetName:l,stream:h,streamId:n,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,i.assert)(e instanceof Error,"cancel must have a valid reason");const t=new i.PromiseCapability;return this.streamControllers[n].cancelCall=t,this.streamControllers[n].isClosed=!0,c.postMessage({sourceName:o,targetName:l,stream:r,streamId:n,reason:f(e)}),t.promise}},s)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var i=s(1),a=new WeakMap,n=new WeakMap;t.Metadata=class{constructor(e){let{parsedData:t,rawData:s}=e;_classPrivateFieldInitSpec(this,a,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,n,{writable:!0,value:void 0}),_classPrivateFieldSet(this,a,t),_classPrivateFieldSet(this,n,s)}getRaw(){return _classPrivateFieldGet(this,n)}get(e){var t;return null!==(t=_classPrivateFieldGet(this,a).get(e))&&void 0!==t?t:null}getAll(){return(0,i.objectFromMap)(_classPrivateFieldGet(this,a))}has(e){return _classPrivateFieldGet(this,a).has(e)}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var i=s(1),a=s(8);const n=Symbol("INTERNAL");var r=new WeakMap;class o{constructor(e,t){_classPrivateFieldInitSpec(this,r,{writable:!0,value:!0}),this.name=e,this.intent=t}get visible(){return _classPrivateFieldGet(this,r)}_setVisible(e,t){e!==n&&(0,i.unreachable)("Internal method `_setVisible` called."),_classPrivateFieldSet(this,r,t)}}var l=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,u=new WeakSet;function p(e){const t=e.length;if(t<2)return!0;const s=e[0];for(let a=1;a<t;a++){const t=e[a];let n;if(Array.isArray(t))n=_classPrivateMethodGet(this,u,p).call(this,t);else{if(!_classPrivateFieldGet(this,c).has(t))return(0,i.warn)("Optional content group not found: ".concat(t)),!0;n=_classPrivateFieldGet(this,c).get(t).visible}switch(s){case"And":if(!n)return!1;break;case"Or":if(n)return!0;break;case"Not":return!n;default:return!0}}return"And"===s}t.OptionalContentConfig=class{constructor(e){if(_classPrivateMethodInitSpec(this,u),_classPrivateFieldInitSpec(this,l,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,h,{writable:!0,value:null}),this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,_classPrivateFieldSet(this,h,e.order);for(const t of e.groups)_classPrivateFieldGet(this,c).set(t.id,new o(t.name,t.intent));if("OFF"===e.baseState)for(const e of _classPrivateFieldGet(this,c).values())e._setVisible(n,!1);for(const t of e.on)_classPrivateFieldGet(this,c).get(t)._setVisible(n,!0);for(const t of e.off)_classPrivateFieldGet(this,c).get(t)._setVisible(n,!1);_classPrivateFieldSet(this,d,this.getHash())}}isVisible(e){if(0===_classPrivateFieldGet(this,c).size)return!0;if(!e)return(0,i.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return _classPrivateFieldGet(this,c).has(e.id)?_classPrivateFieldGet(this,c).get(e.id).visible:((0,i.warn)("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return _classPrivateMethodGet(this,u,p).call(this,e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!_classPrivateFieldGet(this,c).has(t))return(0,i.warn)("Optional content group not found: ".concat(t)),!0;if(_classPrivateFieldGet(this,c).get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!_classPrivateFieldGet(this,c).has(t))return(0,i.warn)("Optional content group not found: ".concat(t)),!0;if(!_classPrivateFieldGet(this,c).get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!_classPrivateFieldGet(this,c).has(t))return(0,i.warn)("Optional content group not found: ".concat(t)),!0;if(!_classPrivateFieldGet(this,c).get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!_classPrivateFieldGet(this,c).has(t))return(0,i.warn)("Optional content group not found: ".concat(t)),!0;if(_classPrivateFieldGet(this,c).get(t).visible)return!1}return!0}return(0,i.warn)("Unknown optional content policy ".concat(e.policy,".")),!0}return(0,i.warn)("Unknown group type ".concat(e.type,".")),!0}setVisibility(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];_classPrivateFieldGet(this,c).has(e)?(_classPrivateFieldGet(this,c).get(e)._setVisible(n,!!t),_classPrivateFieldSet(this,l,null)):(0,i.warn)("Optional content group not found: ".concat(e))}get hasInitialVisibility(){return this.getHash()===_classPrivateFieldGet(this,d)}getOrder(){return _classPrivateFieldGet(this,c).size?_classPrivateFieldGet(this,h)?_classPrivateFieldGet(this,h).slice():[..._classPrivateFieldGet(this,c).keys()]:null}getGroups(){return _classPrivateFieldGet(this,c).size>0?(0,i.objectFromMap)(_classPrivateFieldGet(this,c)):null}getGroup(e){return _classPrivateFieldGet(this,c).get(e)||null}getHash(){if(null!==_classPrivateFieldGet(this,l))return _classPrivateFieldGet(this,l);const e=new a.MurmurHash3_64;for(const[t,s]of _classPrivateFieldGet(this,c))e.update("".concat(t,":").concat(s.visible));return _classPrivateFieldSet(this,l,e.hexdigest())}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var i=s(1),a=s(6);t.PDFDataTransportStream=class{constructor(e,t){let{length:s,initialData:a,progressiveDone:n=!1,contentDispositionFilename:r=null,disableRange:o=!1,disableStream:l=!1}=e;if((0,i.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=n,this._contentDispositionFilename=r,(null===a||void 0===a?void 0:a.length)>0){const e=a instanceof Uint8Array&&a.byteLength===a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!l,this._isRangeSupported=!o,this._contentLength=s,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){let{begin:t,chunk:s}=e;const a=s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer;if(void 0===t)this._fullRequestReader?this._fullRequestReader._enqueue(a):this._queuedChunks.push(a);else{const e=this._rangeReaders.some((function(e){return e._begin===t&&(e._enqueue(a),!0)}));(0,i.assert)(e,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}_onProgress(e){var t,s,i,a;void 0===e.total?null===(t=this._rangeReaders[0])||void 0===t||null===(s=t.onProgress)||void 0===s||s.call(t,{loaded:e.loaded}):null===(i=this._fullRequestReader)||void 0===i||null===(a=i.onProgress)||void 0===a||a.call(i,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e;null===(e=this._fullRequestReader)||void 0===e||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new n(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const s=new r(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(s),s}cancelAllRequests(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);for(const s of this._rangeReaders.slice(0))s.cancel(e);this._pdfDataRangeTransport.abort()}};class n{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=e,this._done=s||!1,this._filename=(0,a.isPdfFile)(i)?i:null,this._queuedChunks=t||[],this._loaded=0;for(const a of this._queuedChunks)this._loaded+=a.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=new i.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class r{constructor(e,t,s){this._stream=e,this._begin=t,this._end=s,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=new i.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class s{static textContent(e){const t=[],i={items:t,styles:Object.create(null)};return function e(i){var a;if(!i)return;let n=null;const r=i.name;if("#text"===r)n=i.value;else{if(!s.shouldBuildText(r))return;null!==i&&void 0!==i&&null!==(a=i.attributes)&&void 0!==a&&a.textContent?n=i.attributes.textContent:i.value&&(n=i.value)}if(null!==n&&t.push({str:n}),i.children)for(const t of i.children)e(t)}(e),i}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=s},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var i=s(7);const a=function(e){return new Promise(((t,s)=>{__webpack_require__(23237).readFile(e,((e,i)=>{!e&&i?t(new Uint8Array(i)):s(new Error(e))}))}))};class n extends i.BaseFilterFactory{}t.NodeFilterFactory=n;class r extends i.BaseCanvasFactory{_createCanvas(e,t){return __webpack_require__(17640).createCanvas(e,t)}}t.NodeCanvasFactory=r;class o extends i.BaseCMapReaderFactory{_fetchData(e,t){return a(e).then((e=>({cMapData:e,compressionType:t})))}}t.NodeCMapReaderFactory=o;class l extends i.BaseStandardFontDataFactory{_fetchData(e){return a(e)}}t.NodeStandardFontDataFactory=l},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var i=s(1),a=s(22);const n=__webpack_require__(23237),r=__webpack_require__(97492),o=__webpack_require__(31815),l=__webpack_require__(66671),c=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse("file:///".concat(e)):(t.host||(t.protocol="file:"),t)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new g(this):new p(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const s=this.isFsUrl?new v(this,e,t):new f(this,e,t);return this._rangeRequestReaders.push(s),s}cancelAllRequests(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);for(const s of this._rangeRequestReaders.slice(0))s.cancel(e)}};class d{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=new i.PromiseCapability,this._headersCapability=new i.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=new i.PromiseCapability,this.read()):(this._loaded+=t.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class h{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new i.PromiseCapability;const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=new i.PromiseCapability,this.read()):(this._loaded+=t.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function u(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class p extends d{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new i.MissingPDFException('Missing PDF "'.concat(this._url,'".'));return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const s=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:n,suggestedLength:r}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:s,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=n,this._contentLength=r||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(s)};this._request=null,"http:"===this._url.protocol?this._request=r.request(u(this._url,e.httpHeaders),t):this._request=o.request(u(this._url,e.httpHeaders),t),this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class f extends h{constructor(e,t,s){super(e),this._httpHeaders={};for(const i in e.httpHeaders){const t=e.httpHeaders[i];void 0!==t&&(this._httpHeaders[i]=t)}this._httpHeaders.Range="bytes=".concat(t,"-").concat(s-1);const a=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new i.MissingPDFException('Missing PDF "'.concat(this._url,'".'));this._storedError=e}};this._request=null,"http:"===this._url.protocol?this._request=r.request(u(this._url,this._httpHeaders),a):this._request=o.request(u(this._url,this._httpHeaders),a),this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class g extends d{constructor(e){super(e);let t=decodeURIComponent(this._url.path);c.test(this._url.href)&&(t=t.replace(/^\//,"")),n.lstat(t,((e,s)=>{if(e)return"ENOENT"===e.code&&(e=new i.MissingPDFException('Missing PDF "'.concat(t,'".'))),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=s.size,this._setReadableStream(n.createReadStream(t)),this._headersCapability.resolve()}))}}class v extends h{constructor(e,t,s){super(e);let i=decodeURIComponent(this._url.path);c.test(this._url.href)&&(i=i.replace(/^\//,"")),this._setReadableStream(n.createReadStream(i,{start:t,end:s-1}))}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new i.MissingPDFException('Missing PDF "'+t+'".'):new i.UnexpectedResponseException("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition");if(t){let e=(0,a.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(s){}if((0,n.isPdfFile)(e))return e}return null},t.validateRangeRequestCapabilities=function(e){let{getResponseHeader:t,isHttp:s,rangeChunkSize:i,disableRange:a}=e;const n={allowRangeRequests:!1,suggestedLength:void 0},r=parseInt(t("Content-Length"),10);return Number.isInteger(r)?(n.suggestedLength=r,r<=2*i||a||!s||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(n.allowRangeRequests=!0),n):n},t.validateResponseStatus=function(e){return 200===e||206===e};var i=s(1),a=s(23),n=s(6)},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,s=a("filename\\*","i").exec(e);if(s){s=s[1];let e=o(s);return e=unescape(e),e=l(e),e=c(e),r(e)}if(s=function(e){const t=[];let s;const i=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(s=i.exec(e));){let[,e,i,a]=s;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[i,a]}const n=[];for(let a=0;a<t.length&&a in t;++a){let[e,s]=t[a];s=o(s),e&&(s=unescape(s),0===a&&(s=l(s))),n.push(s)}return n.join("")}(e),s)return r(c(s));if(s=a("filename","i").exec(e),s){s=s[1];let e=o(s);return e=c(e),r(e)}function a(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function n(e,s){if(e){if(!/^[\x00-\xFF]+$/.test(s))return s;try{const a=new TextDecoder(e,{fatal:!0}),n=(0,i.stringToBytes)(s);s=a.decode(n),t=!1}catch(a){}}return s}function r(e){return t&&/[\x80-\xff]/.test(e)&&(e=n("utf-8",e),t&&(e=n("iso-8859-1",e))),e}function o(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const s=t[e].indexOf('"');-1!==s&&(t[e]=t[e].slice(0,s),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function l(e){const t=e.indexOf("'");return-1===t?e:n(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function c(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,s,i){if("q"===s||"Q"===s)return n(t,i=(i=i.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{i=atob(i)}catch(a){}return n(t,i)}))}return""};var i=s(1)},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var i=s(1),a=s(22);class n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,s){const i={begin:e,end:t};for(const a in s)i[a]=s[a];return this.request(i)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,s=this.currXhrId++,i=this.pendingRequests[s]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const a in this.httpHeaders){const e=this.httpHeaders[a];void 0!==e&&t.setRequestHeader(a,e)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),i.expectedStatus=206):i.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(s){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,s),t.onprogress=this.onProgress.bind(this,s),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,t.send(null),s}onProgress(e,t){var s;const i=this.pendingRequests[e];i&&(null===(s=i.onProgress)||void 0===s||s.call(i,t))}onStateChange(e,t){const s=this.pendingRequests[e];if(!s)return;const a=s.xhr;if(a.readyState>=2&&s.onHeadersReceived&&(s.onHeadersReceived(),delete s.onHeadersReceived),4!==a.readyState)return;if(!(e in this.pendingRequests))return;var n;if(delete this.pendingRequests[e],0===a.status&&this.isHttp)return void(null===(n=s.onError)||void 0===n||n.call(s,a.status));const r=a.status||200;var o;if((200!==r||206!==s.expectedStatus)&&r!==s.expectedStatus)return void(null===(o=s.onError)||void 0===o||o.call(s,a.status));const l=function(e){const t=e.response;return"string"!==typeof t?t:(0,i.stringToBytes)(t).buffer}(a);if(206===r){const e=a.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);s.onDone({begin:parseInt(t[1],10),chunk:l})}else if(l)s.onDone({begin:0,chunk:l});else{var c;null===(c=s.onError)||void 0===c||c.call(s,a.status)}}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new n(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new r(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const s=new o(this._manager,e,t);return s.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(s),s}cancelAllRequests(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);for(const s of this._rangeRequestReaders.slice(0))s.cancel(e)}};class r{constructor(e,t){this._manager=e;const s={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(s),this._headersReceivedCapability=new i.PromiseCapability,this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),s=e=>t.getResponseHeader(e),{allowRangeRequests:i,suggestedLength:n}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:s,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=n||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(s),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,a.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=new i.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class o{constructor(e,t,s){this._manager=e;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,s,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=(0,a.createResponseStatusError)(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=new i.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var i=s(1),a=s(22);function n(e,t,s){return{method:"GET",headers:e,signal:s.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function r(e){const t=new Headers;for(const s in e){const i=e[s];void 0!==i&&t.append(s,i)}return t}function o(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:((0,i.warn)("getArrayBuffer - unexpected data format: ".concat(e)),new Uint8Array(e).buffer)}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new l(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const s=new c(this,e,t);return this._rangeRequestReaders.push(s),s}cancelAllRequests(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);for(const s of this._rangeRequestReaders.slice(0))s.cancel(e)}};class l{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=new i.PromiseCapability,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=r(this._stream.httpHeaders);const s=t.url;fetch(s,n(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,a.validateResponseStatus)(e.status))throw(0,a.createResponseStatusError)(e.status,s);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:n,suggestedLength:r}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=n,this._contentLength=r||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new i.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;await this._headersCapability.promise;const{value:t,done:s}=await this._reader.read();return s?{value:t,done:s}:(this._loaded+=t.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),{value:o(t),done:!1})}cancel(e){var t;null===(t=this._reader)||void 0===t||t.cancel(e),this._abortController.abort()}}class c{constructor(e,t,s){this._stream=e,this._reader=null,this._loaded=0;const o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=new i.PromiseCapability,this._isStreamingSupported=!o.disableStream,this._abortController=new AbortController,this._headers=r(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(t,"-").concat(s-1));const l=o.url;fetch(l,n(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,a.validateResponseStatus)(e.status))throw(0,a.createResponseStatusError)(e.status,l);this._readCapability.resolve(),this._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;await this._readCapability.promise;const{value:t,done:s}=await this._reader.read();return s?{value:t,done:s}:(this._loaded+=t.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),{value:o(t),done:!1})}cancel(e){var t;null===(t=this._reader)||void 0===t||t.cancel(e),this._abortController.abort()}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,a.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);const{container:t,viewport:s}=e,i=getComputedStyle(t),n=i.getPropertyValue("visibility"),r=parseFloat(i.getPropertyValue("--scale-factor"));"visible"===n&&(!r||Math.abs(r-s.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const o=new h(e);return o._render(),o},t.updateTextLayer=function(e){let{container:t,viewport:s,textDivs:i,textDivProperties:n,isOffscreenCanvasSupported:r,mustRotate:o=!0,mustRescale:c=!0}=e;if(o&&(0,a.setLayerDimensions)(t,{rotation:s.rotation}),c){const e=l(0,r),t={prevFontSize:null,prevFontFamily:null,div:null,scale:s.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:e};for(const s of i)t.properties=n.get(s),t.div=s,d(t)}};var i=s(1),a=s(6);const n=30,r=.8,o=new Map;function l(e,t){let s;if(t&&i.FeatureTest.isOffscreenCanvasSupported)s=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1});else{const t=document.createElement("canvas");t.width=t.height=e,s=t.getContext("2d",{alpha:!1})}return s}function c(e,t,s){const a=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(a);const d=i.Util.transform(e._transform,t.transform);let h=Math.atan2(d[1],d[0]);const u=s[t.fontName];u.vertical&&(h+=Math.PI/2);const p=Math.hypot(d[2],d[3]),f=p*function(e,t){const s=o.get(e);if(s)return s;const i=l(n,t);i.font="".concat(n,"px ").concat(e);const a=i.measureText("");let c=a.fontBoundingBoxAscent,d=Math.abs(a.fontBoundingBoxDescent);if(c){const t=c/(c+d);return o.set(e,t),i.canvas.width=i.canvas.height=0,t}i.strokeStyle="red",i.clearRect(0,0,n,n),i.strokeText("g",0,0);let h=i.getImageData(0,0,n,n).data;d=0;for(let r=h.length-1-3;r>=0;r-=4)if(h[r]>0){d=Math.ceil(r/4/n);break}i.clearRect(0,0,n,n),i.strokeText("A",0,n),h=i.getImageData(0,0,n,n).data,c=0;for(let r=0,o=h.length;r<o;r+=4)if(h[r]>0){c=n-Math.floor(r/4/n);break}if(i.canvas.width=i.canvas.height=0,c){const t=c/(c+d);return o.set(e,t),t}return o.set(e,r),r}(u.fontFamily,e._isOffscreenCanvasSupported);let g,v;0===h?(g=d[4],v=d[5]-f):(g=d[4]+f*Math.sin(h),v=d[5]-f*Math.cos(h));const m="calc(var(--scale-factor)*",_=a.style;e._container===e._rootContainer?(_.left="".concat((100*g/e._pageWidth).toFixed(2),"%"),_.top="".concat((100*v/e._pageHeight).toFixed(2),"%")):(_.left="".concat(m).concat(g.toFixed(2),"px)"),_.top="".concat(m).concat(v.toFixed(2),"px)")),_.fontSize="".concat(m).concat(p.toFixed(2),"px)"),_.fontFamily=u.fontFamily,c.fontSize=p,a.setAttribute("role","presentation"),a.textContent=t.str,a.dir=t.dir,e._fontInspectorEnabled&&(a.dataset.fontName=t.fontName),0!==h&&(c.angle=h*(180/Math.PI));let b=!1;if(t.str.length>1)b=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),s=Math.abs(t.transform[3]);e!==s&&Math.max(e,s)/Math.min(e,s)>1.5&&(b=!0)}b&&(c.canvasWidth=u.vertical?t.height:t.width),e._textDivProperties.set(a,c),e._isReadableStream&&e._layoutText(a)}function d(e){const{div:t,scale:s,properties:i,ctx:a,prevFontSize:n,prevFontFamily:r}=e,{style:o}=t;let l="";if(0!==i.canvasWidth&&i.hasText){const{fontFamily:c}=o,{canvasWidth:d,fontSize:h}=i;n===h&&r===c||(a.font="".concat(h*s,"px ").concat(c),e.prevFontSize=h,e.prevFontFamily=c);const{width:u}=a.measureText(t.textContent);u>0&&(l="scaleX(".concat(d*s/u,")"))}0!==i.angle&&(l="rotate(".concat(i.angle,"deg) ").concat(l)),l.length>0&&(o.transform=l)}class h{constructor(e){var t;let{textContentSource:s,container:n,viewport:r,textDivs:o,textDivProperties:c,textContentItemsStr:d,isOffscreenCanvasSupported:h}=e;this._textContentSource=s,this._isReadableStream=s instanceof ReadableStream,this._container=this._rootContainer=n,this._textDivs=o||[],this._textContentItemsStr=d||[],this._isOffscreenCanvasSupported=h,this._fontInspectorEnabled=!(null===(t=globalThis.FontInspector)||void 0===t||!t.enabled),this._reader=null,this._textDivProperties=c||new WeakMap,this._canceled=!1,this._capability=new i.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:r.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:l(0,h)};const{pageWidth:u,pageHeight:p,pageX:f,pageY:g}=r.rawDims;this._transform=[1,0,0,-1,-f,g+p],this._pageWidth=u,this._pageHeight=p,(0,a.setLayerDimensions)(n,r),this._capability.promise.finally((()=>{this._layoutTextParams=null})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new i.AbortException("TextLayer task cancelled.")).catch((()=>{})),this._reader=null),this._capability.reject(new i.AbortException("TextLayer task cancelled."))}_processItems(e,t){for(const s of e)if(void 0!==s.str)this._textContentItemsStr.push(s.str),c(this,s,t);else if("beginMarkedContentProps"===s.type||"beginMarkedContent"===s.type){const e=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==s.id&&this._container.setAttribute("id","".concat(s.id)),e.append(this._container)}else"endMarkedContent"===s.type&&(this._container=this._container.parentNode)}_layoutText(e){const t=this._layoutTextParams.properties=this._textDivProperties.get(e);if(this._layoutTextParams.div=e,d(this._layoutTextParams),t.hasText&&this._container.append(e),t.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this._container.append(e)}}_render(){const e=new i.PromiseCapability;let t=Object.create(null);if(this._isReadableStream){const s=()=>{this._reader.read().then((i=>{let{value:a,done:n}=i;n?e.resolve():(Object.assign(t,a.styles),this._processItems(a.items,t),s())}),e.reject)};this._reader=this._textContentSource.getReader(),s()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:t,styles:s}=this._textContentSource;this._processItems(t,s),e.resolve()}}e.promise.then((()=>{t=null,function(e){if(e._canceled)return;const t=e._textDivs,s=e._capability;if(t.length>1e5)s.resolve();else{if(!e._isReadableStream)for(const s of t)e._layoutText(s);s.resolve()}}(this)}),this._capability.reject)}}t.TextLayerRenderTask=h},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var i=s(1),a=s(5),n=s(28),r=s(29),o=s(6),l=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,f=new WeakMap,g=new WeakMap,v=new WeakSet,m=new WeakSet,_=new WeakSet,b=new WeakSet;class y{constructor(e){_classPrivateMethodInitSpec(this,b),_classPrivateMethodInitSpec(this,_),_classPrivateMethodInitSpec(this,m),_classPrivateMethodInitSpec(this,v),_classPrivateFieldInitSpec(this,l,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:this.pointerup.bind(this)}),_classPrivateFieldInitSpec(this,h,{writable:!0,value:this.pointerdown.bind(this)}),_classPrivateFieldInitSpec(this,u,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,f,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,g,{writable:!0,value:void 0}),y._initialized||(y._initialized=!0,n.FreeTextEditor.initialize(e.l10n),r.InkEditor.initialize(e.l10n)),e.uiManager.registerEditorTypes([n.FreeTextEditor,r.InkEditor]),_classPrivateFieldSet(this,g,e.uiManager),this.pageIndex=e.pageIndex,this.div=e.div,_classPrivateFieldSet(this,l,e.accessibilityManager),_classPrivateFieldGet(this,g).addLayer(this)}get isEmpty(){return 0===_classPrivateFieldGet(this,u).size}updateToolbar(e){_classPrivateFieldGet(this,g).updateToolbar(e)}updateMode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_classPrivateFieldGet(this,g).getMode();_classPrivateMethodGet(this,b,F).call(this),e===i.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),_classPrivateFieldGet(this,g).unselectAll(),e!==i.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",e===i.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",e===i.AnnotationEditorType.INK),this.div.hidden=!1)}addInkEditorIfNeeded(e){if(e||_classPrivateFieldGet(this,g).getMode()===i.AnnotationEditorType.INK){if(!e)for(const e of _classPrivateFieldGet(this,u).values())if(e.isEmpty())return void e.setInBackground();_classPrivateMethodGet(this,_,S).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(e){_classPrivateFieldGet(this,g).setEditingState(e)}addCommands(e){_classPrivateFieldGet(this,g).addCommands(e)}enable(){this.div.style.pointerEvents="auto";for(const e of _classPrivateFieldGet(this,u).values())e.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const e of _classPrivateFieldGet(this,u).values())e.disableEditing();_classPrivateMethodGet(this,b,F).call(this),this.isEmpty&&(this.div.hidden=!0)}setActiveEditor(e){_classPrivateFieldGet(this,g).getActive()!==e&&_classPrivateFieldGet(this,g).setActiveEditor(e)}enableClick(){this.div.addEventListener("pointerdown",_classPrivateFieldGet(this,h)),this.div.addEventListener("pointerup",_classPrivateFieldGet(this,d))}disableClick(){this.div.removeEventListener("pointerdown",_classPrivateFieldGet(this,h)),this.div.removeEventListener("pointerup",_classPrivateFieldGet(this,d))}attach(e){_classPrivateFieldGet(this,u).set(e.id,e)}detach(e){var t;_classPrivateFieldGet(this,u).delete(e.id),null===(t=_classPrivateFieldGet(this,l))||void 0===t||t.removePointerInTextLayer(e.contentDiv)}remove(e){_classPrivateFieldGet(this,g).removeEditor(e),this.detach(e),e.div.style.display="none",setTimeout((()=>{e.div.style.display="",e.div.remove(),e.isAttachedToDOM=!1,document.activeElement===document.body&&_classPrivateFieldGet(this,g).focusMainContainer()}),0),_classPrivateFieldGet(this,f)||this.addInkEditorIfNeeded(!1)}add(e){if(_classPrivateMethodGet(this,v,P).call(this,e),_classPrivateFieldGet(this,g).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}this.moveEditorInDOM(e),e.onceAdded(),_classPrivateFieldGet(this,g).addToAnnotationStorage(e)}moveEditorInDOM(e){var t;null===(t=_classPrivateFieldGet(this,l))||void 0===t||t.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addANewEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!0})}addUndoableEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!1})}getNextId(){return _classPrivateFieldGet(this,g).getId()}deserialize(e){switch(e.annotationType){case i.AnnotationEditorType.FREETEXT:return n.FreeTextEditor.deserialize(e,this,_classPrivateFieldGet(this,g));case i.AnnotationEditorType.INK:return r.InkEditor.deserialize(e,this,_classPrivateFieldGet(this,g))}return null}setSelected(e){_classPrivateFieldGet(this,g).setSelected(e)}toggleSelected(e){_classPrivateFieldGet(this,g).toggleSelected(e)}isSelected(e){return _classPrivateFieldGet(this,g).isSelected(e)}unselect(e){_classPrivateFieldGet(this,g).unselect(e)}pointerup(e){const{isMac:t}=i.FeatureTest.platform;0!==e.button||e.ctrlKey&&t||e.target===this.div&&_classPrivateFieldGet(this,p)&&(_classPrivateFieldSet(this,p,!1),_classPrivateFieldGet(this,c)?_classPrivateMethodGet(this,_,S).call(this,e):_classPrivateFieldSet(this,c,!0))}pointerdown(e){const{isMac:t}=i.FeatureTest.platform;if(0!==e.button||e.ctrlKey&&t)return;if(e.target!==this.div)return;_classPrivateFieldSet(this,p,!0);const s=_classPrivateFieldGet(this,g).getActive();_classPrivateFieldSet(this,c,!s||s.isEmpty())}drop(e){const t=e.dataTransfer.getData("text/plain"),s=_classPrivateFieldGet(this,g).getEditor(t);if(!s)return;e.preventDefault(),e.dataTransfer.dropEffect="move",_classPrivateMethodGet(this,v,P).call(this,s);const i=this.div.getBoundingClientRect(),a=e.clientX-i.x,n=e.clientY-i.y;s.translate(a-s.startX,n-s.startY),this.moveEditorInDOM(s),s.div.focus()}dragover(e){e.preventDefault()}destroy(){var e;(null===(e=_classPrivateFieldGet(this,g).getActive())||void 0===e?void 0:e.parent)===this&&_classPrivateFieldGet(this,g).setActiveEditor(null);for(const s of _classPrivateFieldGet(this,u).values()){var t;null===(t=_classPrivateFieldGet(this,l))||void 0===t||t.removePointerInTextLayer(s.contentDiv),s.setParent(null),s.isAttachedToDOM=!1,s.div.remove()}this.div=null,_classPrivateFieldGet(this,u).clear(),_classPrivateFieldGet(this,g).removeLayer(this)}render(e){let{viewport:t}=e;this.viewport=t,(0,o.setLayerDimensions)(this.div,t),(0,a.bindEvents)(this,this.div,["dragover","drop"]);for(const s of _classPrivateFieldGet(this,g).getEditors(this.pageIndex))this.add(s);this.updateMode()}update(e){let{viewport:t}=e;_classPrivateFieldGet(this,g).commitOrRemove(),this.viewport=t,(0,o.setLayerDimensions)(this.div,{rotation:t.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}}function P(e){var t;e.parent!==this&&(this.attach(e),null===(t=e.parent)||void 0===t||t.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}function A(e){switch(_classPrivateFieldGet(this,g).getMode()){case i.AnnotationEditorType.FREETEXT:return new n.FreeTextEditor(e);case i.AnnotationEditorType.INK:return new r.InkEditor(e)}return null}function S(e){const t=this.getNextId(),s=_classPrivateMethodGet(this,m,A).call(this,{parent:this,id:t,x:e.offsetX,y:e.offsetY,uiManager:_classPrivateFieldGet(this,g)});return s&&this.add(s),s}function F(){_classPrivateFieldSet(this,f,!0);for(const e of _classPrivateFieldGet(this,u).values())e.isEmpty()&&e.remove();_classPrivateFieldSet(this,f,!1)}_defineProperty(y,"_initialized",!1),t.AnnotationEditorLayer=y},(e,t,s)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var a=s(1),n=s(5),r=s(4),o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,f=new WeakMap,g=new WeakMap,v=new WeakSet,m=new WeakSet,_=new WeakSet,b=new WeakSet;class y extends r.AnnotationEditor{constructor(e){super({...e,name:"freeTextEditor"}),_classPrivateMethodInitSpec(this,b),_classPrivateMethodInitSpec(this,_),_classPrivateMethodInitSpec(this,m),_classPrivateMethodInitSpec(this,v),_classPrivateFieldInitSpec(this,o,{writable:!0,value:this.editorDivBlur.bind(this)}),_classPrivateFieldInitSpec(this,l,{writable:!0,value:this.editorDivFocus.bind(this)}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:this.editorDivInput.bind(this)}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:this.editorDivKeydown.bind(this)}),_classPrivateFieldInitSpec(this,h,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,u,{writable:!0,value:""}),_classPrivateFieldInitSpec(this,p,{writable:!0,value:"".concat(this.id,"-editor")}),_classPrivateFieldInitSpec(this,f,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,g,{writable:!0,value:void 0}),_classPrivateFieldSet(this,h,e.color||y._defaultColor||r.AnnotationEditor._defaultLineColor),_classPrivateFieldSet(this,g,e.fontSize||y._defaultFontSize)}static initialize(e){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map((t=>[t,e.get(t)])));const t=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case a.AnnotationEditorParamsType.FREETEXT_SIZE:y._defaultFontSize=t;break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:y._defaultColor=t}}updateParams(e,t){switch(e){case a.AnnotationEditorParamsType.FREETEXT_SIZE:_classPrivateMethodGet(this,v,P).call(this,t);break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:_classPrivateMethodGet(this,m,A).call(this,t)}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,y._defaultFontSize],[a.AnnotationEditorParamsType.FREETEXT_COLOR,y._defaultColor||r.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,_classPrivateFieldGet(this,g)],[a.AnnotationEditorParamsType.FREETEXT_COLOR,_classPrivateFieldGet(this,h)]]}getInitialTranslation(){const e=this.parentScale;return[-y._internalPadding*e,-(y._internalPadding+_classPrivateFieldGet(this,g))*e]}rebuild(){super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(a.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",_classPrivateFieldGet(this,d)),this.editorDiv.addEventListener("focus",_classPrivateFieldGet(this,l)),this.editorDiv.addEventListener("blur",_classPrivateFieldGet(this,o)),this.editorDiv.addEventListener("input",_classPrivateFieldGet(this,c)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",_classPrivateFieldGet(this,p)),this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",_classPrivateFieldGet(this,d)),this.editorDiv.removeEventListener("focus",_classPrivateFieldGet(this,l)),this.editorDiv.removeEventListener("blur",_classPrivateFieldGet(this,o)),this.editorDiv.removeEventListener("input",_classPrivateFieldGet(this,c)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(e){super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing"),super.remove()}commit(){this.isInEditMode()&&(super.commit(),_classPrivateFieldGet(this,f)||(_classPrivateFieldSet(this,f,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),_classPrivateFieldSet(this,u,_classPrivateMethodGet(this,_,S).call(this).trimEnd()),_classPrivateMethodGet(this,b,F).call(this))}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(e){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(e){y._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",_classPrivateFieldGet(this,p)),this.enableEditing(),y._l10nPromise.get("editor_free_text2_aria_label").then((e=>{var t;return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("aria-label",e)})),y._l10nPromise.get("free_text2_default_content").then((e=>{var t;return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("default-content",e)})),this.editorDiv.contentEditable=!0;const{style:s}=this.editorDiv;if(s.fontSize="calc(".concat(_classPrivateFieldGet(this,g),"px * var(--scale-factor))"),s.color=_classPrivateFieldGet(this,h),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,n.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[s,i]=this.parentDimensions;this.setAt(e*s,t*i,this.width*s,this.height*i);for(const e of _classPrivateFieldGet(this,u).split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(e,t,s){const i=super.deserialize(e,t,s);return _classPrivateFieldSet(i,g,e.fontSize),_classPrivateFieldSet(i,h,a.Util.makeHexColor(...e.color)),_classPrivateFieldSet(i,u,e.value),i}serialize(){if(this.isEmpty())return null;const e=y._internalPadding*this.parentScale,t=this.getRect(e,e),s=r.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:_classPrivateFieldGet(this,h));return{annotationType:a.AnnotationEditorType.FREETEXT,color:s,fontSize:_classPrivateFieldGet(this,g),value:_classPrivateFieldGet(this,u),pageIndex:this.pageIndex,rect:t,rotation:this.rotation}}}function P(e){const t=e=>{this.editorDiv.style.fontSize="calc(".concat(e,"px * var(--scale-factor))"),this.translate(0,-(e-_classPrivateFieldGet(this,g))*this.parentScale),_classPrivateFieldSet(this,g,e),_classPrivateMethodGet(this,b,F).call(this)},s=_classPrivateFieldGet(this,g);this.addCommands({cmd:()=>{t(e)},undo:()=>{t(s)},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function A(e){const t=_classPrivateFieldGet(this,h);this.addCommands({cmd:()=>{_classPrivateFieldSet(this,h,this.editorDiv.style.color=e)},undo:()=>{_classPrivateFieldSet(this,h,this.editorDiv.style.color=t)},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function S(){const e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;const t=[];for(const s of e)t.push(s.innerText.replace(/\r\n?|\n/,""));return t.join("\n")}function F(){const[e,t]=this.parentDimensions;let s;if(this.isAttachedToDOM)s=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,i=t.style.display;t.style.display="hidden",e.div.append(this.div),s=t.getBoundingClientRect(),t.remove(),t.style.display=i}this.width=s.width/e,this.height=s.height/t}i=y,_defineProperty(y,"_freeTextDefaultContent",""),_defineProperty(y,"_l10nPromise",void 0),_defineProperty(y,"_internalPadding",0),_defineProperty(y,"_defaultColor",null),_defineProperty(y,"_defaultFontSize",10),_defineProperty(y,"_keyboardManager",new n.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],i.prototype.commitOrRemove]])),_defineProperty(y,"_type","freetext"),t.FreeTextEditor=y},(e,t,s)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,Object.defineProperty(t,"fitCurve",{enumerable:!0,get:function(){return r.fitCurve}});var a=s(1),n=s(4),r=s(30),o=s(5);const l=16;var c=new WeakMap,d=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,f=new WeakMap,g=new WeakMap,v=new WeakMap,m=new WeakMap,_=new WeakMap,b=new WeakMap,y=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakSet,F=new WeakSet,w=new WeakSet,x=new WeakSet,E=new WeakSet,C=new WeakSet,M=new WeakSet,k=new WeakSet,T=new WeakSet,R=new WeakSet,I=new WeakSet,D=new WeakSet,O=new WeakSet,G=new WeakSet,L=new WeakSet,N=new WeakSet,j=new WeakSet,W=new WeakSet,B=new WeakSet,U=new WeakSet,q=new WeakSet,H=new WeakSet;class V extends n.AnnotationEditor{constructor(e){super({...e,name:"inkEditor"}),_classPrivateMethodInitSpec(this,H),_classPrivateMethodInitSpec(this,q),_classPrivateMethodInitSpec(this,U),_classPrivateMethodInitSpec(this,B),_classPrivateMethodInitSpec(this,W),_classPrivateMethodInitSpec(this,j),_classPrivateMethodInitSpec(this,N),_classPrivateMethodInitSpec(this,L),_classPrivateMethodInitSpec(this,G),_classPrivateMethodInitSpec(this,O),_classPrivateMethodInitSpec(this,D),_classPrivateMethodInitSpec(this,I),_classPrivateMethodInitSpec(this,R),_classPrivateMethodInitSpec(this,T),_classPrivateMethodInitSpec(this,k),_classPrivateMethodInitSpec(this,M),_classPrivateMethodInitSpec(this,C),_classPrivateMethodInitSpec(this,E),_classPrivateMethodInitSpec(this,x),_classPrivateMethodInitSpec(this,w),_classPrivateMethodInitSpec(this,F),_classPrivateMethodInitSpec(this,S),_classPrivateFieldInitSpec(this,c,{writable:!0,value:0}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:0}),_classPrivateFieldInitSpec(this,h,{writable:!0,value:0}),_classPrivateFieldInitSpec(this,u,{writable:!0,value:this.canvasPointermove.bind(this)}),_classPrivateFieldInitSpec(this,p,{writable:!0,value:this.canvasPointerleave.bind(this)}),_classPrivateFieldInitSpec(this,f,{writable:!0,value:this.canvasPointerup.bind(this)}),_classPrivateFieldInitSpec(this,g,{writable:!0,value:this.canvasPointerdown.bind(this)}),_classPrivateFieldInitSpec(this,v,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,m,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,_,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,b,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,y,{writable:!0,value:0}),_classPrivateFieldInitSpec(this,P,{writable:!0,value:0}),_classPrivateFieldInitSpec(this,A,{writable:!0,value:null}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(e){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map((t=>[t,e.get(t)])))}static updateDefaultParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:V._defaultThickness=t;break;case a.AnnotationEditorParamsType.INK_COLOR:V._defaultColor=t;break;case a.AnnotationEditorParamsType.INK_OPACITY:V._defaultOpacity=t/100}}updateParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:_classPrivateMethodGet(this,S,z).call(this,t);break;case a.AnnotationEditorParamsType.INK_COLOR:_classPrivateMethodGet(this,F,X).call(this,t);break;case a.AnnotationEditorParamsType.INK_OPACITY:_classPrivateMethodGet(this,w,Y).call(this,t)}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,V._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,V._defaultColor||n.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*V._defaultOpacity)]]}get propertiesToUpdate(){var e;return[[a.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||V._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,this.color||V._defaultColor||n.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(e=this.opacity)&&void 0!==e?e:V._defaultOpacity))]]}rebuild(){super.rebuild(),null!==this.div&&(this.canvas||(_classPrivateMethodGet(this,I,se).call(this),_classPrivateMethodGet(this,D,ie).call(this)),this.isAttachedToDOM||(this.parent.add(this),_classPrivateMethodGet(this,O,ae).call(this)),_classPrivateMethodGet(this,q,pe).call(this))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,_classPrivateFieldGet(this,b).disconnect(),_classPrivateFieldSet(this,b,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,s=this.width*e,i=this.height*t;this.setDimensions(s,i)}enableEditMode(){_classPrivateFieldGet(this,v)||null===this.canvas||(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(this,g)),this.canvas.addEventListener("pointerup",_classPrivateFieldGet(this,f)))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(this,g)),this.canvas.removeEventListener("pointerup",_classPrivateFieldGet(this,f)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){_classPrivateFieldGet(this,v)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),_classPrivateFieldSet(this,v,!0),this.div.classList.add("disabled"),_classPrivateMethodGet(this,q,pe).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus({preventScroll:!0}))}focusin(e){super.focusin(e),this.enableEditMode()}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!_classPrivateFieldGet(this,v)&&(this.setInForeground(),"mouse"!==e.type&&this.div.focus(),e.stopPropagation(),this.canvas.addEventListener("pointerleave",_classPrivateFieldGet(this,p)),this.canvas.addEventListener("pointermove",_classPrivateFieldGet(this,u)),_classPrivateMethodGet(this,C,Q).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.stopPropagation(),_classPrivateMethodGet(this,M,Z).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){0===e.button&&this.isInEditMode()&&0!==this.currentPath.length&&(e.stopPropagation(),_classPrivateMethodGet(this,R,te).call(this,e),this.setInBackground())}canvasPointerleave(e){_classPrivateMethodGet(this,R,te).call(this,e),this.setInBackground()}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),V._l10nPromise.get("editor_ink2_aria_label").then((e=>{var t;return null===(t=this.div)||void 0===t?void 0:t.setAttribute("aria-label",e)}));const[s,i,a,n]=_classPrivateMethodGet(this,x,K).call(this);if(this.setAt(s,i,0,0),this.setDims(a,n),_classPrivateMethodGet(this,I,se).call(this),this.width){const[s,i]=this.parentDimensions;this.setAt(e*s,t*i,this.width*s,this.height*i),_classPrivateFieldSet(this,m,!0),_classPrivateMethodGet(this,O,ae).call(this),this.setDims(this.width*s,this.height*i),_classPrivateMethodGet(this,T,ee).call(this),_classPrivateMethodGet(this,H,fe).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return _classPrivateMethodGet(this,D,ie).call(this),this.div}setDimensions(e,t){const s=Math.round(e),i=Math.round(t);if(_classPrivateFieldGet(this,y)===s&&_classPrivateFieldGet(this,P)===i)return;_classPrivateFieldSet(this,y,s),_classPrivateFieldSet(this,P,i),this.canvas.style.visibility="hidden",_classPrivateFieldGet(this,c)&&Math.abs(_classPrivateFieldGet(this,c)-e/t)>.01&&(t=Math.ceil(e/_classPrivateFieldGet(this,c)),this.setDims(e,t));const[a,n]=this.parentDimensions;this.width=e/a,this.height=t/n,_classPrivateFieldGet(this,v)&&_classPrivateMethodGet(this,G,ne).call(this,e,t),_classPrivateMethodGet(this,O,ae).call(this),_classPrivateMethodGet(this,T,ee).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(e,t,s){const i=super.deserialize(e,t,s);i.thickness=e.thickness,i.color=a.Util.makeHexColor(...e.color),i.opacity=e.opacity;const[n,r]=i.pageDimensions,o=i.width*n,u=i.height*r,p=i.parentScale,f=e.thickness/2;_classPrivateFieldSet(i,c,o/u),_classPrivateFieldSet(i,v,!0),_classPrivateFieldSet(i,y,Math.round(o)),_classPrivateFieldSet(i,P,Math.round(u));for(const{bezier:a}of e.paths){const e=[];i.paths.push(e);let t=p*(a[0]-f),s=p*(u-a[1]-f);for(let i=2,r=a.length;i<r;i+=6){const n=p*(a[i]-f),r=p*(u-a[i+1]-f),o=p*(a[i+2]-f),l=p*(u-a[i+3]-f),c=p*(a[i+4]-f),d=p*(u-a[i+5]-f);e.push([[t,s],[n,r],[o,l],[c,d]]),t=c,s=d}const n=_classStaticPrivateMethodGet(this,V,oe).call(this,e);i.bezierPath2D.push(n)}const g=_classPrivateMethodGet(i,B,he).call(i);return _classPrivateFieldSet(i,h,Math.max(l,g[2]-g[0])),_classPrivateFieldSet(i,d,Math.max(l,g[3]-g[1])),_classPrivateMethodGet(i,G,ne).call(i,o,u),i}serialize(){if(this.isEmpty())return null;const e=this.getRect(0,0),t=this.rotation%180===0?e[3]-e[1]:e[2]-e[0],s=n.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:a.AnnotationEditorType.INK,color:s,thickness:this.thickness,opacity:this.opacity,paths:_classPrivateMethodGet(this,N,le).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:e,rotation:this.rotation}}}function z(e){const t=this.thickness;this.addCommands({cmd:()=>{this.thickness=e,_classPrivateMethodGet(this,q,pe).call(this)},undo:()=>{this.thickness=t,_classPrivateMethodGet(this,q,pe).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function X(e){const t=this.color;this.addCommands({cmd:()=>{this.color=e,_classPrivateMethodGet(this,T,ee).call(this)},undo:()=>{this.color=t,_classPrivateMethodGet(this,T,ee).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function Y(e){e/=100;const t=this.opacity;this.addCommands({cmd:()=>{this.opacity=e,_classPrivateMethodGet(this,T,ee).call(this)},undo:()=>{this.opacity=t,_classPrivateMethodGet(this,T,ee).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function K(){const{parentRotation:e,parentDimensions:[t,s]}=this;switch(e){case 90:return[0,s,s,t];case 180:return[t,s,t,s];case 270:return[t,0,s,t];default:return[0,0,t,s]}}function J(){const{ctx:e,color:t,opacity:s,thickness:i,parentScale:a,scaleFactor:n}=this;e.lineWidth=i*a/n,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle="".concat(t).concat((0,o.opacityToHex)(s))}function Q(e,t){var s;this.isEditing=!0,_classPrivateFieldGet(this,m)||(_classPrivateFieldSet(this,m,!0),_classPrivateMethodGet(this,O,ae).call(this),this.thickness||(this.thickness=i._defaultThickness),this.color||(this.color=i._defaultColor||n.AnnotationEditor._defaultLineColor),null!==(s=this.opacity)&&void 0!==s||(this.opacity=i._defaultOpacity)),this.currentPath.push([e,t]),_classPrivateFieldSet(this,_,null),_classPrivateMethodGet(this,E,J).call(this),this.ctx.beginPath(),this.ctx.moveTo(e,t),_classPrivateFieldSet(this,A,(()=>{_classPrivateFieldGet(this,A)&&(_classPrivateFieldGet(this,_)&&(this.isEmpty()?(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)):_classPrivateMethodGet(this,T,ee).call(this),this.ctx.lineTo(..._classPrivateFieldGet(this,_)),_classPrivateFieldSet(this,_,null),this.ctx.stroke()),window.requestAnimationFrame(_classPrivateFieldGet(this,A)))})),window.requestAnimationFrame(_classPrivateFieldGet(this,A))}function Z(e,t){const[s,i]=this.currentPath.at(-1);e===s&&t===i||(this.currentPath.push([e,t]),_classPrivateFieldSet(this,_,[e,t]))}function $(e,t){this.ctx.closePath(),_classPrivateFieldSet(this,A,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height);const[s,a]=this.currentPath.at(-1);let n;if(e===s&&t===a||this.currentPath.push([e,t]),1!==this.currentPath.length)n=(0,r.fitCurve)(this.currentPath,30,null);else{const s=[e,t];n=[[s,s.slice(),s.slice(),s]]}const o=_classStaticPrivateMethodGet(i,i,oe).call(i,n);this.currentPath.length=0,this.addCommands({cmd:()=>{this.paths.push(n),this.bezierPath2D.push(o),this.rebuild()},undo:()=>{this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(_classPrivateMethodGet(this,I,se).call(this),_classPrivateMethodGet(this,D,ie).call(this)),_classPrivateMethodGet(this,q,pe).call(this))},mustExec:!0})}function ee(){if(this.isEmpty())return void _classPrivateMethodGet(this,L,re).call(this);_classPrivateMethodGet(this,E,J).call(this);const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),_classPrivateMethodGet(this,L,re).call(this);for(const s of this.bezierPath2D)t.stroke(s)}function te(e){_classPrivateMethodGet(this,k,$).call(this,e.offsetX,e.offsetY),this.canvas.removeEventListener("pointerleave",_classPrivateFieldGet(this,p)),this.canvas.removeEventListener("pointermove",_classPrivateFieldGet(this,u)),this.addToAnnotationStorage()}function se(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",i._l10nPromise.get("editor_ink_canvas_aria_label").then((e=>{var t;return null===(t=this.canvas)||void 0===t?void 0:t.setAttribute("aria-label",e)})),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}function ie(){_classPrivateFieldSet(this,b,new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)}))),_classPrivateFieldGet(this,b).observe(this.div)}function ae(){if(!_classPrivateFieldGet(this,m))return;const[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),_classPrivateMethodGet(this,L,re).call(this)}function ne(e,t){const s=_classPrivateMethodGet(this,U,ue).call(this),i=(e-s)/_classPrivateFieldGet(this,h),a=(t-s)/_classPrivateFieldGet(this,d);this.scaleFactor=Math.min(i,a)}function re(){const e=_classPrivateMethodGet(this,U,ue).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}function oe(e){const t=new Path2D;for(let s=0,i=e.length;s<i;s++){const[i,a,n,r]=e[s];0===s&&t.moveTo(...i),t.bezierCurveTo(a[0],a[1],n[0],n[1],r[0],r[1])}return t}function le(e,t,s,i){const a=[],n=this.thickness/2;let r,o;for(const l of this.paths){r=[],o=[];for(let a=0,c=l.length;a<c;a++){const[c,d,h,u]=l[a],p=e*(c[0]+t)+n,f=i-e*(c[1]+s)-n,g=e*(d[0]+t)+n,v=i-e*(d[1]+s)-n,m=e*(h[0]+t)+n,_=i-e*(h[1]+s)-n,b=e*(u[0]+t)+n,y=i-e*(u[1]+s)-n;0===a&&(r.push(p,f),o.push(p,f)),r.push(g,v,m,_,b,y),_classPrivateMethodGet(this,j,ce).call(this,p,f,g,v,m,_,b,y,4,o)}a.push({bezier:r,points:o})}return a}function ce(e,t,s,i,a,n,r,o,l,c){if(_classPrivateMethodGet(this,W,de).call(this,e,t,s,i,a,n,r,o))c.push(r,o);else{for(let d=1;d<l-1;d++){const h=d/l,u=1-h;let p=h*e+u*s,f=h*t+u*i,g=h*s+u*a,v=h*i+u*n;p=h*p+u*g,f=h*f+u*v,g=h*g+u*(h*a+u*r),v=h*v+u*(h*n+u*o),p=h*p+u*g,f=h*f+u*v,c.push(p,f)}c.push(r,o)}}function de(e,t,s,i,a,n,r,o){const l=(3*s-2*e-r)**2,c=(3*i-2*t-o)**2,d=(3*a-e-2*r)**2,h=(3*n-t-2*o)**2;return Math.max(l,d)+Math.max(c,h)<=10}function he(){let e=1/0,t=-1/0,s=1/0,i=-1/0;for(const n of this.paths)for(const[r,o,l,c]of n){const n=a.Util.bezierBoundingBox(...r,...o,...l,...c);e=Math.min(e,n[0]),s=Math.min(s,n[1]),t=Math.max(t,n[2]),i=Math.max(i,n[3])}return[e,s,t,i]}function ue(){return _classPrivateFieldGet(this,v)?Math.ceil(this.thickness*this.parentScale):0}function pe(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return;if(!_classPrivateFieldGet(this,v))return void _classPrivateMethodGet(this,T,ee).call(this);const t=_classPrivateMethodGet(this,B,he).call(this),s=_classPrivateMethodGet(this,U,ue).call(this);_classPrivateFieldSet(this,h,Math.max(l,t[2]-t[0])),_classPrivateFieldSet(this,d,Math.max(l,t[3]-t[1]));const i=Math.ceil(s+_classPrivateFieldGet(this,h)*this.scaleFactor),a=Math.ceil(s+_classPrivateFieldGet(this,d)*this.scaleFactor),[n,r]=this.parentDimensions;this.width=i/n,this.height=a/r,_classPrivateFieldSet(this,c,i/a),_classPrivateMethodGet(this,H,fe).call(this);const o=this.translationX,u=this.translationY;this.translationX=-t[0],this.translationY=-t[1],_classPrivateMethodGet(this,O,ae).call(this),_classPrivateMethodGet(this,T,ee).call(this),_classPrivateFieldSet(this,y,i),_classPrivateFieldSet(this,P,a),this.setDims(i,a);const p=e?s/this.scaleFactor/2:0;this.translate(o-this.translationX-p,u-this.translationY-p)}function fe(){const{style:e}=this.div;_classPrivateFieldGet(this,c)>=1?(e.minHeight="".concat(l,"px"),e.minWidth="".concat(Math.round(_classPrivateFieldGet(this,c)*l),"px")):(e.minWidth="".concat(l,"px"),e.minHeight="".concat(Math.round(l/_classPrivateFieldGet(this,c)),"px"))}i=V,_defineProperty(V,"_defaultColor",null),_defineProperty(V,"_defaultOpacity",1),_defineProperty(V,"_defaultThickness",1),_defineProperty(V,"_l10nPromise",void 0),_defineProperty(V,"_type","ink"),t.InkEditor=V},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fitCurve=void 0;const i=s(31);t.fitCurve=i},e=>{function t(e,a,n,r,o){var c,d,h,u,p,f,g,v,m,_,b,y,P;if(2===e.length)return y=l.vectorLen(l.subtract(e[0],e[1]))/3,[c=[e[0],l.addArrays(e[0],l.mulItems(a,y)),l.addArrays(e[1],l.mulItems(n,y)),e[1]]];if(d=function(e){var t,s,i,a=[];return e.forEach(((e,n)=>{t=n?s+l.vectorLen(l.subtract(e,i)):0,a.push(t),s=t,i=e})),a=a.map((e=>e/s))}(e),[c,u,f]=s(e,d,d,a,n,o),0===u||u<r)return[c];if(u<r*r)for(h=d,p=u,g=f,P=0;P<20;P++){if(h=i(c,e,h),[c,u,f]=s(e,d,h,a,n,o),u<r)return[c];if(f===g){let e=u/p;if(e>.9999&&e<1.0001)break}p=u,g=f}return b=[],(v=l.subtract(e[f-1],e[f+1])).every((e=>0===e))&&(v=l.subtract(e[f-1],e[f]),[v[0],v[1]]=[-v[1],v[0]]),m=l.normalize(v),_=l.mulItems(m,-1),b=(b=b.concat(t(e.slice(0,f+1),a,m,r,o))).concat(t(e.slice(f),_,n,r,o))}function s(e,t,s,i,a,o){var d,h,u;return d=function(e,t,s,i){var a,n,r,o,d,h,u,p,f,g,v,m,_,b,y,P,A,S=e[0],F=e[e.length-1];for(a=[S,null,null,F],n=l.zeros_Xx2x2(t.length),_=0,b=t.length;_<b;_++)A=1-(P=t[_]),(r=n[_])[0]=l.mulItems(s,3*P*(A*A)),r[1]=l.mulItems(i,3*A*(P*P));for(o=[[0,0],[0,0]],d=[0,0],_=0,b=e.length;_<b;_++)P=t[_],r=n[_],o[0][0]+=l.dot(r[0],r[0]),o[0][1]+=l.dot(r[0],r[1]),o[1][0]+=l.dot(r[0],r[1]),o[1][1]+=l.dot(r[1],r[1]),y=l.subtract(e[_],c.q([S,S,F,F],P)),d[0]+=l.dot(r[0],y),d[1]+=l.dot(r[1],y);return h=o[0][0]*o[1][1]-o[1][0]*o[0][1],u=o[0][0]*d[1]-o[1][0]*d[0],p=d[0]*o[1][1]-d[1]*o[0][1],f=0===h?0:p/h,g=0===h?0:u/h,m=l.vectorLen(l.subtract(S,F)),f<(v=1e-6*m)||g<v?(a[1]=l.addArrays(S,l.mulItems(s,m/3)),a[2]=l.addArrays(F,l.mulItems(i,m/3))):(a[1]=l.addArrays(S,l.mulItems(s,f)),a[2]=l.addArrays(F,l.mulItems(i,g))),a}(e,s,i,a),[h,u]=function(e,t,s){var i,a,o,d,h,u,p,f;a=0,o=Math.floor(e.length/2);const g=n(t,10);for(h=0,u=e.length;h<u;h++)p=e[h],f=r(0,s[h],g,10),(i=(d=l.subtract(c.q(t,f),p))[0]*d[0]+d[1]*d[1])>a&&(a=i,o=h);return[a,o]}(e,d,t),o&&o({bez:d,points:e,params:t,maxErr:h,maxPoint:u}),[d,h,u]}function i(e,t,s){return s.map(((s,i)=>a(e,t[i],s)))}function a(e,t,s){var i=l.subtract(c.q(e,s),t),a=c.qprime(e,s),n=l.mulMatrix(i,a),r=l.sum(l.squareItems(a))+2*l.mulMatrix(i,c.qprimeprime(e,s));return 0===r?s:s-n/r}var n=function(e,t){for(var s,i=[0],a=e[0],n=0,r=1;r<=t;r++)s=c.q(e,r/t),n+=l.vectorLen(l.subtract(s,a)),i.push(n),a=s;return i=i.map((e=>e/n))};function r(e,t,s,i){if(t<0)return 0;if(t>1)return 1;for(var a,n,r,o,l=1;l<=i;l++)if(t<=s[l]){r=(l-1)/i,n=l/i,o=(t-(a=s[l-1]))/(s[l]-a)*(n-r)+r;break}return o}function o(e,t){return l.normalize(l.subtract(e,t))}class l{static zeros_Xx2x2(e){for(var t=[];e--;)t.push([0,0]);return t}static mulItems(e,t){return e.map((e=>e*t))}static mulMatrix(e,t){return e.reduce(((e,s,i)=>e+s*t[i]),0)}static subtract(e,t){return e.map(((e,s)=>e-t[s]))}static addArrays(e,t){return e.map(((e,s)=>e+t[s]))}static addItems(e,t){return e.map((e=>e+t))}static sum(e){return e.reduce(((e,t)=>e+t))}static dot(e,t){return l.mulMatrix(e,t)}static vectorLen(e){return Math.hypot(...e)}static divItems(e,t){return e.map((e=>e/t))}static squareItems(e){return e.map((e=>e*e))}static normalize(e){return this.divItems(e,this.vectorLen(e))}}class c{static q(e,t){var s=1-t,i=l.mulItems(e[0],s*s*s),a=l.mulItems(e[1],3*s*s*t),n=l.mulItems(e[2],3*s*t*t),r=l.mulItems(e[3],t*t*t);return l.addArrays(l.addArrays(i,a),l.addArrays(n,r))}static qprime(e,t){var s=1-t,i=l.mulItems(l.subtract(e[1],e[0]),3*s*s),a=l.mulItems(l.subtract(e[2],e[1]),6*s*t),n=l.mulItems(l.subtract(e[3],e[2]),3*t*t);return l.addArrays(l.addArrays(i,a),n)}static qprimeprime(e,t){return l.addArrays(l.mulItems(l.addArrays(l.subtract(e[2],l.mulItems(e[1],2)),e[0]),6*(1-t)),l.mulItems(l.addArrays(l.subtract(e[3],l.mulItems(e[2],2)),e[1]),6*t))}}e.exports=function(e,s,i){if(!Array.isArray(e))throw new TypeError("First argument should be an array");if(e.forEach((t=>{if(!Array.isArray(t)||t.some((e=>"number"!==typeof e))||t.length!==e[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")})),(e=e.filter(((t,s)=>0===s||!t.every(((t,i)=>t===e[s-1][i]))))).length<2)return[];const a=e.length,n=o(e[1],e[0]),r=o(e[a-2],e[a-1]);return t(e,n,r,s,i)},e.exports.fitCubic=t,e.exports.createTangent=o},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var i=s(1),a=s(6),n=s(3),r=s(33),o=s(34);const l=1e3,c=new WeakSet;function d(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class h{static create(e){switch(e.data.annotationType){case i.AnnotationType.LINK:return new g(e);case i.AnnotationType.TEXT:return new _(e);case i.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new y(e);case"Btn":return e.data.radioButton?new A(e):e.data.checkBox?new P(e):new S(e);case"Ch":return new F(e)}return new b(e);case i.AnnotationType.POPUP:return new w(e);case i.AnnotationType.FREETEXT:return new E(e);case i.AnnotationType.LINE:return new C(e);case i.AnnotationType.SQUARE:return new M(e);case i.AnnotationType.CIRCLE:return new k(e);case i.AnnotationType.POLYLINE:return new T(e);case i.AnnotationType.CARET:return new I(e);case i.AnnotationType.INK:return new D(e);case i.AnnotationType.POLYGON:return new R(e);case i.AnnotationType.HIGHLIGHT:return new O(e);case i.AnnotationType.UNDERLINE:return new G(e);case i.AnnotationType.SQUIGGLY:return new L(e);case i.AnnotationType.STRIKEOUT:return new N(e);case i.AnnotationType.STAMP:return new j(e);case i.AnnotationType.FILEATTACHMENT:return new W(e);default:return new u(e)}}}class u{constructor(e){let{isRenderable:t=!1,ignoreBorder:s=!1,createQuadrilaterals:i=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,t&&(this.container=this._createContainer(s)),i&&(this.quadrilaterals=this._createQuadrilaterals(s))}_createContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{data:t,page:s,viewport:a}=this,n=document.createElement("section");n.setAttribute("data-annotation-id",t.id),t.noRotate&&n.classList.add("norotate");const{pageWidth:r,pageHeight:o,pageX:l,pageY:c}=a.rawDims,{width:h,height:u}=d(t.rect),p=i.Util.normalizeRect([t.rect[0],s.view[3]-t.rect[1]+s.view[1],t.rect[2],s.view[3]-t.rect[3]+s.view[1]]);if(!e&&t.borderStyle.width>0){n.style.borderWidth="".concat(t.borderStyle.width,"px");const e=t.borderStyle.horizontalCornerRadius,s=t.borderStyle.verticalCornerRadius;if(e>0||s>0){const t="calc(".concat(e,"px * var(--scale-factor)) / calc(").concat(s,"px * var(--scale-factor))");n.style.borderRadius=t}else if(this instanceof A){const e="calc(".concat(h,"px * var(--scale-factor)) / calc(").concat(u,"px * var(--scale-factor))");n.style.borderRadius=e}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:n.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:n.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:n.style.borderBottomStyle="solid"}const a=t.borderColor||null;a?n.style.borderColor=i.Util.makeHexColor(0|a[0],0|a[1],0|a[2]):n.style.borderWidth=0}n.style.left="".concat(100*(p[0]-l)/r,"%"),n.style.top="".concat(100*(p[1]-c)/o,"%");const{rotation:f}=t;return t.hasOwnCanvas||0===f?(n.style.width="".concat(100*h/r,"%"),n.style.height="".concat(100*u/o,"%")):this.setRotation(f,n),n}setRotation(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;const{pageWidth:s,pageHeight:i}=this.viewport.rawDims,{width:a,height:n}=d(this.data.rect);let r,o;e%180===0?(r=100*a/s,o=100*n/i):(r=100*n/s,o=100*a/i),t.style.width="".concat(r,"%"),t.style.height="".concat(o,"%"),t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,s)=>{const i=s.detail[e];s.target.style[t]=r.ColorConverters["".concat(i[0],"_HTML")](i.slice(1))};return(0,i.shadow)(this,"_commonActions",{display:e=>{const t=e.detail.display%2===1;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:e=>{this.annotationStorage.setValue(this.data.id,{print:e.detail.print})},hidden:e=>{this.container.style.visibility=e.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:e.detail.hidden})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const s=this._commonActions;for(const i of Object.keys(t.detail)){const a=e[i]||s[i];null===a||void 0===a||a(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const s=this._commonActions;for(const[i,a]of Object.entries(t)){const n=s[i];n&&(n({detail:{[i]:a},target:e}),delete t[i])}}_createQuadrilaterals(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;const t=[],s=this.data.rect;for(const i of this.data.quadPoints)this.data.rect=[i[2].x,i[2].y,i[1].x,i[1].y],t.push(this._createContainer(e));return this.data.rect=s,t}_createPopup(e,t){let s=this.container;this.quadrilaterals&&(e||(e=this.quadrilaterals),s=this.quadrilaterals[0]),e||((e=document.createElement("div")).classList.add("popupTriggerArea"),s.append(e));const i=new x({container:s,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();i.style.left="100%",s.append(i)}_renderQuadrilaterals(e){for(const t of this.quadrilaterals)t.classList.add(e);return this.quadrilaterals}render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=[];if(this._fieldObjects){const a=this._fieldObjects[e];if(a)for(const{page:e,id:n,exportValues:r}of a){if(-1===e)continue;if(n===t)continue;const a="string"===typeof r?r:null,o=document.querySelector('[data-element-id="'.concat(n,'"]'));!o||c.has(o)?s.push({id:n,exportValue:a,domElement:o}):(0,i.warn)("_getElementsByName - element not allowed: ".concat(n))}return s}for(const i of document.getElementsByName(e)){const{exportValue:e}=i,a=i.getAttribute("data-element-id");a!==t&&c.has(i)&&s.push({id:a,exportValue:e,domElement:i})}return s}}var p=new WeakSet,f=new WeakSet;class g extends u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e,{isRenderable:!0,ignoreBorder:!(null===t||void 0===t||!t.ignoreBorder),createQuadrilaterals:!0}),_classPrivateMethodInitSpec(this,f),_classPrivateMethodInitSpec(this,p),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,s=document.createElement("a");s.setAttribute("data-element-id",e.id);let i=!1;return e.url?(t.addLinkAttributes(s,e.url,e.newWindow),i=!0):e.action?(this._bindNamedAction(s,e.action),i=!0):e.attachment?(this._bindAttachment(s,e.attachment),i=!0):e.setOCGState?(_classPrivateMethodGet(this,f,m).call(this,s,e.setOCGState),i=!0):e.dest?(this._bindLink(s,e.dest),i=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(s,e),i=!0),e.resetForm?(this._bindResetFormAction(s,e.resetForm),i=!0):this.isTooltipOnly&&!i&&(this._bindLink(s,""),i=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(((e,t)=>{const i=0===t?s:s.cloneNode();return e.append(i),e})):(this.container.classList.add("linkAnnotation"),i&&this.container.append(s),this.container)}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&_classPrivateMethodGet(this,p,v).call(this)}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),_classPrivateMethodGet(this,p,v).call(this)}_bindAttachment(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>{var e;return null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,t.content,t.filename),!1},_classPrivateMethodGet(this,p,v).call(this)}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const s=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const i of Object.keys(t.actions)){const a=s.get(i);a&&(e[a]=()=>{var e;return null===(e=this.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:i}}),!1})}e.onclick||(e.onclick=()=>!1),_classPrivateMethodGet(this,p,v).call(this)}_bindResetFormAction(e,t){const s=e.onclick;if(s||(e.href=this.linkService.getAnchorUrl("")),_classPrivateMethodGet(this,p,v).call(this),!this._fieldObjects)return(0,i.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(s||(e.onclick=()=>!1));e.onclick=()=>{null===s||void 0===s||s();const{fields:e,refs:a,include:n}=t,r=[];if(0!==e.length||0!==a.length){const t=new Set(a);for(const s of e){const e=this._fieldObjects[s]||[];for(const{id:s}of e)t.add(s)}for(const e of Object.values(this._fieldObjects))for(const s of e)t.has(s.id)===n&&r.push(s)}else for(const t of Object.values(this._fieldObjects))r.push(...t);const o=this.annotationStorage,l=[];for(const t of r){const{id:e}=t;switch(l.push(e),t.type){case"text":{const s=t.defaultValue||"";o.setValue(e,{value:s});break}case"checkbox":case"radiobutton":{const s=t.defaultValue===t.exportValues;o.setValue(e,{value:s});break}case"combobox":case"listbox":{const s=t.defaultValue||"";o.setValue(e,{value:s});break}default:continue}const s=document.querySelector('[data-element-id="'.concat(e,'"]'));s&&(c.has(s)?s.dispatchEvent(new Event("resetform")):(0,i.warn)("_bindResetFormAction - element not allowed: ".concat(e)))}var d;return this.enableScripting&&(null===(d=this.linkService.eventBus)||void 0===d||d.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}})),!1}}}function v(){this.container.setAttribute("data-internal-link","")}function m(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),_classPrivateMethodGet(this,p,v).call(this)}class _ extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str)})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.append(e),this.container}}class b extends u{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&("CANVAS"===(null===(t=e.previousSibling)||void 0===t?void 0:t.nodeName)&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){const{isWin:t,isMac:s}=i.FeatureTest.platform;return t&&e.ctrlKey||s&&e.metaKey}_setEventListener(e,t,s,i){t.includes("mouse")?e.addEventListener(t,(e=>{var t;null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:s,value:i(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(t,(e=>{var t;null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:s,value:i(e)}})}))}_setEventListeners(e,t,s){for(const[a,n]of t){var i;("Action"===n||null!==(i=this.data.actions)&&void 0!==i&&i[n])&&this._setEventListener(e,a,n,s)}}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":i.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:s}=this.data.defaultAppearanceData,a=this.data.defaultAppearanceData.fontSize||9,n=e.style;let r;const o=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(i.LINE_FACTOR*a))||1);r=Math.min(a,o(t/i.LINE_FACTOR))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);r=Math.min(a,o(e/i.LINE_FACTOR))}n.fontSize="calc(".concat(r,"px * var(--scale-factor))"),n.color=i.Util.makeHexColor(s[0],s[1],s[2]),null!==this.data.textAlignment&&(n.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class y extends b{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,s,i){const a=this.annotationStorage;for(const n of this._getElementsByName(e.name,e.id))n.domElement&&(n.domElement[t]=s),a.setValue(n.id,{[i]:s})}render(){const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const a=e.getValue(t,{value:this.data.fieldValue});let n=a.formattedValue||a.value||"";const r=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;r&&n.length>r&&(n=n.slice(0,r));const o={userValue:n,formattedValue:null,lastCommittedValue:null,commitKey:1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=n,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type="text",s.setAttribute("value",n),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),c.add(s),s.setAttribute("data-element-id",t),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=l,this._setRequired(s,this.data.required),r&&(s.maxLength=r),s.addEventListener("input",(i=>{e.setValue(t,{value:i.target.value}),this.setPropertyOnSiblings(s,"value",i.target.value,"value")})),s.addEventListener("resetform",(e=>{var t;const i=null!==(t=this.data.defaultFieldValue)&&void 0!==t?t:"";s.value=o.userValue=i,o.formattedValue=null}));let d=e=>{const{formattedValue:t}=o;null!==t&&void 0!==t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var i;s.addEventListener("focus",(e=>{const{target:t}=e;o.userValue&&(t.value=o.userValue),o.lastCommittedValue=t.value,o.commitKey=1})),s.addEventListener("updatefromsandbox",(s=>{this.showElementAndHideCanvas(s.target);const i={value(s){var i;o.userValue=null!==(i=s.detail.value)&&void 0!==i?i:"",e.setValue(t,{value:o.userValue.toString()}),s.target.value=o.userValue},formattedValue(s){const{formattedValue:i}=s.detail;o.formattedValue=i,null!==i&&void 0!==i&&s.target!==document.activeElement&&(s.target.value=i),e.setValue(t,{formattedValue:i})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:s=>{var i;const{charLimit:a}=s.detail,{target:n}=s;if(0===a)return void n.removeAttribute("maxLength");n.setAttribute("maxLength",a);let r=o.userValue;!r||r.length<=a||(r=r.slice(0,a),n.value=o.userValue=r,e.setValue(t,{value:r}),null===(i=this.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:1,selStart:n.selectionStart,selEnd:n.selectionEnd}}))}};this._dispatchEventFromSandbox(i,s)})),s.addEventListener("keydown",(e=>{var s;o.commitKey=1;let i=-1;if("Escape"===e.key?i=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(o.commitKey=3):i=2,-1===i)return;const{value:a}=e.target;o.lastCommittedValue!==a&&(o.lastCommittedValue=a,o.userValue=a,null===(s=this.linkService.eventBus)||void 0===s||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:a,willCommit:!0,commitKey:i,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const a=d;d=null,s.addEventListener("blur",(e=>{if(!e.relatedTarget)return;const{value:s}=e.target;var i;o.userValue=s,o.lastCommittedValue!==s&&(null===(i=this.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:s,willCommit:!0,commitKey:o.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})),a(e)})),null!==(i=this.data.actions)&&void 0!==i&&i.Keystroke&&s.addEventListener("beforeinput",(e=>{var s;o.lastCommittedValue=null;const{data:i,target:a}=e,{value:n,selectionStart:r,selectionEnd:l}=a;let c=r,d=l;switch(e.inputType){case"deleteWordBackward":{const e=n.substring(0,r).match(/\w*[^\w]*$/);e&&(c-=e[0].length);break}case"deleteWordForward":{const e=n.substring(r).match(/^[^\w]*\w*/);e&&(d+=e[0].length);break}case"deleteContentBackward":r===l&&(c-=1);break;case"deleteContentForward":r===l&&(d+=1)}e.preventDefault(),null===(s=this.linkService.eventBus)||void 0===s||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,change:i||"",willCommit:!1,selStart:c,selEnd:d}})})),this._setEventListeners(s,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(d&&s.addEventListener("blur",d),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/r;s.classList.add("comb"),s.style.letterSpacing="calc(".concat(e,"px * var(--scale-factor) - 1ch)")}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell";return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class P extends b{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,s=t.id;let i=e.getValue(s,{value:t.exportValue===t.fieldValue}).value;"string"===typeof i&&(i="Off"!==i,e.setValue(s,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const a=document.createElement("input");return c.add(a),a.setAttribute("data-element-id",s),a.disabled=t.readOnly,this._setRequired(a,this.data.required),a.type="checkbox",a.name=t.fieldName,i&&a.setAttribute("checked",!0),a.setAttribute("exportValue",t.exportValue),a.tabIndex=l,a.addEventListener("change",(i=>{const{name:a,checked:n}=i.target;for(const r of this._getElementsByName(a,s)){const s=n&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=s),e.setValue(r.id,{value:s})}e.setValue(s,{value:n})})),a.addEventListener("resetform",(e=>{const s=t.defaultFieldValue||"Off";e.target.checked=s===t.exportValue})),this.enableScripting&&this.hasJSActions&&(a.addEventListener("updatefromsandbox",(t=>{const i={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(s,{value:t.target.checked})}};this._dispatchEventFromSandbox(i,t)})),this._setEventListeners(a,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class A extends b{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,s=t.id;let i=e.getValue(s,{value:t.fieldValue===t.buttonValue}).value;"string"===typeof i&&(i=i!==t.buttonValue,e.setValue(s,{value:i}));const a=document.createElement("input");if(c.add(a),a.setAttribute("data-element-id",s),a.disabled=t.readOnly,this._setRequired(a,this.data.required),a.type="radio",a.name=t.fieldName,i&&a.setAttribute("checked",!0),a.tabIndex=l,a.addEventListener("change",(t=>{const{name:i,checked:a}=t.target;for(const n of this._getElementsByName(i,s))e.setValue(n.id,{value:!1});e.setValue(s,{value:a})})),a.addEventListener("resetform",(e=>{const s=t.defaultFieldValue;e.target.checked=null!==s&&void 0!==s&&s===t.buttonValue})),this.enableScripting&&this.hasJSActions){const i=t.buttonValue;a.addEventListener("updatefromsandbox",(t=>{const a={value:t=>{const a=i===t.detail.value;for(const i of this._getElementsByName(t.target.name)){const t=a&&i.id===s;i.domElement&&(i.domElement.checked=t),e.setValue(i.id,{value:t})}}};this._dispatchEventFromSandbox(a,t)})),this._setEventListeners(a,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class S extends g{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(e.title=this.data.alternativeText);const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class F extends b{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,s=e.getValue(t,{value:this.data.fieldValue}),i=document.createElement("select");c.add(i),i.setAttribute("data-element-id",t),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=l;let a=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const s of i.options)s.selected=s.value===t}));for(const l of this.data.options){const e=document.createElement("option");e.textContent=l.displayValue,e.value=l.exportValue,s.value.includes(l.exportValue)&&(e.setAttribute("selected",!0),a=!1),i.append(e)}let n=null;if(a){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),i.prepend(e),n=()=>{e.remove(),i.removeEventListener("input",n),n=null},i.addEventListener("input",n)}const r=e=>{const t=e?"value":"textContent",{options:s,multiple:a}=i;return a?Array.prototype.filter.call(s,(e=>e.selected)).map((e=>e[t])):-1===s.selectedIndex?null:s[s.selectedIndex][t]};let o=r(!1);const d=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",(s=>{const a={value(s){var a;null===(a=n)||void 0===a||a();const l=s.detail.value,c=new Set(Array.isArray(l)?l:[l]);for(const e of i.options)e.selected=c.has(e.value);e.setValue(t,{value:r(!0)}),o=r(!1)},multipleSelection(e){i.multiple=!0},remove(s){const a=i.options,n=s.detail.remove;a[n].selected=!1,i.remove(n),a.length>0&&-1===Array.prototype.findIndex.call(a,(e=>e.selected))&&(a[0].selected=!0),e.setValue(t,{value:r(!0),items:d(s)}),o=r(!1)},clear(s){for(;0!==i.length;)i.remove(0);e.setValue(t,{value:null,items:[]}),o=r(!1)},insert(s){const{index:a,displayValue:n,exportValue:l}=s.detail.insert,c=i.children[a],h=document.createElement("option");h.textContent=n,h.value=l,c?c.before(h):i.append(h),e.setValue(t,{value:r(!0),items:d(s)}),o=r(!1)},items(s){const{items:a}=s.detail;for(;0!==i.length;)i.remove(0);for(const e of a){const{displayValue:t,exportValue:s}=e,a=document.createElement("option");a.textContent=t,a.value=s,i.append(a)}i.options.length>0&&(i.options[0].selected=!0),e.setValue(t,{value:r(!0),items:d(s)}),o=r(!1)},indices(s){const i=new Set(s.detail.indices);for(const e of s.target.options)e.selected=i.has(e.index);e.setValue(t,{value:r(!0)}),o=r(!1)},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(a,s)})),i.addEventListener("input",(s=>{var i;const a=r(!0);e.setValue(t,{value:a}),s.preventDefault(),null===(i=this.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,changeEx:a,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(i,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):i.addEventListener("input",(function(s){e.setValue(t,{value:r(!0)})})),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class w extends u{constructor(e){var t,s,i;const{data:a}=e;super(e,{isRenderable:!w.IGNORE_TYPES.has(a.parentType)&&!!(null!==(t=a.titleObj)&&void 0!==t&&t.str||null!==(s=a.contentsObj)&&void 0!==s&&s.str||null!==(i=a.richText)&&void 0!==i&&i.str)})}render(){this.container.classList.add("popupAnnotation");const e=this.layer.querySelectorAll('[data-annotation-id="'.concat(this.data.parentId,'"]'));if(0===e.length)return this.container;const t=new x({container:this.container,trigger:Array.from(e),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),s=this.page,a=i.Util.normalizeRect([this.data.parentRect[0],s.view[3]-this.data.parentRect[1]+s.view[1],this.data.parentRect[2],s.view[3]-this.data.parentRect[3]+s.view[1]]),n=a[0]+this.data.parentRect[2]-this.data.parentRect[0],r=a[1],{pageWidth:o,pageHeight:l,pageX:c,pageY:d}=this.viewport.rawDims;return this.container.style.left="".concat(100*(n-c)/o,"%"),this.container.style.top="".concat(100*(r-d)/l,"%"),this.container.append(t.render()),this.container}}_defineProperty(w,"IGNORE_TYPES",new Set(["Line","Square","Circle","PolyLine","Polygon","Ink"]));class x{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.titleObj=e.titleObj,this.modificationDate=e.modificationDate,this.contentsObj=e.contentsObj,this.richText=e.richText,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){var e,t;const s=document.createElement("div");s.classList.add("popupWrapper"),this.hideElement=this.hideWrapper?s:this.container,this.hideElement.hidden=!0;const n=document.createElement("div");n.classList.add("popup");const r=this.color;if(r){const e=.7*(255-r[0])+r[0],t=.7*(255-r[1])+r[1],s=.7*(255-r[2])+r[2];n.style.backgroundColor=i.Util.makeHexColor(0|e,0|t,0|s)}const l=document.createElement("h1");l.dir=this.titleObj.dir,l.textContent=this.titleObj.str,n.append(l);const c=a.PDFDateString.toDateObject(this.modificationDate);if(c){const e=document.createElement("span");e.classList.add("popupDate"),e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:c.toLocaleDateString(),time:c.toLocaleTimeString()}),n.append(e)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){const e=this._formatContents(this.contentsObj);n.append(e)}else o.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:n}),n.lastChild.classList.add("richText","popupContent");Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const i of this.trigger)i.addEventListener("click",this._toggle.bind(this)),i.addEventListener("mouseover",this._show.bind(this,!1)),i.addEventListener("mouseout",this._hide.bind(this,!1));return n.addEventListener("click",this._hide.bind(this,!0)),s.append(n),s}_formatContents(e){let{str:t,dir:s}=e;const i=document.createElement("p");i.classList.add("popupContent"),i.dir=s;const a=t.split(/(?:\r\n?|\n)/);for(let n=0,r=a.length;n<r;++n){const e=a[n];i.append(document.createTextNode(e)),n<r-1&&i.append(document.createElement("br"))}return i}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class E extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0}),this.textContent=e.data.textContent}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const s=document.createElement("span");s.textContent=t,e.append(s)}this.container.append(e)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class C extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const e=this.data,{width:t,height:s}=d(e.rect),i=this.svgFactory.create(t,s,!0),a=this.svgFactory.createElement("svg:line");return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),i.append(a),this.container.append(i),this._createPopup(a,e),this.container}}class M extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const e=this.data,{width:t,height:s}=d(e.rect),i=this.svgFactory.create(t,s,!0),a=e.borderStyle.width,n=this.svgFactory.createElement("svg:rect");return n.setAttribute("x",a/2),n.setAttribute("y",a/2),n.setAttribute("width",t-a),n.setAttribute("height",s-a),n.setAttribute("stroke-width",a||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),i.append(n),this.container.append(i),this._createPopup(n,e),this.container}}class k extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const e=this.data,{width:t,height:s}=d(e.rect),i=this.svgFactory.create(t,s,!0),a=e.borderStyle.width,n=this.svgFactory.createElement("svg:ellipse");return n.setAttribute("cx",t/2),n.setAttribute("cy",s/2),n.setAttribute("rx",t/2-a/2),n.setAttribute("ry",s/2-a/2),n.setAttribute("stroke-width",a||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),i.append(n),this.container.append(i),this._createPopup(n,e),this.container}}class T extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:t,height:s}=d(e.rect),i=this.svgFactory.create(t,s,!0);let a=[];for(const r of e.vertices){const t=r.x-e.rect[0],s=e.rect[3]-r.y;a.push(t+","+s)}a=a.join(" ");const n=this.svgFactory.createElement(this.svgElementName);return n.setAttribute("points",a),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),i.append(n),this.container.append(i),this._createPopup(n,e),this.container}}class R extends T{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class I extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class D extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:t,height:s}=d(e.rect),i=this.svgFactory.create(t,s,!0);for(const a of e.inkLists){let t=[];for(const i of a){const s=i.x-e.rect[0],a=e.rect[3]-i.y;t.push("".concat(s,",").concat(a))}t=t.join(" ");const s=this.svgFactory.createElement(this.svgElementName);s.setAttribute("points",t),s.setAttribute("stroke-width",e.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),this._createPopup(s,e),i.append(s)}return this.container.append(i),this.container}}class O extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.classList.add("highlightAnnotation"),this.container)}}class G extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.classList.add("underlineAnnotation"),this.container)}}class L extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.classList.add("squigglyAnnotation"),this.container)}}class N extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.classList.add("strikeoutAnnotation"),this.container)}}class j extends u{constructor(e){var t,s,i;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(s=e.data.contentsObj)&&void 0!==s&&s.str||null!==(i=e.data.richText)&&void 0!==i&&i.str),ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class W extends u{constructor(e){var t;super(e,{isRenderable:!0});const{filename:s,content:i}=this.data.file;this.filename=(0,a.getFilenameFromUrl)(s,!0),this.content=i,null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("fileattachmentannotation",{source:this,filename:s,content:i})}render(){var e,t;let s;return this.container.classList.add("fileAttachmentAnnotation"),this.data.hasAppearance?s=document.createElement("div"):(s=document.createElement("img"),s.src="".concat(this.imageResourcesPath,"annotation-").concat(/paperclip/i.test(this.data.name)?"paperclip":"pushpin",".svg")),s.classList.add("popupTriggerArea"),s.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(s,this.data),this.container.append(s),this.container}_download(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}class B{static render(e){const{annotations:t,div:s,viewport:r,accessibilityManager:o}=e;(0,a.setLayerDimensions)(s,r);const l={data:null,layer:s,page:e.page,viewport:r,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new a.DOMSVGFactory,annotationStorage:e.annotationStorage||new n.AnnotationStorage,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects};let c=0;for(const a of t){if(a.noHTML)continue;if(a.annotationType!==i.AnnotationType.POPUP){const{width:e,height:t}=d(a.rect);if(e<=0||t<=0)continue}l.data=a;const e=h.create(l);if(!e.isRenderable)continue;const t=e.render();if(a.hidden&&(t.style.visibility="hidden"),Array.isArray(t))for(const i of t)i.style.zIndex=c++,_classStaticPrivateMethodGet(B,B,U).call(B,i,a.id,s,o);else t.style.zIndex=c++,e instanceof w?s.prepend(t):_classStaticPrivateMethodGet(B,B,U).call(B,t,a.id,s,o)}_classStaticPrivateMethodGet(this,B,q).call(this,s,e.annotationCanvasMap)}static update(e){const{annotationCanvasMap:t,div:s,viewport:i}=e;(0,a.setLayerDimensions)(s,{rotation:i.rotation}),_classStaticPrivateMethodGet(this,B,q).call(this,s,t),s.hidden=!1}}function U(e,t,s,i){const n=e.firstChild||e;n.id="".concat(a.AnnotationPrefix).concat(t),s.append(e),null===i||void 0===i||i.moveElementInDOM(s,e,n,!1)}function q(e,t){if(t){for(const[s,i]of t){const t=e.querySelector('[data-annotation-id="'.concat(s,'"]'));if(!t)continue;const{firstChild:a}=t;a?"CANVAS"===a.nodeName?a.replaceWith(i):a.before(i):t.append(i)}t.clear()}}t.AnnotationLayer=B},(e,t)=>{function s(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G(e){let[t,s,i,a]=e;return["G",1-Math.min(1,.3*t+.59*i+.11*s+a)]}static G_CMYK(e){let[t]=e;return["CMYK",0,0,0,1-t]}static G_RGB(e){let[t]=e;return["RGB",t,t,t]}static G_HTML(e){let[t]=e;const i=s(t);return"#".concat(i).concat(i).concat(i)}static RGB_G(e){let[t,s,i]=e;return["G",.3*t+.59*s+.11*i]}static RGB_HTML(e){let[t,i,a]=e;const n=s(t),r=s(i),o=s(a);return"#".concat(n).concat(r).concat(o)}static T_HTML(){return"#00000000"}static CMYK_RGB(e){let[t,s,i,a]=e;return["RGB",1-Math.min(1,t+a),1-Math.min(1,i+a),1-Math.min(1,s+a)]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK(e){let[t,s,i]=e;const a=1-t,n=1-s,r=1-i;return["CMYK",a,n,r,Math.min(a,n,r)]}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var i=s(19);t.XfaLayer=class{static setupStorage(e,t,s,i,a){const n=i.getValue(t,{value:null});switch(s.name){case"textarea":if(null!==n.value&&(e.textContent=n.value),"print"===a)break;e.addEventListener("input",(e=>{i.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===s.attributes.type||"checkbox"===s.attributes.type){if(n.value===s.attributes.xfaOn?e.setAttribute("checked",!0):n.value===s.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(e=>{i.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==n.value&&e.setAttribute("value",n.value),"print"===a)break;e.addEventListener("input",(e=>{i.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==n.value)for(const e of s.children)e.attributes.value===n.value&&(e.attributes.selected=!0);e.addEventListener("input",(e=>{const s=e.target.options,a=-1===s.selectedIndex?"":s[s.selectedIndex].value;i.setValue(t,{value:a})}))}}static setAttributes(e){let{html:t,element:s,storage:i=null,intent:a,linkService:n}=e;const{attributes:r}=s,o=t instanceof HTMLAnchorElement;"radio"===r.type&&(r.name="".concat(r.name,"-").concat(a));for(const[l,c]of Object.entries(r))if(null!==c&&void 0!==c)switch(l){case"class":c.length&&t.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",c);break;case"style":Object.assign(t.style,c);break;case"textContent":t.textContent=c;break;default:(!o||"href"!==l&&"newWindow"!==l)&&t.setAttribute(l,c)}o&&n.addLinkAttributes(t,r.href,r.newWindow),i&&r.dataId&&this.setupStorage(t,r.dataId,s,i)}static render(e){const t=e.annotationStorage,s=e.linkService,a=e.xfaHtml,n=e.intent||"display",r=document.createElement(a.name);a.attributes&&this.setAttributes({html:r,element:a,intent:n,linkService:s});const o=[[a,-1,r]],l=e.div;if(l.append(r),e.viewport){const t="matrix(".concat(e.viewport.transform.join(","),")");l.style.transform=t}"richText"!==n&&l.setAttribute("class","xfaLayer xfaFont");const c=[];for(;o.length>0;){var d;const[e,a,r]=o.at(-1);if(a+1===e.children.length){o.pop();continue}const l=e.children[++o.at(-1)[1]];if(null===l)continue;const{name:h}=l;if("#text"===h){const e=document.createTextNode(l.value);c.push(e),r.append(e);continue}let u;if(u=null!==l&&void 0!==l&&null!==(d=l.attributes)&&void 0!==d&&d.xmlns?document.createElementNS(l.attributes.xmlns,h):document.createElement(h),r.append(u),l.attributes&&this.setAttributes({html:u,element:l,storage:t,intent:n,linkService:s}),l.children&&l.children.length>0)o.push([l,-1,u]);else if(l.value){const e=document.createTextNode(l.value);i.XfaText.shouldBuildText(h)&&c.push(e),u.append(e)}}for(const i of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))i.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){const t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}},(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var i=s(6),a=s(1),n=s(10);let r=class{constructor(){(0,a.unreachable)("Not implemented: SVGGraphics")}};t.SVGGraphics=r;{const o={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},l="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",d=["butt","round","square"],h=["miter","round","bevel"],u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!==typeof Blob&&!s)return URL.createObjectURL(new Blob([e],{type:t}));const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let a="data:".concat(t,";base64,");for(let n=0,r=e.length;n<r;n+=3){const t=255&e[n],s=255&e[n+1],o=255&e[n+2];a+=i[t>>2]+i[(3&t)<<4|s>>4]+i[n+1<r?(15&s)<<2|o>>6:64]+i[n+2<r?63&o:64]}return a},p=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256);for(let a=0;a<256;a++){let e=a;for(let t=0;t<8;t++)e=1&e?3988292384^e>>1&2147483647:e>>1&2147483647;t[a]=e}function s(e,s,i,a){let n=a;const r=s.length;i[n]=r>>24&255,i[n+1]=r>>16&255,i[n+2]=r>>8&255,i[n+3]=255&r,n+=4,i[n]=255&e.charCodeAt(0),i[n+1]=255&e.charCodeAt(1),i[n+2]=255&e.charCodeAt(2),i[n+3]=255&e.charCodeAt(3),n+=4,i.set(s,n),n+=s.length;const o=function(e,s,i){let a=-1;for(let n=s;n<i;n++){const s=255&(a^e[n]);a=a>>>8^t[s]}return-1^a}(i,a+4,n);i[n]=o>>24&255,i[n+1]=o>>16&255,i[n+2]=o>>8&255,i[n+3]=255&o}function i(e){let t=e.length;const s=65535,i=Math.ceil(t/s),a=new Uint8Array(2+t+5*i+4);let n=0;a[n++]=120,a[n++]=156;let r=0;for(;t>s;)a[n++]=0,a[n++]=255,a[n++]=255,a[n++]=0,a[n++]=0,a.set(e.subarray(r,r+s),n),n+=s,r+=s,t-=s;a[n++]=1,a[n++]=255&t,a[n++]=t>>8&255,a[n++]=255&~t,a[n++]=(65535&~t)>>8&255,a.set(e.subarray(r),n),n+=e.length-r;const o=function(e,t,s){let i=1,a=0;for(let n=t;n<s;++n)i=(i+(255&e[n]))%65521,a=(a+i)%65521;return a<<16|i}(e,0,e.length);return a[n++]=o>>24&255,a[n++]=o>>16&255,a[n++]=o>>8&255,a[n++]=255&o,a}function r(t,r,o,l){const c=t.width,d=t.height;let h,p,f;const g=t.data;switch(r){case a.ImageKind.GRAYSCALE_1BPP:p=0,h=1,f=c+7>>3;break;case a.ImageKind.RGB_24BPP:p=2,h=8,f=3*c;break;case a.ImageKind.RGBA_32BPP:p=6,h=8,f=4*c;break;default:throw new Error("invalid format")}const v=new Uint8Array((1+f)*d);let m=0,_=0;for(let e=0;e<d;++e)v[m++]=0,v.set(g.subarray(_,_+f),m),_+=f,m+=f;if(r===a.ImageKind.GRAYSCALE_1BPP&&l){m=0;for(let e=0;e<d;e++){m++;for(let e=0;e<f;e++)v[m++]^=255}}const b=new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,d>>24&255,d>>16&255,d>>8&255,255&d,h,p,0,0,0]),y=function(e){if(!n.isNodeJS)return i(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);const s=__webpack_require__(82787).deflateSync(t,{level:9});return s instanceof Uint8Array?s:new Uint8Array(s)}catch(t){(0,a.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return i(e)}(v),P=e.length+36+b.length+y.length,A=new Uint8Array(P);let S=0;return A.set(e,S),S+=e.length,s("IHDR",b,A,S),S+=12+b.length,s("IDATA",y,A,S),S+=12+y.length,s("IEND",new Uint8Array(0),A,S),u(A,"image/png",o)}return function(e,t,s){return r(e,void 0===e.kind?a.ImageKind.GRAYSCALE_1BPP:e.kind,t,s)}}();class f{constructor(){this.fontSizeScale=1,this.fontWeight=o.fontWeight,this.fontSize=0,this.textMatrix=a.IDENTITY_MATRIX,this.fontMatrix=a.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=a.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=o.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function g(e){let t=[];const s=[];for(const i of e)"save"!==i.fn?"restore"===i.fn?t=s.pop():t.push(i):(t.push({fnId:92,fn:"group",items:[]}),s.push(t),t=t.at(-1).items);return t}function v(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let s=t.length-1;if("0"!==t[s])return t;do{s--}while("0"===t[s]);return t.substring(0,"."===t[s]?s:s+1)}function m(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(v(e[0])," ").concat(v(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){const t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(v(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(v(e[4])," ").concat(v(e[5]),")");return"matrix(".concat(v(e[0])," ").concat(v(e[1])," ").concat(v(e[2])," ").concat(v(e[3])," ").concat(v(e[4])," ")+"".concat(v(e[5]),")")}let _=0,b=0,y=0;t.SVGGraphics=r=class{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,i.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new i.DOMSVGFactory,this.current=new f,this.transformMatrix=a.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!s,this._operatorIdMapping=[];for(const i in a.OPS)this._operatorIdMapping[a.OPS[i]]=i}getObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,s=e.argsArray;for(let i=0,n=t.length;i<n;i++)if(t[i]===a.OPS.dependency)for(const e of s[i]){const t=e.startsWith("g_")?this.commonObjs:this.objs,s=new Promise((s=>{t.get(e,s)}));this.current.dependencies.push(s)}return Promise.all(this.current.dependencies)}transform(e,t,s,i,n,r){const o=[e,t,s,i,n,r];this.transformMatrix=a.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(e,t){this.viewport=t;const s=this._initialize(t);return this.loadDependencies(e).then((()=>(this.transformMatrix=a.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),s)))}convertOpList(e){const t=this._operatorIdMapping,s=e.argsArray,i=e.fnArray,a=[];for(let n=0,r=i.length;n<r;n++){const e=i[n];a.push({fnId:e,fn:t[e],args:s[n]})}return g(a)}executeOpTree(e){for(const t of e){const e=t.fn,s=t.fnId,i=t.args;switch(0|s){case a.OPS.beginText:this.beginText();break;case a.OPS.dependency:break;case a.OPS.setLeading:this.setLeading(i);break;case a.OPS.setLeadingMoveText:this.setLeadingMoveText(i[0],i[1]);break;case a.OPS.setFont:this.setFont(i);break;case a.OPS.showText:case a.OPS.showSpacedText:this.showText(i[0]);break;case a.OPS.endText:this.endText();break;case a.OPS.moveText:this.moveText(i[0],i[1]);break;case a.OPS.setCharSpacing:this.setCharSpacing(i[0]);break;case a.OPS.setWordSpacing:this.setWordSpacing(i[0]);break;case a.OPS.setHScale:this.setHScale(i[0]);break;case a.OPS.setTextMatrix:this.setTextMatrix(i[0],i[1],i[2],i[3],i[4],i[5]);break;case a.OPS.setTextRise:this.setTextRise(i[0]);break;case a.OPS.setTextRenderingMode:this.setTextRenderingMode(i[0]);break;case a.OPS.setLineWidth:this.setLineWidth(i[0]);break;case a.OPS.setLineJoin:this.setLineJoin(i[0]);break;case a.OPS.setLineCap:this.setLineCap(i[0]);break;case a.OPS.setMiterLimit:this.setMiterLimit(i[0]);break;case a.OPS.setFillRGBColor:this.setFillRGBColor(i[0],i[1],i[2]);break;case a.OPS.setStrokeRGBColor:this.setStrokeRGBColor(i[0],i[1],i[2]);break;case a.OPS.setStrokeColorN:this.setStrokeColorN(i);break;case a.OPS.setFillColorN:this.setFillColorN(i);break;case a.OPS.shadingFill:this.shadingFill(i[0]);break;case a.OPS.setDash:this.setDash(i[0],i[1]);break;case a.OPS.setRenderingIntent:this.setRenderingIntent(i[0]);break;case a.OPS.setFlatness:this.setFlatness(i[0]);break;case a.OPS.setGState:this.setGState(i[0]);break;case a.OPS.fill:this.fill();break;case a.OPS.eoFill:this.eoFill();break;case a.OPS.stroke:this.stroke();break;case a.OPS.fillStroke:this.fillStroke();break;case a.OPS.eoFillStroke:this.eoFillStroke();break;case a.OPS.clip:this.clip("nonzero");break;case a.OPS.eoClip:this.clip("evenodd");break;case a.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case a.OPS.paintImageXObject:this.paintImageXObject(i[0]);break;case a.OPS.paintInlineImageXObject:this.paintInlineImageXObject(i[0]);break;case a.OPS.paintImageMaskXObject:this.paintImageMaskXObject(i[0]);break;case a.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(i[0],i[1]);break;case a.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case a.OPS.closePath:this.closePath();break;case a.OPS.closeStroke:this.closeStroke();break;case a.OPS.closeFillStroke:this.closeFillStroke();break;case a.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case a.OPS.nextLine:this.nextLine();break;case a.OPS.transform:this.transform(i[0],i[1],i[2],i[3],i[4],i[5]);break;case a.OPS.constructPath:this.constructPath(i[0],i[1]);break;case a.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,a.warn)("Unimplemented operator ".concat(e))}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,s,i,a,n){const r=this.current;r.textMatrix=r.lineMatrix=[e,t,s,i,a,n],r.textMatrixScale=Math.hypot(e,t),r.x=r.lineX=0,r.y=r.lineY=0,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(v(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",v(-r.y)),r.txtElement=this.svgFactory.createElement("svg:text"),r.txtElement.append(r.tspan)}beginText(){const e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=a.IDENTITY_MATRIX,e.lineMatrix=a.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){const s=this.current;s.x=s.lineX+=e,s.y=s.lineY+=t,s.xcoords=[],s.ycoords=[],s.tspan=this.svgFactory.createElement("svg:tspan"),s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size","".concat(v(s.fontSize),"px")),s.tspan.setAttributeNS(null,"y",v(-s.y))}showText(e){const t=this.current,s=t.font,i=t.fontSize;if(0===i)return;const n=t.fontSizeScale,r=t.charSpacing,c=t.wordSpacing,d=t.fontDirection,h=t.textHScale*d,u=s.vertical,p=u?1:-1,f=s.defaultVMetrics,g=i*t.fontMatrix[0];let _=0;for(const a of e){if(null===a){_+=d*c;continue}if("number"===typeof a){_+=p*a*i/1e3;continue}const e=(a.isSpace?c:0)+r,o=a.fontChar;let l,h,v,m=a.width;if(u){let e;const t=a.vmetric||f;e=a.vmetric?t[1]:.5*m,e=-e*g;const s=t[2]*g;m=t?-t[0]:m,l=e/n,h=(_+s)/n}else l=_/n,h=0;(a.isInFont||s.missingFile)&&(t.xcoords.push(t.x+l),u&&t.ycoords.push(-t.y+h),t.tspan.textContent+=o),v=u?m*g-e*d:m*g+e*d,_+=v}t.tspan.setAttributeNS(null,"x",t.xcoords.map(v).join(" ")),u?t.tspan.setAttributeNS(null,"y",t.ycoords.map(v).join(" ")):t.tspan.setAttributeNS(null,"y",v(-t.y)),u?t.y-=_:t.x+=_*h,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(v(t.fontSize),"px")),t.fontStyle!==o.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==o.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);const b=t.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;if(b===a.TextRenderingMode.FILL||b===a.TextRenderingMode.FILL_STROKE?(t.fillColor!==o.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===a.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),b===a.TextRenderingMode.STROKE||b===a.TextRenderingMode.FILL_STROKE){const e=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,e)}let y=t.textMatrix;0!==t.textRise&&(y=y.slice(),y[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(m(y)," scale(").concat(v(h),", -1)")),t.txtElement.setAttributeNS(l,"xml:space","preserve"),t.txtElement.append(t.tspan),t.txtgrp.append(t.txtElement),this._ensureTransformGroup().append(t.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const t=u(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}setFont(e){const t=this.current,s=this.commonObjs.get(e[0]);let i=e[1];t.font=s,!this.embedFonts||s.missingFile||this.embeddedFonts[s.loadedName]||(this.addFontStyle(s),this.embeddedFonts[s.loadedName]=s),t.fontMatrix=s.fontMatrix||a.FONT_IDENTITY_MATRIX;let n="normal";s.black?n="900":s.bold&&(n="bold");const r=s.italic?"italic":"normal";i<0?(i=-i,t.fontDirection=-1):t.fontDirection=1,t.fontSize=i,t.fontFamily=s.loadedName,t.fontWeight=n,t.fontStyle=r,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",v(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){var e;const t=this.current;t.textRenderingMode&a.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=d[e]}setLineJoin(e){this.current.lineJoin=h[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,s){this.current.strokeColor=a.Util.makeHexColor(e,t,s)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,s){this.current.fillColor=a.Util.makeHexColor(e,t,s),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,s=this.viewport.height,i=a.Util.inverseTransform(this.transformMatrix),n=a.Util.applyTransform([0,0],i),r=a.Util.applyTransform([0,s],i),o=a.Util.applyTransform([t,0],i),l=a.Util.applyTransform([t,s],i),c=Math.min(n[0],r[0],o[0],l[0]),d=Math.min(n[1],r[1],o[1],l[1]),h=Math.max(n[0],r[0],o[0],l[0]),u=Math.max(n[1],r[1],o[1],l[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",c),p.setAttributeNS(null,"y",d),p.setAttributeNS(null,"width",h-c),p.setAttributeNS(null,"height",u-d),p.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(p)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],s=e[2],i=e[3]||a.IDENTITY_MATRIX,[n,r,o,l]=e[4],c=e[5],d=e[6],h=e[7],u="shading".concat(y++),[p,f,g,v]=a.Util.normalizeRect([...a.Util.applyTransform([n,r],i),...a.Util.applyTransform([o,l],i)]),[m,_]=a.Util.singularValueDecompose2dScale(i),b=c*m,P=d*_,A=this.svgFactory.createElement("svg:pattern");A.setAttributeNS(null,"id",u),A.setAttributeNS(null,"patternUnits","userSpaceOnUse"),A.setAttributeNS(null,"width",b),A.setAttributeNS(null,"height",P),A.setAttributeNS(null,"x","".concat(p)),A.setAttributeNS(null,"y","".concat(f));const S=this.svg,F=this.transformMatrix,w=this.current.fillColor,x=this.current.strokeColor,E=this.svgFactory.create(g-p,v-f);if(this.svg=E,this.transformMatrix=i,2===h){const e=a.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(s)),this.svg=S,this.transformMatrix=F,this.current.fillColor=w,this.current.strokeColor=x,A.append(E.childNodes[0]),this.defs.append(A),"url(#".concat(u,")")}_makeShadingPattern(e){switch("string"===typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading".concat(y++),s=e[3];let i;switch(e[1]){case"axial":const s=e[4],a=e[5];i=this.svgFactory.createElement("svg:linearGradient"),i.setAttributeNS(null,"id",t),i.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i.setAttributeNS(null,"x1",s[0]),i.setAttributeNS(null,"y1",s[1]),i.setAttributeNS(null,"x2",a[0]),i.setAttributeNS(null,"y2",a[1]);break;case"radial":const n=e[4],r=e[5],o=e[6],l=e[7];i=this.svgFactory.createElement("svg:radialGradient"),i.setAttributeNS(null,"id",t),i.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i.setAttributeNS(null,"cx",r[0]),i.setAttributeNS(null,"cy",r[1]),i.setAttributeNS(null,"r",l),i.setAttributeNS(null,"fx",n[0]),i.setAttributeNS(null,"fy",n[1]),i.setAttributeNS(null,"fr",o);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}for(const e of s){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),i.append(t)}return this.defs.append(i),"url(#".concat(t,")");case"Mesh":return(0,a.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const s=this.current;let i=s.x,n=s.y,r=[],o=0;for(const l of e)switch(0|l){case a.OPS.rectangle:i=t[o++],n=t[o++];const e=i+t[o++],s=n+t[o++];r.push("M",v(i),v(n),"L",v(e),v(n),"L",v(e),v(s),"L",v(i),v(s),"Z");break;case a.OPS.moveTo:i=t[o++],n=t[o++],r.push("M",v(i),v(n));break;case a.OPS.lineTo:i=t[o++],n=t[o++],r.push("L",v(i),v(n));break;case a.OPS.curveTo:i=t[o+4],n=t[o+5],r.push("C",v(t[o]),v(t[o+1]),v(t[o+2]),v(t[o+3]),v(i),v(n)),o+=6;break;case a.OPS.curveTo2:r.push("C",v(i),v(n),v(t[o]),v(t[o+1]),v(t[o+2]),v(t[o+3])),i=t[o+2],n=t[o+3],o+=4;break;case a.OPS.curveTo3:i=t[o+2],n=t[o+3],r.push("C",v(t[o]),v(t[o+1]),v(i),v(n),v(i),v(n)),o+=4;break;case a.OPS.closePath:r.push("Z")}r=r.join(" "),s.path&&e.length>0&&e[0]!==a.OPS.rectangle&&e[0]!==a.OPS.moveTo?r=s.path.getAttributeNS(null,"d")+r:(s.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(s.path)),s.path.setAttributeNS(null,"d",r),s.path.setAttributeNS(null,"fill","none"),s.element=s.path,s.setCurrentPoint(i,n)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath".concat(_++),s=this.svgFactory.createElement("svg:clipPath");s.setAttributeNS(null,"id",t),s.setAttributeNS(null,"transform",m(this.transformMatrix));const i=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?i.setAttributeNS(null,"clip-rule","evenodd"):i.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,s.append(i),this.defs.append(s),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;s.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,s]of e)switch(t){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s);break;case"CA":this.setStrokeAlpha(s);break;case"ca":this.setFillAlpha(s);break;default:(0,a.warn)("Unimplemented graphic state operator ".concat(t))}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const s=this.current;let i=s.dashArray;1!==t&&i.length>0&&(i=i.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",s.strokeColor),e.setAttributeNS(null,"stroke-opacity",s.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",v(s.miterLimit)),e.setAttributeNS(null,"stroke-linecap",s.lineCap),e.setAttributeNS(null,"stroke-linejoin",s.lineJoin),e.setAttributeNS(null,"stroke-width",v(t*s.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",i.map(v).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",v(t*s.dashPhase)+"px")}eoFill(){var e;null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var e;null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,a.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}paintInlineImageXObject(e,t){const s=e.width,i=e.height,a=p(e,this.forceDataSchema,!!t),n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x","0"),n.setAttributeNS(null,"y","0"),n.setAttributeNS(null,"width",v(s)),n.setAttributeNS(null,"height",v(i)),this.current.element=n,this.clip("nonzero");const r=this.svgFactory.createElement("svg:image");r.setAttributeNS(c,"xlink:href",a),r.setAttributeNS(null,"x","0"),r.setAttributeNS(null,"y",v(-i)),r.setAttributeNS(null,"width",v(s)+"px"),r.setAttributeNS(null,"height",v(i)+"px"),r.setAttributeNS(null,"transform","scale(".concat(v(1/s)," ").concat(v(-1/i),")")),t?t.append(r):this._ensureTransformGroup().append(r)}paintImageMaskXObject(e){const t=this.getObject(e.data,e);if(t.bitmap)return void(0,a.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");const s=this.current,i=t.width,n=t.height,r=s.fillColor;s.maskId="mask".concat(b++);const o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",s.maskId);const l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x","0"),l.setAttributeNS(null,"y","0"),l.setAttributeNS(null,"width",v(i)),l.setAttributeNS(null,"height",v(n)),l.setAttributeNS(null,"fill",r),l.setAttributeNS(null,"mask","url(#".concat(s.maskId,")")),this.defs.append(o),this._ensureTransformGroup().append(l),this.paintInlineImageXObject(t,o)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],s=t[3]-t[1],i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x",t[0]),i.setAttributeNS(null,"y",t[1]),i.setAttributeNS(null,"width",v(e)),i.setAttributeNS(null,"height",v(s)),this.current.element=i,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),s=this.svgFactory.createElement("svg:defs");t.append(s),this.defs=s;const i=this.svgFactory.createElement("svg:g");return i.setAttributeNS(null,"transform",m(e.transform)),t.append(i),this.svg=i,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",m(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var s=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](s,s.exports,__w_pdfjs_require__),s.exports}var __nested_webpack_exports__={};return(()=>{var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return n.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return r.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return s.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return i.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return s.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return i.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return i.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return c.SVGGraphics}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return d.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return s.build}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return s.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return i.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return i.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return i.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return i.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return i.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return i.loadScript}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return a.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return i.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return a.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return s.version}});var t=__w_pdfjs_require__(1),s=__w_pdfjs_require__(2),i=__w_pdfjs_require__(6),a=__w_pdfjs_require__(26),n=__w_pdfjs_require__(27),r=__w_pdfjs_require__(5),o=__w_pdfjs_require__(32),l=__w_pdfjs_require__(14),c=__w_pdfjs_require__(35),d=__w_pdfjs_require__(34)})(),__nested_webpack_exports__})(),module.exports=factory()},94168:(e,t,s)=>{"use strict";s.r(t),s.d(t,{Document:()=>J,Outline:()=>oe,Page:()=>Ee,Thumbnail:()=>ke,pdfjs:()=>i,useDocumentContext:()=>ee,useOutlineContext:()=>te,usePageContext:()=>_e});var i=s(46749),a=s(73884),n=s.n(a),r=s(33444),o=s.n(r),l=function(e,t,s){if(s||2===arguments.length)for(var i,a=0,n=t.length;a<n;a++)!i&&a in t||(i||(i=Array.prototype.slice.call(t,0,a)),i[a]=t[a]);return e.concat(i||Array.prototype.slice.call(t))},c=l(l(l(l(l(l(l(l(l(l(l(l(l(l(l(l(l(l([],["onCopy","onCut","onPaste"],!0),["onCompositionEnd","onCompositionStart","onCompositionUpdate"],!0),["onFocus","onBlur"],!0),["onInput","onInvalid","onReset","onSubmit"],!0),["onLoad","onError"],!0),["onKeyDown","onKeyPress","onKeyUp"],!0),["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],!0),["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],!0),["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],!0),["onSelect"],!0),["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],!0),["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],!0),["onScroll"],!0),["onWheel"],!0),["onAnimationStart","onAnimationEnd","onAnimationIteration"],!0),["onTransitionEnd"],!0),["onChange"],!0),["onToggle"],!0);function d(e,t){var s={};return c.forEach((function(i){var a=e[i];a&&(s[i]=t?function(e){return a(e,t(i))}:a)})),s}function h(e){var t=!1;return{promise:new Promise((function(s,i){e.then((function(e){return!t&&s(e)})).catch((function(e){return!t&&i(e)}))})),cancel:function(){t=!0}}}function u(e){var t,s,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(s=u(e[t]))&&(i&&(i+=" "),i+=s);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}const p=function(){for(var e,t,s=0,i="";s<arguments.length;)(e=arguments[s++])&&(t=u(e))&&(i&&(i+=" "),i+=t);return i};var f=!0,g="Invariant failed";function v(e,t){if(!e){if(f)throw new Error(g);var s="function"===typeof t?t():t,i=s?"".concat(g,": ").concat(s):g;throw new Error(i)}}const m=function(e,t){},_=(0,a.createContext)(null);function b(e){let{children:t,type:s}=e;return n().createElement("div",{className:"react-pdf__message react-pdf__message--".concat(s)},t)}b.propTypes={children:o().node,type:o().oneOf(["error","loading","no-data"]).isRequired};class y{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return v(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(e){v(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}goToDestination(e){return new Promise((t=>{v(this.pdfDocument,"PDF document not loaded."),v(e,"Destination is not specified."),"string"===typeof e?this.pdfDocument.getDestination(e).then(t):Array.isArray(e)?t(e):e.then(t)})).then((e=>{v(Array.isArray(e),'"'.concat(e,'" is not a valid destination array.'));const t=e[0];new Promise((e=>{v(this.pdfDocument,"PDF document not loaded."),t instanceof Object?this.pdfDocument.getPageIndex(t).then((t=>{e(t)})).catch((()=>{v(!1,'"'.concat(t,'" is not a valid page reference.'))})):"number"===typeof t?e(t):v(!1,'"'.concat(t,'" is not a valid destination reference.'))})).then((t=>{const s=t+1;v(this.pdfViewer,"PDF viewer is not initialized."),v(s>=1&&s<=this.pagesCount,'"'.concat(s,'" is not a valid page number.')),this.pdfViewer.scrollPageIntoView({dest:e,pageIndex:t,pageNumber:s})}))}))}navigateTo(e){this.goToDestination(e)}goToPage(e){const t=e-1;v(this.pdfViewer,"PDF viewer is not initialized."),v(e>=1&&e<=this.pagesCount,'"'.concat(e,'" is not a valid page number.')),this.pdfViewer.scrollPageIntoView({pageIndex:t,pageNumber:e})}addLinkAttributes(e,t,s){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=s?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}const P={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},A="undefined"!==typeof document,S=A&&"file:"===window.location.protocol;function F(e){return"undefined"!==typeof e}function w(e){return F(e)&&null!==e}function x(e){return function(e){return"string"===typeof e}(e)&&/^data:/.test(e)}function E(e){v(x(e),"Invalid data URI.");const[t="",s=""]=e.split(",");return-1!==t.split(";").indexOf("base64")?atob(s):unescape(s)}const C="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function M(){m(!S,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(C))}function k(e){e&&e.cancel&&e.cancel()}function T(e,t){return Object.defineProperty(e,"width",{get(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.view[3]},configurable:!0}),e}function R(e){return"RenderingCancelledException"===e.name}function I(e,t){switch(t.type){case"RESOLVE":return{value:t.value,error:void 0};case"REJECT":return{value:!1,error:t.error};case"RESET":return{value:void 0,error:void 0};default:return e}}function D(){return(0,a.useReducer)(I,{value:void 0,error:void 0})}const O=(()=>{const e={};return c.forEach((t=>{e[t]=o().func})),e})(),G=o().oneOfType([o().instanceOf(Int8Array),o().instanceOf(Uint8Array),o().instanceOf(Uint8ClampedArray),o().instanceOf(Int16Array),o().instanceOf(Uint16Array),o().instanceOf(Int32Array),o().instanceOf(Uint32Array),o().instanceOf(Float32Array),o().instanceOf(Float64Array)]),L=[o().string,o().instanceOf(ArrayBuffer),o().shape({data:o().oneOfType([o().string,o().instanceOf(ArrayBuffer),o().arrayOf(o().number.isRequired),G]).isRequired}),o().shape({range:o().instanceOf(i.PDFDataRangeTransport).isRequired}),o().shape({url:o().string.isRequired})];"undefined"!==typeof Blob&&L.push(o().instanceOf(Blob));const N=o().oneOfType([o().string,o().arrayOf(o().string)]),j=o().oneOfType(L),W=(o().instanceOf(y),o().oneOf(["_self","_blank","_parent","_top"]),o().shape({commonObjs:o().shape({}).isRequired,getAnnotations:o().func.isRequired,getTextContent:o().func.isRequired,getViewport:o().func.isRequired,render:o().func.isRequired}),o().oneOfType([o().shape({getDestination:o().func.isRequired,getOutline:o().func.isRequired,getPage:o().func.isRequired,numPages:o().number.isRequired}),o().bool])),B=o().oneOfType([o().func,o().exact({current:o().any})]),U=o().oneOf(["canvas","none","svg"]),q=o().oneOf([0,90,180,270]);var H=function(e,t,s,i){return new(s||(s=Promise))((function(a,n){function r(e){try{l(i.next(e))}catch(t){n(t)}}function o(e){try{l(i.throw(e))}catch(t){n(t)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},V=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(s[i[a]]=e[i[a]])}return s};const{PDFDataRangeTransport:z}=i,X=(e,t)=>{switch(t){case P.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case P.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."));break}},Y=(0,a.forwardRef)((function(e,t){var{children:s,className:r,error:o="Failed to load PDF file.",externalLinkRel:l,externalLinkTarget:c,file:u,inputRef:f,imageResourcesPath:g,loading:P="Loading PDF\u2026",noData:S="No PDF file specified.",onItemClick:F,onLoadError:w,onLoadProgress:C,onLoadSuccess:T,onPassword:R=X,onSourceError:I,onSourceSuccess:O,options:G,renderMode:L,rotate:N}=e,j=V(e,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);const[W,B]=D(),{value:U,error:q}=W,[Y,K]=D(),{value:J,error:Q}=Y,Z=(0,a.useRef)(new y),$=(0,a.useRef)([]),ee=(0,a.useRef)({scrollPageIntoView:e=>{const{dest:t,pageNumber:s,pageIndex:i=s-1}=e;if(F)return void F({dest:t,pageIndex:i,pageNumber:s});const a=$.current[i];a?a.scrollIntoView():m(!1,"An internal link leading to page ".concat(s," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}});(0,a.useImperativeHandle)(t,(()=>({linkService:Z,pages:$,viewer:ee})),[]),(0,a.useEffect)((function(){B({type:"RESET"})}),[u,B]);const te=(0,a.useCallback)((()=>H(this,void 0,void 0,(function*(){if(!u)return null;if("string"===typeof u){if(x(u)){return{data:E(u)}}return M(),{url:u}}if(u instanceof z)return{range:u};if(u instanceof ArrayBuffer)return{data:u};if(A&&function(e){return v(A,"isBlob can only be used in a browser environment"),e instanceof Blob}(u)){const e=yield function(e){return new Promise(((t,s)=>{const i=new FileReader;i.onload=()=>{if(!i.result)return s(new Error("Error while reading a file."));t(i.result)},i.onerror=e=>{if(!e.target)return s(new Error("Error while reading a file."));const{error:t}=e.target;if(!t)return s(new Error("Error while reading a file."));switch(t.code){case t.NOT_FOUND_ERR:return s(new Error("Error while reading a file: File not found."));case t.SECURITY_ERR:return s(new Error("Error while reading a file: Security error."));case t.ABORT_ERR:return s(new Error("Error while reading a file: Aborted."));default:return s(new Error("Error while reading a file."))}},i.readAsArrayBuffer(e)}))}(u);return{data:e}}if(v("object"===typeof u,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),v("data"in u||"range"in u||"url"in u,"Invalid parameter object: need either .data, .range or .url"),"url"in u&&"string"===typeof u.url){if(x(u.url)){const{url:e}=u,t=V(u,["url"]),s=E(e);return Object.assign({data:s},t)}M()}return u}))),[u]);function se(e,t){$.current[e]=t}function ie(e){delete $.current[e]}(0,a.useEffect)((()=>{const e=h(te());return e.promise.then((e=>{B({type:"RESOLVE",value:e})})).catch((e=>{B({type:"REJECT",error:e})})),()=>{k(e)}}),[te,B]),(0,a.useEffect)((()=>{"undefined"!==typeof U&&(!1!==U?O&&O():q&&(m(!1,q.toString()),I&&I(q)))}),[U]),(0,a.useEffect)((function(){K({type:"RESET"})}),[K,U]),(0,a.useEffect)((function(){if(!U)return;const e=G?Object.assign(Object.assign({},U),G):U,t=i.getDocument(e);C&&(t.onProgress=C),R&&(t.onPassword=R);const s=t;return s.promise.then((e=>{K({type:"RESOLVE",value:e})})).catch((e=>{s.destroyed||K({type:"REJECT",error:e})})),()=>{s.destroy()}}),[G,K,U]),(0,a.useEffect)((()=>{"undefined"!==typeof J&&(!1!==J?J&&(T&&T(J),$.current=new Array(J.numPages),Z.current.setDocument(J)):Q&&(m(!1,Q.toString()),w&&w(Q)))}),[J]),(0,a.useEffect)((function(){Z.current.setViewer(ee.current),Z.current.setExternalLinkRel(l),Z.current.setExternalLinkTarget(c)}),[l,c]);const ae=(0,a.useMemo)((()=>({imageResourcesPath:g,linkService:Z.current,onItemClick:F,pdf:J,registerPage:se,renderMode:L,rotate:N,unregisterPage:ie})),[g,F,J,L,N]),ne=(0,a.useMemo)((()=>d(j,(()=>J))),[j,J]);return n().createElement("div",Object.assign({className:p("react-pdf__Document",r),ref:f,style:{"--scale-factor":"1"}},ne),u?void 0===J||null===J?n().createElement(b,{type:"loading"},"function"===typeof P?P():P):!1===J?n().createElement(b,{type:"error"},"function"===typeof o?o():o):n().createElement(_.Provider,{value:ae},s):n().createElement(b,{type:"no-data"},"function"===typeof S?S():S))})),K=o().oneOfType([o().func,o().node]);Y.propTypes=Object.assign(Object.assign({},O),{children:o().node,className:N,error:K,externalLinkRel:o().string,externalLinkTarget:o().oneOf(["_self","_blank","_parent","_top"]),file:j,imageResourcesPath:o().string,inputRef:B,loading:K,noData:K,onItemClick:o().func,onLoadError:o().func,onLoadProgress:o().func,onLoadSuccess:o().func,onPassword:o().func,onSourceError:o().func,onSourceSuccess:o().func,options:o().shape({canvasFactory:o().any,canvasMaxAreaInBytes:o().number,cMapPacked:o().bool,CMapReaderFactory:o().any,cMapUrl:o().string,disableAutoFetch:o().bool,disableFontFace:o().bool,disableRange:o().bool,disableStream:o().bool,docBaseUrl:o().string,enableXfa:o().bool,filterFactory:o().any,fontExtraProperties:o().bool,httpHeaders:o().object,isEvalSupported:o().bool,isOffscreenCanvasSupported:o().bool,length:o().number,maxImageSize:o().number,ownerDocument:o().any,password:o().string,pdfBug:o().bool,rangeChunkSize:o().number,StandardFontDataFactory:o().any,standardFontDataUrl:o().string,stopAtErrors:o().bool,useSystemFonts:o().bool,useWorkerFetch:o().bool,verbosity:o().number,withCredentials:o().bool,worker:o().any}),rotate:o().number});const J=Y,Q=(0,a.createContext)(null);class Z{constructor(e){let{num:t,gen:s}=e;this.num=t,this.gen=s}toString(){let e="".concat(this.num,"R");return 0!==this.gen&&(e+=this.gen),e}}function $(e){const t=(0,a.useRef)(),s=t.current;return F(s)?()=>s:()=>{const s=e();return t.current=s,s}}function ee(){return(0,a.useContext)(_)}function te(){return(0,a.useContext)(Q)}var se=function(e,t,s,i){return new(s||(s=Promise))((function(a,n){function r(e){try{l(i.next(e))}catch(t){n(t)}}function o(e){try{l(i.throw(e))}catch(t){n(t)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,o)}l((i=i.apply(e,t||[])).next())}))},ie=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(s[i[a]]=e[i[a]])}return s};function ae(e){const t=ee();v(t,"Unable to find Document context. Did you wrap <Outline /> in <Document />?");const s=te();v(s,"Unable to find Outline context.");const i=Object.assign(Object.assign(Object.assign({},t),s),e),{item:a,linkService:r,onItemClick:o,pdf:l}=i,c=ie(i,["item","linkService","onItemClick","pdf"]);v(l,"Attempted to load an outline, but no document was specified.");const d=$((()=>"string"===typeof a.dest?l.getDestination(a.dest):a.dest)),h=$((()=>se(this,void 0,void 0,(function*(){const e=yield d();if(!e)throw new Error("Destination not found.");const[t]=e;return l.getPageIndex(new Z(t))})))),u=$((()=>se(this,void 0,void 0,(function*(){return(yield h())+1}))));return n().createElement("li",null,n().createElement("a",{href:"#",onClick:function(e){e.preventDefault(),o?Promise.all([d(),h(),u()]).then((e=>{let[t,s,i]=e;o({dest:t,pageIndex:s,pageNumber:i})})):r.goToDestination(a.dest)}},a.title),function(){if(!a.items||!a.items.length)return null;const{items:e}=a;return n().createElement("ul",null,e.map(((e,t)=>n().createElement(ae,Object.assign({key:"string"===typeof e.dest?e.dest:t,item:e},c)))))}())}const ne=o().oneOfType([o().string,o().arrayOf(o().any)]);ae.propTypes={item:o().shape({dest:ne,items:o().arrayOf(o().shape({dest:ne,title:o().string})),title:o().string}).isRequired};var re=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(s[i[a]]=e[i[a]])}return s};function oe(e){const t=ee();v(t,"Unable to find Document context. Did you wrap <Outline /> in <Document />?");const s=Object.assign(Object.assign({},t),e),{className:i,inputRef:r,onItemClick:o,onLoadError:l,onLoadSuccess:c,pdf:u}=s,f=re(s,["className","inputRef","onItemClick","onLoadError","onLoadSuccess","pdf"]);v(u,"Attempted to load an outline, but no document was specified.");const[g,_]=D(),{value:b,error:y}=g;(0,a.useEffect)((function(){_({type:"RESET"})}),[_,u]),(0,a.useEffect)((function(){if(!u)return;const e=h(u.getOutline()),t=e;return e.promise.then((e=>{_({type:"RESOLVE",value:e})})).catch((e=>{_({type:"REJECT",error:e})})),()=>k(t)}),[_,u]),(0,a.useEffect)((()=>{void 0!==b&&(!1!==b?"undefined"!==typeof b&&!1!==b&&c&&c(b):y&&(m(!1,y.toString()),l&&l(y)))}),[b]);const P=(0,a.useMemo)((()=>({onItemClick:o})),[o]),A=(0,a.useMemo)((()=>d(f,(()=>b))),[f,b]);if(!b)return null;return n().createElement("div",Object.assign({className:p("react-pdf__Outline",i),ref:r},A),n().createElement(Q.Provider,{value:P},b?n().createElement("ul",null,b.map(((e,t)=>n().createElement(ae,{key:"string"===typeof e.dest?e.dest:t,item:e})))):null))}function le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=e.filter(Boolean);return s.length<=1?s[0]||null:function(e){s.forEach((function(t){"function"===typeof t?t(e):t&&(t.current=e)}))}}oe.propTypes=Object.assign(Object.assign({},O),{className:N,inputRef:B,onItemClick:o().func,onLoadError:o().func,onLoadSuccess:o().func,pdf:W});const ce=(0,a.createContext)(null),de={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},he=/^H(\d+)$/;function ue(e){return"children"in e}function pe(e){return!!ue(e)&&(1===e.children.length&&0 in e.children&&"id"in e.children[0])}function fe(e){const t={};if(ue(e)){const{role:s}=e,i=s.match(he);if(i)t.role="heading",t["aria-level"]=Number(i[1]);else if(function(e){return e in de}(s)){const e=de[s];e&&(t.role=e)}}return t}function ge(e){const t={};if(ue(e)){if(void 0!==e.alt&&(t["aria-label"]=e.alt),void 0!==e.lang&&(t.lang=e.lang),pe(e)){const[s]=e.children;if(s){const e=ge(s);return Object.assign(Object.assign({},t),e)}}}else"id"in e&&(t["aria-owns"]=e.id);return t}function ve(e){return e?Object.assign(Object.assign({},fe(e)),ge(e)):null}function me(e){let{className:t,node:s}=e;const i=(0,a.useMemo)((()=>ve(s)),[s]),r=(0,a.useMemo)((()=>ue(s)?pe(s)?null:s.children.map(((e,t)=>n().createElement(me,{key:t,node:e}))):null),[s]);return n().createElement("span",Object.assign({className:t},i),r)}function _e(){return(0,a.useContext)(ce)}function be(){const e=_e();v(e,"Unable to find Page context.");const{onGetStructTreeError:t,onGetStructTreeSuccess:s}=e,[i,r]=D(),{value:o,error:l}=i,{customTextRenderer:c,page:d}=e;return(0,a.useEffect)((function(){r({type:"RESET"})}),[r,d]),(0,a.useEffect)((function(){if(c)return;if(!d)return;const e=h(d.getStructTree()),t=e;return e.promise.then((e=>{r({type:"RESOLVE",value:e})})).catch((e=>{r({type:"REJECT",error:e})})),()=>k(t)}),[c,d,r]),(0,a.useEffect)((()=>{void 0!==o&&(!1!==o?o&&s&&s(o):l&&(m(!1,l.toString()),t&&t(l)))}),[o]),o?n().createElement(me,{className:"react-pdf__Page__structTree structTree",node:o}):null}me.propTypes={node:o().oneOfType([o().shape({children:o().object,role:o().string}),o().shape({id:o().string,type:o().string})]).isRequired};const ye=i.AnnotationMode;function Pe(e){const t=_e();v(t,"Unable to find Page context.");const s=Object.assign(Object.assign({},t),e),{_className:i,canvasBackground:r,devicePixelRatio:o,onRenderError:l,onRenderSuccess:c,page:d,renderForms:h,renderTextLayer:u,rotate:p,scale:f}=s,{canvasRef:g}=e,_=(0,a.useRef)(null);v(d,"Attempted to render page canvas, but no page was specified.");const b=o||A&&window.devicePixelRatio||1;function y(e){R(e)||(m(!1,e.toString()),l&&l(e))}const P=(0,a.useMemo)((()=>d.getViewport({scale:f*b,rotation:p})),[b,d,p,f]),S=(0,a.useMemo)((()=>d.getViewport({scale:f,rotation:p})),[d,p,f]);(0,a.useEffect)((function(){if(!d)return;d.cleanup();const{current:e}=_;if(!e)return;e.width=P.width,e.height=P.height,e.style.width="".concat(Math.floor(S.width),"px"),e.style.height="".concat(Math.floor(S.height),"px"),e.style.visibility="hidden";const t={annotationMode:h?ye.ENABLE_FORMS:ye.ENABLE,canvasContext:e.getContext("2d",{alpha:!1}),viewport:P};r&&(t.background=r);const s=d.render(t),i=s;return s.promise.then((()=>{e.style.visibility="",d&&c&&c(T(d,f))})).catch(y),()=>k(i)}),[r,_,b,d,h,P,S]);const F=(0,a.useCallback)((()=>{const{current:e}=_;e&&(e.width=0,e.height=0)}),[_]);return(0,a.useEffect)((()=>F),[F]),n().createElement("canvas",{className:"".concat(i,"__canvas"),dir:"ltr",ref:le(g,_),style:{display:"block",userSelect:"none"}},u?n().createElement(be,null):null)}function Ae(){const e=_e();v(e,"Unable to find Page context.");const{_className:t,onRenderSuccess:s,onRenderError:r,page:o,rotate:l,scale:c}=e,[d,u]=D(),{value:p,error:f}=d;v(o,"Attempted to render page SVG, but no page was specified.");const g=(0,a.useMemo)((()=>o.getViewport({scale:c,rotation:l})),[o,l,c]);(0,a.useEffect)((function(){u({type:"RESET"})}),[o,u,g]),(0,a.useEffect)((function(){if(!o)return;const e=h(o.getOperatorList());return e.promise.then((e=>{new i.SVGGraphics(o.commonObjs,o.objs).getSVG(e,g).then((e=>{u({type:"RESOLVE",value:e})})).catch((e=>{u({type:"REJECT",error:e})}))})).catch((e=>{u({type:"REJECT",error:e})})),()=>k(e)}),[o,u,g]),(0,a.useEffect)((()=>{void 0!==p&&(!1!==p?o&&s&&s(T(o,c)):f&&(R(f)||(m(!1,f.toString()),r&&r(f))))}),[p]);const{width:_,height:b}=g;return n().createElement("div",{className:"".concat(t,"__svg"),ref:e=>function(e){if(!e||!p)return;e.firstElementChild||e.appendChild(p);const{width:t,height:s}=g;p.setAttribute("width","".concat(t)),p.setAttribute("height","".concat(s))}(e),style:{display:"block",backgroundColor:"white",overflow:"hidden",width:_,height:b,userSelect:"none"}})}function Se(){const e=_e();v(e,"Unable to find Page context.");const{customTextRenderer:t,onGetTextError:s,onGetTextSuccess:r,onRenderTextLayerError:o,onRenderTextLayerSuccess:l,page:c,pageIndex:d,pageNumber:u,rotate:f,scale:g}=e,[_,b]=D(),{value:y,error:P}=_,A=(0,a.useRef)(null),S=(0,a.useRef)();v(c,"Attempted to load page text content, but no page was specified."),m(1===parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer"),(0,a.useEffect)((function(){b({type:"RESET"})}),[c,b]),(0,a.useEffect)((function(){if(!c)return;const e=h(c.getTextContent()),t=e;return e.promise.then((e=>{b({type:"RESOLVE",value:e})})).catch((e=>{b({type:"REJECT",error:e})})),()=>k(t)}),[c,b]),(0,a.useEffect)((()=>{void 0!==y&&(!1!==y?y&&r&&r(y):P&&(m(!1,P.toString()),s&&s(P)))}),[y]);const F=(0,a.useCallback)((()=>{l&&l()}),[l]),w=(0,a.useCallback)((e=>{m(!1,e.toString()),o&&o(e)}),[o]);const x=(0,a.useMemo)((()=>c.getViewport({scale:g,rotation:f})),[c,f,g]);return(0,a.useLayoutEffect)((function(){if(!c||!y)return;const{current:e}=A;if(!e)return;e.innerHTML="";const s=c.streamTextContent({includeMarkedContent:!0}),a={container:e,textContentSource:s,viewport:x},n=i.renderTextLayer(a),r=n;return n.promise.then((()=>{const s=document.createElement("div");s.className="endOfContent",e.append(s),S.current=s;const i=Boolean(e.querySelector(".markedContent"))?e.querySelectorAll(".markedContent > *:not(.markedContent"):e.children;if(t){let e=0;y.items.forEach(((s,a)=>{if(!function(e){return"str"in e}(s))return;const n=i[e];if(!n)return;const r=t(Object.assign({pageIndex:d,pageNumber:u,itemIndex:a},s));n.innerHTML=r,e+=s.str&&s.hasEOL?2:1}))}F()})).catch(w),()=>k(r)}),[t,w,F,c,d,u,y,x]),n().createElement("div",{className:p("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){const e=S.current;e&&e.classList.remove("active")},onMouseDown:function(){const e=S.current;e&&e.classList.add("active")},ref:A})}function Fe(){const e=ee();v(e,"Unable to find Document context. Did you wrap <Page /> in <Document />?");const t=_e();v(t,"Unable to find Page context.");const s=Object.assign(Object.assign({},e),t),{imageResourcesPath:r,linkService:o,onGetAnnotationsError:l,onGetAnnotationsSuccess:c,onRenderAnnotationLayerError:d,onRenderAnnotationLayerSuccess:u,page:f,pdf:g,renderForms:_,rotate:b,scale:y=1}=s,[P,A]=D(),{value:S,error:F}=P,w=(0,a.useRef)(null);v(f,"Attempted to load page annotations, but no page was specified."),m(1===parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations"),(0,a.useEffect)((function(){A({type:"RESET"})}),[A,f]),(0,a.useEffect)((function(){if(!f)return;const e=h(f.getAnnotations()),t=e;return e.promise.then((e=>{A({type:"RESOLVE",value:e})})).catch((e=>{A({type:"REJECT",error:e})})),()=>{k(t)}}),[A,f,_]),(0,a.useEffect)((()=>{void 0!==S&&(!1!==S?S&&c&&c(S):F&&(m(!1,F.toString()),l&&l(F)))}),[S]);const x=(0,a.useMemo)((()=>f.getViewport({scale:y,rotation:b})),[f,b,y]);return(0,a.useEffect)((function(){if(!g||!f||!S)return;const{current:e}=w;if(!e)return;const t=x.clone({dontFlip:!0}),s={annotations:S,annotationStorage:g.annotationStorage,div:e,downloadManager:null,imageResourcesPath:r,linkService:o,page:f,renderForms:_,viewport:t};e.innerHTML="";try{i.AnnotationLayer.render(s),u&&u()}catch(a){!function(e){m(!1,"".concat(e)),d&&d(e)}(a)}return()=>{}}),[S,r,o,f,_,x]),n().createElement("div",{className:p("react-pdf__Page__annotations","annotationLayer"),ref:w})}Pe.propTypes={canvasRef:B};var we=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(s[i[a]]=e[i[a]])}return s};const xe=1;function Ee(e){const t=ee();v(t,"Unable to find Document context. Did you wrap <Page /> in <Document />?");const s=Object.assign(Object.assign({},t),e),{_className:i="react-pdf__Page",_enableRegisterUnregisterPage:r=!0,canvasBackground:o,canvasRef:l,children:c,className:u,customTextRenderer:f,devicePixelRatio:g,error:_="Failed to load the page.",height:y,inputRef:P,loading:A="Loading page\u2026",noData:S="No page specified.",onGetAnnotationsError:F,onGetAnnotationsSuccess:x,onGetStructTreeError:E,onGetStructTreeSuccess:C,onGetTextError:M,onGetTextSuccess:R,onLoadError:I,onLoadSuccess:O,onRenderAnnotationLayerError:G,onRenderAnnotationLayerSuccess:L,onRenderError:N,onRenderSuccess:j,onRenderTextLayerError:W,onRenderTextLayerSuccess:B,pageIndex:U,pageNumber:q,pdf:H,registerPage:V,renderAnnotationLayer:z=!0,renderForms:X=!1,renderMode:Y="canvas",renderTextLayer:K=!0,rotate:J,scale:Q=xe,unregisterPage:Z,width:$}=s,te=we(s,["_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[se,ie]=D(),{value:ae,error:ne}=se,re=(0,a.useRef)(null);v(H,"Attempted to load a page, but no document was specified.");const oe=w(q)?q-1:null!==U&&void 0!==U?U:null,de=null!==q&&void 0!==q?q:w(U)?U+1:null,he=null!==J&&void 0!==J?J:ae?ae.rotate:null,ue=(0,a.useMemo)((()=>{if(!ae)return null;let e=1;const t=null!==Q&&void 0!==Q?Q:xe;if($||y){const t=ae.getViewport({scale:1,rotation:he});$?e=$/t.width:y&&(e=y/t.height)}return t*e}),[y,ae,he,Q,$]);(0,a.useEffect)((function(){return()=>{w(oe)&&r&&Z&&Z(oe)}}),[r,H,oe,Z]),(0,a.useEffect)((function(){ie({type:"RESET"})}),[ie,H,oe]),(0,a.useEffect)((function(){if(!H||!de)return;const e=h(H.getPage(de)),t=e;return e.promise.then((e=>{ie({type:"RESOLVE",value:e})})).catch((e=>{ie({type:"REJECT",error:e})})),()=>k(t)}),[ie,H,oe,de,V]),(0,a.useEffect)((()=>{void 0!==ae&&(!1!==ae?function(){if(O){if(!ae||!ue)return;O(T(ae,ue))}if(r&&V){if(!w(oe)||!re.current)return;V(oe,re.current)}}():ne&&(m(!1,ne.toString()),I&&I(ne)))}),[ae,ue]);const pe=(0,a.useMemo)((()=>ae&&w(oe)&&de&&w(he)&&w(ue)?{_className:i,canvasBackground:o,customTextRenderer:f,devicePixelRatio:g,onGetAnnotationsError:F,onGetAnnotationsSuccess:x,onGetStructTreeError:E,onGetStructTreeSuccess:C,onGetTextError:M,onGetTextSuccess:R,onRenderAnnotationLayerError:G,onRenderAnnotationLayerSuccess:L,onRenderError:N,onRenderSuccess:j,onRenderTextLayerError:W,onRenderTextLayerSuccess:B,page:ae,pageIndex:oe,pageNumber:de,renderForms:X,renderTextLayer:K,rotate:he,scale:ue}:null),[i,o,f,g,F,x,E,C,M,R,G,L,N,j,W,B,ae,oe,de,X,K,he,ue]),fe=(0,a.useMemo)((()=>d(te,(()=>ae?ue?T(ae,ue):void 0:ae))),[te,ae,ue]),ge="".concat(oe,"@").concat(ue,"/").concat(he),ve="".concat(oe,"/").concat(he);function me(){return n().createElement(ce.Provider,{value:pe},function(){switch(Y){case"none":return null;case"svg":return n().createElement(Ae,{key:"".concat(ve,"_svg")});default:return n().createElement(Pe,{key:"".concat(ge,"_canvas"),canvasRef:l})}}(),K?n().createElement(Se,{key:"".concat(ge,"_text")}):null,z?n().createElement(Fe,{key:"".concat(ge,"_annotations")}):null,c)}return n().createElement("div",Object.assign({className:p(i,u),"data-page-number":de,ref:le(P,re),style:{"--scale-factor":"".concat(ue),backgroundColor:o||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},fe),de?null===H||void 0===ae||null===ae?n().createElement(b,{type:"loading"},"function"===typeof A?A():A):!1===H||!1===ae?n().createElement(b,{type:"error"},"function"===typeof _?_():_):me():n().createElement(b,{type:"no-data"},"function"===typeof S?S():S))}const Ce=o().oneOfType([o().func,o().node]);Ee.propTypes=Object.assign(Object.assign({},O),{canvasBackground:o().string,canvasRef:B,children:o().node,className:N,customTextRenderer:o().func,devicePixelRatio:o().number,error:Ce,height:o().number,imageResourcesPath:o().string,inputRef:B,loading:Ce,noData:Ce,onGetTextError:o().func,onGetTextSuccess:o().func,onLoadError:o().func,onLoadSuccess:o().func,onRenderError:o().func,onRenderSuccess:o().func,onRenderTextLayerError:o().func,onRenderTextLayerSuccess:o().func,pageIndex:function(e,t,s){const{[t]:i,pageNumber:a,pdf:n}=e;if(!F(n))return null;if(F(i)){if("number"!==typeof i)return new Error("`".concat(t,"` of type `").concat(typeof i,"` supplied to `").concat(s,"`, expected `number`."));if(i<0)return new Error("Expected `".concat(t,"` to be greater or equal to 0."));const{numPages:e}=n;if(i+1>e)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(e-1,"."))}else if(!F(a))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(s,"`."));return null},pageNumber:function(e,t,s){const{[t]:i,pageIndex:a,pdf:n}=e;if(!F(n))return null;if(F(i)){if("number"!==typeof i)return new Error("`".concat(t,"` of type `").concat(typeof i,"` supplied to `").concat(s,"`, expected `number`."));if(i<1)return new Error("Expected `".concat(t,"` to be greater or equal to 1."));const{numPages:e}=n;if(i>e)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(e,"."))}else if(!F(a))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(s,"`."));return null},pdf:W,renderAnnotationLayer:o().bool,renderForms:o().bool,renderMode:U,renderTextLayer:o().bool,rotate:q,scale:o().number,width:o().number});var Me=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(s[i[a]]=e[i[a]])}return s};function ke(e){const t=ee();v(t,"Unable to find Document context. Did you wrap <Page /> in <Document />?");const s=Object.assign(Object.assign({},t),e),{className:i,linkService:a,onItemClick:r,pageIndex:o,pageNumber:l}=s,c=w(l)?l-1:null!==o&&void 0!==o?o:null,d=null!==l&&void 0!==l?l:w(o)?o+1:null;const{className:h,onItemClick:u}=e,f=Me(e,["className","onItemClick"]);return n().createElement("a",{className:p("react-pdf__Thumbnail",i),href:d?"#":void 0,onClick:function(e){e.preventDefault(),w(c)&&d&&(r?r({pageIndex:c,pageNumber:d}):a.goToPage(d))}},n().createElement(Ee,Object.assign({},f,{_className:"react-pdf__Thumbnail__page",_enableRegisterUnregisterPage:!1,renderAnnotationLayer:!1,renderTextLayer:!1})))}m(!S,"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ".concat(C)),i.GlobalWorkerOptions.workerSrc="pdf.worker.js"},97101:e=>{e.exports=function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")},e.exports.__esModule=!0,e.exports.default=e.exports},85764:e=>{e.exports=function(e,t){return t.get?t.get.call(e):t.value},e.exports.__esModule=!0,e.exports.default=e.exports},69056:e=>{e.exports=function(e,t,s){if(t.set)t.set.call(e,s);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=s}},e.exports.__esModule=!0,e.exports.default=e.exports},95276:e=>{e.exports=function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")},e.exports.__esModule=!0,e.exports.default=e.exports},54829:e=>{e.exports=function(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")},e.exports.__esModule=!0,e.exports.default=e.exports},11413:e=>{e.exports=function(e,t,s){if(!t.has(e))throw new TypeError("attempted to "+s+" private field on non-instance");return t.get(e)},e.exports.__esModule=!0,e.exports.default=e.exports},44972:(e,t,s)=>{var i=s(85764),a=s(11413);e.exports=function(e,t){var s=a(e,t,"get");return i(e,s)},e.exports.__esModule=!0,e.exports.default=e.exports},42459:(e,t,s)=>{var i=s(97101);e.exports=function(e,t,s){i(e,t),t.set(e,s)},e.exports.__esModule=!0,e.exports.default=e.exports},32808:(e,t,s)=>{var i=s(69056),a=s(11413);e.exports=function(e,t,s){var n=a(e,t,"set");return i(e,n,s),s},e.exports.__esModule=!0,e.exports.default=e.exports},70137:e=>{e.exports=function(e,t,s){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return s},e.exports.__esModule=!0,e.exports.default=e.exports},93312:(e,t,s)=>{var i=s(97101);e.exports=function(e,t){i(e,t),t.add(e)},e.exports.__esModule=!0,e.exports.default=e.exports},82435:(e,t,s)=>{var i=s(85764),a=s(95276),n=s(54829);e.exports=function(e,t,s){return a(e,t),n(s,"get"),i(e,s)},e.exports.__esModule=!0,e.exports.default=e.exports},31399:(e,t,s)=>{var i=s(69056),a=s(95276),n=s(54829);e.exports=function(e,t,s,r){return a(e,t),n(s,"set"),i(e,s,r),r},e.exports.__esModule=!0,e.exports.default=e.exports},8443:(e,t,s)=>{var i=s(95276);e.exports=function(e,t,s){return i(e,t),s},e.exports.__esModule=!0,e.exports.default=e.exports},43693:(e,t,s)=>{var i=s(77736);e.exports=function(e,t,s){return(t=i(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e},e.exports.__esModule=!0,e.exports.default=e.exports},89045:(e,t,s)=>{var i=s(73738).default;e.exports=function(e,t){if("object"!=i(e)||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var a=s.call(e,t||"default");if("object"!=i(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},77736:(e,t,s)=>{var i=s(73738).default,a=s(89045);e.exports=function(e){var t=a(e,"string");return"symbol"==i(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},73738:e=>{function t(s){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(s)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);
2
- //# sourceMappingURL=4168.bc1cc45c.chunk.js.map