@sheetxl/studio-vanilla 0.6.6 → 0.6.7

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 (200) hide show
  1. package/browser/cjs/{B_tAQ6NjYmRgJfjr.cjs → B-RS05VornOldrL9.cjs} +2 -2
  2. package/browser/cjs/{BFiaTsn72ZQNY4wG.cjs → B3IYNI3z6mcbe3EI.cjs} +1 -1
  3. package/browser/cjs/{DSF8l2QqwXpTN4Ja.cjs → B3htTp6BdTpcwfc-.cjs} +1 -1
  4. package/browser/cjs/{BkSrJaacn3OYpKiI.cjs → B5hu9_FYVC-RLOgi.cjs} +1 -1
  5. package/browser/cjs/{DbatomO6r9W0NwNu.cjs → B5vtgM0_WVTv1zKa.cjs} +12 -12
  6. package/browser/cjs/{Dlx1FHAfZ8BCXAv-.cjs → B8X707JrwtMd0Eyo.cjs} +1 -1
  7. package/browser/cjs/B9gppe9yylOBVjlO.cjs +11 -0
  8. package/browser/cjs/{OLabgsQBwtaTK0W0.cjs → BC5hMfP9nDp-FX8w.cjs} +2 -2
  9. package/browser/cjs/{DplqlJ7HcglmlTGS.cjs → BDQTloR6ySF1oJmn.cjs} +3 -3
  10. package/browser/cjs/BGmWpUqfmKTMUMGn.cjs +7 -0
  11. package/browser/cjs/BKUqPcB-J7lrb6tK.cjs +16 -0
  12. package/browser/cjs/BOGPmlcdjsR1qGaw.cjs +12 -0
  13. package/browser/cjs/Bm0v2rjm2HlzxhYA.cjs +6 -0
  14. package/browser/cjs/{BtFsTB7tByGgTFTS.cjs → Boc6wJysGvzcubzE.cjs} +1 -1
  15. package/browser/cjs/Bu-QtkFZAjl5aqEZ.cjs +42 -0
  16. package/browser/cjs/Bu5RUSGc8vWvj5h1.cjs +7 -0
  17. package/browser/cjs/{C0Lkr_--Cxs31BDb.cjs → Bz6AFqV-iXwN2WXy.cjs} +1 -1
  18. package/browser/cjs/{-e-e6x4DydOkgfVc.cjs → BzjDXtPtypjn5O_r.cjs} +1 -1
  19. package/browser/cjs/CCqgQpZBR5wOpyiV.cjs +14 -0
  20. package/browser/cjs/{JMbMtOhA1iNAqg9M.cjs → CD_immjTuT8VP5bS.cjs} +2 -2
  21. package/browser/cjs/CI-H71iwfm3NKxMS.cjs +124 -0
  22. package/browser/cjs/CIJw5emAR2nvDIDj.cjs +161 -0
  23. package/browser/cjs/{qJWlVkguMbHKZo4U.cjs → CLnjehFtQBLSaonl.cjs} +2 -2
  24. package/browser/cjs/CVq2lRYh2ZK9ZzEp.cjs +15 -0
  25. package/browser/cjs/{CF0dYrnCZLK0SIwW.cjs → CaKK8Dpj8rxVd-Wo.cjs} +1 -1
  26. package/browser/cjs/{BvtpgA7Hgaq6ZV2H.cjs → CbGqtIkA64SUCGEX.cjs} +1 -1
  27. package/browser/cjs/{B1jgIjvlVNA8GFNW.cjs → CnlXlI3wOKu-GDWY.cjs} +3 -3
  28. package/browser/cjs/{DHES3VrZvl0CSf2G.cjs → CvXAxxhFkfbMd1H8.cjs} +1 -1
  29. package/browser/cjs/Cx89ds7YFppm4HH8.cjs +330 -0
  30. package/browser/cjs/{BtpdtK6X5kYFON_1.cjs → D66WJ7L44lH-gqEs.cjs} +2 -2
  31. package/browser/cjs/{B3J8lwJ5LijhN3tn.cjs → D7gvl_LJVORCBWTA.cjs} +1 -1
  32. package/browser/cjs/DCFKfo0Ks_YcBE8v.cjs +145 -0
  33. package/browser/cjs/{B60hIOo5qZUt-0c9.cjs → DD1C5KAehYscPt_U.cjs} +1 -1
  34. package/browser/cjs/{CXie1KeQLXlWtuFB.cjs → DDRMd_y3PtDFdzBi.cjs} +2 -2
  35. package/browser/cjs/DF5NXM1lV0Jz4B1B.cjs +6 -0
  36. package/browser/cjs/{C3rAuKXyv3IAMarI.cjs → DJi6RguPp8dklFKW.cjs} +1 -1
  37. package/browser/cjs/{DoJVL2XhmzNjb-lR.cjs → DOZnkhk5efb0CiB9.cjs} +2 -2
  38. package/browser/cjs/DR_fZ7-8acyZaLf_.cjs +19 -0
  39. package/browser/cjs/{UdSif7-6u2CCyoCF.cjs → DU-89orbH_T7qaL_.cjs} +2 -2
  40. package/browser/cjs/{Ce5kMQ7KyLM0FD-L.cjs → DUn4qKP1csajZc4U.cjs} +1 -1
  41. package/browser/cjs/{CKIX0AfAnOnjimpb.cjs → DXlz9YcBEiIGssXP.cjs} +1 -1
  42. package/browser/cjs/DrjMGXXyOnkOigI3.cjs +6 -0
  43. package/browser/cjs/{BnSv5t6KM-F6UjnT.cjs → Dsrylhr0rINLqxIo.cjs} +2 -2
  44. package/browser/cjs/{C6aDurA3QFvuwi2s.cjs → DuF2g76E_LpdsOdz.cjs} +1 -1
  45. package/browser/cjs/{CPs17M3Xf7TIphbH.cjs → DutZZ9gvn9J4bp35.cjs} +1 -1
  46. package/browser/cjs/{C_lS_SrpK8RvrliQ.cjs → G3x4UlaZ9MkYVc_H.cjs} +1 -1
  47. package/browser/cjs/{DdMY09pvx5ru0U1Q.cjs → JDc0LRRyF9OoLcKS.cjs} +1 -1
  48. package/browser/cjs/{Bz6JSFIxWIFlSIbO.cjs → NLVU73SQVRkwS4d0.cjs} +1 -1
  49. package/browser/cjs/{dpPMu9SnEmkjFxLS.cjs → VbpW0QWkLYTAJZ9w.cjs} +1 -1
  50. package/browser/cjs/{Df9MYHn7aVLA7abz.cjs → WWBhcM7q4pZnnMeY.cjs} +2 -2
  51. package/browser/cjs/{BRbmq4oKdNRRdQVw.cjs → ZF7PNrdu1G2yTlSk.cjs} +1 -1
  52. package/browser/cjs/_GxFAa8FZ2HuEH-n.cjs +15 -0
  53. package/browser/cjs/{DE4vWhD9gh5TzYDS.cjs → cr5ZnpTRS8qn8ngu.cjs} +2 -2
  54. package/browser/cjs/{CeZwZsfBSeNFzBRj.cjs → dL8JD9YUPUIBdJkl.cjs} +1 -1
  55. package/browser/cjs/{B4IvAxHfbs1PhNrl.cjs → hvq3aBxxvks6uvKj.cjs} +1 -1
  56. package/browser/cjs/index.cjs +2 -2
  57. package/browser/cjs/{B19XDmw3OEi3gSNn.cjs → nJzfcdG4V6pfF7h0.cjs} +5 -5
  58. package/browser/cjs/{BeOlGuqc3a-VytP2.cjs → v338k5Im1PgN694P.cjs} +1 -1
  59. package/browser/esm/{BnusHharCufsqHcK.mjs → 282jouDV7h31MJHQ.mjs} +8 -8
  60. package/{cdn/assets/Bn4AQ04vq7zHnoL_.js → browser/esm/321FigfSIHj07fJF.mjs} +1 -1
  61. package/browser/esm/{BLoVxuMcliAyTYvm.mjs → 9MIReimVqrwIxqEh.mjs} +1 -1
  62. package/browser/esm/{fRJbgbZ_fawDpe4Y.mjs → B-gztIZ7YM5iJ3wt.mjs} +17 -17
  63. package/browser/esm/{CC7AU2fXo3KfvWsR.mjs → B2OboXsiOvfvb8MH.mjs} +1 -1
  64. package/browser/esm/{BJ7Roh6BEZyEYCBf.mjs → B9MJ-EmRjSDTv1w4.mjs} +1 -1
  65. package/browser/esm/{BDwfJYYjLxGxBbfd.mjs → BISAvXzk3EtsunSD.mjs} +20 -20
  66. package/browser/esm/{PK_vF_J7qweQDmnh.mjs → BJvO68MxNlLVN11J.mjs} +4 -4
  67. package/browser/esm/{cRhgWaTuF5ulsTUo.mjs → BcB6Q7VGZgUIWt2j.mjs} +4 -4
  68. package/browser/esm/{DwxBIXOwBXJ0OfuA.mjs → Bd38h6XDigUqNbcg.mjs} +87 -87
  69. package/{cdn/assets/nXa-TVOMsrXxtuc9.js → browser/esm/Bivu8-qvZh-EDNQz.mjs} +1 -1
  70. package/browser/esm/{C7ota-WuLdqFs7uL.mjs → Bw8K2kVeFl_Jw0P0.mjs} +1 -1
  71. package/browser/esm/{C2oRTm-hB0wbzQzF.mjs → C19ecRqHKBtGZDfI.mjs} +12 -12
  72. package/browser/esm/{DyIyAX_MrOKaiauf.mjs → C3qEhTp5YVVnZe5X.mjs} +8 -8
  73. package/browser/esm/{29gCxd6vbI5VRTfn.mjs → CG-xcWmpigeW_Kx8.mjs} +168 -168
  74. package/browser/esm/{BgxNRZhNxwSVMObt.mjs → CI7wOlrf3eE6yN7V.mjs} +586 -586
  75. package/{cdn/assets/BbFWsuy2TOFb7L6V.js → browser/esm/CKFK8GcprNVEDHNa.mjs} +357 -356
  76. package/{cdn/assets/BZmUvqJx-yz1aU-5.js → browser/esm/CKfqzGFvOATXIjAg.mjs} +1 -1
  77. package/{cdn/assets/BQl8_GephJT1zJkF.js → browser/esm/CYyb69OWQjTFKZv7.mjs} +1 -1
  78. package/browser/esm/{DtVOzXc0D5P_N9Tm.mjs → Ca3LaiFQ9rDcFlEo.mjs} +8 -8
  79. package/browser/esm/{BbI24vIIyg7QnIWY.mjs → Cawd10Vkye_QwId6.mjs} +2 -2
  80. package/browser/esm/{BSwvcpIMVfqXj73i.mjs → CbJB9w-prfu6jjZ0.mjs} +1 -1
  81. package/{cdn/assets/Buboguw3B4iA6kZz.js → browser/esm/CbXdVcSvxsdppPQ4.mjs} +75 -82
  82. package/browser/esm/{B1YdsvFxgY3cBuvU.mjs → CdwPs5lUbmC7U3Lf.mjs} +5 -5
  83. package/browser/esm/{BkguhAeEvTcTVZN3.mjs → Cl6khHlxvVnMqS0D.mjs} +13 -13
  84. package/browser/esm/{Bv8yISQhT9pU00bI.mjs → Csz20JNLZYTSnN3K.mjs} +10 -10
  85. package/browser/esm/{NQYuQ6Fwe1hZ8G7q.mjs → D1lQwvLcMPDvQDo3.mjs} +60 -60
  86. package/browser/esm/{PL8e8GY7OsUL26sU.mjs → DAPBPRU-M2q2HiIn.mjs} +1 -1
  87. package/browser/esm/{DTrC3bkaQd-PALtG.mjs → DBR_WsF8TffwuBP5.mjs} +1 -1
  88. package/{cdn/assets/ClOj__E12OzLFjTs.js → browser/esm/DBW1hdmDRqaRvLdG.mjs} +1 -1
  89. package/browser/esm/{CZ7Use237ej2QPOK.mjs → DFAD0oXlIppeZ1IQ.mjs} +16 -16
  90. package/{cdn/assets/Cr_OegqF4_kCciKy.js → browser/esm/DFfg5BY06x9-h5wg.mjs} +46 -46
  91. package/browser/esm/{DqHHGbrzfGptVwKT.mjs → DH4lpkIZMn3CDh2L.mjs} +1 -1
  92. package/{cdn/assets/CJkiM4g8IYjNDixD.js → browser/esm/DJItiTiaGl2-0zAy.mjs} +1 -1
  93. package/browser/esm/{D_Da-BJ5yYKKDQ4f.mjs → DMOg-rB-O9FQsKkk.mjs} +5 -5
  94. package/browser/esm/{l3bAiTRrp-5sxROq.mjs → DRygyzN5WothohKo.mjs} +1 -1
  95. package/{cdn/assets/C01DVMkA79lIKwia.js → browser/esm/DXNGyZw3edrDJuF1.mjs} +160 -160
  96. package/browser/esm/{5FUp9qfD2-cbJjYw.mjs → DeG9MYnptEMw6Ci6.mjs} +1 -1
  97. package/browser/esm/{BmQ1SS-asI9ita-i.mjs → Djig3YKXdV_mj88V.mjs} +193 -193
  98. package/browser/esm/{XG8H8R2jYaQEG5vJ.mjs → Dm2C0SjlSYBZS9oV.mjs} +1 -1
  99. package/browser/esm/{CWYXCDadrTpz_-C_.mjs → DtMlg7r-7Kg2ayER.mjs} +1758 -1713
  100. package/{cdn/assets/BpJyUoZ7qbXZNfEv.js → browser/esm/DvDXwlRVOM7de1QK.mjs} +1 -1
  101. package/browser/esm/{DqpL0PUcHc2yhukz.mjs → DxjMGNLar5dDlfH_.mjs} +1 -1
  102. package/{cdn/assets/iEQmmn4nEfkZiIn_.js → browser/esm/E33ZqiZAVm4cVSiH.mjs} +1 -1
  103. package/browser/esm/{Df2NuZU9juUIKwg8.mjs → I3vLnXgPWzkEMtym.mjs} +11 -11
  104. package/browser/esm/{EN4tauuENSQlsREt.mjs → K61zfEs7RrucoPnb.mjs} +16461 -16368
  105. package/browser/esm/{BPpmr49quCMrgcX0.mjs → PgD4CyzbD_U5krXX.mjs} +1 -1
  106. package/browser/esm/{BEJRY0y2fQ4GPPtE.mjs → PrQ3OVkLkyIlDEHZ.mjs} +38 -38
  107. package/{cdn/assets/BFrPcKvgjQjcu9eN.js → browser/esm/SvSuP9M_jWMrPq63.mjs} +1 -1
  108. package/browser/esm/{DPIItzNnxMbq2VfI.mjs → Zhy5PMTCSYaidSab.mjs} +14 -14
  109. package/browser/esm/{DWr4xYPlaw8j1mv4.mjs → cJvqQx_I0x7ktXkn.mjs} +8 -8
  110. package/browser/esm/index.mjs +2 -2
  111. package/browser/esm/{BHMr0Avspy2bTfaW.mjs → jKFK6KscRWBH7tPf.mjs} +9 -9
  112. package/browser/esm/{BIU3HZSh3eHX5SVx.mjs → lgGOpw-8ydsoTisK.mjs} +6 -6
  113. package/{cdn/assets/0w-BNQGPkDhzl4XV.js → browser/esm/uKUM2sxpQwuh_nK7.mjs} +1 -1
  114. package/{cdn/assets/67jatfS90fzwU27R.js → browser/esm/wDr5_PkewoAFIrSf.mjs} +17 -17
  115. package/{cdn/assets/CTgBHefewD51JTeI.js → browser/esm/wLe5ErQZrZcWaars.mjs} +1 -1
  116. package/{cdn/assets/DqY233UP8cctSm77.js → browser/esm/zudk-msJM8N8TvQw.mjs} +1 -1
  117. package/{browser/esm/Bn4AQ04vq7zHnoL_.mjs → cdn/assets/321FigfSIHj07fJF.js} +1 -1
  118. package/cdn/assets/{DJ5kSGtcg1tDP5HP.js → 90jiHAR6NVWs1jzk.js} +15 -15
  119. package/cdn/assets/{BLoVxuMcliAyTYvm.js → 9MIReimVqrwIxqEh.js} +1 -1
  120. package/cdn/assets/{BeIJny9YSrpatFa_.js → 9Zm1kh3NR1JoshnB.js} +9 -9
  121. package/{browser/esm/i-cDcFJjQOjsCvkc.mjs → cdn/assets/AWYiFPClRuayIl9x.js} +6 -6
  122. package/cdn/assets/{C9OEMeyLi2PcGoM_.js → B-4pX265Exs8Q3Ic.js} +8 -8
  123. package/cdn/assets/{CC7AU2fXo3KfvWsR.js → B2OboXsiOvfvb8MH.js} +1 -1
  124. package/cdn/assets/{Bws93VgZItsFgUk3.js → B4YJTAf0poVXP8L5.js} +2 -2
  125. package/cdn/assets/{BJ7Roh6BEZyEYCBf.js → B9MJ-EmRjSDTv1w4.js} +1 -1
  126. package/cdn/assets/{C9RXOT83ZaDxZypr.js → BCpiEapQ9ORxsm8i.js} +15 -15
  127. package/cdn/assets/{BDYXl0I19foxo18Q.js → BDpsB4gB5WlFNaD9.js} +3 -3
  128. package/cdn/assets/{PK_vF_J7qweQDmnh.js → BJvO68MxNlLVN11J.js} +4 -4
  129. package/cdn/assets/{CMro8-BzdQ70fPcS.js → BM7LiF_a2pzxiL9z.js} +10 -10
  130. package/{browser/esm/nXa-TVOMsrXxtuc9.mjs → cdn/assets/Bivu8-qvZh-EDNQz.js} +1 -1
  131. package/cdn/assets/{CR_vqV_czKiKF4fw.js → BoaBdKMl_TI4KOG4.js} +1 -1
  132. package/cdn/assets/{C7ota-WuLdqFs7uL.js → Bw8K2kVeFl_Jw0P0.js} +1 -1
  133. package/cdn/assets/{CoHkOJBYGnv7nVtH.js → BzNkHK2uCe3sZJjM.js} +9 -9
  134. package/cdn/assets/{BGgSpq92Z9F-Ntye.js → C3Uwcfkr3Vxb1l6W.js} +3 -3
  135. package/cdn/assets/{CjpVzFKvzpgazG0_.js → C5PTWP3-CKX2W7rN.js} +4 -4
  136. package/cdn/assets/{3UI-_5R_kCNSpf11.js → C7NcQPRjBbbwZPYQ.js} +12 -12
  137. package/cdn/assets/{D6rXwkO_1Ii6alNc.js → CHbRDN7qNXFI7ERc.js} +10 -10
  138. package/cdn/assets/{BgxNRZhNxwSVMObt.js → CI7wOlrf3eE6yN7V.js} +586 -586
  139. package/{browser/esm/BbFWsuy2TOFb7L6V.mjs → cdn/assets/CKFK8GcprNVEDHNa.js} +357 -356
  140. package/{browser/esm/BZmUvqJx-yz1aU-5.mjs → cdn/assets/CKfqzGFvOATXIjAg.js} +1 -1
  141. package/{browser/esm/BQl8_GephJT1zJkF.mjs → cdn/assets/CYyb69OWQjTFKZv7.js} +1 -1
  142. package/cdn/assets/{BJVeRrxdO-nBr5NZ.js → C_xB0pERAopiMdvi.js} +2 -2
  143. package/cdn/assets/{DDebECDOqTJ8ep5A.js → CaCiTJE2_MJc90Mb.js} +15513 -15420
  144. package/cdn/assets/{B-vmqKXIqM4BtjB0.js → Cavphgcoa0QAHI4t.js} +4 -4
  145. package/cdn/assets/{BSwvcpIMVfqXj73i.js → CbJB9w-prfu6jjZ0.js} +1 -1
  146. package/{browser/esm/Buboguw3B4iA6kZz.mjs → cdn/assets/CbXdVcSvxsdppPQ4.js} +75 -82
  147. package/cdn/assets/{BgeMTXAZBFP6Lm1K.js → CxYYYES99eqMaXS6.js} +53 -53
  148. package/cdn/assets/{Bt9u_FUrrLFhsXQD.js → CyxLxezaPBJ7ttzY.js} +1758 -1713
  149. package/cdn/assets/{pQH8gesojID3Qjpt.js → D3Fizhhok4urArOz.js} +168 -168
  150. package/cdn/assets/{CZq9aU6b4OMjD4So.js → D96I9AC-G_mJQ17A.js} +8 -8
  151. package/cdn/assets/{Bkevg67QC8R5eRdN.js → D9ExW89xyL0Yg3Rt.js} +5 -5
  152. package/cdn/assets/{PL8e8GY7OsUL26sU.js → DAPBPRU-M2q2HiIn.js} +1 -1
  153. package/cdn/assets/{DTrC3bkaQd-PALtG.js → DBR_WsF8TffwuBP5.js} +1 -1
  154. package/{browser/esm/ClOj__E12OzLFjTs.mjs → cdn/assets/DBW1hdmDRqaRvLdG.js} +1 -1
  155. package/cdn/assets/{DqHHGbrzfGptVwKT.js → DH4lpkIZMn3CDh2L.js} +1 -1
  156. package/{browser/esm/CJkiM4g8IYjNDixD.mjs → cdn/assets/DJItiTiaGl2-0zAy.js} +1 -1
  157. package/cdn/assets/{CwNV1YGbYAb8Uj2X.js → DNItKxoG_Q2f6LZH.js} +10 -10
  158. package/cdn/assets/{l3bAiTRrp-5sxROq.js → DRygyzN5WothohKo.js} +1 -1
  159. package/cdn/assets/{C4K-H3IXpWDSbdYQ.js → DSEAFlw0g7QF2Mfu.js} +9 -9
  160. package/cdn/assets/{CVdAYNj8GYvhnIO9.js → DU9-sbmPBpyK8ktC.js} +8 -8
  161. package/cdn/assets/{BxZmciTi6VGgkute.js → D_F8ngmTDFKi26MZ.js} +112 -112
  162. package/cdn/assets/{5FUp9qfD2-cbJjYw.js → DeG9MYnptEMw6Ci6.js} +1 -1
  163. package/cdn/assets/{XG8H8R2jYaQEG5vJ.js → Dm2C0SjlSYBZS9oV.js} +1 -1
  164. package/cdn/assets/{VSTVSUa9PQF0q0El.js → DoX3XAVH8Iy19wb6.js} +4 -4
  165. package/{browser/esm/BpJyUoZ7qbXZNfEv.mjs → cdn/assets/DvDXwlRVOM7de1QK.js} +1 -1
  166. package/cdn/assets/{BjiRKxp3WuyUvzaK.js → DwjBlRF-rzuhl244.js} +27 -27
  167. package/cdn/assets/{DqpL0PUcHc2yhukz.js → DxjMGNLar5dDlfH_.js} +1 -1
  168. package/{browser/esm/iEQmmn4nEfkZiIn_.mjs → cdn/assets/E33ZqiZAVm4cVSiH.js} +1 -1
  169. package/cdn/assets/{_VkCiSR35Ycf4qMs.js → EFp9HFyLmGj1_WJp.js} +17 -17
  170. package/cdn/assets/{_kc0UHqioVnr5VaW.js → Gigloq__yXekS86R.js} +9 -9
  171. package/cdn/assets/{BPpmr49quCMrgcX0.js → PgD4CyzbD_U5krXX.js} +1 -1
  172. package/cdn/assets/{BEJRY0y2fQ4GPPtE.js → PrQ3OVkLkyIlDEHZ.js} +38 -38
  173. package/{browser/esm/BFrPcKvgjQjcu9eN.mjs → cdn/assets/SvSuP9M_jWMrPq63.js} +1 -1
  174. package/{browser/esm/C7KXRC3vXznZQMjB.mjs → cdn/assets/WWXOc9ZGS04IoLgi.js} +160 -160
  175. package/cdn/assets/{DBZHLc-qxHxMEvda.js → qg_xcC9otctUkCnM.js} +7 -7
  176. package/cdn/assets/{BlI6YZ6neVjkkQx2.js → u2X7MYw3x6jMX0Hz.js} +195 -195
  177. package/{browser/esm/0w-BNQGPkDhzl4XV.mjs → cdn/assets/uKUM2sxpQwuh_nK7.js} +1 -1
  178. package/{browser/esm/67jatfS90fzwU27R.mjs → cdn/assets/wDr5_PkewoAFIrSf.js} +17 -17
  179. package/{browser/esm/CTgBHefewD51JTeI.mjs → cdn/assets/wLe5ErQZrZcWaars.js} +1 -1
  180. package/{browser/esm/DqY233UP8cctSm77.mjs → cdn/assets/zudk-msJM8N8TvQw.js} +1 -1
  181. package/cdn/index.js +2 -2
  182. package/cdn/loader.js +1 -1
  183. package/package.json +3 -3
  184. package/browser/cjs/0Y5TF7N-_tzvHQVc.cjs +0 -124
  185. package/browser/cjs/6wuTyFc2OkEg0YDy.cjs +0 -7
  186. package/browser/cjs/B9eXjWPqyv2f2Vlb.cjs +0 -19
  187. package/browser/cjs/BDk6w5arhq-Is61b.cjs +0 -12
  188. package/browser/cjs/BGzSwhO2H5T4phR5.cjs +0 -161
  189. package/browser/cjs/BJ1WplGSHjaVniJ2.cjs +0 -11
  190. package/browser/cjs/BWJjG9lChn_biRWK.cjs +0 -16
  191. package/browser/cjs/BynqqUXsUJ6HXiZn.cjs +0 -145
  192. package/browser/cjs/CUZ2Y1rgKje31rmq.cjs +0 -15
  193. package/browser/cjs/D-jAZv3G7PXDD1Cl.cjs +0 -330
  194. package/browser/cjs/DEKywAPnit6nelii.cjs +0 -7
  195. package/browser/cjs/DMVOPwwm1q8F1Fmb.cjs +0 -6
  196. package/browser/cjs/DUnBXgtPLOvtvcMm.cjs +0 -15
  197. package/browser/cjs/DmtRLRLitcmFXNBb.cjs +0 -6
  198. package/browser/cjs/Hboq9CzOQN_f83xm.cjs +0 -42
  199. package/browser/cjs/gAS-cGAMFNh1L6Q8.cjs +0 -14
  200. package/browser/cjs/zZBeoLrH03ilFGbk.cjs +0 -6
