@poe-platform/safe-bash 0.1.815 → 0.1.816
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.
- package/dist/image-ast/index.js +1 -1
- package/dist/mp4-ast/codecs.d.ts +3 -0
- package/dist/mp4-ast/esds-source.d.ts +7 -0
- package/dist/mp4-ast/index.d.ts +5 -1
- package/dist/mp4-ast/mp4-codec-metadata.d.ts +48 -0
- package/dist/mp4-ast/mp4-codec-source.d.ts +8 -0
- package/dist/mp4-ast/mp4-packets-source.d.ts +11 -0
- package/dist/pdf-ast/ast.d.ts +6 -0
- package/dist/pdf-ast/content/evaluator.d.ts +4 -1
- package/dist/pdf-ast/content/stored-dictionary.d.ts +15 -1
- package/dist/pdf-ast/content/stored-record.d.ts +6 -0
- package/dist/pdf-ast/cos/retained-writer.d.ts +1 -0
- package/dist/pdf-ast/cos/value-parser.d.ts +5 -0
- package/dist/pdf-ast/edit/retained-graph.d.ts +1 -0
- package/dist/pdf-ast/edit/retained-page-copy.d.ts +10 -0
- package/dist/pdf-ast/extract/images.d.ts +2 -1
- package/dist/pdf-ast/fonts/resolve.d.ts +1 -0
- package/dist/pdf-ast/index.d.ts +2 -0
- package/dist/pdf-ast/index.js +1091 -322
- package/dist/pdf-ast/render/raster.d.ts +14 -0
- package/dist/pdf-ast/render/svg-image-stream.d.ts +6 -0
- package/dist/pdf-ast/render/svg-path-stream.d.ts +15 -0
- package/dist/pdf-ast/retained-document.d.ts +1 -1
- package/dist/safe-bash/chunks/{chunk-I6ECNJMR.js → chunk-AXGI5JVL.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-TPG55BAQ.js → chunk-FQRI5AS5.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-TWWGAW4M.js → chunk-HD6DWOAC.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-5JCZEXEM.js → chunk-SXSEF5E2.js} +12 -7
- package/dist/safe-bash/command-chunks/biff-UBP2BZLK-JPODPKS3.js +5448 -0
- package/dist/safe-bash/command-chunks/{chunk-S7HIOT7Z.js → chunk-26JE5JEB.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-AG2SNMP5.js → chunk-2ALHVXEM.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4YLACJHE.js → chunk-2IMIKROX.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-MYZ46FQL.js → chunk-2QZUAZTH.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-YAD7EV4N.js → chunk-2TWXRJPB.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-NYFYTL5G.js → chunk-345YBIHP.js} +27 -27
- package/dist/safe-bash/command-chunks/{chunk-3MG5EAMX.js → chunk-35DU6I2M.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-FSVJ67G5.js → chunk-3DWFXESW.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-TKCUGMRZ.js → chunk-3K5CVXUV.js} +18 -18
- package/dist/safe-bash/command-chunks/{chunk-6LPSKLLD.js → chunk-3MUFXGA2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-44F5TOHZ.js → chunk-3PM46VWH.js} +15 -15
- package/dist/safe-bash/command-chunks/{chunk-6QYSF7I2.js → chunk-3ZWFE4CK.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-NEYITAAO.js → chunk-45DKGZYO.js} +744 -328
- package/dist/safe-bash/command-chunks/{chunk-U3C6IT2C.js → chunk-4772DJKS.js} +14 -10
- package/dist/safe-bash/command-chunks/{chunk-FOONI6BD.js → chunk-4ABR3KGK.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-7KZ5LWV2.js → chunk-4IDV763L.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-FGGHYUWR.js → chunk-4QEJPP3K.js} +102 -7
- package/dist/safe-bash/command-chunks/{chunk-RV5AGXOV.js → chunk-4X2MPZXW.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-LNTEV56A.js → chunk-4YFTJS5U.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6XES7Z4G.js → chunk-57PK2QFX.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-42MEXZBJ.js → chunk-5GDF5FAS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-BS3ZEQGT.js → chunk-5KZMR6AJ.js} +18 -16
- package/dist/safe-bash/command-chunks/{chunk-ZU2KJMXO.js → chunk-5MNQTHED.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-W25EIKDJ.js → chunk-5NC2IQMQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KY4LCHUF.js → chunk-5O45KGW5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GYM5ICK4.js → chunk-5V7WIQ2D.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-GPGLTWNR.js → chunk-5XUWGUGN.js} +16 -11
- package/dist/safe-bash/command-chunks/{chunk-SUTHGUD3.js → chunk-5YL453ZF.js} +34 -34
- package/dist/safe-bash/command-chunks/{chunk-IHXZMAMY.js → chunk-62RG3GHF.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-P2LT6TGR.js → chunk-6EZWG56T.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-CCMAHM3I.js → chunk-6JGICYHP.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-AWPI4DZR.js → chunk-6KJDTKE4.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FUQMEUAT.js → chunk-6M3JTPKE.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-H33D4R26.js → chunk-6RLWPB44.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-3GRMU7TM.js → chunk-6W4RMBFH.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-RIVKF77R.js → chunk-6YF2QADH.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LEO4VRIN.js → chunk-77ROD2TR.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-XNGM3W5R.js → chunk-7B2MHKIW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RFMHNTTF.js → chunk-7OCTMVYJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-DBLQUZGN.js → chunk-7PYDVQPB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-AM5LANIE.js → chunk-A2L3U7DW.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-UYGQEQIP.js → chunk-A4P37F3P.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-ADHFF2IM.js → chunk-A5SPMSKD.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-ENEIE44W.js → chunk-A6OTPNNI.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-AF2IO57Q.js +733 -0
- package/dist/safe-bash/command-chunks/{chunk-AFPXADZG.js → chunk-AHD3CGAY.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-YW2VYN4V.js → chunk-ALD53QFL.js} +74 -27
- package/dist/safe-bash/command-chunks/{chunk-4B2ZUGLT.js → chunk-ARE267HR.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-OTF2AJ5M.js → chunk-AYQPJQJR.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-2VVJRVYM.js → chunk-B6XTAKKQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GCHB7VNX.js → chunk-BIJW6QWB.js} +17 -17
- package/dist/safe-bash/command-chunks/{chunk-OVEPYULA.js → chunk-BKK4MS3V.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3EB2FSAN.js → chunk-BOVDUJ3A.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-SEPUP6TZ.js → chunk-BSTABZIK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ATHHWPSE.js → chunk-BZRWZ6GO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-BZMNC7Q5.js → chunk-CGJ7GMHO.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-RGDOYWOD.js → chunk-CHZE6FNT.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-V7E3PZOK.js → chunk-CKA7ZROU.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-MEM2ZPMI.js → chunk-CKIXC7AO.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Y54L4P4J.js → chunk-CORUUCS2.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-QDVDBN2N.js → chunk-DBZCTL7C.js} +150 -35
- package/dist/safe-bash/command-chunks/{chunk-6ZGCKUAM.js → chunk-DIRK47GT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WYZG3DRR.js → chunk-DM5WURQL.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-EBHOZIBS.js → chunk-DOVWHVHI.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-ZIGENXGC.js → chunk-DXOXUKQB.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-JR3Q6QNL.js → chunk-DZOKH5BL.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-6EINUY5G.js → chunk-E22EAYJN.js} +54 -12
- package/dist/safe-bash/command-chunks/{chunk-3EASXF5D.js → chunk-E4TF5W6O.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-MLOYUXUV.js → chunk-EJ4UP7DA.js} +31 -9
- package/dist/safe-bash/command-chunks/{chunk-USGZN2KE.js → chunk-ENMJHB2C.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-ZSQZHFWS.js → chunk-ERWIJYCS.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-S2QNBAN6.js → chunk-ET6LMDEX.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-6XGDWFNQ.js → chunk-EWC56JNI.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-EQWFKNHJ.js → chunk-EZDWPTYB.js} +19 -19
- package/dist/safe-bash/command-chunks/{chunk-CQBACD2V.js → chunk-F2NF6FHV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NFII726L.js → chunk-FAU2KL6I.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4EHY6J2Z.js → chunk-FB2WPI3M.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-2PKBXGXD.js → chunk-FEBTT5NH.js} +5 -5
- package/dist/safe-bash/command-chunks/chunk-FGARVKAX.js +704 -0
- package/dist/safe-bash/command-chunks/{chunk-N4MUBJCT.js → chunk-FGHSE3RZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WBKB7HBZ.js → chunk-FHQOFEQK.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-3ZRCL756.js → chunk-FJLSYX5P.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-PMWW7KSB.js → chunk-FJSD43VF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XKAUKLF7.js → chunk-FLSXHLJG.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-3EW7GYHM.js → chunk-FR63MJSO.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-NRFTYZ2R.js → chunk-FUYZUETI.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-JUHOL5KB.js → chunk-G3FK5VVG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4UPKVQWH.js → chunk-G3LUT475.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-Q7UZTMF4.js → chunk-GAROGIVU.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4RRYWHED.js → chunk-GMBUOYTN.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-FYYFV6PW.js → chunk-GR4ONCQ5.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-XTEIT5CI.js → chunk-GTOMW4VV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-OVQP6KH5.js → chunk-H56BSMFQ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-RQYPFLZJ.js → chunk-HOJ7WDTS.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-BLIFGBIO.js → chunk-HOKPYTHQ.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-HQEYSSZV.js +152 -0
- package/dist/safe-bash/command-chunks/{chunk-NEMUPUUB.js → chunk-ICJH6A73.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-CSE4VQKG.js → chunk-IJE65P52.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-MKOIPOXX.js → chunk-IOXMGD2H.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-LDW3RF7Y.js → chunk-ISFGPCED.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-S43QRKDC.js → chunk-IVKAFEPO.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-A347DLRB.js → chunk-IWVANZWH.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-ZXELXF2H.js → chunk-IZ3SD5S2.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-HGIMFVI2.js → chunk-J6FNSVHT.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-GLAF45M7.js → chunk-JA36YOZI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WHNYT34N.js → chunk-K2R7H3KO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-HQ2UN2L2.js → chunk-K7VDCBXW.js} +21 -21
- package/dist/safe-bash/command-chunks/{chunk-CKEMZUE3.js → chunk-KDBU5Q2N.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-6VBDJC6V.js → chunk-KDDXLHN7.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-NEVQWOU6.js → chunk-KLAC2MIZ.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-QGD64UHJ.js → chunk-KLCHCSIV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-CXME4YHU.js → chunk-KM2SMMXZ.js} +59 -201
- package/dist/safe-bash/command-chunks/{chunk-RHU44OMN.js → chunk-KXM3HTAF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AVOGFREX.js → chunk-KYIGYYEY.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5OM3UIK3.js → chunk-L2VLASZ4.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Z7QOSXQC.js → chunk-LECGQSQW.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-RXQ2G2YK.js → chunk-LFSWLJPR.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-OSYY6E23.js → chunk-LJ3UYESS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-MVLVIMJ6.js → chunk-LMLBQSAM.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-MGMTRGKM.js → chunk-LNAZ3E4Q.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-WJ2ERUCQ.js → chunk-LNKZVU5V.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WWHMI4S3.js → chunk-LQDANF2B.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-CIRDVCAZ.js → chunk-LQX7RAF7.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-SWAKALDJ.js → chunk-LT2YCGC5.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-Y7AXMCFV.js → chunk-LZY46GYY.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-VT2PHQ63.js → chunk-MDFNUNK5.js} +15 -15
- package/dist/safe-bash/command-chunks/{chunk-YP3WWV5N.js → chunk-MN3BB4WW.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-WTVJLHMG.js → chunk-MOUCMZZP.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IB5QP4LF.js → chunk-MQE77MEQ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FSYMSWJU.js → chunk-MUTARE5I.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-F762XDNG.js → chunk-MZYQKH26.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-N6G3345Q.js → chunk-N32AP43V.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-XU6S3XUZ.js → chunk-N35IJXBK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-EVYKV3QI.js → chunk-N3ZH4YYH.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-VUWXLH3E.js → chunk-N4HWOLGZ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WAT2562G.js → chunk-N5J3IZZK.js} +8042 -7189
- package/dist/safe-bash/command-chunks/{chunk-W3ZSWK76.js → chunk-NCNHJRIY.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-FXCSPPYE.js → chunk-NDALIHKK.js} +20 -20
- package/dist/safe-bash/command-chunks/{chunk-BS5JEUEW.js → chunk-NKK76B4V.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-4EZJV4FZ.js → chunk-NLCUQD7Y.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RHDERFMR.js → chunk-O2HNOQQG.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-G2COZLXX.js → chunk-OBIXFO25.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-47IAU25U.js → chunk-OCV5ZU35.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-3YEQI5B7.js → chunk-OFDJJRAD.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-VDTFVRYX.js → chunk-OFONWWEZ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-F4YFTO2K.js → chunk-OHEZQ4QA.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-JW6WVNTM.js → chunk-OIHQXURE.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZTMZO4IT.js → chunk-ONQP4FNV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-K2WOMJOQ.js → chunk-OVUY46QF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-DGBQ7QDE.js → chunk-OWCBX5M2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LKGTH2Q7.js → chunk-P462JTNT.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-5LFGXN3D.js → chunk-P4OWVKMD.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-46AMTJPE.js → chunk-POGVOCOB.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-PLMF35XK.js → chunk-PPN53PX3.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-V5XC43BX.js → chunk-PRO7JOIH.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-UJERQEJB.js → chunk-PU5DMQGG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IWHNRYER.js → chunk-Q65GWGQR.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BLGGAHQW.js → chunk-QCIAX6HZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ET5SFGRH.js → chunk-QDV2NIFR.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-Y42KSX63.js → chunk-QMBMZSJF.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-KUOCGGEU.js → chunk-QNETPOMH.js} +6 -5
- package/dist/safe-bash/command-chunks/{chunk-QB72X7FF.js → chunk-QNX5LZBK.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-LZ2JFMKT.js → chunk-QOKFSYD5.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-7DOLY7IV.js → chunk-R7LF4XQV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6CDDKNNA.js → chunk-RINR7XPR.js} +36 -10
- package/dist/safe-bash/command-chunks/{chunk-MPXMRTMY.js → chunk-ROQ3VNVX.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-6WNVGCXD.js → chunk-RRAQII52.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-2BNGPR6Z.js → chunk-RTHYAGKI.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-RTKDZBJS.js +816 -0
- package/dist/safe-bash/command-chunks/{chunk-JVKE7YZN.js → chunk-RVWIEXR7.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-XM5QJCPD.js → chunk-S5ER73EA.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-YRPXBGRX.js → chunk-SBXS4S6Y.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-HI6ZYH3W.js → chunk-SHLT5R64.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-Q5PWYPQV.js → chunk-SICTBSLW.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-AXXZNB7U.js → chunk-SL4LD25A.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-JGKSWDGP.js → chunk-SNA2LVBX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TXPDKEGY.js → chunk-SWIF6BBY.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-PS5GDFIP.js → chunk-T2FRXSQT.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HELAVGZH.js → chunk-T4SEQU66.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-3SPLP2DB.js → chunk-T5OQ53XS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KBAQHE5Y.js → chunk-TG2RVQLP.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CZ5K2YPU.js → chunk-TXU7MMHN.js} +24 -24
- package/dist/safe-bash/command-chunks/{chunk-TYPS5MOU.js → chunk-TXWDR2P4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ETXPMVR6.js → chunk-TY7JXEWI.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-X6OHFKBL.js → chunk-U42WHQRH.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-Z2WNYEPD.js → chunk-UFLMOU3B.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-2BLTUQNK.js → chunk-UJYXSLM6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-Q7TVCBU2.js → chunk-UKAGRRLZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4GQKCUS5.js → chunk-UPWLHHZ2.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-5L4YGRQU.js → chunk-URQSUMMJ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-KPHLESD4.js → chunk-UT5X6QRU.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-T5S4SJGO.js → chunk-V6JPIZUW.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-MKK6FM5H.js → chunk-VMZIAFVJ.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-HK6MSB7Z.js → chunk-VNNNVT4C.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-ROL5AEX6.js → chunk-VVV45NLY.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-VVWHFNHD.js +502 -0
- package/dist/safe-bash/command-chunks/{chunk-KCLJGRU7.js → chunk-VZTVR3JI.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-PLR5IULU.js → chunk-WDVPHDBH.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-MNK3DDH6.js → chunk-WH624PKJ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-TJLXSENN.js → chunk-WHZ6XK7Y.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-DN6MSXY7.js → chunk-WIW3KDBS.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-GXMPXMDP.js → chunk-WMBELKPP.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-NHNZYWPW.js → chunk-WMV5224N.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-RTNI47C5.js → chunk-WOL3LBXE.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-7SOE7XIS.js → chunk-WVD5WZXD.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-XMTR7QGL.js → chunk-X42MJT2J.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-XUJAQA3S.js → chunk-XBWD6SI3.js} +33 -33
- package/dist/safe-bash/command-chunks/{chunk-ZQM37BGE.js → chunk-XFIDOCYH.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-IBYMPAUW.js → chunk-XPQUUFQD.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NQINS4XY.js → chunk-XVEI4HZL.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KSBNZTAZ.js → chunk-YKODRSGT.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-WZRFS5OY.js → chunk-YXR4JE4U.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-DCMSPMMD.js → chunk-Z7UIOPHJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AY3KQ4EN.js → chunk-ZAYTFXUX.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DZH54L3F.js → chunk-ZM7HMBAJ.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-NFGCBQN3.js → chunk-ZNCPIZCN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HKGNBH7Z.js → chunk-ZRHKXN6W.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-A45UG4KT.js → chunk-ZZERSKAR.js} +5 -5
- package/dist/safe-bash/command-chunks/{clipboard-BBDK33GP-QZ4ERNQX.js → clipboard-BBDK33GP-VB22F7GI.js} +2 -2
- package/dist/safe-bash/command-chunks/{command-engine-M7S4QIXV.js → command-engine-GHE6QUHU.js} +53 -21
- package/dist/safe-bash/command-chunks/{engine-YUYZJIB4-NZUDFEHL.js → engine-RG6HQCCB-FXYZS264.js} +1 -1
- package/dist/safe-bash/command-chunks/{gnumeric-UJPXWBVR-7VOHQAPM.js → gnumeric-UJPXWBVR-YPXTNEDZ.js} +2 -2
- package/dist/safe-bash/command-chunks/model-store-I7YAWL5V.js +54 -0
- package/dist/safe-bash/command-chunks/{xlsx-RE54MFCS-DI3F765V.js → xlsx-RE54MFCS-IQ6OXXKK.js} +1 -1
- package/dist/safe-bash/commands/bc/index.browser.js +1 -1
- package/dist/safe-bash/full-core.browser.js +4 -4
- package/dist/safe-bash/plugins/index.browser.js +3 -3
- package/dist/safe-bash/registry-entry.browser.js +2 -2
- package/dist/safe-bash/search.browser.js +1 -1
- package/dist/safe-bash/shell/runtime.d.ts +1 -0
- package/dist/safe-bash/shell/runtime.js +12 -3
- package/dist/safe-bash/shell/sync-extra-evaluators.js +7 -4
- package/dist/safe-bash/shell-entry.browser.js +2 -2
- package/dist/safe-bash-command-awk/awk-runtime.js +3 -3
- package/dist/safe-bash-command-awk/awk.js +4 -4
- package/dist/safe-bash-command-awk/index.js +4 -4
- package/dist/safe-bash-command-cp/index.js +3 -3
- package/dist/safe-bash-command-csvkit/index.js +1 -1
- package/dist/safe-bash-command-diff/diff.js +2 -2
- package/dist/safe-bash-command-diff/index.js +3 -3
- package/dist/safe-bash-command-diff/sync.js +2 -2
- package/dist/safe-bash-command-factor/command.js +2 -2
- package/dist/safe-bash-command-factor/index.js +2 -2
- package/dist/safe-bash-command-ffmpeg/index.js +1 -1
- package/dist/safe-bash-command-ffprobe/index.js +2 -2
- package/dist/safe-bash-command-ffprobe/media.d.ts +5 -1
- package/dist/safe-bash-command-ffprobe/media.js +2 -2
- package/dist/safe-bash-command-getopt/command.js +2 -2
- package/dist/safe-bash-command-getopt/index.js +2 -2
- package/dist/safe-bash-command-html-to-markdown/index.js +51 -813
- package/dist/safe-bash-command-html-to-markdown/stored-destination.d.ts +8 -0
- package/dist/safe-bash-command-html-to-markdown/stored-destination.js +10 -0
- package/dist/safe-bash-command-html-to-markdown/stored-text.d.ts +4 -1
- package/dist/safe-bash-command-html-to-markdown/stored-text.js +1 -1
- package/dist/safe-bash-command-htmlq/index.js +1280 -419
- package/dist/safe-bash-command-iconv/command.js +2 -2
- package/dist/safe-bash-command-iconv/index.js +2 -2
- package/dist/safe-bash-command-llm/index.js +2 -2
- package/dist/safe-bash-command-llm/openai.js +2 -2
- package/dist/safe-bash-command-llm/providers/index.js +2 -2
- package/dist/safe-bash-command-llm/providers/openai.js +2 -2
- package/dist/safe-bash-command-node/commands/node/browser.js +4 -4
- package/dist/safe-bash-command-node/commands/node/default-runtime.js +4 -4
- package/dist/safe-bash-command-node/commands/node/safejs.js +4 -4
- package/dist/safe-bash-command-pandoc/command.js +10 -9
- package/dist/safe-bash-command-pandoc/index.js +60 -59
- package/dist/safe-bash-command-patch/index.js +6 -6
- package/dist/safe-bash-command-patch/patch-formats.js +3 -3
- package/dist/safe-bash-command-patch/patch-gnu-reject.js +1 -1
- package/dist/safe-bash-command-patch/patch.js +6 -6
- package/dist/safe-bash-command-patch/stored-patch.d.ts +7 -6
- package/dist/safe-bash-command-patch/unified.d.ts +5 -5
- package/dist/safe-bash-command-patch/unified.js +2 -2
- package/dist/safe-bash-command-pdftk/index.js +21 -108
- package/dist/safe-bash-command-pdftoppm/index.js +131 -27
- package/dist/safe-bash-command-playwright-cli/index.js +12 -12
- package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/capability-events.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/capability-result.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/controller.js +7 -7
- package/dist/safe-bash-command-playwright-cli/playwright/download-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/drop-capability.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/index.js +12 -12
- package/dist/safe-bash-command-playwright-cli/playwright/modal-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/native-evaluation.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/native-json-snapshot.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/native-snapshot.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/open-options.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/profile.js +3 -3
- package/dist/safe-bash-command-playwright-cli/playwright/recording-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/route-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/snapshot.js +3 -3
- package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/tracing-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/webmcp-capabilities.js +1 -1
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- package/dist/safe-bash-command-python/executor.js +11 -11
- package/dist/safe-bash-command-python/index.js +11 -11
- package/dist/safe-bash-command-python/jspi.js +2 -2
- package/dist/safe-bash-command-rg/index.js +3 -3
- package/dist/safe-bash-command-rg/rg-command.js +3 -3
- package/dist/safe-bash-command-safejs/index.js +4 -4
- package/dist/safe-bash-command-safejs/io.js +3 -3
- package/dist/safe-bash-command-safejs/render.js +2 -2
- package/dist/safe-bash-command-safejs/runtime.js +4 -4
- package/dist/safe-bash-command-soffice/index.js +5 -4
- package/dist/safe-bash-command-sort/index.js +3 -3
- package/dist/safe-bash-command-ssconvert/index.js +13 -13
- package/dist/safe-bash-command-tar/create.js +3 -3
- package/dist/safe-bash-command-tar/extract.js +3 -3
- package/dist/safe-bash-command-tar/index.js +7 -7
- package/dist/safe-bash-command-tar/modes.js +5 -5
- package/dist/safe-bash-command-unzip/index.js +2 -2
- package/dist/safe-bash-command-unzip/unzip.js +2 -2
- package/dist/safe-bash-command-xmllint/index.js +1 -1
- package/dist/safe-bash-command-xz/index.js +5 -5
- package/dist/safe-bash-compression-engine/files.js +5 -5
- package/dist/safe-bash-compression-engine/index.js +3 -3
- package/dist/safe-bash-compression-engine/operand.js +6 -6
- package/dist/safe-bash-compression-engine/stream.js +3 -3
- package/dist/safe-bash-compression-engine/zstd-decode.js +2 -2
- package/dist/safe-bash-contracts/escaping.js +3 -3
- package/dist/safe-bash-contracts/filesystem-output.js +3 -3
- package/dist/safe-bash-contracts/index.js +10 -10
- package/dist/safe-bash-docx-engine/ancillary-resources.js +9 -9
- package/dist/safe-bash-docx-engine/batch-operations.js +66 -66
- package/dist/safe-bash-docx-engine/batch-result-schema.js +78 -78
- package/dist/safe-bash-docx-engine/batch.js +77 -77
- package/dist/safe-bash-docx-engine/bookmarks.js +17 -17
- package/dist/safe-bash-docx-engine/charts.js +10 -10
- package/dist/safe-bash-docx-engine/command-option-rules.js +5 -5
- package/dist/safe-bash-docx-engine/command-properties.js +3 -3
- package/dist/safe-bash-docx-engine/comments.js +25 -25
- package/dist/safe-bash-docx-engine/control-bindings.js +20 -20
- package/dist/safe-bash-docx-engine/control-repeat.js +20 -20
- package/dist/safe-bash-docx-engine/controls.js +18 -18
- package/dist/safe-bash-docx-engine/create.js +10 -10
- package/dist/safe-bash-docx-engine/diagrams.js +10 -10
- package/dist/safe-bash-docx-engine/diff.js +12 -12
- package/dist/safe-bash-docx-engine/document-properties.js +15 -15
- package/dist/safe-bash-docx-engine/equations.js +16 -16
- package/dist/safe-bash-docx-engine/extract.js +13 -13
- package/dist/safe-bash-docx-engine/fields.js +22 -22
- package/dist/safe-bash-docx-engine/font-inventory.js +17 -17
- package/dist/safe-bash-docx-engine/font-resources.js +5 -5
- package/dist/safe-bash-docx-engine/image-batch-operations.js +13 -13
- package/dist/safe-bash-docx-engine/image-insertion.js +20 -20
- package/dist/safe-bash-docx-engine/image-layout.js +18 -18
- package/dist/safe-bash-docx-engine/image-replacement.js +21 -21
- package/dist/safe-bash-docx-engine/images.js +18 -18
- package/dist/safe-bash-docx-engine/index.js +113 -113
- package/dist/safe-bash-docx-engine/inspection.js +19 -19
- package/dist/safe-bash-docx-engine/invocation.js +8 -8
- package/dist/safe-bash-docx-engine/io.js +8 -8
- package/dist/safe-bash-docx-engine/links.js +20 -20
- package/dist/safe-bash-docx-engine/lists.js +19 -19
- package/dist/safe-bash-docx-engine/locations.js +14 -14
- package/dist/safe-bash-docx-engine/notes.js +21 -21
- package/dist/safe-bash-docx-engine/objects.js +18 -18
- package/dist/safe-bash-docx-engine/operation-json-schema.js +3 -3
- package/dist/safe-bash-docx-engine/operation-schema.js +2 -2
- package/dist/safe-bash-docx-engine/pack.js +13 -13
- package/dist/safe-bash-docx-engine/package-view-batch-operations.js +21 -21
- package/dist/safe-bash-docx-engine/pandoc-adapter.js +28 -28
- package/dist/safe-bash-docx-engine/paragraph-edit.js +24 -24
- package/dist/safe-bash-docx-engine/part-provider.js +3 -3
- package/dist/safe-bash-docx-engine/property-values.js +3 -3
- package/dist/safe-bash-docx-engine/publication.js +8 -8
- package/dist/safe-bash-docx-engine/removal.js +20 -20
- package/dist/safe-bash-docx-engine/revision-decisions.js +21 -21
- package/dist/safe-bash-docx-engine/revision-edit.js +19 -19
- package/dist/safe-bash-docx-engine/revisions.js +17 -17
- package/dist/safe-bash-docx-engine/run-format.js +19 -19
- package/dist/safe-bash-docx-engine/sanitize.js +33 -33
- package/dist/safe-bash-docx-engine/sections.js +18 -18
- package/dist/safe-bash-docx-engine/settings.js +10 -10
- package/dist/safe-bash-docx-engine/shape-edit.js +20 -20
- package/dist/safe-bash-docx-engine/signatures.js +14 -14
- package/dist/safe-bash-docx-engine/stories.js +21 -21
- package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +37 -37
- package/dist/safe-bash-docx-engine/style-model-batch-operations.js +26 -26
- package/dist/safe-bash-docx-engine/style-model-result-schema.js +43 -43
- package/dist/safe-bash-docx-engine/styles.js +17 -17
- package/dist/safe-bash-docx-engine/table-edit.js +26 -26
- package/dist/safe-bash-docx-engine/table-read.js +15 -15
- package/dist/safe-bash-docx-engine/template.js +21 -21
- package/dist/safe-bash-docx-engine/text-replace.js +19 -19
- package/dist/safe-bash-docx-engine/text-resource-read.js +15 -15
- package/dist/safe-bash-docx-engine/text.js +15 -15
- package/dist/safe-bash-docx-engine/validation.js +6 -6
- package/dist/safe-bash-docx-engine/xml-parts.js +21 -21
- package/dist/safe-bash-line-ending-engine/command.js +4 -4
- package/dist/safe-bash-line-ending-engine/index.js +7 -7
- package/dist/safe-bash-markdown-engine/commonmark-blocks.js +3 -3
- package/dist/safe-bash-markdown-engine/commonmark-inlines.js +3 -3
- package/dist/safe-bash-markdown-engine/gfm-syntax.js +2 -2
- package/dist/safe-bash-markdown-engine/index.js +4 -4
- package/dist/safe-bash-network-engine/aggregate.js +3 -3
- package/dist/safe-bash-network-engine/args.js +3 -3
- package/dist/safe-bash-network-engine/body.js +4 -4
- package/dist/safe-bash-network-engine/decode.js +3 -3
- package/dist/safe-bash-network-engine/fetch-transport.js +3 -3
- package/dist/safe-bash-network-engine/index.js +3 -3
- package/dist/safe-bash-network-engine/output.js +3 -3
- package/dist/safe-bash-network-engine/platform-portable.js +3 -3
- package/dist/safe-bash-network-engine/shared.js +2 -2
- package/dist/safe-bash-network-engine/transfer.js +9 -9
- package/dist/safe-bash-presentation-engine/accessibility.js +31 -30
- package/dist/safe-bash-presentation-engine/animation-editing.js +16 -15
- package/dist/safe-bash-presentation-engine/animations.js +16 -15
- package/dist/safe-bash-presentation-engine/backgrounds.js +17 -16
- package/dist/safe-bash-presentation-engine/bytes.js +4 -3
- package/dist/safe-bash-presentation-engine/chart-editing.js +34 -33
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +25 -24
- package/dist/safe-bash-presentation-engine/charts.js +31 -30
- package/dist/safe-bash-presentation-engine/command-placeholder.js +60 -58
- package/dist/safe-bash-presentation-engine/comments.js +17 -16
- package/dist/safe-bash-presentation-engine/connector-operations.js +32 -31
- package/dist/safe-bash-presentation-engine/connectors.js +29 -28
- package/dist/safe-bash-presentation-engine/content-types.js +5 -4
- package/dist/safe-bash-presentation-engine/creation.js +7 -6
- package/dist/safe-bash-presentation-engine/diff.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/diff.js +44 -33
- package/dist/safe-bash-presentation-engine/drawing-format.js +20 -19
- package/dist/safe-bash-presentation-engine/drawing-operations.js +31 -30
- package/dist/safe-bash-presentation-engine/drawing-schema.js +21 -20
- package/dist/safe-bash-presentation-engine/equations.js +17 -16
- package/dist/safe-bash-presentation-engine/errors.js +3 -2
- package/dist/safe-bash-presentation-engine/fields.js +17 -16
- package/dist/safe-bash-presentation-engine/font-metrics.js +4 -3
- package/dist/safe-bash-presentation-engine/image-extraction.js +20 -19
- package/dist/safe-bash-presentation-engine/image-formatting.js +32 -31
- package/dist/safe-bash-presentation-engine/image-insertion.js +18 -17
- package/dist/safe-bash-presentation-engine/image-replacement.js +21 -20
- package/dist/safe-bash-presentation-engine/image-value.js +5 -4
- package/dist/safe-bash-presentation-engine/images.js +19 -18
- package/dist/safe-bash-presentation-engine/index.js +135 -132
- package/dist/safe-bash-presentation-engine/layouts.js +16 -15
- package/dist/safe-bash-presentation-engine/length.js +4 -3
- package/dist/safe-bash-presentation-engine/links.js +16 -15
- package/dist/safe-bash-presentation-engine/masters.js +15 -14
- package/dist/safe-bash-presentation-engine/media-editing.js +24 -23
- package/dist/safe-bash-presentation-engine/media-extraction.js +17 -16
- package/dist/safe-bash-presentation-engine/media.js +16 -15
- package/dist/safe-bash-presentation-engine/memberships.js +15 -14
- package/dist/safe-bash-presentation-engine/notes.js +18 -17
- package/dist/safe-bash-presentation-engine/ole-enum.js +5 -4
- package/dist/safe-bash-presentation-engine/ole-insertion.js +20 -19
- package/dist/safe-bash-presentation-engine/opaque-objects.js +10 -9
- package/dist/safe-bash-presentation-engine/package-reader.js +6 -5
- package/dist/safe-bash-presentation-engine/package-tools.js +19 -18
- package/dist/safe-bash-presentation-engine/package-uri.js +4 -3
- package/dist/safe-bash-presentation-engine/package-writer.js +5 -4
- package/dist/safe-bash-presentation-engine/presentation-model.js +59 -57
- package/dist/safe-bash-presentation-engine/presentation-settings.js +14 -13
- package/dist/safe-bash-presentation-engine/properties.d.ts +2 -1
- package/dist/safe-bash-presentation-engine/properties.js +25 -15
- package/dist/safe-bash-presentation-engine/relationships.js +5 -4
- package/dist/safe-bash-presentation-engine/resource-limits.js +2 -1
- package/dist/safe-bash-presentation-engine/retained-diff.d.ts +56 -0
- package/dist/safe-bash-presentation-engine/retained-inspection.js +14 -13
- package/dist/safe-bash-presentation-engine/retained-package.js +6 -5
- package/dist/safe-bash-presentation-engine/retained-properties.d.ts +26 -0
- package/dist/safe-bash-presentation-engine/retained-text.js +33 -517
- package/dist/safe-bash-presentation-engine/sanitize.js +20 -16
- package/dist/safe-bash-presentation-engine/selectors.js +11 -10
- package/dist/safe-bash-presentation-engine/shape-groups.js +31 -30
- package/dist/safe-bash-presentation-engine/shape-operations.js +30 -29
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +32 -31
- package/dist/safe-bash-presentation-engine/shape-paths.js +16 -15
- package/dist/safe-bash-presentation-engine/shape-presets.js +4 -3
- package/dist/safe-bash-presentation-engine/shape-selection.js +31 -30
- package/dist/safe-bash-presentation-engine/shape-transforms.js +18 -17
- package/dist/safe-bash-presentation-engine/shapes.js +27 -26
- package/dist/safe-bash-presentation-engine/slide-copy.js +17 -16
- package/dist/safe-bash-presentation-engine/slide-import.js +18 -17
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +20 -19
- package/dist/safe-bash-presentation-engine/slide-model.js +43 -42
- package/dist/safe-bash-presentation-engine/slide-removal.js +18 -17
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +10 -9
- package/dist/safe-bash-presentation-engine/slides.js +19 -18
- package/dist/safe-bash-presentation-engine/table-operations.js +33 -32
- package/dist/safe-bash-presentation-engine/table-spans.js +32 -31
- package/dist/safe-bash-presentation-engine/tables.js +31 -30
- package/dist/safe-bash-presentation-engine/tags.js +16 -15
- package/dist/safe-bash-presentation-engine/template-bindings.js +33 -32
- package/dist/safe-bash-presentation-engine/template-repeat.js +40 -39
- package/dist/safe-bash-presentation-engine/text-fitting.js +27 -26
- package/dist/safe-bash-presentation-engine/text-frames.js +27 -26
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +27 -26
- package/dist/safe-bash-presentation-engine/text-reading.js +12 -11
- package/dist/safe-bash-presentation-engine/text-replacement.js +17 -16
- package/dist/safe-bash-presentation-engine/text-runs.js +20 -19
- package/dist/safe-bash-presentation-engine/themes.js +16 -15
- package/dist/safe-bash-presentation-engine/transitions.js +16 -15
- package/dist/safe-bash-presentation-engine/validation.js +10 -9
- package/dist/safe-bash-presentation-engine/xml-parts.js +19 -18
- package/dist/safe-bash-presentation-engine/xml-view.js +4 -3
- package/dist/safe-bash-presentation-engine/xml.js +4 -3
- package/dist/safe-bash-query-engine/index.js +3 -3
- package/dist/safe-bash-query-engine/interpreter.js +2 -2
- package/dist/safe-bash-query-engine/query-core.js +3 -3
- package/dist/safe-bash-regex-engine/ere/matcher.js +3 -3
- package/dist/safe-bash-xml-engine/document.js +3 -3
- package/dist/safe-bash-xml-engine/evaluate.js +1 -1
- package/dist/safe-bash-xml-engine/index.js +4 -4
- package/dist/safe-bash-xml-engine/json.js +14 -10
- package/dist/safe-bash-xml-engine/query.js +2 -2
- package/dist/safe-bash-xml-engine/stored-document.d.ts +4 -0
- package/dist/safe-bash-xml-engine/stored-document.js +1 -1
- package/dist/safe-bash-xml-engine/stored-evaluate.js +3 -3
- package/dist/safe-bash-zip-engine/index.js +2 -2
- package/dist/safe-bash-zip-engine/zip/repair.js +2 -2
- package/dist/safe-bash-zip-engine/zip/sfx.js +2 -2
- package/dist/safe-bash-zip-engine/zip-format.js +2 -2
- package/dist/spreadsheet-format-xls/biff-properties-merge.js +63 -67
- package/dist/spreadsheet-format-xls/biff-properties.js +3 -3
- package/dist/spreadsheet-format-xls/biff-property-transcode.d.ts +6 -1
- package/dist/spreadsheet-format-xls/biff-property-transcode.js +15 -4
- package/dist/spreadsheet-format-xls/biff-property-values.d.ts +6 -1
- package/dist/spreadsheet-format-xls/biff-property-values.js +81 -12
- package/dist/xlsx-ast/comment-geometry.d.ts +12 -0
- package/dist/xlsx-ast/comment-geometry.js +71 -0
- package/dist/xlsx-ast/xlsx-metadata.d.ts +1 -1
- package/dist/xlsx-ast/xlsx-metadata.js +27 -2
- package/dist/xlsx-ast/xlsx-write-metadata.js +9 -1
- package/dist/xlsx-ast/xlsx.js +9 -4
- package/package.json +5 -3
- package/dist/safe-bash/command-chunks/biff-A7XPBWAK-DCLG5QKF.js +0 -5417
- package/dist/safe-bash/command-chunks/chunk-DBNJEXHK.js +0 -387
- package/dist/safe-bash/command-chunks/chunk-EV5G535P.js +0 -240
- package/dist/safe-bash/command-chunks/model-store-UB5DWMAP.js +0 -54
- package/dist/safe-bash/command-chunks/{chunk-NGSO645G.js → chunk-3ZVK2OAY.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-W2FKFEVY.js → chunk-4YSBUQPV.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-UJSLBBQ7.js → chunk-5MFRN3CB.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-AW4Q3GZW.js → chunk-5QXRIZSS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-KUGV3SSL.js → chunk-CZXYWGVO.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-JWORWL72.js → chunk-DX7KU6YU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Z37OM247.js → chunk-E3BL7W5C.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-RIKNMBLZ.js → chunk-FEKECRJP.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-D3HW7R2N.js → chunk-FTZFCMVI.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-KRRG4MGH.js → chunk-GEDO5V32.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-NBRXQUK7.js → chunk-M3OXQXCU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-JRSZ5IGD.js → chunk-OAM2SUUI.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-HFKS6AET.js → chunk-OCOJMKDP.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-FMJKCVSQ.js → chunk-OOB7YCFQ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-GGH376XQ.js → chunk-OU4VE5CR.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-DYERIXPU.js → chunk-QGTQJCKW.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-ZSQCROFE.js → chunk-RXXNLH7A.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-TI52LKLL.js → chunk-UVM6QG2H.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BJXADHRT.js → chunk-WKU65Z3Q.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-KGKF5NM2.js → chunk-WOXLPDO6.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Y5ADXWBQ.js → chunk-WXW665TV.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-FWCUEZ3K.js → chunk-WYBCSJFG.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BXU5Y7I5.js → chunk-XI2LETBJ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-LNLACEAN.js → chunk-Y3ZRIZL7.js} +3 -3
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openRetainedText
|
|
3
|
+
} from "./chunk-VVWHFNHD.js";
|
|
4
|
+
import {
|
|
5
|
+
openPackageArchive
|
|
6
|
+
} from "./chunk-FJLSYX5P.js";
|
|
7
|
+
import {
|
|
8
|
+
openRetainedProperties,
|
|
9
|
+
readProperties,
|
|
10
|
+
readRetainedPropertyValue
|
|
11
|
+
} from "./chunk-AF2IO57Q.js";
|
|
12
|
+
import {
|
|
13
|
+
openRetainedPresentationIndex,
|
|
14
|
+
rawJson,
|
|
15
|
+
stageRetainedOutput,
|
|
16
|
+
streamJson
|
|
17
|
+
} from "./chunk-FB2WPI3M.js";
|
|
18
|
+
import {
|
|
19
|
+
RetainedOrder
|
|
20
|
+
} from "./chunk-XVEI4HZL.js";
|
|
21
|
+
import {
|
|
22
|
+
nodeFor
|
|
23
|
+
} from "./chunk-LMLBQSAM.js";
|
|
24
|
+
import {
|
|
25
|
+
readPresentationText
|
|
26
|
+
} from "./chunk-YKODRSGT.js";
|
|
27
|
+
import {
|
|
28
|
+
SelectionError,
|
|
29
|
+
readSelectionIndex
|
|
30
|
+
} from "./chunk-NCNHJRIY.js";
|
|
31
|
+
import {
|
|
32
|
+
readPackage
|
|
33
|
+
} from "./chunk-Q65GWGQR.js";
|
|
34
|
+
import {
|
|
35
|
+
readBinary
|
|
36
|
+
} from "./chunk-FAU2KL6I.js";
|
|
37
|
+
import {
|
|
38
|
+
parseXmlPart
|
|
39
|
+
} from "./chunk-7PYDVQPB.js";
|
|
40
|
+
import {
|
|
41
|
+
OfficeError,
|
|
42
|
+
RetainedValues,
|
|
43
|
+
characters,
|
|
44
|
+
digest,
|
|
45
|
+
equal,
|
|
46
|
+
literal,
|
|
47
|
+
openRetainedXmlDocument,
|
|
48
|
+
resolveOfficeResources
|
|
49
|
+
} from "./chunk-KM2SMMXZ.js";
|
|
50
|
+
|
|
51
|
+
// packages/safe-bash-presentation-engine/src/diff.ts
|
|
52
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
53
|
+
|
|
54
|
+
// packages/safe-bash-presentation-engine/src/retained-geometry.ts
|
|
55
|
+
import { PagedStorage } from "@poe-platform/safe-fs/storage";
|
|
56
|
+
async function retainedShapeNode(document, id, check) {
|
|
57
|
+
const namespace = () => document.namespace(document.root);
|
|
58
|
+
async function local(node, names) {
|
|
59
|
+
for (const name of names) if (await equal(document.raw(node.localName), literal(name))) return true;
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
for await (const node of document.elements(document.root)) {
|
|
63
|
+
check();
|
|
64
|
+
if (!await equal(document.namespace(node), namespace()) || !await local(node, ["sp", "pic", "graphicFrame", "cxnSp", "grpSp"])) continue;
|
|
65
|
+
let nonvisual;
|
|
66
|
+
for await (const child of document.children(node)) if (child.kind === "element" && await equal(document.namespace(child), namespace()) && await local(child, ["nvSpPr", "nvPicPr", "nvGraphicFramePr", "nvCxnSpPr", "nvGrpSpPr"])) {
|
|
67
|
+
nonvisual = child;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
if (!nonvisual) continue;
|
|
71
|
+
let properties;
|
|
72
|
+
for await (const child of document.children(nonvisual)) if (child.kind === "element" && await equal(document.namespace(child), namespace()) && await local(child, ["cNvPr"])) {
|
|
73
|
+
if (properties) throw new OfficeError("invalid-value", "Ambiguous shared structure.", "usage");
|
|
74
|
+
properties = child;
|
|
75
|
+
}
|
|
76
|
+
if (!properties) throw new OfficeError("unsupported-edit", "Unsupported shared structure.", "validate-intent");
|
|
77
|
+
for await (const attr of document.attributes(properties)) if (await equal(document.namespace(attr), literal("")) && await local(attr, ["id"]) && await readRetainedPropertyValue("number", document.text(attr), check) === Number(id)) return node;
|
|
78
|
+
}
|
|
79
|
+
throw new SelectionError("missing-selection");
|
|
80
|
+
}
|
|
81
|
+
async function* retainedGeometry(document, root, settings) {
|
|
82
|
+
const working = settings.workingStorage, signal = settings.signal ?? new AbortController().signal;
|
|
83
|
+
const pages = new PagedStorage({ fs: working.fs, cwd: working.directory, env: {}, signal }, (working.cacheBytes ?? 1024 * 1024) / 16384);
|
|
84
|
+
const check = () => {
|
|
85
|
+
if (signal.aborted) throw new OfficeError("cancelled", "Operation cancelled.", "index");
|
|
86
|
+
};
|
|
87
|
+
const values = new RetainedValues(pages, check, signal);
|
|
88
|
+
let failed = false;
|
|
89
|
+
async function write(pointer, numbers) {
|
|
90
|
+
const bytes = new Uint8Array(numbers.length * 8), view = new DataView(bytes.buffer);
|
|
91
|
+
numbers.forEach((value, n) => view.setFloat64(n * 8, value, true));
|
|
92
|
+
await pages.write(pointer, bytes);
|
|
93
|
+
}
|
|
94
|
+
async function row(pointer, count) {
|
|
95
|
+
const bytes = await pages.read(pointer, count * 8), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
96
|
+
return Array.from({ length: count }, (_, n) => view.getFloat64(n * 8, true));
|
|
97
|
+
}
|
|
98
|
+
const name = (node) => ({ namespace: () => document.namespace(node), localName: () => document.raw(node.localName) });
|
|
99
|
+
async function* attributeKey(node) {
|
|
100
|
+
yield* document.namespace(node);
|
|
101
|
+
yield* literal("/");
|
|
102
|
+
yield* document.raw(node.localName);
|
|
103
|
+
}
|
|
104
|
+
async function* header(node) {
|
|
105
|
+
yield* literal('{"name":');
|
|
106
|
+
yield* streamJson(name(node));
|
|
107
|
+
yield* literal(',"attributes":[');
|
|
108
|
+
const order = new RetainedOrder(pages, values, check);
|
|
109
|
+
for await (const attr of document.attributes(node)) {
|
|
110
|
+
const value = await values.store(streamJson({ name: name(attr), value: () => document.text(attr) }));
|
|
111
|
+
await order.add(attributeKey(attr), value);
|
|
112
|
+
}
|
|
113
|
+
await order.seal();
|
|
114
|
+
let first = true;
|
|
115
|
+
for await (const value of order.entries()) {
|
|
116
|
+
if (!first) yield* literal(",");
|
|
117
|
+
first = false;
|
|
118
|
+
yield* streamJson({ [rawJson]: () => values.read(value) });
|
|
119
|
+
}
|
|
120
|
+
yield* literal('],"children":[');
|
|
121
|
+
}
|
|
122
|
+
async function frame(node, parent) {
|
|
123
|
+
let head = 0, tail = 0;
|
|
124
|
+
for await (const child of document.children(node)) if (child.kind === "element") {
|
|
125
|
+
const pointer2 = pages.allocate(16);
|
|
126
|
+
await write(pointer2, [0, document.reference(child)]);
|
|
127
|
+
if (tail) await write(tail, [pointer2]);
|
|
128
|
+
else head = pointer2;
|
|
129
|
+
tail = pointer2;
|
|
130
|
+
}
|
|
131
|
+
const pointer = pages.allocate(24);
|
|
132
|
+
await write(pointer, [parent, head, 0]);
|
|
133
|
+
return pointer;
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
check();
|
|
137
|
+
yield* header(root);
|
|
138
|
+
let top = await frame(root, 0);
|
|
139
|
+
while (top) {
|
|
140
|
+
check();
|
|
141
|
+
const data = await row(top, 3);
|
|
142
|
+
if (!data[1]) {
|
|
143
|
+
yield* literal("]}");
|
|
144
|
+
top = data[0];
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
const child = await row(data[1], 2);
|
|
148
|
+
await write(top + 8, [child[0], 1]);
|
|
149
|
+
if (data[2]) yield* literal(",");
|
|
150
|
+
const node = await document.node(child[1]);
|
|
151
|
+
yield* header(node);
|
|
152
|
+
top = await frame(node, top);
|
|
153
|
+
}
|
|
154
|
+
} catch (error) {
|
|
155
|
+
failed = true;
|
|
156
|
+
throw error;
|
|
157
|
+
} finally {
|
|
158
|
+
try {
|
|
159
|
+
await pages.close();
|
|
160
|
+
} catch (error) {
|
|
161
|
+
if (!failed) await Promise.reject(error);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// packages/safe-bash-presentation-engine/src/retained-diff.ts
|
|
167
|
+
import { PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
|
|
168
|
+
var categories = ["slides", "text", "properties", "geometry", "media", "relationships", "opaque", "raw"];
|
|
169
|
+
async function* joined(...sources) {
|
|
170
|
+
for (const source of sources) yield* source;
|
|
171
|
+
}
|
|
172
|
+
async function* encoded(source) {
|
|
173
|
+
for await (const character of characters(source)) yield* literal(encodeURIComponent(character));
|
|
174
|
+
}
|
|
175
|
+
async function openRetainedDiff(left, right, options, settings) {
|
|
176
|
+
const mode = options?.mode;
|
|
177
|
+
if (!["structural", "raw", "text", "media", "relationships"].includes(mode)) throw new OfficeError("invalid-value", "Invalid retained comparison mode.", "usage");
|
|
178
|
+
const working = { ...settings.workingStorage }, signal = settings.signal ?? new AbortController().signal, cacheBytes = working.cacheBytes ?? 1024 * 1024;
|
|
179
|
+
if (!working.fs || !working.directory?.startsWith("/") || !Number.isSafeInteger(cacheBytes) || cacheBytes < 16384 || cacheBytes % 16384) throw new OfficeError("invalid-value", "Invalid comparison storage.", "usage");
|
|
180
|
+
const context = { ...resolveOfficeResources(settings), workingStorage: working, signal };
|
|
181
|
+
const pages = new PagedStorage2({ fs: working.fs, cwd: working.directory, env: {}, signal }, cacheBytes / 16384);
|
|
182
|
+
let closed = false, closing;
|
|
183
|
+
const check = () => {
|
|
184
|
+
if (closed) throw new OfficeError("invalid-handle", "Comparison is closed.", "index");
|
|
185
|
+
if (signal.aborted) throw new OfficeError("cancelled", "Comparison cancelled.", "index");
|
|
186
|
+
};
|
|
187
|
+
const close = () => {
|
|
188
|
+
closed = true;
|
|
189
|
+
return closing ??= pages.close();
|
|
190
|
+
};
|
|
191
|
+
const values = new RetainedValues(pages, check, signal);
|
|
192
|
+
async function row(pointer) {
|
|
193
|
+
check();
|
|
194
|
+
const bytes = await pages.read(pointer, 56), view = new DataView(bytes.buffer, bytes.byteOffset, 56);
|
|
195
|
+
return Array.from({ length: 7 }, (_, n) => view.getFloat64(n * 8, true));
|
|
196
|
+
}
|
|
197
|
+
async function write(pointer, numbers) {
|
|
198
|
+
check();
|
|
199
|
+
const bytes = new Uint8Array(numbers.length * 8), view = new DataView(bytes.buffer);
|
|
200
|
+
numbers.forEach((value, n) => view.setFloat64(n * 8, value, true));
|
|
201
|
+
await pages.write(pointer, bytes);
|
|
202
|
+
}
|
|
203
|
+
const range = (data, offset) => ({ start: data[offset], length: data[offset + 1] });
|
|
204
|
+
const json = (value) => ({ [rawJson]: () => values.read(value) });
|
|
205
|
+
function entries(scope) {
|
|
206
|
+
let head = 0, tail = 0;
|
|
207
|
+
const find = async (key) => {
|
|
208
|
+
const found = await values.find(scope, key);
|
|
209
|
+
return found ? row(found.start) : void 0;
|
|
210
|
+
};
|
|
211
|
+
return {
|
|
212
|
+
find,
|
|
213
|
+
async put(key, value, location = null) {
|
|
214
|
+
const k = await values.store(key), v = await values.store(streamJson(value)), l = await values.store(streamJson(location));
|
|
215
|
+
const old = await values.find(scope, () => values.read(k));
|
|
216
|
+
if (old) {
|
|
217
|
+
await write(old.start + 24, [v.start, v.length, l.start, l.length]);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const pointer = pages.allocate(56);
|
|
221
|
+
await write(pointer, [0, k.start, k.length, v.start, v.length, l.start, l.length]);
|
|
222
|
+
await values.insert(scope, k, { start: pointer, length: 56 });
|
|
223
|
+
if (tail) await write(tail, [pointer]);
|
|
224
|
+
else head = pointer;
|
|
225
|
+
tail = pointer;
|
|
226
|
+
},
|
|
227
|
+
async *rows() {
|
|
228
|
+
check();
|
|
229
|
+
for (let pointer = head; pointer; ) {
|
|
230
|
+
const data = await row(pointer);
|
|
231
|
+
yield data;
|
|
232
|
+
pointer = data[0];
|
|
233
|
+
}
|
|
234
|
+
check();
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
async function fingerprint(source) {
|
|
239
|
+
check();
|
|
240
|
+
if (!source || typeof source.read !== "function" || !Number.isSafeInteger(source.size) || source.size < 0) throw new OfficeError("invalid-type", "A retained package source is required.", "usage");
|
|
241
|
+
if (source.size > Math.min(context.limits.maxBytes, context.archiveLimits.maxArchiveBytes)) throw new OfficeError("resource-limit", "Byte input exceeds its limit.", "admit");
|
|
242
|
+
async function* chunks() {
|
|
243
|
+
for (let offset = 0; offset < source.size; ) {
|
|
244
|
+
check();
|
|
245
|
+
const bytes = await source.read(offset, Math.min(16384, source.size - offset), { signal });
|
|
246
|
+
if (!bytes.length || bytes.length > Math.min(16384, source.size - offset)) throw new OfficeError("io-failure", "Invalid retained comparison read.", "admit");
|
|
247
|
+
offset += bytes.length;
|
|
248
|
+
yield bytes;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return digest(chunks());
|
|
252
|
+
}
|
|
253
|
+
async function snapshot2(source, fingerprint2, scope) {
|
|
254
|
+
const result = new Map(categories.map((category) => [category, entries(`${scope}/${category}`)])), archive = await openPackageArchive(source, context);
|
|
255
|
+
let index, text, failed = false;
|
|
256
|
+
try {
|
|
257
|
+
index = await openRetainedPresentationIndex(archive, fingerprint2, context);
|
|
258
|
+
const partLocation = (part) => ({ fingerprint: fingerprint2, scope: "shared", owner: part, objectId: part, coordinateSystem: "identity" });
|
|
259
|
+
for await (const slide of index.records.records("slide")) {
|
|
260
|
+
const key = await values.store(literal(slide.part)), value = await values.store(literal(`slide/${encodeURIComponent(slide.id)}`));
|
|
261
|
+
await values.insert(`${scope}/owners`, key, value);
|
|
262
|
+
}
|
|
263
|
+
async function* owner(part) {
|
|
264
|
+
const known = await values.find(`${scope}/owners`, part);
|
|
265
|
+
if (known) yield* values.read(known);
|
|
266
|
+
else {
|
|
267
|
+
yield* literal("part/");
|
|
268
|
+
yield* encoded(part());
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if (mode === "structural") {
|
|
272
|
+
for await (const slide of index.inventory.slides) {
|
|
273
|
+
const key = await values.store(literal(slide.id)), value = await values.store(literal(JSON.stringify(slide.show.explicit)));
|
|
274
|
+
await values.insert(`${scope}/visibility`, key, value);
|
|
275
|
+
}
|
|
276
|
+
for await (const slide of index.records.records("slide")) {
|
|
277
|
+
const id = `slide/${encodeURIComponent(slide.id)}`;
|
|
278
|
+
await result.get("slides").put(literal(id), { name: slide.name }, slide.location);
|
|
279
|
+
await result.get("slides").put(literal(`${id}/position`), slide.position, slide.location);
|
|
280
|
+
await result.get("slides").put(literal(`${id}/visibility`), json(await values.find(`${scope}/visibility`, () => literal(slide.id))), slide.location);
|
|
281
|
+
}
|
|
282
|
+
const properties = await openRetainedProperties(archive, fingerprint2, {}, context);
|
|
283
|
+
let failed2 = false;
|
|
284
|
+
try {
|
|
285
|
+
const order = new RetainedOrder(pages, values, check);
|
|
286
|
+
for await (const property of properties.records()) {
|
|
287
|
+
const key = await values.store(joined(literal(`property/${property.kind}/`), encoded(property.namespace()), literal("/"), encoded(property.name())));
|
|
288
|
+
const value = await values.store(streamJson({ type: property.type, value: property.value }));
|
|
289
|
+
const location = await values.store(streamJson({ fingerprint: fingerprint2, scope: "shared", owner: property.part, objectId: property.part, coordinateSystem: "identity" }));
|
|
290
|
+
const pointer = pages.allocate(56);
|
|
291
|
+
await write(pointer, [0, key.start, key.length, value.start, value.length, location.start, location.length]);
|
|
292
|
+
await order.add(joined(literal(`${property.kind}/`), property.namespace(), literal("/"), property.name()), { start: pointer, length: 56 });
|
|
293
|
+
}
|
|
294
|
+
await order.seal();
|
|
295
|
+
for await (const pointer of order.entries()) {
|
|
296
|
+
const data = await row(pointer.start);
|
|
297
|
+
await result.get("properties").put(values.read(range(data, 1)), json(range(data, 3)), json(range(data, 5)));
|
|
298
|
+
}
|
|
299
|
+
} catch (error) {
|
|
300
|
+
failed2 = true;
|
|
301
|
+
throw error;
|
|
302
|
+
} finally {
|
|
303
|
+
try {
|
|
304
|
+
await properties.close();
|
|
305
|
+
} catch (error) {
|
|
306
|
+
if (!failed2) await Promise.reject(error);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
let document, part, geometryFailed = false;
|
|
310
|
+
try {
|
|
311
|
+
for await (const object of index.records.records("object")) {
|
|
312
|
+
if (object.location.scope !== "slides") continue;
|
|
313
|
+
if (part !== object.part) {
|
|
314
|
+
const old = document;
|
|
315
|
+
document = void 0;
|
|
316
|
+
await old?.close();
|
|
317
|
+
part = object.part;
|
|
318
|
+
document = await openRetainedXmlDocument(archive.read(part), context);
|
|
319
|
+
}
|
|
320
|
+
const doc = document, node = await retainedShapeNode(doc, object.id, check);
|
|
321
|
+
let shapeOwner = node;
|
|
322
|
+
for await (const child of doc.children(node)) if (child.kind === "element" && await equal(doc.namespace(child), doc.namespace(node)) && (await equal(doc.raw(child.localName), literal("spPr")) || await equal(doc.raw(child.localName), literal("grpSpPr")))) {
|
|
323
|
+
shapeOwner = child;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
const drawing = await equal(doc.namespace(node), literal("http://purl.oclc.org/ooxml/presentationml/main")) ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
327
|
+
const graphic = await equal(doc.raw(node.localName), literal("graphicFrame"));
|
|
328
|
+
async function* transforms() {
|
|
329
|
+
for await (const child of doc.children(shapeOwner)) {
|
|
330
|
+
if (child.kind !== "element" || !await equal(doc.namespace(child), graphic ? doc.namespace(node) : literal(drawing))) continue;
|
|
331
|
+
if (await equal(doc.raw(child.localName), literal("xfrm")) || await equal(doc.raw(child.localName), literal("prstGeom")) || await equal(doc.raw(child.localName), literal("custGeom"))) yield { [rawJson]: () => retainedGeometry(doc, child, context) };
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
await result.get("geometry").put(joined(owner(() => literal(object.part)), literal(`/shape/${encodeURIComponent(object.id)}/geometry`)), transforms(), object.location);
|
|
335
|
+
}
|
|
336
|
+
} catch (error) {
|
|
337
|
+
geometryFailed = true;
|
|
338
|
+
throw error;
|
|
339
|
+
} finally {
|
|
340
|
+
try {
|
|
341
|
+
await document?.close();
|
|
342
|
+
} catch (error) {
|
|
343
|
+
if (!geometryFailed) await Promise.reject(error);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if (mode === "raw") {
|
|
348
|
+
const order = new RetainedOrder(pages, values, check);
|
|
349
|
+
for await (const part of archive.parts()) {
|
|
350
|
+
const name = await values.store(literal(part));
|
|
351
|
+
await order.add(values.read(name), name);
|
|
352
|
+
}
|
|
353
|
+
await order.seal();
|
|
354
|
+
for await (const name of order.entries()) {
|
|
355
|
+
const decoder = new TextDecoder();
|
|
356
|
+
let part = "";
|
|
357
|
+
for await (const bytes of values.read(name)) part += decoder.decode(bytes, { stream: true });
|
|
358
|
+
part += decoder.decode();
|
|
359
|
+
await result.get("raw").put(literal(`part/${encodeURIComponent(part)}`), { sha256: await digest(archive.read(part)), bytes: await archive.byteLength(part) }, partLocation(part));
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if (mode === "text" || mode === "structural") {
|
|
363
|
+
text = await openRetainedText(archive, fingerprint2, {}, context);
|
|
364
|
+
for await (const segment of text.segments()) {
|
|
365
|
+
const cell = segment.cell ? `/cell/${segment.cell.row}/${segment.cell.column}` : "";
|
|
366
|
+
await result.get("text").put(joined(owner(() => literal(segment.location.owner)), literal(`/shape/${encodeURIComponent(segment.location.objectId)}${cell}/text`)), segment.text, segment.location);
|
|
367
|
+
}
|
|
368
|
+
async function* keys() {
|
|
369
|
+
for await (const data of result.get("text").rows()) yield () => values.read(range(data, 1));
|
|
370
|
+
}
|
|
371
|
+
await result.get("text").put(literal("text/order"), keys());
|
|
372
|
+
}
|
|
373
|
+
if (mode === "media" || mode === "relationships" || mode === "structural") {
|
|
374
|
+
const order = new RetainedOrder(pages, values, check);
|
|
375
|
+
for await (const media of index.inventory.media) {
|
|
376
|
+
const key = await values.store(literal(media.part)), hash2 = await values.store(literal(media.sha256));
|
|
377
|
+
await values.insert(`${scope}/media`, key, hash2);
|
|
378
|
+
if (mode === "media" || mode === "structural") {
|
|
379
|
+
const known = await values.find(`${scope}/counts`, () => literal(media.sha256));
|
|
380
|
+
if (known) {
|
|
381
|
+
const bytes = await pages.read(known.start, 8), view = new DataView(bytes.buffer, bytes.byteOffset, 8);
|
|
382
|
+
await write(known.start, [view.getFloat64(0, true) + 1]);
|
|
383
|
+
} else {
|
|
384
|
+
const count = pages.allocate(16);
|
|
385
|
+
await write(count, [1, media.bytes]);
|
|
386
|
+
await values.insert(`${scope}/counts`, hash2, { start: count, length: 16 });
|
|
387
|
+
await order.add(literal(media.sha256), hash2);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
if (mode === "media" || mode === "structural") {
|
|
392
|
+
await order.seal();
|
|
393
|
+
for await (const hash2 of order.entries()) {
|
|
394
|
+
const count = await values.find(`${scope}/counts`, () => values.read(hash2)), bytes = await pages.read(count.start, 16), view = new DataView(bytes.buffer, bytes.byteOffset, 16);
|
|
395
|
+
await result.get("media").put(joined(literal("media/"), values.read(hash2)), { sha256: () => values.read(hash2), bytes: view.getFloat64(8, true), count: view.getFloat64(0, true) });
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
if (mode === "relationships" || mode === "structural") for await (const edge of index.inventory.relationships) {
|
|
399
|
+
const media = edge.targetPart ? await values.find(`${scope}/media`, edge.targetPart) : void 0;
|
|
400
|
+
const target = edge.external ? edge.target : media ? () => joined(literal("media/"), values.read(media)) : () => owner(edge.targetPart);
|
|
401
|
+
await result.get("relationships").put(joined(owner(() => literal(edge.owner)), literal("/relationship/"), encoded(edge.id())), { type: edge.type, external: edge.external, target }, partLocation(edge.owner));
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
if (mode === "structural") {
|
|
405
|
+
for await (const part of index.inventory.parts) if (!await values.find(`${scope}/media`, () => literal(part.part))) await result.get("opaque").put(literal(`part/${encodeURIComponent(part.part)}`), { sha256: part.sha256, bytes: part.bytes, contentType: part.contentType }, partLocation(part.part));
|
|
406
|
+
}
|
|
407
|
+
return result;
|
|
408
|
+
} catch (error) {
|
|
409
|
+
failed = true;
|
|
410
|
+
throw error;
|
|
411
|
+
} finally {
|
|
412
|
+
const outcomes = await Promise.allSettled([text?.close(), index?.close(), archive.close()]);
|
|
413
|
+
if (!failed) {
|
|
414
|
+
for (const outcome of outcomes) if (outcome.status === "rejected") await Promise.reject(outcome.reason);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
try {
|
|
419
|
+
const leftHash = await fingerprint(left), rightHash = await fingerprint(right);
|
|
420
|
+
const before = await snapshot2(left, leftHash, "left"), after = await snapshot2(right, rightHash, "right");
|
|
421
|
+
async function* changes() {
|
|
422
|
+
check();
|
|
423
|
+
for (const category of categories) {
|
|
424
|
+
const a = before.get(category), b = after.get(category);
|
|
425
|
+
async function suppressed(data2) {
|
|
426
|
+
if (category !== "slides") return false;
|
|
427
|
+
let id = "";
|
|
428
|
+
for await (const bytes of values.read(range(data2, 1))) id += new TextDecoder().decode(bytes);
|
|
429
|
+
if (!id.endsWith("/position") && !id.endsWith("/visibility")) return false;
|
|
430
|
+
const root = id.slice(0, id.lastIndexOf("/"));
|
|
431
|
+
return !await a.find(() => literal(root)) || !await b.find(() => literal(root));
|
|
432
|
+
}
|
|
433
|
+
for await (const first of a.rows()) {
|
|
434
|
+
const second = await b.find(() => values.read(range(first, 1)));
|
|
435
|
+
if (second && await equal(values.read(range(first, 3)), values.read(range(second, 3)))) continue;
|
|
436
|
+
if (await suppressed(first)) continue;
|
|
437
|
+
yield { id: () => values.read(range(first, 1)), category, kind: second ? "changed" : "removed", before: json(range(first, 3)), after: second ? json(range(second, 3)) : null, left: json(range(first, 5)), right: second ? json(range(second, 5)) : null };
|
|
438
|
+
}
|
|
439
|
+
for await (const second of b.rows()) if (!await a.find(() => values.read(range(second, 1))) && !await suppressed(second)) yield { id: () => values.read(range(second, 1)), category, kind: "added", before: null, after: json(range(second, 3)), left: null, right: json(range(second, 5)) };
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
let same = true;
|
|
443
|
+
for await (const ignoredChange of changes()) {
|
|
444
|
+
same = false;
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
const limitations = ["No rendering or effective formatting comparison is performed.", ...mode === "structural" ? ["Nonmedia part byte hashes conservatively report raw and unsupported content changes, including parts also inspected semantically."] : [], ...mode === "text" || mode === "structural" ? ["Semantic text comparison covers slide text in structural order; other text scopes are not included."] : [], ...mode === "raw" ? ["Raw comparison covers uncompressed package members; ZIP container metadata is excluded."] : []];
|
|
448
|
+
const data = { equal: same, mode, formatting: "raw", get changes() {
|
|
449
|
+
return changes();
|
|
450
|
+
}, limitations };
|
|
451
|
+
return Object.freeze({ data, close });
|
|
452
|
+
} catch (error) {
|
|
453
|
+
await close().catch(() => {
|
|
454
|
+
});
|
|
455
|
+
throw error;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
async function stageRetainedDiff(left, right, options, settings) {
|
|
459
|
+
const format = { ...options }, view = await openRetainedDiff(left, right, format, settings);
|
|
460
|
+
let staged;
|
|
461
|
+
try {
|
|
462
|
+
async function* render() {
|
|
463
|
+
if (format.json) {
|
|
464
|
+
yield* streamJson({ version: 1, operation: "diff", ok: true, data: view.data, affected: 0, warnings: [], errors: [], locations: [] });
|
|
465
|
+
yield* literal("\n");
|
|
466
|
+
} else {
|
|
467
|
+
yield* literal(`${view.data.equal ? "Equal" : "Different"} (${view.data.mode}; raw formatting)
|
|
468
|
+
`);
|
|
469
|
+
for await (const change of view.data.changes) {
|
|
470
|
+
yield* literal(`${change.category} ${change.kind} `);
|
|
471
|
+
yield* change.id();
|
|
472
|
+
yield* literal("\n before: ");
|
|
473
|
+
yield* streamJson(change.before);
|
|
474
|
+
yield* literal("\n after: ");
|
|
475
|
+
yield* streamJson(change.after);
|
|
476
|
+
yield* literal("\n");
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
staged = await stageRetainedOutput(render(), settings, format.maxOutputBytes);
|
|
481
|
+
await view.close();
|
|
482
|
+
return { output: staged, equal: view.data.equal };
|
|
483
|
+
} catch (error) {
|
|
484
|
+
await Promise.allSettled([view.close(), staged?.close()]);
|
|
485
|
+
throw error;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// packages/safe-bash-presentation-engine/src/diff.ts
|
|
490
|
+
var categories2 = [
|
|
491
|
+
"slides",
|
|
492
|
+
"text",
|
|
493
|
+
"properties",
|
|
494
|
+
"geometry",
|
|
495
|
+
"media",
|
|
496
|
+
"relationships",
|
|
497
|
+
"opaque",
|
|
498
|
+
"raw"
|
|
499
|
+
];
|
|
500
|
+
function hash(bytes) {
|
|
501
|
+
return Array.from(sha256(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
502
|
+
}
|
|
503
|
+
function geometry(node) {
|
|
504
|
+
return {
|
|
505
|
+
name: node.name,
|
|
506
|
+
attributes: [...node.attributes].sort((a, b) => {
|
|
507
|
+
const left = `${a.name.namespace}/${a.name.localName}`, right = `${b.name.namespace}/${b.name.localName}`;
|
|
508
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
509
|
+
}),
|
|
510
|
+
children: node.children.map(geometry)
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
async function snapshot(input, mode, context) {
|
|
514
|
+
const bytes = await readBinary(input, context, {
|
|
515
|
+
maxBytes: Math.min(context.limits.maxBytes, context.archiveLimits.maxArchiveBytes)
|
|
516
|
+
});
|
|
517
|
+
const reader = await readPackage(bytes, context);
|
|
518
|
+
const index = await readSelectionIndex(bytes, context);
|
|
519
|
+
const result = new Map(categories2.map((category) => [category, /* @__PURE__ */ new Map()]));
|
|
520
|
+
const put = (category, id, value, location = null) => {
|
|
521
|
+
result.get(category).set(id, { value, location });
|
|
522
|
+
};
|
|
523
|
+
const slideIds = new Map(
|
|
524
|
+
index.slides.map((slide) => [slide.part, `slide/${encodeURIComponent(slide.id)}`])
|
|
525
|
+
);
|
|
526
|
+
const ownerId = (part) => slideIds.get(part) ?? `part/${encodeURIComponent(part)}`;
|
|
527
|
+
const partLocation = (part) => ({
|
|
528
|
+
fingerprint: index.fingerprint,
|
|
529
|
+
scope: "shared",
|
|
530
|
+
owner: part,
|
|
531
|
+
objectId: part,
|
|
532
|
+
coordinateSystem: "identity"
|
|
533
|
+
});
|
|
534
|
+
if (mode === "raw") {
|
|
535
|
+
for (const part of [...reader.names].sort()) {
|
|
536
|
+
const payload = reader.get(part);
|
|
537
|
+
put(
|
|
538
|
+
"raw",
|
|
539
|
+
`part/${encodeURIComponent(part)}`,
|
|
540
|
+
{ sha256: hash(payload), bytes: payload.length },
|
|
541
|
+
partLocation(part)
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
return result;
|
|
545
|
+
}
|
|
546
|
+
if (mode === "structural") {
|
|
547
|
+
for (const slide of index.slides) {
|
|
548
|
+
const id = ownerId(slide.part);
|
|
549
|
+
put("slides", id, { name: slide.name }, slide.location);
|
|
550
|
+
put("slides", `${id}/position`, slide.position, slide.location);
|
|
551
|
+
const detail = index.inventory.slides.find((item) => item.id === slide.id);
|
|
552
|
+
put("slides", `${id}/visibility`, detail.show.explicit, slide.location);
|
|
553
|
+
}
|
|
554
|
+
const properties = await readProperties(bytes, {}, context);
|
|
555
|
+
for (const property of [...properties].sort((a, b) => {
|
|
556
|
+
const left = `${a.kind}/${a.namespace}/${a.name}`, right = `${b.kind}/${b.namespace}/${b.name}`;
|
|
557
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
558
|
+
})) {
|
|
559
|
+
put(
|
|
560
|
+
"properties",
|
|
561
|
+
`property/${property.kind}/${encodeURIComponent(property.namespace)}/${encodeURIComponent(property.name)}`,
|
|
562
|
+
{ type: property.type, value: property.value },
|
|
563
|
+
partLocation(property.part)
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
const roots = /* @__PURE__ */ new Map();
|
|
567
|
+
for (const object of index.objects.filter((item) => item.scope === "slides")) {
|
|
568
|
+
let root = roots.get(object.part);
|
|
569
|
+
if (!root) {
|
|
570
|
+
root = parseXmlPart(reader.get(object.part), context.xmlLimits).root;
|
|
571
|
+
roots.set(object.part, root);
|
|
572
|
+
}
|
|
573
|
+
const node = nodeFor(root, object.id);
|
|
574
|
+
const owner = node.children.find(
|
|
575
|
+
(child) => child.name.namespace === node.name.namespace && ["spPr", "grpSpPr"].includes(child.name.localName)
|
|
576
|
+
) ?? node;
|
|
577
|
+
const drawingNamespace = node.name.namespace === "http://purl.oclc.org/ooxml/presentationml/main" ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
578
|
+
const transforms = owner.children.filter(
|
|
579
|
+
(child) => ["xfrm", "prstGeom", "custGeom"].includes(child.name.localName) && child.name.namespace === (node.name.localName === "graphicFrame" ? node.name.namespace : drawingNamespace)
|
|
580
|
+
);
|
|
581
|
+
put(
|
|
582
|
+
"geometry",
|
|
583
|
+
`${ownerId(object.part)}/shape/${encodeURIComponent(object.id)}/geometry`,
|
|
584
|
+
transforms.map(geometry),
|
|
585
|
+
object.location
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
if (mode === "structural" || mode === "text") {
|
|
590
|
+
const text = await readPresentationText(bytes, {}, context);
|
|
591
|
+
for (const segment of text.segments) {
|
|
592
|
+
const cell = segment.cell ? `/cell/${segment.cell.row}/${segment.cell.column}` : "";
|
|
593
|
+
put(
|
|
594
|
+
"text",
|
|
595
|
+
`${ownerId(segment.location.owner)}/shape/${encodeURIComponent(segment.location.objectId)}${cell}/text`,
|
|
596
|
+
segment.text,
|
|
597
|
+
segment.location
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
put("text", "text/order", [...result.get("text").keys()]);
|
|
601
|
+
}
|
|
602
|
+
const media = new Map(index.inventory.media.map((part) => [part.part, part]));
|
|
603
|
+
if (mode === "structural" || mode === "media") {
|
|
604
|
+
const counts = /* @__PURE__ */ new Map();
|
|
605
|
+
for (const part of media.values()) {
|
|
606
|
+
const entry = counts.get(part.sha256) ?? { sha256: part.sha256, bytes: part.bytes, count: 0 };
|
|
607
|
+
entry.count++;
|
|
608
|
+
counts.set(part.sha256, entry);
|
|
609
|
+
}
|
|
610
|
+
for (const [digest2, value] of [...counts].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0))
|
|
611
|
+
put("media", `media/${digest2}`, value);
|
|
612
|
+
}
|
|
613
|
+
if (mode === "structural" || mode === "relationships") {
|
|
614
|
+
for (const edge of index.inventory.relationships) {
|
|
615
|
+
const targetMedia = edge.targetPart === null ? void 0 : media.get(edge.targetPart);
|
|
616
|
+
const target = edge.external ? edge.target : targetMedia ? `media/${targetMedia.sha256}` : ownerId(edge.targetPart);
|
|
617
|
+
put(
|
|
618
|
+
"relationships",
|
|
619
|
+
`${ownerId(edge.owner)}/relationship/${encodeURIComponent(edge.id)}`,
|
|
620
|
+
{ type: edge.type, external: edge.external, target },
|
|
621
|
+
partLocation(edge.owner)
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
if (mode === "structural") {
|
|
626
|
+
for (const part of index.inventory.parts.filter((part2) => !media.has(part2.part))) {
|
|
627
|
+
put(
|
|
628
|
+
"opaque",
|
|
629
|
+
`part/${encodeURIComponent(part.part)}`,
|
|
630
|
+
{ sha256: part.sha256, bytes: part.bytes, contentType: part.contentType },
|
|
631
|
+
partLocation(part.part)
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
return result;
|
|
636
|
+
}
|
|
637
|
+
async function comparePresentations(left, right, options, context) {
|
|
638
|
+
const modes = [
|
|
639
|
+
"structural",
|
|
640
|
+
"text",
|
|
641
|
+
"media",
|
|
642
|
+
"relationships",
|
|
643
|
+
"effective-formatting",
|
|
644
|
+
"raw"
|
|
645
|
+
];
|
|
646
|
+
if (!options || typeof options !== "object" || ![Object.prototype, null].includes(Object.getPrototypeOf(options)) || Object.keys(options).some((key) => key !== "mode") || options.mode !== void 0 && !modes.includes(options.mode))
|
|
647
|
+
throw new OfficeError("invalid-value", "Invalid comparison options.", "usage");
|
|
648
|
+
const mode = options.mode ?? "structural";
|
|
649
|
+
if (mode === "effective-formatting")
|
|
650
|
+
throw new OfficeError(
|
|
651
|
+
"unsupported-profile",
|
|
652
|
+
"Complete effective formatting comparison is unavailable; select a raw formatting mode.",
|
|
653
|
+
"usage"
|
|
654
|
+
);
|
|
655
|
+
const before = await snapshot(left, mode, context);
|
|
656
|
+
const after = await snapshot(right, mode, context);
|
|
657
|
+
const changes = [];
|
|
658
|
+
for (const category of categories2) {
|
|
659
|
+
const a = before.get(category), b = after.get(category);
|
|
660
|
+
for (const id of /* @__PURE__ */ new Set([...a.keys(), ...b.keys()])) {
|
|
661
|
+
const first = a.get(id), second = b.get(id);
|
|
662
|
+
if (JSON.stringify(first?.value) === JSON.stringify(second?.value)) continue;
|
|
663
|
+
if (category === "slides" && (id.endsWith("/position") || id.endsWith("/visibility"))) {
|
|
664
|
+
const root = id.slice(0, id.lastIndexOf("/"));
|
|
665
|
+
if (!a.has(root) || !b.has(root)) continue;
|
|
666
|
+
}
|
|
667
|
+
changes.push(
|
|
668
|
+
Object.freeze({
|
|
669
|
+
id,
|
|
670
|
+
category,
|
|
671
|
+
kind: !first ? "added" : !second ? "removed" : "changed",
|
|
672
|
+
before: first?.value ?? null,
|
|
673
|
+
after: second?.value ?? null,
|
|
674
|
+
left: first?.location ?? null,
|
|
675
|
+
right: second?.location ?? null
|
|
676
|
+
})
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return Object.freeze({
|
|
681
|
+
equal: changes.length === 0,
|
|
682
|
+
mode,
|
|
683
|
+
formatting: "raw",
|
|
684
|
+
changes: Object.freeze(changes),
|
|
685
|
+
limitations: Object.freeze([
|
|
686
|
+
"No rendering or effective formatting comparison is performed.",
|
|
687
|
+
...mode === "structural" ? [
|
|
688
|
+
"Nonmedia part byte hashes conservatively report raw and unsupported content changes, including parts also inspected semantically."
|
|
689
|
+
] : [],
|
|
690
|
+
...mode === "text" || mode === "structural" ? [
|
|
691
|
+
"Semantic text comparison covers slide text in structural order; other text scopes are not included."
|
|
692
|
+
] : [],
|
|
693
|
+
...mode === "raw" ? [
|
|
694
|
+
"Raw comparison covers uncompressed package members; ZIP container metadata is excluded."
|
|
695
|
+
] : []
|
|
696
|
+
])
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export {
|
|
701
|
+
openRetainedDiff,
|
|
702
|
+
stageRetainedDiff,
|
|
703
|
+
comparePresentations
|
|
704
|
+
};
|