@poe-platform/safe-bash 0.1.817 → 0.1.818

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 (439) hide show
  1. package/dist/image-ast/index.js +2 -2
  2. package/dist/mp4-ast/index.d.ts +2 -1
  3. package/dist/mp4-ast/mp4-metadata-source.d.ts +10 -0
  4. package/dist/mp4-ast/mp4-packets-source.d.ts +8 -1
  5. package/dist/mp4-ast/types.d.ts +21 -3
  6. package/dist/pdf-ast/ast.d.ts +2 -0
  7. package/dist/pdf-ast/content/evaluator.d.ts +7 -0
  8. package/dist/pdf-ast/content/retained-evaluator.d.ts +2 -2
  9. package/dist/pdf-ast/content/retained-page.d.ts +2 -2
  10. package/dist/pdf-ast/extract/html-text-stream.d.ts +14 -0
  11. package/dist/pdf-ast/extract/logical-text-stream.d.ts +14 -0
  12. package/dist/pdf-ast/extract/raw-text-index.d.ts +18 -4
  13. package/dist/pdf-ast/extract/retained-color.d.ts +6 -6
  14. package/dist/pdf-ast/extract/retained-decoded-image.d.ts +2 -2
  15. package/dist/pdf-ast/extract/stored-text-glyphs.d.ts +8 -0
  16. package/dist/pdf-ast/fonts/retained.d.ts +2 -2
  17. package/dist/pdf-ast/image.d.ts +2 -0
  18. package/dist/pdf-ast/image.js +19 -0
  19. package/dist/pdf-ast/index.d.ts +3 -0
  20. package/dist/pdf-ast/index.js +264 -66852
  21. package/dist/pdf-ast/render/postscript.d.ts +6 -0
  22. package/dist/pdf-ast/render/raster.d.ts +21 -1
  23. package/dist/pdf-ast/retained-document.d.ts +16 -95
  24. package/dist/pdf-ast/retained-reader.d.ts +109 -0
  25. package/dist/safe-bash/command-chunks/biff-AYJZR2YV-JPESBEOO.js +5741 -0
  26. package/dist/safe-bash/command-chunks/{chunk-SL4LD25A.js → chunk-232N24HE.js} +9 -9
  27. package/dist/safe-bash/command-chunks/{chunk-ALD53QFL.js → chunk-2C4QMQQD.js} +42 -12
  28. package/dist/safe-bash/command-chunks/{chunk-3PM46VWH.js → chunk-2FEMMALH.js} +4 -4
  29. package/dist/safe-bash/command-chunks/{chunk-QDV2NIFR.js → chunk-2TMTGVJR.js} +1 -1
  30. package/dist/safe-bash/command-chunks/{chunk-ARE267HR.js → chunk-2WTDP3TP.js} +5 -5
  31. package/dist/safe-bash/command-chunks/{chunk-FSG6UC2N.js → chunk-2XR7B6DY.js} +420 -167
  32. package/dist/safe-bash/command-chunks/{chunk-EY3UE26F.js → chunk-2YC6MWQB.js} +1 -1
  33. package/dist/safe-bash/command-chunks/{chunk-UPWLHHZ2.js → chunk-37KBCKDF.js} +13 -13
  34. package/dist/safe-bash/command-chunks/{chunk-DOVWHVHI.js → chunk-3B6554G6.js} +5 -5
  35. package/dist/safe-bash/command-chunks/{chunk-FB2WPI3M.js → chunk-3ZGO24WG.js} +1 -1
  36. package/dist/safe-bash/command-chunks/{chunk-GR4ONCQ5.js → chunk-424NYO35.js} +7 -7
  37. package/dist/safe-bash/command-chunks/{chunk-MQE77MEQ.js → chunk-45GTHPL5.js} +3 -3
  38. package/dist/safe-bash/command-chunks/{chunk-AF2IO57Q.js → chunk-4OHTYYNU.js} +8 -136
  39. package/dist/safe-bash/command-chunks/{chunk-ICJH6A73.js → chunk-4PMMJ45F.js} +3 -3
  40. package/dist/safe-bash/command-chunks/{chunk-57PK2QFX.js → chunk-4SFX6YGC.js} +6 -6
  41. package/dist/safe-bash/command-chunks/{chunk-G3LUT475.js → chunk-4WHTTCKY.js} +6 -6
  42. package/dist/safe-bash/command-chunks/{chunk-UYZ6EFZE.js → chunk-4Z7PBIMP.js} +6 -6
  43. package/dist/safe-bash/command-chunks/{chunk-A4P37F3P.js → chunk-57SKL76U.js} +3 -3
  44. package/dist/safe-bash/command-chunks/{chunk-J6FNSVHT.js → chunk-5GP4A3TD.js} +5 -5
  45. package/dist/safe-bash/command-chunks/{chunk-OFONWWEZ.js → chunk-5IHJWBDR.js} +2 -2
  46. package/dist/safe-bash/command-chunks/{chunk-A2L3U7DW.js → chunk-5OS4Q3AX.js} +4 -4
  47. package/dist/safe-bash/command-chunks/{chunk-FUYZUETI.js → chunk-5PMLTSQ5.js} +2 -2
  48. package/dist/safe-bash/command-chunks/{chunk-TXU7MMHN.js → chunk-5RDS6CNQ.js} +13 -13
  49. package/dist/safe-bash/command-chunks/{chunk-FR63MJSO.js → chunk-5UGQGB5Y.js} +7 -7
  50. package/dist/safe-bash/command-chunks/{chunk-UKAGRRLZ.js → chunk-5VY5O37W.js} +1 -1
  51. package/dist/safe-bash/command-chunks/chunk-5WS6DXYE.js +68444 -0
  52. package/dist/safe-bash/command-chunks/{chunk-2ALHVXEM.js → chunk-6EK76ERE.js} +2 -2
  53. package/dist/safe-bash/command-chunks/{chunk-4772DJKS.js → chunk-6GCK2KSL.js} +61 -26
  54. package/dist/safe-bash/command-chunks/{chunk-T5OQ53XS.js → chunk-6IID5HTY.js} +1 -1
  55. package/dist/safe-bash/command-chunks/{chunk-EZDWPTYB.js → chunk-6LOAJOWK.js} +13 -13
  56. package/dist/safe-bash/command-chunks/{chunk-WMBELKPP.js → chunk-6PE2L522.js} +6 -6
  57. package/dist/safe-bash/command-chunks/{chunk-ZAYTFXUX.js → chunk-73KY3MZ3.js} +4 -4
  58. package/dist/safe-bash/command-chunks/{chunk-BOVDUJ3A.js → chunk-77WBFVZQ.js} +7 -7
  59. package/dist/safe-bash/command-chunks/{chunk-3DWFXESW.js → chunk-7GJJDM2F.js} +2 -2
  60. package/dist/safe-bash/command-chunks/{chunk-WIW3KDBS.js → chunk-7NFICYRU.js} +2 -2
  61. package/dist/safe-bash/command-chunks/{chunk-35DU6I2M.js → chunk-7ZEGARPB.js} +5 -5
  62. package/dist/safe-bash/command-chunks/{chunk-A5SPMSKD.js → chunk-A32PUWYE.js} +2 -2
  63. package/dist/safe-bash/command-chunks/{chunk-KYIGYYEY.js → chunk-A32ZROH5.js} +3 -3
  64. package/dist/safe-bash/command-chunks/{chunk-IOXMGD2H.js → chunk-ADVQZLLE.js} +2 -2
  65. package/dist/safe-bash/command-chunks/{chunk-CGJ7GMHO.js → chunk-AEZU6NZE.js} +2 -2
  66. package/dist/safe-bash/command-chunks/{chunk-KDDXLHN7.js → chunk-ATHU53C2.js} +3 -3
  67. package/dist/safe-bash/command-chunks/{chunk-R7LF4XQV.js → chunk-B6T2526I.js} +2 -2
  68. package/dist/safe-bash/command-chunks/{chunk-PPN53PX3.js → chunk-BB7HBO56.js} +2 -2
  69. package/dist/safe-bash/command-chunks/{chunk-ZM7HMBAJ.js → chunk-BDGNKRY4.js} +7 -7
  70. package/dist/safe-bash/command-chunks/{chunk-VMZIAFVJ.js → chunk-BFRSYJUC.js} +8 -8
  71. package/dist/safe-bash/command-chunks/{chunk-X42MJT2J.js → chunk-BJL7AGA5.js} +1 -1
  72. package/dist/safe-bash/command-chunks/{chunk-VZTVR3JI.js → chunk-C2QUG7IP.js} +3 -3
  73. package/dist/safe-bash/command-chunks/{chunk-IVKAFEPO.js → chunk-C34RLMAC.js} +9 -9
  74. package/dist/safe-bash/command-chunks/{chunk-5O45KGW5.js → chunk-C5VUJOUQ.js} +1 -1
  75. package/dist/safe-bash/command-chunks/{chunk-LQDANF2B.js → chunk-CCNOZKAK.js} +8 -8
  76. package/dist/safe-bash/command-chunks/{chunk-FEBTT5NH.js → chunk-CEHICGP6.js} +2 -2
  77. package/dist/safe-bash/command-chunks/{chunk-SICTBSLW.js → chunk-CODJMTSA.js} +6 -6
  78. package/dist/safe-bash/command-chunks/{chunk-LJ3UYESS.js → chunk-CP5EO5TT.js} +1 -1
  79. package/dist/safe-bash/command-chunks/{chunk-45DKGZYO.js → chunk-CSS5KXQC.js} +329 -152
  80. package/dist/safe-bash/command-chunks/{chunk-6RLWPB44.js → chunk-CZSLXQU2.js} +1 -1
  81. package/dist/safe-bash/command-chunks/{chunk-3ZWFE4CK.js → chunk-D2ZT2UUT.js} +3 -3
  82. package/dist/safe-bash/command-chunks/{chunk-WH624PKJ.js → chunk-D5XSGHXN.js} +2 -2
  83. package/dist/safe-bash/command-chunks/{chunk-NDALIHKK.js → chunk-D7UFAIBS.js} +18 -18
  84. package/dist/safe-bash/command-chunks/{chunk-ISFGPCED.js → chunk-DCKAY6HV.js} +6 -6
  85. package/dist/safe-bash/command-chunks/{chunk-LNAZ3E4Q.js → chunk-DGCJVZW6.js} +1 -1
  86. package/dist/safe-bash/command-chunks/{chunk-LFSWLJPR.js → chunk-DJB5RB6U.js} +288 -32
  87. package/dist/safe-bash/command-chunks/{chunk-FGHSE3RZ.js → chunk-DZ4ELL34.js} +1 -1
  88. package/dist/safe-bash/command-chunks/{chunk-LQX7RAF7.js → chunk-EBKKYRQJ.js} +5 -5
  89. package/dist/safe-bash/command-chunks/{chunk-QNETPOMH.js → chunk-EDBNI7WE.js} +14 -14
  90. package/dist/safe-bash/command-chunks/{chunk-5GDF5FAS.js → chunk-EEJ3YXVO.js} +1 -1
  91. package/dist/safe-bash/command-chunks/{chunk-RTHYAGKI.js → chunk-ETN25WCR.js} +2 -2
  92. package/dist/safe-bash/command-chunks/{chunk-ET6LMDEX.js → chunk-EV3DPRWE.js} +9 -9
  93. package/dist/safe-bash/command-chunks/{chunk-3MUFXGA2.js → chunk-F2JUB7JI.js} +1 -1
  94. package/dist/safe-bash/command-chunks/{chunk-345YBIHP.js → chunk-F42WV2YO.js} +19 -19
  95. package/dist/safe-bash/command-chunks/{chunk-FTZFCMVI.js → chunk-FAVWWMFW.js} +12 -12
  96. package/dist/safe-bash/command-chunks/{chunk-XBWD6SI3.js → chunk-FDRE535F.js} +16 -16
  97. package/dist/safe-bash/command-chunks/{chunk-WMV5224N.js → chunk-FILE5PBI.js} +3 -3
  98. package/dist/safe-bash/command-chunks/{chunk-XPQUUFQD.js → chunk-FPOM47UA.js} +2 -2
  99. package/dist/safe-bash/command-chunks/{chunk-QMBMZSJF.js → chunk-FQ2WRT4Q.js} +3 -3
  100. package/dist/safe-bash/command-chunks/{chunk-H56BSMFQ.js → chunk-FVAFISPY.js} +4 -4
  101. package/dist/safe-bash/command-chunks/{chunk-2QZUAZTH.js → chunk-GIQUIF6E.js} +1 -1
  102. package/dist/safe-bash/command-chunks/{chunk-2TWXRJPB.js → chunk-GNORF6RY.js} +13 -13
  103. package/dist/safe-bash/command-chunks/{chunk-ABL2DPJI.js → chunk-GPLN6JV2.js} +12 -12
  104. package/dist/safe-bash/command-chunks/{chunk-DZOKH5BL.js → chunk-GQ7BD75U.js} +3 -3
  105. package/dist/safe-bash/command-chunks/{chunk-N4HWOLGZ.js → chunk-GY2C555A.js} +2 -2
  106. package/dist/safe-bash/command-chunks/{chunk-N32AP43V.js → chunk-GZNX5SS4.js} +7 -7
  107. package/dist/safe-bash/command-chunks/{chunk-YPG55QTP.js → chunk-HCJWEB6P.js} +1 -1
  108. package/dist/safe-bash/command-chunks/{chunk-4ABR3KGK.js → chunk-HNY7LZ5P.js} +3 -3
  109. package/dist/safe-bash/command-chunks/{chunk-P462JTNT.js → chunk-HOBXZX23.js} +5 -5
  110. package/dist/safe-bash/command-chunks/{chunk-5KZMR6AJ.js → chunk-HW3IOXT6.js} +6 -6
  111. package/dist/safe-bash/command-chunks/{chunk-3VGQTLO6.js → chunk-HX7QQNWS.js} +4 -4
  112. package/dist/safe-bash/command-chunks/{chunk-TXWDR2P4.js → chunk-IBT3OWXB.js} +1 -1
  113. package/dist/safe-bash/command-chunks/{chunk-OHEZQ4QA.js → chunk-IFBLXBBM.js} +9 -9
  114. package/dist/safe-bash/command-chunks/{chunk-HOJ7WDTS.js → chunk-IJZUUXLL.js} +3 -3
  115. package/dist/safe-bash/command-chunks/{chunk-BZRWZ6GO.js → chunk-IKU7ZBF3.js} +2 -2
  116. package/dist/safe-bash/command-chunks/{chunk-CKIXC7AO.js → chunk-IPKYPADE.js} +3 -3
  117. package/dist/safe-bash/command-chunks/{chunk-IWVANZWH.js → chunk-JLPBGKVC.js} +3 -3
  118. package/dist/safe-bash/command-chunks/{chunk-6M3JTPKE.js → chunk-JNRX5EFF.js} +5 -5
  119. package/dist/safe-bash/command-chunks/{chunk-5YL453ZF.js → chunk-JSX5CFZY.js} +36 -36
  120. package/dist/safe-bash/command-chunks/{chunk-V6JPIZUW.js → chunk-JT656DKZ.js} +7 -7
  121. package/dist/safe-bash/command-chunks/{chunk-DM5WURQL.js → chunk-JY2T3KV2.js} +2 -2
  122. package/dist/safe-bash/command-chunks/{chunk-IZ3SD5S2.js → chunk-K2NV6H7E.js} +4 -4
  123. package/dist/safe-bash/command-chunks/{chunk-62RG3GHF.js → chunk-K6E56LND.js} +6 -6
  124. package/dist/safe-bash/command-chunks/{chunk-FLSXHLJG.js → chunk-KADQKXZE.js} +9 -9
  125. package/dist/safe-bash/command-chunks/{chunk-URQSUMMJ.js → chunk-KFFV7HBL.js} +4 -4
  126. package/dist/safe-bash/command-chunks/{chunk-ONQP4FNV.js → chunk-KZICRCQ7.js} +1 -1
  127. package/dist/safe-bash/command-chunks/{chunk-N35IJXBK.js → chunk-L6X4EEN6.js} +9 -9
  128. package/dist/safe-bash/command-chunks/{chunk-SHLT5R64.js → chunk-LF7YJ5VQ.js} +9 -9
  129. package/dist/safe-bash/command-chunks/{chunk-GMBUOYTN.js → chunk-LNHTLWIL.js} +4 -4
  130. package/dist/safe-bash/command-chunks/{chunk-A6OTPNNI.js → chunk-LPKMNCC5.js} +3 -3
  131. package/dist/safe-bash/command-chunks/{chunk-MUTARE5I.js → chunk-LSKA4IR4.js} +6 -6
  132. package/dist/safe-bash/command-chunks/{chunk-N3ZH4YYH.js → chunk-LTWX23FS.js} +3 -3
  133. package/dist/safe-bash/command-chunks/{chunk-JA36YOZI.js → chunk-LUJUYUOG.js} +1 -1
  134. package/dist/safe-bash/command-chunks/{chunk-4X2MPZXW.js → chunk-M42GCI5F.js} +2 -2
  135. package/dist/safe-bash/command-chunks/{chunk-AYQPJQJR.js → chunk-M5BFAMXD.js} +6 -6
  136. package/dist/safe-bash/command-chunks/{chunk-OFDJJRAD.js → chunk-M7DZ7COK.js} +9 -9
  137. package/dist/safe-bash/command-chunks/{chunk-E64ZI2YB.js → chunk-MMSKDYK6.js} +224 -115
  138. package/dist/safe-bash/command-chunks/{chunk-NKK76B4V.js → chunk-MN7EEK6Y.js} +8 -8
  139. package/dist/safe-bash/command-chunks/{chunk-OBIXFO25.js → chunk-MOJQT6RW.js} +8 -8
  140. package/dist/safe-bash/command-chunks/{chunk-HOKPYTHQ.js → chunk-MPRUGL4W.js} +2 -2
  141. package/dist/safe-bash/command-chunks/{chunk-CORUUCS2.js → chunk-MRBX4KEP.js} +3 -3
  142. package/dist/safe-bash/command-chunks/chunk-MTWFSBNG.js +137 -0
  143. package/dist/safe-bash/command-chunks/{chunk-RRAQII52.js → chunk-MURNTGDL.js} +5 -5
  144. package/dist/safe-bash/command-chunks/{chunk-KDBU5Q2N.js → chunk-MWVELMXZ.js} +6 -6
  145. package/dist/safe-bash/command-chunks/{chunk-PRO7JOIH.js → chunk-N3MAYM6Y.js} +8 -8
  146. package/dist/safe-bash/command-chunks/{chunk-E22EAYJN.js → chunk-NFWLZDMY.js} +177 -34
  147. package/dist/safe-bash/command-chunks/{chunk-GAROGIVU.js → chunk-NP2QXF2X.js} +1 -1
  148. package/dist/safe-bash/command-chunks/{chunk-SNA2LVBX.js → chunk-NPVOYY2A.js} +1 -1
  149. package/dist/safe-bash/command-chunks/{chunk-ENMJHB2C.js → chunk-NTXRKJPZ.js} +3 -3
  150. package/dist/safe-bash/command-chunks/{chunk-3K5CVXUV.js → chunk-NZF56C25.js} +10 -10
  151. package/dist/safe-bash/command-chunks/{chunk-5MNQTHED.js → chunk-OA4MEWTN.js} +4 -4
  152. package/dist/safe-bash/command-chunks/{chunk-SWIF6BBY.js → chunk-OL75SBZL.js} +5 -5
  153. package/dist/safe-bash/command-chunks/{chunk-LT2YCGC5.js → chunk-OVQSILY3.js} +5 -5
  154. package/dist/safe-bash/command-chunks/{chunk-WDVPHDBH.js → chunk-P57V45F2.js} +2 -2
  155. package/dist/safe-bash/command-chunks/{chunk-OWCBX5M2.js → chunk-PAY4ULWY.js} +1 -1
  156. package/dist/safe-bash/command-chunks/{chunk-CHZE6FNT.js → chunk-PFUZPAXQ.js} +2 -2
  157. package/dist/safe-bash/command-chunks/{chunk-NLCUQD7Y.js → chunk-PX6E5MHY.js} +9 -9
  158. package/dist/safe-bash/command-chunks/{chunk-POGVOCOB.js → chunk-QCN7MRRU.js} +8 -8
  159. package/dist/safe-bash/command-chunks/{chunk-ZZERSKAR.js → chunk-QLE6JUR7.js} +5 -5
  160. package/dist/safe-bash/command-chunks/{chunk-LZY46GYY.js → chunk-QMWBKR4C.js} +5 -5
  161. package/dist/safe-bash/command-chunks/{chunk-BIJW6QWB.js → chunk-QNLX3CZH.js} +13 -13
  162. package/dist/safe-bash/command-chunks/{chunk-MDFNUNK5.js → chunk-QWX5IERU.js} +6 -6
  163. package/dist/safe-bash/command-chunks/{chunk-WOL3LBXE.js → chunk-R2N3E267.js} +1 -1
  164. package/dist/safe-bash/command-chunks/{chunk-ZNCPIZCN.js → chunk-R6X63VAO.js} +1 -1
  165. package/dist/safe-bash/command-chunks/{chunk-FGARVKAX.js → chunk-RNIFPFGC.js} +13 -11
  166. package/dist/safe-bash/command-chunks/{chunk-OIHQXURE.js → chunk-ROE6KD4C.js} +1 -1
  167. package/dist/safe-bash/command-chunks/{chunk-BKK4MS3V.js → chunk-RR6XG2I6.js} +1 -1
  168. package/dist/safe-bash/command-chunks/{chunk-ZHHALBM7.js → chunk-RYOHOS2I.js} +4 -4
  169. package/dist/safe-bash/command-chunks/{chunk-U42WHQRH.js → chunk-TTTNFKT6.js} +5 -5
  170. package/dist/safe-bash/command-chunks/{chunk-EWC56JNI.js → chunk-TTVJJZOM.js} +5 -5
  171. package/dist/safe-bash/command-chunks/{chunk-TY7JXEWI.js → chunk-UBX5I5HY.js} +11 -11
  172. package/dist/safe-bash/command-chunks/{chunk-QOKFSYD5.js → chunk-UE34SQET.js} +9 -9
  173. package/dist/safe-bash/command-chunks/{chunk-DXOXUKQB.js → chunk-UH4CQIU3.js} +4 -4
  174. package/dist/safe-bash/command-chunks/{chunk-VNNNVT4C.js → chunk-UZZ2WJQV.js} +4 -4
  175. package/dist/safe-bash/command-chunks/{chunk-QNX5LZBK.js → chunk-V6NZVM7C.js} +7 -7
  176. package/dist/safe-bash/command-chunks/{chunk-KLAC2MIZ.js → chunk-VEZULAIA.js} +6 -6
  177. package/dist/safe-bash/command-chunks/{chunk-OCV5ZU35.js → chunk-VSTAHYCV.js} +3 -3
  178. package/dist/safe-bash/command-chunks/{chunk-UFLMOU3B.js → chunk-VUJCVXD4.js} +1 -1
  179. package/dist/safe-bash/command-chunks/{chunk-5V7WIQ2D.js → chunk-VW67MA53.js} +3 -3
  180. package/dist/safe-bash/command-chunks/{chunk-2IMIKROX.js → chunk-WI5NEHPD.js} +2 -2
  181. package/dist/safe-bash/command-chunks/{chunk-SBXS4S6Y.js → chunk-WJSU2UVG.js} +2 -2
  182. package/dist/safe-bash/command-chunks/{chunk-VVWHFNHD.js → chunk-WPEIOUJN.js} +415 -25
  183. package/dist/safe-bash/command-chunks/{chunk-YKODRSGT.js → chunk-WRCYZJNO.js} +1 -1
  184. package/dist/safe-bash/command-chunks/{chunk-TID5TSQW.js → chunk-WRJV7OVO.js} +1 -1
  185. package/dist/safe-bash/command-chunks/{chunk-T4SEQU66.js → chunk-X4TWJNW7.js} +3 -3
  186. package/dist/safe-bash/command-chunks/{chunk-CKA7ZROU.js → chunk-X6KFCAWZ.js} +7 -7
  187. package/dist/safe-bash/command-chunks/{chunk-ROQ3VNVX.js → chunk-X6KO7D6R.js} +8 -8
  188. package/dist/safe-bash/command-chunks/{chunk-S5ER73EA.js → chunk-XB5ZZHFD.js} +3 -3
  189. package/dist/safe-bash/command-chunks/{chunk-FHQOFEQK.js → chunk-XLFOLLUZ.js} +8 -8
  190. package/dist/safe-bash/command-chunks/{chunk-UJYXSLM6.js → chunk-XLPEPCQC.js} +2 -2
  191. package/dist/safe-bash/command-chunks/{chunk-UT5X6QRU.js → chunk-XQFEP43Y.js} +5 -5
  192. package/dist/safe-bash/command-chunks/chunk-Y7XL6CWB.js +771 -0
  193. package/dist/safe-bash/command-chunks/{chunk-RVWIEXR7.js → chunk-YKEMSPJZ.js} +4 -4
  194. package/dist/safe-bash/command-chunks/{chunk-ERWIJYCS.js → chunk-YN3OEJAZ.js} +7 -7
  195. package/dist/safe-bash/command-chunks/{chunk-6YF2QADH.js → chunk-YOYK2I4N.js} +2 -2
  196. package/dist/safe-bash/command-chunks/{chunk-26JE5JEB.js → chunk-YS5ZKMRJ.js} +4 -4
  197. package/dist/safe-bash/command-chunks/{chunk-LMLBQSAM.js → chunk-YW7WU7W2.js} +5 -5
  198. package/dist/safe-bash/command-chunks/{chunk-YXR4JE4U.js → chunk-Z33YS3DW.js} +3 -3
  199. package/dist/safe-bash/command-chunks/{chunk-T2FRXSQT.js → chunk-ZBXUAM34.js} +2 -2
  200. package/dist/safe-bash/command-chunks/{chunk-VVV45NLY.js → chunk-ZJUU5IAS.js} +1 -1
  201. package/dist/safe-bash/command-chunks/{chunk-7OCTMVYJ.js → chunk-ZNABMTV3.js} +1 -1
  202. package/dist/safe-bash/command-chunks/{chunk-6JGICYHP.js → chunk-ZSF2T5D4.js} +1 -1
  203. package/dist/safe-bash/command-chunks/{command-engine-2QXVRRH3.js → command-engine-PFYHL7GS.js} +10 -4
  204. package/dist/safe-bash/command-chunks/{engine-T4GP6QOK-ECFKMR5V.js → engine-5AVSKFBI-D7Q5VPUN.js} +1 -1
  205. package/dist/safe-bash/command-chunks/model-store-IIWQHSEZ.js +54 -0
  206. package/dist/safe-bash-command-awk/awk-inspection.js +2 -2
  207. package/dist/safe-bash-command-awk/awk.js +5 -5
  208. package/dist/safe-bash-command-awk/index.js +5 -5
  209. package/dist/safe-bash-command-cp/index.js +4 -4
  210. package/dist/safe-bash-command-diff/diff.js +2 -2
  211. package/dist/safe-bash-command-diff/index.js +2 -2
  212. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  213. package/dist/safe-bash-command-ffprobe/index.js +2 -2
  214. package/dist/safe-bash-command-ffprobe/media.js +2 -2
  215. package/dist/safe-bash-command-node/commands/node/browser.js +6 -6
  216. package/dist/safe-bash-command-node/commands/node/default-runtime.js +6 -6
  217. package/dist/safe-bash-command-node/commands/node/filesystem.js +2 -2
  218. package/dist/safe-bash-command-node/commands/node/safejs.js +6 -6
  219. package/dist/safe-bash-command-node/commands/node/timers.js +2 -2
  220. package/dist/safe-bash-command-patch/index.js +3 -3
  221. package/dist/safe-bash-command-patch/patch-formats.js +2 -2
  222. package/dist/safe-bash-command-patch/patch.js +3 -3
  223. package/dist/safe-bash-command-patch/unified.js +1 -1
  224. package/dist/safe-bash-command-pdftoppm/index.js +89 -124
  225. package/dist/safe-bash-command-pdftotext/index.d.ts +1 -1
  226. package/dist/safe-bash-command-pdftotext/index.js +538 -379
  227. package/dist/safe-bash-command-playwright-cli/index.js +19 -19
  228. package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +6 -6
  229. package/dist/safe-bash-command-playwright-cli/playwright/adapter.js +3 -3
  230. package/dist/safe-bash-command-playwright-cli/playwright/controller.js +13 -13
  231. package/dist/safe-bash-command-playwright-cli/playwright/index.js +19 -19
  232. package/dist/safe-bash-command-playwright-cli/playwright/native-storage-replacement.js +2 -2
  233. package/dist/safe-bash-command-playwright-cli/playwright/open-options.js +2 -2
  234. package/dist/safe-bash-command-playwright-cli/playwright/profile.js +5 -5
  235. package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +4 -4
  236. package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +3 -3
  237. package/dist/safe-bash-command-pptx/engine.js +1 -1
  238. package/dist/safe-bash-command-python/executor.js +10 -10
  239. package/dist/safe-bash-command-python/index.js +10 -10
  240. package/dist/safe-bash-command-python/jspi.js +2 -2
  241. package/dist/safe-bash-command-safejs/index.js +2 -2
  242. package/dist/safe-bash-command-safejs/runtime.js +2 -2
  243. package/dist/safe-bash-command-ssconvert/index.js +13 -13
  244. package/dist/safe-bash-command-unzip/index.js +4 -4
  245. package/dist/safe-bash-docx-engine/ancillary-resources.js +10 -10
  246. package/dist/safe-bash-docx-engine/batch-operations.js +67 -67
  247. package/dist/safe-bash-docx-engine/batch-result-schema.js +79 -79
  248. package/dist/safe-bash-docx-engine/batch.js +78 -78
  249. package/dist/safe-bash-docx-engine/bookmarks.js +18 -18
  250. package/dist/safe-bash-docx-engine/charts.js +11 -11
  251. package/dist/safe-bash-docx-engine/command-option-rules.js +6 -6
  252. package/dist/safe-bash-docx-engine/command-properties.js +3 -3
  253. package/dist/safe-bash-docx-engine/comments.js +26 -26
  254. package/dist/safe-bash-docx-engine/control-bindings.js +21 -21
  255. package/dist/safe-bash-docx-engine/control-repeat.js +21 -21
  256. package/dist/safe-bash-docx-engine/controls.js +19 -19
  257. package/dist/safe-bash-docx-engine/create.js +11 -11
  258. package/dist/safe-bash-docx-engine/diagrams.js +11 -11
  259. package/dist/safe-bash-docx-engine/diff.js +13 -13
  260. package/dist/safe-bash-docx-engine/document-properties.js +16 -16
  261. package/dist/safe-bash-docx-engine/equations.js +17 -17
  262. package/dist/safe-bash-docx-engine/extract.js +14 -14
  263. package/dist/safe-bash-docx-engine/fields.js +23 -23
  264. package/dist/safe-bash-docx-engine/font-inventory.js +18 -18
  265. package/dist/safe-bash-docx-engine/font-resources.js +6 -6
  266. package/dist/safe-bash-docx-engine/image-batch-operations.js +14 -14
  267. package/dist/safe-bash-docx-engine/image-insertion.js +21 -21
  268. package/dist/safe-bash-docx-engine/image-layout.js +19 -19
  269. package/dist/safe-bash-docx-engine/image-replacement.js +22 -22
  270. package/dist/safe-bash-docx-engine/images.js +19 -19
  271. package/dist/safe-bash-docx-engine/index.js +111 -111
  272. package/dist/safe-bash-docx-engine/inspection.js +20 -20
  273. package/dist/safe-bash-docx-engine/invocation.js +9 -9
  274. package/dist/safe-bash-docx-engine/io.js +9 -9
  275. package/dist/safe-bash-docx-engine/links.js +21 -21
  276. package/dist/safe-bash-docx-engine/lists.js +20 -20
  277. package/dist/safe-bash-docx-engine/locations.js +15 -15
  278. package/dist/safe-bash-docx-engine/notes.js +22 -22
  279. package/dist/safe-bash-docx-engine/objects.js +19 -19
  280. package/dist/safe-bash-docx-engine/operation-json-schema.js +3 -3
  281. package/dist/safe-bash-docx-engine/operation-schema.js +2 -2
  282. package/dist/safe-bash-docx-engine/pack.js +14 -14
  283. package/dist/safe-bash-docx-engine/package-view-batch-operations.js +22 -22
  284. package/dist/safe-bash-docx-engine/pandoc-adapter.js +29 -29
  285. package/dist/safe-bash-docx-engine/paragraph-edit.js +25 -25
  286. package/dist/safe-bash-docx-engine/part-provider.js +3 -3
  287. package/dist/safe-bash-docx-engine/property-values.js +3 -3
  288. package/dist/safe-bash-docx-engine/publication.js +9 -9
  289. package/dist/safe-bash-docx-engine/removal.js +21 -21
  290. package/dist/safe-bash-docx-engine/revision-decisions.js +22 -22
  291. package/dist/safe-bash-docx-engine/revision-edit.js +20 -20
  292. package/dist/safe-bash-docx-engine/revisions.js +18 -18
  293. package/dist/safe-bash-docx-engine/run-format.js +20 -20
  294. package/dist/safe-bash-docx-engine/sanitize.js +34 -34
  295. package/dist/safe-bash-docx-engine/sections.js +19 -19
  296. package/dist/safe-bash-docx-engine/settings.js +11 -11
  297. package/dist/safe-bash-docx-engine/shape-edit.js +21 -21
  298. package/dist/safe-bash-docx-engine/signatures.js +15 -15
  299. package/dist/safe-bash-docx-engine/stories.js +22 -22
  300. package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +38 -38
  301. package/dist/safe-bash-docx-engine/style-model-batch-operations.js +27 -27
  302. package/dist/safe-bash-docx-engine/style-model-result-schema.js +44 -44
  303. package/dist/safe-bash-docx-engine/styles.js +18 -18
  304. package/dist/safe-bash-docx-engine/table-edit.js +27 -27
  305. package/dist/safe-bash-docx-engine/table-read.js +16 -16
  306. package/dist/safe-bash-docx-engine/template.js +22 -22
  307. package/dist/safe-bash-docx-engine/text-replace.js +20 -20
  308. package/dist/safe-bash-docx-engine/text-resource-read.js +16 -16
  309. package/dist/safe-bash-docx-engine/text.js +16 -16
  310. package/dist/safe-bash-docx-engine/validation.js +7 -7
  311. package/dist/safe-bash-docx-engine/xml-parts.js +22 -22
  312. package/dist/safe-bash-network-engine/index.js +4 -4
  313. package/dist/safe-bash-network-engine/transfer.js +12 -12
  314. package/dist/safe-bash-presentation-engine/accessibility.js +15 -15
  315. package/dist/safe-bash-presentation-engine/animation-editing.js +5 -5
  316. package/dist/safe-bash-presentation-engine/animations.js +5 -5
  317. package/dist/safe-bash-presentation-engine/backgrounds.js +6 -6
  318. package/dist/safe-bash-presentation-engine/chart-editing.js +18 -18
  319. package/dist/safe-bash-presentation-engine/chart-object-operations.js +12 -12
  320. package/dist/safe-bash-presentation-engine/charts.js +15 -15
  321. package/dist/safe-bash-presentation-engine/command-placeholder.js +39 -38
  322. package/dist/safe-bash-presentation-engine/comments.js +6 -6
  323. package/dist/safe-bash-presentation-engine/connector-operations.js +16 -16
  324. package/dist/safe-bash-presentation-engine/connectors.js +13 -13
  325. package/dist/safe-bash-presentation-engine/diff.js +21 -20
  326. package/dist/safe-bash-presentation-engine/drawing-format.js +7 -7
  327. package/dist/safe-bash-presentation-engine/drawing-operations.js +15 -15
  328. package/dist/safe-bash-presentation-engine/drawing-schema.js +8 -8
  329. package/dist/safe-bash-presentation-engine/equations.js +6 -6
  330. package/dist/safe-bash-presentation-engine/fields.js +6 -6
  331. package/dist/safe-bash-presentation-engine/image-extraction.js +7 -7
  332. package/dist/safe-bash-presentation-engine/image-formatting.js +16 -16
  333. package/dist/safe-bash-presentation-engine/image-insertion.js +6 -6
  334. package/dist/safe-bash-presentation-engine/image-replacement.js +7 -7
  335. package/dist/safe-bash-presentation-engine/images.js +6 -6
  336. package/dist/safe-bash-presentation-engine/index.js +96 -95
  337. package/dist/safe-bash-presentation-engine/layouts.js +5 -5
  338. package/dist/safe-bash-presentation-engine/links.js +5 -5
  339. package/dist/safe-bash-presentation-engine/masters.js +4 -4
  340. package/dist/safe-bash-presentation-engine/media-editing.js +10 -10
  341. package/dist/safe-bash-presentation-engine/media-extraction.js +6 -6
  342. package/dist/safe-bash-presentation-engine/media.js +5 -5
  343. package/dist/safe-bash-presentation-engine/memberships.d.ts +1 -0
  344. package/dist/safe-bash-presentation-engine/memberships.js +12 -6
  345. package/dist/safe-bash-presentation-engine/notes.js +6 -6
  346. package/dist/safe-bash-presentation-engine/ole-insertion.js +6 -6
  347. package/dist/safe-bash-presentation-engine/opaque-objects.js +2 -2
  348. package/dist/safe-bash-presentation-engine/package-tools.js +6 -6
  349. package/dist/safe-bash-presentation-engine/presentation-model.js +38 -37
  350. package/dist/safe-bash-presentation-engine/presentation-settings.d.ts +1 -0
  351. package/dist/safe-bash-presentation-engine/presentation-settings.js +12 -5
  352. package/dist/safe-bash-presentation-engine/properties.js +7 -6
  353. package/dist/safe-bash-presentation-engine/retained-inspection.js +3 -3
  354. package/dist/safe-bash-presentation-engine/retained-memberships.d.ts +25 -0
  355. package/dist/safe-bash-presentation-engine/retained-presentation-settings.d.ts +25 -0
  356. package/dist/safe-bash-presentation-engine/retained-text.d.ts +24 -4
  357. package/dist/safe-bash-presentation-engine/retained-text.js +17 -15
  358. package/dist/safe-bash-presentation-engine/sanitize.js +8 -7
  359. package/dist/safe-bash-presentation-engine/selectors.js +2 -2
  360. package/dist/safe-bash-presentation-engine/shape-groups.js +15 -15
  361. package/dist/safe-bash-presentation-engine/shape-operations.js +14 -14
  362. package/dist/safe-bash-presentation-engine/shape-path-operations.js +16 -16
  363. package/dist/safe-bash-presentation-engine/shape-paths.js +5 -5
  364. package/dist/safe-bash-presentation-engine/shape-selection.js +15 -15
  365. package/dist/safe-bash-presentation-engine/shape-transforms.js +5 -5
  366. package/dist/safe-bash-presentation-engine/shapes.js +11 -11
  367. package/dist/safe-bash-presentation-engine/slide-copy.js +7 -5
  368. package/dist/safe-bash-presentation-engine/slide-import.js +6 -6
  369. package/dist/safe-bash-presentation-engine/slide-merge-split.js +8 -8
  370. package/dist/safe-bash-presentation-engine/slide-model.js +24 -24
  371. package/dist/safe-bash-presentation-engine/slide-removal.js +7 -7
  372. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +2 -2
  373. package/dist/safe-bash-presentation-engine/slides.js +5 -5
  374. package/dist/safe-bash-presentation-engine/table-operations.js +17 -17
  375. package/dist/safe-bash-presentation-engine/table-spans.js +16 -16
  376. package/dist/safe-bash-presentation-engine/tables.js +15 -15
  377. package/dist/safe-bash-presentation-engine/tags.js +6 -6
  378. package/dist/safe-bash-presentation-engine/template-bindings.js +16 -16
  379. package/dist/safe-bash-presentation-engine/template-repeat.js +24 -22
  380. package/dist/safe-bash-presentation-engine/text-fitting.js +11 -11
  381. package/dist/safe-bash-presentation-engine/text-frames.js +11 -11
  382. package/dist/safe-bash-presentation-engine/text-paragraphs.js +11 -11
  383. package/dist/safe-bash-presentation-engine/text-reading.js +3 -3
  384. package/dist/safe-bash-presentation-engine/text-replacement.js +6 -6
  385. package/dist/safe-bash-presentation-engine/text-runs.js +8 -8
  386. package/dist/safe-bash-presentation-engine/themes.js +5 -5
  387. package/dist/safe-bash-presentation-engine/transitions.js +5 -5
  388. package/dist/safe-bash-presentation-engine/validation.js +2 -2
  389. package/dist/safe-bash-presentation-engine/xml-parts.js +5 -5
  390. package/dist/safe-bash-xml-engine/document.js +2 -2
  391. package/dist/safe-bash-xml-engine/index.js +2 -2
  392. package/dist/safe-bash-xml-engine/recovery.d.ts +6 -2
  393. package/dist/safe-bash-xml-engine/stored-document.d.ts +2 -1
  394. package/dist/safe-bash-xml-engine/stored-document.js +1 -1
  395. package/dist/safe-bash-xml-engine/{stored-namespaces.d.ts → stored-map.d.ts} +6 -6
  396. package/dist/safe-bash-zip-engine/index.js +3 -3
  397. package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
  398. package/dist/safe-bash-zip-engine/zip/sfx.js +3 -3
  399. package/dist/safe-bash-zip-engine/zip-format.js +3 -3
  400. package/dist/spreadsheet-engine/formatting/cell-text.js +1 -1
  401. package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.js +3 -3
  402. package/dist/spreadsheet-engine/formulas/functions/python-printf.js +9 -7
  403. package/dist/spreadsheet-engine/solver/program.js +3 -2
  404. package/dist/spreadsheet-engine/solver/run.js +8 -2
  405. package/dist/spreadsheet-engine/solver/sensitivity.d.ts +4 -2
  406. package/dist/spreadsheet-engine/solver/sensitivity.js +80 -42
  407. package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +2 -1
  408. package/dist/spreadsheet-format-xls/biff-properties-merge.js +35 -29
  409. package/dist/spreadsheet-format-xls/biff-properties-write.js +16 -7
  410. package/dist/spreadsheet-format-xls/biff-property-names.d.ts +3 -0
  411. package/dist/spreadsheet-format-xls/biff-property-names.js +44 -1
  412. package/dist/spreadsheet-format-xls/biff-property-observations.d.ts +33 -0
  413. package/dist/spreadsheet-format-xls/biff-property-observations.js +160 -0
  414. package/package.json +6 -4
  415. package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +15 -0
  416. package/third-party/pdf-ast/licenses/PYTHON-PSF.txt +254 -0
  417. package/third-party/pdf-ast/licenses/V8-BSD.txt +61 -0
  418. package/dist/safe-bash/command-chunks/biff-KLS4T7FP-UO3CXFFF.js +0 -5581
  419. package/dist/safe-bash/command-chunks/chunk-6EZWG56T.js +0 -455
  420. package/dist/safe-bash/command-chunks/model-store-I7YAWL5V.js +0 -54
  421. package/dist/safe-bash/command-chunks/{chunk-SRXARACJ.js → chunk-3TP4SSPS.js} +3 -3
  422. package/dist/safe-bash/command-chunks/{chunk-NCNHJRIY.js → chunk-3W3HLPCX.js} +3 -3
  423. package/dist/safe-bash/command-chunks/{chunk-P4OWVKMD.js → chunk-BQXKO3X7.js} +3 -3
  424. package/dist/safe-bash/command-chunks/{chunk-OCOJMKDP.js → chunk-CVMHDJ7J.js} +3 -3
  425. package/dist/safe-bash/command-chunks/{chunk-AV6N7DDA.js → chunk-DDYPQAXN.js} +3 -3
  426. package/dist/safe-bash/command-chunks/{chunk-FEKECRJP.js → chunk-EBTKM7KX.js} +3 -3
  427. package/dist/safe-bash/command-chunks/{chunk-WVD5WZXD.js → chunk-FPNUGKCX.js} +3 -3
  428. package/dist/safe-bash/command-chunks/{chunk-6W4RMBFH.js → chunk-N6VNHC3B.js} +3 -3
  429. package/dist/safe-bash/command-chunks/{chunk-M3OXQXCU.js → chunk-NBRXQUK7.js} +3 -3
  430. package/dist/safe-bash/command-chunks/{chunk-LECGQSQW.js → chunk-SF56V6QK.js} +3 -3
  431. package/dist/safe-bash/command-chunks/{chunk-2ANW3FXH.js → chunk-U33GIOUY.js} +3 -3
  432. package/dist/safe-bash/command-chunks/{chunk-5QXRIZSS.js → chunk-V3NKL42J.js} +3 -3
  433. package/dist/safe-bash/command-chunks/{chunk-OEKLEUUW.js → chunk-YZE7BKHC.js} +3 -3
  434. package/dist/safe-bash/command-chunks/{chunk-WXW665TV.js → chunk-ZSHXZ3XG.js} +6 -6
  435. package/dist/safe-bash/command-chunks/{dif-BXKPQOCO-4KB3RC6G.js → dif-BXKPQOCO-FVJYYGYB.js} +4 -4
  436. package/dist/safe-bash/command-chunks/{pln-DFS7VLVS-OVOBS4QX.js → pln-DFS7VLVS-JATX6FS7.js} +3 -3
  437. package/dist/safe-bash/command-chunks/{psion-YBI6JEQI-GY4S6ZLC.js → psion-YBI6JEQI-6OMC2PGC.js} +3 -3
  438. package/dist/safe-bash/command-chunks/{sylk-25D7TL2Y-RU6ANKGT.js → sylk-25D7TL2Y-NJKBZZTF.js} +4 -4
  439. /package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.d.ts +0 -0