@@ -1,7 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.6
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ce,ue,ne={},ee={},U={},oe={},H={};function Ne(){if(ue)return H;ue=1;var g=H&&H.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(r,s){function l(O){try{D(n.next(O))}catch(c){s(c)}}function f(O){try{D(n.throw(O))}catch(c){s(c)}}function D(O){var c;O.done?r(O.value):(c=O.value,c instanceof o?c:new o(function(i){i(c)})).then(l,f)}D((n=n.apply(e,t||[])).next())})},x=H&&H.__generator||function(e,t){var o,n,r,s,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(D){return function(O){return function(c){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){l=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){l.label=c[1];break}if(c[0]===6&&l.label<r[1]){l.label=r[1],r=c;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(c);break}r[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(i){c=[6,i],n=0}finally{o=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([D,O])}}};Object.defineProperty(H,"__esModule",{value:!0}),H.JsDelivrSourceResolver=void 0;var j=function(){function e(){}return e.prototype.resolvePackageJson=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(t).concat(o?"@".concat(o):"").concat(n?"/".concat(n):"","/package.json"))];case 1:return[2,r.sent()]}})})},e.prototype.resolveSourceFile=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(t).concat(o?"@".concat(o):"","/").concat(n))];case 1:return[2,r.sent()]}})})},e.prototype.resolveFile=function(t){return g(this,void 0,void 0,function(){var o;return x(this,function(n){switch(n.label){case 0:return[4,fetch(t,{method:"GET"})];case 1:return(o=n.sent()).ok?[4,o.text()]:[3,3];case 2:return[2,n.sent()];case 3:if(o.status===404)return[2,""];throw Error("Error other than 404 while fetching from Unpkg at ".concat(t));case 4:return[2]}})})},e}();return H.JsDelivrSourceResolver=j,H}var le,pe,he,N={},V={};function se(){if(pe)return le;function g(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function x(e,t){for(var o,n="",r=0,s=-1,l=0,f=0;f<=e.length;++f){if(f<e.length)o=e.charCodeAt(f);else{if(o===47)break;o=47}if(o===47){if(s!==f-1&&l!==1)if(s!==f-1&&l===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var D=n.lastIndexOf("/");if(D!==n.length-1){D===-1?(n="",r=0):r=(n=n.slice(0,D)).length-1-n.lastIndexOf("/"),s=f,l=0;continue}}else if(n.length===2||n.length===1){n="",r=0,s=f,l=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(s+1,f):n=e.slice(s+1,f),r=f-s-1;s=f,l=0}else o===46&&l!==-1?++l:l=-1}return n}pe=1;var j={resolve:function(){for(var e,t="",o=!1,n=arguments.length-1;n>=-1&&!o;n--){var r;n>=0?r=arguments[n]:(e===void 0&&(e=process.cwd()),r=e),g(r),r.length!==0&&(t=r+"/"+t,o=r.charCodeAt(0)===47)}return t=x(t,!o),o?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(g(e),e.length===0)return".";var t=e.charCodeAt(0)===47,o=e.charCodeAt(e.length-1)===47;return(e=x(e,!t)).length!==0||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return g(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var o=arguments[t];g(o),o.length>0&&(e===void 0?e=o:e+="/"+o)}return e===void 0?".":j.normalize(e)},relative:function(e,t){if(g(e),g(t),e===t||(e=j.resolve(e))===(t=j.resolve(t)))return"";for(var o=1;o<e.length&&e.charCodeAt(o)===47;++o);for(var n=e.length,r=n-o,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var l=t.length-s,f=r<l?r:l,D=-1,O=0;O<=f;++O){if(O===f){if(l>f){if(t.charCodeAt(s+O)===47)return t.slice(s+O+1);if(O===0)return t.slice(s+O)}else r>f&&(e.charCodeAt(o+O)===47?D=O:O===0&&(D=0));break}var c=e.charCodeAt(o+O);if(c!==t.charCodeAt(s+O))break;c===47&&(D=O)}var i="";for(O=o+D+1;O<=n;++O)O!==n&&e.charCodeAt(O)!==47||(i.length===0?i+="..":i+="/..");return i.length>0?i+t.slice(s+D):(s+=D,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(g(e),e.length===0)return".";for(var t=e.charCodeAt(0),o=t===47,n=-1,r=!0,s=e.length-1;s>=1;--s)if((t=e.charCodeAt(s))===47){if(!r){n=s;break}}else r=!1;return n===-1?o?"/":".":o&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');g(e);var o,n=0,r=-1,s=!0;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var l=t.length-1,f=-1;for(o=e.length-1;o>=0;--o){var D=e.charCodeAt(o);if(D===47){if(!s){n=o+1;break}}else f===-1&&(s=!1,f=o+1),l>=0&&(D===t.charCodeAt(l)?--l===-1&&(r=o):(l=-1,r=f))}return n===r?r=f:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!s){n=o+1;break}}else r===-1&&(s=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname:function(e){g(e);for(var t=-1,o=0,n=-1,r=!0,s=0,l=e.length-1;l>=0;--l){var f=e.charCodeAt(l);if(f!==47)n===-1&&(r=!1,n=l+1),f===46?t===-1?t=l:s!==1&&(s=1):t!==-1&&(s=-1);else if(!r){o=l+1;break}}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===o+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return o=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),o?o===t.root?o+n:o+"/"+n:n;var t,o,n},parse:function(e){g(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var o,n=e.charCodeAt(0),r=n===47;r?(t.root="/",o=1):o=0;for(var s=-1,l=0,f=-1,D=!0,O=e.length-1,c=0;O>=o;--O)if((n=e.charCodeAt(O))!==47)f===-1&&(D=!1,f=O+1),n===46?s===-1?s=O:c!==1&&(c=1):s!==-1&&(c=-1);else if(!D){l=O+1;break}return s===-1||f===-1||c===0||c===1&&s===f-1&&s===l+1?f!==-1&&(t.base=t.name=l===0&&r?e.slice(1,f):e.slice(l,f)):(l===0&&r?(t.name=e.slice(1,s),t.base=e.slice(1,f)):(t.name=e.slice(l,s),t.base=e.slice(l,f)),t.ext=e.slice(s,f)),l>0?t.dir=e.slice(0,l-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};return j.posix=j,le=j}var fe,te={};function Ie(){if(fe)return te;fe=1;var g=te&&te.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(te,"__esModule",{value:!0}),te.importResourcePathToString=void 0;var x=g(se());return te.importResourcePathToString=function(j){var e;switch(j.kind){case"package":return x.default.join(j.packageName,(e=j.importPath)!==null&&e!==void 0?e:"","package.json");case"relative":return x.default.join(j.sourcePath,j.importPath);case"relative-in-package":return x.default.join(j.packageName,j.sourcePath,j.importPath)}},te}var de,ie={};function ve(){return de||(de=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.invokeUpdate=void 0,ie.invokeUpdate=function(g,x){var j,e="".concat(g.type,": ");switch(g.type){case"CodeChanged":case"ResolveNewImports":e+="";break;case"LookedUpTypeFile":e+='"'.concat(g.path,'" was ').concat(g.success?"sucessfully":"not sucessfully"," looked up");break;case"AttemptedLookUpFile":e+='"'.concat(g.path,'" was ').concat(g.success?"sucessfully":"not sucessfully"," attempted to looked up");break;case"LookedUpPackage":e+='package.json for package "'.concat(g.package,'" was ').concat(g.success?"sucessfully":"not sucessfully"," looked up").concat(g.definitelyTyped?" (found in definitely typed repo)":"");break;case"LoadedFromCache":e+='"'.concat(g.importPath,'" was loaded from cache');break;case"StoredToCache":e+='"'.concat(g.importPath,'" was stored to cache')}e.endsWith(": ")&&(e=e.slice(void 0,-2)),(j=x.onUpdate)===null||j===void 0||j.call(x,g,e)}),ie}var ye,ge,me,be,ae={};function ke(){if(ye)return ae;ye=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.RecursionDepth=void 0;var g=function(){function x(j,e,t){e===void 0&&(e=0),t===void 0&&(t=0),this.options=j,this.fileRecursionDepth=e,this.packageRecursionDepth=t}return x.prototype.nextPackage=function(){return new x(this.options,this.fileRecursionDepth,this.packageRecursionDepth+1)},x.prototype.nextFile=function(){return new x(this.options,this.fileRecursionDepth+1,this.packageRecursionDepth)},x.prototype.same=function(){return new x(this.options,this.fileRecursionDepth,this.packageRecursionDepth)},x.prototype.shouldStop=function(){return this.options.fileRecursionDepth>0&&this.fileRecursionDepth>=this.options.fileRecursionDepth||this.options.packageRecursionDepth>0&&this.packageRecursionDepth>=this.options.packageRecursionDepth},x}();return ae.RecursionDepth=g,ae}function Le(){if(me)return U;me=1;var g=U&&U.__assign||function(){return g=Object.assign||function(i){for(var b,k=1,A=arguments.length;k<A;k++)for(var y in b=arguments[k])Object.prototype.hasOwnProperty.call(b,y)&&(i[y]=b[y]);return i},g.apply(this,arguments)},x=U&&U.__createBinding||(Object.create?function(i,b,k,A){A===void 0&&(A=k);var y=Object.getOwnPropertyDescriptor(b,k);y&&!("get"in y?!b.__esModule:y.writable||y.configurable)||(y={enumerable:!0,get:function(){return b[k]}}),Object.defineProperty(i,A,y)}:function(i,b,k,A){A===void 0&&(A=k),i[A]=b[k]}),j=U&&U.__setModuleDefault||(Object.create?function(i,b){Object.defineProperty(i,"default",{enumerable:!0,value:b})}:function(i,b){i.default=b}),e=U&&U.__importStar||function(i){if(i&&i.__esModule)return i;var b={};if(i!=null)for(var k in i)k!=="default"&&Object.prototype.hasOwnProperty.call(i,k)&&x(b,i,k);return j(b,i),b},t=U&&U.__awaiter||function(i,b,k,A){return new(k||(k=Promise))(function(y,T){function E(X){try{Z(A.next(X))}catch(R){T(R)}}function Y(X){try{Z(A.throw(X))}catch(R){T(R)}}function Z(X){var R;X.done?y(X.value):(R=X.value,R instanceof k?R:new k(function(G){G(R)})).then(E,Y)}Z((A=A.apply(i,b||[])).next())})},o=U&&U.__generator||function(i,b){var k,A,y,T,E={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return T={next:Y(0),throw:Y(1),return:Y(2)},typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function Y(Z){return function(X){return function(R){if(k)throw new TypeError("Generator is already executing.");for(;E;)try{if(k=1,A&&(y=2&R[0]?A.return:R[0]?A.throw||((y=A.return)&&y.call(A),0):A.next)&&!(y=y.call(A,R[1])).done)return y;switch(A=0,y&&(R=[2&R[0],y.value]),R[0]){case 0:case 1:y=R;break;case 4:return E.label++,{value:R[1],done:!1};case 5:E.label++,A=R[1],R=[0];continue;case 7:R=E.ops.pop(),E.trys.pop();continue;default:if(!((y=(y=E.trys).length>0&&y[y.length-1])||R[0]!==6&&R[0]!==2)){E=0;continue}if(R[0]===3&&(!y||R[1]>y[0]&&R[1]<y[3])){E.label=R[1];break}if(R[0]===6&&E.label<y[1]){E.label=y[1],y=R;break}if(y&&E.label<y[2]){E.label=y[2],E.ops.push(R);break}y[2]&&E.ops.pop(),E.trys.pop();continue}R=b.call(i,E)}catch(G){R=[6,G],A=0}finally{k=y=0}if(5&R[0])throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}([Z,X])}}},n=U&&U.__values||function(i){var b=typeof Symbol=="function"&&Symbol.iterator,k=b&&i[b],A=0;if(k)return k.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&A>=i.length&&(i=void 0),{value:i&&i[A++],done:!i}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(U,"__esModule",{value:!0}),U.AutoTypingsCore=void 0;var r=function(){if(ce)return oe;ce=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.DummySourceCache=void 0;var i=function(){function b(){}return b.prototype.getFile=function(k){return Promise.resolve(void 0)},b.prototype.isFileAvailable=function(k){return Promise.resolve(!1)},b.prototype.storeFile=function(k,A){return Promise.resolve(void 0)},b.prototype.clear=function(){return Promise.resolve(void 0)},b}();return oe.DummySourceCache=i,oe}(),s=Ne(),l=function(){if(ge)return N;ge=1;var i=N&&N.__assign||function(){return i=Object.assign||function(_){for(var a,h=1,v=arguments.length;h<v;h++)for(var u in a=arguments[h])Object.prototype.hasOwnProperty.call(a,u)&&(_[u]=a[u]);return _},i.apply(this,arguments)},b=N&&N.__createBinding||(Object.create?function(_,a,h,v){v===void 0&&(v=h);var u=Object.getOwnPropertyDescriptor(a,h);u&&!("get"in u?!a.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return a[h]}}),Object.defineProperty(_,v,u)}:function(_,a,h,v){v===void 0&&(v=h),_[v]=a[h]}),k=N&&N.__setModuleDefault||(Object.create?function(_,a){Object.defineProperty(_,"default",{enumerable:!0,value:a})}:function(_,a){_.default=a}),A=N&&N.__importStar||function(_){if(_&&_.__esModule)return _;var a={};if(_!=null)for(var h in _)h!=="default"&&Object.prototype.hasOwnProperty.call(_,h)&&b(a,_,h);return k(a,_),a},y=N&&N.__awaiter||function(_,a,h,v){return new(h||(h=Promise))(function(u,S){function m(C){try{p(v.next(C))}catch(d){S(d)}}function w(C){try{p(v.throw(C))}catch(d){S(d)}}function p(C){var d;C.done?u(C.value):(d=C.value,d instanceof h?d:new h(function(P){P(d)})).then(m,w)}p((v=v.apply(_,a||[])).next())})},T=N&&N.__generator||function(_,a){var h,v,u,S,m={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return S={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function w(p){return function(C){return function(d){if(h)throw new TypeError("Generator is already executing.");for(;m;)try{if(h=1,v&&(u=2&d[0]?v.return:d[0]?v.throw||((u=v.return)&&u.call(v),0):v.next)&&!(u=u.call(v,d[1])).done)return u;switch(v=0,u&&(d=[2&d[0],u.value]),d[0]){case 0:case 1:u=d;break;case 4:return m.label++,{value:d[1],done:!1};case 5:m.label++,v=d[1],d=[0];continue;case 7:d=m.ops.pop(),m.trys.pop();continue;default:if(!((u=(u=m.trys).length>0&&u[u.length-1])||d[0]!==6&&d[0]!==2)){m=0;continue}if(d[0]===3&&(!u||d[1]>u[0]&&d[1]<u[3])){m.label=d[1];break}if(d[0]===6&&m.label<u[1]){m.label=u[1],u=d;break}if(u&&m.label<u[2]){m.label=u[2],m.ops.push(d);break}u[2]&&m.ops.pop(),m.trys.pop();continue}d=a.call(_,m)}catch(P){d=[6,P],v=0}finally{h=u=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([p,C])}}},E=N&&N.__values||function(_){var a=typeof Symbol=="function"&&Symbol.iterator,h=a&&_[a],v=0;if(h)return h.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&v>=_.length&&(_=void 0),{value:_&&_[v++],done:!_}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},Y=N&&N.__read||function(_,a){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var v,u,S=h.call(_),m=[];try{for(;(a===void 0||a-- >0)&&!(v=S.next()).done;)m.push(v.value)}catch(w){u={error:w}}finally{try{v&&!v.done&&(h=S.return)&&h.call(S)}finally{if(u)throw u.error}}return m};Object.defineProperty(N,"__esModule",{value:!0}),N.ImportResolver=void 0;var Z=function(){if(he)return V;he=1;var _=V&&V.__createBinding||(Object.create?function(w,p,C,d){d===void 0&&(d=C);var P=Object.getOwnPropertyDescriptor(p,C);P&&!("get"in P?!p.__esModule:P.writable||P.configurable)||(P={enumerable:!0,get:function(){return p[C]}}),Object.defineProperty(w,d,P)}:function(w,p,C,d){d===void 0&&(d=C),w[d]=p[C]}),a=V&&V.__setModuleDefault||(Object.create?function(w,p){Object.defineProperty(w,"default",{enumerable:!0,value:p})}:function(w,p){w.default=p}),h=V&&V.__importStar||function(w){if(w&&w.__esModule)return w;var p={};if(w!=null)for(var C in w)C!=="default"&&Object.prototype.hasOwnProperty.call(w,C)&&_(p,w,C);return a(p,w),p},v=V&&V.__read||function(w,p){var C=typeof Symbol=="function"&&w[Symbol.iterator];if(!C)return w;var d,P,I=C.call(w),L=[];try{for(;(p===void 0||p-- >0)&&!(d=I.next()).done;)L.push(d.value)}catch(M){P={error:M}}finally{try{d&&!d.done&&(C=I.return)&&C.call(I)}finally{if(P)throw P.error}}return L},u=V&&V.__spreadArray||function(w,p,C){if(C||arguments.length===2)for(var d,P=0,I=p.length;P<I;P++)!d&&P in p||(d||(d=Array.prototype.slice.call(p,0,P)),d[P]=p[P]);return w.concat(d||Array.prototype.slice.call(p))};Object.defineProperty(V,"__esModule",{value:!0}),V.DependencyParser=void 0;var S=h(se()),m=function(){function w(){this.REGEX_CLEAN=/[\n|\r]/g,this.REGEX_DETECT_IMPORT=/(?:(?:(?:import)|(?:export))(?:.)*?from\s+["']([^"']+)["'])|(?:((?:require|import))(?:\s+)?\(["']([^"']+)["']\))|(?:\/+\s+<reference\s+path=["']([^"']+)["']\s+\/>)/g,this.REGEX_NODE_MODULE=/^node:([\w\W\/]+)$/}return w.prototype.parseDependencies=function(p,C){var d=this;return u([],v(p.matchAll(this.REGEX_DETECT_IMPORT)),!1).map(function(P){var I,L;return(L=(I=P[1])!==null&&I!==void 0?I:P[2])!==null&&L!==void 0?L:P[3]}).filter(function(P){return!!P}).map(function(P){return d.resolvePath(P,C)})},w.prototype.resolvePath=function(p,C){var d=p.match(this.REGEX_NODE_MODULE);if(d)return{kind:"relative-in-package",packageName:"@types/node",importPath:"".concat(d[1],".d.ts"),sourcePath:""};if(typeof C=="string"){if(p.startsWith("."))return{kind:"relative",importPath:p,sourcePath:C};if(p.startsWith("@")){var P=p.split("/");return{kind:"package",packageName:"".concat(P[0],"/").concat(P[1]),importPath:P.slice(2).join("/")}}return{kind:"package",packageName:(P=p.split("/"))[0],importPath:P.slice(1).join("/")}}switch(C.kind){case"package":throw Error("TODO?");case"relative":throw Error("TODO2?");case"relative-in-package":return p.startsWith(".")?{kind:"relative-in-package",packageName:C.packageName,sourcePath:S.join(C.sourcePath,C.importPath),importPath:p}:p.startsWith("@")?(P=p.split("/"),{kind:"package",packageName:"".concat(P[0],"/").concat(P[1]),importPath:P.slice(2).join("/")}):{kind:"package",packageName:(P=p.split("/"))[0],importPath:P.slice(1).join("/")}}},w}();return V.DependencyParser=m,V}(),X=Ie(),R=A(se()),G=ve(),Me=ke(),Ue=function(){function _(a){var h,v;if(this.options=a,this.loadedFiles=[],this.dependencyParser=new Z.DependencyParser,this.cache=a.sourceCache,this.sourceResolver=a.sourceResolver,this.newImportsResolved=!1,this.monaco=a.monaco,a.preloadPackages&&a.versions){this.versions=a.versions;try{for(var u=E(Object.entries(a.versions)),S=u.next();!S.done;S=u.next()){var m=Y(S.value,2),w=m[0];m[1],this.resolveImport({kind:"package",packageName:w,importPath:""},new Me.RecursionDepth(this.options)).catch(function(p){console.error(p)})}}catch(p){h={error:p}}finally{try{S&&!S.done&&(v=u.return)&&v.call(u)}finally{if(h)throw h.error}}}}return _.prototype.wereNewImportsResolved=function(){return this.newImportsResolved},_.prototype.resetNewImportsResolved=function(){this.newImportsResolved=!1},_.prototype.resolveImportsInFile=function(a,h,v){var u,S,m;return y(this,void 0,void 0,function(){var w,p,C,d,P,I,L,M;return T(this,function(F){switch(F.label){case 0:if(v.shouldStop())return[2];w=this.dependencyParser.parseDependencies(a,h),F.label=1;case 1:F.trys.push([1,8,9,10]),p=E(w),C=p.next(),F.label=2;case 2:if(C.done)return[3,7];d=C.value,F.label=3;case 3:return F.trys.push([3,5,,6]),[4,this.resolveImport(d,v)];case 4:return F.sent(),[3,6];case 5:return P=F.sent(),this.options.onError?(S=(u=this.options).onError)===null||S===void 0||S.call(u,(m=P.message)!==null&&m!==void 0?m:P):console.error(P),[3,6];case 6:return C=p.next(),[3,2];case 7:return[3,10];case 8:return I=F.sent(),L={error:I},[3,10];case 9:try{C&&!C.done&&(M=p.return)&&M.call(p)}finally{if(L)throw L.error}return[7];case 10:return[2]}})})},_.prototype.resolveImport=function(a,h){return y(this,void 0,void 0,function(){var v,u;return T(this,function(S){switch(S.label){case 0:if(v=this.hashImportResourcePath(a),this.loadedFiles.includes(v))return[2];switch(this.loadedFiles.push(v),a.kind){case"package":return[3,1];case"relative":return[3,5];case"relative-in-package":return[3,6]}return[3,8];case 1:return[4,this.resolveImportFromPackageRoot(a)];case 2:return(u=S.sent())?[4,this.resolveImportInPackage(u,h.nextPackage().nextFile())]:[3,4];case 3:case 7:return[2,S.sent()];case 4:return[3,8];case 5:throw Error("Not implemented yet");case 6:return[4,this.resolveImportInPackage(a,h.nextFile())];case 8:return[2]}})})},_.prototype.resolveImportInPackage=function(a,h){return y(this,void 0,void 0,function(){var v,u,S;return T(this,function(m){switch(m.label){case 0:return[4,this.loadSourceFileContents(a)];case 1:return(v=m.sent())?(u=v.source,S=v.at,this.createModel(u,this.monaco.Uri.parse(this.options.fileRootPath+R.join("node_modules/".concat(a.packageName),S))),[4,this.resolveImportsInFile(u,{kind:"relative-in-package",packageName:a.packageName,sourcePath:R.dirname(S),importPath:""},h)]):[3,3];case 2:m.sent(),m.label=3;case 3:return[2]}})})},_.prototype.resolveImportFromPackageRoot=function(a){var h,v,u,S,m,w,p,C,d;return y(this,void 0,void 0,function(){var P,I,L,M,F,B,re,J,W;return T(this,function($){switch($.label){case 0:return P={type:"LookedUpPackage",package:a.packageName,definitelyTyped:!1,success:!1},!this.options.onlySpecifiedPackages||(h=this.versions)!==null&&h!==void 0&&h[a.packageName]||(v=this.versions)!==null&&v!==void 0&&v["@types/"+a.packageName]?(I=(S=(u=a.importPath)===null||u===void 0?void 0:u.length)!==null&&S!==void 0&&S,L=I?"/".concat(a.importPath):"",[4,this.resolvePackageJson(a.packageName,(m=this.versions)===null||m===void 0?void 0:m[a.packageName],I?a.importPath:void 0)]):((0,G.invokeUpdate)(P,this.options),[2]);case 1:return(M=$.sent())||!I?[3,3]:[4,this.resolvePackageJson(a.packageName,(w=this.versions)===null||w===void 0?void 0:w[a.packageName])];case 2:M=$.sent(),L="",$.label=3;case 3:return M?(F=JSON.parse(M)).typings||F.types?(W=F.typings||F.types,this.createModel(M,this.monaco.Uri.parse("".concat(this.options.fileRootPath,"node_modules/").concat(a.packageName).concat(L,"/package.json"))),(0,G.invokeUpdate)({type:"LookedUpPackage",package:a.packageName,definitelyTyped:!1,success:!0},this.options),this.setVersion(a.packageName,F.version),[2,{kind:"relative-in-package",packageName:a.packageName,sourcePath:"",importPath:R.join((p=a.importPath)!==null&&p!==void 0?p:"",W.startsWith("./")?W.slice(2):W)}]):[3,4]:[3,7];case 4:return B="@types/".concat(a.packageName.startsWith("@")?a.packageName.slice(1).replace(/\//,"__"):a.packageName),[4,this.resolvePackageJson(B,(C=this.versions)===null||C===void 0?void 0:C[B])];case 5:if(re=$.sent()){if((J=JSON.parse(re)).typings||J.types)return W=J.typings||J.types,this.createModel(re,this.monaco.Uri.parse("".concat(this.options.fileRootPath,"node_modules/").concat(B,"/package.json"))),(0,G.invokeUpdate)({type:"LookedUpPackage",package:B,definitelyTyped:!0,success:!0},this.options),this.setVersion(B,J.version),[2,{kind:"relative-in-package",packageName:B,sourcePath:"",importPath:R.join((d=a.importPath)!==null&&d!==void 0?d:"",W.startsWith("./")?W.slice(2):W)}];(0,G.invokeUpdate)(P,this.options)}else(0,G.invokeUpdate)(P,this.options);$.label=6;case 6:return[3,8];case 7:(0,G.invokeUpdate)(P,this.options),$.label=8;case 8:return[2]}})})},_.prototype.loadSourceFileContents=function(a){return y(this,void 0,void 0,function(){var h,v,u,S,m,w,p,C,d,P,I,L,M,F,B,re;return T(this,function(J){switch(J.label){case 0:return h=R.join(a.packageName,a.sourcePath,a.importPath),v={type:"LookedUpTypeFile",path:h,definitelyTyped:!1,success:!1},u=a.packageName,S=this.getVersion(a.packageName),(m=[".d.ts","/index.d.ts",".ts",".tsx","/index.ts","/index.tsx"]).map(function(W){return a.importPath.endsWith(W)}).reduce(function(W,$){return W||$},!1)?[4,this.resolveSourceFile(u,S,R.join(a.sourcePath,a.importPath))]:[3,2];case 1:return(F=J.sent())?[2,{source:F,at:R.join(a.sourcePath,a.importPath)}]:[3,9];case 2:J.trys.push([2,7,8,9]),w=E(m),p=w.next(),J.label=3;case 3:return p.done?[3,6]:(C=p.value,d=R.join(a.sourcePath,a.importPath),M=(C===".d.ts"&&d.endsWith(".js")?d.slice(0,-3):d)+C,[4,this.resolveSourceFile(u,S,M)]);case 4:if(F=J.sent(),(0,G.invokeUpdate)({type:"AttemptedLookUpFile",path:R.join(u,M),success:!!F},this.options),F)return(0,G.invokeUpdate)({type:"LookedUpTypeFile",path:R.join(u,M),success:!0},this.options),[2,{source:F,at:M}];J.label=5;case 5:return p=w.next(),[3,3];case 6:return[3,9];case 7:return P=J.sent(),B={error:P},[3,9];case 8:try{p&&!p.done&&(re=w.return)&&re.call(w)}finally{if(B)throw B.error}return[7];case 9:return[4,this.resolvePackageJson(u,S,R.join(a.sourcePath,a.importPath))];case 10:return(I=J.sent())&&(L=JSON.parse(I).types)?(M=R.join(a.sourcePath,a.importPath,L),[4,this.resolveSourceFile(u,S,M)]):[3,12];case 11:if(F=J.sent())return(0,G.invokeUpdate)({type:"LookedUpTypeFile",path:R.join(u,M),success:!0},this.options),[2,{source:F,at:M}];J.label=12;case 12:return(0,G.invokeUpdate)(v,this.options),[2,null]}})})},_.prototype.getVersion=function(a){var h;return(h=this.versions)===null||h===void 0?void 0:h[a]},_.prototype.setVersions=function(a){var h,v;this.versions=a,(v=(h=this.options).onUpdateVersions)===null||v===void 0||v.call(h,a)},_.prototype.setVersion=function(a,h){var v;this.setVersions(i(i({},this.versions),((v={})[a]=h,v)))},_.prototype.createModel=function(a,h){h=h.with({path:h.path.replace("@types/","")}),this.monaco.editor.getModel(h)||(this.monaco.editor.createModel(a,"typescript",h),this.newImportsResolved=!0)},_.prototype.hashImportResourcePath=function(a){return(0,X.importResourcePathToString)(a)},_.prototype.resolvePackageJson=function(a,h,v){return y(this,void 0,void 0,function(){var u,S,m,w;return T(this,function(p){switch(p.label){case 0:return u=R.join(a+(h?"@".concat(h):""),v??"","package.json"),S=!1,m=void 0,this.cache.isFileAvailable?[4,this.cache.isFileAvailable(u)]:[3,2];case 1:return S=p.sent(),[3,4];case 2:return[4,this.cache.getFile(u)];case 3:m=p.sent(),S=m!==void 0,p.label=4;case 4:return S?m==null?[3,5]:(w=m,[3,7]):[3,8];case 5:return[4,this.cache.getFile(u)];case 6:w=p.sent(),p.label=7;case 7:return[2,w];case 8:return[4,this.sourceResolver.resolvePackageJson(a,h,v)];case 9:return(m=p.sent())&&this.cache.storeFile(u,m),[2,m]}})})},_.prototype.resolveSourceFile=function(a,h,v){return y(this,void 0,void 0,function(){var u,S,m,w;return T(this,function(p){switch(p.label){case 0:return u=R.join(a+(h?"@".concat(h):""),v),S=!1,m=void 0,this.cache.isFileAvailable?[4,this.cache.isFileAvailable(u)]:[3,2];case 1:return S=p.sent(),[3,4];case 2:return[4,this.cache.getFile(u)];case 3:m=p.sent(),S=m!==void 0,p.label=4;case 4:return S?((0,G.invokeUpdate)({type:"LoadedFromCache",importPath:u},this.options),m==null?[3,5]:(w=m,[3,7])):[3,8];case 5:return[4,this.cache.getFile(u)];case 6:w=p.sent(),p.label=7;case 7:return[2,w];case 8:return[4,this.sourceResolver.resolveSourceFile(a,h,v)];case 9:return(m=p.sent())&&((0,G.invokeUpdate)({type:"StoredToCache",importPath:u},this.options),this.cache.storeFile(u,m)),[2,m]}})})},_}();return N.ImportResolver=Ue,N}(),f=e(se()),D=ve(),O=ke(),c=function(){function i(b,k){var A=this;this.editor=b,this.options=k,this.disposables=[],this.importResolver=new l.ImportResolver(k);var y=b.onDidChangeModelContent(function(T){A.debouncedResolveContents()});this.disposables.push(y),this.resolveContents(),k.dontAdaptEditorOptions||k.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(g(g({},k.monaco.languages.typescript.typescriptDefaults.getCompilerOptions()),{moduleResolution:k.monaco.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,rootDir:k.fileRootPath}))}return i.create=function(b,k){var A,y;return t(this,void 0,void 0,function(){var T;return o(this,function(E){if(k?.shareCache&&k.sourceCache&&!i.sharedCache&&(i.sharedCache=k.sourceCache),!(T=k?.monaco))throw new Error("monacoInstance not found, you can specify the monaco instance via options.monaco");return[2,new i(b,g(g({fileRootPath:"inmemory://model/",onlySpecifiedPackages:!1,preloadPackages:!1,shareCache:!1,dontAdaptEditorOptions:!1,dontRefreshModelValueAfterResolvement:!1,sourceCache:(A=i.sharedCache)!==null&&A!==void 0?A:new r.DummySourceCache,sourceResolver:(y=k?.sourceResolver)!==null&&y!==void 0?y:new s.JsDelivrSourceResolver,debounceDuration:4e3,fileRecursionDepth:10,packageRecursionDepth:3},k),{monaco:T}))]})})},i.prototype.dispose=function(){var b,k;try{for(var A=n(this.disposables),y=A.next();!y.done;y=A.next())y.value.dispose()}catch(T){b={error:T}}finally{try{y&&!y.done&&(k=A.return)&&k.call(A)}finally{if(b)throw b.error}}},i.prototype.setVersions=function(b){this.importResolver.setVersions(b),this.options.versions=b},i.prototype.clearCache=function(){return t(this,void 0,void 0,function(){return o(this,function(b){switch(b.label){case 0:return[4,this.options.sourceCache.clear()];case 1:return b.sent(),[2]}})})},i.prototype.debouncedResolveContents=function(){var b=this;this.isResolving||((0,D.invokeUpdate)({type:"CodeChanged"},this.options),this.options.debounceDuration<=0?this.resolveContents():(this.debounceTimer!==void 0&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){return t(b,void 0,void 0,function(){return o(this,function(k){switch(k.label){case 0:return[4,this.resolveContents()];case 1:return k.sent(),this.debounceTimer=void 0,[2]}})})},this.options.debounceDuration)))},i.prototype.resolveContents=function(){var b;return t(this,void 0,void 0,function(){var k,A,y,T;return o(this,function(E){switch(E.label){case 0:if(this.isResolving=!0,(0,D.invokeUpdate)({type:"ResolveNewImports"},this.options),!(k=this.editor.getModel()))throw Error("No model");A=k.getLinesContent(),E.label=1;case 1:return E.trys.push([1,3,,4]),[4,this.importResolver.resolveImportsInFile(A.join(`
7
- `),f.dirname(k.uri.toString()),new O.RecursionDepth(this.options))];case 2:return E.sent(),[3,4];case 3:if(y=E.sent(),!this.options.onError)throw y;return this.options.onError((b=y.message)!==null&&b!==void 0?b:y),[3,4];case 4:return this.importResolver.wereNewImportsResolved()&&(this.options.dontRefreshModelValueAfterResolvement||(T=this.editor.getPosition(),k.setValue(k.getValue()),T&&this.editor.setPosition(T)),this.importResolver.resetNewImportsResolved()),this.isResolving=!1,[2]}})})},i}();return U.AutoTypingsCore=c,U}var we,z={},_e,Pe,Oe,je,Re,Ce,Se,xe,Ae={},De={},Ee={},Te={},Q={};const Ge=function(g,x){for(var j=0;j<x.length;j++){const e=x[j];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in g)){const o=Object.getOwnPropertyDescriptor(e,t);o&&Object.defineProperty(g,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}({__proto__:null},[xe?Se:(xe=1,Ce||(Ce=1,q=ne,Fe=ne&&ne.__createBinding||(Object.create?function(g,x,j,e){e===void 0&&(e=j);var t=Object.getOwnPropertyDescriptor(x,j);t&&!("get"in t?!x.__esModule:t.writable||t.configurable)||(t={enumerable:!0,get:function(){return x[j]}}),Object.defineProperty(g,e,t)}:function(g,x,j,e){e===void 0&&(e=j),g[e]=x[j]}),K=ne&&ne.__exportStar||function(g,x){for(var j in g)j==="default"||Object.prototype.hasOwnProperty.call(x,j)||Fe(x,g,j)},Object.defineProperty(q,"__esModule",{value:!0}),K(function(){if(be)return ee;be=1;var g,x=ee&&ee.__extends||(g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])})(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}g(e,t),e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.AutoTypings=void 0;var j=function(e){function t(o,n){return e.call(this,o,n)||this}return x(t,e),t}(Le().AutoTypingsCore);return ee.AutoTypings=j,ee}(),q),K(Ie(),q),K(function(){if(we)return z;we=1;var g=z&&z.__awaiter||function(t,o,n,r){return new(n||(n=Promise))(function(s,l){function f(c){try{O(r.next(c))}catch(i){l(i)}}function D(c){try{O(r.throw(c))}catch(i){l(i)}}function O(c){var i;c.done?s(c.value):(i=c.value,i instanceof n?i:new n(function(b){b(i)})).then(f,D)}O((r=r.apply(t,o||[])).next())})},x=z&&z.__generator||function(t,o){var n,r,s,l,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return l={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function D(O){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;f;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return f.label++,{value:i[1],done:!1};case 5:f.label++,r=i[1],i=[0];continue;case 7:i=f.ops.pop(),f.trys.pop();continue;default:if(!((s=(s=f.trys).length>0&&s[s.length-1])||i[0]!==6&&i[0]!==2)){f=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){f.label=i[1];break}if(i[0]===6&&f.label<s[1]){f.label=s[1],s=i;break}if(s&&f.label<s[2]){f.label=s[2],f.ops.push(i);break}s[2]&&f.ops.pop(),f.trys.pop();continue}i=o.call(t,f)}catch(b){i=[6,b],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([O,c])}}},j=z&&z.__values||function(t){var o=typeof Symbol=="function"&&Symbol.iterator,n=o&&t[o],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(z,"__esModule",{value:!0}),z.LocalStorageCache=void 0;var e=function(){function t(){this.localCache={}}return t.prototype.getFile=function(o){var n;return g(this,void 0,void 0,function(){return x(this,function(r){try{return[2,(n=localStorage.getItem(t.LOCALSTORAGE_PREFIX+o))!==null&&n!==void 0?n:void 0]}catch{return[2,this.localCache[o]]}return[2]})})},t.prototype.storeFile=function(o,n){return g(this,void 0,void 0,function(){return x(this,function(r){this.localCache[o]=n;try{localStorage.setItem(t.LOCALSTORAGE_PREFIX+o,n)}catch{}return[2]})})},t.prototype.clear=function(){return g(this,void 0,void 0,function(){var o,n,r,s,l,f,D;return x(this,function(O){for(this.localCache={},o=[],n=0;n<localStorage.length;n++)(l=localStorage.key(n))!=null&&l.startsWith(t.LOCALSTORAGE_PREFIX)&&o.push(l);try{for(r=j(o),s=r.next();!s.done;s=r.next())l=s.value,localStorage.removeItem(l)}catch(c){f={error:c}}finally{try{s&&!s.done&&(D=r.return)&&D.call(r)}finally{if(f)throw f.error}}return[2]})})},t.LOCALSTORAGE_PREFIX="__autotyper_cache_",t}();return z.LocalStorageCache=e,z}(),q),K((_e||(_e=1,Object.defineProperty(Ae,"__esModule",{value:!0})),Ae),q),K((Pe||(Pe=1,Object.defineProperty(De,"__esModule",{value:!0})),De),q),K((Oe||(Oe=1,Object.defineProperty(Ee,"__esModule",{value:!0})),Ee),q),K((je||(je=1,Object.defineProperty(Te,"__esModule",{value:!0})),Te),q),K(function(){if(Re)return Q;Re=1;var g=Q&&Q.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(r,s){function l(O){try{D(n.next(O))}catch(c){s(c)}}function f(O){try{D(n.throw(O))}catch(c){s(c)}}function D(O){var c;O.done?r(O.value):(c=O.value,c instanceof o?c:new o(function(i){i(c)})).then(l,f)}D((n=n.apply(e,t||[])).next())})},x=Q&&Q.__generator||function(e,t){var o,n,r,s,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(D){return function(O){return function(c){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){l=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){l.label=c[1];break}if(c[0]===6&&l.label<r[1]){l.label=r[1],r=c;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(c);break}r[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(i){c=[6,i],n=0}finally{o=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([D,O])}}};Object.defineProperty(Q,"__esModule",{value:!0}),Q.UnpkgSourceResolver=void 0;var j=function(){function e(){}return e.prototype.resolvePackageJson=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://unpkg.com/".concat(t).concat(o?"@".concat(o):"").concat(n?"/".concat(n):"","/package.json"))];case 1:return[2,r.sent()]}})})},e.prototype.resolveSourceFile=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://unpkg.com/".concat(t).concat(o?"@".concat(o):"","/").concat(n))];case 1:return[2,r.sent()]}})})},e.prototype.resolveFile=function(t){return g(this,void 0,void 0,function(){var o;return x(this,function(n){switch(n.label){case 0:return[4,fetch(t,{method:"GET"})];case 1:return(o=n.sent()).ok?[4,o.text()]:[3,3];case 2:return[2,n.sent()];case 3:if(o.status===404)return[2,""];throw Error("Error other than 404 while fetching from Unpkg at ".concat(t));case 4:return[2]}})})},e}();return Q.UnpkgSourceResolver=j,Q}(),q),K(Ne(),q)),Se=ne)]);var q,Fe,K;exports.c=Ge;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.6
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./D-jAZv3G7PXDD1Cl.cjs"),g=require("./DplqlJ7HcglmlTGS.cjs");class X{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const z=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,G=u=>{const t=parseInt(u);return isNaN(t)?null:t},W=u=>{const t=parseFloat(u);return isNaN(t)?null:t},K=new Map;class V{constructor(t,e,s,r,o,i=null,n){const l=(c,h,d)=>n?.getRef?.(c,h,d,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??K}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const d=a.childNodes[h];d.localName!==i&&i!=="*"||n.push(d)}}s=n}return s.length===1?s[0]:s.length===0?null:new X(s)}getFromPath(t,e){return p.Xt.getFromPath(t,e)}setToPath(t,e,s){return p.Xt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return z}get INT_COPY(){return G}get FLOAT_COPY(){return W}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class S{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class ${visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const Y=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=p.Xt.roundAccurately(g.p(e),2);s!==-1e3&&(t.rotation=s)},A=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},f=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class Q{visit(t,e,s){return f(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const d={};s.series=d;for(let m=0;m<h.length;m++)d[m+""]=h[m];d.length=h.length}}class H{visit(t,e,s){return f(t,e,s,"plotVisOnly","plotVisOnly"),A(t,e,s,"dispBlanksAs","dispBlanksAs"),f(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),f(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class D{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=g.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let d=0;d<c.length;d++){const m=c.item(d);h+=g.a(m.getAttribute("d"))+","+g.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=g.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=g.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=g.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),d={offset:g.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(d)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=g.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=g.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=g.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=g.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+g.a(e.getAttribute("r"))+","+g.a(e.getAttribute("g"))+","+g.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+g.p(e.getAttribute("hue"))+","+g.a(e.getAttribute("sat"))+","+g.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends D{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){Y(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=g.c(a.getAttribute("x"))??0,l.y=g.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=g.c(c.getAttribute("cx"))??0,l.height=g.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(A(t,e,r,"grouping","grouping"),f(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),f(t,e,r,"showNegBubbles","showNegativeBubbleValues"),f(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),A(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class J extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(f(t,e,r,"showBubbleSize","showBubbleSize"),f(t,e,r,"showCatName","showCatName"),f(t,e,r,"showLeaderLines","showLeaderLines"),f(t,e,r,"showPercent","showPercentage"),f(t,e,r,"showSerName","showSerName"),f(t,e,r,"showVal","showVal"),f(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),A(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const M=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class Z{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),f(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){M(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class tt{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),f(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),M(t,e,i),i}}class et{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class k{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),f(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),A(t,e,r,"majorTickMark","majorTickMarks"),A(t,e,r,"minorTickMark","minorTickMarks"),A(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),A(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),A(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),A(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let d=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),d?h.text=d.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&Y(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[p.te.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class rt{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class st{visit(t,e,s){const r={};return f(t,e,r,"overlay","overlay"),A(t,e,r,"legendPos","position"),s.legend=r,r}}class ot extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class _ extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};f(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class it{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),A(t,r,o,"xMode","xMode"),A(t,r,o,"yMode","yMode"),A(t,r,o,"wMode","wMode"),A(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class nt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class lt extends D{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class at{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[p.te.getPanoseFallback(i)]),s}}class ct{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ut{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:p.gu.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:p.gu.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:p.gu.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:p.gu.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:p.gu.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:p.gu.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=g.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=g.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class ht{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=g.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?p.Kr.CaseSensitiveOptions:p.Kr.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&g.b(e.getAttribute("columnSort"))&&(r.orientation=p.w.Orientation.Column);const i=p.to.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=p.to.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=g.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class U{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=g.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=p.te.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||p.te.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.te.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.te.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),A(t,e,s,"name","family"),A(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return A(t,e,s,"scheme","scheme"),f(t,e,s,"shadow","shadow",!0),f(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),A(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:p.Q.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=p.Q.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const d=t.evaluate("color",a);this.processDataBarColor(t,d,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?p.Q.BuiltInSheetPattern.Solid:p.Q.BuiltInSheetPattern.None);if(o===p.Q.BuiltInSheetPattern.None)return{none:!0};s.type=p.Q.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===p.Q.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const d=n;n=l,l=d}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,p.U.Edge.Left),this.processBorderStroke(t,e,i,p.U.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.U.Edge.Vertical),this.processBorderStroke(t,e,i,p.U.Edge.Top),this.processBorderStroke(t,e,i,p.U.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.U.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class pt extends U{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:p.Q.Type.None},r.fills[1]={type:p.Q.Type.Pattern,patternType:p.Q.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==p.le.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||g.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let d;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(d=b.get(h)),s.numberFormat=d??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=g.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=p.X.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=p.X.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,g.b(e?.getAttribute("wrapText"))?r.overflow=p.X.Overflow.Wrap:r.overflow=p.X.Overflow.Visible,g.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=p.X.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=g.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=p.X.ReadingDirection.Auto:o==="1"?r.readingDirection=p.X.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=p.X.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!g.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&g.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=g.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=g.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),d=c.getAttribute("dxfId");let m=r?.[d];m||(console.warn("invalid dfx id",d),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const d=a.item(h);d.nodeType===1&&d.localName==="tableStyle"&&this.processTableStyle(t,d,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=g.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class gt extends U{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class dt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class mt{visit(t,e,s){return s}}class x{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=g.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=g.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class I{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class bt extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class B extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends I{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class yt extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const j="richTypes";class vt{visit(t,e,s){let r=t.getVisitorParamsState().get(j);r||(r=[],t.getVisitorParamsState().set(j,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const R="richData";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(R);o||(o=[],t.getVisitorParamsState().set(R,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const d=this.mapType(t,h);o.push(d)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=p.n.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],d=c[1];let m=a.textContent;d==="i"&&(m=Number(m)),s[h]=m}}}}class Ct{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class wt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Pt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Nt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",g.r),t.copyFromAttribute(e,"personId",r,"personId",g.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",g.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=g.b(e.getAttribute("done"))),s.push(r),r}}class Ot{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",g.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",g.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const Tt={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class E{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new $),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new Q),this.registerVisitor("c:chartSpace",new H,"chart"),this.registerVisitor("c:plotArea",new q),this.registerVisitor("c:barChart",new J),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new Z),this.registerVisitor("c:dPt",new tt),this.registerVisitor("c:marker",new et),this.registerVisitor("c:catAx",new k),this.registerVisitor("c:valAx",new k),this.registerVisitor("c:dateAx",new k),this.registerVisitor("c:majorGridlines",new S("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new S("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new st),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new rt),this.registerVisitor("c:ser",new ot,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new _),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new it),this.registerVisitor("c:dispUnits",new S("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new _("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new nt),this.registerVisitor("a:theme",new lt,"themeElements/clrScheme"),this.registerVisitor("a:theme",new at,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ut),this.registerVisitor("sortState",new ht),this.registerVisitor("s:workbook",new gt),this.registerVisitor("styleSheet",new pt),this.registerVisitor("table",new dt),this.registerVisitor("hlinkClick",new ct),this.registerVisitor("wsDr",new mt),this.registerVisitor("twoCellAnchor",new x),this.registerVisitor("oneCellAnchor",new x),this.registerVisitor("absoluteAnchor",new x),this.registerVisitor("graphicFrame",new bt),this.registerVisitor("sp",new B),this.registerVisitor("grpSp",new At),this.registerVisitor("cxnSp",new yt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new vt),this.registerVisitor("rvData",new Ft),this.registerVisitor("comments",new Ct),this.registerVisitor("commentList",new wt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Pt),this.registerVisitor("threadedComment",new Nt),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Ot)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Tt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new V(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(d){console.warn(`Error in afterVisit: ${h.context.getPath()}`,d)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const d=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)d(m.item(b))}else d(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const d=c.item(h);if(d.nodeType===1){const m=d,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=E,exports.default=E;
@@ -1,15 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.6
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const yt=require("./D-jAZv3G7PXDD1Cl.cjs");var ct,pt={exports:{}},gt=(ct||(ct=1,pt.exports=function Y(){var Q,k=typeof self<"u"?self:typeof window<"u"?window:k!==void 0?k:{},P=!k.document&&!!k.postMessage,B=k.IS_PAPA_WORKER||!1,J={},mt=0,a={};function K(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let l=this._config.newline;l||(r=this._config.quoteChar||'"',l=this._handle.guessLineEndings(e,r)),e=[...e.split(l).slice(n)].join(l)}this.isFirstChunk&&_(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,B)k.postMessage({results:r,workerId:a.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):B&&this._config.error&&k.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=a.RemoteChunkSize),K.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(l){this._chunkError(l.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){var i;e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=((i=(i=e).getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=a.LocalChunkSize),K.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,l=(this._config.chunkSize&&(l=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,l)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:l}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;K.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){K.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){K.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){K.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=$(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(l){this._streamError(l)}},this),this._streamError=$(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=$(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,l=Math.pow(2,53),v=-l,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,w=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,m=this,T=0,o=0,j=!1,u=!1,p=[],s={data:[],errors:[],meta:{}};function C(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function R(){if(s&&n&&(z("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(f){return!C(f)})),F()){let f=function(O,L){_(t.transformHeader)&&(O=t.transformHeader(O,L)),p.push(O)};if(s)if(Array.isArray(s.data[0])){for(var h=0;F()&&h<s.data.length;h++)s.data[h].forEach(f);s.data.splice(0,1)}else s.data.forEach(f)}function c(f,O){for(var L=t.header?{}:[],b=0;b<f.length;b++){var y=b,g=f[b];g=((U,d)=>{return S=U,t.dynamicTypingFunction&&t.dynamicTyping[S]===void 0&&(t.dynamicTyping[S]=t.dynamicTypingFunction(S)),(t.dynamicTyping[S]||t.dynamicTyping)===!0?d==="true"||d==="TRUE"||d!=="false"&&d!=="FALSE"&&((I=>{if(M.test(I)&&(I=parseFloat(I),v<I&&I<l))return 1})(d)?parseFloat(d):w.test(d)?new Date(d):d===""?null:d):d;var S})(y=t.header?b>=p.length?"__parsed_extra":p[b]:y,g=t.transform?t.transform(g,y):g),y==="__parsed_extra"?(L[y]=L[y]||[],L[y].push(g)):L[y]=g}return t.header&&(b>p.length?z("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+b,o+O):b<p.length&&z("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+b,o+O)),L}var E;s&&(t.header||t.dynamicTyping||t.transform)&&(E=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(c),E=s.data.length):s.data=c(s.data,0),t.header&&s.meta&&(s.meta.fields=p),o+=E)}function F(){return t.header&&p.length===0}function z(h,c,E,f){h={type:h,code:c,message:E},f!==void 0&&(h.row=f),s.errors.push(h)}_(t.step)&&(r=t.step,t.step=function(h){s=h,F()?R():(R(),s.data.length!==0&&(T+=h.data.length,t.preview&&T>t.preview?i.abort():(s.data=s.data[0],r(s,m))))}),this.parse=function(h,c,E){var f=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,f)),n=!1,t.delimiter?_(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((f=((O,L,b,y,g)=>{var U,d,S,I;g=g||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var Z=0;Z<g.length;Z++){for(var W,tt=g[Z],A=0,D=0,x=0,q=(S=void 0,new st({comments:y,delimiter:tt,newline:L,preview:10}).parse(O)),H=0;H<q.data.length;H++)b&&C(q.data[H])?x++:(D+=W=q.data[H].length,S===void 0?S=W:0<W&&(A+=Math.abs(W-S),S=W));0<q.data.length&&(D/=q.data.length-x),(d===void 0||A<=d)&&(I===void 0||I<D)&&1.99<D&&(d=A,U=tt,I=D)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=f.bestDelimiter:(n=!0,t.delimiter=a.DefaultDelimiter),s.meta.delimiter=t.delimiter),f=at(t),t.preview&&t.header&&f.preview++,e=h,i=new st(f),s=i.parse(e,c,E),R(),j?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return j},this.pause=function(){j=!0,i.abort(),e=_(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){m.streamer._halted?(j=!1,m.streamer.parseChunk(e,!0)):setTimeout(m.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,_(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,c){h=h.substring(0,1048576),c=new RegExp(V(c)+"([^]*?)"+V(c),"gm");var E=(h=h.replace(c,"")).split("\r");if(h=1<(c=h.split(`
7
- `)).length&&c[0].length<E[0].length,E.length===1||h)return`
8
- `;for(var f=0,O=0;O<E.length;O++)E[O][0]===`
9
- `&&f++;return f>=E.length/2?`\r
10
- `:"\r"}}function V(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function st(t){var e=(t=t||{}).delimiter,i=t.newline,n=t.comments,r=t.step,l=t.preview,v=t.fastMode,M=null,w=!1,m=t.quoteChar==null?'"':t.quoteChar,T=m;if(t.escapeChar!==void 0&&(T=t.escapeChar),(typeof e!="string"||-1<a.BAD_DELIMITERS.indexOf(e))&&(e=","),n===e)throw new Error("Comment character same as delimiter");n===!0?n="#":(typeof n!="string"||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),i!==`
11
- `&&i!=="\r"&&i!==`\r
12
- `&&(i=`
13
- `);var o=0,j=!1;this.parse=function(u,p,s){if(typeof u!="string")throw new Error("Input must be a string");var C=u.length,R=e.length,F=i.length,z=n.length,h=_(r),c=[],E=[],f=[],O=o=0;if(!u)return A();if(v||v!==!1&&u.indexOf(m)===-1){for(var L=u.split(i),b=0;b<L.length;b++){if(f=L[b],o+=f.length,b!==L.length-1)o+=i.length;else if(s)return A();if(!n||f.substring(0,z)!==n){if(h){if(c=[],I(f.split(e)),D(),j)return A()}else I(f.split(e));if(l&&l<=b)return c=c.slice(0,l),A(!0)}}return A()}for(var y=u.indexOf(e,o),g=u.indexOf(i,o),U=new RegExp(V(T)+V(m),"g"),d=u.indexOf(m,o);;)if(u[o]===m)for(d=o,o++;;){if((d=u.indexOf(m,d+1))===-1)return s||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:c.length,index:o}),W();if(d===C-1)return W(u.substring(o,d).replace(U,m));if(m===T&&u[d+1]===T)d++;else if(m===T||d===0||u[d-1]!==T){y!==-1&&y<d+1&&(y=u.indexOf(e,d+1));var S=Z((g=g!==-1&&g<d+1?u.indexOf(i,d+1):g)===-1?y:Math.min(y,g));if(u.substr(d+1+S,R)===e){f.push(u.substring(o,d).replace(U,m)),u[o=d+1+S+R]!==m&&(d=u.indexOf(m,o)),y=u.indexOf(e,o),g=u.indexOf(i,o);break}if(S=Z(g),u.substring(d+1+S,d+1+S+F)===i){if(f.push(u.substring(o,d).replace(U,m)),tt(d+1+S+F),y=u.indexOf(e,o),d=u.indexOf(m,o),h&&(D(),j))return A();if(l&&c.length>=l)return A(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:c.length,index:o}),d++}}else if(n&&f.length===0&&u.substring(o,o+z)===n){if(g===-1)return A();o=g+F,g=u.indexOf(i,o),y=u.indexOf(e,o)}else if(y!==-1&&(y<g||g===-1))f.push(u.substring(o,y)),o=y+R,y=u.indexOf(e,o);else{if(g===-1)break;if(f.push(u.substring(o,g)),tt(g+F),h&&(D(),j))return A();if(l&&c.length>=l)return A(!0)}return W();function I(x){c.push(x),O=o}function Z(x){return x!==-1&&(x=u.substring(d+1,x))&&x.trim()===""?x.length:0}function W(x){return s||(x===void 0&&(x=u.substring(o)),f.push(x),o=C,I(f),h&&D()),A()}function tt(x){o=x,I(f),f=[],g=u.indexOf(i,o)}function A(x){if(t.header&&!p&&c.length&&!w){var q=c[0],H=Object.create(null),ot=new Set(q);let ft=!1;for(let G=0;G<q.length;G++){let N=q[G];if(H[N=_(t.transformHeader)?t.transformHeader(N,G):N]){let et,lt=H[N];for(;et=N+"_"+lt,lt++,ot.has(et););ot.add(et),q[G]=et,H[N]++,ft=!0,(M=M===null?{}:M)[et]=N}else H[N]=1,q[G]=N;ot.add(N)}ft&&console.warn("Duplicate headers found and renamed."),w=!0}return{data:c,errors:E,meta:{delimiter:e,linebreak:i,aborted:j,truncated:!!x,cursor:O+(p||0),renamedHeaders:M}}}function D(){r(A()),c=[],E=[]}},this.abort=function(){j=!0},this.getCharIndex=function(){return o}}function _t(t){var e=t.data,i=J[e.workerId],n=!1;if(e.error)i.userError(e.error,e.file);else if(e.results&&e.results.data){var r={abort:function(){n=!0,ut(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:dt,resume:dt};if(_(i.userStep)){for(var l=0;l<e.results.data.length&&(i.userStep({data:e.results.data[l],errors:e.results.errors,meta:e.results.meta},r),!n);l++);delete e.results}else _(i.userChunk)&&(i.userChunk(e.results,r,e.file),delete e.results)}e.finished&&!n&&ut(e.workerId,e.results)}function ut(t,e){var i=J[t];_(i.userComplete)&&i.userComplete(e),i.terminate(),delete J[t]}function dt(){throw new Error("Not implemented.")}function at(t){if(typeof t!="object"||t===null)return t;var e,i=Array.isArray(t)?[]:{};for(e in t)i[e]=at(t[e]);return i}function $(t,e){return function(){t.apply(e,arguments)}}function _(t){return typeof t=="function"}return a.parse=function(t,e){var i,n=(e=e||{}).dynamicTyping||!1;if(_(n)&&(e.dynamicTypingFunction=n,n={}),e.dynamicTyping=n,e.transform=!!_(e.transform)&&e.transform,!e.worker||!a.WORKERS_SUPPORTED)return n=null,a.NODE_STREAM_INPUT,typeof t=="string"?(t=(i=t).charCodeAt(0)!==65279?i:i.slice(1),n=new(e.download?it:X)(e)):t.readable===!0&&_(t.read)&&_(t.on)?n=new nt(e):(k.File&&t instanceof File||t instanceof Object)&&(n=new rt(e)),n.stream(t);(n=(()=>{var r,l,v;return!!a.WORKERS_SUPPORTED&&(l=k.URL||k.webkitURL||null,v=Y.toString(),r=a.BLOB_URL||(a.BLOB_URL=l.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",v,")();"],{type:"text/javascript"}))),(r=new k.Worker(r)).onmessage=_t,r.id=mt++,J[r.id]=r)})()).userStep=e.step,n.userChunk=e.chunk,n.userComplete=e.complete,n.userError=e.error,e.step=_(e.step),e.chunk=_(e.chunk),e.complete=_(e.complete),e.error=_(e.error),delete e.worker,n.postMessage({input:t,config:e,workerId:n.id})},a.unparse=function(t,e){var i=!1,n=!0,r=",",l=`\r
14
- `,v='"',M=v+v,w=!1,m=null,T=!1,o=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||a.BAD_DELIMITERS.filter(function(p){return e.delimiter.indexOf(p)!==-1}).length||(r=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(i=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(w=e.skipEmptyLines),typeof e.newline=="string"&&(l=e.newline),typeof e.quoteChar=="string"&&(v=e.quoteChar),typeof e.header=="boolean"&&(n=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");m=e.columns}e.escapeChar!==void 0&&(M=e.escapeChar+v),e.escapeFormulae instanceof RegExp?T=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(T=/^[=+\-@\t\r].*$/)}})(),new RegExp(V(v),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return j(null,t,w);if(typeof t[0]=="object")return j(m||Object.keys(t[0]),t,w)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||m),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),j(t.fields||[],t.data||[],w);throw new Error("Unable to serialize unrecognized input");function j(p,s,C){var R="",F=(typeof p=="string"&&(p=JSON.parse(p)),typeof s=="string"&&(s=JSON.parse(s)),Array.isArray(p)&&0<p.length),z=!Array.isArray(s[0]);if(F&&n){for(var h=0;h<p.length;h++)0<h&&(R+=r),R+=u(p[h],h);0<s.length&&(R+=l)}for(var c=0;c<s.length;c++){var E=(F?p:s[c]).length,f=!1,O=F?Object.keys(s[c]).length===0:s[c].length===0;if(C&&!F&&(f=C==="greedy"?s[c].join("").trim()==="":s[c].length===1&&s[c][0].length===0),C==="greedy"&&F){for(var L=[],b=0;b<E;b++){var y=z?p[b]:b;L.push(s[c][y])}f=L.join("").trim()===""}if(!f){for(var g=0;g<E;g++){0<g&&!O&&(R+=r);var U=F&&z?p[g]:g;R+=u(s[c][U],g)}c<s.length-1&&(!C||0<E&&!O)&&(R+=l)}}return R}function u(p,s){var C,R;return p==null?"":p.constructor===Date?JSON.stringify(p).slice(1,25):(R=!1,T&&typeof p=="string"&&T.test(p)&&(p="'"+p,R=!0),C=p.toString().replace(o,M),(R=R||i===!0||typeof i=="function"&&i(p,s)||Array.isArray(i)&&i[s]||((F,z)=>{for(var h=0;h<z.length;h++)if(-1<F.indexOf(z[h]))return!0;return!1})(C,a.BAD_DELIMITERS)||-1<C.indexOf(r)||C.charAt(0)===" "||C.charAt(C.length-1)===" ")?v+C+v:C)}},a.RECORD_SEP="",a.UNIT_SEP="",a.BYTE_ORDER_MARK="\uFEFF",a.BAD_DELIMITERS=["\r",`
15
- `,'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!P&&!!k.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=st,a.ParserHandle=ht,a.NetworkStreamer=it,a.FileStreamer=rt,a.StringStreamer=X,a.ReadableStreamStreamer=nt,k.jQuery&&((Q=k.jQuery).fn.parse=function(t){var e=t.config||{},i=[];return this.each(function(l){if(Q(this).prop("tagName").toUpperCase()!=="INPUT"||Q(this).attr("type").toLowerCase()!=="file"||!k.FileReader||!this.files||this.files.length===0)return!0;for(var v=0;v<this.files.length;v++)i.push({file:this.files[v],inputElem:this,instanceConfig:Q.extend({},e)})}),n(),this;function n(){if(i.length===0)_(t.complete)&&t.complete();else{var l,v,M,w=i[0];if(_(t.before)){var m=t.before(w.file,w.inputElem);if(typeof m=="object"){if(m.action==="abort")return l=w.file,v=w.inputElem,M=m.reason,void(_(t.error)&&t.error({name:"AbortError"},l,v,M));if(m.action==="skip")return void r();typeof m.config=="object"&&(w.instanceConfig=Q.extend(w.instanceConfig,m.config))}else if(m==="skip")return void r()}var T=w.instanceConfig.complete;w.instanceConfig.complete=function(o){_(T)&&T(o,w.file,w.inputElem),r()},a.parse(w.file,w.instanceConfig)}}function r(){i.splice(0,1),n()}}),B&&(k.onmessage=function(t){t=t.data,a.WORKER_ID===void 0&&t&&(a.WORKER_ID=t.workerId),typeof t.input=="string"?k.postMessage({workerId:a.WORKER_ID,results:a.parse(t.input,t.config),finished:!0}):(k.File&&t.input instanceof File||t.input instanceof Object)&&(t=a.parse(t.input,t.config))&&k.postMessage({workerId:a.WORKER_ID,results:t,finished:!0})}),(it.prototype=Object.create(K.prototype)).constructor=it,(rt.prototype=Object.create(K.prototype)).constructor=rt,(X.prototype=Object.create(X.prototype)).constructor=X,(nt.prototype=Object.create(K.prototype)).constructor=nt,a}()),pt.exports);const kt=function(Y,Q){for(var k=0;k<Q.length;k++){const P=Q[k];if(typeof P!="string"&&!Array.isArray(P)){for(const B in P)if(B!=="default"&&!(B in Y)){const J=Object.getOwnPropertyDescriptor(P,B);J&&Object.defineProperty(Y,B,J.get?J:{enumerable:!0,get:()=>P[B]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}({__proto__:null,default:yt.Fg(gt)},[gt]);exports.p=kt;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.6
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */function v(t){return Array.isArray?Array.isArray(t):Me(t)==="[object Array]"}function L(t){return typeof t=="string"}function Ce(t){return typeof t=="number"}function me(t){return typeof t=="object"}function M(t){return t!=null}function te(t){return!t.trim().length}function Me(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const le=Object.prototype.hasOwnProperty;class Ie{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(i=>{let n=Fe(i);this._keys.push(n),this._keyMap[n.id]=n,s+=n.weight}),this._keys.forEach(i=>{i.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Fe(t){let e=null,s=null,i=null,n=1,r=null;if(L(t)||v(t))i=t,e=de(t),s=ie(t);else{if(!le.call(t,"name"))throw new Error("Missing name property in key");const u=t.name;if(i=u,le.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(`Property 'weight' in key '${u}' must be a positive integer`);e=de(u),s=ie(u),r=t.getFn}return{path:e,id:s,weight:n,src:i,getFn:r}}function de(t){return v(t)?t:t.split(".")}function ie(t){return v(t)?t.join("."):t}var l={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let s=[],i=!1;const n=(r,u,h)=>{if(M(r))if(u[h]){const a=r[u[h]];if(!M(a))return;if(h===u.length-1&&(L(a)||Ce(a)||function(o){return o===!0||o===!1||me(d=o)&&d!==null&&Me(o)=="[object Boolean]";var d}(a)))s.push((c=a)==null?"":function(o){if(typeof o=="string")return o;let d=o+"";return d=="0"&&1/o==-1/0?"-0":d}(c));else if(v(a)){i=!0;for(let o=0,d=a.length;o<d;o+=1)n(a[o],u,h+1)}else u.length&&n(a,u,h+1)}else s.push(r);var c};return n(t,L(e)?e.split("."):e,0),i?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const we=/[^ ]+/g;class ce{constructor({getFn:e=l.getFn,fieldNormWeight:s=l.fieldNormWeight}={}){this.norm=function(i=1,n=3){const r=new Map,u=Math.pow(10,n);return{get(h){const c=h.match(we).length;if(r.has(c))return r.get(c);const a=1/Math.pow(c,.5*i),o=parseFloat(Math.round(a*u)/u);return r.set(c,o),o},clear(){r.clear()}}}(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,i)=>{this._keysMap[s.id]=i})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,L(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();L(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,i=this.size();s<i;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!M(e)||te(e))return;let i={v:e,i:s,n:this.norm.get(e)};this.records.push(i)}_addObject(e,s){let i={i:s,$:{}};this.keys.forEach((n,r)=>{let u=n.getFn?n.getFn(e):this.getFn(e,n.path);if(M(u)){if(v(u)){let h=[];const c=[{nestedArrIndex:-1,value:u}];for(;c.length;){const{nestedArrIndex:a,value:o}=c.pop();if(M(o))if(L(o)&&!te(o)){let d={v:o,i:a,n:this.norm.get(o)};h.push(d)}else v(o)&&o.forEach((d,f)=>{c.push({nestedArrIndex:f,value:d})})}i.$[r]=h}else if(L(u)&&!te(u)){let h={v:u,n:this.norm.get(u)};i.$[r]=h}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Ee(t,e,{getFn:s=l.getFn,fieldNormWeight:i=l.fieldNormWeight}={}){const n=new ce({getFn:s,fieldNormWeight:i});return n.setKeys(t.map(Fe)),n.setSources(e),n.create(),n}function X(t,{errors:e=0,currentLocation:s=0,expectedLocation:i=0,distance:n=l.distance,ignoreLocation:r=l.ignoreLocation}={}){const u=e/t.length;if(r)return u;const h=Math.abs(i-s);return n?u+h/n:h?1:u}const z=32;function $e(t){let e={};for(let s=0,i=t.length;s<i;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<i-s-1}return e}const Y=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class ye{constructor(e,{location:s=l.location,threshold:i=l.threshold,distance:n=l.distance,includeMatches:r=l.includeMatches,findAllMatches:u=l.findAllMatches,minMatchCharLength:h=l.minMatchCharLength,isCaseSensitive:c=l.isCaseSensitive,ignoreDiacritics:a=l.ignoreDiacritics,ignoreLocation:o=l.ignoreLocation}={}){if(this.options={location:s,threshold:i,distance:n,includeMatches:r,findAllMatches:u,minMatchCharLength:h,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:o},e=c?e:e.toLowerCase(),e=a?Y(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(g,p)=>{this.chunks.push({pattern:g,alphabet:$e(g),startIndex:p})},f=this.pattern.length;if(f>z){let g=0;const p=f%z,A=f-p;for(;g<A;)d(this.pattern.substr(g,z),g),g+=z;if(p){const m=f-z;d(this.pattern.substr(m),m)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,ignoreDiacritics:i,includeMatches:n}=this.options;if(e=s?e:e.toLowerCase(),e=i?Y(e):e,this.pattern===e){let A={isMatch:!0,score:0};return n&&(A.indices=[[0,e.length-1]]),A}const{location:r,distance:u,threshold:h,findAllMatches:c,minMatchCharLength:a,ignoreLocation:o}=this.options;let d=[],f=0,g=!1;this.chunks.forEach(({pattern:A,alphabet:m,startIndex:_})=>{const{isMatch:N,score:w,indices:S}=function(k,$,Le,{location:ke=l.location,distance:J=l.distance,threshold:ve=l.threshold,findAllMatches:_e=l.findAllMatches,minMatchCharLength:he=l.minMatchCharLength,includeMatches:ae=l.includeMatches,ignoreLocation:V=l.ignoreLocation}={}){if($.length>z)throw new Error("Pattern length exceeds max of 32.");const R=$.length,P=k.length,D=Math.max(0,Math.min(ke,P));let O=ve,b=D;const Q=he>1||ae,Z=Q?Array(P):[];let T;for(;(T=k.indexOf($,b))>-1;){let F=X($,{currentLocation:T,expectedLocation:D,distance:J,ignoreLocation:V});if(O=Math.min(F,O),b=T+R,Q){let E=0;for(;E<R;)Z[T+E]=1,E+=1}}b=-1;let U=[],G=1,H=R+P;const Se=1<<R-1;for(let F=0;F<R;F+=1){let E=0,B=H;for(;E<B;)X($,{errors:F,currentLocation:D+B,expectedLocation:D,distance:J,ignoreLocation:V})<=O?E=B:H=B,B=Math.floor((H-E)/2+E);H=B;let j=Math.max(1,D-B+1),y=_e?P:Math.min(D+B,P)+R,x=Array(y+2);x[y+1]=(1<<F)-1;for(let C=y;C>=j;C-=1){let W=C-1,q=Le[k.charAt(W)];if(Q&&(Z[W]=+!!q),x[C]=(x[C+1]<<1|1)&q,F&&(x[C]|=(U[C+1]|U[C])<<1|1|U[C+1]),x[C]&Se&&(G=X($,{errors:F,currentLocation:W,expectedLocation:D,distance:J,ignoreLocation:V}),G<=O)){if(O=G,b=W,b<=D)break;j=Math.max(1,2*D-b)}}if(X($,{errors:F+1,currentLocation:D,expectedLocation:D,distance:J,ignoreLocation:V})>O)break;U=x}const ee={isMatch:b>=0,score:Math.max(.001,G)};if(Q){const F=function(E=[],B=l.minMatchCharLength){let j=[],y=-1,x=-1,C=0;for(let W=E.length;C<W;C+=1){let q=E[C];q&&y===-1?y=C:q||y===-1||(x=C-1,x-y+1>=B&&j.push([y,x]),y=-1)}return E[C-1]&&C-y>=B&&j.push([y,C-1]),j}(Z,he);F.length?ae&&(ee.indices=F):ee.isMatch=!1}return ee}(e,A,m,{location:r+_,distance:u,threshold:h,findAllMatches:c,minMatchCharLength:a,includeMatches:n,ignoreLocation:o});N&&(g=!0),f+=w,N&&S&&(d=[...d,...S])});let p={isMatch:g,score:g?f/this.chunks.length:1};return g&&n&&(p.indices=d),p}}class I{constructor(e){this.pattern=e}static isMultiMatch(e){return ge(e,this.multiRegex)}static isSingleMatch(e){return ge(e,this.singleRegex)}search(){}}function ge(t,e){const s=t.match(e);return s?s[1]:null}class De extends I{constructor(e,{location:s=l.location,threshold:i=l.threshold,distance:n=l.distance,includeMatches:r=l.includeMatches,findAllMatches:u=l.findAllMatches,minMatchCharLength:h=l.minMatchCharLength,isCaseSensitive:c=l.isCaseSensitive,ignoreDiacritics:a=l.ignoreDiacritics,ignoreLocation:o=l.ignoreLocation}={}){super(e),this._bitapSearch=new ye(e,{location:s,threshold:i,distance:n,includeMatches:r,findAllMatches:u,minMatchCharLength:h,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Be extends I{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s,i=0;const n=[],r=this.pattern.length;for(;(s=e.indexOf(this.pattern,i))>-1;)i=s+r,n.push([s,i-1]);const u=!!n.length;return{isMatch:u,score:u?0:1,indices:n}}}const ne=[class extends I{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},Be,class extends I{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=t.indexOf(this.pattern)===-1;return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},De],fe=ne.length,be=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ne=new Set([De.type,Be.type]),re=[];function ue(t,e){for(let s=0,i=re.length;s<i;s+=1){let n=re[s];if(n.condition(t,e))return new n(t,e)}return new ye(t,e)}const oe="$and",Ae="$path",se=t=>!(!t[oe]&&!t.$or),pe=t=>({[oe]:Object.keys(t).map(e=>({[e]:t[e]}))});function xe(t,e,{auto:s=!0}={}){const i=n=>{let r=Object.keys(n);const u=!!n[Ae];if(!u&&r.length>1&&!se(n))return i(pe(n));if((c=>!v(c)&&me(c)&&!se(c))(n)){const c=u?n[Ae]:r[0],a=u?n.$val:n[c];if(!L(a))throw new Error(`Invalid value for key ${c}`);const o={keyId:ie(c),pattern:a};return s&&(o.searcher=ue(a,e)),o}let h={children:[],operator:r[0]};return r.forEach(c=>{const a=n[c];v(a)&&a.forEach(o=>{h.children.push(i(o))})}),h};return se(t)||(t=pe(t)),i(t)}function Re(t,e){const s=t.matches;e.matches=[],M(s)&&s.forEach(i=>{if(!M(i.indices)||!i.indices.length)return;const{indices:n,value:r}=i;let u={indices:n,value:r};i.key&&(u.key=i.key.src),i.idx>-1&&(u.refIndex=i.idx),e.matches.push(u)})}function Oe(t,e){e.score=t.score}class K{constructor(e,s={},i){this.options={...l,...s},this.options.useExtendedSearch,this._keyStore=new Ie(this.options.keys),this.setCollection(e,i)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof ce))throw new Error("Incorrect 'index' type");this._myIndex=s||Ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){M(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let i=0,n=this._docs.length;i<n;i+=1){const r=this._docs[i];e(r,i)&&(this.removeAt(i),i-=1,n-=1,s.push(r))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:r,sortFn:u,ignoreFieldNorm:h}=this.options;let c=L(e)?L(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(a,{ignoreFieldNorm:o=l.ignoreFieldNorm}){a.forEach(d=>{let f=1;d.matches.forEach(({key:g,norm:p,score:A})=>{const m=g?g.weight:null;f*=Math.pow(A===0&&m?Number.EPSILON:A,(m||1)*(o?1:p))}),d.score=f})}(c,{ignoreFieldNorm:h}),r&&c.sort(u),Ce(s)&&s>-1&&(c=c.slice(0,s)),function(a,o,{includeMatches:d=l.includeMatches,includeScore:f=l.includeScore}={}){const g=[];return d&&g.push(Re),f&&g.push(Oe),a.map(p=>{const{idx:A}=p,m={item:o[A],refIndex:A};return g.length&&g.forEach(_=>{_(p,m)}),m})}(c,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const s=ue(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:r,i:u,n:h})=>{if(!M(r))return;const{isMatch:c,score:a,indices:o}=s.searchIn(r);c&&n.push({item:r,idx:u,matches:[{score:a,value:r,norm:h,indices:o}]})}),n}_searchLogical(e){const s=xe(e,this.options),i=(h,c,a)=>{if(!h.children){const{keyId:d,searcher:f}=h,g=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:f});return g&&g.length?[{idx:a,item:c,matches:g}]:[]}const o=[];for(let d=0,f=h.children.length;d<f;d+=1){const g=h.children[d],p=i(g,c,a);if(p.length)o.push(...p);else if(h.operator===oe)return[]}return o},n=this._myIndex.records,r={},u=[];return n.forEach(({$:h,i:c})=>{if(M(h)){let a=i(s,h,c);a.length&&(r[c]||(r[c]={idx:c,item:h,matches:[]},u.push(r[c])),a.forEach(({matches:o})=>{r[c].matches.push(...o)}))}}),u}_searchObjectList(e){const s=ue(e,this.options),{keys:i,records:n}=this._myIndex,r=[];return n.forEach(({$:u,i:h})=>{if(!M(u))return;let c=[];i.forEach((a,o)=>{c.push(...this._findMatches({key:a,value:u[o],searcher:s}))}),c.length&&r.push({idx:h,item:u,matches:c})}),r}_findMatches({key:e,value:s,searcher:i}){if(!M(s))return[];let n=[];if(v(s))s.forEach(({v:r,i:u,n:h})=>{if(!M(r))return;const{isMatch:c,score:a,indices:o}=i.searchIn(r);c&&n.push({score:a,key:e,value:r,idx:u,norm:h,indices:o})});else{const{v:r,n:u}=s,{isMatch:h,score:c,indices:a}=i.searchIn(r);h&&n.push({score:c,key:e,value:r,norm:u,indices:a})}return n}}K.version="7.1.0",K.createIndex=Ee,K.parseIndex=function(t,{getFn:e=l.getFn,fieldNormWeight:s=l.fieldNormWeight}={}){const{keys:i,records:n}=t,r=new ce({getFn:e,fieldNormWeight:s});return r.setKeys(i),r.setIndexRecords(n),r},K.config=l,K.parseQuery=xe,function(...t){re.push(...t)}(class{constructor(t,{isCaseSensitive:e=l.isCaseSensitive,ignoreDiacritics:s=l.ignoreDiacritics,includeMatches:i=l.includeMatches,minMatchCharLength:n=l.minMatchCharLength,ignoreLocation:r=l.ignoreLocation,findAllMatches:u=l.findAllMatches,location:h=l.location,threshold:c=l.threshold,distance:a=l.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:s,includeMatches:i,minMatchCharLength:n,findAllMatches:u,ignoreLocation:r,location:h,threshold:c,distance:a},t=e?t:t.toLowerCase(),t=s?Y(t):t,this.pattern=t,this.query=function(o,d={}){return o.split("|").map(f=>{let g=f.trim().split(be).filter(A=>A&&!!A.trim()),p=[];for(let A=0,m=g.length;A<m;A+=1){const _=g[A];let N=!1,w=-1;for(;!N&&++w<fe;){const S=ne[w];let k=S.isMultiMatch(_);k&&(p.push(new S(k,d)),N=!0)}if(!N)for(w=-1;++w<fe;){const S=ne[w];let k=S.isSingleMatch(_);if(k){p.push(new S(k,d));break}}}return p})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i,ignoreDiacritics:n}=this.options;t=i?t:t.toLowerCase(),t=n?Y(t):t;let r=0,u=[],h=0;for(let c=0,a=e.length;c<a;c+=1){const o=e[c];u.length=0,r=0;for(let d=0,f=o.length;d<f;d+=1){const g=o[d],{isMatch:p,indices:A,score:m}=g.search(t);if(!p){h=0,r=0,u.length=0;break}if(r+=1,h+=m,s){const _=g.constructor.type;Ne.has(_)?u=[...u,...A]:u.push(A)}}if(r){let d={isMatch:!0,score:h/r};return s&&(d.indices=u),d}}return{isMatch:!1,score:1}}}),exports.default=K;