@@ -1,3 +1,192 @@
1
+ // packages/safe-bash-xml-engine/src/stored-map.ts
2
+ var StoredStringMap = class _StoredStringMap {
3
+ constructor(storage, budget, reference = 0) {
4
+ this.storage = storage;
5
+ this.budget = budget;
6
+ this.reference = reference;
7
+ }
8
+ storage;
9
+ budget;
10
+ reference;
11
+ async read(reference) {
12
+ const header = await this.storage.read(reference, 8);
13
+ const size = new DataView(header.buffer, header.byteOffset, 8).getFloat64(0, true);
14
+ const decoder = new TextDecoder(), parts = [];
15
+ for (let offset = 0; offset < size; offset += 16384) {
16
+ const length = Math.min(16384, size - offset);
17
+ const checkpoint = this.budget.tick(length);
18
+ if (checkpoint) await checkpoint;
19
+ parts.push(decoder.decode(await this.storage.read(reference + 8 + offset, length), { stream: true }));
20
+ }
21
+ parts.push(decoder.decode());
22
+ return JSON.parse(parts.join(""));
23
+ }
24
+ async write(entry) {
25
+ const source = JSON.stringify(entry), encoder = new TextEncoder(), header = new Uint8Array(8);
26
+ const reference = await this.storage.append(header);
27
+ let size = 0;
28
+ for (let offset = 0; offset < source.length; ) {
29
+ let end = Math.min(source.length, offset + 4096);
30
+ const last = source.charCodeAt(end - 1);
31
+ if (end < source.length && last >= 55296 && last <= 56319) end--;
32
+ const bytes = encoder.encode(source.slice(offset, end));
33
+ const checkpoint = this.budget.tick(bytes.length);
34
+ if (checkpoint) await checkpoint;
35
+ await this.storage.append(bytes);
36
+ size += bytes.length;
37
+ offset = end;
38
+ }
39
+ new DataView(header.buffer).setFloat64(0, size, true);
40
+ await this.storage.write(reference, header);
41
+ return reference;
42
+ }
43
+ async get(key) {
44
+ let reference = this.reference;
45
+ while (reference) {
46
+ const entry = await this.read(reference);
47
+ const checkpoint = this.budget.tick(key.length + 1);
48
+ if (checkpoint) await checkpoint;
49
+ if (key === entry.key) return entry.value;
50
+ reference = key < entry.key ? entry.left : entry.right;
51
+ }
52
+ return void 0;
53
+ }
54
+ async height(reference) {
55
+ return reference ? (await this.read(reference)).height : 0;
56
+ }
57
+ async updated(entry) {
58
+ return this.write({ ...entry, height: 1 + Math.max(await this.height(entry.left), await this.height(entry.right)) });
59
+ }
60
+ async rotate(entry, left) {
61
+ const pivot = await this.read(left ? entry.right : entry.left);
62
+ const child = await this.updated(left ? { ...entry, right: pivot.left } : { ...entry, left: pivot.right });
63
+ return this.updated(left ? { ...pivot, left: child } : { ...pivot, right: child });
64
+ }
65
+ async balance(entry) {
66
+ const difference = await this.height(entry.left) - await this.height(entry.right);
67
+ if (difference > 1) {
68
+ const child = await this.read(entry.left);
69
+ if (await this.height(child.left) < await this.height(child.right)) entry = { ...entry, left: await this.rotate(child, true) };
70
+ return this.rotate(entry, false);
71
+ }
72
+ if (difference < -1) {
73
+ const child = await this.read(entry.right);
74
+ if (await this.height(child.right) < await this.height(child.left)) entry = { ...entry, right: await this.rotate(child, false) };
75
+ return this.rotate(entry, true);
76
+ }
77
+ return this.updated(entry);
78
+ }
79
+ async set(key, value) {
80
+ const insert = async (reference) => {
81
+ if (!reference) return this.write({ key, value, left: 0, right: 0, height: 1 });
82
+ const entry = await this.read(reference);
83
+ const checkpoint = this.budget.tick(key.length + value.length + 1);
84
+ if (checkpoint) await checkpoint;
85
+ if (key === entry.key) return entry.value === value ? reference : this.write({ ...entry, value });
86
+ const side = key < entry.key ? "left" : "right";
87
+ const child = await insert(entry[side]);
88
+ return child === entry[side] ? reference : this.balance({ ...entry, [side]: child });
89
+ };
90
+ return new _StoredStringMap(this.storage, this.budget, await insert(this.reference));
91
+ }
92
+ async *[Symbol.asyncIterator]() {
93
+ const visit = async function* (scope, reference) {
94
+ if (!reference) return;
95
+ const entry = await scope.read(reference);
96
+ yield* visit(scope, entry.left);
97
+ yield [entry.key, entry.value];
98
+ yield* visit(scope, entry.right);
99
+ };
100
+ yield* visit(this, this.reference);
101
+ }
102
+ };
103
+
104
+ // packages/safe-bash-xml-engine/src/parser-attributes.ts
105
+ var StoredParserAttributes = class {
106
+ constructor(storage, budget) {
107
+ this.storage = storage;
108
+ this.budget = budget;
109
+ }
110
+ storage;
111
+ budget;
112
+ async number(reference, offset = 0) {
113
+ if (!reference) return 0;
114
+ const bytes = await this.storage.read(reference + offset, 8);
115
+ return new DataView(bytes.buffer, bytes.byteOffset, 8).getFloat64(0, true);
116
+ }
117
+ async set(reference, offset, value) {
118
+ const bytes = new Uint8Array(8);
119
+ new DataView(bytes.buffer).setFloat64(0, value, true);
120
+ await this.storage.write(reference + offset, bytes);
121
+ }
122
+ async append(attribute) {
123
+ const source = JSON.stringify(attribute), encoder = new TextEncoder();
124
+ const reference = await this.storage.append(new Uint8Array(16));
125
+ let size = 0;
126
+ for (let offset = 0; offset < source.length; ) {
127
+ let end = Math.min(source.length, offset + 4096);
128
+ const last = source.charCodeAt(end - 1);
129
+ if (end < source.length && last >= 55296 && last <= 56319) end--;
130
+ const bytes = encoder.encode(source.slice(offset, end));
131
+ const checkpoint = this.budget.tick(bytes.length);
132
+ if (checkpoint) await checkpoint;
133
+ await this.storage.append(bytes);
134
+ size += bytes.length;
135
+ offset = end;
136
+ }
137
+ await this.set(reference, 8, size);
138
+ return reference;
139
+ }
140
+ async execute(request) {
141
+ const store = request.state.reference;
142
+ if (request.attributeOperation === "has" || request.attributeOperation === "expanded") {
143
+ const offset = request.attributeOperation === "has" ? 16 : 24;
144
+ const values = new StoredStringMap(this.storage, this.budget, await this.number(store, offset));
145
+ request.found = await values.get(request.name) !== void 0;
146
+ if (request.attributeOperation === "expanded" && !request.found) {
147
+ const next = await values.set(request.name, "1");
148
+ await this.set(store, offset, next.reference);
149
+ }
150
+ return;
151
+ }
152
+ if (request.attributeOperation === "append") {
153
+ const reference = store || await this.storage.append(new Uint8Array(32));
154
+ const values = new StoredStringMap(this.storage, this.budget, await this.number(reference, 16));
155
+ const existing = await values.get(request.attribute.name);
156
+ const updated = await values.set(request.attribute.name, request.attribute.value);
157
+ const { value: ignoredValue, ...metadata } = request.attribute;
158
+ const attribute = await this.append(metadata);
159
+ const last = await this.number(reference, 8);
160
+ if (last) await this.set(last, 0, attribute);
161
+ else await this.set(reference, 0, attribute);
162
+ await this.set(reference, 8, attribute);
163
+ await this.set(reference, 16, updated.reference);
164
+ request.result = {
165
+ reference,
166
+ first: request.state.first || attribute,
167
+ length: request.state.length + 1,
168
+ size: request.state.size + (existing === void 0 ? 1 : 0)
169
+ };
170
+ return;
171
+ }
172
+ if (request.attributeOperation === "read") {
173
+ const size = await this.number(request.reference, 8), decoder = new TextDecoder(), parts = [];
174
+ for (let offset = 0; offset < size; offset += 16384) {
175
+ const length = Math.min(16384, size - offset);
176
+ const checkpoint = this.budget.tick(length);
177
+ if (checkpoint) await checkpoint;
178
+ parts.push(decoder.decode(await this.storage.read(request.reference + 16 + offset, length), { stream: true }));
179
+ }
180
+ parts.push(decoder.decode());
181
+ const metadata = JSON.parse(parts.join(""));
182
+ const values = new StoredStringMap(this.storage, this.budget, await this.number(store, 16));
183
+ const value = request.values ? await values.get(metadata.name) : "";
184
+ if (value === void 0) throw new TypeError("Missing stored XML attribute value");
185
+ request.result = { ...metadata, value, next: await this.number(request.reference) };
186
+ }
187
+ }
188
+ };
189
+
1
190
  // packages/safe-bash-xml-engine/src/frames.ts
2
191
  var StoredXmlFrames = class {
3
192
  constructor(storage) {
@@ -13,7 +202,8 @@ var StoredXmlFrames = class {
13
202
  name: frame.name,
14
203
  element,
15
204
  namespaces: [...frame.namespaces],
16
- retainNamespaces: namespaces2 === frame.namespaces
205
+ retainNamespaces: namespaces2 === frame.namespaces,
206
+ ...frame.namespaceScope ? { namespaceScope: frame.namespaceScope } : {}
17
207
  };
18
208
  const source2 = JSON.stringify(record2);
19
209
  const reference = this.storage.allocate(16 + source2.length * 2);
@@ -51,6 +241,7 @@ var StoredXmlFrames = class {
51
241
  name: record.name,
52
242
  namespaces,
53
243
  content: void 0,
244
+ ...record.namespaceScope ? { namespaceScope: record.namespaceScope } : {},
54
245
  element: { ...record.element, namespaces: record.retainNamespaces ? namespaces : /* @__PURE__ */ new Map() }
55
246
  };
56
247
  }
@@ -87,17 +278,22 @@ async function parseStoredXml(source, context, budget, recover, consume) {
87
278
  if (recover) while (!sourceDone) await readNext();
88
279
  const queued = [];
89
280
  const frames = new StoredXmlFrames(frameStorage);
281
+ const attributes = new StoredParserAttributes(frameStorage, budget);
90
282
  const parser = parseXmlSourceSteps(recover ? length : void 0, {
91
283
  ...budget.limits,
92
284
  maxContentNodes: budget.limits.maxNodes,
93
285
  expectedEncoding: "UTF-8",
94
286
  retainTree: false,
95
287
  storeFrames: true,
288
+ storeNamespaces: true,
289
+ storeAttributes: true,
96
290
  fragmentContent: true,
97
291
  compactDeclaration: true,
98
292
  ...recover ? { recover } : {},
99
293
  ...consume ? { events: (event) => {
100
294
  queued.push(event);
295
+ }, onAttribute: (attribute, element) => {
296
+ queued.push({ type: "attribute", attribute, element });
101
297
  } } : {}
102
298
  });
103
299
  let step = parser.next();
@@ -113,6 +309,19 @@ async function parseStoredXml(source, context, budget, recover, consume) {
113
309
  if (typeof step.value === "number") {
114
310
  const checkpoint = budget.tick(step.value);
115
311
  if (checkpoint) await checkpoint;
312
+ } else if ("attributeOperation" in step.value) {
313
+ await attributes.execute(step.value);
314
+ } else if ("namespaceOperation" in step.value) {
315
+ const request = step.value;
316
+ const scope = new StoredStringMap(frameStorage, budget, request.scope.reference);
317
+ const previous = await scope.get(request.prefix);
318
+ if (request.namespaceOperation === "get") {
319
+ if (previous !== void 0) request.value = previous;
320
+ request.complete = true;
321
+ } else {
322
+ const next = await scope.set(request.prefix, request.value);
323
+ request.result = { reference: next.reference, size: request.scope.size + (previous === void 0 ? 1 : 0) };
324
+ }
116
325
  } else if ("frameOperation" in step.value) {
117
326
  await frames.execute(step.value);
118
327
  } else {
@@ -150,111 +359,6 @@ async function parseStoredXml(source, context, budget, recover, consume) {
150
359
 
151
360
  // packages/safe-bash-xml-engine/src/stored-document.ts
152
361
  import { PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
153
-
154
- // packages/safe-bash-xml-engine/src/stored-namespaces.ts
155
- var StoredNamespaces = class _StoredNamespaces {
156
- constructor(storage, budget, reference = 0) {
157
- this.storage = storage;
158
- this.budget = budget;
159
- this.reference = reference;
160
- }
161
- storage;
162
- budget;
163
- reference;
164
- async read(reference) {
165
- const header = await this.storage.read(reference, 8);
166
- const size = new DataView(header.buffer, header.byteOffset, 8).getFloat64(0, true);
167
- const decoder = new TextDecoder(), parts = [];
168
- for (let offset = 0; offset < size; offset += 16384) {
169
- const length = Math.min(16384, size - offset);
170
- const checkpoint = this.budget.tick(length);
171
- if (checkpoint) await checkpoint;
172
- parts.push(decoder.decode(await this.storage.read(reference + 8 + offset, length), { stream: true }));
173
- }
174
- parts.push(decoder.decode());
175
- return JSON.parse(parts.join(""));
176
- }
177
- async write(entry) {
178
- const source = JSON.stringify(entry), encoder = new TextEncoder(), header = new Uint8Array(8);
179
- const reference = await this.storage.append(header);
180
- let size = 0;
181
- for (let offset = 0; offset < source.length; ) {
182
- let end = Math.min(source.length, offset + 4096);
183
- const last = source.charCodeAt(end - 1);
184
- if (end < source.length && last >= 55296 && last <= 56319) end--;
185
- const bytes = encoder.encode(source.slice(offset, end));
186
- const checkpoint = this.budget.tick(bytes.length);
187
- if (checkpoint) await checkpoint;
188
- await this.storage.append(bytes);
189
- size += bytes.length;
190
- offset = end;
191
- }
192
- new DataView(header.buffer).setFloat64(0, size, true);
193
- await this.storage.write(reference, header);
194
- return reference;
195
- }
196
- async get(prefix) {
197
- let reference = this.reference;
198
- while (reference) {
199
- const entry = await this.read(reference);
200
- const checkpoint = this.budget.tick(prefix.length + 1);
201
- if (checkpoint) await checkpoint;
202
- if (prefix === entry.prefix) return entry.uri;
203
- reference = prefix < entry.prefix ? entry.left : entry.right;
204
- }
205
- return void 0;
206
- }
207
- async height(reference) {
208
- return reference ? (await this.read(reference)).height : 0;
209
- }
210
- async updated(entry) {
211
- return this.write({ ...entry, height: 1 + Math.max(await this.height(entry.left), await this.height(entry.right)) });
212
- }
213
- async rotate(entry, left) {
214
- const pivot = await this.read(left ? entry.right : entry.left);
215
- const child = await this.updated(left ? { ...entry, right: pivot.left } : { ...entry, left: pivot.right });
216
- return this.updated(left ? { ...pivot, left: child } : { ...pivot, right: child });
217
- }
218
- async balance(entry) {
219
- const difference = await this.height(entry.left) - await this.height(entry.right);
220
- if (difference > 1) {
221
- const child = await this.read(entry.left);
222
- if (await this.height(child.left) < await this.height(child.right)) entry = { ...entry, left: await this.rotate(child, true) };
223
- return this.rotate(entry, false);
224
- }
225
- if (difference < -1) {
226
- const child = await this.read(entry.right);
227
- if (await this.height(child.right) < await this.height(child.left)) entry = { ...entry, right: await this.rotate(child, false) };
228
- return this.rotate(entry, true);
229
- }
230
- return this.updated(entry);
231
- }
232
- async set(prefix, uri) {
233
- const insert = async (reference) => {
234
- if (!reference) return this.write({ prefix, uri, left: 0, right: 0, height: 1 });
235
- const entry = await this.read(reference);
236
- const checkpoint = this.budget.tick(prefix.length + uri.length + 1);
237
- if (checkpoint) await checkpoint;
238
- if (prefix === entry.prefix) return entry.uri === uri ? reference : this.write({ ...entry, uri });
239
- const side = prefix < entry.prefix ? "left" : "right";
240
- const child = await insert(entry[side]);
241
- return child === entry[side] ? reference : this.balance({ ...entry, [side]: child });
242
- };
243
- return new _StoredNamespaces(this.storage, this.budget, await insert(this.reference));
244
- }
245
- async *[Symbol.asyncIterator]() {
246
- const visit = async function* (scope, reference) {
247
- if (!reference) return;
248
- const entry = await scope.read(reference);
249
- yield* visit(scope, entry.left);
250
- yield [entry.prefix, entry.uri];
251
- yield* visit(scope, entry.right);
252
- };
253
- yield* visit(this, this.reference);
254
- }
255
- };
256
-
257
- // packages/safe-bash-xml-engine/src/stored-document.ts
258
362
  var headerBytes = 80;
259
363
  var namespacesField = 72;
260
364
  var parentField = 0;
@@ -289,10 +393,19 @@ var StoredXmlDocument = class _StoredXmlDocument {
289
393
  try {
290
394
  context.registerCleanup?.(document.close.bind(document));
291
395
  document.documentReference = await document.storage.append(new Uint8Array(headerBytes));
292
- const namespaces = await new StoredNamespaces(document.storage, budget).set("xml", "http://www.w3.org/XML/1998/namespace");
396
+ const namespaces = await new StoredStringMap(document.storage, budget).set("xml", "http://www.w3.org/XML/1998/namespace");
293
397
  await document.set(document.documentReference, namespacesField, namespaces.reference);
294
398
  let parent = document.documentReference, fragmentTail = 0;
295
399
  const consume = async (event) => {
400
+ if (event.type === "attribute") {
401
+ await document.append(parent, { kind: "attribute", value: event.attribute });
402
+ if (event.attribute.namespace === "http://www.w3.org/2000/xmlns/") {
403
+ const scope = await document.namespaceScope(parent);
404
+ const updated = await scope.set(event.attribute.name === "xmlns" ? "" : event.attribute.localName, event.attribute.value);
405
+ await document.set(parent, namespacesField, updated.reference);
406
+ }
407
+ return;
408
+ }
296
409
  if (event.type === "close") {
297
410
  parent = await document.field(parent, parentField);
298
411
  return;
@@ -314,13 +427,8 @@ var StoredXmlDocument = class _StoredXmlDocument {
314
427
  if (continuation) await document.set(fragmentTail, fragmentField, reference);
315
428
  fragmentTail = reference;
316
429
  if (event.type === "open") {
317
- let namespaces2 = await document.namespaceScope(parent);
318
- for (const attribute of event.element.attributes) if (attribute.namespace === "http://www.w3.org/2000/xmlns/")
319
- namespaces2 = await namespaces2.set(attribute.name === "xmlns" ? "" : attribute.localName, attribute.value);
430
+ const namespaces2 = await document.namespaceScope(parent);
320
431
  await document.set(reference, namespacesField, namespaces2.reference);
321
- for (const attribute of event.element.attributes) {
322
- await document.append(reference, { kind: "attribute", value: attribute });
323
- }
324
432
  if (!document.rootReference) document.rootReference = reference;
325
433
  parent = reference;
326
434
  }
@@ -397,8 +505,9 @@ var StoredXmlDocument = class _StoredXmlDocument {
397
505
  return value;
398
506
  }
399
507
  async namespaceScope(reference) {
400
- return new StoredNamespaces(this.storage, this.budget, await this.field(reference, namespacesField));
508
+ return new StoredStringMap(this.storage, this.budget, await this.field(reference, namespacesField));
401
509
  }
510
+ /** Load scalar metadata only; attributes and namespace scopes have separate iterators. */
402
511
  async metadata(reference) {
403
512
  const size = await this.field(reference, sizeField);
404
513
  const decoder = new TextDecoder();
@@ -544,7 +653,7 @@ var StoredXmlDocument = class _StoredXmlDocument {
544
653
  };
545
654
 
546
655
  export {
547
- StoredNamespaces,
656
+ StoredStringMap,
548
657
  parseStoredXml,
549
658
  StoredXmlDocument
550
659
  };
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  createPropertyPart
3
- } from "./chunk-OFONWWEZ.js";
3
+ } from "./chunk-5IHJWBDR.js";
4
4
  import {
5
5
  measurePackageResourceSerialization
6
- } from "./chunk-RTHYAGKI.js";
6
+ } from "./chunk-ETN25WCR.js";
7
7
  import {
8
8
  validateDocxInvocation
9
- } from "./chunk-ZM7HMBAJ.js";
9
+ } from "./chunk-BDGNKRY4.js";
10
10
  import {
11
11
  normalizeDocxPropertyOptions
12
- } from "./chunk-GAROGIVU.js";
12
+ } from "./chunk-NP2QXF2X.js";
13
13
  import {
14
14
  assertDocumentEditable,
15
15
  publishDocumentArchive
16
- } from "./chunk-N3ZH4YYH.js";
16
+ } from "./chunk-LTWX23FS.js";
17
17
  import {
18
18
  SemanticValidationError,
19
19
  validateDocumentArchive
20
- } from "./chunk-WMV5224N.js";
20
+ } from "./chunk-FILE5PBI.js";
21
21
  import {
22
22
  readDocumentArchive
23
23
  } from "./chunk-5BUL25DF.js";
@@ -26,7 +26,7 @@ import {
26
26
  UnsupportedEditError,
27
27
  editActivePropertyXml,
28
28
  xmlValue
29
- } from "./chunk-LZY46GYY.js";
29
+ } from "./chunk-QMWBKR4C.js";
30
30
  import {
31
31
  customPropertyFormatId,
32
32
  normalizePropertyDate,
@@ -37,7 +37,7 @@ import {
37
37
  readPropertyNodes,
38
38
  readPropertyParts,
39
39
  serializePropertyScalar
40
- } from "./chunk-QDV2NIFR.js";
40
+ } from "./chunk-2TMTGVJR.js";
41
41
  import {
42
42
  documentDialects
43
43
  } from "./chunk-WLANDWNW.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  packageViewBatchActions
3
- } from "./chunk-35DU6I2M.js";
3
+ } from "./chunk-7ZEGARPB.js";
4
4
  import {
5
5
  imageBatchActions
6
- } from "./chunk-WIW3KDBS.js";
6
+ } from "./chunk-7NFICYRU.js";
7
7
  import {
8
8
  packUriBatchActions
9
9
  } from "./chunk-EBWCAGLA.js";
@@ -23,20 +23,20 @@ import {
23
23
  TableStyle,
24
24
  modelOutput,
25
25
  setStyleLinks
26
- } from "./chunk-ET6LMDEX.js";
26
+ } from "./chunk-EV3DPRWE.js";
27
27
  import {
28
28
  StylesPart,
29
29
  XmlElementView
30
- } from "./chunk-TXU7MMHN.js";
30
+ } from "./chunk-5RDS6CNQ.js";
31
31
  import {
32
32
  modelVfsResolver
33
- } from "./chunk-IZ3SD5S2.js";
33
+ } from "./chunk-K2NV6H7E.js";
34
34
  import {
35
35
  partProviderReceivers
36
- } from "./chunk-BKK4MS3V.js";
36
+ } from "./chunk-RR6XG2I6.js";
37
37
  import {
38
38
  publishDocumentArchive
39
- } from "./chunk-N3ZH4YYH.js";
39
+ } from "./chunk-LTWX23FS.js";
40
40
  import {
41
41
  Cm,
42
42
  Emu,
@@ -54,7 +54,7 @@ import {
54
54
  enumToXml,
55
55
  enumValue,
56
56
  isLength
57
- } from "./chunk-FEKECRJP.js";
57
+ } from "./chunk-EBTKM7KX.js";
58
58
  import {
59
59
  DocxUsageError
60
60
  } from "./chunk-WXMYTNWS.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  characterizeRasterHeader
3
- } from "./chunk-JA36YOZI.js";
3
+ } from "./chunk-LUJUYUOG.js";
4
4
  import {
5
5
  UnsupportedEditError,
6
6
  activeXmlChildren,
@@ -10,7 +10,7 @@ import {
10
10
  runElementOpen,
11
11
  splitNativeTextRunXml,
12
12
  xmlValue
13
- } from "./chunk-LZY46GYY.js";
13
+ } from "./chunk-QMWBKR4C.js";
14
14
  import {
15
15
  dialectForNamespace,
16
16
  documentDialects
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  applyTableUpdate,
3
3
  readTable
4
- } from "./chunk-HOJ7WDTS.js";
4
+ } from "./chunk-IJZUUXLL.js";
5
5
  import {
6
6
  nodeFor
7
- } from "./chunk-LMLBQSAM.js";
7
+ } from "./chunk-YW7WU7W2.js";
8
8
  import {
9
9
  attr,
10
10
  required
11
- } from "./chunk-A5SPMSKD.js";
11
+ } from "./chunk-A32PUWYE.js";
12
12
  import {
13
13
  parseXmlPart
14
14
  } from "./chunk-7PYDVQPB.js";
@@ -0,0 +1,137 @@
1
+ import {
2
+ characters
3
+ } from "./chunk-KM2SMMXZ.js";
4
+ import {
5
+ readJsonNumber
6
+ } from "./chunk-NUGQQDGE.js";
7
+
8
+ // packages/safe-bash-presentation-engine/src/property-value.ts
9
+ function decodePropertyValue(type, value) {
10
+ if (type === "number")
11
+ return value.trim() !== "" && Number.isFinite(Number(value)) ? Number(value) : null;
12
+ if (type === "boolean")
13
+ return value === "true" || value === "1" ? true : value === "false" || value === "0" ? false : null;
14
+ if (type === "date") {
15
+ const segments = value.split("T");
16
+ if (segments.length > 2) return null;
17
+ const calendar = segments[0].split("-");
18
+ if (calendar.length > 3 || calendar[0]?.length !== 4 || calendar.some(
19
+ (v, i) => v.length !== (i === 0 ? 4 : 2) || [...v].some((c) => c < "0" || c > "9")
20
+ ))
21
+ return null;
22
+ const year = Number(calendar[0]), month = Number(calendar[1] ?? 1), day = Number(calendar[2] ?? 1);
23
+ const leap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
24
+ if (year < 1 || month < 1 || month > 12 || day < 1 || day > [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1])
25
+ return null;
26
+ if (segments.length === 2 && (calendar.length !== 3 || !(value.endsWith("Z") || value.slice(19).includes("+") || value.slice(19).includes("-"))))
27
+ return null;
28
+ const date = new Date(
29
+ segments.length === 1 ? `${calendar[0]}-${calendar[1] ?? "01"}-${calendar[2] ?? "01"}T00:00:00Z` : value
30
+ );
31
+ return Number.isFinite(date.getTime()) ? date.toISOString().slice(0, 19) + "Z" : null;
32
+ }
33
+ return value;
34
+ }
35
+
36
+ // packages/safe-bash-presentation-engine/src/retained-property-value.ts
37
+ async function readRetainedPropertyValue(type, source, check) {
38
+ if (type !== "number") {
39
+ let value2 = "", overflow = false, fraction = false, fractionDigits = 0;
40
+ const limit = type === "boolean" ? 5 : 128;
41
+ for await (const character of characters(source)) {
42
+ check();
43
+ if (overflow) continue;
44
+ if (type === "date") {
45
+ if (fraction && character >= "0" && character <= "9") {
46
+ if (fractionDigits++ < 3) value2 += character;
47
+ continue;
48
+ }
49
+ fraction = value2.length === 19 && character === ".";
50
+ }
51
+ if (value2.length >= limit) overflow = true;
52
+ else value2 += character;
53
+ }
54
+ check();
55
+ return overflow ? null : decodePropertyValue(type, value2);
56
+ }
57
+ let state = "start";
58
+ let invalid = false, trailing = false, signed = false, firstZero = false, integerDigits = 0, radix = 0, radixDigits = 0, prefix = "", radixOverflow = false;
59
+ async function* decimal() {
60
+ for await (const character of characters(source)) {
61
+ check();
62
+ if (invalid) continue;
63
+ if (character.trim() === "") {
64
+ if (state !== "start") trailing = true;
65
+ continue;
66
+ }
67
+ if (trailing) {
68
+ invalid = true;
69
+ continue;
70
+ }
71
+ const digit = character >= "0" && character <= "9";
72
+ if (state === "radix") {
73
+ const code = character.toLowerCase().charCodeAt(0), value2 = digit ? code - 48 : code >= 97 && code <= 102 ? code - 87 : Infinity;
74
+ if (value2 >= radix) {
75
+ invalid = true;
76
+ continue;
77
+ }
78
+ radixDigits++;
79
+ if (prefix || value2) {
80
+ if (prefix.length < 1024) prefix += character;
81
+ else radixOverflow = true;
82
+ }
83
+ continue;
84
+ }
85
+ if (state === "start" || state === "sign") {
86
+ if (state === "start" && (character === "+" || character === "-")) {
87
+ signed = true;
88
+ state = "sign";
89
+ yield character;
90
+ continue;
91
+ }
92
+ if (digit) {
93
+ state = "integer";
94
+ integerDigits = 1;
95
+ firstZero = character === "0";
96
+ } else if (character === ".") state = "dot";
97
+ else invalid = true;
98
+ } else if (state === "integer") {
99
+ if (digit) integerDigits++;
100
+ else if (!signed && firstZero && integerDigits === 1 && ["x", "b", "o"].includes(character.toLowerCase())) {
101
+ radix = { x: 16, b: 2, o: 8 }[character.toLowerCase()];
102
+ state = "radix";
103
+ continue;
104
+ } else if (character === ".") state = "fraction";
105
+ else if (character === "e" || character === "E") state = "exponent";
106
+ else invalid = true;
107
+ } else if (state === "dot") {
108
+ if (digit) state = "fraction";
109
+ else invalid = true;
110
+ } else if (state === "fraction") {
111
+ if (character === "e" || character === "E") state = "exponent";
112
+ else if (!digit) invalid = true;
113
+ } else if (state === "exponent" || state === "exponent-sign") {
114
+ if (digit) state = "exponent-digits";
115
+ else if (state === "exponent" && (character === "+" || character === "-")) state = "exponent-sign";
116
+ else invalid = true;
117
+ } else if (!digit) invalid = true;
118
+ if (!invalid) yield character;
119
+ }
120
+ }
121
+ const value = await readJsonNumber(decimal(), async () => {
122
+ check();
123
+ }, false);
124
+ check();
125
+ if (invalid || ["start", "sign", "dot", "exponent", "exponent-sign"].includes(state)) return null;
126
+ if (radix) {
127
+ if (!radixDigits || radixOverflow) return null;
128
+ const result = Number(`0${radix === 16 ? "x" : radix === 8 ? "o" : "b"}${prefix || "0"}`);
129
+ return Number.isFinite(result) ? result : null;
130
+ }
131
+ return Number.isFinite(value) ? value : null;
132
+ }
133
+
134
+ export {
135
+ decodePropertyValue,
136
+ readRetainedPropertyValue
137
+ };