@sheetxl/studio-vanilla 0.7.28-beta.1 → 0.7.28-beta.3

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 (306) hide show
  1. package/browser/cjs/{Dbl2A7TmMPREP_KG.cjs → B2cX7nid45K1XRcB.cjs} +1 -1
  2. package/browser/cjs/{T7_onhE6Jrpob9tI2.cjs → BCax8eUosvZxqJum2.cjs} +1 -1
  3. package/browser/cjs/{CK2JeifKkJzOm0o92.cjs → BDSt3etlKFP344pX2.cjs} +1 -1
  4. package/browser/cjs/{DF0hku8nbQSV3M-j2.cjs → BHpypCDUD5cP3vR92.cjs} +1 -1
  5. package/browser/cjs/{D60W9LgbU6Bi_PzU.cjs → BIcGM64pW8jzwXoR.cjs} +1 -1
  6. package/browser/cjs/{DW8_bnb11oQKDj662.cjs → BQEk2bmRsrTs-zJu2.cjs} +3 -3
  7. package/browser/cjs/{Dmi2hSyQu_Js-GEu.cjs → BW4gFAFA5vc1x_8G.cjs} +1 -1
  8. package/browser/cjs/{DfgKbLE2Zvp8mcF7.cjs → BYp7-QW_AGEONvMr.cjs} +1 -1
  9. package/browser/cjs/{ByYBv7ERPfiCLOep.cjs → Bq7bgCz2WfVwfQSv.cjs} +2 -2
  10. package/browser/cjs/{CEKe4OJVmivE8S6J2.cjs → BzvKaJw-3G3FMhao2.cjs} +1 -1
  11. package/browser/cjs/C1tO7v57UD8xmj2X.cjs +86 -0
  12. package/browser/cjs/C9K6gYebhUCoGcyy.cjs +5 -0
  13. package/browser/cjs/{yy-Vk4KWt1Zu2vkd.cjs → CN8lXPB3rJ4Ux6jN.cjs} +1 -1
  14. package/browser/cjs/{9jOdey6595kpc4f_2.cjs → CObKFza7rEOQcteD2.cjs} +1 -1
  15. package/browser/cjs/CcBPECGj-X0W9a3_.cjs +3 -0
  16. package/browser/cjs/{BJcTL0FyQfZaEmdT2.cjs → ChMPHLE_jFKu0JmZ2.cjs} +1 -1
  17. package/browser/cjs/{DqDDTZZVqW3IbjXy.cjs → CtEazH3mA0Tj8qrG.cjs} +1 -1
  18. package/browser/cjs/{DzFomdBHjGaNmf9k.cjs → CxY5iqVeCdKKTzDq.cjs} +1 -1
  19. package/browser/cjs/{BmKOnx8nv-NTlFiI.cjs → D2KFRZ75pzopfyVC.cjs} +1 -1
  20. package/browser/cjs/{nE4y6hua6AwWSil72.cjs → D6cjnwWR_iUSe1f62.cjs} +1 -1
  21. package/browser/cjs/D9OGD2b5RCuNVkVt.cjs +1 -0
  22. package/browser/cjs/DDGqSmEUwpCyj2-T.cjs +12 -0
  23. package/browser/cjs/{CIPn136n4B06G4iH.cjs → DMJpPocVk36TEmfa.cjs} +1 -1
  24. package/browser/cjs/{DPhkr2uj1ztiCS7Y.cjs → DP0yIsjVWme5C-UE.cjs} +1 -1
  25. package/browser/cjs/Dmdcgm3pqGKmXPGb.cjs +33 -0
  26. package/browser/cjs/{DBIR20dXG4vtH3Kj.cjs → Ds8fgjqVz8xPRHog.cjs} +1 -1
  27. package/browser/cjs/{DUtS5ZvrQ_7EIazD2.cjs → DuLz-mXv6patMuVn2.cjs} +1 -1
  28. package/browser/cjs/{7qAC9w7dw4oS0-F3.cjs → Eja0Zsmdah-At3rJ.cjs} +1 -1
  29. package/browser/cjs/{CxWeFfNAUvhHe9F-.cjs → QH2fF4MqkcvdkNjz.cjs} +2 -2
  30. package/browser/cjs/{Bizh6EM71ecxo_oY.cjs → Y0B5_Kqc0UL2taRO.cjs} +2 -2
  31. package/browser/cjs/gOdLq87FmaB-hTTZ.cjs +1 -0
  32. package/browser/cjs/index.cjs +1 -1
  33. package/{cdn/assets/DhYuSZrGEgUmal-k2.js → browser/esm/2dJqxS99uENpvAC92.mjs} +1 -1
  34. package/browser/esm/{qatUNqy1unWjxJRn.mjs → 4-QoxOhoR614u5tO.mjs} +12 -12
  35. package/{cdn/assets/BgAJsJ2qMSFQT33B.js → browser/esm/53p_EWlOxGgrMq-q.mjs} +254 -254
  36. package/{cdn/assets/BGQ__v6SnaHlNG-Q2.js → browser/esm/5XtgjihhVCzNqyYJ2.mjs} +1 -1
  37. package/browser/esm/{oQtJFGKyYOTaSkZn.mjs → B1AbnDun66mq_S2f.mjs} +12 -12
  38. package/browser/esm/{aq4qmGuAhtzPqF-6.mjs → B3CqIagnCvfOrLBT.mjs} +7 -7
  39. package/browser/esm/{Cf3oUL1hNajeyVed2.mjs → B4094aQR3Q4KhALV2.mjs} +8 -8
  40. package/browser/esm/{DSV2cLpO0S6ZhgXx2.mjs → B7kOoeXeYeZqA_mU.mjs} +1 -1
  41. package/{cdn/assets/hBx61KP4CdznZp-N.js → browser/esm/BC9RLqAWMPRx_1rS.mjs} +1 -1
  42. package/browser/esm/{Db1UHrYoIsMVbE28.mjs → BDHrIbkTx7Ii0RYb.mjs} +5 -5
  43. package/browser/esm/{EmSNRoqlc2C8WKZI2.mjs → BEF8kcbXgMjyCP4C2.mjs} +1 -1
  44. package/browser/esm/{CueJgED9ejHaXzfs2.mjs → BEgQWG98wq54oeau2.mjs} +7 -7
  45. package/browser/esm/{-T6bQcEJ9HLY7UHV.mjs → BG-wTTfaCHaJMI5b2.mjs} +1 -1
  46. package/{cdn/assets/CqHkXhh2PbxRyYjJ.js → browser/esm/BG8zQEmkmTTw8LXE2.mjs} +1 -1
  47. package/browser/esm/{BH8YLTY6BUcMBwtX.mjs → BHmeRWtpqOMknkon.mjs} +1 -1
  48. package/browser/esm/{CfQJnZ2htSmYPsF3.mjs → BIboUJ6YhTe0O5Ep.mjs} +1 -1
  49. package/browser/esm/{BQTeVQNim2463X6I.mjs → BKX_mnqOl4t0M7Q-.mjs} +1 -1
  50. package/browser/esm/{DMcrCWg1n2i_h8d-.mjs → BLq8q4tpQq7lW0jg.mjs} +2 -2
  51. package/browser/esm/{BvJNXsx20jqbrG3K2.mjs → BM3Fxh1DBzKRDnJ-2.mjs} +1 -1
  52. package/browser/esm/{DgGD0naBo-36VC2J.mjs → BMlDCj6kw-JTuDJ92.mjs} +1 -1
  53. package/browser/esm/{_XwhJFKYQwxornq8.mjs → BT1lb0BHqaMUHJEH.mjs} +4 -4
  54. package/browser/esm/{BgK2h0kYTNVq8lHv.mjs → BTiq0pI-MmNI9sx6.mjs} +3 -3
  55. package/browser/esm/{BukYUcUVuCJLUCTU.mjs → BV1A7fanbtryQZdr.mjs} +52 -52
  56. package/{cdn/assets/BT809Dj7TlZHoSyZ.js → browser/esm/BXf0y-wp2FQ5btCG2.mjs} +1 -1
  57. package/browser/esm/{B181HHVOosiCdcW9.mjs → BamGz0uoayfOfFJD.mjs} +7 -7
  58. package/{cdn/assets/BFWULyy65RLrorZ7.js → browser/esm/BbRZ0cO4t2haGX-o.mjs} +1 -1
  59. package/browser/esm/{snzQyFpbHKBoouMl2.mjs → BbgnnZj965cf_RAV2.mjs} +9 -9
  60. package/{cdn/assets/CNUTA9WVNU3KeDzf2.js → browser/esm/Be2V19M8IxytN_Aa.mjs} +2 -2
  61. package/browser/esm/{C2HOJ1mltRzbTUl62.mjs → BibrryjUsSysyTSD2.mjs} +11 -11
  62. package/browser/esm/{DhXISrCGYlstWBHR2.mjs → Bk-F9XzxhuyAOQqK.mjs} +1 -1
  63. package/browser/esm/{whPiKYlX_LjBPzcR2.mjs → Bk13V_C0eSaqMClU.mjs} +1 -1
  64. package/browser/esm/{DpBY9n_Yx6svVSLX.mjs → BlC4_SZ2XYvtnkHw.mjs} +6 -6
  65. package/browser/esm/{C7esccqlKiSdYnvL2.mjs → BmZX5BqczMfR2VlT2.mjs} +1 -1
  66. package/browser/esm/{DDQ55nRejL3ziHCe2.mjs → Bpp8p7LJo9K-1Tm-.mjs} +1 -1
  67. package/browser/esm/{DIaucc8UrX6oVZGM.mjs → Bpypf56n7jOOW7Ys.mjs} +9 -9
  68. package/browser/esm/{lgDQkp3FOzQOe0LY.mjs → Bs6uuY3i689nSdNa.mjs} +3922 -3836
  69. package/browser/esm/{dzdZI0rQ6gtonL0G2.mjs → BwekjT1bXcBAV6hi2.mjs} +1 -1
  70. package/browser/esm/{CNqsb1dCdP38edL_.mjs → Bxt5fHMZXudQ1QHA.mjs} +6 -6
  71. package/browser/esm/{DOQiJP4o3Yv2roFN.mjs → Byl6FdOyv58rFwxZ.mjs} +5 -5
  72. package/{cdn/assets/BQMwLQz7v1tKKNjw.js → browser/esm/Bynpw8CnO-1JkFdZ2.mjs} +1 -1
  73. package/{cdn/assets/D2f2lwn364O9E4vh2.js → browser/esm/BzilGTs3oFGxJ5uB.mjs} +2 -2
  74. package/browser/esm/{CdS03qdFlfnGS4GS2.mjs → C39fSQO6blxFky052.mjs} +7 -7
  75. package/browser/esm/{Cvv50xExjeFnfiNy.mjs → CC52ynv81P-LwXRT.mjs} +6 -6
  76. package/browser/esm/{COYX5UfgqbqvXL532.mjs → CCvvNbrMzlFHlAbr2.mjs} +4 -4
  77. package/{cdn/assets/CkASBS4AqNOy0df52.js → browser/esm/CEWWFcwu4AyqL0cQ.mjs} +202 -197
  78. package/browser/esm/{CVuIEusZ_eVLJx48.mjs → CEgIZKMC4XoMmPp5.mjs} +3 -3
  79. package/{cdn/assets/CONqbv4wIi-kv-2L.js → browser/esm/CI8YyVegXUBlHR61.mjs} +1 -1
  80. package/browser/esm/{DehYydhsh3tj9AnM2.mjs → CI92jUOrJIKUlfGx2.mjs} +130 -130
  81. package/browser/esm/{CxM2lbNqq--4xN8h.mjs → CKc-IOHYDEuo2FhB.mjs} +5 -5
  82. package/browser/esm/{Yp8HnZ2LZWDER3Db.mjs → CNZeWICVX0x6E3-Z.mjs} +1 -1
  83. package/browser/esm/{CBNIXGGRiR3NBppk.mjs → CNgKTif3Jo9FLV7d.mjs} +2 -2
  84. package/browser/esm/{1KR1J6vxDpw_yLbU2.mjs → CSlBZF1ezptA1LSS2.mjs} +1 -1
  85. package/browser/esm/{D1a8t7B7xKy_wr9i2.mjs → CUj7kwIeQGAqyb6V.mjs} +1 -1
  86. package/browser/esm/{CVvr_1-LCX19jk4e.mjs → CVDNfe5yVj7xYGeO.mjs} +2 -2
  87. package/browser/esm/{CVoRtI07Syww8cUA.mjs → CWQXDC8Qk5PH757v.mjs} +13 -13
  88. package/browser/esm/{BJ6H2o3H404XGe252.mjs → CX0QhwSYuHoImWlY2.mjs} +1 -1
  89. package/browser/esm/{C6JzMmLaess-T_-r.mjs → CZy1bU6cVChuZKag.mjs} +89 -89
  90. package/{cdn/assets/BUqPCIYNlP_6pm4M.js → browser/esm/C_Kd0CPQvZsJLD6b2.mjs} +1 -1
  91. package/browser/esm/{BVHJ8ud9-agkHUcd2.mjs → CdV0VXnaW6UyTd8E.mjs} +1 -1
  92. package/browser/esm/{sckQOed44XHUgmEM.mjs → CecKVsBMvvKuk2Og.mjs} +2135 -2065
  93. package/browser/esm/{Ct164XKB4haoxV99.mjs → Ci7qcrvyeBaD36sR.mjs} +5 -5
  94. package/browser/esm/{FxykwtLK380Ynhjh.mjs → Cjq-G2Seyww6IMSH.mjs} +1 -1
  95. package/browser/esm/{DKI0PCE8wcuvwtKy2.mjs → Clu5SMZriAkKa_np2.mjs} +13 -13
  96. package/browser/esm/{BT5ZFPRdhl589SPM.mjs → CmcKdn-U2ywgYm_9.mjs} +2 -2
  97. package/browser/esm/{Chxj04DLMGbqyjr22.mjs → CqSxZiLos0nQa69t2.mjs} +5 -5
  98. package/browser/esm/{gByeADNOXJBuXzPx.mjs → CsK0x9jgM8z_DOl1.mjs} +37 -37
  99. package/browser/esm/{BhydwJ4RldNTRaas.mjs → CsqtbHllm56zw5xh2.mjs} +1 -1
  100. package/browser/esm/{k0J0jqbt6JQcSNRf.mjs → CtZ4wSjG6QUWs7Nn.mjs} +6 -6
  101. package/browser/esm/{BlABxqvzU3ccpiI22.mjs → CtaapT_7WuEvy48w2.mjs} +1 -1
  102. package/browser/esm/{Dd6FJoDWApFB2CCi2.mjs → CxJliRXAfjf-8FJL2.mjs} +1 -1
  103. package/browser/esm/{DYhc53MZjX6LHNsG.mjs → D5MuKMXqFbc9B8JP.mjs} +3 -3
  104. package/browser/esm/{3aV4jURdjixaD7Td.mjs → D7-Zv2k1IJkmQoxc.mjs} +1 -1
  105. package/browser/esm/{C6l5aRmgsP8d19lu.mjs → D99KkptfLQp60ECI.mjs} +2 -2
  106. package/{cdn/assets/BCNx4EnDw46A38bE.js → browser/esm/DA0VxVTFcWvrEQEv.mjs} +2 -2
  107. package/browser/esm/{CLFhHEElqfJHtm21.mjs → DD-_f0jEXDy0dn6z.mjs} +6 -6
  108. package/{cdn/assets/Sz8Cy_HaoUpTYt0h.js → browser/esm/DDg-fxiIqpuutuyu2.mjs} +1 -1
  109. package/{cdn/assets/Dy8wseROvsKI36oO.js → browser/esm/DJzMm5FQXuMWHNom2.mjs} +1 -1
  110. package/browser/esm/{Bk6d2dZzmAPEN5-k2.mjs → DKLwRgsx1WelayB6.mjs} +1 -1
  111. package/browser/esm/{DX4LgT_oDH8L8ynK.mjs → DNXCAcVGHeeoKPcx2.mjs} +1 -1
  112. package/browser/esm/{DonDOr6JcdNxotw-.mjs → DSY8maNeFb51KgKe2.mjs} +1 -1
  113. package/browser/esm/{CNqvhcQrG2-81fOD.mjs → DT8AGfoENVVMPsi3.mjs} +1 -1
  114. package/browser/esm/{eJXoOdaV3zHUV2do.mjs → DUpHK7eGlzF6E3h5.mjs} +5 -5
  115. package/browser/esm/{pRwq1uOrNbhmZ0mM2.mjs → DX0xvH5nQ8MjqsA02.mjs} +2 -2
  116. package/browser/esm/{6Q0Zeea07mEpzLeJ2.mjs → DYaHqG1Xx-r7mlLq.mjs} +1 -1
  117. package/browser/esm/{BrtMkOA8Tryg59WN.mjs → DZyZNxEMnIWr2n8S.mjs} +3 -3
  118. package/browser/esm/{BH4J1ujX7bAH0qMe.mjs → DbGc-QtQMWI-VyUe.mjs} +1 -1
  119. package/{cdn/assets/CDEkMCYntkMJxwBi2.js → browser/esm/DbfFQif7awKrcxxB.mjs} +3 -3
  120. package/browser/esm/{DFoGNYjZCQlfoclz.mjs → Dcbf_tge-hZbUfUD.mjs} +4 -4
  121. package/{cdn/assets/D1On-UnlXgc4TMJi2.js → browser/esm/De-RIk_tQ6xW8NH2.mjs} +1 -1
  122. package/browser/esm/{Cdgq7c9nPgcoTg8v.mjs → DgGF1ZaI3ti0c_Nz.mjs} +1 -1
  123. package/browser/esm/{CSfpN1f335foeZWr.mjs → DhnxpW56CJ43gVOI.mjs} +1 -1
  124. package/browser/esm/{B86Q74Vxyg1crDy4.mjs → DjwllBVpUWlaltMT.mjs} +6 -6
  125. package/browser/esm/{BEvXGI5EzVSXLxga.mjs → DqfIf41HljTIhC84.mjs} +5 -5
  126. package/browser/esm/{CHbhZ3r3ql2BYXDc2.mjs → Dt8IOrB4ifUVtTff2.mjs} +1 -1
  127. package/browser/esm/{COyyediFP8-Jte0d.mjs → DwEiTFl_RN5oQzfh.mjs} +7 -7
  128. package/browser/esm/{DkLusJh15CZ_-XSG2.mjs → HQv1oLV3ax-NKXZG.mjs} +1 -1
  129. package/browser/esm/{BYzW6nCCA9mf7lE02.mjs → IMAnmKax7yp8adEP2.mjs} +15 -15
  130. package/{cdn/assets/1Inmee-wv-0FPFfs2.js → browser/esm/Jw068AbKaxWlv8HJ2.mjs} +1 -1
  131. package/browser/esm/{CssrS9cKuhz46r6y.mjs → MJIl3u3WexRfuRxx.mjs} +4 -4
  132. package/browser/esm/{DKSKOqX0lMeM6AqD.mjs → MZKwwgG9APikaCAg.mjs} +246 -240
  133. package/browser/esm/{aMyBfKW2geFo8ZLl.mjs → Nj1DgowT0KN0un7b2.mjs} +1 -1
  134. package/{cdn/assets/CQ-1iT2BBp1-8btC.js → browser/esm/R3YBWWwMJAzbuwie2.mjs} +1 -1
  135. package/browser/esm/{C4LCzL4eMbnmxScR.mjs → RFuzM5jhOgjn2C_7.mjs} +2 -2
  136. package/{cdn/assets/KwAARJU7IGYWDuYf.js → browser/esm/SNsjWQUbxOQzdnCT.mjs} +1 -1
  137. package/browser/esm/{DjR_YrztipUHz-Pb.mjs → Sm94kpOe8UUYLpaZ.mjs} +3 -3
  138. package/browser/esm/{C5r3DKfkpQkm-_LU2.mjs → UOfj2s5X9yjL1iLF2.mjs} +8 -8
  139. package/browser/esm/{Co-Q8GHNdftJgZAY2.mjs → YGKMD1YfDLoo18Sy.mjs} +1 -1
  140. package/browser/esm/{DUqRWxlJFr43EfUh2.mjs → iKMg-svZQSvoVzqO2.mjs} +1 -1
  141. package/browser/esm/index.mjs +4 -4
  142. package/browser/esm/{V7W9wEgRnVm5FcO92.mjs → jvvKubD9MdvZCawH2.mjs} +11 -11
  143. package/browser/esm/{BhnhFOdBLUIQ-spn.mjs → l9SSIWXeR5tPN95-.mjs} +3 -3
  144. package/browser/esm/{Ba0-kvrjrj0hGe1K2.mjs → nBRFIzaPeMPPvIMQ2.mjs} +6 -6
  145. package/browser/esm/{A1VpPEggRj4IfGDD.mjs → rnntZ_PYlojxr5c4.mjs} +523 -524
  146. package/browser/esm/{7-3GSszGuM6fKYQX2.mjs → sIWoD1UYd1XgTrIs2.mjs} +1 -1
  147. package/browser/esm/{BPefT37WNgwR2ugY.mjs → swjGzqq7IK8YnHrV.mjs} +2 -2
  148. package/{cdn/assets/CvRpuDeuhP-pmiUv2.js → browser/esm/uk2_KQhVX77MWa7A2.mjs} +1 -1
  149. package/browser/esm/{KFUePxyJYgymI0S1.mjs → y07oKUx2vGjEEZ0w.mjs} +1 -1
  150. package/browser/esm/{ESGNq4ULp2pm2AAl2.mjs → yFD3mg0KbvkE3s1Y2.mjs} +7 -7
  151. package/browser/esm/{CBNL1frWoMOsUu_T2.mjs → yqwkS9EO5146-Xhf2.mjs} +9 -9
  152. package/cdn/assets/{BlZs6OBbHaWLHdyw2.js → -OScuzLTidF7HNaK2.js} +14 -14
  153. package/cdn/assets/{BqujNTf--SuDncdC.js → -wn5AXVsNdciGzNx.js} +1758 -1758
  154. package/{browser/esm/DhYuSZrGEgUmal-k.mjs → cdn/assets/2dJqxS99uENpvAC9.js} +1 -1
  155. package/cdn/assets/{Bh64Y2xehO25OC_t.js → 3QC61uhcIBmRDR9w.js} +2565 -2495
  156. package/cdn/assets/{o5R9zv1BlAEkrwCo2.js → 4Z5QgDDHi93cqy332.js} +28 -28
  157. package/{browser/esm/BGQ__v6SnaHlNG-Q.mjs → cdn/assets/5XtgjihhVCzNqyYJ.js} +1 -1
  158. package/cdn/assets/{DI64FmdWeq_LEKJc2.js → B1WYofA6cHbr8sxv2.js} +49 -49
  159. package/cdn/assets/{CvzRrID9YjfTwDuS2.js → B4aainAlYLn-Q5H62.js} +3 -3
  160. package/cdn/assets/{2EKKj_VAMBjNhQyV.js → B5G5aOCiy3kn0ADy.js} +2 -2
  161. package/cdn/assets/{DSV2cLpO0S6ZhgXx.js → B7kOoeXeYeZqA_mU2.js} +1 -1
  162. package/cdn/assets/{C_4w0ioMakQrO0i0.js → B8kiZt5i9HOHYeAo.js} +3 -3
  163. package/{browser/esm/hBx61KP4CdznZp-N2.mjs → cdn/assets/BC9RLqAWMPRx_1rS.js} +1 -1
  164. package/cdn/assets/{DM7EYwNo9Xadex4L.js → BDZq-VDymQAePI7X.js} +2 -2
  165. package/cdn/assets/{EmSNRoqlc2C8WKZI.js → BEF8kcbXgMjyCP4C.js} +1 -1
  166. package/cdn/assets/{-T6bQcEJ9HLY7UHV.js → BG-wTTfaCHaJMI5b.js} +1 -1
  167. package/{browser/esm/CqHkXhh2PbxRyYjJ2.mjs → cdn/assets/BG8zQEmkmTTw8LXE.js} +1 -1
  168. package/cdn/assets/{DvjL9HtpbeTQiPsP.js → BGlQEwuUWK6Oz7bC.js} +105 -105
  169. package/cdn/assets/{BH4J1ujX7bAH0qMe2.js → BHmeRWtpqOMknkon.js} +1 -1
  170. package/cdn/assets/BHmeRWtpqOMknkon2.js +24 -0
  171. package/cdn/assets/{0p987xGFUx0c99X0.js → BITxO-ILVNOqgbA7.js} +4 -4
  172. package/cdn/assets/{BQTeVQNim2463X6I2.js → BKX_mnqOl4t0M7Q-2.js} +1 -1
  173. package/cdn/assets/{BvJNXsx20jqbrG3K.js → BM3Fxh1DBzKRDnJ-.js} +1 -1
  174. package/cdn/assets/{DgGD0naBo-36VC2J2.js → BMlDCj6kw-JTuDJ9.js} +1 -1
  175. package/cdn/assets/{CKYDcG1HSXTvQl6K2.js → BNU2ZqxIegIJr-572.js} +7 -7
  176. package/cdn/assets/{CwfmCx2Ke4_FHoNA2.js → BSUsQ6-YD40bvOdG2.js} +7 -7
  177. package/cdn/assets/{CDZEsA19vbvMOvWY.js → BV3cgeOVx6QLl85F.js} +6 -6
  178. package/cdn/assets/{B0LfV8NixGPYcBo92.js → BWcc3hnnAhelxjOr2.js} +10 -10
  179. package/{browser/esm/BT809Dj7TlZHoSyZ2.mjs → cdn/assets/BXf0y-wp2FQ5btCG.js} +1 -1
  180. package/cdn/assets/{BrX2wKaY8H8My2Oe2.js → BZbIcyw3tiUx7ztK2.js} +754 -754
  181. package/{browser/esm/BFWULyy65RLrorZ7.mjs → cdn/assets/BbRZ0cO4t2haGX-o.js} +1 -1
  182. package/cdn/assets/{BiDbxIo_Dg-LwZSG.js → BdI4wcd4XWPgeQnl.js} +3 -3
  183. package/cdn/assets/{DydlbsZLg69j6R5g2.js → BhNQRWnlFUA4eX9Z2.js} +4 -4
  184. package/cdn/assets/{DhXISrCGYlstWBHR.js → Bk-F9XzxhuyAOQqK2.js} +1 -1
  185. package/cdn/assets/{whPiKYlX_LjBPzcR.js → Bk13V_C0eSaqMClU.js} +1 -1
  186. package/cdn/assets/{D_rEOwaZCyZlVVgW.js → Bk8tTxRXYv1v5QpX.js} +2 -2
  187. package/cdn/assets/{C7esccqlKiSdYnvL.js → BmZX5BqczMfR2VlT.js} +1 -1
  188. package/cdn/assets/{DDQ55nRejL3ziHCe.js → Bpp8p7LJo9K-1Tm-2.js} +1 -1
  189. package/{browser/esm/DAaOeIPOo0FIBMxD.mjs → cdn/assets/BqA9-X1PlqRSSWll.js} +2 -2
  190. package/cdn/assets/{n4um87qBckL9pgR9.js → Bt-Xdgz1GdP9i0KH.js} +5 -5
  191. package/cdn/assets/{BvkiXQcXBMKUOItw.js → Bv8Sjub_HtVCmnyZ.js} +6 -6
  192. package/cdn/assets/{dzdZI0rQ6gtonL0G.js → BwekjT1bXcBAV6hi.js} +1 -1
  193. package/{browser/esm/BQMwLQz7v1tKKNjw2.mjs → cdn/assets/Bynpw8CnO-1JkFdZ.js} +1 -1
  194. package/cdn/assets/{CbLEZjCqlIOy_N9_2.js → BzNZfg3RJdx9PRAg2.js} +9 -9
  195. package/cdn/assets/{BD5W4MjL2vYljVhR.js → C0ioCmY0K9GI3SiM.js} +7 -7
  196. package/cdn/assets/{Dz_GMq1kFESpvRRw2.js → C8lUc_Lc03y-Whne2.js} +12 -12
  197. package/cdn/assets/{BcE0tCVATqH2DBXy.js → CAgzNDmM7lJZAN5m.js} +2 -2
  198. package/{browser/esm/CONqbv4wIi-kv-2L.mjs → cdn/assets/CI8YyVegXUBlHR61.js} +1 -1
  199. package/cdn/assets/{68Hv9gRdAVje7VBa2.js → CJMMds78eEvd6ivG2.js} +3 -3
  200. package/cdn/assets/{CLNQrXyj4goOCX7I2.js → CK4ZQnpkZHN03RHP2.js} +9 -9
  201. package/cdn/assets/{Yp8HnZ2LZWDER3Db.js → CNZeWICVX0x6E3-Z.js} +1 -1
  202. package/cdn/assets/{BtlAVeuTyW0FoJO42.js → COaJqYKx8CJ595fz2.js} +4 -4
  203. package/cdn/assets/{1KR1J6vxDpw_yLbU.js → CSlBZF1ezptA1LSS.js} +1 -1
  204. package/cdn/assets/{D1a8t7B7xKy_wr9i.js → CUj7kwIeQGAqyb6V.js} +1 -1
  205. package/cdn/assets/{BJ6H2o3H404XGe25.js → CX0QhwSYuHoImWlY.js} +1 -1
  206. package/{browser/esm/BUqPCIYNlP_6pm4M.mjs → cdn/assets/C_Kd0CPQvZsJLD6b.js} +1 -1
  207. package/cdn/assets/{BWZ0ZtidQ4G3pcKO.js → CaLQ8stna0cEenbY.js} +8 -8
  208. package/cdn/assets/{BGYLyOTa6Y58vnCV.js → Cb1n0HtvwfvZOwZz.js} +8 -8
  209. package/cdn/assets/{D8NtGU-FHZgnbC0i.js → CcJHQ6UROltFQL2I.js} +2 -2
  210. package/cdn/assets/{BVHJ8ud9-agkHUcd.js → CdV0VXnaW6UyTd8E.js} +1 -1
  211. package/cdn/assets/{BdfjaNIltJNsXLvf2.js → CeD6pRhoV1LfiJjD.js} +12 -12
  212. package/cdn/assets/{BRus7kfM7SjEN70e2.js → ChBa56MbB_cDd9LM2.js} +8 -8
  213. package/cdn/assets/{DSwGGo-dqmuSJU4c2.js → CjO9u_nQjtCD7xTH2.js} +72 -72
  214. package/cdn/assets/{FxykwtLK380Ynhjh2.js → Cjq-G2Seyww6IMSH2.js} +1 -1
  215. package/cdn/assets/{MkMSXY8qQyay8SYA.js → ClHDdBXrC_nobC_N.js} +9 -9
  216. package/{browser/esm/DHfiSgLq1g6VAhWI.mjs → cdn/assets/ClWQjK8wtCNyfHiY.js} +2 -2
  217. package/cdn/assets/{BsxzxAPB4jEzEk-H2.js → ClkL86jz-4Gf_Uwg2.js} +10 -10
  218. package/cdn/assets/{FR8EiuZjHCo_J-S2.js → CsfLKTLGWgDLWY2z.js} +6 -6
  219. package/cdn/assets/{BhydwJ4RldNTRaas.js → CsqtbHllm56zw5xh.js} +1 -1
  220. package/cdn/assets/{BlABxqvzU3ccpiI22.js → CtaapT_7WuEvy48w2.js} +1 -1
  221. package/cdn/assets/{C8V4AJb4DdsmksEn2.js → Cwee8HXWwJj0ASk32.js} +3922 -3836
  222. package/cdn/assets/{Dd6FJoDWApFB2CCi.js → CxJliRXAfjf-8FJL.js} +1 -1
  223. package/cdn/assets/{DM43PoUsN4Z2MKGv.js → D-bML_q46je0p2os.js} +8 -8
  224. package/cdn/assets/{3aV4jURdjixaD7Td.js → D7-Zv2k1IJkmQoxc.js} +1 -1
  225. package/{browser/esm/LPgfxd0W2GLAgBzu.mjs → cdn/assets/DAN4gSLpoicGd0oX2.js} +3 -3
  226. package/cdn/assets/{By3qfCkjrY1zpWuS.js → DBDr4dkaPZ8Gd8CD.js} +246 -240
  227. package/{browser/esm/Sz8Cy_HaoUpTYt0h2.mjs → cdn/assets/DDg-fxiIqpuutuyu.js} +1 -1
  228. package/cdn/assets/{DMjYAxfgXGEkymiO.js → DHd5k_mCX2iTwwRi.js} +2 -2
  229. package/{browser/esm/Dy8wseROvsKI36oO2.mjs → cdn/assets/DJzMm5FQXuMWHNom2.js} +1 -1
  230. package/cdn/assets/{Bk6d2dZzmAPEN5-k.js → DKLwRgsx1WelayB62.js} +1 -1
  231. package/cdn/assets/{Bvm882bTb1-lNGnV.js → DL_Jd5k5JINA7woQ.js} +6 -6
  232. package/cdn/assets/{DX4LgT_oDH8L8ynK.js → DNXCAcVGHeeoKPcx.js} +1 -1
  233. package/cdn/assets/{D76lWYCrAdSMKvm_2.js → DQrSW7F6xwljb9vw2.js} +5 -5
  234. package/cdn/assets/{ChszL_ibfMtBV0z3.js → DR4uNNkaArYCuvNg.js} +2 -2
  235. package/cdn/assets/{DonDOr6JcdNxotw-2.js → DSY8maNeFb51KgKe.js} +1 -1
  236. package/cdn/assets/{CNqvhcQrG2-81fOD.js → DT8AGfoENVVMPsi3.js} +1 -1
  237. package/cdn/assets/{pRwq1uOrNbhmZ0mM.js → DX0xvH5nQ8MjqsA0.js} +2 -2
  238. package/cdn/assets/{6Q0Zeea07mEpzLeJ.js → DYaHqG1Xx-r7mlLq2.js} +1 -1
  239. package/cdn/assets/DbGc-QtQMWI-VyUe2.js +24 -0
  240. package/{browser/esm/D1On-UnlXgc4TMJi.mjs → cdn/assets/De-RIk_tQ6xW8NH22.js} +1 -1
  241. package/cdn/assets/{HdeBTuGyZOTOnlxd.js → DfMvz_tU8vJuV2Wl.js} +3 -3
  242. package/cdn/assets/{Cdgq7c9nPgcoTg8v.js → DgGF1ZaI3ti0c_Nz.js} +1 -1
  243. package/cdn/assets/{BJ95rY1UBb83xuD52.js → Dhmpgvzx9S-LYXr82.js} +9 -9
  244. package/cdn/assets/{CSfpN1f335foeZWr2.js → DhnxpW56CJ43gVOI2.js} +1 -1
  245. package/cdn/assets/{B_bAdpPn5j1VFdEp.js → Dm0riUQ_5Wg9oFgO.js} +7 -7
  246. package/{browser/esm/DXWY-hAdW5OyWrwd.mjs → cdn/assets/DmfSfK3IDzXPHkJL2.js} +202 -197
  247. package/cdn/assets/{CHbhZ3r3ql2BYXDc.js → Dt8IOrB4ifUVtTff.js} +1 -1
  248. package/cdn/assets/{B2bOeapx8xiCLxqL.js → DupOTk4J52hzKr6p.js} +7 -7
  249. package/cdn/assets/{B17NIGOPfL-7fbgM.js → DyPUmQ-x13kFTQyg.js} +3 -3
  250. package/{browser/esm/Bm8bttobs_RXO3av.mjs → cdn/assets/F-Y7Aw8fXxuX1LhE2.js} +254 -254
  251. package/cdn/assets/{DkLusJh15CZ_-XSG.js → HQv1oLV3ax-NKXZG2.js} +1 -1
  252. package/cdn/assets/{DixF46mCuD3POuzl2.js → HT9FFYzSOuRaDcHS2.js} +6 -6
  253. package/{browser/esm/1Inmee-wv-0FPFfs.mjs → cdn/assets/Jw068AbKaxWlv8HJ.js} +1 -1
  254. package/cdn/assets/{aMyBfKW2geFo8ZLl2.js → Nj1DgowT0KN0un7b.js} +1 -1
  255. package/{browser/esm/CQ-1iT2BBp1-8btC2.mjs → cdn/assets/R3YBWWwMJAzbuwie.js} +1 -1
  256. package/{browser/esm/KwAARJU7IGYWDuYf.mjs → cdn/assets/SNsjWQUbxOQzdnCT.js} +1 -1
  257. package/cdn/assets/{385X3fXUstHKtEEF2.js → TO6gumfUOp2BgIlL.js} +7 -7
  258. package/cdn/assets/{DFDuIPMXHvVuEUbr.js → UtYZqTCpvZMQKdR8.js} +2 -2
  259. package/cdn/assets/{Co-Q8GHNdftJgZAY.js → YGKMD1YfDLoo18Sy2.js} +1 -1
  260. package/cdn/assets/{Ay1mO-24lauwvlWS2.js → ZQsrI5kqNG_ZOdZD2.js} +38 -38
  261. package/cdn/assets/{Be9keF2r4uCzJZJx2.js → _5fYV4ZbX0S6MIpD2.js} +8 -8
  262. package/cdn/assets/{CW8lbman_jNmJl5d2.js → dywzP082Q24_9Q5U2.js} +8 -8
  263. package/cdn/assets/{DBYkGTlfV1b47Hy6.js → i6PnYkX2rfHQQEvF.js} +3 -3
  264. package/cdn/assets/{DUqRWxlJFr43EfUh.js → iKMg-svZQSvoVzqO.js} +1 -1
  265. package/cdn/assets/{Bh6yJtlVASN4H0732.js → rFTMJ-_CKVUSpQ9x2.js} +13 -13
  266. package/cdn/assets/{D1zjNJZna0d4gavs2.js → rT3DomLULA1xJhfY2.js} +16 -16
  267. package/cdn/assets/{Dd_TEe3cUSRc5o_s.js → s2fSOFCKUPsjfoxR.js} +7 -7
  268. package/cdn/assets/{7-3GSszGuM6fKYQX.js → sIWoD1UYd1XgTrIs.js} +1 -1
  269. package/{browser/esm/CvRpuDeuhP-pmiUv.mjs → cdn/assets/uk2_KQhVX77MWa7A.js} +1 -1
  270. package/{browser/esm/B3_8_CGA-MEUvzHP.mjs → cdn/assets/v2SkWlVj3d1y2tfT2.js} +2 -2
  271. package/cdn/assets/{DnPzMeDwU1jIwV-F2.js → wBchGa30DBwJnPZQ2.js} +3 -3
  272. package/cdn/assets/{KFUePxyJYgymI0S12.js → y07oKUx2vGjEEZ0w2.js} +1 -1
  273. package/cdn/assets/{BK7l8_lemkR1wuwy.js → ykS_w8WDHugwGY9S2.js} +8 -8
  274. package/cdn/index.js +2 -2
  275. package/package.json +3 -3
  276. package/browser/cjs/BSh3rXFX2OUJtD5l.cjs +0 -5
  277. package/browser/cjs/BW48QUIyFJAiIyBv.cjs +0 -1
  278. package/browser/cjs/Brqufbzvg4y0YTM0.cjs +0 -3
  279. package/browser/cjs/BvRcbY1-Wkb5Sx-4.cjs +0 -86
  280. package/browser/cjs/C6_0FaW_bjOw24La.cjs +0 -33
  281. package/browser/cjs/CraVh3dIK_NDeAvS.cjs +0 -12
  282. package/browser/cjs/DfkGb1hUnmE0XFjK.cjs +0 -1
  283. package/cdn/assets/BH8YLTY6BUcMBwtX.js +0 -24
  284. package/cdn/assets/BH8YLTY6BUcMBwtX2.js +0 -24
  285. /package/browser/cjs/{1XrWGMP3GmsQOMIX.cjs → 1XrWGMP3GmsQOMIX2.cjs} +0 -0
  286. /package/browser/cjs/{49_x589Na12sizKK2.cjs → 49_x589Na12sizKK.cjs} +0 -0
  287. /package/browser/cjs/{507hQYooKKjnRzsZ.cjs → 507hQYooKKjnRzsZ2.cjs} +0 -0
  288. /package/browser/cjs/{BK0SCfN_VZYqBxoQ.cjs → BK0SCfN_VZYqBxoQ2.cjs} +0 -0
  289. /package/browser/cjs/{Btc0Nzu40VYOpzLX2.cjs → Btc0Nzu40VYOpzLX.cjs} +0 -0
  290. /package/browser/cjs/{C2uDl8VIJqh58YF_2.cjs → C2uDl8VIJqh58YF_.cjs} +0 -0
  291. /package/browser/cjs/{C9C-pr-T_ThweQX92.cjs → C9C-pr-T_ThweQX9.cjs} +0 -0
  292. /package/browser/cjs/{CRx1WvmgBjT8WVyB2.cjs → CRx1WvmgBjT8WVyB.cjs} +0 -0
  293. /package/browser/cjs/{CW-b31_-r-_raT8Y2.cjs → CW-b31_-r-_raT8Y.cjs} +0 -0
  294. /package/browser/cjs/{CXlzsh_WHCOsErJ1.cjs → CXlzsh_WHCOsErJ12.cjs} +0 -0
  295. /package/browser/cjs/{CnZfa45XxA-9Jhmp.cjs → CnZfa45XxA-9Jhmp2.cjs} +0 -0
  296. /package/browser/cjs/{CpJJh4UnFl1_qFui.cjs → CpJJh4UnFl1_qFui2.cjs} +0 -0
  297. /package/browser/cjs/{CrZlUtdX1h2RUnCP.cjs → CrZlUtdX1h2RUnCP2.cjs} +0 -0
  298. /package/browser/cjs/{DCIlWcGDrp-5PDoA2.cjs → DCIlWcGDrp-5PDoA.cjs} +0 -0
  299. /package/browser/cjs/{DDnGLOLTqLFsdUDS2.cjs → DDnGLOLTqLFsdUDS.cjs} +0 -0
  300. /package/browser/cjs/{DG2kqsWRUtVugjay2.cjs → DG2kqsWRUtVugjay.cjs} +0 -0
  301. /package/browser/cjs/{DNKyaSruDogoBd2H.cjs → DNKyaSruDogoBd2H2.cjs} +0 -0
  302. /package/browser/cjs/{Du4jBiFxRIF1OjD42.cjs → Du4jBiFxRIF1OjD4.cjs} +0 -0
  303. /package/browser/cjs/{EeOVMRq7TuptFKTc.cjs → EeOVMRq7TuptFKTc2.cjs} +0 -0
  304. /package/browser/cjs/{bM25C5avKgBAJVfk.cjs → bM25C5avKgBAJVfk2.cjs} +0 -0
  305. /package/browser/cjs/{fqTQ_p3ehzUvc1tF.cjs → fqTQ_p3ehzUvc1tF2.cjs} +0 -0
  306. /package/browser/cjs/{h3dw1jAp2J5Pu4p32.cjs → h3dw1jAp2J5Pu4p3.cjs} +0 -0
@@ -1 +1 @@
1
- const e=require("./BnccBYHCCq9TGFx4.cjs"),t=require("./DDPxHIqx8aIbqTRE.cjs"),n=require("./C6_0FaW_bjOw24La.cjs"),r=require("./Brqufbzvg4y0YTM0.cjs"),i=require("./CHMgm0vAbEBS1mVW.cjs"),a=require("./DPhkr2uj1ztiCS7Y.cjs"),o=require("./ByYBv7ERPfiCLOep.cjs");var s=new Uint8Array,c=class e{constructor(e,t,n){this.buffers=new Map,this.zip=e,this.entries=t,this.rawBuffer=n}static normalize(e){return e.startsWith(`/`)?e.slice(1):e}static async create(t){let n=t instanceof Blob?s:t instanceof Uint8Array?t:new Uint8Array(t),r=new o.L(t instanceof Blob?new o.u(t):new o.c(n)),i=new Map;for(let e of await r.getEntries())e.directory||i.set(e.filename,e);return new e(r,i,n)}getNames(){return[...this.entries.keys()]}has(t){return this.entries.has(e.normalize(t))}uncompressedSize(t){return this.entries.get(e.normalize(t))?.uncompressedSize??0}async getBuffer(t){let n=e.normalize(t),r=this.buffers.get(n);if(r)return r;let i=this.entries.get(n);if(!i)return null;let a=await i.getData(new o.m);return this.buffers.set(n,a),a}async prefetch(e){let t=[];for(let[n,r]of this.entries)!this.buffers.has(n)&&e(n,r)&&t.push(r.getData(new o.m).then(e=>{this.buffers.set(n,e)}));await Promise.all(t)}getEntry(t){return this.buffers.get(e.normalize(t))??null}async getTextStream(t,n){let r=this.entries.get(e.normalize(t));if(!r)return null;let i=new TransformStream;r.getData(i.writable).catch(()=>{});let a=i.readable.getReader(),o=new TextDecoder(`utf-8`);return new ReadableStream({async pull(e){let{value:t,done:r}=await a.read();if(r){let t=o.decode();t&&e.enqueue(t),e.close();return}n?.(t.byteLength);let i=o.decode(t,{stream:!0});i&&e.enqueue(i)}}).getReader()}getRawEntry(t){let n=this.entries.get(e.normalize(t));if(!n||n.encrypted)return null;let r=n.offset;if(r+30>this.rawBuffer.byteLength)return null;let i=new DataView(this.rawBuffer.buffer,this.rawBuffer.byteOffset+r,30);if(i.getUint32(0,!0)!==67324752)return null;let a=r+30+i.getUint16(26,!0)+i.getUint16(28,!0),o=a+n.compressedSize;return o>this.rawBuffer.byteLength?null:{data:this.rawBuffer.subarray(a,o),compressionMethod:n.compressionMethod,signature:n.signature}}async close(){await this.zip.close()}},l=class{constructor(e){this._sink=e,this._samples=[],this._t0=u(),this._tPrev=this._t0,this._heapPrev=d()}mark(e){let t=u(),n=d(),r={label:e,tMs:t-this._t0,dtMs:t-this._tPrev,heapBytes:n,dHeapBytes:n!==void 0&&this._heapPrev!==void 0?n-this._heapPrev:void 0,rssBytes:f()};this._tPrev=t,this._heapPrev=n,this._samples.push(r),this._sink?.(r)}samples(){return this._samples}toTable(){return this._samples.map(e=>({phase:e.label,tMs:Math.round(e.tMs),dtMs:Math.round(e.dtMs),heapMB:e.heapBytes===void 0?`—`:p(e.heapBytes/1048576),dHeapMB:e.dHeapBytes===void 0?`—`:p(e.dHeapBytes/1048576),rssMB:e.rssBytes===void 0?`—`:p(e.rssBytes/1048576)}))}},u=typeof performance==`object`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now();function d(){let e=typeof performance==`object`?performance.memory:void 0;if(e&&typeof e.usedJSHeapSize==`number`)return e.usedJSHeapSize;let t=globalThis.process;return typeof t==`object`&&typeof t.memoryUsage==`function`?t.memoryUsage().heapUsed:void 0}function f(){let e=globalThis.process;if(typeof e==`object`&&typeof e.memoryUsage==`function`)return e.memoryUsage().rss}function p(e){return Math.round(10*e)/10}var m=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,h=`-${m}.0-9·̀-ͯ‿-⁀`,g=(RegExp(`^[${m}]$`,`u`),RegExp(`^[${h}]$`,`u`),RegExp(`^[${m}][${h}]*$`,`u`)),_=(RegExp(`^[${h}]+$`,`u`),[32,10,13,9]);function v(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var y=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,b=`-${y}.0-9·̀-ͯ‿-⁀`;RegExp(`^[${y}]$`,`u`),RegExp(`^[${b}]$`,`u`),RegExp(`^[${y}][${b}]*$`,`u`),RegExp(`^[${b}]+$`,`u`);var x=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,ee=`-${x}.0-9·̀-ͯ‿-⁀`,S=(RegExp(`^[${x}]$`,`u`),RegExp(`^[${ee}]$`,`u`),RegExp(`^[${x}][${ee}]*$`,`u`));function te(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var C,w,T=function(e){return e===32||e===10||e===13||e===9},E=function(e){return e>=32&&e<=55295||e===10||e===13||e===9||e>=57344&&e<=65533||e>=65536&&e<=1114111},D=v,O=function(e){return v(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256},k=_,A=g,j=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},M=te,N=function(e){return te(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256},P=S,F=`http://www.w3.org/XML/1998/namespace`,I=`http://www.w3.org/2000/xmlns/`,ne={__proto__:null,xml:F,xmlns:I},L={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},R=-1,z=-2,B=13,V=33,H=10,U=60,W=61,G=62,K=63,re=93,ie=e=>e===34||e===39,ae=[34,39],oe=[...ae,91,G],se=[...ae,U,re],q=[W,K,...k],J=[...k,G,38,U];function ce(e,t,n){switch(t){case`xml`:n!==F&&e.fail(`xml prefix must be bound to ${F}.`);break;case`xmlns`:n!==I&&e.fail(`xmlns prefix must be bound to ${I}.`)}switch(n){case I:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI ${I}.`);break;case F:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}var le=e=>P.test(e),ue=e=>A.test(e),de={xmldecl:`xmlDeclHandler`,text:`textHandler`,processinginstruction:`piHandler`,doctype:`doctypeHandler`,comment:`commentHandler`,opentagstart:`openTagStartHandler`,attribute:`attributeHandler`,opentag:`openTagHandler`,closetag:`closeTagHandler`,cdata:`cdataHandler`,error:`errorHandler`,end:`endHandler`,ready:`readyHandler`},Y=class{get closed(){return this._closed}constructor(e){this.i=0,this.prevI=0,this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=M,this.nameCheck=N,this.isName=le,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...ne};let e=this.opt.additionalNamespaces;e!=null&&(function(e,t){for(let n of Object.keys(t))ce(e,n,t[n])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=D,this.nameCheck=O,this.isName=ue,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){this.openWakaBang=``,this.text=``,this.name=``,this.piTarget=``,this.entity=``,this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk=``,this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];let{fragmentOpt:e}=this;this.state=e?B:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:t}=this.opt;if(t===void 0){if(!0===this.opt.forceXMLVersion)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);t=`1.0`}this.setXMLVersion(t),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(L),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[de[e]]=t}off(e){this[de[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===13||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let e=this.chunk,t=this.i;if(this.prevI=t,this.i++,t>=e.length)return R;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=32||n===9)return n;switch(n){case H:return this.line++,this.column=0,this.positionAtNewLine=this.position,H;case 13:return e.charCodeAt(t+1)===H&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,z;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return R;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==8232||n===9)return n;switch(n){case H:return this.line++,this.column=0,this.positionAtNewLine=this.position,H;case 13:{let n=e.charCodeAt(t+1);n!==H&&n!==133||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,z;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===z?H:e}unGet(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===z,a=i?H:r;if(a===R||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case z:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=H;break;case R:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===R)return this.name+=e.slice(t),R;if(!O(n))return this.name+=e.slice(t,this.prevI),n===z?H:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===R||!T(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=E,this.getCode=this.getCode10):(this.isChar=j,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case U:if(this.state=15,this.text.length!==0)throw Error(`no-empty text at start`);break;case R:break;default:this.unGet(),this.state=B,this.xmlDeclPossible=!1}}sDoctype(){let e=this.captureTo(oe);switch(e){case G:this.doctypeHandler?.(this.text),this.text=``,this.state=B,this.doctype=!0;break;case R:break;default:this.text+=String.fromCodePoint(e),e===91?this.state=4:ie(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){let e=this.captureTo(se);e!==R&&(this.text+=String.fromCodePoint(e),e===re?this.state=2:e===U?this.state=6:ie(e)&&(this.state=5,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang=``;break;case K:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?8:4,this.openWakaBang=``)}sDTDComment(){this.captureToChar(45)&&(this.text+=`-`,this.state=9)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===45?10:8}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===G?this.state=4:(this.fail(`malformed comment.`),this.state=8)}sDTDPI(){this.captureToChar(K)&&(this.text+=`?`,this.state=12)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===G&&(this.state=4)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;t:for(;;)switch(this.getCode()){case z:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{let n,{entityReturnState:r}=this,i=this.entity+t.slice(e,this.prevI);this.state=r,i===``?(this.fail(`empty entity name.`),n=`&;`):(n=this.parseEntity(i),this.entity=``),r===B&&this.textHandler===void 0||(this.text+=n);break t}case R:this.entity+=t.slice(e);break t}}sOpenWaka(){let e=this.getCode();if(D(e))this.state=34,this.unGet(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case K:this.state=23;break;default:this.fail(`disallowed character in tag name`),this.state=B,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case`[CDATA[`:this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang=``;break;case`--`:this.state=17,this.openWakaBang=``;break;case`DOCTYPE`:this.state=2,(this.doctype||this.sawRoot)&&this.fail(`inappropriately located doctype declaration.`),this.openWakaBang=``;break;default:this.openWakaBang.length>=7&&this.fail(`incorrect syntax.`)}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){let e=this.getCodeNorm();e===45?(this.state=19,this.commentHandler?.(this.text),this.text=``):(this.text+=`-${String.fromCodePoint(e)}`,this.state=17)}sCommentEnded(){let e=this.getCodeNorm();e===G?this.state=B:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=17)}sCData(){this.captureToChar(re)&&(this.state=21)}sCDataEnding(){let e=this.getCodeNorm();e===re?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){let e=this.getCodeNorm();switch(e){case G:this.cdataHandler?.(this.text),this.text=``,this.state=B;break;case re:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(e)}`,this.state=20}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===K||T(e)?(this.fail(`processing instruction without a target.`),this.state=e===K?26:25):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===R)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===K;r||T(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?V:27):this.state=r?26:25:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===K?this.state=26:T(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(K)&&(this.state=26)}sPIEnding(){let e=this.getCodeNorm();if(e===G){let{piTarget:e}=this;e.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),this.piHandler?.({target:e,body:this.text}),this.piTarget=this.text=``,this.state=B}else e===K?this.text+=`?`:(this.text+=`?${String.fromCodePoint(e)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();e===K?this.state=V:e!==R&&(this.state=28,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(q);if(e===K)return this.state=V,this.name+=this.text,this.text=``,void this.fail(`XML declaration is incomplete.`);if(T(e)||e===W){if(this.name+=this.text,this.text=``,!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail(`did not expect any more name/value pairs.`);break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(`, `)}`)}this.state=e===W?30:29}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===K)return this.state=V,void this.fail(`XML declaration is incomplete.`);T(e)||(e!==W&&this.fail(`value required.`),this.state=30)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===K)return this.state=V,void this.fail(`XML declaration is incomplete.`);T(e)||(ie(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=32),this.state=31)}sXMLDeclValue(){let e=this.captureTo([this.q,K]);if(e===K)return this.state=V,this.text=``,void this.fail(`XML declaration is incomplete.`);if(e===R)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=32}sXMLDeclSeparator(){let e=this.getCodeNorm();e===K?this.state=V:(T(e)||(this.fail(`whitespace required.`),this.unGet()),this.state=27)}sXMLDeclEnding(){this.getCodeNorm()===G?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),this.xmlDeclHandler?.(this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=B):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){let e=this.captureNameChars();if(e===R)return;let t=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=t.ns=Object.create(null)),this.openTagStartHandler?.(t),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),e){case G:this.openTag();break;case 47:this.state=35;break;default:T(e)||this.fail(`disallowed character in tag name.`),this.state=36}}sOpenTagSlash(){this.getCode()===G?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=36)}sAttrib(){let e=this.skipSpaces();e!==R&&(D(e)?(this.unGet(),this.state=37):e===G?this.openTag():e===47?this.state=35:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===W?this.state=39:T(e)?this.state=38:e===G?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==R&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case R:return;case W:this.state=39;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===G?this.openTag():D(e)?(this.unGet(),this.state=37):(this.fail(`disallowed character in attribute name.`),this.state=36)}}sAttribValue(){let e=this.getCodeNorm();ie(e)?(this.q=e,this.state=40):T(e)||(this.fail(`unquoted attribute value.`),this.state=42,this.unGet())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=41;return;case 38:this.text+=t.slice(n,this.prevI),this.state=14,this.entityReturnState=40;return;case H:case z:case 9:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case U:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case R:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();T(e)?this.state=36:e===G?this.openTag():e===47?this.state=35:D(e)?(this.fail(`no whitespace between attributes.`),this.unGet(),this.state=37):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(J);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case U:this.fail(`disallowed character.`);break;case R:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===G?this.openTag():this.state=36}}sCloseTag(){let e=this.captureNameChars();e===G?this.closeTag():T(e)?this.state=44:e!==R&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case G:this.closeTag();break;case R:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;t:for(;;)switch(this.getCode()){case U:if(this.state=15,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=0;break t;case 38:this.state=14,this.entityReturnState=B,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=0;break t;case re:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw Error(`impossible state`)}break;case G:t===2&&this.fail(`the string "]]>" is disallowed in char data.`),t=0;break;case z:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case R:r!==void 0&&(this.text+=n.slice(e));break t;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;t:for(;;){let i=this.getCode();switch(i){case U:if(this.state=15,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break t;case 38:this.state=14,this.entityReturnState=B,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break t;case z:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case R:n!==void 0&&(this.text+=t.slice(e));break t;default:T(i)||(r=!0)}}r&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){let{prefix:n,local:r}=this.qName(e),i={name:e,prefix:n,local:r,value:t};if(this.attribList.push(i),this.attributeHandler?.(i),n===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[r]=e,ce(this,r,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,ce(this,``,e)}}pushAttribPlain(e,t){let n={name:e,value:t};this.attribList.push(n),this.attributeHandler?.(n)}end(){this.sawRoot||this.fail(`document must contain a root element.`);let{tags:e}=this;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}this.state!==0&&this.state!==B&&this.fail(`unexpected end.`);let{text:t}=this;return t.length!==0&&(this.textHandler?.(t),this.text=``),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(e){let t=this.topNS[e];if(t!==void 0)return t;let{tags:n}=this;for(let r=n.length-1;r>=0;r--)if(t=n[r].ns[e],t!==void 0)return t;return t=this.ns[e],t===void 0?this.opt.resolvePrefix?.(e):t}qName(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qName(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let e,i,{name:a,prefix:o,local:s}=t;o===``?(e=a===`xmlns`?I:``,i=a):(e=this.resolve(o),e===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`),e=o),i=`{${e}}${s}`),r.has(i)&&this.fail(`duplicate attribute: ${i}.`),r.add(i),t.uri=e,n[a]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!1,this.openTagHandler?.(t),e.push(t),this.state=B,this.name=``}openSelfClosingTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!0,this.openTagHandler?.(t),this.closeTagHandler?.(t),(this.tag=e[e.length-1]??null)===null&&(this.closedRoot=!0),this.state=B,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=B,this.name=``,t===``)return this.fail(`weird empty close tag.`),void(this.text+=`</>`);let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag: ${t}.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}};(w=C||={}).Events={XmlDecl:`xmldecl`,Text:`text`,ProcessingInstruction:`processinginstruction`,Doctype:`doctype`,Comment:`comment`,OpenTagStart:`opentagstart`,Attribute:`attribute`,OpenTag:`opentag`,CloseTag:`closetag`,CDdata:`cdata`,Error:`error`,End:`end`,Ready:`ready`},w.parseStream=async(e,t,n)=>{let r,i=new Y({position:!1,...n});t.onOpenTagStart&&i.on(C.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&i.on(C.Events.OpenTag,t.onOpenTag),t.onCloseTag&&i.on(C.Events.CloseTag,t.onCloseTag),t.onAttribute&&i.on(C.Events.Attribute,t.onAttribute),t.onText&&i.on(C.Events.Text,t.onText),t.onError&&i.on(C.Events.Error,t.onError);let a=t.onEnd;for(a&&i.on(C.Events.End,()=>{r=a()});;){let{value:t,done:n}=await e.read();if(n)break;i.write(t)}return i.close(),r};var X=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,Z=e=>{let t=parseInt(e);return isNaN(t)?null:t},Q=e=>{let t=parseFloat(e);return isNaN(t)?null:t},$=null,fe=class{constructor(){this._registeredVisitors=new Map}registerVisitor(e){this._registeredVisitors.set(e.from,e)}createEventHandler(e,t,n){let r=this._registeredVisitors,i=[],a=[],o=null,s=null,c=null,l=null,u=[],d={key:null,source:e,parent:null},f=null,p=!1,m=(e,t)=>{let n=c.attributes[e];if(t){if(Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(n==null||(n=t[r](n),n==null))return}else if(n==null||(n=t(n),n==null))return}return n},h={getSource:()=>f?.source??null,setSource:e=>{f.source=e},setKey:e=>{f.key=e},getFrom:()=>c,getAttribute:(e,t)=>m(e,t)??null,hasAttribute:e=>h.getAttribute(e)!==null,getParent:()=>{let e=u[u.length-2];return e.parent??e.source},getPath:()=>{let e=[],t=a.length;for(let n=0;n<t;n++)e.push(a[n].local);return e.join(`\\`)},parseAttribute:m,copyToObject:(e,t,n,r)=>{let i=m(r??t,n);i!==void 0&&(e[t]=i)},copyTo:(e,t,n)=>{let r=m(n??e,t);r!==void 0&&(f.source[e]=r)},warn:e=>{n?n?.(e):console.warn(e)}};return{onOpenTag:e=>{let t=e.name,n=t.indexOf(`:`);n!==-1&&(t=t.slice(n+1));let m=(i.length>0?i[i.length-1]:r).get(t);if(o={local:t,visitor:m,tag:e,destination:null},p)return a.push(o),s=t,void(c=e);l=o?.visitor??null,s=t,c=e;let g=!!m&&m.to===null;if(m&&!g&&m.scope){let e=m.scope(h);e===null?g=!0:e&&(i.push(e),o.pushedScope=!0)}m&&(a.length===0?(f=d,o.destination=f,o.pushedDestination=!0,u.push(f)):g?(f=null,o.destination=null):m.transparent?o.destination=f:(f={key:null,source:{},parent:null},o.destination=f,o.pushedDestination=!0,u.push(f))),a.push(o),p=g;let _=l?.openTag?.(h);_!==void 0&&(f.parent=_)},onCloseTag:e=>{let t=e.name,r=t.indexOf(`:`);if(r!==-1&&(t=t.slice(r+1)),t!==s)throw Error(`mismatch open/close tag: '${t}'/'${s}'`);p||l?.closeTag?.(h);let m=a.pop()??null;o=a[a.length-1]??null,m?.pushedScope&&i.pop();let g=m?.destination;if(g&&m.pushedDestination){u.pop(),f=u[u.length-1]??d;let e=m.visitor;e&&e.to&&g.source!==void 0&&(Array.isArray(e.to)?f.source.push?f.source.push(g.source):n?.(`Unable to parse array for ${e.from} at ${h.getPath()}`):g.key?f.source[g.key]=g.source:typeof e.to==`string`&&(f.source[e.to]=g.source))}s=o?.local??null,c=o?.tag??null,l=o?.visitor??null,p=!o?.destination},onText:e=>{l?.text?.(e,h)},onEnd:t}}},pe=`IFERROR(${o.h}(`,me=pe.toUpperCase(),he=o.x.toUpperCase(),ge={kind:`none`},_e={kind:`spilled`},ve=(e,t)=>{if(e.charCodeAt(t)!==34)return null;let n=``,r=t+1;for(;r<e.length;)if(e.charCodeAt(r)===34){if(e.charCodeAt(r+1)!==34)return{value:n,end:r+1};n+=`"`,r+=2}else n+=e[r],r++;return null},ye=e=>{let t=[],n=0;for(;n<e.length;){let r=e.charCodeAt(n);if(r===34){let t=ve(e,n);if(t===null)break;n=t.end;continue}if(!(r>=65&&r<=90||r>=97&&r<=122||r===95)){n++;continue}let i=n+1;for(;i<e.length;){let t=e.charCodeAt(i);if(!(t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===95||t===46))break;i++}e.charCodeAt(i)===40&&t.push(e.slice(n,i).toUpperCase().replace(/^_XLFN\./,``).replace(/^_XLWS\./,``)),n=i}return t},be=e=>{let t=0,n=0;for(let r=0;r<e.length;r++){let i=e[r];if(i!==`"`&&i!==`'`){if(i===`[`)n++;else if(i===`]`)n>0&&n--;else if(n===0){if(i===`(`)t++;else if(i===`)`&&(t--,t<0))return!1}}else{for(r++;r<e.length;){if(e[r]===i){if(e[r+1]===i){r+=2;continue}break}r++}if(r>=e.length)return!1}}return t===0&&n===0},xe=class{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}},Se=(e,t,n)=>{if(e[0].value[0]===e[1].value[0])return t},Ce={colStart:0,colEnd:0,rowStart:0,rowEnd:0},we=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},Te={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.macroEnabled.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.binary.macroEnabled.main":`workbooks`,"application/vnd.ms-excel.addin.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":`sheets`,"application/vnd.ms-excel.worksheet":`sheets`,"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":`charts`,"application/vnd.ms-excel.chartsheet":`charts`,"application/vnd.ms-excel.macrosheet+xml":`macros`,"application/vnd.ms-excel.macrosheet":`macros`,"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":`dialogs`,"application/vnd.ms-excel.dialogsheet":`dialogs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":`strs`,"application/vnd.ms-excel.sharedStrings":`strs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":`styles`,"application/vnd.ms-excel.styles":`styles`,"application/vnd.openxmlformats-package.core-properties+xml":`coreprops`,"application/vnd.openxmlformats-officedocument.custom-properties+xml":`custprops`,"application/vnd.openxmlformats-officedocument.extended-properties+xml":`extprops`,"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":`comments`,"application/vnd.ms-excel.comments":`comments`,"application/vnd.ms-excel.threadedcomments+xml":`threadedcomments`,"application/vnd.ms-excel.person+xml":`people`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":`metadata`,"application/vnd.ms-excel.sheetMetadata":`metadata`,"application/vnd.ms-excel.externalLink":`links`,"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":`links`,"application/vnd.openxmlformats-officedocument.theme+xml":`themes`},Ee=e=>e.startsWith(`/`)?e.slice(1):e,De=/^xl\/(worksheets|chartsheets)\/[^/]+\.xml$/i;exports.readXLSX=async(s,u)=>{let{password:d,onVBA:f,profile:p,createWorkbookOptions:m={},...h}=u??{},g=m.origin&&typeof m.origin!=`string`?m.origin:null,_=p?new l(typeof p==`function`?p:void 0):null,v=[],y=u?.progress,b=y?.onProgress?y.onProgress.bind(y):void 0,x=s.byteLength,ee=0,S=0,te=b?e=>{if(ee<=0)return;S+=e;let t=Math.min(x,Math.round(S/ee*x));b(t,x)}:void 0,w=Promise.resolve().then(()=>require("./DfkGb1hUnmE0XFjK.cjs")),T=null;try{T=new DOMParser}catch{}let E=null;try{E=new XMLSerializer}catch{}let D,O,k,A=null;T||(A=Promise.resolve().then(()=>require("./DLYEQZzAGuSAmJsp.cjs")).then(e=>i.t(e.default,1)));try{let[e,t]=await Promise.all([A,w]);D=new t.DOMTransformer,O=T??new e.DOMParser,k=E??new e.XMLSerializer}catch(e){throw Error(`Unable to load XLSX parser.`,{cause:e})}let j,M=e=>k.serializeToString(e);try{j=await c.create(s)}catch(t){throw new e.s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`,{cause:t})}_?.mark(`zip-open`);try{if(!j.has(`[Content_Types].xml`))throw new e.s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let i=e=>{let t=j.getEntry(e);return t?{content:t}:void 0},s={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],metadata:[],people:[],sst:``,style:``,defaults:{}};{let e=(e=>({onOpenTag:t=>{let n=(e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)})(t.name),r=t.attributes;if(n===`Override`){let t=r.ContentType,n=r.PartName;if(!t||!n)return;let i=Te[t],a=i?e[i]:void 0;Array.isArray(a)&&a.push(n)}else if(n===`Default`){let t=r.Extension,n=r.ContentType;t&&(e.defaults[t.toLowerCase()]=n)}},onEnd:()=>{e.sst=e.strs.length>0?e.strs[0]:``,e.style=e.styles.length>0?e.styles[0]:``},onError:e=>{(e=>{v.push([e,`[Content_Types].xml`])})(`Error parsing content types: ${e?.message??e}`)}}))(s),t=await j.getTextStream(`[Content_Types].xml`);if(!t)throw Error(`Error parsing content types: '[Content_Types].xml'`);try{await C.parseStream(t,e,{xmlns:!1})}catch(e){throw Error(`Error parsing content types: '[Content_Types].xml'`,{cause:e})}g&&await j.getBuffer(`[Content_Types].xml`)}_?.mark(`content-types`);let c=s.sst,l=new Set;for(let e of s.sheets)l.add(Ee(e));c&&l.add(Ee(c));for(let e of l)ee+=j.uncompressedSize(e);if(await j.prefetch(e=>!l.has(e)&&!De.test(e)),_?.mark(`prefetch-side-parts`),s.workbooks.length===0){let e=a.n(`_rels/.rels`,i,O,D);if(e){for(let t of e.values())if(t.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`&&t.target){s.workbooks.push(t.target);break}}}if(s.workbooks.length===0)throw new e.s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);s.richstructure=[`/xl/richData/rdrichvaluestructure.xml`],s.richdata=[`/xl/richData/rdrichvalue.xml`];let u=m?.resources??new n.Zt,d=u.beginPersist(),h={},S=new Set,w=new Map;w.set(`richTypes`,[]);let T=[];w.set(`dummyWrapped`,T);let E=a.c(`metadata`,s,i,O,D).entries().next()?.value?.[1]?.metadata;E&&w.set(`metadata`,E);let k=new Map,A=[],N=(e,t=k)=>{let n=e.lastIndexOf(`/`),r=e.substring(0,n+1)+`_rels/`+e.substring(n+1,e.length)+`.rels`,o=t.get(r);return o||(o=a.n(r,i,O,D,z),t.set(r,o)),o},P=(r,s,c,l=k)=>{let f=N(s,l).get(r),p=f?.target;if(!p)return null;if(f.targetMode===`External`){if(!c)return f.target;let e=u.add({source:{external:f.target}});return e.addReference(h),S.add(e),d.toResourceId(e)}let m=s.lastIndexOf(`/`),g=s.substring(0,m+1);p.startsWith(`/`)||(p=g+p),p=a.u(p);let _=D?.getVisitorParamsState().get(`dxfs`),y=l.get(p);if(!y)if(f.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`){let r={};y=r,A.push((async()=>{let i=((r,i,s,c,l,u,d,f)=>{let p=new fe,m=new n.M.TransposedBuilder,h=null;p.registerVisitor({from:`autoFilter`,to:`autoTable`,openTag:e=>{let t=e.getAttribute(`ref`),r=n.X.fastStringToRange(t);e.getSource().r=r,e.getSource().v={}},closeTag:e=>{let t=e.getSource(),n=t.v,r=n.hiddenButtons;if(Array.isArray(r)){let e=r.length,i=t.r,a=i.colEnd-i.colStart+1;e===0?n.hiddenButtons=!1:e===a&&(n.hiddenButtons=!0)}}}),p.registerVisitor({from:`conditionalFormatting`,to:{},openTag:e=>{let t=e.getParent();t.conditionals||=[];let n=e.getAttribute(`sqref`);n&&=n.trim().split(/\s+/).join(`,`);let r={r:n,conditionals:t.conditionals},i=e.getAttribute(`pivot`,X);i!==null&&(r.pivot=i),e.setSource(r)}}),p.registerVisitor({from:`cfRule`,to:{},openTag:e=>{let t=e.getParent();if(!t?.r)return;let n=e.getSource()??{};t.pivot!==void 0&&(n.pivot=t.pivot),t.conditionals.push({r:t.r,v:null,rule:n}),e.copyToObject(n,`type`,$),e.copyToObject(n,`priority`,Z),e.copyToObject(n,`stopIfTrue`,X);let r=e.getAttribute(`dxfId`,Z);if(r!==null){let t=c?.get(r);t||=(u?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${e.getPath()}'.`),{}),n.style=t}e.copyToObject(n,`aboveAverage`,X),e.copyToObject(n,`equalAverage`,X),e.copyToObject(n,`stdDev`,Z),e.copyToObject(n,`bottom`,X),e.copyToObject(n,`percent`,X),e.copyToObject(n,`rank`,Z),e.copyToObject(n,`operator`,$),e.copyToObject(n,`text`,$),e.copyToObject(n,`timePeriod`,$)},closeTag:e=>{let t=e.getParent();if(!t?.r)return;let n=t.conditionals[t.conditionals.length-1],r=n?.rule;if(!r)return;let i={},a=o.i(r,u);a&&(i.condition=a),r.style&&(i.style=r.style),r.scale&&(i.scale=r.scale),r.stopIfTrue&&(i.stopIfTrue=!0),r.pivot&&(i.pivot=!0),n.v=i,n.priority=r.priority,r.x14Id&&(n.x14Id=r.x14Id),delete n.rule}});let g=e=>{let t=e.conditions??[],n=[];for(let e=0;e<t.length;e++){let r=t[e],i={};r.type&&(i.type=r.type),r.value!==void 0&&(i.value=r.value),r.exclusive&&(i.exclusive=!0),n.push(i)}return n};p.registerVisitor({from:`colorScale`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),r=t.colors??[],i=g(t);for(let e=0;e<i.length;e++)i[e].color=r[e];e.getParent().scale={type:n.lt.ScaleType.ColorScale,stops:i}}}),p.registerVisitor({from:`dataBar`,to:{},openTag:e=>{e.copyTo(`maxLength`,Z),e.copyTo(`minLength`,Z),e.copyTo(`showValue`,X)},closeTag:e=>{let t=e.getSource(),r={type:n.lt.ScaleType.DataBar,stops:g(t)},i=t.colors?.[0];i&&(r.color=i),t.minLength!==void 0&&(r.minLength=t.minLength),t.maxLength!==void 0&&(r.maxLength=t.maxLength),t.showValue!==void 0&&(r.showValue=t.showValue),e.getParent().scale=r}}),p.registerVisitor({from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`reverse`,X),e.copyTo(`showValue`,X)},closeTag:e=>{let t=e.getSource(),r={type:n.lt.ScaleType.IconSet,stops:g(t)};t.iconSet!==void 0&&(r.iconSet=t.iconSet),t.reverse!==void 0&&(r.reverse=t.reverse),t.showValue!==void 0&&(r.showValue=t.showValue),e.getParent().scale=r}}),p.registerVisitor({from:`formula`,to:{},text:(e,t)=>{let n=t.getParent(),r=n.formulas;r||(r=[],n.formulas=r),r.push(e)}}),p.registerVisitor({from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let r=e.getSource();t.conditions.push(r),e.copyTo(`type`,$),r.type===n.lt.ColorStopType.Formula?e.copyTo(`value`,$,`val`):e.copyTo(`value`,Q,`val`),!1===e.getAttribute(`gte`,X)&&(r.exclusive=!0)}}),p.registerVisitor({from:`color`,to:{},openTag:e=>{let t=e.getParent();t.colors||=[];let n=a.o(t=>e.getAttribute(t));t.colors.push(n)}}),p.registerVisitor({from:`filterColumn`,to:{},openTag:e=>{let t=e.getParent().v,n=parseInt(e.getAttribute(`colId`)),r=e.getSource();r.index=n;let i=t.filter;i||(i={conditions:[]},t.filter=i);let a=i.conditions;if(a||(a=[],i.conditions=a),a.push(r),e.getAttribute(`hiddenButton`,X)&&t){let e=t.hiddenButtons;e||(e=[],t.hiddenButtons=e),e.push(n)}if(e.getAttribute(`showButton`,X)&&t){let e=t.showButtons;e||(e=[],t.showButtons=e),e.push(n)}return r}}),p.registerVisitor({from:`colorFilter`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.j.BuiltInOperatorNames.Color,t.param=r,e.copyToObject(r,`cellColor`),e.copyToObject(r,`styleId`,Z,`dxfId`)}}),p.registerVisitor({from:`iconFilter`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.j.BuiltInOperatorNames.Icon,t.param=r,e.copyToObject(r,`iconId`,Z),e.copyToObject(r,`iconSet`,$)}}),p.registerVisitor({from:`top10`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.j.BuiltInOperatorNames.TopN,t.param=r,e.copyToObject(r,`filterVal`,Q),e.copyToObject(r,`percent`,X),e.copyToObject(r,`top`,X),e.copyToObject(r,`limit`,Q,`val`)}}),p.registerVisitor({from:`dynamicFilter`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.j.BuiltInOperatorNames.TimePeriod,t.param=r;let i=e.getAttribute(`type`);Object.values(n.j.AverageType).includes(i)?(t.operator=n.j.BuiltInOperatorNames.Average,e.copyToObject(r,`stdDevs`,Z,`val`)):e.copyToObject(r,`anchorDate`,Z,`val`),e.copyToObject(r,`operator`,$,`type`),e.copyToObject(r,`maxVal`,Q,`maxVal`)}}),p.registerVisitor({from:`filters`,to:{},openTag:e=>{let t=e.getParent(),r={};return t.operator=n.j.BuiltInOperatorNames.InSet,t.param=r,e.copyToObject(r,`blank`,X),e.copyToObject(r,`calendarType`,$),r}}),p.registerVisitor({from:`filter`,openTag:e=>{let t=e.getParent(),n=t.items;n||(n=[],t.items=n),n.push(e.getAttribute(`val`,$))}}),p.registerVisitor({from:`dateGroupItem`,to:{},openTag:e=>{let t=e.getParent(),n=t.dateGroups;n||(n=[],t.dateGroups=n),n.push(e.getSource()),e.copyTo(`group`,$,`dateTimeGrouping`),e.copyTo(`day`,Z),e.copyTo(`hour`,Z),e.copyTo(`minute`,Z),e.copyTo(`month`,Z),e.copyTo(`second`,Z),e.copyTo(`year`,Z)}}),p.registerVisitor({from:`customFilters`,openTag:e=>{let t=e.getParent(),r=e.getAttribute(`and`),i=r===`and`||r===`1`;e.getAttribute(`val`);let a=[];return t.operator=i?n.j.BuiltInOperatorNames.And:n.j.BuiltInOperatorNames.Or,t.param={conditions:a},e.setSource(t),a},closeTag:e=>{e.getSource().param.conditions.length}}),p.registerVisitor({from:`customFilter`,openTag:e=>{let t,n=e.getParent();Array.isArray(n)?(t={},n.push(t)):t=n,e.copyToObject(t,`operator`),e.copyToObject(t,`param`,$,`val`)}}),p.registerVisitor({from:`sortState`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;n&&(n.sort={},e.setSource(t))}}),p.registerVisitor({from:`sortCondition`,to:{},openTag:e=>{let t=e.getParent(),r=t.v;if(!r)return;let i=r.sort;if(!i)return;let a=i.sorts;a||(a=[],i.sorts=a);let o=e.getAttribute(`ref`),s=0;if(o){let e=n.X.fastStringToRange(o,Ce).colStart,r=t.r,i=r.colStart;s=r?e-i:e}let c={};e.copyToObject(c,`sortOn`,$,`sortBy`),e.copyToObject(c,`dxfId`,$,`sortBy`),e.copyToObject(c,`iconSet`,$),e.copyToObject(c,`customList`,$),c.reverse=e.getAttribute(`descending`,X)??!1;let l={index:s,criteria:c};a.push(l)}}),p.registerVisitor({from:`AlternateContent`,to:null});let _=e=>{h=e.getSource(),e.copyTo(`topLeft`,$,`topLeftCell`);let t=a.p(e.getAttribute(`defaultGridColor`)),n=e.getAttribute(`colorId`);n===null||t||(e.getSource().gridLineColor=`index`+parseFloat(n)),e.copyTo(`showZeros`,X),e.copyTo(`showFormulas`,X),e.copyTo(`zoomScale`,Z),e.copyTo(`showRowHeaders`,X,`showRowColHeaders`),e.copyTo(`showColumnHeaders`,X,`showRowColHeaders`),e.copyTo(`showRowGridlines`,X,`showGridLines`),e.copyTo(`showColumnGridlines`,X,`showGridLines`),e.copyTo(`rightToLeft`,X)};p.registerVisitor({from:`sheetView`,to:`view`,openTag:e=>{_(e)},closeTag:()=>{h=null}}),p.registerVisitor({from:`customSheetViews`,to:`customSheetViews`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`customSheetView`,to:[],openTag:e=>{_(e)},closeTag:()=>{h=null}}),p.registerVisitor({from:`selection`,to:`selection`,openTag:e=>{if(!h)return;e.copyTo(`cell`,$,`activeCell`),e.copyTo(`rangeIndex`,Z,`activeCellId`);let t=e.getAttribute(`activeCell`),n=e.getAttribute(`sqref`);n&&n!==t&&(e.getSource().ranges=n.trim().split(/\s+/))}}),p.registerVisitor({from:`pane`,to:null,openTag:e=>{if(h&&e.getAttribute(`state`)===`frozen`){let t={};h.freezePanes=t,e.copyToObject(t,`topLeft`,$,`topLeftCell`);let r=(h.topLeft?n.X.fastStringToCell(h.topLeft):void 0)??{colIndex:0,rowIndex:0},i={colIndex:0,rowIndex:0};e.copyToObject(i,`colIndex`,Z,`xSplit`),e.copyToObject(i,`rowIndex`,Z,`ySplit`);let a={colIndex:r.colIndex+i.colIndex,rowIndex:r.rowIndex+i.rowIndex};t.coords=n.X.cellToString(a)}}}),p.registerVisitor({from:`tabColor`,to:null,openTag:e=>{let t=a.o(t=>e.getAttribute(t));t&&(r.tabColor=t)}}),p.registerVisitor({from:`pageSetUpPr`,to:`pageSetUpPr`,openTag:e=>{}}),p.registerVisitor({from:`outlinePr`,to:`outlinePr`,openTag:e=>{}}),p.registerVisitor({from:`pageMargins`,to:`pageMargins`,openTag:e=>{e.copyTo(`bottom`,Q),e.copyTo(`footer`,Q),e.copyTo(`header`,Q),e.copyTo(`left`,Q),e.copyTo(`right`,Q),e.copyTo(`top`,Q),e.copyTo(`bottom`,Q)}}),p.registerVisitor({from:`pageSetup`,to:`pageSetup`,openTag:e=>{e.copyTo(`blackAndWhite`,X),e.copyTo(`cellComments`),e.copyTo(`copies`,Z),e.copyTo(`draft`,X),e.copyTo(`errors`),e.copyTo(`firstPageNumber`,Z),e.copyTo(`fitToHeight`,Z),e.copyTo(`fitToWidth`,Z),e.copyTo(`horizontalDpi`,Z),e.copyTo(`orientation`),e.copyTo(`pageOrder`),e.copyTo(`paperSize`,Z),e.copyTo(`scale`,Z),e.copyTo(`useFirstPageNumber`,X),e.copyTo(`usePrinterDefaults`,X),e.copyTo(`verticalDpi`,Z)}}),p.registerVisitor({from:`printOptions`,to:`printOptions`,openTag:e=>{e.copyTo(`gridLines`,X),e.copyTo(`gridLinesSet`,X),e.copyTo(`headings`,X),e.copyTo(`horizontalCentered`,X),e.copyTo(`verticalCentered`,X)}}),p.registerVisitor({from:`headerFoot`,to:`headerFoot`,openTag:e=>{}}),p.registerVisitor({from:`mergeCells`,to:`merges`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`dataValidations`,to:`validations`,openTag:e=>{e.setSource([])}});let v={from:`dataValidation`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n,rule:{type:e.getAttribute(`type`)??void 0,operator:e.getAttribute(`operator`)??void 0}};!0===e.getAttribute(`showDropDown`,X)&&(n.hideDropdown=!0),e.copyToObject(n,`alert`,$,`error`),e.copyToObject(n,`alertTitle`,$,`errorTitle`),e.copyToObject(n,`showAlertMessage`,X,`showErrorMessage`),n.alertStyle=e.getAttribute(`errorStyle`)??`stop`,e.copyToObject(n,`imeMode`),e.copyToObject(n,`prompt`),e.copyToObject(n,`promptTitle`),e.copyToObject(n,`showPromptMessage`,X,`showInputMessage`),e.setSource(r)},closeTag:e=>{let t=e.getSource();if(!t?.rule)return;let n=o.r(t.rule,u);n&&(e.getAttribute(`allowBlank`,X)&&(n.includeBlanks=!0),t.v.condition=n),delete t.rule}};p.registerVisitor(v),p.registerVisitor({from:`formula1`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula1=o.S(e,n.type))}}),p.registerVisitor({from:`formula2`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula2=o.S(e,n.type))}}),p.registerVisitor({from:`picture`,to:`picture`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void console.warn(`no rId found for picture`,e.getPath());let n=i(t,!0);e.getSource().resId=n}});let y={from:`slicer`,to:{},openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void console.warn(`no rId found for picture`,e.getPath());let n=i(t)?.slicers,r=e.getParent();r.slicers||={};let a=Object.keys(n);for(let e of a)r.slicers[e]=n[e]}};p.registerVisitor(y);let b=(e,t)=>({from:e,to:{},openTag:e=>{e.setSource(``)},text:(e,t)=>{t.setSource((t.getSource()??``)+e)},closeTag:e=>{t(String(e.getSource()??``),e)}}),x=new Map;x.set(`dataValidations`,{from:`dataValidations`,to:`validations`,openTag:e=>{let t=e.getParent();e.setSource(t.validations??[])},closeTag:e=>{(e.getSource()?.length??0)===0&&e.setSource(void 0)}}),x.set(`dataValidation`,{...v,closeTag:e=>{v.closeTag(e);let t=e.getSource();t&&!t.r&&(e.warn(`x14 dataValidation with no xm:sqref was dropped.`),e.setSource(void 0))}});let ee=e=>({from:e,to:{},openTag:t=>{t.setSource({rule:t.getParent()?.rule,key:e})}});x.set(`formula1`,ee(`formula1`)),x.set(`formula2`,ee(`formula2`)),x.set(`f`,b(`f`,(e,t)=>{let n=t.getParent(),r=n?.rule;r&&(r[n.key]=o.S(e,r.type))})),x.set(`sqref`,b(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.r=r.split(/\s+/).join(`,`))}));let S=new Map,te=[],C=new Map;C.set(`conditionalFormattings`,{from:`conditionalFormattings`,transparent:!0}),C.set(`conditionalFormatting`,{from:`conditionalFormatting`,to:{},openTag:e=>{e.setSource({rules:[]})},closeTag:e=>{let t=e.getSource(),n=t?.rules??[];for(let e=0;e<n.length;e++){let r=n[e];r.sqref=t.sqref,r.id?S.set(r.id,r):te.push(r)}}}),C.set(`cfRule`,{from:`cfRule`,to:{},openTag:e=>{e.copyTo(`id`,$),e.copyTo(`type`,$),e.copyTo(`priority`,Z)},closeTag:e=>{let t=e.getSource();t&&e.getParent()?.rules?.push(t)}}),C.set(`sqref`,b(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.sqref=r)})),C.set(`dataBar`,{from:`dataBar`,to:{},openTag:e=>{e.copyTo(`minLength`,Z),e.copyTo(`maxLength`,Z),e.copyTo(`gradient`,X),e.copyTo(`border`,X),e.copyTo(`direction`,$),e.copyTo(`axisPosition`,$),e.copyTo(`negativeBarColorSameAsPositive`,X),e.copyTo(`negativeBarBorderColorSameAsPositive`,X)},closeTag:e=>{e.getParent().dataBar=e.getSource()}}),C.set(`iconSet`,{from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`custom`,X),e.copyTo(`reverse`,X),e.copyTo(`showValue`,X)},closeTag:e=>{e.getParent().iconSet=e.getSource()}}),C.set(`cfvo`,{from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();t.conditions.push(n),e.copyTo(`type`,$),!1===e.getAttribute(`gte`,X)&&(n.exclusive=!0)}}),C.set(`f`,b(`f`,(e,t)=>{let n=t.getParent();if(!n)return;let r=e.trim(),i=Number(r);n.value=r.length>0&&Number.isFinite(i)?i:e}));let w=e=>({from:e,to:{},openTag:t=>{let n=a.o(e=>t.getAttribute(e));n&&(t.getParent()[e]=n)}});C.set(`borderColor`,w(`borderColor`)),C.set(`negativeFillColor`,w(`negativeFillColor`)),C.set(`negativeBorderColor`,w(`negativeBorderColor`)),C.set(`axisColor`,w(`axisColor`)),C.set(`cfIcon`,{from:`cfIcon`,to:{},openTag:e=>{let t=e.getAttribute(`iconSet`),n=e.getAttribute(`iconId`,Z);if(t===null||n===null)return;let r=e.getParent();r.icons||=[],r.icons.push({set:t,id:n})}});let T=new Map;T.set(`id`,b(`id`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.x14Id=r)}));let E=new Map;E.set(`slicerList`,{from:`slicerList`,transparent:!0}),E.set(`slicer`,y);let D=new Map([[o.t(o.s),x],[o.t(o.p),C],[o.t(o.H),C],[o.t(o.f),T],[o.t(o.M),E],[o.t(o.j),E]]),O=new Set;p.registerVisitor({from:`extLst`,transparent:!0}),p.registerVisitor({from:`ext`,transparent:!0,scope:e=>{let t=e.getAttribute(`uri`),n=o.t(t),r=D.get(n);if(r)return r;if(!o.b.has(n)&&!O.has(n)){O.add(n);let r=o.N[n];e.warn(r?`Extension content '${r}' (${t}) is not read; it will be lost on resave.`:`Unknown extension content (uri ${t}) is not read; it will be lost on resave.`)}return null}}),p.registerVisitor({from:`mergeCell`,to:[],openTag:e=>{let t=e.getAttribute(`ref`);e.setSource(t)}}),p.registerVisitor({from:`hyperlinks`,to:`hyperlinks`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`hyperlink`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`),n=e.getAttribute(`ref`);if(!n)return void console.warn(`No ref found for hyperlink`);e.setKey(n);let r=t?i(t):``;if(typeof r!=`string`)return void console.warn(`Invalid address `,r);r.endsWith(`\\`)&&(r=r.substring(0,r.length-1));let a=e.getAttribute(`location`);if(a&&(r+=`#`+a),!r)return void console.warn(`No address found for hyperlink. r:id`,t);let o,s=e.getAttribute(`tooltip`);o=s?{address:r,screenTip:s}:r,e.setSource({r:n,v:o})}}),p.registerVisitor({from:`drawing`,to:`movables`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=i(t);n?e.setSource(n.movables):console.warn(`no drawing found for rId`,t)}}),p.registerVisitor({from:`tableParts`,to:`tables`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`tablePart`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=i(t);n?e.setSource(n):console.warn(`no table found for rId`,t)}});let k=(e,t)=>{t.conditions?.length&&(e.stops=g(t)),t.minLength!==void 0&&(e.minLength=t.minLength),t.maxLength!==void 0&&(e.maxLength=t.maxLength),(t.gradient??1)&&(e.gradient=!0),t.border&&t.borderColor&&(e.borderColor=t.borderColor),!t.negativeBarColorSameAsPositive&&t.negativeFillColor&&(e.negativeFillColor=t.negativeFillColor),!(t.negativeBarBorderColorSameAsPositive??1)&&t.negativeBorderColor&&(e.negativeBorderColor=t.negativeBorderColor),t.axisColor&&(e.axisColor=t.axisColor),t.axisPosition!==`middle`&&t.axisPosition!==`none`||(e.axisPosition=t.axisPosition),t.direction!==`leftToRight`&&t.direction!==`rightToLeft`||(e.direction=t.direction)},A=(e,t)=>{t.conditions?.length&&(e.stops=g(t)),t.iconSet&&t.iconSet!==e.iconSet&&(e.iconSet=t.iconSet),t.icons?.length&&(e.icon=t.icons),t.reverse!==void 0&&(e.reverse=t.reverse),t.showValue!==void 0&&(e.showValue=t.showValue)},j=e=>{if(e.type!==`iconSet`||!e.iconSet||!e.sqref)return null;let t={type:n.lt.ScaleType.IconSet,stops:[]};return A(t,e.iconSet),{r:e.sqref.split(/\s+/).join(`,`),v:{scale:t},priority:e.priority}};p.registerVisitor({from:`worksheet`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),r=t?.conditionals;if(r)for(let e=0;e<r.length;e++){let t=r[e],i=t.x14Id;if(!i)continue;delete t.x14Id;let a=S.get(i);if(!a)continue;S.delete(i);let o=t.v?.scale;a.dataBar&&o?.type===n.lt.ScaleType.DataBar?k(o,a.dataBar):a.iconSet&&o?.type===n.lt.ScaleType.IconSet&&A(o,a.iconSet)}let i=[...S.values(),...te];for(let e=0;e<i.length;e++){let n=j(i[e]);n?(r||(r=[],t.conditionals=r),r.push(n)):u?.(`x14-only conditional formatting rule (type '${i[e].type??`unknown`}') is not read and will be lost on resave.`)}if(r){r.length>1&&r.sort((e,t)=>(e.priority??1/0)-(t.priority??1/0));for(let e=0;e<r.length;e++)delete r[e].priority}}}),p.registerVisitor({from:`customProperties`,to:`customProperties`,openTag:e=>{e.setSource([])},closeTag:e=>{let t=e.getSource();t.length>0&&(e.getParent().customProperties=t)}}),p.registerVisitor({from:`customPr`,to:{},openTag:e=>{let t=e.getParent();e.copyTo(`name`);let n=e.getAttribute(`r:id`);if(!n)return void console.warn(`no rId found for customProperties`,e.getPath());let r=i(n,!0),a=e.getSource();a.resId=r,t.push(a)}}),p.registerVisitor({from:`sheetProtection`,to:`protection`,openTag:e=>{let t=!1;if(e.hasAttribute(`sheet`)&&X(e.getAttribute(`sheet`))&&(t=!0),!t)return void e.setSource(void 0);let n=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null;e.copyTo(`autoTable`,n),e.copyTo(`deleteColumns`,n),e.copyTo(`formatCells`,n),e.copyTo(`formatColumns`,n),e.copyTo(`formatRows`,n),e.copyTo(`insertColumns`,n),e.copyTo(`insertHyperlinks`,n),e.copyTo(`insertRows`,n),e.copyTo(`objects`,n),e.copyTo(`pivotTables`,n),e.copyTo(`scenarios`,n),e.copyTo(`selectLockedCells`,n),e.copyTo(`selectUnlockedCells`,n),e.copyTo(`sort`,n);let r={};e.copyToObject(r,`hash`,$,`hashValue`),e.copyToObject(r,`algorithm`,$,`algorithmName`),e.copyToObject(r,`salt`,$,`saltValue`),e.copyToObject(r,`spinCount`,Z),Object.keys(r).length>0&&(e.getSource().password=r)}}),p.registerVisitor({from:`protectedRanges`,to:`protectedRanges`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`protectedRange`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n};e.copyToObject(n,`name`),e.copyToObject(n,`securityDescriptor`);let i={};e.copyToObject(i,`hash`,$,`hashValue`),e.copyToObject(i,`algorithm`,$,`algorithmName`),e.copyToObject(i,`salt`,$,`saltValue`),e.copyToObject(i,`spinCount`,Z),Object.keys(i).length>0&&(n.password=i),e.setSource(r)},closeTag:e=>{let t=e.getSource();t?.r&&t.v.name||e.setSource(void 0)}}),p.registerVisitor({from:`sheetFormatPr`,to:`sheetFormatPr`,openTag:e=>{e.copyToObject(r,`defaultColSize`,Q,`defaultColWidth`),e.copyToObject(r,`outlineLevelCol`,Z,`outlineLevelCol`);let t=e.getAttribute(`customHeight`);t!==`1`&&t!==`true`||e.copyToObject(r,`defaultRowSize`,Q,`defaultRowHeight`),e.copyToObject(r,`outlineLevelRow`,Z,`outlineLevelRow`)}}),p.registerVisitor({from:`cols`,to:`cols`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`col`,to:[],openTag:e=>{let t=e.getSource(),r=e.getAttribute(`min`),i=e.getAttribute(`max`),a=r===void 0?0:parseInt(r)-1,o=i===void 0?a:parseInt(i)-1;t.r=n.X.runToString(a,o,!0);let s={};t.v=s,e.copyToObject(s,`sz`,Q,`width`),e.copyToObject(s,`csz`,X,`customWidth`),e.copyToObject(s,`h`,X,`hidden`),e.copyToObject(s,`l`,Z,`outlineLevel`),e.copyToObject(s,`s`,Z,`style`)}}),p.registerVisitor({from:`oleObjects`,to:null,openTag:e=>{e.warn(`'OLE Objects' are not supported.`)}});let M=!1,N=!1,P=0,F=``,I=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)};return((r,i,a,o,s,c,l)=>{let u=!1,d=!1,f=[],p=!1,m=null,h=null,g=null,_=null,v=null,y=null,b=l?.get(`richData`)??e.A.EmptyArray,x=l?.get(`dummyWrapped`)??null,ee=n.X.normalizeA1ToR1C1,S=e.l.createConflatingRanges(),te=new Map,C=[],w=!1,T=!1,E=null,D=!1,O=e.l.createConflatingRanges(),k=!1,A=-1,j=-1,M=null,N=null,P=null,F=[],I=null,ne=-2,L=0,R=``,z=``,B=``,V=``,H=``,U=``,W=``,G=``,K=``,re=``,ie=``,ae=``,oe=``,se=``,q=!0,J=null,ce=!1,le=!1,ue=null,de=0;return{...a,onEnd:()=>{F.length>0&&(i.rows=n.X.runsToRefs(F,!1));let o=S.done(Se),s=o.length;if(s>0){let e=new Set;for(let t=0;t<C.length;t++)e.add(C[t][0].split(`:`)[0]);let t=Array(s);for(let r=0;r<s;r++){let i=o[r],a=n.X.rangeToString(i),s=i.value[1],c=n.X.resolveRelativeToA1(s,i.rowStart,i.colStart);c&&!e.has(a.split(`:`)[0])&&be(c)&&(c=`__sxl.INTERSECT(${c})`),t[r]=[a,c]}i.formulas=t}let c=O.done(!0),l=c.length;if(l>0){let e=Array(l);for(let t=0;t<l;t++){let r=c[t];e[t]=n.X.rangeToString(r)}i.volatile=e}C.length>0&&(i.formulaArray=[...C]);let u=f.length;if(u>0){f.sort(e.l.createRangeComparator(t.l.Axis.Column));let r=f[0],a=r.colStart,o=r.colEnd,s=r.rowEnd,c=r.value,l=[];l.push(r);let d=null;for(let e=1;e<u;e++)d=f[e],c!==d.value||a!==d.colStart||o!==d.colEnd||s+1!==d.rowEnd?(l.push(d),r=d,a=r.colStart,o=r.colEnd,s=r.rowEnd,c=r.value):(s=d.rowEnd,r.rowEnd=s);let p=l.length,m=Array(p);for(let e=0;e<p;e++){let t=l[e];m[e]=[n.X.rangeToString(t),t.value]}i.directStyles=m}let d=r.build();d&&(i.data=d.tuples),a?.onEnd?.()},onOpenTag:e=>{let r=e.name,o=r.indexOf(`:`);if(o!==-1&&(r=r.slice(o+1)),de++,de%196608==0&&s?.(de),N){let t=e.attributes;switch(r){case`v`:d=!0;break;case`f`:switch(p=!0,t.t??null){case null:case`normal`:break;case`shared`:let e=t.si;h=t.ref,m=e;break;case`array`:h=t.ref,E=h;break;case`datatable`:h=t.ref,p=!0}let e=t.ca;e!==void 0&&(D=e===`1`);break;case`is`:k=!0;return}k&&!p&&c?.onOpenTag?.(e);return}if(u){if(r===`c`){N=e;let r=e.attributes,i=r.r;j=n.X.fastStringToCol(i);let a=r.t;a===void 0?P=null:(P=a,P===`str`&&(k=!0));let o=r.s;o===void 0&&(ue!==null||le)&&(o=`0`),o!==void 0&&(o=parseInt(o),J&&J.value===o&&J.colEnd+1===j?J.colEnd=j:(J={colStart:j,rowStart:A,colEnd:j,rowEnd:A,value:o},f.push(J))),E=null,T=!1;let s=r.cm;w=s!==void 0&&(e=>{let t=l?.get(`metadata`)?.cells;if(!t)return!1;let n=parseInt(e,10);return!(!Number.isFinite(n)||n<1)&&!0===t[n-1]?.get(`XLDAPR`)?.fDynamic})(s);let c=r.vm;if(c!==void 0){let e=b[parseInt(c)-1];if(t.a.isError(e)){let n=e.getCode();M={t:`e`,v:n},w&&n===t.a.Code.Spill&&(T=!0)}}}}else{if(r===`row`){u=!0;let t=e.attributes.r;if(A=parseInt(t)-1,L=0,z=e.attributes.customHeight,z!==void 0&&(L|=xe.CustomHeight),z!==K&&(q=!0,K=z),R=e.attributes.ht,R!==void 0&&(L|=xe.Ht),R!==G&&(q=!0,G=R),B=e.attributes.hidden,B!==void 0&&(L|=xe.Hidden),B!==re&&(q=!0,re=B),H=e.attributes.s,H!==void 0&&(L|=xe.S),H!==ae&&(q=!0,ae=H),V=e.attributes.customFormat,V!==void 0&&(L|=xe.CustomFormat),V!==ie&&(q=!0,ie=V),U=e.attributes.outlineLevel,U!==void 0&&(L|=xe.OutlineLevel),U!==oe&&(q=!0,oe=U),W=e.attributes.collapsed,W!==void 0&&(L|=xe.Collapsed),W!==se&&(q=!0,se=W),L!==0)if(ne+1!==A||q){let e=z!==void 0&&(z===`1`||z===`true`),t=V!==void 0&&(V===`1`||V===`true`);ue=t&&H!==void 0?H:null,t&&ue===null&&(ue=`0`),I={min:A,max:A,value:{sz:R===void 0?-1:parseFloat(R),csz:e,h:B!==void 0&&(B===`1`||B===`true`),s:ue===null?void 0:ue===`0`?0:parseInt(ue),l:U===void 0||U===`0`?0:parseInt(U),cl:W!==void 0&&(W===`1`||W===`true`)}},F.push(I)}else I.max=A;ne=A,q=!1;return}if(!ce&&r===`sheetData`){ce=!0;let e=i.cols,t=e?e.length:0;for(let n=0;!le&&n<t;n++)e[n].v.s&&(le=!0)}a?.onOpenTag?.(e)}},onCloseTag:e=>{let t=e.name;if(!p||t!==`c`&&t!==`f`||(m&&(_=te.get(m)??null),_&&(S.append(A,j,_),D&&O.append(A,j)),E!==null&&C.push([E,w?T?`dynamicSpillError`:`dynamic`:`static`]),p=!1,_=null,m=null,h=null,d=!1,D=!1,E=null,w=!1,T=!1),N){let n=t.indexOf(`:`);if(n!==-1&&(t=t.slice(n+1)),k)if(t===`is`||t===`v`){let e=c?.onEnd?.();e!=null&&r.pushAt(A,j,``+e)}else t!==`f`&&c?.onCloseTag?.(e);d&&=!1,t===`c`&&(N=null,k=!1);return}if(u)return u=!1,void(J=null);a?.onCloseTag?.(e)},onText:e=>{let s=e.trim();if(d){switch(M=null,P){case null:case`n`:M=parseFloat(s);break;case`b`:M=s===`1`||s===`true`;break;case`s`:M=s;break;case`e`:if(s===`#VALUE!`){let e=N.attributes.vm;if(e!==void 0){let n=b[parseInt(e)-1];if(t.a.isError(n)){M={t:`e`,v:n.getCode()};break}}}let e=t.a.getBuiltInByLabel(s);e?M={t:`e`,v:e.getCode()}:(M=s,o?.(`Unknown formula error '${s}' in cell ${n.X.cellToString({colIndex:j,rowIndex:A})}`));break;case`str`:case`inlineStr`:k=!0}M!==null&&r.pushAt(A,j,M)}if(m){if(v===m)_=y;else{if(_=te.get(m)??null,!_){let e=[];g=ee(s,A,j,e),_=[g,e,s],te.set(m,_)}v=m,y=_}m=null}if(p){if(x!==null){let e=(e=>{if(e.length<pe.length||e.slice(0,pe.length).toUpperCase()!==me)return ge;let t=ve(e,pe.length);if(t===null||e.charCodeAt(t.end)!==41||e.charCodeAt(t.end+1)!==44||e.charCodeAt(e.length-1)!==41)return ge;let n=t.value;return n.toUpperCase()===he?_e:n.length===0?ge:{kind:`formula`,formula:n}})(s);e.kind!==`none`&&x.push({sheet:i,rowIndex:A,colIndex:j,formula:e.kind===`formula`?e.formula:null})}let e=[];g=ee(s,A,j,e),_=[g,e,s]}k?c?.onText?.(e):u||a?.onText?.(s)}}})(m,r,p.createEventHandler(r,()=>{},u),u,void 0,{onOpenTag:e=>{M=!0;let t=I(e.name);t===`t`||t===`v`?P===0&&(N=!0):t!==`rPh`&&t!==`phoneticPr`||P++},onText:e=>{N&&(F+=e)},onCloseTag:e=>{let t=I(e.name);t===`t`||t===`v`?N=!1:t!==`rPh`&&t!==`phoneticPr`||P>0&&P--},onEnd:()=>{if(!M)return;let e=s(o.O(F));return M=!1,N=!1,P=0,F=``,e},onError:e=>{}},f)})(r,(e,t=!1)=>P(e,p,t)??null,W,_,0,(e,t)=>{let n=t?`${t} (${p})`:p;v.push([e,n])},0,w),s=await j.getTextStream(p,te);if(s)try{await C.parseStream(s,i,{xmlns:!1})}catch(e){throw console.warn(`Error parsing sheet: '${p}'`,e),Error(`Error parsing sheet: '${p}'`,{cause:e})}let c,u=N(p,l),d=new Map;if(u){let t;if(u.forEach((e,t)=>{e.type===`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`&&(c=P(t,p,!1,l)?.comments,c&&c.forEach(e=>{let t=e.v;d.set(t.id,e)}))}),u.forEach((e,n)=>{e.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`&&(t=P(n,p,!1,l))}),t||c){let n=c??[],i=t?.authors,o=t?.comments,s=o?o.length:0;if(o)for(let t=0;t<s;t++){let r=o[t];if(!r)continue;let s=r.v,c=i&&s.personId!==void 0?i[s.personId]:s.personId;if(c&&c.startsWith(`tc=`)&&(c=a.d(c.substring(3)),d.has(c)))continue;let l=R({displayName:c}),u={id:e.A.uuidV4(),personId:l.id,done:!1,asNote:!0,content:s.content};n.push({r:r.r,v:u})}r.comments=n}}})())}else if(f.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`){let e=a.a(p,i,O,D,z);if(e&&Object.keys(e).length!==0){let t=e,n=[];N(p,l)?.forEach(e=>{e.targetMode===`External`&&e.type&&e.target&&n.push({type:e.type,target:e.target})}),t.identity=n,y=t}else y=null}else y=c?a.l(p,i,(e,t)=>{let n=u.add({source:{buffer:e}});return n.addReference(h),S.add(n),d.toResourceId(n)},z):a.a(p,i,O,D,z);return y};a.c(`coreprops`,s,i,O,D),a.c(`extprops`,s,i,O,D);let F=new Map,I=new Map,ne=a.c(`people`,s,i,O,D),L=null;if(ne.size>0&&(L=ne.entries().next()?.value?.[1]?.persons,L)){let e=L.length;for(let t=0;t<e;t++){let e=L[t];F.set(e.id,e),e.displayName!==void 0&&I.set(e.displayName,e)}}let R=t=>{if(!t)return;if(t.id&&F.has(t.id))return F.get(t.id);let n=t.displayName;if(!t.id){if(n){let e=I.get(n);if(e)return e}t.id=e.A.uuidV4()}let r=F.get(t.id);if(r)return r;let i=t;return F.set(t.id,i),n&&I.set(n,i),L||=[],L.push(i),i},z={paramMap:w,getRefs:N,getRef:P,parsedRefs:k,addPerson:R,serializeElement:M},B=[];if(c){let e=await j.getTextStream(c,te);if(e){let t=(()=>{let e=!1,t=!1,n=0,r=``;return{onOpenTag:i=>{let a=we(i.name);a===`t`?e&&n===0&&(t=!0):a===`si`?(e=!0,r=``,n=0):a!==`rPh`&&a!==`phoneticPr`||n++},onText:e=>{t&&(r+=e)},onCloseTag:i=>{let a=we(i.name);a===`t`?t=!1:a===`si`?((e=>{B.push(e)})(o.O(r)),e=!1,r=``):a!==`rPh`&&a!==`phoneticPr`||n>0&&n--},onError:e=>{(e=>{v.push([e,c])})(`Error parsing shared strings: ${e?.message??e}`)}}})();try{await C.parseStream(e,t,{xmlns:!1})}catch(e){throw console.warn(`Error parsing shared strings: '${c}'`,e),Error(`Error parsing shared strings: '${c}'`,{cause:e})}}}_?.mark(`shared-strings`);let V=B.length,H=new Map,U=V,W=e=>{let t=H.get(e);if(t!==void 0)return t;let n=U;return H.set(e,U++),B.push(e),n},G=[];s.slicersCache=G;let K=j.getNames(),re=K.length;for(let e=0;e<re;e++){let t=K[e];t&&t.startsWith(`xl/slicerCache`)&&G.push(`/${t}`)}let ie=a.c(`slicersCache`,s,i,O,D,z),ae=new Map;ie.forEach(e=>{let t=e.name;delete e.name,ae.set(t,e)}),w.set(`slicerCaches`,ae),a.c(`richstructure`,s,i,O,D,z),a.c(`richdata`,s,i,O,D,z);let oe=a.c(`themes`,s,i,O,D,z),se=null;if(oe&&oe.entries){let e=oe.entries().next();e?.value?.[1]&&(se=e.value[1])}let q=new n.Ht(se),J=a.c(`styles`,s,i,O,D,z).entries().next()?.value?.[1];J&&=JSON.parse(e.F.JSONStableStringify(J));let ce=a.c(`workbooks`,s,i,O,D,z);_?.mark(`side-parts-json`),await Promise.all(A),b&&ee>0&&(b(x,x),await new Promise(e=>setTimeout(e,0))),_?.mark(`sheets`);let le={...ce.entries().next().value?.[1],styles:J,theme:q.toJSON()};if(B.length>0&&(le.strings=B),L&&L.length>0&&(le.people=L),f){let e=j.getEntry(`xl/vbaProject.bin`);if(e)try{let{VBAProject:t}=await Promise.resolve().then(()=>require("./DG-AY_xO8RKHtEBE.cjs")),n=t.extract(e);n?(f?.(n),le.vba=n):v.push([`Unable to parse VBA project.`,`xl/vbaProject.bin`])}catch(e){v.push([`Error extracting VBA: ${e?.message??e}`,`xl/vbaProject.bin`])}}let ue=null,de={...m,resources:u,json:le,formulaTransform:o.z(()=>ue?.getCalculation())};de.disableLoadAutoFit===void 0&&(de.disableLoadAutoFit=!1),_?.mark(`json-assembled`);let Y=new r.m(de);if(ue=Y,_?.mark(`workbook-constructed`),T.length>0){await Y.whenCalculationReady();let e=new Map,t=le.sheets??[],n=Y.getSheets().getItems();for(let r=0;r<t.length;r++){let i=t[r]?.sheet,a=n[r];i&&a&&e.set(i,a)}((e,t,n)=>{if(t.length===0)return;let r=e.getCalculation().getFunctions(),i=new Map,a=e=>{let t=i.get(e);return t===void 0&&(t=r.getByName(e)!==null,i.set(e,t)),t},o=new Map;for(let e of t){let t=o.get(e.sheet);t||(t=[],o.set(e.sheet,t)),t.push(e)}for(let[e,t]of o){let r=n.get(e);if(!r)continue;let i=(e,t)=>`${e},${t}`,o=new Set;for(let e of t)e.formula===null&&o.add(i(e.rowIndex,e.colIndex));for(let e of t){if(e.formula===null)continue;let t=ye(e.formula),n=!0;for(let e of t)if(!a(e)){n=!1;break}if(!n)continue;let s=[],c=[[e.rowIndex,e.colIndex]],l=new Set([i(e.rowIndex,e.colIndex)]);for(;c.length>0;){let[e,t]=c.pop(),n=[[e+1,t],[e-1,t],[e,t+1],[e,t-1]];for(let[e,t]of n){let n=i(e,t);!l.has(n)&&o.has(n)&&(l.add(n),s.push([e,t]),c.push([e,t]))}}for(let[e,t]of s)o.delete(i(e,t)),r.getRange({rowStart:e,colStart:t,rowEnd:e,colEnd:t}).clear();r.getRange({rowStart:e.rowIndex,colStart:e.colIndex,rowEnd:e.rowIndex,colEnd:e.colIndex}).setValue(`=`+e.formula)}}})(Y,T,e)}if(S.forEach(e=>{e.deleteReference(h)}),d.endPersist(),g){o.a(g);let e=new Map,t=0;for(let n of j.getNames()){let r=j.getEntry(n);if(!r)continue;let i=j.getRawEntry(n),a=i?{data:r,uncompressedSize:j.uncompressedSize(n),raw:{compressedData:i.data,compressionMethod:i.compressionMethod,signature:i.signature}}:{data:r,uncompressedSize:j.uncompressedSize(n)};e.set(n,a),t+=r.byteLength}if(t>67108864)v.push([`Source package too large to retain (${t} bytes, limit ${o.n}); unmodeled parts will be dropped on save.`,`SourcePackage`]);else if(e.size>0){let t=new o.R(e);o.v(g,t);let n=Y.getSheets().getItems(),r=Y.getTransactions().addListener({onCommitEnd:e=>{let n=e.getOperation()?.name;n!==`insertCells`&&n!==`deleteCells`||t.markStructuralChange()}}),i=Y.addListeners({onSheetsChange:()=>{let e=Y.getSheets().getItems();(e.length!==n.length||e.some((e,t)=>e!==n[t]))&&t.markStructuralChange(),n=e}});Y.addListeners({onClose:()=>{r(),i(),o.a(g)}})}}if(v.length&&y?.onWarning)for(let e of v){let[t,n]=e;y.onWarning(t,n)}return _&&!0===p&&console.table(_.toTable()),Y}catch(t){let n=`Unable to parse XLSX.`;throw t instanceof e.C&&(n=`Unable to open XLSX. There are too many rows or columns.`),Error(n,{cause:t})}finally{await j.close().catch(()=>{})}};
1
+ const e=require("./BnccBYHCCq9TGFx4.cjs"),t=require("./DDPxHIqx8aIbqTRE.cjs"),n=require("./Dmdcgm3pqGKmXPGb.cjs"),r=require("./CcBPECGj-X0W9a3_.cjs"),i=require("./CHMgm0vAbEBS1mVW.cjs"),a=require("./DP0yIsjVWme5C-UE.cjs"),o=require("./Bq7bgCz2WfVwfQSv.cjs");var s=new Uint8Array,c=class e{constructor(e,t,n){this.buffers=new Map,this.zip=e,this.entries=t,this.rawBuffer=n}static normalize(e){return e.startsWith(`/`)?e.slice(1):e}static async create(t){let n=t instanceof Blob?s:t instanceof Uint8Array?t:new Uint8Array(t),r=new o.L(t instanceof Blob?new o.u(t):new o.c(n)),i=new Map;for(let e of await r.getEntries())e.directory||i.set(e.filename,e);return new e(r,i,n)}getNames(){return[...this.entries.keys()]}has(t){return this.entries.has(e.normalize(t))}uncompressedSize(t){return this.entries.get(e.normalize(t))?.uncompressedSize??0}async getBuffer(t){let n=e.normalize(t),r=this.buffers.get(n);if(r)return r;let i=this.entries.get(n);if(!i)return null;let a=await i.getData(new o.m);return this.buffers.set(n,a),a}async prefetch(e){let t=[];for(let[n,r]of this.entries)!this.buffers.has(n)&&e(n,r)&&t.push(r.getData(new o.m).then(e=>{this.buffers.set(n,e)}));await Promise.all(t)}getEntry(t){return this.buffers.get(e.normalize(t))??null}async getTextStream(t,n){let r=this.entries.get(e.normalize(t));if(!r)return null;let i=new TransformStream;r.getData(i.writable).catch(()=>{});let a=i.readable.getReader(),o=new TextDecoder(`utf-8`);return new ReadableStream({async pull(e){let{value:t,done:r}=await a.read();if(r){let t=o.decode();t&&e.enqueue(t),e.close();return}n?.(t.byteLength);let i=o.decode(t,{stream:!0});i&&e.enqueue(i)}}).getReader()}getRawEntry(t){let n=this.entries.get(e.normalize(t));if(!n||n.encrypted)return null;let r=n.offset;if(r+30>this.rawBuffer.byteLength)return null;let i=new DataView(this.rawBuffer.buffer,this.rawBuffer.byteOffset+r,30);if(i.getUint32(0,!0)!==67324752)return null;let a=r+30+i.getUint16(26,!0)+i.getUint16(28,!0),o=a+n.compressedSize;return o>this.rawBuffer.byteLength?null:{data:this.rawBuffer.subarray(a,o),compressionMethod:n.compressionMethod,signature:n.signature}}async close(){await this.zip.close()}},l=class{constructor(e){this._sink=e,this._samples=[],this._t0=u(),this._tPrev=this._t0,this._heapPrev=d()}mark(e){let t=u(),n=d(),r={label:e,tMs:t-this._t0,dtMs:t-this._tPrev,heapBytes:n,dHeapBytes:n!==void 0&&this._heapPrev!==void 0?n-this._heapPrev:void 0,rssBytes:f()};this._tPrev=t,this._heapPrev=n,this._samples.push(r),this._sink?.(r)}samples(){return this._samples}toTable(){return this._samples.map(e=>({phase:e.label,tMs:Math.round(e.tMs),dtMs:Math.round(e.dtMs),heapMB:e.heapBytes===void 0?`—`:p(e.heapBytes/1048576),dHeapMB:e.dHeapBytes===void 0?`—`:p(e.dHeapBytes/1048576),rssMB:e.rssBytes===void 0?`—`:p(e.rssBytes/1048576)}))}},u=typeof performance==`object`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now();function d(){let e=typeof performance==`object`?performance.memory:void 0;if(e&&typeof e.usedJSHeapSize==`number`)return e.usedJSHeapSize;let t=globalThis.process;return typeof t==`object`&&typeof t.memoryUsage==`function`?t.memoryUsage().heapUsed:void 0}function f(){let e=globalThis.process;if(typeof e==`object`&&typeof e.memoryUsage==`function`)return e.memoryUsage().rss}function p(e){return Math.round(10*e)/10}var m=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,h=`-${m}.0-9·̀-ͯ‿-⁀`,g=(RegExp(`^[${m}]$`,`u`),RegExp(`^[${h}]$`,`u`),RegExp(`^[${m}][${h}]*$`,`u`)),_=(RegExp(`^[${h}]+$`,`u`),[32,10,13,9]);function v(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var y=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,b=`-${y}.0-9·̀-ͯ‿-⁀`;RegExp(`^[${y}]$`,`u`),RegExp(`^[${b}]$`,`u`),RegExp(`^[${y}][${b}]*$`,`u`),RegExp(`^[${b}]+$`,`u`);var x=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,ee=`-${x}.0-9·̀-ͯ‿-⁀`,S=(RegExp(`^[${x}]$`,`u`),RegExp(`^[${ee}]$`,`u`),RegExp(`^[${x}][${ee}]*$`,`u`));function te(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var C,w,T=function(e){return e===32||e===10||e===13||e===9},E=function(e){return e>=32&&e<=55295||e===10||e===13||e===9||e>=57344&&e<=65533||e>=65536&&e<=1114111},D=v,O=function(e){return v(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256},k=_,A=g,j=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},M=te,N=function(e){return te(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256},P=S,F=`http://www.w3.org/XML/1998/namespace`,I=`http://www.w3.org/2000/xmlns/`,ne={__proto__:null,xml:F,xmlns:I},L={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},R=-1,z=-2,B=13,V=33,H=10,U=60,W=61,G=62,K=63,re=93,ie=e=>e===34||e===39,ae=[34,39],oe=[...ae,91,G],se=[...ae,U,re],q=[W,K,...k],J=[...k,G,38,U];function ce(e,t,n){switch(t){case`xml`:n!==F&&e.fail(`xml prefix must be bound to ${F}.`);break;case`xmlns`:n!==I&&e.fail(`xmlns prefix must be bound to ${I}.`)}switch(n){case I:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI ${I}.`);break;case F:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}var le=e=>P.test(e),ue=e=>A.test(e),de={xmldecl:`xmlDeclHandler`,text:`textHandler`,processinginstruction:`piHandler`,doctype:`doctypeHandler`,comment:`commentHandler`,opentagstart:`openTagStartHandler`,attribute:`attributeHandler`,opentag:`openTagHandler`,closetag:`closeTagHandler`,cdata:`cdataHandler`,error:`errorHandler`,end:`endHandler`,ready:`readyHandler`},Y=class{get closed(){return this._closed}constructor(e){this.i=0,this.prevI=0,this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=M,this.nameCheck=N,this.isName=le,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...ne};let e=this.opt.additionalNamespaces;e!=null&&(function(e,t){for(let n of Object.keys(t))ce(e,n,t[n])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=D,this.nameCheck=O,this.isName=ue,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){this.openWakaBang=``,this.text=``,this.name=``,this.piTarget=``,this.entity=``,this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk=``,this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];let{fragmentOpt:e}=this;this.state=e?B:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:t}=this.opt;if(t===void 0){if(!0===this.opt.forceXMLVersion)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);t=`1.0`}this.setXMLVersion(t),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(L),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[de[e]]=t}off(e){this[de[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===13||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let e=this.chunk,t=this.i;if(this.prevI=t,this.i++,t>=e.length)return R;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=32||n===9)return n;switch(n){case H:return this.line++,this.column=0,this.positionAtNewLine=this.position,H;case 13:return e.charCodeAt(t+1)===H&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,z;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return R;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==8232||n===9)return n;switch(n){case H:return this.line++,this.column=0,this.positionAtNewLine=this.position,H;case 13:{let n=e.charCodeAt(t+1);n!==H&&n!==133||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,z;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===z?H:e}unGet(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===z,a=i?H:r;if(a===R||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case z:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=H;break;case R:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===R)return this.name+=e.slice(t),R;if(!O(n))return this.name+=e.slice(t,this.prevI),n===z?H:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===R||!T(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=E,this.getCode=this.getCode10):(this.isChar=j,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case U:if(this.state=15,this.text.length!==0)throw Error(`no-empty text at start`);break;case R:break;default:this.unGet(),this.state=B,this.xmlDeclPossible=!1}}sDoctype(){let e=this.captureTo(oe);switch(e){case G:this.doctypeHandler?.(this.text),this.text=``,this.state=B,this.doctype=!0;break;case R:break;default:this.text+=String.fromCodePoint(e),e===91?this.state=4:ie(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){let e=this.captureTo(se);e!==R&&(this.text+=String.fromCodePoint(e),e===re?this.state=2:e===U?this.state=6:ie(e)&&(this.state=5,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang=``;break;case K:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?8:4,this.openWakaBang=``)}sDTDComment(){this.captureToChar(45)&&(this.text+=`-`,this.state=9)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===45?10:8}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===G?this.state=4:(this.fail(`malformed comment.`),this.state=8)}sDTDPI(){this.captureToChar(K)&&(this.text+=`?`,this.state=12)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===G&&(this.state=4)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;t:for(;;)switch(this.getCode()){case z:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{let n,{entityReturnState:r}=this,i=this.entity+t.slice(e,this.prevI);this.state=r,i===``?(this.fail(`empty entity name.`),n=`&;`):(n=this.parseEntity(i),this.entity=``),r===B&&this.textHandler===void 0||(this.text+=n);break t}case R:this.entity+=t.slice(e);break t}}sOpenWaka(){let e=this.getCode();if(D(e))this.state=34,this.unGet(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case K:this.state=23;break;default:this.fail(`disallowed character in tag name`),this.state=B,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case`[CDATA[`:this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang=``;break;case`--`:this.state=17,this.openWakaBang=``;break;case`DOCTYPE`:this.state=2,(this.doctype||this.sawRoot)&&this.fail(`inappropriately located doctype declaration.`),this.openWakaBang=``;break;default:this.openWakaBang.length>=7&&this.fail(`incorrect syntax.`)}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){let e=this.getCodeNorm();e===45?(this.state=19,this.commentHandler?.(this.text),this.text=``):(this.text+=`-${String.fromCodePoint(e)}`,this.state=17)}sCommentEnded(){let e=this.getCodeNorm();e===G?this.state=B:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=17)}sCData(){this.captureToChar(re)&&(this.state=21)}sCDataEnding(){let e=this.getCodeNorm();e===re?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){let e=this.getCodeNorm();switch(e){case G:this.cdataHandler?.(this.text),this.text=``,this.state=B;break;case re:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(e)}`,this.state=20}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===K||T(e)?(this.fail(`processing instruction without a target.`),this.state=e===K?26:25):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===R)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===K;r||T(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?V:27):this.state=r?26:25:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===K?this.state=26:T(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(K)&&(this.state=26)}sPIEnding(){let e=this.getCodeNorm();if(e===G){let{piTarget:e}=this;e.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),this.piHandler?.({target:e,body:this.text}),this.piTarget=this.text=``,this.state=B}else e===K?this.text+=`?`:(this.text+=`?${String.fromCodePoint(e)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();e===K?this.state=V:e!==R&&(this.state=28,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(q);if(e===K)return this.state=V,this.name+=this.text,this.text=``,void this.fail(`XML declaration is incomplete.`);if(T(e)||e===W){if(this.name+=this.text,this.text=``,!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail(`did not expect any more name/value pairs.`);break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(`, `)}`)}this.state=e===W?30:29}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===K)return this.state=V,void this.fail(`XML declaration is incomplete.`);T(e)||(e!==W&&this.fail(`value required.`),this.state=30)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===K)return this.state=V,void this.fail(`XML declaration is incomplete.`);T(e)||(ie(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=32),this.state=31)}sXMLDeclValue(){let e=this.captureTo([this.q,K]);if(e===K)return this.state=V,this.text=``,void this.fail(`XML declaration is incomplete.`);if(e===R)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=32}sXMLDeclSeparator(){let e=this.getCodeNorm();e===K?this.state=V:(T(e)||(this.fail(`whitespace required.`),this.unGet()),this.state=27)}sXMLDeclEnding(){this.getCodeNorm()===G?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),this.xmlDeclHandler?.(this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=B):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){let e=this.captureNameChars();if(e===R)return;let t=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=t.ns=Object.create(null)),this.openTagStartHandler?.(t),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),e){case G:this.openTag();break;case 47:this.state=35;break;default:T(e)||this.fail(`disallowed character in tag name.`),this.state=36}}sOpenTagSlash(){this.getCode()===G?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=36)}sAttrib(){let e=this.skipSpaces();e!==R&&(D(e)?(this.unGet(),this.state=37):e===G?this.openTag():e===47?this.state=35:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===W?this.state=39:T(e)?this.state=38:e===G?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==R&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case R:return;case W:this.state=39;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===G?this.openTag():D(e)?(this.unGet(),this.state=37):(this.fail(`disallowed character in attribute name.`),this.state=36)}}sAttribValue(){let e=this.getCodeNorm();ie(e)?(this.q=e,this.state=40):T(e)||(this.fail(`unquoted attribute value.`),this.state=42,this.unGet())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=41;return;case 38:this.text+=t.slice(n,this.prevI),this.state=14,this.entityReturnState=40;return;case H:case z:case 9:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case U:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case R:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();T(e)?this.state=36:e===G?this.openTag():e===47?this.state=35:D(e)?(this.fail(`no whitespace between attributes.`),this.unGet(),this.state=37):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(J);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case U:this.fail(`disallowed character.`);break;case R:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===G?this.openTag():this.state=36}}sCloseTag(){let e=this.captureNameChars();e===G?this.closeTag():T(e)?this.state=44:e!==R&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case G:this.closeTag();break;case R:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;t:for(;;)switch(this.getCode()){case U:if(this.state=15,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=0;break t;case 38:this.state=14,this.entityReturnState=B,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=0;break t;case re:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw Error(`impossible state`)}break;case G:t===2&&this.fail(`the string "]]>" is disallowed in char data.`),t=0;break;case z:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case R:r!==void 0&&(this.text+=n.slice(e));break t;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;t:for(;;){let i=this.getCode();switch(i){case U:if(this.state=15,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break t;case 38:this.state=14,this.entityReturnState=B,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break t;case z:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case R:n!==void 0&&(this.text+=t.slice(e));break t;default:T(i)||(r=!0)}}r&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){let{prefix:n,local:r}=this.qName(e),i={name:e,prefix:n,local:r,value:t};if(this.attribList.push(i),this.attributeHandler?.(i),n===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[r]=e,ce(this,r,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,ce(this,``,e)}}pushAttribPlain(e,t){let n={name:e,value:t};this.attribList.push(n),this.attributeHandler?.(n)}end(){this.sawRoot||this.fail(`document must contain a root element.`);let{tags:e}=this;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}this.state!==0&&this.state!==B&&this.fail(`unexpected end.`);let{text:t}=this;return t.length!==0&&(this.textHandler?.(t),this.text=``),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(e){let t=this.topNS[e];if(t!==void 0)return t;let{tags:n}=this;for(let r=n.length-1;r>=0;r--)if(t=n[r].ns[e],t!==void 0)return t;return t=this.ns[e],t===void 0?this.opt.resolvePrefix?.(e):t}qName(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qName(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let e,i,{name:a,prefix:o,local:s}=t;o===``?(e=a===`xmlns`?I:``,i=a):(e=this.resolve(o),e===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`),e=o),i=`{${e}}${s}`),r.has(i)&&this.fail(`duplicate attribute: ${i}.`),r.add(i),t.uri=e,n[a]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!1,this.openTagHandler?.(t),e.push(t),this.state=B,this.name=``}openSelfClosingTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!0,this.openTagHandler?.(t),this.closeTagHandler?.(t),(this.tag=e[e.length-1]??null)===null&&(this.closedRoot=!0),this.state=B,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=B,this.name=``,t===``)return this.fail(`weird empty close tag.`),void(this.text+=`</>`);let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag: ${t}.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}};(w=C||={}).Events={XmlDecl:`xmldecl`,Text:`text`,ProcessingInstruction:`processinginstruction`,Doctype:`doctype`,Comment:`comment`,OpenTagStart:`opentagstart`,Attribute:`attribute`,OpenTag:`opentag`,CloseTag:`closetag`,CDdata:`cdata`,Error:`error`,End:`end`,Ready:`ready`},w.parseStream=async(e,t,n)=>{let r,i=new Y({position:!1,...n});t.onOpenTagStart&&i.on(C.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&i.on(C.Events.OpenTag,t.onOpenTag),t.onCloseTag&&i.on(C.Events.CloseTag,t.onCloseTag),t.onAttribute&&i.on(C.Events.Attribute,t.onAttribute),t.onText&&i.on(C.Events.Text,t.onText),t.onError&&i.on(C.Events.Error,t.onError);let a=t.onEnd;for(a&&i.on(C.Events.End,()=>{r=a()});;){let{value:t,done:n}=await e.read();if(n)break;i.write(t)}return i.close(),r};var X=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,Z=e=>{let t=parseInt(e);return isNaN(t)?null:t},Q=e=>{let t=parseFloat(e);return isNaN(t)?null:t},$=null,fe=class{constructor(){this._registeredVisitors=new Map}registerVisitor(e){this._registeredVisitors.set(e.from,e)}createEventHandler(e,t,n){let r=this._registeredVisitors,i=[],a=[],o=null,s=null,c=null,l=null,u=[],d={key:null,source:e,parent:null},f=null,p=!1,m=(e,t)=>{let n=c.attributes[e];if(t){if(Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(n==null||(n=t[r](n),n==null))return}else if(n==null||(n=t(n),n==null))return}return n},h={getSource:()=>f?.source??null,setSource:e=>{f.source=e},setKey:e=>{f.key=e},getFrom:()=>c,getAttribute:(e,t)=>m(e,t)??null,hasAttribute:e=>h.getAttribute(e)!==null,getParent:()=>{let e=u[u.length-2];return e.parent??e.source},getPath:()=>{let e=[],t=a.length;for(let n=0;n<t;n++)e.push(a[n].local);return e.join(`\\`)},parseAttribute:m,copyToObject:(e,t,n,r)=>{let i=m(r??t,n);i!==void 0&&(e[t]=i)},copyTo:(e,t,n)=>{let r=m(n??e,t);r!==void 0&&(f.source[e]=r)},warn:e=>{n?n?.(e):console.warn(e)}};return{onOpenTag:e=>{let t=e.name,n=t.indexOf(`:`);n!==-1&&(t=t.slice(n+1));let m=(i.length>0?i[i.length-1]:r).get(t);if(o={local:t,visitor:m,tag:e,destination:null},p)return a.push(o),s=t,void(c=e);l=o?.visitor??null,s=t,c=e;let g=!!m&&m.to===null;if(m&&!g&&m.scope){let e=m.scope(h);e===null?g=!0:e&&(i.push(e),o.pushedScope=!0)}m&&(a.length===0?(f=d,o.destination=f,o.pushedDestination=!0,u.push(f)):g?(f=null,o.destination=null):m.transparent?o.destination=f:(f={key:null,source:{},parent:null},o.destination=f,o.pushedDestination=!0,u.push(f))),a.push(o),p=g;let _=l?.openTag?.(h);_!==void 0&&(f.parent=_)},onCloseTag:e=>{let t=e.name,r=t.indexOf(`:`);if(r!==-1&&(t=t.slice(r+1)),t!==s)throw Error(`mismatch open/close tag: '${t}'/'${s}'`);p||l?.closeTag?.(h);let m=a.pop()??null;o=a[a.length-1]??null,m?.pushedScope&&i.pop();let g=m?.destination;if(g&&m.pushedDestination){u.pop(),f=u[u.length-1]??d;let e=m.visitor;e&&e.to&&g.source!==void 0&&(Array.isArray(e.to)?f.source.push?f.source.push(g.source):n?.(`Unable to parse array for ${e.from} at ${h.getPath()}`):g.key?f.source[g.key]=g.source:typeof e.to==`string`&&(f.source[e.to]=g.source))}s=o?.local??null,c=o?.tag??null,l=o?.visitor??null,p=!o?.destination},onText:e=>{l?.text?.(e,h)},onEnd:t}}},pe=`IFERROR(${o.h}(`,me=pe.toUpperCase(),he=o.x.toUpperCase(),ge={kind:`none`},_e={kind:`spilled`},ve=(e,t)=>{if(e.charCodeAt(t)!==34)return null;let n=``,r=t+1;for(;r<e.length;)if(e.charCodeAt(r)===34){if(e.charCodeAt(r+1)!==34)return{value:n,end:r+1};n+=`"`,r+=2}else n+=e[r],r++;return null},ye=e=>{let t=[],n=0;for(;n<e.length;){let r=e.charCodeAt(n);if(r===34){let t=ve(e,n);if(t===null)break;n=t.end;continue}if(!(r>=65&&r<=90||r>=97&&r<=122||r===95)){n++;continue}let i=n+1;for(;i<e.length;){let t=e.charCodeAt(i);if(!(t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===95||t===46))break;i++}e.charCodeAt(i)===40&&t.push(e.slice(n,i).toUpperCase().replace(/^_XLFN\./,``).replace(/^_XLWS\./,``)),n=i}return t},be=e=>{let t=0,n=0;for(let r=0;r<e.length;r++){let i=e[r];if(i!==`"`&&i!==`'`){if(i===`[`)n++;else if(i===`]`)n>0&&n--;else if(n===0){if(i===`(`)t++;else if(i===`)`&&(t--,t<0))return!1}}else{for(r++;r<e.length;){if(e[r]===i){if(e[r+1]===i){r+=2;continue}break}r++}if(r>=e.length)return!1}}return t===0&&n===0},xe=class{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}},Se=(e,t,n)=>{if(e[0].value[0]===e[1].value[0])return t},Ce={colStart:0,colEnd:0,rowStart:0,rowEnd:0},we=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},Te={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.macroEnabled.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.binary.macroEnabled.main":`workbooks`,"application/vnd.ms-excel.addin.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":`sheets`,"application/vnd.ms-excel.worksheet":`sheets`,"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":`charts`,"application/vnd.ms-excel.chartsheet":`charts`,"application/vnd.ms-excel.macrosheet+xml":`macros`,"application/vnd.ms-excel.macrosheet":`macros`,"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":`dialogs`,"application/vnd.ms-excel.dialogsheet":`dialogs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":`strs`,"application/vnd.ms-excel.sharedStrings":`strs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":`styles`,"application/vnd.ms-excel.styles":`styles`,"application/vnd.openxmlformats-package.core-properties+xml":`coreprops`,"application/vnd.openxmlformats-officedocument.custom-properties+xml":`custprops`,"application/vnd.openxmlformats-officedocument.extended-properties+xml":`extprops`,"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":`comments`,"application/vnd.ms-excel.comments":`comments`,"application/vnd.ms-excel.threadedcomments+xml":`threadedcomments`,"application/vnd.ms-excel.person+xml":`people`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":`metadata`,"application/vnd.ms-excel.sheetMetadata":`metadata`,"application/vnd.ms-excel.externalLink":`links`,"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":`links`,"application/vnd.openxmlformats-officedocument.theme+xml":`themes`},Ee=e=>e.startsWith(`/`)?e.slice(1):e,De=/^xl\/(worksheets|chartsheets)\/[^/]+\.xml$/i;exports.readXLSX=async(s,u)=>{let{password:d,onVBA:f,profile:p,createWorkbookOptions:m={},...h}=u??{},g=m.origin&&typeof m.origin!=`string`?m.origin:null,_=p?new l(typeof p==`function`?p:void 0):null,v=[],y=u?.progress,b=y?.onProgress?y.onProgress.bind(y):void 0,x=s.byteLength,ee=0,S=0,te=b?e=>{if(ee<=0)return;S+=e;let t=Math.min(x,Math.round(S/ee*x));b(t,x)}:void 0,w=Promise.resolve().then(()=>require("./D9OGD2b5RCuNVkVt.cjs")),T=null;try{T=new DOMParser}catch{}let E=null;try{E=new XMLSerializer}catch{}let D,O,k,A=null;T||(A=Promise.resolve().then(()=>require("./DLYEQZzAGuSAmJsp.cjs")).then(e=>i.t(e.default,1)));try{let[e,t]=await Promise.all([A,w]);D=new t.DOMTransformer,O=T??new e.DOMParser,k=E??new e.XMLSerializer}catch(e){throw Error(`Unable to load XLSX parser.`,{cause:e})}let j,M=e=>k.serializeToString(e);try{j=await c.create(s)}catch(t){throw new e.s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`,{cause:t})}_?.mark(`zip-open`);try{if(!j.has(`[Content_Types].xml`))throw new e.s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let i=e=>{let t=j.getEntry(e);return t?{content:t}:void 0},s={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],metadata:[],people:[],sst:``,style:``,defaults:{}};{let e=(e=>({onOpenTag:t=>{let n=(e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)})(t.name),r=t.attributes;if(n===`Override`){let t=r.ContentType,n=r.PartName;if(!t||!n)return;let i=Te[t],a=i?e[i]:void 0;Array.isArray(a)&&a.push(n)}else if(n===`Default`){let t=r.Extension,n=r.ContentType;t&&(e.defaults[t.toLowerCase()]=n)}},onEnd:()=>{e.sst=e.strs.length>0?e.strs[0]:``,e.style=e.styles.length>0?e.styles[0]:``},onError:e=>{(e=>{v.push([e,`[Content_Types].xml`])})(`Error parsing content types: ${e?.message??e}`)}}))(s),t=await j.getTextStream(`[Content_Types].xml`);if(!t)throw Error(`Error parsing content types: '[Content_Types].xml'`);try{await C.parseStream(t,e,{xmlns:!1})}catch(e){throw Error(`Error parsing content types: '[Content_Types].xml'`,{cause:e})}g&&await j.getBuffer(`[Content_Types].xml`)}_?.mark(`content-types`);let c=s.sst,l=new Set;for(let e of s.sheets)l.add(Ee(e));c&&l.add(Ee(c));for(let e of l)ee+=j.uncompressedSize(e);if(await j.prefetch(e=>!l.has(e)&&!De.test(e)),_?.mark(`prefetch-side-parts`),s.workbooks.length===0){let e=a.n(`_rels/.rels`,i,O,D);if(e){for(let t of e.values())if(t.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`&&t.target){s.workbooks.push(t.target);break}}}if(s.workbooks.length===0)throw new e.s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);s.richstructure=[`/xl/richData/rdrichvaluestructure.xml`],s.richdata=[`/xl/richData/rdrichvalue.xml`];let u=m?.resources??new n.Rt,d=u.beginPersist(),h={},S=new Set,w=new Map;w.set(`richTypes`,[]);let T=[];w.set(`dummyWrapped`,T);let E=a.c(`metadata`,s,i,O,D).entries().next()?.value?.[1]?.metadata;E&&w.set(`metadata`,E);let k=new Map,A=[],N=(e,t=k)=>{let n=e.lastIndexOf(`/`),r=e.substring(0,n+1)+`_rels/`+e.substring(n+1,e.length)+`.rels`,o=t.get(r);return o||(o=a.n(r,i,O,D,z),t.set(r,o)),o},P=(r,s,c,l=k)=>{let f=N(s,l).get(r),p=f?.target;if(!p)return null;if(f.targetMode===`External`){if(!c)return f.target;let e=u.add({source:{external:f.target}});return e.addReference(h),S.add(e),d.toResourceId(e)}let m=s.lastIndexOf(`/`),g=s.substring(0,m+1);p.startsWith(`/`)||(p=g+p),p=a.u(p);let _=D?.getVisitorParamsState().get(`dxfs`),y=l.get(p);if(!y)if(f.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`){let r={};y=r,A.push((async()=>{let i=((r,i,s,c,l,u,d,f)=>{let p=new fe,m=new n.Ct.TransposedBuilder,h=null;p.registerVisitor({from:`autoFilter`,to:`autoTable`,openTag:e=>{let t=e.getAttribute(`ref`),r=n.D.fastStringToRange(t);e.getSource().r=r,e.getSource().v={}},closeTag:e=>{let t=e.getSource(),n=t.v,r=n.hiddenButtons;if(Array.isArray(r)){let e=r.length,i=t.r,a=i.colEnd-i.colStart+1;e===0?n.hiddenButtons=!1:e===a&&(n.hiddenButtons=!0)}}}),p.registerVisitor({from:`conditionalFormatting`,to:{},openTag:e=>{let t=e.getParent();t.conditionals||=[];let n=e.getAttribute(`sqref`);n&&=n.trim().split(/\s+/).join(`,`);let r={r:n,conditionals:t.conditionals},i=e.getAttribute(`pivot`,X);i!==null&&(r.pivot=i),e.setSource(r)}}),p.registerVisitor({from:`cfRule`,to:{},openTag:e=>{let t=e.getParent();if(!t?.r)return;let n=e.getSource()??{};t.pivot!==void 0&&(n.pivot=t.pivot),t.conditionals.push({r:t.r,v:null,rule:n}),e.copyToObject(n,`type`,$),e.copyToObject(n,`priority`,Z),e.copyToObject(n,`stopIfTrue`,X);let r=e.getAttribute(`dxfId`,Z);if(r!==null){let t=c?.get(r);t||=(u?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${e.getPath()}'.`),{}),n.style=t}e.copyToObject(n,`aboveAverage`,X),e.copyToObject(n,`equalAverage`,X),e.copyToObject(n,`stdDev`,Z),e.copyToObject(n,`bottom`,X),e.copyToObject(n,`percent`,X),e.copyToObject(n,`rank`,Z),e.copyToObject(n,`operator`,$),e.copyToObject(n,`text`,$),e.copyToObject(n,`timePeriod`,$)},closeTag:e=>{let t=e.getParent();if(!t?.r)return;let n=t.conditionals[t.conditionals.length-1],r=n?.rule;if(!r)return;let i={},a=o.i(r,u);a&&(i.condition=a),r.style&&(i.style=r.style),r.scale&&(i.scale=r.scale),r.stopIfTrue&&(i.stopIfTrue=!0),r.pivot&&(i.pivot=!0),n.v=i,n.priority=r.priority,r.x14Id&&(n.x14Id=r.x14Id),delete n.rule}});let g=e=>{let t=e.conditions??[],n=[];for(let e=0;e<t.length;e++){let r=t[e],i={};r.type&&(i.type=r.type),r.value!==void 0&&(i.value=r.value),r.exclusive&&(i.exclusive=!0),n.push(i)}return n};p.registerVisitor({from:`colorScale`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),r=t.colors??[],i=g(t);for(let e=0;e<i.length;e++)i[e].color=r[e];e.getParent().scale={type:n.Jt.ScaleType.ColorScale,stops:i}}}),p.registerVisitor({from:`dataBar`,to:{},openTag:e=>{e.copyTo(`maxLength`,Z),e.copyTo(`minLength`,Z),e.copyTo(`showValue`,X)},closeTag:e=>{let t=e.getSource(),r={type:n.Jt.ScaleType.DataBar,stops:g(t)},i=t.colors?.[0];i&&(r.color=i),t.minLength!==void 0&&(r.minLength=t.minLength),t.maxLength!==void 0&&(r.maxLength=t.maxLength),t.showValue!==void 0&&(r.showValue=t.showValue),e.getParent().scale=r}}),p.registerVisitor({from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`reverse`,X),e.copyTo(`showValue`,X)},closeTag:e=>{let t=e.getSource(),r={type:n.Jt.ScaleType.IconSet,stops:g(t)};t.iconSet!==void 0&&(r.iconSet=t.iconSet),t.reverse!==void 0&&(r.reverse=t.reverse),t.showValue!==void 0&&(r.showValue=t.showValue),e.getParent().scale=r}}),p.registerVisitor({from:`formula`,to:{},text:(e,t)=>{let n=t.getParent(),r=n.formulas;r||(r=[],n.formulas=r),r.push(e)}}),p.registerVisitor({from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let r=e.getSource();t.conditions.push(r),e.copyTo(`type`,$),r.type===n.Jt.ColorStopType.Formula?e.copyTo(`value`,$,`val`):e.copyTo(`value`,Q,`val`),!1===e.getAttribute(`gte`,X)&&(r.exclusive=!0)}}),p.registerVisitor({from:`color`,to:{},openTag:e=>{let t=e.getParent();t.colors||=[];let n=a.o(t=>e.getAttribute(t));t.colors.push(n)}}),p.registerVisitor({from:`filterColumn`,to:{},openTag:e=>{let t=e.getParent().v,n=parseInt(e.getAttribute(`colId`)),r=e.getSource();r.index=n;let i=t.filter;i||(i={conditions:[]},t.filter=i);let a=i.conditions;if(a||(a=[],i.conditions=a),a.push(r),e.getAttribute(`hiddenButton`,X)&&t){let e=t.hiddenButtons;e||(e=[],t.hiddenButtons=e),e.push(n)}if(e.getAttribute(`showButton`,X)&&t){let e=t.showButtons;e||(e=[],t.showButtons=e),e.push(n)}return r}}),p.registerVisitor({from:`colorFilter`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.I.BuiltInOperatorNames.Color,t.param=r,e.copyToObject(r,`cellColor`),e.copyToObject(r,`styleId`,Z,`dxfId`)}}),p.registerVisitor({from:`iconFilter`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.I.BuiltInOperatorNames.Icon,t.param=r,e.copyToObject(r,`iconId`,Z),e.copyToObject(r,`iconSet`,$)}}),p.registerVisitor({from:`top10`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.I.BuiltInOperatorNames.TopN,t.param=r,e.copyToObject(r,`filterVal`,Q),e.copyToObject(r,`percent`,X),e.copyToObject(r,`top`,X),e.copyToObject(r,`limit`,Q,`val`)}}),p.registerVisitor({from:`dynamicFilter`,openTag:e=>{let t=e.getParent(),r={};t.operator=n.I.BuiltInOperatorNames.TimePeriod,t.param=r;let i=e.getAttribute(`type`);Object.values(n.I.AverageType).includes(i)?(t.operator=n.I.BuiltInOperatorNames.Average,e.copyToObject(r,`stdDevs`,Z,`val`)):e.copyToObject(r,`anchorDate`,Z,`val`),e.copyToObject(r,`operator`,$,`type`),e.copyToObject(r,`maxVal`,Q,`maxVal`)}}),p.registerVisitor({from:`filters`,to:{},openTag:e=>{let t=e.getParent(),r={};return t.operator=n.I.BuiltInOperatorNames.InSet,t.param=r,e.copyToObject(r,`blank`,X),e.copyToObject(r,`calendarType`,$),r}}),p.registerVisitor({from:`filter`,openTag:e=>{let t=e.getParent(),n=t.items;n||(n=[],t.items=n),n.push(e.getAttribute(`val`,$))}}),p.registerVisitor({from:`dateGroupItem`,to:{},openTag:e=>{let t=e.getParent(),n=t.dateGroups;n||(n=[],t.dateGroups=n),n.push(e.getSource()),e.copyTo(`group`,$,`dateTimeGrouping`),e.copyTo(`day`,Z),e.copyTo(`hour`,Z),e.copyTo(`minute`,Z),e.copyTo(`month`,Z),e.copyTo(`second`,Z),e.copyTo(`year`,Z)}}),p.registerVisitor({from:`customFilters`,openTag:e=>{let t=e.getParent(),r=e.getAttribute(`and`),i=r===`and`||r===`1`;e.getAttribute(`val`);let a=[];return t.operator=i?n.I.BuiltInOperatorNames.And:n.I.BuiltInOperatorNames.Or,t.param={conditions:a},e.setSource(t),a},closeTag:e=>{e.getSource().param.conditions.length}}),p.registerVisitor({from:`customFilter`,openTag:e=>{let t,n=e.getParent();Array.isArray(n)?(t={},n.push(t)):t=n,e.copyToObject(t,`operator`),e.copyToObject(t,`param`,$,`val`)}}),p.registerVisitor({from:`sortState`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;n&&(n.sort={},e.setSource(t))}}),p.registerVisitor({from:`sortCondition`,to:{},openTag:e=>{let t=e.getParent(),r=t.v;if(!r)return;let i=r.sort;if(!i)return;let a=i.sorts;a||(a=[],i.sorts=a);let o=e.getAttribute(`ref`),s=0;if(o){let e=n.D.fastStringToRange(o,Ce).colStart,r=t.r,i=r.colStart;s=r?e-i:e}let c={};e.copyToObject(c,`sortOn`,$,`sortBy`),e.copyToObject(c,`dxfId`,$,`sortBy`),e.copyToObject(c,`iconSet`,$),e.copyToObject(c,`customList`,$),c.reverse=e.getAttribute(`descending`,X)??!1;let l={index:s,criteria:c};a.push(l)}}),p.registerVisitor({from:`AlternateContent`,to:null});let _=e=>{h=e.getSource(),e.copyTo(`topLeft`,$,`topLeftCell`);let t=a.p(e.getAttribute(`defaultGridColor`)),n=e.getAttribute(`colorId`);n===null||t||(e.getSource().gridLineColor=`index`+parseFloat(n)),e.copyTo(`showZeros`,X),e.copyTo(`showFormulas`,X),e.copyTo(`zoomScale`,Z),e.copyTo(`showRowHeaders`,X,`showRowColHeaders`),e.copyTo(`showColumnHeaders`,X,`showRowColHeaders`),e.copyTo(`showRowGridlines`,X,`showGridLines`),e.copyTo(`showColumnGridlines`,X,`showGridLines`),e.copyTo(`rightToLeft`,X)};p.registerVisitor({from:`sheetView`,to:`view`,openTag:e=>{_(e)},closeTag:()=>{h=null}}),p.registerVisitor({from:`customSheetViews`,to:`customSheetViews`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`customSheetView`,to:[],openTag:e=>{_(e)},closeTag:()=>{h=null}}),p.registerVisitor({from:`selection`,to:`selection`,openTag:e=>{if(!h)return;e.copyTo(`cell`,$,`activeCell`),e.copyTo(`rangeIndex`,Z,`activeCellId`);let t=e.getAttribute(`activeCell`),n=e.getAttribute(`sqref`);n&&n!==t&&(e.getSource().ranges=n.trim().split(/\s+/))}}),p.registerVisitor({from:`pane`,to:null,openTag:e=>{if(h&&e.getAttribute(`state`)===`frozen`){let t={};h.freezePanes=t,e.copyToObject(t,`topLeft`,$,`topLeftCell`);let r=(h.topLeft?n.D.fastStringToCell(h.topLeft):void 0)??{colIndex:0,rowIndex:0},i={colIndex:0,rowIndex:0};e.copyToObject(i,`colIndex`,Z,`xSplit`),e.copyToObject(i,`rowIndex`,Z,`ySplit`);let a={colIndex:r.colIndex+i.colIndex,rowIndex:r.rowIndex+i.rowIndex};t.coords=n.D.cellToString(a)}}}),p.registerVisitor({from:`tabColor`,to:null,openTag:e=>{let t=a.o(t=>e.getAttribute(t));t&&(r.tabColor=t)}}),p.registerVisitor({from:`pageSetUpPr`,to:`pageSetUpPr`,openTag:e=>{}}),p.registerVisitor({from:`outlinePr`,to:`outlinePr`,openTag:e=>{}}),p.registerVisitor({from:`pageMargins`,to:`pageMargins`,openTag:e=>{e.copyTo(`bottom`,Q),e.copyTo(`footer`,Q),e.copyTo(`header`,Q),e.copyTo(`left`,Q),e.copyTo(`right`,Q),e.copyTo(`top`,Q),e.copyTo(`bottom`,Q)}}),p.registerVisitor({from:`pageSetup`,to:`pageSetup`,openTag:e=>{e.copyTo(`blackAndWhite`,X),e.copyTo(`cellComments`),e.copyTo(`copies`,Z),e.copyTo(`draft`,X),e.copyTo(`errors`),e.copyTo(`firstPageNumber`,Z),e.copyTo(`fitToHeight`,Z),e.copyTo(`fitToWidth`,Z),e.copyTo(`horizontalDpi`,Z),e.copyTo(`orientation`),e.copyTo(`pageOrder`),e.copyTo(`paperSize`,Z),e.copyTo(`scale`,Z),e.copyTo(`useFirstPageNumber`,X),e.copyTo(`usePrinterDefaults`,X),e.copyTo(`verticalDpi`,Z)}}),p.registerVisitor({from:`printOptions`,to:`printOptions`,openTag:e=>{e.copyTo(`gridLines`,X),e.copyTo(`gridLinesSet`,X),e.copyTo(`headings`,X),e.copyTo(`horizontalCentered`,X),e.copyTo(`verticalCentered`,X)}}),p.registerVisitor({from:`headerFoot`,to:`headerFoot`,openTag:e=>{}}),p.registerVisitor({from:`mergeCells`,to:`merges`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`dataValidations`,to:`validations`,openTag:e=>{e.setSource([])}});let v={from:`dataValidation`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n,rule:{type:e.getAttribute(`type`)??void 0,operator:e.getAttribute(`operator`)??void 0}};!0===e.getAttribute(`showDropDown`,X)&&(n.hideDropdown=!0),e.copyToObject(n,`alert`,$,`error`),e.copyToObject(n,`alertTitle`,$,`errorTitle`),e.copyToObject(n,`showAlertMessage`,X,`showErrorMessage`),n.alertStyle=e.getAttribute(`errorStyle`)??`stop`,e.copyToObject(n,`imeMode`),e.copyToObject(n,`prompt`),e.copyToObject(n,`promptTitle`),e.copyToObject(n,`showPromptMessage`,X,`showInputMessage`),e.setSource(r)},closeTag:e=>{let t=e.getSource();if(!t?.rule)return;let n=o.r(t.rule,u);n&&(e.getAttribute(`allowBlank`,X)&&(n.includeBlanks=!0),t.v.condition=n),delete t.rule}};p.registerVisitor(v),p.registerVisitor({from:`formula1`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula1=o.S(e,n.type))}}),p.registerVisitor({from:`formula2`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula2=o.S(e,n.type))}}),p.registerVisitor({from:`picture`,to:`picture`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void console.warn(`no rId found for picture`,e.getPath());let n=i(t,!0);e.getSource().resId=n}});let y={from:`slicer`,to:{},openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void console.warn(`no rId found for picture`,e.getPath());let n=i(t)?.slicers,r=e.getParent();r.slicers||={};let a=Object.keys(n);for(let e of a)r.slicers[e]=n[e]}};p.registerVisitor(y);let b=(e,t)=>({from:e,to:{},openTag:e=>{e.setSource(``)},text:(e,t)=>{t.setSource((t.getSource()??``)+e)},closeTag:e=>{t(String(e.getSource()??``),e)}}),x=new Map;x.set(`dataValidations`,{from:`dataValidations`,to:`validations`,openTag:e=>{let t=e.getParent();e.setSource(t.validations??[])},closeTag:e=>{(e.getSource()?.length??0)===0&&e.setSource(void 0)}}),x.set(`dataValidation`,{...v,closeTag:e=>{v.closeTag(e);let t=e.getSource();t&&!t.r&&(e.warn(`x14 dataValidation with no xm:sqref was dropped.`),e.setSource(void 0))}});let ee=e=>({from:e,to:{},openTag:t=>{t.setSource({rule:t.getParent()?.rule,key:e})}});x.set(`formula1`,ee(`formula1`)),x.set(`formula2`,ee(`formula2`)),x.set(`f`,b(`f`,(e,t)=>{let n=t.getParent(),r=n?.rule;r&&(r[n.key]=o.S(e,r.type))})),x.set(`sqref`,b(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.r=r.split(/\s+/).join(`,`))}));let S=new Map,te=[],C=new Map;C.set(`conditionalFormattings`,{from:`conditionalFormattings`,transparent:!0}),C.set(`conditionalFormatting`,{from:`conditionalFormatting`,to:{},openTag:e=>{e.setSource({rules:[]})},closeTag:e=>{let t=e.getSource(),n=t?.rules??[];for(let e=0;e<n.length;e++){let r=n[e];r.sqref=t.sqref,r.id?S.set(r.id,r):te.push(r)}}}),C.set(`cfRule`,{from:`cfRule`,to:{},openTag:e=>{e.copyTo(`id`,$),e.copyTo(`type`,$),e.copyTo(`priority`,Z)},closeTag:e=>{let t=e.getSource();t&&e.getParent()?.rules?.push(t)}}),C.set(`sqref`,b(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.sqref=r)})),C.set(`dataBar`,{from:`dataBar`,to:{},openTag:e=>{e.copyTo(`minLength`,Z),e.copyTo(`maxLength`,Z),e.copyTo(`gradient`,X),e.copyTo(`border`,X),e.copyTo(`direction`,$),e.copyTo(`axisPosition`,$),e.copyTo(`negativeBarColorSameAsPositive`,X),e.copyTo(`negativeBarBorderColorSameAsPositive`,X)},closeTag:e=>{e.getParent().dataBar=e.getSource()}}),C.set(`iconSet`,{from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`custom`,X),e.copyTo(`reverse`,X),e.copyTo(`showValue`,X)},closeTag:e=>{e.getParent().iconSet=e.getSource()}}),C.set(`cfvo`,{from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();t.conditions.push(n),e.copyTo(`type`,$),!1===e.getAttribute(`gte`,X)&&(n.exclusive=!0)}}),C.set(`f`,b(`f`,(e,t)=>{let n=t.getParent();if(!n)return;let r=e.trim(),i=Number(r);n.value=r.length>0&&Number.isFinite(i)?i:e}));let w=e=>({from:e,to:{},openTag:t=>{let n=a.o(e=>t.getAttribute(e));n&&(t.getParent()[e]=n)}});C.set(`borderColor`,w(`borderColor`)),C.set(`negativeFillColor`,w(`negativeFillColor`)),C.set(`negativeBorderColor`,w(`negativeBorderColor`)),C.set(`axisColor`,w(`axisColor`)),C.set(`cfIcon`,{from:`cfIcon`,to:{},openTag:e=>{let t=e.getAttribute(`iconSet`),n=e.getAttribute(`iconId`,Z);if(t===null||n===null)return;let r=e.getParent();r.icons||=[],r.icons.push({set:t,id:n})}});let T=new Map;T.set(`id`,b(`id`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.x14Id=r)}));let E=new Map;E.set(`slicerList`,{from:`slicerList`,transparent:!0}),E.set(`slicer`,y);let D=new Map([[o.t(o.s),x],[o.t(o.p),C],[o.t(o.H),C],[o.t(o.f),T],[o.t(o.M),E],[o.t(o.j),E]]),O=new Set;p.registerVisitor({from:`extLst`,transparent:!0}),p.registerVisitor({from:`ext`,transparent:!0,scope:e=>{let t=e.getAttribute(`uri`),n=o.t(t),r=D.get(n);if(r)return r;if(!o.b.has(n)&&!O.has(n)){O.add(n);let r=o.N[n];e.warn(r?`Extension content '${r}' (${t}) is not read; it will be lost on resave.`:`Unknown extension content (uri ${t}) is not read; it will be lost on resave.`)}return null}}),p.registerVisitor({from:`mergeCell`,to:[],openTag:e=>{let t=e.getAttribute(`ref`);e.setSource(t)}}),p.registerVisitor({from:`hyperlinks`,to:`hyperlinks`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`hyperlink`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`),n=e.getAttribute(`ref`);if(!n)return void console.warn(`No ref found for hyperlink`);e.setKey(n);let r=t?i(t):``;if(typeof r!=`string`)return void console.warn(`Invalid address `,r);r.endsWith(`\\`)&&(r=r.substring(0,r.length-1));let a=e.getAttribute(`location`);if(a&&(r+=`#`+a),!r)return void console.warn(`No address found for hyperlink. r:id`,t);let o,s=e.getAttribute(`tooltip`);o=s?{address:r,screenTip:s}:r,e.setSource({r:n,v:o})}}),p.registerVisitor({from:`drawing`,to:`movables`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=i(t);n?e.setSource(n.movables):console.warn(`no drawing found for rId`,t)}}),p.registerVisitor({from:`tableParts`,to:`tables`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`tablePart`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=i(t);n?e.setSource(n):console.warn(`no table found for rId`,t)}});let k=(e,t)=>{t.conditions?.length&&(e.stops=g(t)),t.minLength!==void 0&&(e.minLength=t.minLength),t.maxLength!==void 0&&(e.maxLength=t.maxLength),(t.gradient??1)&&(e.gradient=!0),t.border&&t.borderColor&&(e.borderColor=t.borderColor),!t.negativeBarColorSameAsPositive&&t.negativeFillColor&&(e.negativeFillColor=t.negativeFillColor),!(t.negativeBarBorderColorSameAsPositive??1)&&t.negativeBorderColor&&(e.negativeBorderColor=t.negativeBorderColor),t.axisColor&&(e.axisColor=t.axisColor),t.axisPosition!==`middle`&&t.axisPosition!==`none`||(e.axisPosition=t.axisPosition),t.direction!==`leftToRight`&&t.direction!==`rightToLeft`||(e.direction=t.direction)},A=(e,t)=>{t.conditions?.length&&(e.stops=g(t)),t.iconSet&&t.iconSet!==e.iconSet&&(e.iconSet=t.iconSet),t.icons?.length&&(e.icon=t.icons),t.reverse!==void 0&&(e.reverse=t.reverse),t.showValue!==void 0&&(e.showValue=t.showValue)},j=e=>{if(e.type!==`iconSet`||!e.iconSet||!e.sqref)return null;let t={type:n.Jt.ScaleType.IconSet,stops:[]};return A(t,e.iconSet),{r:e.sqref.split(/\s+/).join(`,`),v:{scale:t},priority:e.priority}};p.registerVisitor({from:`worksheet`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),r=t?.conditionals;if(r)for(let e=0;e<r.length;e++){let t=r[e],i=t.x14Id;if(!i)continue;delete t.x14Id;let a=S.get(i);if(!a)continue;S.delete(i);let o=t.v?.scale;a.dataBar&&o?.type===n.Jt.ScaleType.DataBar?k(o,a.dataBar):a.iconSet&&o?.type===n.Jt.ScaleType.IconSet&&A(o,a.iconSet)}let i=[...S.values(),...te];for(let e=0;e<i.length;e++){let n=j(i[e]);n?(r||(r=[],t.conditionals=r),r.push(n)):u?.(`x14-only conditional formatting rule (type '${i[e].type??`unknown`}') is not read and will be lost on resave.`)}if(r){r.length>1&&r.sort((e,t)=>(e.priority??1/0)-(t.priority??1/0));for(let e=0;e<r.length;e++)delete r[e].priority}}}),p.registerVisitor({from:`customProperties`,to:`customProperties`,openTag:e=>{e.setSource([])},closeTag:e=>{let t=e.getSource();t.length>0&&(e.getParent().customProperties=t)}}),p.registerVisitor({from:`customPr`,to:{},openTag:e=>{let t=e.getParent();e.copyTo(`name`);let n=e.getAttribute(`r:id`);if(!n)return void console.warn(`no rId found for customProperties`,e.getPath());let r=i(n,!0),a=e.getSource();a.resId=r,t.push(a)}}),p.registerVisitor({from:`sheetProtection`,to:`protection`,openTag:e=>{let t=!1;if(e.hasAttribute(`sheet`)&&X(e.getAttribute(`sheet`))&&(t=!0),!t)return void e.setSource(void 0);let n=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null;e.copyTo(`autoTable`,n),e.copyTo(`deleteColumns`,n),e.copyTo(`formatCells`,n),e.copyTo(`formatColumns`,n),e.copyTo(`formatRows`,n),e.copyTo(`insertColumns`,n),e.copyTo(`insertHyperlinks`,n),e.copyTo(`insertRows`,n),e.copyTo(`objects`,n),e.copyTo(`pivotTables`,n),e.copyTo(`scenarios`,n),e.copyTo(`selectLockedCells`,n),e.copyTo(`selectUnlockedCells`,n),e.copyTo(`sort`,n);let r={};e.copyToObject(r,`hash`,$,`hashValue`),e.copyToObject(r,`algorithm`,$,`algorithmName`),e.copyToObject(r,`salt`,$,`saltValue`),e.copyToObject(r,`spinCount`,Z),Object.keys(r).length>0&&(e.getSource().password=r)}}),p.registerVisitor({from:`protectedRanges`,to:`protectedRanges`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`protectedRange`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n};e.copyToObject(n,`name`),e.copyToObject(n,`securityDescriptor`);let i={};e.copyToObject(i,`hash`,$,`hashValue`),e.copyToObject(i,`algorithm`,$,`algorithmName`),e.copyToObject(i,`salt`,$,`saltValue`),e.copyToObject(i,`spinCount`,Z),Object.keys(i).length>0&&(n.password=i),e.setSource(r)},closeTag:e=>{let t=e.getSource();t?.r&&t.v.name||e.setSource(void 0)}}),p.registerVisitor({from:`sheetFormatPr`,to:`sheetFormatPr`,openTag:e=>{e.copyToObject(r,`defaultColSize`,Q,`defaultColWidth`),e.copyToObject(r,`outlineLevelCol`,Z,`outlineLevelCol`);let t=e.getAttribute(`customHeight`);t!==`1`&&t!==`true`||e.copyToObject(r,`defaultRowSize`,Q,`defaultRowHeight`),e.copyToObject(r,`outlineLevelRow`,Z,`outlineLevelRow`)}}),p.registerVisitor({from:`cols`,to:`cols`,openTag:e=>{e.setSource([])}}),p.registerVisitor({from:`col`,to:[],openTag:e=>{let t=e.getSource(),r=e.getAttribute(`min`),i=e.getAttribute(`max`),a=r===void 0?0:parseInt(r)-1,o=i===void 0?a:parseInt(i)-1;t.r=n.D.runToString(a,o,!0);let s={};t.v=s,e.copyToObject(s,`sz`,Q,`width`),e.copyToObject(s,`csz`,X,`customWidth`),e.copyToObject(s,`h`,X,`hidden`),e.copyToObject(s,`l`,Z,`outlineLevel`),e.copyToObject(s,`s`,Z,`style`)}}),p.registerVisitor({from:`oleObjects`,to:null,openTag:e=>{e.warn(`'OLE Objects' are not supported.`)}});let M=!1,N=!1,P=0,F=``,I=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)};return((r,i,a,o,s,c,l)=>{let u=!1,d=!1,f=[],p=!1,m=null,h=null,g=null,_=null,v=null,y=null,b=l?.get(`richData`)??e.A.EmptyArray,x=l?.get(`dummyWrapped`)??null,ee=n.D.normalizeA1ToR1C1,S=e.l.createConflatingRanges(),te=new Map,C=[],w=!1,T=!1,E=null,D=!1,O=e.l.createConflatingRanges(),k=!1,A=-1,j=-1,M=null,N=null,P=null,F=[],I=null,ne=-2,L=0,R=``,z=``,B=``,V=``,H=``,U=``,W=``,G=``,K=``,re=``,ie=``,ae=``,oe=``,se=``,q=!0,J=null,ce=!1,le=!1,ue=null,de=0;return{...a,onEnd:()=>{F.length>0&&(i.rows=n.D.runsToRefs(F,!1));let o=S.done(Se),s=o.length;if(s>0){let e=new Set;for(let t=0;t<C.length;t++)e.add(C[t][0].split(`:`)[0]);let t=Array(s);for(let r=0;r<s;r++){let i=o[r],a=n.D.rangeToString(i),s=i.value[1],c=n.D.resolveRelativeToA1(s,i.rowStart,i.colStart);c&&!e.has(a.split(`:`)[0])&&be(c)&&(c=`__sxl.INTERSECT(${c})`),t[r]=[a,c]}i.formulas=t}let c=O.done(!0),l=c.length;if(l>0){let e=Array(l);for(let t=0;t<l;t++){let r=c[t];e[t]=n.D.rangeToString(r)}i.volatile=e}C.length>0&&(i.formulaArray=[...C]);let u=f.length;if(u>0){f.sort(e.l.createRangeComparator(t.l.Axis.Column));let r=f[0],a=r.colStart,o=r.colEnd,s=r.rowEnd,c=r.value,l=[];l.push(r);let d=null;for(let e=1;e<u;e++)d=f[e],c!==d.value||a!==d.colStart||o!==d.colEnd||s+1!==d.rowEnd?(l.push(d),r=d,a=r.colStart,o=r.colEnd,s=r.rowEnd,c=r.value):(s=d.rowEnd,r.rowEnd=s);let p=l.length,m=Array(p);for(let e=0;e<p;e++){let t=l[e];m[e]=[n.D.rangeToString(t),t.value]}i.directStyles=m}let d=r.build();d&&(i.data=d.tuples),a?.onEnd?.()},onOpenTag:e=>{let r=e.name,o=r.indexOf(`:`);if(o!==-1&&(r=r.slice(o+1)),de++,de%196608==0&&s?.(de),N){let t=e.attributes;switch(r){case`v`:d=!0;break;case`f`:switch(p=!0,t.t??null){case null:case`normal`:break;case`shared`:let e=t.si;h=t.ref,m=e;break;case`array`:h=t.ref,E=h;break;case`datatable`:h=t.ref,p=!0}let e=t.ca;e!==void 0&&(D=e===`1`);break;case`is`:k=!0;return}k&&!p&&c?.onOpenTag?.(e);return}if(u){if(r===`c`){N=e;let r=e.attributes,i=r.r;j=n.D.fastStringToCol(i);let a=r.t;a===void 0?P=null:(P=a,P===`str`&&(k=!0));let o=r.s;o===void 0&&(ue!==null||le)&&(o=`0`),o!==void 0&&(o=parseInt(o),J&&J.value===o&&J.colEnd+1===j?J.colEnd=j:(J={colStart:j,rowStart:A,colEnd:j,rowEnd:A,value:o},f.push(J))),E=null,T=!1;let s=r.cm;w=s!==void 0&&(e=>{let t=l?.get(`metadata`)?.cells;if(!t)return!1;let n=parseInt(e,10);return!(!Number.isFinite(n)||n<1)&&!0===t[n-1]?.get(`XLDAPR`)?.fDynamic})(s);let c=r.vm;if(c!==void 0){let e=b[parseInt(c)-1];if(t.a.isError(e)){let n=e.getCode();M={t:`e`,v:n},w&&n===t.a.Code.Spill&&(T=!0)}}}}else{if(r===`row`){u=!0;let t=e.attributes.r;if(A=parseInt(t)-1,L=0,z=e.attributes.customHeight,z!==void 0&&(L|=xe.CustomHeight),z!==K&&(q=!0,K=z),R=e.attributes.ht,R!==void 0&&(L|=xe.Ht),R!==G&&(q=!0,G=R),B=e.attributes.hidden,B!==void 0&&(L|=xe.Hidden),B!==re&&(q=!0,re=B),H=e.attributes.s,H!==void 0&&(L|=xe.S),H!==ae&&(q=!0,ae=H),V=e.attributes.customFormat,V!==void 0&&(L|=xe.CustomFormat),V!==ie&&(q=!0,ie=V),U=e.attributes.outlineLevel,U!==void 0&&(L|=xe.OutlineLevel),U!==oe&&(q=!0,oe=U),W=e.attributes.collapsed,W!==void 0&&(L|=xe.Collapsed),W!==se&&(q=!0,se=W),L!==0)if(ne+1!==A||q){let e=z!==void 0&&(z===`1`||z===`true`),t=V!==void 0&&(V===`1`||V===`true`);ue=t&&H!==void 0?H:null,t&&ue===null&&(ue=`0`),I={min:A,max:A,value:{sz:R===void 0?-1:parseFloat(R),csz:e,h:B!==void 0&&(B===`1`||B===`true`),s:ue===null?void 0:ue===`0`?0:parseInt(ue),l:U===void 0||U===`0`?0:parseInt(U),cl:W!==void 0&&(W===`1`||W===`true`)}},F.push(I)}else I.max=A;ne=A,q=!1;return}if(!ce&&r===`sheetData`){ce=!0;let e=i.cols,t=e?e.length:0;for(let n=0;!le&&n<t;n++)e[n].v.s&&(le=!0)}a?.onOpenTag?.(e)}},onCloseTag:e=>{let t=e.name;if(!p||t!==`c`&&t!==`f`||(m&&(_=te.get(m)??null),_&&(S.append(A,j,_),D&&O.append(A,j)),E!==null&&C.push([E,w?T?`dynamicSpillError`:`dynamic`:`static`]),p=!1,_=null,m=null,h=null,d=!1,D=!1,E=null,w=!1,T=!1),N){let n=t.indexOf(`:`);if(n!==-1&&(t=t.slice(n+1)),k)if(t===`is`||t===`v`){let e=c?.onEnd?.();e!=null&&r.pushAt(A,j,``+e)}else t!==`f`&&c?.onCloseTag?.(e);d&&=!1,t===`c`&&(N=null,k=!1);return}if(u)return u=!1,void(J=null);a?.onCloseTag?.(e)},onText:e=>{let s=e.trim();if(d){switch(M=null,P){case null:case`n`:M=parseFloat(s);break;case`b`:M=s===`1`||s===`true`;break;case`s`:M=s;break;case`e`:if(s===`#VALUE!`){let e=N.attributes.vm;if(e!==void 0){let n=b[parseInt(e)-1];if(t.a.isError(n)){M={t:`e`,v:n.getCode()};break}}}let e=t.a.getBuiltInByLabel(s);e?M={t:`e`,v:e.getCode()}:(M=s,o?.(`Unknown formula error '${s}' in cell ${n.D.cellToString({colIndex:j,rowIndex:A})}`));break;case`str`:case`inlineStr`:k=!0}M!==null&&r.pushAt(A,j,M)}if(m){if(v===m)_=y;else{if(_=te.get(m)??null,!_){let e=[];g=ee(s,A,j,e),_=[g,e,s],te.set(m,_)}v=m,y=_}m=null}if(p){if(x!==null){let e=(e=>{if(e.length<pe.length||e.slice(0,pe.length).toUpperCase()!==me)return ge;let t=ve(e,pe.length);if(t===null||e.charCodeAt(t.end)!==41||e.charCodeAt(t.end+1)!==44||e.charCodeAt(e.length-1)!==41)return ge;let n=t.value;return n.toUpperCase()===he?_e:n.length===0?ge:{kind:`formula`,formula:n}})(s);e.kind!==`none`&&x.push({sheet:i,rowIndex:A,colIndex:j,formula:e.kind===`formula`?e.formula:null})}let e=[];g=ee(s,A,j,e),_=[g,e,s]}k?c?.onText?.(e):u||a?.onText?.(s)}}})(m,r,p.createEventHandler(r,()=>{},u),u,void 0,{onOpenTag:e=>{M=!0;let t=I(e.name);t===`t`||t===`v`?P===0&&(N=!0):t!==`rPh`&&t!==`phoneticPr`||P++},onText:e=>{N&&(F+=e)},onCloseTag:e=>{let t=I(e.name);t===`t`||t===`v`?N=!1:t!==`rPh`&&t!==`phoneticPr`||P>0&&P--},onEnd:()=>{if(!M)return;let e=s(o.O(F));return M=!1,N=!1,P=0,F=``,e},onError:e=>{}},f)})(r,(e,t=!1)=>P(e,p,t)??null,W,_,0,(e,t)=>{let n=t?`${t} (${p})`:p;v.push([e,n])},0,w),s=await j.getTextStream(p,te);if(s)try{await C.parseStream(s,i,{xmlns:!1})}catch(e){throw console.warn(`Error parsing sheet: '${p}'`,e),Error(`Error parsing sheet: '${p}'`,{cause:e})}let c,u=N(p,l),d=new Map;if(u){let t;if(u.forEach((e,t)=>{e.type===`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`&&(c=P(t,p,!1,l)?.comments,c&&c.forEach(e=>{let t=e.v;d.set(t.id,e)}))}),u.forEach((e,n)=>{e.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`&&(t=P(n,p,!1,l))}),t||c){let n=c??[],i=t?.authors,o=t?.comments,s=o?o.length:0;if(o)for(let t=0;t<s;t++){let r=o[t];if(!r)continue;let s=r.v,c=i&&s.personId!==void 0?i[s.personId]:s.personId;if(c&&c.startsWith(`tc=`)&&(c=a.d(c.substring(3)),d.has(c)))continue;let l=R({displayName:c}),u={id:e.A.uuidV4(),personId:l.id,done:!1,asNote:!0,content:s.content};n.push({r:r.r,v:u})}r.comments=n}}})())}else if(f.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`){let e=a.a(p,i,O,D,z);if(e&&Object.keys(e).length!==0){let t=e,n=[];N(p,l)?.forEach(e=>{e.targetMode===`External`&&e.type&&e.target&&n.push({type:e.type,target:e.target})}),t.identity=n,y=t}else y=null}else y=c?a.l(p,i,(e,t)=>{let n=u.add({source:{buffer:e}});return n.addReference(h),S.add(n),d.toResourceId(n)},z):a.a(p,i,O,D,z);return y};a.c(`coreprops`,s,i,O,D),a.c(`extprops`,s,i,O,D);let F=new Map,I=new Map,ne=a.c(`people`,s,i,O,D),L=null;if(ne.size>0&&(L=ne.entries().next()?.value?.[1]?.persons,L)){let e=L.length;for(let t=0;t<e;t++){let e=L[t];F.set(e.id,e),e.displayName!==void 0&&I.set(e.displayName,e)}}let R=t=>{if(!t)return;if(t.id&&F.has(t.id))return F.get(t.id);let n=t.displayName;if(!t.id){if(n){let e=I.get(n);if(e)return e}t.id=e.A.uuidV4()}let r=F.get(t.id);if(r)return r;let i=t;return F.set(t.id,i),n&&I.set(n,i),L||=[],L.push(i),i},z={paramMap:w,getRefs:N,getRef:P,parsedRefs:k,addPerson:R,serializeElement:M},B=[];if(c){let e=await j.getTextStream(c,te);if(e){let t=(()=>{let e=!1,t=!1,n=0,r=``;return{onOpenTag:i=>{let a=we(i.name);a===`t`?e&&n===0&&(t=!0):a===`si`?(e=!0,r=``,n=0):a!==`rPh`&&a!==`phoneticPr`||n++},onText:e=>{t&&(r+=e)},onCloseTag:i=>{let a=we(i.name);a===`t`?t=!1:a===`si`?((e=>{B.push(e)})(o.O(r)),e=!1,r=``):a!==`rPh`&&a!==`phoneticPr`||n>0&&n--},onError:e=>{(e=>{v.push([e,c])})(`Error parsing shared strings: ${e?.message??e}`)}}})();try{await C.parseStream(e,t,{xmlns:!1})}catch(e){throw console.warn(`Error parsing shared strings: '${c}'`,e),Error(`Error parsing shared strings: '${c}'`,{cause:e})}}}_?.mark(`shared-strings`);let V=B.length,H=new Map,U=V,W=e=>{let t=H.get(e);if(t!==void 0)return t;let n=U;return H.set(e,U++),B.push(e),n},G=[];s.slicersCache=G;let K=j.getNames(),re=K.length;for(let e=0;e<re;e++){let t=K[e];t&&t.startsWith(`xl/slicerCache`)&&G.push(`/${t}`)}let ie=a.c(`slicersCache`,s,i,O,D,z),ae=new Map;ie.forEach(e=>{let t=e.name;delete e.name,ae.set(t,e)}),w.set(`slicerCaches`,ae),a.c(`richstructure`,s,i,O,D,z),a.c(`richdata`,s,i,O,D,z);let oe=a.c(`themes`,s,i,O,D,z),se=null;if(oe&&oe.entries){let e=oe.entries().next();e?.value?.[1]&&(se=e.value[1])}let q=new n.At(se),J=a.c(`styles`,s,i,O,D,z).entries().next()?.value?.[1];J&&=JSON.parse(e.F.JSONStableStringify(J));let ce=a.c(`workbooks`,s,i,O,D,z);_?.mark(`side-parts-json`),await Promise.all(A),b&&ee>0&&(b(x,x),await new Promise(e=>setTimeout(e,0))),_?.mark(`sheets`);let le={...ce.entries().next().value?.[1],styles:J,theme:q.toJSON()};if(B.length>0&&(le.strings=B),L&&L.length>0&&(le.people=L),f){let e=j.getEntry(`xl/vbaProject.bin`);if(e)try{let{VBAProject:t}=await Promise.resolve().then(()=>require("./DG-AY_xO8RKHtEBE.cjs")),n=t.extract(e);n?(f?.(n),le.vba=n):v.push([`Unable to parse VBA project.`,`xl/vbaProject.bin`])}catch(e){v.push([`Error extracting VBA: ${e?.message??e}`,`xl/vbaProject.bin`])}}let ue=null,de={...m,resources:u,json:le,formulaTransform:o.z(()=>ue?.getCalculation())};de.disableLoadAutoFit===void 0&&(de.disableLoadAutoFit=!1),_?.mark(`json-assembled`);let Y=new r.m(de);if(ue=Y,_?.mark(`workbook-constructed`),T.length>0){await Y.whenCalculationReady();let e=new Map,t=le.sheets??[],n=Y.getSheets().getItems();for(let r=0;r<t.length;r++){let i=t[r]?.sheet,a=n[r];i&&a&&e.set(i,a)}((e,t,n)=>{if(t.length===0)return;let r=e.getCalculation().getFunctions(),i=new Map,a=e=>{let t=i.get(e);return t===void 0&&(t=r.getByName(e)!==null,i.set(e,t)),t},o=new Map;for(let e of t){let t=o.get(e.sheet);t||(t=[],o.set(e.sheet,t)),t.push(e)}for(let[e,t]of o){let r=n.get(e);if(!r)continue;let i=(e,t)=>`${e},${t}`,o=new Set;for(let e of t)e.formula===null&&o.add(i(e.rowIndex,e.colIndex));for(let e of t){if(e.formula===null)continue;let t=ye(e.formula),n=!0;for(let e of t)if(!a(e)){n=!1;break}if(!n)continue;let s=[],c=[[e.rowIndex,e.colIndex]],l=new Set([i(e.rowIndex,e.colIndex)]);for(;c.length>0;){let[e,t]=c.pop(),n=[[e+1,t],[e-1,t],[e,t+1],[e,t-1]];for(let[e,t]of n){let n=i(e,t);!l.has(n)&&o.has(n)&&(l.add(n),s.push([e,t]),c.push([e,t]))}}for(let[e,t]of s)o.delete(i(e,t)),r.getRange({rowStart:e,colStart:t,rowEnd:e,colEnd:t}).clear();r.getRange({rowStart:e.rowIndex,colStart:e.colIndex,rowEnd:e.rowIndex,colEnd:e.colIndex}).setValue(`=`+e.formula)}}})(Y,T,e)}if(S.forEach(e=>{e.deleteReference(h)}),d.endPersist(),g){o.a(g);let e=new Map,t=0;for(let n of j.getNames()){let r=j.getEntry(n);if(!r)continue;let i=j.getRawEntry(n),a=i?{data:r,uncompressedSize:j.uncompressedSize(n),raw:{compressedData:i.data,compressionMethod:i.compressionMethod,signature:i.signature}}:{data:r,uncompressedSize:j.uncompressedSize(n)};e.set(n,a),t+=r.byteLength}if(t>67108864)v.push([`Source package too large to retain (${t} bytes, limit ${o.n}); unmodeled parts will be dropped on save.`,`SourcePackage`]);else if(e.size>0){let t=new o.R(e);o.v(g,t);let n=Y.getSheets().getItems(),r=Y.getTransactions().addListener({onCommitEnd:e=>{let n=e.getOperation()?.name;n!==`insertCells`&&n!==`deleteCells`||t.markStructuralChange()}}),i=Y.addListeners({onSheetsChange:()=>{let e=Y.getSheets().getItems();(e.length!==n.length||e.some((e,t)=>e!==n[t]))&&t.markStructuralChange(),n=e}});Y.addListeners({onClose:()=>{r(),i(),o.a(g)}})}}if(v.length&&y?.onWarning)for(let e of v){let[t,n]=e;y.onWarning(t,n)}return _&&!0===p&&console.table(_.toTable()),Y}catch(t){let n=`Unable to parse XLSX.`;throw t instanceof e.C&&(n=`Unable to open XLSX. There are too many rows or columns.`),Error(n,{cause:t})}finally{await j.close().catch(()=>{})}};
@@ -1 +1 @@
1
- const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./Ytzw6iUYx5f19wfK.cjs"),n=require("./Cf902jiI4KmAo0xm.cjs"),r=require("./BOLM1QOvxUKhYbK5.cjs"),i=require("./BHgdQUCqHS6ORa7c.cjs"),a=require("./CwBld2h5K_-uk804.cjs"),o=require("./BvRcbY1-Wkb5Sx-4.cjs"),s=require("./udZZuwSKdGYCjFsn.cjs"),c=require("./CPcBvw4ZPwHVTUZF.cjs");var l=e.r(t.i(),1),u=e.r(t.r(),1),d=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;l.createContext(null).displayName=`HookFormControlContext`,d?l.useLayoutEffect:l.useEffect;var f=l.createContext(null);f.displayName=`HookFormContext`;var p=()=>l.useContext(f),m=e=>{e.button===0&&e.preventDefault()},h=`20px`,g=`4px`,_=`calc(${h} + ${g})`,v=(0,l.memo)((0,l.forwardRef)((e,t)=>{let{grammar:d=`formula`,formName:f,formOptions:_,disabled:v,className:y,sx:ee,onKeyDown:b,onFocus:x,value:S,onChangeInput:C,onChangeText:te,onDone:w,changeOn:T,apiRef:E,workbook:D,home:O,equals:k,pickAs:ne,allowMulti:re,allowCrossSheet:ie,label:A,labelPlacement:ae=`floating`,placeholder:oe,helperText:j,showError:M=!0,onChangeError:N,hideAdornment:P,classNameInput:F,id:I,...L}=e,R=r.Xt(),z=ae===`above`,B=(0,l.useId)(),V=I??B,H=d===`formula`,U=A===void 0?R(H?`formulaInput.label`:`rangeInput.label`):A,W=oe??R(H?`formulaInput.placeholder`:`rangeInput.placeholder`),G=p(),K=f&&G?G.register(f,_):null,q=o.P({value:S,onChange:C,onChangeText:te,onDone:w,changeOn:T,workbook:D,home:O,equals:k,pickAs:ne,allowMulti:re,allowCrossSheet:ie,disabled:v},d);(0,l.useImperativeHandle)(E,()=>q,[q]);let J=o.i({api:q,grammar:d,disabled:v,workbook:D,home:O}),Y=!!q.error&&!J.inputExpected,se=M&&Y?R(q.error):j===void 0?` `:j,X=(0,l.useRef)(G);X.current=G;let Z=(0,l.useRef)(N);Z.current=N;let Q=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(q.error===Q.current||(Q.current=q.error,Z.current?.(q.error),!f))return;let e=X.current;e&&(q.error?e.setError(f,{message:q.error}):e.clearErrors(f))},[q.error,f]);let $=!!w,ce=(0,l.useMemo)(()=>P?void 0:(0,u.jsx)(s.t,{tabIndex:-1,onMouseDown:m,sx:{display:`flex`,position:`relative`,flex:`0`},position:`end`,children:q.engaged&&$?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Ft,{dense:!0,outlined:!1,color:`primary`,"aria-label":`commit-reference`,icon:(0,u.jsx)(n.r,{iconKey:`CheckSuccess`}),propsTooltip:{label:R(`referenceInput.commit`),simple:!0},disabled:!!q.error,tabIndex:-1,onMouseDown:m,onClick:()=>{q.commit()}}),(0,u.jsx)(o.Ft,{dense:!0,outlined:!1,color:`warning`,"aria-label":`cancel-reference`,icon:(0,u.jsx)(n.r,{iconKey:`CloseError`}),propsTooltip:{label:R(`referenceInput.cancel`),simple:!0},tabIndex:-1,onMouseDown:m,onClick:()=>{q.cancel()}})]}):(0,u.jsx)(o.Ft,{dense:!0,outlined:!1,disabled:v||!q.canSelectCurrent,sx:{"&.Mui-disabled":{opacity:.35}},"aria-label":`select-current-range`,icon:(0,u.jsx)(n.r,{iconKey:`SelectRangeMode`}),propsTooltip:{label:R(`referenceInput.selectCurrent`),simple:!0},tabIndex:-1,onMouseDown:m,onClick:()=>{q.engaged||q.togglePoint(),q.selectCurrent()}})}),[P,v,$,q.engaged,q.canSelectCurrent,q.togglePoint,q.selectCurrent,q.commit,q.cancel,!!q.error]);return(0,u.jsxs)(i.h,{sx:{minWidth:135,width:`100%`,...ee},size:`small`,ref:e=>{J.containerRef.current=e,typeof t==`function`?t(e):t&&(t.current=e)},className:c.t(`sxl-formula-field`,y),"data-grammar":d,...L,children:[z?(0,u.jsx)(r.t,{component:`label`,htmlFor:V,sx:{lineHeight:h,marginBottom:g,paddingLeft:`14px`,display:`flex`,alignItems:`center`,gap:`4px`,overflow:`hidden`,whiteSpace:`nowrap`,fontSize:`0.8rem`,color:v?`text.disabled`:`text.primary`},children:U}):null,(0,u.jsx)(a.t,{id:V,label:z?void 0:U,placeholder:W,disabled:v,error:Y,helperText:se,sx:{"& .MuiFormHelperText-root":{marginTop:g,...z?{lineHeight:h}:null}},slotProps:{input:{endAdornment:ce},inputLabel:{shrink:!0},htmlInput:{className:F,spellCheck:!1,autoComplete:`off`,readOnly:v||q.inputProps.readOnly,name:f,sx:{paddingTop:e=>e.spacing(z||U==null?1:1.25),paddingBottom:e=>e.spacing(z||U==null?1:.75),...J.overlayActive?{color:`transparent`,caretColor:e=>e.palette.text.primary}:null},onSelect:e=>{q.inputProps.onSelect(e),J.inputHandlers.onSelect(e)},onScroll:J.inputHandlers.onScroll,onMouseMove:J.inputHandlers.onMouseMove,onMouseLeave:J.inputHandlers.onMouseLeave}},value:q.inputProps.value,inputRef:e=>{J.inputElRef.current=e,q.inputProps.ref(e),K?.ref&&K.ref(e)},onChange:e=>{q.inputProps.onChange(e),J.inputHandlers.onSelect(e),K?.onChange(e)},onKeyDown:e=>{J.handleKeyDown(e)||(q.inputProps.onKeyDown(e),e.defaultPrevented||b?.(e))},onPointerDown:J.inputHandlers.onPointerDown,onMouseDown:q.inputProps.onMouseDown,onFocus:e=>{q.inputProps.onFocus(e),x?.(e)},onBlur:e=>{q.inputProps.onBlur(e),K?.onBlur(e)},onContextMenu:e=>{e.stopPropagation()}}),J.overlayElement,J.tipElement,J.hintElement]})}));v.displayName=`FormulaField`,Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
1
+ const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./Ytzw6iUYx5f19wfK.cjs"),n=require("./Cf902jiI4KmAo0xm.cjs"),r=require("./BOLM1QOvxUKhYbK5.cjs"),i=require("./BHgdQUCqHS6ORa7c.cjs"),a=require("./CwBld2h5K_-uk804.cjs"),o=require("./C1tO7v57UD8xmj2X.cjs"),s=require("./udZZuwSKdGYCjFsn.cjs"),c=require("./CPcBvw4ZPwHVTUZF.cjs");var l=e.r(t.i(),1),u=e.r(t.r(),1),d=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;l.createContext(null).displayName=`HookFormControlContext`,d?l.useLayoutEffect:l.useEffect;var f=l.createContext(null);f.displayName=`HookFormContext`;var p=()=>l.useContext(f),m=e=>{e.button===0&&e.preventDefault()},h=`20px`,g=`4px`,_=`calc(${h} + ${g})`,v=(0,l.memo)((0,l.forwardRef)((e,t)=>{let{grammar:d=`formula`,formName:f,formOptions:_,disabled:v,className:y,sx:ee,onKeyDown:b,onFocus:x,value:S,onChangeInput:C,onChangeText:te,onDone:w,changeOn:T,apiRef:E,workbook:D,home:O,equals:k,pickAs:ne,allowMulti:re,allowCrossSheet:ie,label:A,labelPlacement:ae=`floating`,placeholder:oe,helperText:j,showError:M=!0,onChangeError:N,hideAdornment:P,classNameInput:F,id:I,...L}=e,R=r.Xt(),z=ae===`above`,B=(0,l.useId)(),V=I??B,H=d===`formula`,U=A===void 0?R(H?`formulaInput.label`:`rangeInput.label`):A,W=oe??R(H?`formulaInput.placeholder`:`rangeInput.placeholder`),G=p(),K=f&&G?G.register(f,_):null,q=o.L({value:S,onChange:C,onChangeText:te,onDone:w,changeOn:T,workbook:D,home:O,equals:k,pickAs:ne,allowMulti:re,allowCrossSheet:ie,disabled:v},d);(0,l.useImperativeHandle)(E,()=>q,[q]);let J=o.E({api:q,grammar:d,disabled:v,workbook:D,home:O}),Y=!!q.error&&!J.inputExpected,se=M&&Y?R(q.error):j===void 0?` `:j,X=(0,l.useRef)(G);X.current=G;let Z=(0,l.useRef)(N);Z.current=N;let Q=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(q.error===Q.current||(Q.current=q.error,Z.current?.(q.error),!f))return;let e=X.current;e&&(q.error?e.setError(f,{message:q.error}):e.clearErrors(f))},[q.error,f]);let $=!!w,ce=(0,l.useMemo)(()=>P?void 0:(0,u.jsx)(s.t,{tabIndex:-1,onMouseDown:m,sx:{display:`flex`,position:`relative`,flex:`0`},position:`end`,children:q.engaged&&$?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Ft,{dense:!0,outlined:!1,color:`primary`,"aria-label":`commit-reference`,icon:(0,u.jsx)(n.r,{iconKey:`CheckSuccess`}),propsTooltip:{label:R(`referenceInput.commit`),simple:!0},disabled:!!q.error,tabIndex:-1,onMouseDown:m,onClick:()=>{q.commit()}}),(0,u.jsx)(o.Ft,{dense:!0,outlined:!1,color:`warning`,"aria-label":`cancel-reference`,icon:(0,u.jsx)(n.r,{iconKey:`CloseError`}),propsTooltip:{label:R(`referenceInput.cancel`),simple:!0},tabIndex:-1,onMouseDown:m,onClick:()=>{q.cancel()}})]}):(0,u.jsx)(o.Ft,{dense:!0,outlined:!1,disabled:v||!q.canSelectCurrent,sx:{"&.Mui-disabled":{opacity:.35}},"aria-label":`select-current-range`,icon:(0,u.jsx)(n.r,{iconKey:`SelectRangeMode`}),propsTooltip:{label:R(`referenceInput.selectCurrent`),simple:!0},tabIndex:-1,onMouseDown:m,onClick:()=>{q.engaged||q.togglePoint(),q.selectCurrent()}})}),[P,v,$,q.engaged,q.canSelectCurrent,q.togglePoint,q.selectCurrent,q.commit,q.cancel,!!q.error]);return(0,u.jsxs)(i.h,{sx:{minWidth:135,width:`100%`,...ee},size:`small`,ref:e=>{J.containerRef.current=e,typeof t==`function`?t(e):t&&(t.current=e)},className:c.t(`sxl-formula-field`,y),"data-grammar":d,...L,children:[z?(0,u.jsx)(r.t,{component:`label`,htmlFor:V,sx:{lineHeight:h,marginBottom:g,paddingLeft:`14px`,display:`flex`,alignItems:`center`,gap:`4px`,overflow:`hidden`,whiteSpace:`nowrap`,fontSize:`0.8rem`,color:v?`text.disabled`:`text.primary`},children:U}):null,(0,u.jsx)(a.t,{id:V,label:z?void 0:U,placeholder:W,disabled:v,error:Y,helperText:se,sx:{"& .MuiFormHelperText-root":{marginTop:g,...z?{lineHeight:h}:null}},slotProps:{input:{endAdornment:ce},inputLabel:{shrink:!0},htmlInput:{className:F,spellCheck:!1,autoComplete:`off`,readOnly:v||q.inputProps.readOnly,name:f,sx:{paddingTop:e=>e.spacing(z||U==null?1:1.25),paddingBottom:e=>e.spacing(z||U==null?1:.75),...J.overlayActive?{color:`transparent`,caretColor:e=>e.palette.text.primary}:null},onSelect:e=>{q.inputProps.onSelect(e),J.inputHandlers.onSelect(e)},onScroll:J.inputHandlers.onScroll,onMouseMove:J.inputHandlers.onMouseMove,onMouseLeave:J.inputHandlers.onMouseLeave}},value:q.inputProps.value,inputRef:e=>{J.inputElRef.current=e,q.inputProps.ref(e),K?.ref&&K.ref(e)},onChange:e=>{q.inputProps.onChange(e),J.inputHandlers.onSelect(e),K?.onChange(e)},onKeyDown:e=>{J.handleKeyDown(e)||(q.inputProps.onKeyDown(e),e.defaultPrevented||b?.(e))},onPointerDown:J.inputHandlers.onPointerDown,onMouseDown:q.inputProps.onMouseDown,onFocus:e=>{q.inputProps.onFocus(e),x?.(e)},onBlur:e=>{q.inputProps.onBlur(e),K?.onBlur(e)},onContextMenu:e=>{e.stopPropagation()}}),J.overlayElement,J.tipElement,J.hintElement]})}));v.displayName=`FormulaField`,Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
@@ -1 +1 @@
1
- exports.TypeScriptCompiler=class{constructor(e={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;let{createCompilerWorker:e}=await Promise.resolve().then(()=>require("./Dbl2A7TmMPREP_KG.cjs"));return this.workerWrapper=await e(),this.workerWrapper}async compileModule(e){try{return(await this.getWorkerWrapper()).execute(e)}catch(e){throw console.error(`Failed to compile using worker:`,e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
1
+ exports.TypeScriptCompiler=class{constructor(e={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;let{createCompilerWorker:e}=await Promise.resolve().then(()=>require("./B2cX7nid45K1XRcB.cjs"));return this.workerWrapper=await e(),this.workerWrapper}async compileModule(e){try{return(await this.getWorkerWrapper()).execute(e)}catch(e){throw console.error(`Failed to compile using worker:`,e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
@@ -1 +1 @@
1
- exports.loadEnumManifest=async function(){let e=`@0.7.28-beta.1`;e!==`@local`&&e!==`@0.0.0`||(e=``);let t=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${e}/types/scripting-enums.json`,n=await fetch(t);if(!n.ok)throw Error(`Unable to load script enum runtime (${n.status}) from ${t}.`);return n.json()};
1
+ exports.loadEnumManifest=async function(){let e=`@0.7.28-beta.3`;e!==`@local`&&e!==`@0.0.0`||(e=``);let t=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${e}/types/scripting-enums.json`,n=await fetch(t);if(!n.ok)throw Error(`Unable to load script enum runtime (${n.status}) from ${t}.`);return n.json()};
@@ -0,0 +1 @@
1
+ const e=require("./BnccBYHCCq9TGFx4.cjs"),t=require("./DDPxHIqx8aIbqTRE.cjs"),n=require("./Dmdcgm3pqGKmXPGb.cjs"),r=require("./CcBPECGj-X0W9a3_.cjs"),i=require("./CHMgm0vAbEBS1mVW.cjs"),a=require("./DP0yIsjVWme5C-UE.cjs");var o=class{constructor(e){this.list=e}get length(){return this.list.length}item(e){return this.list[e]}forEach(e,t){let n=this.list,r=n.length;for(let t=0;t<r;t++)e(n[t],t,this)}entries(){return this.list.entries()}keys(){return this.list.keys()}values(){return this.list.values()}[Symbol.iterator](){return this.list.values()}},s=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,c=e=>{let t=parseInt(e);return isNaN(t)?null:t},l=e=>{let t=parseFloat(e);return isNaN(t)?null:t},u=new Map,d=class{constructor(t,n,r,i,a,o=null,s=e.A.EmptyObject){this._fileLocation=``,this._parent=t,this.sharedShared=n,this.currentPath=r,this.elemRoot=i,this.jsonRoot=a,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs,this._serializeElement=t._serializeElement):(o&&(this._fileLocation=o),s?.getRef&&(this._getRef=(e,t,n)=>s?.getRef?.(e,t,n,s?.parsedRefs)),s?.getRefs&&(this._getRefs=e=>s?.getRefs?.(e,s?.parsedRefs)),this._onWarning=s?.onWarning,this._addPerson=s?.addPerson,this._serializeElement=s?.serializeElement)}getRef(e,t=!1){return this._getRef?.(e,this._fileLocation,t)??null}getRelationships(){return this._getRefs?.(this._fileLocation)??u}getPath(){return this.currentPath}getFileLocation(){return this._fileLocation}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(e){this._onWarning?this._onWarning(e):this._parent?this._parent?.warn?.(e):console.warn(e)}serializeElement(e){return this._serializeElement?.(e)??null}addPerson(e){return typeof e==`string`&&(e={displayName:e}),this._addPerson?this._addPerson(e):this._parent?this._parent?._addPerson?.(e)??null:null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(e,t){if(!e)return t;let n=[t],r=e.split(`/`),i=r.length;for(let e=0;e<i;e++){let t=r[e];if(t===``||t===`.`)continue;let a=[],o=(t===`*`||t===`**`)&&e!==i-1;for(let i of n)if(i)if(o){let t=r[e+1];t&&t!==``&&t!==`.`&&(this._findDescendants(i,t,a),e++)}else if(t===`*`||t===`**`){if(!i.childNodes)continue;let e=i.childNodes,t=e.length;for(let n=0;n<t;n++){let t=e[n];t.nodeType===1&&a.push(t)}}else{if(!i.childNodes)continue;let e=i.childNodes,n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n.nodeType!==1)continue;let i=n;this._matchesElementName(i,t)&&a.push(i)}}if(n=a,n.length===0)return null}return n.length===1?n[0]:n.length===0?null:new o(n)}_matchesElementName(e,t){return t.includes(`:`)?(e.tagName||e.nodeName)===t:e.localName===t}_findDescendants(e,t,n){if(!e||!e.childNodes)return;let r=e.childNodes,i=r.length;for(let e=0;e<i;e++){let i=r[e];if(i.nodeType!==1)continue;let a=i;this._matchesElementName(a,t)&&n.push(a),this._findDescendants(a,t,n)}}getFromPath(t,n){return e.A.getFromPath(t,n)}setToPath(t,n,r){return e.A.setToPath(t,n,r)}getValAttrAsString(e,t){let n=this.evaluate(e,t);return n&&n.hasAttribute(`val`)?n.getAttribute(`val`)??null:null}getValAttrAsBoolean(e,t,n=!1){let r=this.evaluate(e,t);if(!r)return null;let i=r.hasAttribute(`val`)?r.getAttribute(`val`):void 0;return i==null?n:i===`1`||i===`on`||i===`true`||i!==`0`&&i!==`off`&&i!==`false`&&n}getValAttrAsInteger(e,t){let n=this.evaluate(e,t);return n&&n.hasAttribute(`val`)?parseInt(n.getAttribute(`val`))??null:null}getValAttrAsFloat(e,t){let n=this.evaluate(e,t);return n&&n.hasAttribute(`val`)?parseFloat(n.getAttribute(`val`))??null:null}get BOOLEAN_COPY(){return s}get INT_COPY(){return c}get FLOAT_COPY(){return l}copyFromAttribute(e,t,n,r=t,i=null){if(!e||!n||!e.hasAttribute(t))return;let a=e.getAttribute(t);if(i){if(Array.isArray(i)){let e=i.length;for(let t=0;t<e;t++)if(a==null||(a=i[t](a),a==null))return}else if(a==null||(a=i(a),a==null))return}this.setToPath(n,r,a)}},f=i.r({isBlank:()=>v,isNotBlank:()=>y,length:()=>b,parseRotation:()=>p,parseValAttrAsBoolean:()=>h,parseValAttrAsFloat:()=>_,parseValAttrAsInteger:()=>g,parseValAttrAsString:()=>m}),p=(t,n)=>{if(!t||!t.hasAttribute(`rot`))return;let r=t.getAttribute(`rot`),i=e.A.roundAccurately(a.f(r),2);i!==-1e3&&(n.rotation=i)},m=(e,t,n,r,i)=>{let a=e.getValAttrAsString(r,t);a!==null&&(n[i]=a)},h=(e,t,n,r,i=r,a=null)=>{let o=e.getValAttrAsBoolean(r,t,a);o!==null&&(n[i]=o)},g=(e,t,n,r,i)=>{let a=e.getValAttrAsInteger(r,t);a!==null&&(n[i]=a)},_=(e,t,n,r,i,a=1)=>{let o=e.getValAttrAsFloat(r,t);o!==null&&(n[i]=o*a)},v=e=>!e||e.trim().length===0,y=e=>!v(e),b=e=>e?.length??0,x=class{constructor(e){this.jsonKey=e}visit(e,t,n){let r={};return n[this.jsonKey]=r,r}},S=class{visit(e,t,n){}getStroke(e,t){let n=e.evaluate(`ln`,t);return n?this.parseLn(e,n):{}}parseLn(e,t){let n={};t.hasAttribute(`algn`)&&(n.align=t.getAttribute(`algn`)),t.hasAttribute(`cap`)&&(n.lineCap=w(t.getAttribute(`cap`))),t.hasAttribute(`cmpd`)&&(n.compound=t.getAttribute(`cmpd`)),t.hasAttribute(`w`)&&(n.width=a.s(t.getAttribute(`w`)));let r=e.evaluate(`miter`,t);r&&(n.lineJoin=`miter`,r.hasAttribute(`lim`)&&(n.miterLimit=parseFloat(r.getAttribute(`lim`))/1e5)),e.evaluate(`bevel`,t)&&(n.lineJoin=`bevel`),e.evaluate(`round`,t)&&(n.lineJoin=`round`);let i=e.evaluate(`custDash`,t);if(i){let t=e.evaluate(`ds`,i);if(t&&t.length>0){let e=[];for(let n=0;n<t.length;n++){let r=t.item(n);e.push(a.t(r.getAttribute(`d`)??``)),e.push(a.t(r.getAttribute(`sp`)??``))}n.dash=e}}let o=e.evaluate(`prstDash`,t);o&&o.hasAttribute(`val`)&&(n.dash=o.getAttribute(`val`)),this.parseEndElement(e,t,n,`headEnd`,`head`),this.parseEndElement(e,t,n,`tailEnd`,`tail`);let s=this.getFill(e,t);return s&&(n.fill=s),n}parseEndElement(e,t,n,r,i){let a=e.evaluate(r,t);if(a&&(a.hasAttribute(`type`)&&(n[i+`Type`]=a.getAttribute(`type`)),a.hasAttribute(`len`)||a.hasAttribute(`w`))){let e=a.getAttribute(`len`)||`med`,t=a.getAttribute(`w`)||`med`;n[i+`Size`]=e+`-`+t}}getEffects(e,t){let n=e.evaluate(`effectLst`,t);if(!n)return null;let r=[],i=n.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType!==1)continue;let a=this.processEffectElement(e,n,n.localName);if(a===void 0)return;r.push(a)}return r}processEffectElement(e,t,n){switch(n){case`outerShdw`:{let n={type:r.o.Type.OuterShadow,color:this.processAdjColor(e,t)};return t.hasAttribute(`dist`)&&(n.distance=a.s(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(n.angle=a.f(t.getAttribute(`dir`))),t.hasAttribute(`blurRad`)&&(n.blur=a.s(t.getAttribute(`blurRad`))),t.hasAttribute(`algn`)&&(n.alignment=t.getAttribute(`algn`)),t.hasAttribute(`rotWithShape`)&&(n.isRotatedWithShape=a.p(t.getAttribute(`rotWithShape`))),t.hasAttribute(`sx`)&&(n.scaleX=a.t(t.getAttribute(`sx`))),t.hasAttribute(`sy`)&&(n.scaleY=a.t(t.getAttribute(`sy`))),t.hasAttribute(`kx`)&&(n.skewX=a.f(t.getAttribute(`kx`))),t.hasAttribute(`ky`)&&(n.skewY=a.f(t.getAttribute(`ky`))),n}case`innerShdw`:{let n={type:r.o.Type.InnerShadow,color:this.processAdjColor(e,t)};return t.hasAttribute(`dist`)&&(n.distance=a.s(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(n.angle=a.f(t.getAttribute(`dir`))),t.hasAttribute(`blurRad`)&&(n.blur=a.s(t.getAttribute(`blurRad`))),n}case`prstShdw`:{let n={type:r.o.Type.PresetShadow,color:this.processAdjColor(e,t),preset:t.getAttribute(`prst`)??void 0};return t.hasAttribute(`dist`)&&(n.distance=a.s(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(n.angle=a.f(t.getAttribute(`dir`))),n}case`glow`:{let n={type:r.o.Type.Glow,color:this.processAdjColor(e,t)};return t.hasAttribute(`rad`)&&(n.radius=a.s(t.getAttribute(`rad`))),n}case`softEdge`:{let e={type:r.o.Type.SoftEdge};return t.hasAttribute(`rad`)&&(e.radius=a.s(t.getAttribute(`rad`))),e}case`reflection`:{let e={type:r.o.Type.Reflection};return t.hasAttribute(`blurRad`)&&(e.blur=a.s(t.getAttribute(`blurRad`))),t.hasAttribute(`dist`)&&(e.distance=a.s(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(e.angle=a.f(t.getAttribute(`dir`))),t.hasAttribute(`fadeDir`)&&(e.fadeAngle=a.f(t.getAttribute(`fadeDir`))),t.hasAttribute(`stA`)&&(e.startAlpha=a.t(t.getAttribute(`stA`))),t.hasAttribute(`stPos`)&&(e.startPosition=a.t(t.getAttribute(`stPos`))),t.hasAttribute(`endA`)&&(e.endAlpha=a.t(t.getAttribute(`endA`))),t.hasAttribute(`endPos`)&&(e.endPosition=a.t(t.getAttribute(`endPos`))),t.hasAttribute(`sx`)&&(e.scaleX=a.t(t.getAttribute(`sx`))),t.hasAttribute(`sy`)&&(e.scaleY=a.t(t.getAttribute(`sy`))),t.hasAttribute(`kx`)&&(e.skewX=a.f(t.getAttribute(`kx`))),t.hasAttribute(`ky`)&&(e.skewY=a.f(t.getAttribute(`ky`))),t.hasAttribute(`algn`)&&(e.alignment=t.getAttribute(`algn`)),t.hasAttribute(`rotWithShape`)&&(e.isRotatedWithShape=a.p(t.getAttribute(`rotWithShape`))),e}default:return}}getFill(e,t){if(e.evaluate(`noFill`,t))return{type:n.ot.Type.None};let r=e.evaluate(`solidFill`,t);if(r){let t=this.processAdjColor(e,r);if(t)return{type:n.ot.Type.Solid,color:t}}let i=e.evaluate(`gradFill`,t);if(i)return this.processGradFill(e,i);let a=e.evaluate(`pattFill`,t);if(a)return this.processPatternFill(e,a);let o=e.evaluate(`blipFill`,t);return o?this.processImageFill(e,o):null}processGradFill(e,t){let r={type:n.ot.Type.Gradient};t.hasAttribute(`rotWithShape`)&&(r.isRotatedWithShape=t.getAttribute(`rotWithShape`)===`1`);let i=e.evaluate(`lin`,t);i&&(r.gradientType=n.ot.GradientType.Linear,i.hasAttribute(`ang`)&&(r.angle=a.f(i.getAttribute(`ang`))),i.hasAttribute(`scaled`)&&(r.scaled=a.p(i.getAttribute(`scaled`))));let o={};t.hasAttribute(`flip`)&&(o.mirror=t.getAttribute(`flip`)),Object.keys(o).length>0&&(r.tile=o);let s=e.evaluate(`path`,t);if(s){s.hasAttribute(`path`)&&(r.gradientType=C(s.getAttribute(`path`)));let t=e.evaluate(`fillToRect`,s);t&&(r.focus=this.getRect(t))}let c=e.evaluate(`tileRect`,t);c&&(r.tile||={},r.tile.bounds=this.getRect(c));let l=[],u=e.evaluate(`gsLst/gs`,t),d=u?u.length:0;for(let t=0;t<d;t++){let n=u.item(t),r={offset:a.t(n.getAttribute(`pos`)??``),color:this.processAdjColor(e,n)};l.push(r)}return l.length>0&&(r.stops=l),r}getRect(e){let t={};return e.hasAttribute(`t`)&&(t.t=a.t(e.getAttribute(`t`))),e.hasAttribute(`l`)&&(t.l=a.t(e.getAttribute(`l`))),e.hasAttribute(`b`)&&(t.b=a.t(e.getAttribute(`b`))),e.hasAttribute(`r`)&&(t.r=a.t(e.getAttribute(`r`))),Object.keys(t).length===0?null:t}processImageFill(e,t){let r={type:n.ot.Type.Image};return t.hasAttribute(`rotWithShape`)&&(r.isRotatedWithShape=a.p(t.getAttribute(`rotWithShape`))),t.hasAttribute(`dpi`)&&(r.dpi=t.getAttribute(`dpi`)),r.ref=`https://www.sheetxl.com/logo-color-padded-white.jpg`,r.tile=!1,r}processPatternFill(e,t){let r={type:n.ot.Type.Pattern};r.patternType=t.getAttribute(`prst`);let i=e.evaluate(`bgClr`,t);if(i){let t=this.processAdjColor(e,i);t&&(r.background=t)}let a=e.evaluate(`fgClr`,t);if(a){let t=this.processAdjColor(e,a);t&&(r.foreground=t)}return r}processAdjColor(e,t){let n=e.evaluate(`hslClr`,t);if(n)return this.processHslClr(e,n);let r=e.evaluate(`prstClr`,t);if(r)return this.processClrWithValAttribute(e,r);let i=e.evaluate(`schemeClr`,t);if(i)return this.processClrWithValAttribute(e,i);let a=e.evaluate(`sysClr`,t);if(a){let t=this.processClrWithValAttribute(e,a),n=a.getAttribute(`lastClr`);return t&&n&&(t+=` lastClr ${n}`),t}let o=e.evaluate(`scrgbClr`,t);if(o)return this.processScrgbClrElement(e,o);let s=e.evaluate(`srgbClr`,t);return s?this.processSrgbClrElement(e,s):null}processScrgbClrElement(e,t){let n=`lrgba(`+a.t(t.getAttribute(`r`)??``)+`,`+a.t(t.getAttribute(`g`)??``)+`,`+a.t(t.getAttribute(`b`)??``)+`)`;return n+=this.processAdjustments(e,t),n}processSrgbClrElement(e,t){let n=t.getAttribute(`val`);return n+=this.processAdjustments(e,t),n}processHslClr(e,t){let n=`hsl(`+a.f(t.getAttribute(`hue`)??``)+`,`+a.t(t.getAttribute(`sat`)??``)+`,`+a.t(t.getAttribute(`lum`)??``)+`)`;return n+=this.processAdjustments(e,t),n}processClrWithValAttribute(e,t){let n=t.getAttribute(`val`);if(!n)return null;let r=n;return r+=this.processAdjustments(e,t),r}processAdjustments(e,t){let n=``,r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);if(i.nodeType===1){let t=i.localName;n+=t===`hue`||t===`hueOff`||t===`hueMod`?this.processAdjustmentElement(e,i,t,6e4):t===`gray`||t===`comp`||t===`inv`||t===`gamma`||t===`invGamma`?this.processAdjustmentElement(e,i,t,1):t===`alpha`||t===`alphaOff`||t===`alphaMod`?this.processAdjustmentElement(e,i,t,1e5):this.processAdjustmentElement(e,i,t)}}return n}processAdjustmentElement(e,t,n,r=1e3){let i=t.getAttribute(`val`);return i?` ${n} ${!i||parseFloat(i)/r}`:` ${n}`}},C=e=>e===`circle`?`radial`:e,w=e=>{if(e===`rnd`)return`round`;if(e===`flat`)return`butt`;if(e===`sq`)return`square`;throw Error(`Invalid lineCap type: `+e)},T=class extends S{visit(e,t,n){try{let r=e.evaluate(`xfrm`,t);if(r){p(r,n);let t={x:0,y:0,width:0,height:0},i=e.evaluate(`off`,r);i&&(t.x=a.i(i.getAttribute(`x`))??0,t.y=a.i(i.getAttribute(`y`))??0);let o=e.evaluate(`ext`,r);i&&(t.width=a.i(o.getAttribute(`cx`))??0,t.height=a.i(o.getAttribute(`cy`))??0),n.bounds=t}let i=e.evaluate(`prstGeom`,t);i?.hasAttribute(`prst`)?n.geometry=i?.getAttribute(`prst`):e.evaluate(`customGeom`,t)&&console.warn(`customGeom not supported yet`);let o=this.getFill(e,t);o&&Object.keys(o).length>0&&(n.fill=o);let s=this.getStroke(e,t);return s&&Object.keys(s).length>0&&(n.stroke=s),n}catch(e){console.warn(e)}}},E=class{visit(e,t,n){let r={};if(m(e,t,r,`grouping`,`grouping`),h(e,t,r,`varyColors`,`varyColors`),_(e,t,r,`gapWidth`,`gapWidth`,.01),_(e,t,r,`overlap`,`overlap`,.01),this.parseType(e,t,r),g(e,t,r,`bubbleScale`,`bubbleScale`),h(e,t,r,`showNegBubbles`,`showNegativeBubbleValues`),h(e,t,r,`sizeRepresents`,`bubbleSizeRepresentsWidth`),g(e,t,r,`firstSliceAng`,`startAngle`),g(e,t,r,`holeSize`,`holeSize`),m(e,t,r,`scatterStyle`,`scatterStyle`),this.parseAxisIds(e,t,r),Object.keys(r).length>0){let t=e.getVisitorParamsState().get(`types`);t||(console.warn(`Uninitialized types array in ChartTypeVisitor`),t=[],e.getVisitorParamsState().set(`types`,t)),t.push(r)}return r}parseType(e,t,n){switch(t.localName){case`areaChart`:n.type=`area`;break;case`bubbleChart`:n.type=`bubble`;break;case`doughnutChart`:case`ofPieType`:case`pieChart`:n.type=`pie`;break;case`lineChart`:n.type=`line`;break;case`scatterChart`:n.type=`scatter`}}parseAxisIds(e,t,n){let r=e.evaluate(`axId`,t);r&&r.length!==0&&(n.xAxisId=r.item(0).getAttribute(`val`),n.yAxisId=r.item(1).getAttribute(`val`))}},D=(e,t,n)=>{if(!0===e.getValAttrAsBoolean(`invertIfNegative`,t))if(e.evaluate(`extLst/ext/invertSolidFillFmt`,t)){if(n.fill&&n.fillNegative){let t=e.getFromPath(n,`fill.solid.adjs`);t&&e.setToPath(n,`fillNegative.solid.adjs`,t)}}else{let e={val:`FFFFFF`},t={};t.solid=e,n.fillNegative=t;let r={val:`000000`},i={};i.solid=r;let a={};a.fill=i,n.strokeNegative=a}},O=class extends S{constructor(e=`text`){super(),this._jsonKey=e}getTextPath(){return this._jsonKey}visit(e,t,n){let r=e.getFromPath(n,this.getTextPath());return r||={},this.parseTextElement(e,t,r,!1),Object.keys(r).length>0&&e.setToPath(n,this.getTextPath(),r),n}parseTextElement(e,t,n,r){let i=e.evaluate(`p/pPr/defRPr`,t)??e.evaluate(`defRPr`,t);i&&(this.parseTextProperties(e,i,n),new T().visit(e,i,n));let a=n.runs??[],o=e.evaluate(`p/r`,t)??e.evaluate(`r`,t),s=t=>{let n={},r=e.evaluate(`t`,t),i=e.evaluate(`rPr`,t);i&&this.parseTextProperties(e,i,n),r&&r.firstChild?n.text=r.firstChild.textContent??``:t.textContent&&(n.text=t.textContent??``),Object.keys(n).length>0&&a.push(n)};if(o?.length!==void 0)for(let e=0;o&&e<o.length;e++)s(o.item(e));else s(o||t);a.length>0&&(n.runs=a);let c=e.evaluate(`bodyPr`,t);c&&p(c,n)}parseTextProperties(e,t,r){if(!t)return;t.hasAttribute(`sz`)&&(r.size=parseFloat(t.getAttribute(`sz`))/100),t.hasAttribute(`b`)&&(r.weight=t.getAttribute(`b`)===`1`?700:400),t.hasAttribute(`i`)&&(r.italic=t.getAttribute(`i`)===`1`),t.hasAttribute(`u`)&&(r.underline=t.getAttribute(`u`)),t.hasAttribute(`strike`)&&(r.strike=t.getAttribute(`strike`));let i=this.getFill(e,t);i&&Object.keys(i).length>0&&(r.color=i);let a=e.evaluate(`latin`,t);if(a&&!a.getAttribute(`typeface`).startsWith(`+`)){let e=r.font??{};if(a.hasAttribute(`typeface`)&&(e.family=a.getAttribute(`typeface`)),a.hasAttribute(`panose`)){let t=a.getAttribute(`panose`);t&&(e.fallbacks=[n.J.getPanoseFallback(t)])}a.hasAttribute(`pitchFamily`)&&(e.pitch=a.getAttribute(`pitchFamily`)),a.hasAttribute(`charset`)&&(e.charset=a.getAttribute(`charset`)),Object.keys(e).length>0&&(r.font=e)}}},k=class{visit(e,t,n){}processDataBarColor(e,t,n,r,i=`auto`){if(!t)return;let o=a.o(e=>t.getAttribute(e),i);return o&&(n[r]=o),n}processFonts(e,t,n){if(!t)return;let r=t.childNodes,i=0,a=r.length;for(let t=0;t<a;t++){let a=r.item(t);if(a.nodeType===1&&a.localName===`font`){let t={};this.processFont(e,a,t),n[i++]=t}}return n}processFont(e,t,r){e.getValAttrAsBoolean(`b`,t,!0)&&(r.weight=700),e.getValAttrAsBoolean(`i`,t,!0)&&(r.style=n.J.Style.Italic),e.getValAttrAsBoolean(`strike`,t,!0)&&(r.strike=!0);let i=e.evaluate(`u`,t);i&&(r.underline=i.getAttribute(`val`)||n.J.UnderlineStyle.Single),m(e,t,r,`vertAlign`,`verticalAlign`),r.verticalAlign===`superscript`?r.verticalAlign=n.J.VerticalAlignment.Super:r.verticalAlign===`subscript`&&(r.verticalAlign=n.J.VerticalAlignment.Sub),_(e,t,r,`sz`,`size`);let a=e.evaluate(`color`,t);this.processDataBarColor(e,a,r,`color`),r.color||=`auto`,m(e,t,r,`name`,`family`),m(e,t,r,`rFont`,`family`);let o=e.evaluate(`family`,t);if(o){let e=o.getAttribute(`val`);if(e)switch(e){case`1`:r.fallbacks=[`serif`];break;case`2`:r.fallbacks=[`sans-serif`];break;case`3`:r.fallbacks=[`monospace`];break;case`4`:r.fallbacks=[`cursive`];break;case`5`:r.fallbacks=[`fantasy`]}}return m(e,t,r,`scheme`,`scheme`),h(e,t,r,`shadow`,`shadow`,!0),h(e,t,r,`outline`,`outline`,!0),e.getValAttrAsBoolean(`condense`,t,!0)&&(r.letterSpacing=-1),e.getValAttrAsBoolean(`extend`,t,!0)&&(r.letterSpacing=1),g(e,t,r,`charset`,`charset`),r}processFills(e,t,n){if(!t)return;let r=t.childNodes,i=0,a=r.length;for(let t=0;t<a;t++){let a=r.item(t);a.nodeType===1&&a.localName===`fill`&&this.processFill(e,a,n,i++)}return n}processFill(e,t,r,i){let a={type:n.ot.Type.None},o=t.childNodes,s=!1,c=o.length;for(let t=0;!s&&t<c;t++){let n=o.item(t);n.nodeType===1&&(n.localName===`gradientFill`?(this.processGradientFill(e,n,a),s=!0):n.localName===`patternFill`&&(this.processPatternFill(e,n,a),s=!0))}return r[i]=a,r}processGradientFill(e,t,r){if(!t)return;r.type=n.ot.Type.Gradient;let i=[];r.stops=i;let a=t.getAttribute(`type`);a&&(r.gradientType=a);let o=t.hasAttribute(`degree`)?parseFloat(t.getAttribute(`degree`)):0;(o+90)%360!=0&&(r.angle=(o+90)%360),(t.hasAttribute(`left`)||t.hasAttribute(`top`)||t.hasAttribute(`right`)||t.hasAttribute(`bottom`))&&(r.focus={left:A(t.getAttribute(`left`)),top:A(t.getAttribute(`top`)),right:A(t.getAttribute(`right`)),bottom:A(t.getAttribute(`bottom`))});let s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType===1&&n.localName===`stop`){let t={};i.push(t),t.offset=parseFloat(n.getAttribute(`position`)??``);let r=e.evaluate(`color`,n);this.processDataBarColor(e,r,t,`color`)}}return r}processPatternFill(e,t,r){if(!t)return;let i=e.getVisitorParamsState().get(`processingDXFs`),a=t.getAttribute(`patternType`)||(i?n.ot.BuiltInSheetPattern.Solid:n.ot.BuiltInSheetPattern.None);if(a===n.ot.BuiltInSheetPattern.None)return{none:!0};r.type=n.ot.Type.Pattern,a&&(r.patternType=a);let o=`foreground`,s=`background`,c=r.patternType===n.ot.BuiltInSheetPattern.Solid&&i,l=c?`dk1`:`lt1`,u=c?`lt1`:`dk1`;if(c){let e=o;o=s,s=e}let d=e.evaluate(`fgColor`,t);this.processDataBarColor(e,d,r,o,l);let f=e.evaluate(`bgColor`,t);return this.processDataBarColor(e,f,r,s,u),c&&(r.foreground||=`lt1`,r.background||=`dk1`),r}processBorders(e,t,n,r){if(!t)return;let i=t.childNodes,a=0,o=i.length;for(let t=0;t<o;t++){let o=i.item(t);o.nodeType===1&&o.localName===`border`&&this.processBorder(e,o,n,a++,r)}return n}processBorder(e,t,r,i,a){if(!t)return;let o={};return this.processBorderStroke(e,t,o,n.tt.Edge.Left),this.processBorderStroke(e,t,o,n.tt.Edge.Right),a?(o.right||o.left)&&(o.right?o.vertical={...o.right}:o.vertical={...o.left}):this.processBorderStroke(e,t,o,n.tt.Edge.Vertical),this.processBorderStroke(e,t,o,n.tt.Edge.Top),this.processBorderStroke(e,t,o,n.tt.Edge.Bottom),a?(o.bottom||o.top)&&(o.bottom?o.horizontal={...o.bottom}:o.horizontal={...o.top}):this.processBorderStroke(e,t,o,n.tt.Edge.Horizontal),r[i]=o,r}processBorderStroke(e,t,r,i){if(!t)return;let a=e.evaluate(i,t);if(!a)return;let o={};a.hasAttribute(`style`)?o.style=a.getAttribute(`style`):e.getVisitorParamsState().get(`processingDXFs`)&&(o.style=n.tt.StrokeStyle.None);let s=e.evaluate(`color`,a);return s&&this.processDataBarColor(e,s,o,`color`),Object.keys(o).length>0?r[i]=o:null}},A=e=>{if(!e)return 0;let t=parseFloat(e);return isNaN(t)?0:t},j=class{visit(e,t,n){if(!t)return;let r=e.evaluate(`*/cNvPr`,t);return r.item&&(r=r.item(0)),r&&(e.copyFromAttribute(r,`name`,n),e.copyFromAttribute(r,`descr`,n,`description`),e.copyFromAttribute(r,`hidden`,n,`hidden`,e.BOOLEAN_COPY),e.copyFromAttribute(r,`id`,n)),n}},M=class extends j{visit(e,t,n){if(!t)return;if(e.getPath().includes(`Fallback`)&&n.content)return n;n=super.visit(e,t,n);let r=e.evaluate(`nvSpPr/cNvSpPr`,t);if(r){let t=e.evaluate(`spLocks`,r);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}e.warn(`'${n.name}' is not editable; imported as a fixed drawing.`);let i=e.evaluate(`*/cNvPr`,t);i?.item&&(i=i.item(0));let a=i?.getAttribute?.(`id`),o=a?parseInt(a,10):void 0,s={type:`sp`,xml:e.serializeElement(t)??void 0,sourceId:o===void 0||isNaN(o)?void 0:o};return n.content={type:`sp`,json:s},s}},N=`richTypes`,P=`richData`,F=class{visit(e,t,n){if(!t)return;let r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);i.nodeType===1&&i.localName===`Relationship`&&this.processRelationship(e,i,n)}return n}processRelationship(e,t,n){let r={};e.copyFromAttribute(t,`Target`,r,`target`),e.copyFromAttribute(t,`Type`,r,`type`),e.copyFromAttribute(t,`TargetMode`,r,`targetMode`),n[t.getAttribute(`Id`)]=r}},ee=class{visit(e,t,n){let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType!==1)continue;let a=this.processProperty(e,n);a&&r.push(a)}return r.length>0&&(n.properties=r),r}processProperty(e,t){if(t)return t.getAttribute(`xsi:type`),{key:t.localName,value:t.textContent||``}}},te=class{visit(e,t,n){let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType!==1)continue;let a=this.processProperty(e,n);a&&r.push(a)}return r.length>0&&(n.properties=r),r}processProperty(e,t){if(t)return{key:t.localName,value:t.textContent||``}}},ne=class{visit(e,t,n){return h(e,t,n,`roundedCorners`,`roundedCorners`),g(e,t,n,`.//AlternateContent/Fallback/style`,`styleId`),e.getVisitorParamsState().set(`types`,[]),e.getVisitorParamsState().set(`axes`,new Map),n.range=null,n}afterVisit(e,t,n){let r={};n.types=r;let i={},a=0,o={},s=0,c=e.getVisitorParamsState().get(`axes`),l=e.getVisitorParamsState().get(`types`),u=l.length;for(let e=0;e<u;e++){let t=l[e];if(t.xAxisId){let r=t.xAxisId,o=c.get(r);i[e+``]=o,t.offsetXAxis=e,delete t.xAxisId,n.xAxes=i,i.length=++a}if(t.yAxisId){let r=t.yAxisId,i=c.get(r);o[e+``]=i,t.offsetYAxis=e,delete t.yAxisId,n.yAxes=o,o.length=++s}r[e+``]=t}r.length=l.length;let d=e.getVisitorParamsState().get(`series`);if(!d||d.length===0)return;let f={};n.series=f;let p=d.length;for(let e=0;e<p;e++)f[e+``]=d[e];f.length=p,e.getVisitorParamsState().delete(`types`),e.getVisitorParamsState().delete(`axes`),e.getVisitorParamsState().delete(`series`)}},I=class{visit(e,t,n){let r={};return n.plotArea=r,r}},L=T,R=class extends E{parseType(e,t,n){let r=e.getValAttrAsString(`barDir`,t);r&&(n.type=r===`col`?`column`:`bar`)}},z=E,B=class{constructor(e){this.jsonKey=e}visit(e,t,n){let r={},i=r,a=e.getValAttrAsString(`idx`,t);a!==null&&(i={},i[a]=r);let o=e.getValAttrAsBoolean(`delete`,t);this.parseNumFormat(e,t,r),!0===o?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(h(e,t,r,`showBubbleSize`,`showBubbleSize`),h(e,t,r,`showCatName`,`showCatName`),h(e,t,r,`showLeaderLines`,`showLeaderLines`),h(e,t,r,`showPercent`,`showPercentage`),h(e,t,r,`showSerName`,`showSerName`),h(e,t,r,`showVal`,`showVal`),h(e,t,r,`showLegendKey`,`showLegendKey`));let s=e.evaluate(`separator`,t);return s!==null&&(r.separator=s.textContent),m(e,t,r,`dLblPos`,`position`),n[this.jsonKey]=i,r}parseNumFormat(e,t,n){let r=e.evaluate(`numFmt`,t);r&&(n.formatCode=r.getAttribute(`formatCode`),r.hasAttribute(`sourceLinked`)&&(n.sourceLinked=r.getAttribute(`sourceLinked`)===`1`))}},V=class{visit(e,t,n){let r={};g(e,t,r,`explosion`,`explosion`);let i=e.evaluate(`cat/*/f`,t);i||=e.evaluate(`xVal/*/f`,t);let a=null;i!==null&&i.firstChild!==null&&(a=i.firstChild.nodeValue),i||(i=e.evaluate(`cat/strLit`,t),i||=e.evaluate(`cat/numLit`,t),i&&(a=this.parsePointsAsString(e,i))),a!==null&&(r.xRange=a);let o=e.evaluate(`val/*/f`,t);o||=e.evaluate(`yVal/*/f`,t);let s=null;o&&o.firstChild&&(s=o.firstChild.nodeValue),o||(o=e.evaluate(`val/numLit`,t),o!==null&&(s=this.parsePointsAsString(e,o))),s!==null&&(r.valRange=s),this.parseTitleRangeOrValue(e,t,r),g(e,t,r,`idx`,`idx`),h(e,t,r,`smooth`,`smooth`),r.offsetChart=e.getVisitorParamsState().get(`types`).length-1;let c=e.getVisitorParamsState().get(`series`);return c||(c=[],e.getVisitorParamsState().set(`series`,c)),c.push(r),r}parseTitleRangeOrValue(e,t,n){let r=e.evaluate(`tx/strRef/f`,t);if(r!==null){let t=r.firstChild.nodeValue;e.setToPath(n,`title.range`,t)}else{let r=e.evaluate(`tx/v`,t);r!==null&&e.setToPath(n,`title.text.simpleRun`,r.firstChild.nodeValue)}}parsePointsAsString(e,t){let n=`{`,r=e.getValAttrAsInteger(`ptCount`,t),i=e.evaluate(`pt`,t),a=[];for(let n=0;i&&r&&n<r;n++){let r=null,i=e.evaluate(`pt[@idx='`+n+`']/v`,t);i&&(r=i.textContent),a[n]=r}for(let e=0;e<a.length;e++)e>0&&(n+=`,`),a[e]!==void 0&&(n+=a[e]);return n+=`}`,n}afterVisit(e,t,n){D(e,t,n);let r=e.getFromPath(n,`points`);if(r){let t=Object.keys(r);for(let i=0;i<t.length;i++){let a=t[i],o=e.getFromPath(r,a);if(!o)continue;let s=e.getFromPath(o,`markers`);s&&(e.setToPath(n,`markers.points.`+a,s),delete o.markers)}}}},H=class{DataPointVisitor(){}visit(e,t,n){let r=e.getFromPath(n,`points`),i=null;r?i=r:(i={},e.setToPath(n,`points`,i));let a={},o=e.getValAttrAsString(`idx`,t);return o!==null&&(i[o]=a),h(e,t,a,`bubble3D`,`bubble3D`),g(e,t,a,`explosion`,`explosion`),D(e,t,a),a}},U=class{visit(e,t,n){let r=t.parentNode.localName;if(r===`ser`||r===`dPt`){let r={},i=e.getValAttrAsString(`size`,t);i!==null&&(r.size=i);let a=e.getValAttrAsString(`symbol`,t);return a&&(r.type=a),n.markers=r,r}return null}},W=class{visit(e,t,n){let r={};this.parseScaling(e,t,r),_(e,t,r,`majorUnit`,`majorUnits`),_(e,t,r,`minorUnit`,`minorUnits`),h(e,t,r,`delete`,`shown`),this.parseOrientation(e,t,r),this.parseNumFormat(e,t,r),m(e,t,r,`majorTickMark`,`majorTickMarks`),m(e,t,r,`minorTickMark`,`minorTickMarks`),m(e,t,r,`crosses`,`crosses`),_(e,t,r,`crossesAt`,`crosses`),m(e,t,r,`crossBetween`,`crossBetween`),this.parseLabelAlign(e,t,r),g(e,t,r,`lblOffset`,`labelOffset`),m(e,t,r,`tickLblPos`,`labelPosition`);let i=e.getValAttrAsInteger(`noMultiLvlLbl`,t);r.labelMultiLevel=i!==null&&i===0,g(e,t,r,`tickMarkSkip`,`tickMarkSkip`),g(e,t,r,`tickLblSkip`,`labelInterval`),this.parseDisplayCustOrBuiltInUnit(t,e,r),this.parseTimeUnits(e,t,r,`majorUnitDates`,`majorTimeUnit`,`majorUnit`),this.parseTimeUnits(e,t,r,`minorUnitDates`,`minorTimeUnit`,`minorUnit`),m(e,t,r,`baseTimeUnit`,`baseUnitDates`),e.getVisitorParamsState().get(`axes`)||(console.warn(`Uninitialized axes map in AxisVisitor`),e.getVisitorParamsState().set(`axes`,new Map));let a=e.getValAttrAsString(`axId`,t);return e.getVisitorParamsState().get(`axes`).set(a,r),r}parseTimeUnits(e,t,n,r,i,a){let o={},s=e.getValAttrAsString(i,t);s!==null&&(o.dem=s,o.amt=e.getValAttrAsString(a,t)),Object.keys(o).length>0&&(n[r]=o)}parseDisplayCustOrBuiltInUnit(e,t,n){let r=t.getValAttrAsString(`dispUnits/builtInUnit`,e);r||=t.getValAttrAsString(`dispUnits/custUnit`,e),r&&(n.displayUnits=r)}parseLabelAlign(e,t,n){let r=e.getValAttrAsString(`lblAlgn`,t);r!==null&&(r===`ctr`?n.labelAlign=`center`:r===`l`?n.labelAlign=`left`:r===`r`&&(n.labelAlign=`right`))}parseOrientation(e,t,n){let r=e.getValAttrAsString(`AxPos`,t);r!==null&&(r===`b`?n.orientation=`bottom`:r===`l`?n.orientation=`left`:r===`r`?n.orientation=`right`:r===`t`&&(n.orientation=`top`))}parseNumFormat(e,t,n){let r={},i=e.evaluate(`numFmt`,t);i!==null&&(i.hasAttribute(`formatCode`)&&(r.formatCode=i.getAttribute(`formatCode`)),i.hasAttribute(`sourceLinked`)&&(r.sourceLinked=i.getAttribute(`sourceLinked`)===`1`)),Object.keys(r).length>0&&(n.labels=r)}parseScaling(e,t,n){let r=e.getValAttrAsString(`scaling/orientation`,t);r!==null&&(n.inverted=r!==`minMax`);let i=e.getValAttrAsFloat(`scaling/logBase`,t);i!==null&&(n.logBase=i,n.scaleType=`log`),_(e,t,n,`scaling/max`,`max`),_(e,t,n,`scaling/min`,`min`)}afterVisit(e,t,n){n.fill&&n.labels&&(n.labels.fill=n.fill,delete n.fill);let r=e.getValAttrAsBoolean(`delete`,t);r!==null&&(e.setToPath(n,`labels.shown`,!0!==r),e.setToPath(n,`shown`,!0!==r));let i=e.getFromPath(n,`dispUnits.displayUnitsLabel`);i&&(e.setToPath(n,`displayUnitsLabel`,i),delete n.dispUnits);let a=e.evaluate(`title`,t);e.setToPath(n,`title.shown`,a!==null);let o=e.evaluate(`minorGridlines`,t);e.setToPath(n,`gridLinesMinor.shown`,o!==null);let s=e.evaluate(`majorGridlines`,t);e.setToPath(n,`gridLinesMajor.shown`,s!==null)}},G=O,K=class{visit(e,t,n){let r=e.getVisitorParamsState().get(`series`),i=e.getValAttrAsInteger(`idx`,t),a=i===null?void 0:r[i];if(a){let n=e.getFromPath(a,`title`);n||(n={},e.setToPath(a,`title`,n));let r=n,i=e.getValAttrAsBoolean(`delete`,t);return i!==null&&(r.shown=!i),r}return n}},q=class{visit(e,t,n){let r={};return h(e,t,r,`overlay`,`overlay`),m(e,t,r,`legendPos`,`position`),n.legend=r,r}},J=class extends T{visit(e,t,n){let r=this.getFill(e,t);Object.keys(r).length>0&&(n.fillNegative=r);let i=this.getStroke(e,t);return Object.keys(i).length>0&&(n.strokeNegative=i),n}},Y=class extends O{constructor(e=`title`){super(e)}parseTitleRangeOrValue(e,t,n){let r=e.evaluate(`tx/strRef/f`,t)??null;if(r){let t=r.firstElementChild.nodeValue;e.setToPath(n,`range`,t)}}visit(e,t,n){let r={};h(e,t,r,`overlay`,`overlay`),n[this._jsonKey]=r;let i=e.getFromPath(r,this.getTextPath());i||={},this.parseTitleRangeOrValue(e,t,r);let a=e.evaluate(`txPr`,t);a&&this.parseTextElement(e,a,i,!1);let o=e.evaluate(`tx/rich`,t);return o&&this.parseTextElement(e,o,i,!0),Object.keys(i).length>0&&e.setToPath(r,`text`,i),r}afterVisit(e,t,n){if(n?.text){let e=n.text?.rotation??null;e!==null&&(n.rotation=parseInt(e),delete n.title.rotation)}}},X=class{visit(e,t,n){let r=e.evaluate(`manualLayout`,t);if(r){let t={};_(e,r,t,`x`,`x`),_(e,r,t,`y`,`y`),_(e,r,t,`w`,`w`),_(e,r,t,`h`,`h`),m(e,r,t,`xMode`,`xMode`),m(e,r,t,`yMode`,`yMode`),m(e,r,t,`wMode`,`wMode`),m(e,r,t,`hMode`,`hMode`),Object.keys(t).length>0&&(n.manualLayout=t)}return n}},Z=class{visit(e,t,n){return n.name=t.getAttribute(`name`),n}},re=class extends S{visit(e,t,n){let r={};r.name=t.getAttribute(`name`);let i=t.childNodes,a=i.length;for(let n=0;n<a;n++){let a=i.item(n);if(a.nodeType===1){let n=a.localName,i=e.evaluate(n,t);r[n]=this.processAdjColor(e,i)}}return Object.keys(r).length>0&&(n.colors=r),r}},ie=class{visit(e,t,n){let r={};r.name=t.getAttribute(`name`);let i=e.evaluate(`majorFont`,t),a=this.processFontElement(e,i,{});a&&(r.majorFont=a.family,a.fallbacks&&(r.majorFallbacks=a.fallbacks));let o=e.evaluate(`minorFont`,t),s=this.processFontElement(e,o,{});return s&&(r.minorFont=s.family,s.fallbacks&&(r.minorFallbacks=s.fallbacks)),n.fonts=r,r}processFontElement(e,t,r){if(!t)return;let i=e.evaluate(`latin`,t);if(!i)return;let a=i.getAttribute(`typeface`);a&&(r.family=a);let o=i.getAttribute(`panose`);return o&&(r.fallbacks=[n.J.getPanoseFallback(o)]),r}},ae=class extends S{visit(e,t,n){let r=this.parseFillList(e,t,`fillStyleLst`),i=this.parseLnList(e,t,`lnStyleLst`),a=this.parseEffectStyleList(e,t,`effectStyleLst`),o=this.parseFillList(e,t,`bgFillStyleLst`);if(r&&i&&a&&o)return n.fillStyleLst=r,n.lnStyleLst=i,n.effectStyleLst=a,void(n.bgFillStyleLst=o);let s=e.serializeElement(t);s&&(n.formatSchemeXml=s)}parseFillList(e,t,n){let r=e.evaluate(n,t);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType!==1)continue;let r=this.parseFillListItem(e,n);if(r===void 0)return;i.push(r)}return i}parseFillListItem(e,t){switch(t.localName){case`noFill`:return{type:n.ot.Type.None};case`solidFill`:{let r=this.processAdjColor(e,t);return r?{type:n.ot.Type.Solid,color:r}:void 0}case`gradFill`:return this.processGradFill(e,t);case`pattFill`:return this.processPatternFill(e,t);default:return}}parseLnList(e,t,n){let r=e.evaluate(n,t);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType===1){if(e.evaluate(`headEnd`,n)||e.evaluate(`tailEnd`,n))return;i.push(this.parseLn(e,n))}}return i}parseEffectStyleList(e,t,n){let r=e.evaluate(n,t);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType!==1)continue;if(e.evaluate(`scene3d`,n)||e.evaluate(`sp3d`,n))return;let r=this.getEffects(e,n);if(r===void 0)return;i.push(r??[])}return i}},oe=class{visit(e,t,n){if(!t)return;let r={},i=t.getAttribute(`r:id`);if(i){let t=e.getRef(i);typeof t==`string`&&(r.address=t)}return e.copyFromAttribute(t,`tooltip`,r,`screenTip`),e.copyFromAttribute(t,`history`,r,`history`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`tgtFrame`,r,`target`),n.hyperlink=r,r}},se=class{visit(e,t,n){if(!t)return;let r={},i=[];return this.processFilterColumns(e,t,i,n),i.length>0&&(r.conditions=i),Object.keys(r).length>0&&(n.filter=r),r}processColorFilter(e,t){let r={},i={operator:n.I.BuiltInOperatorNames.Color,param:r};return e.copyFromAttribute(t,`cellColor`,r,`cellColor`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`dxfId`,r,`styleId`,e.INT_COPY),i}processCustomFilter(e,t){return{operator:t.getAttribute(`operator`),param:t.getAttribute(`val`)}}processCustomFilters(e,t){let r=t.getAttribute(`and`),i=r===`and`||r===`1`;t.getAttribute(`val`);let a=[],o={operator:i?n.I.BuiltInOperatorNames.And:n.I.BuiltInOperatorNames.Or,param:a},s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType!==1)continue;let r=null;n.localName===`customFilter`&&(r=this.processCustomFilter(e,n)),r&&a.push(r)}return o}processDynamicFilter(e,t){let r={},i={operator:n.I.BuiltInOperatorNames.TimePeriod,param:r},a=t.getAttribute(`type`);return a===`aboveAverage`?a=n.I.AverageType.Above:a===`belowAverage`&&(a=n.I.AverageType.Below),Object.values(n.I.AverageType).includes(a)?(i.operator=n.I.BuiltInOperatorNames.Average,e.copyFromAttribute(t,`val`,r,`stdDevs`,e.INT_COPY)):e.copyFromAttribute(t,`val`,r,`anchorDate`,e.INT_COPY),e.copyFromAttribute(t,`type`,r,`operator`),e.copyFromAttribute(t,`maxVal`,r,`maxVal`,e.INT_COPY),i}processDateGroupItem(e,t){let n={};return e.copyFromAttribute(t,`dateTimeGrouping`,n,`group`),e.copyFromAttribute(t,`day`,n,`day`,e.INT_COPY),e.copyFromAttribute(t,`hour`,n,`hour`,e.INT_COPY),e.copyFromAttribute(t,`minute`,n,`minute`,e.INT_COPY),e.copyFromAttribute(t,`month`,n,`month`,e.INT_COPY),e.copyFromAttribute(t,`second`,n,`second`,e.INT_COPY),e.copyFromAttribute(t,`year`,n,`year`,e.INT_COPY),n}processFilterItem(e,t){if(t.hasAttribute(`val`))return t.getAttribute(`val`)}processFilters(e,t){let r={},i={operator:n.I.BuiltInOperatorNames.InSet,param:r};e.copyFromAttribute(t,`blank`,i,`blank`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calendarType`,i,`calendarType`);let a=[],o=[],s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType===1){if(n.localName===`dateGroupItem`){let t=this.processDateGroupItem(e,n);t&&a.push(t)}else if(n.localName===`filter`){let t=this.processFilterItem(e,n);t!==void 0&&o.push(t)}}}return a.length>0&&(r.dateGroups=a),o.length>0&&(r.items=o),i}processIcon(e,t){let r={},i={operator:n.I.BuiltInOperatorNames.Icon,param:r};return e.copyFromAttribute(t,`iconId`,r,`iconId`,e.INT_COPY),e.copyFromAttribute(t,`iconSet`,r),i}processTop10(e,t){let r={},i={operator:n.I.BuiltInOperatorNames.TopN,param:r};return e.copyFromAttribute(t,`filterVal`,r,`filterVal`,e.FLOAT_COPY),e.copyFromAttribute(t,`percent`,r,`percent`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`top`,r,`top`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`val`,r,`val`,e.FLOAT_COPY),i}processFilterCriteria(e,t){if(!t)return;let n,r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);i.nodeType===1&&(i.localName===`colorFilter`?n=this.processColorFilter(e,i):i.localName===`customFilters`?n=this.processCustomFilters(e,i):i.localName===`dynamicFilter`?n=this.processDynamicFilter(e,i):i.localName===`filters`?n=this.processFilters(e,i):i.localName===`iconFilter`?n=this.processIcon(e,i):i.localName===`top10`&&(n=this.processTop10(e,i)))}return n}processFilterColumn(e,t,n){if(!t)return null;if(!t.hasAttribute(`colId`))return;let r=parseInt(t.getAttribute(`colId`)),i=!1;if(t.hasAttribute(`hiddenButton`)&&(i=a.p(t.getAttribute(`hiddenButton`))),i&&n){let e=n.hiddenButtons;e||(e=[],n.hiddenButtons=e),e.push(r)}let o=!1;if(t.hasAttribute(`showButton`)&&(o=a.p(t.getAttribute(`showButton`))),o&&n){let e=n.showButtons;!0!==e&&(e||(e=[],n.showButtons=e),e[r]=!0)}let s=this.processFilterCriteria(e,t);return s?(s.index=r,s):null}processFilterColumns(e,t,n,r){if(!t)return;let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let a=i.item(t);if(a.nodeType===1&&a.localName===`filterColumn`){let t=this.processFilterColumn(e,a,r);t&&n.push(t)}}return n}},ce=class{visit(e,r,i){if(!r)return;let o=r.getAttribute(`ref`),s={};r.hasAttribute(`caseSensitive`)&&(s.collatorOptions=a.p(r.getAttribute(`caseSensitive`))?n.p.CaseSensitiveOptions:n.p.CaseInsensitiveOptions);let c=r.getAttribute(`sortMethod`);c!=null&&c!==`none`&&(c===`stroke`?s.collatorOptions={...s.collatorOptions,collation:`stroke`}:c===`pinYin`&&(s.collatorOptions={...s.collatorOptions,collation:`pinyin`}));let l={};r.hasAttribute(`columnSort`)&&a.p(r.getAttribute(`columnSort`))&&(l.axis=t.l.Axis.Column);let u=n.D.fastStringToRange(o),d=[];return this.processSortConditions(e,r,d,u,s),d.length>0&&(l.sorts=d),Object.keys(d).length>0&&(i.sort=l),l}processSortCondition(e,t,r,i){if(!t)return null;let o={};if(!t.hasAttribute(`ref`))return void console.warn(`no ref for sort conditional`,e.getPath());if(t.hasAttribute(`ref`)){let e=t.getAttribute(`ref`),i=n.D.fastStringToRange(e);o.index=r?i.colStart-r.colStart:i.colStart}let s={...i};return o.criteria=s,s.reverse=!1,t.hasAttribute(`descending`)&&(s.reverse=a.p(t.getAttribute(`descending`))),e.copyFromAttribute(t,`sortBy`,s,`sortOn`),e.copyFromAttribute(t,`dxfId`,s),e.copyFromAttribute(t,`iconSet`,s),e.copyFromAttribute(t,`customList`,s),o}processSortConditions(e,t,n,r,i){if(!t)return;let a=t.childNodes,o=a.length;for(let t=0;t<o;t++){let o=a.item(t);if(o.nodeType===1&&o.localName===`sortCondition`){let t=this.processSortCondition(e,o,r,i);t&&n.push(t)}}}},le=class extends k{visit(e,t,r){this.processNumFmts(e,e.evaluate(`numFmts`,t),null),e.getVisitorParamsState().set(`colorsToProcess`,new Set);let i={fills:{},fonts:{},borders:{}};this.processFonts(e,e.evaluate(`fonts`,t),i.fonts),this.processFills(e,e.evaluate(`fills`,t),i.fills),this.processBorders(e,e.evaluate(`borders`,t),i.borders,!0),i.fills[0]={type:n.ot.Type.None},i.fills[1]={type:n.ot.Type.Pattern,patternType:n.ot.BuiltInSheetPattern.Gray125},i.borders[0]={bottom:{style:n.tt.StrokeStyle.None},left:{style:n.tt.StrokeStyle.None},right:{style:n.tt.StrokeStyle.None},top:{style:n.tt.StrokeStyle.None}};let a=[];this.processXFs(e,e.evaluate(`cellStyleXfs`,t),a,i,null,!1);let o=new Map;if(a.length>0){let n=[];this.processCellStyles(e,e.evaluate(`cellStyles`,t),n,a,o),r.named=n}let s=[];this.processXFs(e,e.evaluate(`cellXfs`,t),s,i,o),Object.keys(s).length>0&&(r.direct=s);let c=[];return this.processDXFs(e,e.evaluate(`dxfs`,t),c),this.processTableStyles(e,e.evaluate(`tableStyles`,t),r,c),this.processIndexColors(e,e.evaluate(`colors/indexedColors`,t),r),this.processMruColors(e,e.evaluate(`colors/mruColors`,t),r),r}processIndexColors(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`rgbColor`){let t={color:null};this.processDataBarColor(e,n,t,`color`),t.color&&r.push(t.color)}}n.indexedColors=r}processMruColors(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`color`){let t={color:null};this.processDataBarColor(e,n,t,`color`),t.color&&r.push(t.color)}}r.length>0&&(n.mruColors=r)}processNumFmts(e,t,n){if(!t)return;let r=new Map;if(e.getVisitorParamsState().set(`numFmts`,r),!t)return;let i=t.childNodes,a=i.length;for(let e=0;e<a;e++){let t=i.item(e);if(t.nodeType===1&&t.localName===`numFmt`){let e=t.getAttribute(`numFmtId`),n=t.getAttribute(`formatCode`);if(e&&n){let t=n;r.set(parseInt(e),t)}}}}processXFs(e,t,n,r,i=null,a=!0){if(!t)return;let o=t.childNodes,s=o.length;for(let t=0;t<s;t++){let s=o.item(t);if(s.nodeType===1&&s.localName===`xf`){let t={};this.processXF(e,s,t,r,i,a),n.push(t)}}}processXF(e,t,r,i,o,s){if(!t)return;let c=t.getAttribute(`xfId`);if(c&&o){let e=o.get(parseInt(c));e&&e!==n.nt.BuiltInName.Normal&&(r.named=e)}let l=e=>!(!s&&t.hasAttribute(e))||a.p(t.getAttribute(e)),u=e=>!s||t.hasAttribute(e)&&a.p(t.getAttribute(e)),d=s?`0`:void 0;if(l(`applyFont`)){let e=t.getAttribute(`fontId`)??d;if(e!==void 0&&(e!==`0`||u(`applyFont`))){let t=i.fonts[e];t!==void 0&&(r.font=t)}}if(l(`applyFill`)){let e=t.getAttribute(`fillId`)??d;if(e!==void 0&&(e!==`0`||u(`applyFill`))){let t=i.fills[e];t!==void 0&&Object.keys(t).length>0&&(r.fill=t)}}if(l(`applyBorder`)){let e=t.getAttribute(`borderId`)??d;if(e!==void 0&&(e!==`0`||u(`applyBorder`))){let t=i.borders[e];t!==void 0&&(r.border=t)}}if(l(`applyNumberFormat`)){let n=t.getAttribute(`numFmtId`)??d;if(n!==void 0&&(n!==`0`||u(`applyNumberFormat`))){let t,i=parseInt(n),a=e.getVisitorParamsState();if(a){let e=a.get(`numFmts`);e&&(t=e.get(i)),r.numberFormat=t??i}else console.warn(`no visitor params state`)}}if(l(`applyAlignment`)){let n=e.evaluate(`alignment`,t);(n||u(`applyAlignment`))&&this.processAlignment(e,n,r)}if(l(`applyProtection`)){let n=e.evaluate(`protection`,t);(n||u(`applyProtection`))&&this.processProtection(e,n,r)}let f=a.p(t.getAttribute(`quotePrefix`)??``);f&&(r.quotePrefix=f)}processAlignment(e,t,r){let i={};if(t?.hasAttribute(`horizontal`)?i.horizontal=t.getAttribute(`horizontal`):i.horizontal=n.pn.HorizontalAlignment.General,t?.hasAttribute(`vertical`)?i.vertical=t.getAttribute(`vertical`):i.vertical=n.pn.VerticalAlignment.Bottom,t?.hasAttribute(`indent`)?i.indent=parseInt(t.getAttribute(`indent`)):i.indent=0,t?.hasAttribute(`relativeIndent`)?i.relativeIndent=parseInt(t.getAttribute(`relativeIndent`)):i.relativeIndent=0,a.p(t?.getAttribute(`wrapText`)??``)?i.overflow=n.pn.Overflow.Wrap:i.overflow=n.pn.Overflow.Visible,a.p(t?.getAttribute(`shrinkToFit`)??``)&&(i.overflow=n.pn.Overflow.Shrink),t?.hasAttribute(`textRotation`)){let e=parseFloat(t.getAttribute(`textRotation`));e>0&&e<=90?e=360-e:e>90&&e<=180?e-=90:e===255&&(e=0,i.stacked=!0),i.rotation=e}else i.rotation=0;t?.hasAttribute(`justifyLastLine`)&&(i.justifyLastLine=a.p(t.getAttribute(`justifyLastLine`)));let o=t?.getAttribute(`readingOrder`);return o&&(o===`0`?i.readingDirection=n.pn.ReadingDirection.Auto:o===`1`?i.readingDirection=n.pn.ReadingDirection.LeftToRight:o===`2`?i.readingDirection=n.pn.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(i).length>0&&(r.alignment=i),r}processProtection(e,t,n){if(!t)return;let r={},i=t.getAttribute(`locked`);i&&!a.p(i)&&(r.edit=!0);let o=t.getAttribute(`hidden`);return o&&a.p(o)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(n.protection=r),n}processDXF(e,t,n){if(!t)return;let r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);if(i.nodeType===1&&i.localName===`font`){let t={};this.processFont(e,i,t),n.font=t}else if(i.nodeType===1&&i.localName===`fill`){let t=[];this.processFill(e,i,t,0),t.length>0&&t[0]&&(n.fill=t[0])}else if(i.nodeType===1&&i.localName===`border`){let t=[];this.processBorder(e,i,t,0,!1),t.length>0&&t[0]&&(n.border=t[0])}else if(i.nodeType===1&&i.localName===`numFmt`){let e=i.getAttribute(`formatCode`);if(e)n.numberFormat=e;else{let e=i.getAttribute(`numFmtId`);e&&(n.numberFormat=Number(e))}}else i.nodeType===1&&i.localName===`alignment`&&this.processAlignment(e,i,n)}}processDXFs(e,t,n){if(!t)return;e.getVisitorParamsState().set(`processingDXFs`,!0);let r=new Map;e.getVisitorParamsState().set(`dxfs`,r);let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let a=i.item(t);if(a.nodeType===1&&a.localName===`dxf`){let t={};this.processDXF(e,a,t);let i=n.length;r.set(i,t),n.push(t)}}e.getVisitorParamsState().delete(`processingDXFs`)}processTableStyle(e,t,n,r,i=!1){let o=t.getAttribute(`name`),s={name:o};t.hasAttribute(`table`)&&(s.table=a.p(t.getAttribute(`table`))),t.hasAttribute(`pivot`)&&(s.pivot=a.p(t.getAttribute(`pivot`))),i&&!s.pivot&&r.unshift(null);let c=t.childNodes,l=c.length;for(let e=0;e<l;e++){let t=c.item(e);if(t.nodeType===1&&t.localName===`tableStyleElement`){let e=t.getAttribute(`type`),n=t.getAttribute(`dxfId`),i=n==null?void 0:r?.[n];i||=(console.warn(`invalid dfx id`,n),{}),s[e]=i;let a=null;t.hasAttribute(`size`)&&(a=parseInt(t.getAttribute(`size`))),a&&!isNaN(a)&&(i.size=a)}}delete s.name,n[o]=s}processTableStyles(e,t,n,r,i){if(!t)return;let a={},o=t.getAttribute(`defaultTableStyle`);o&&(a.defaultTableStyle=o);let s=t.getAttribute(`defaultPivotStyle`);s&&(a.defaultPivotStyle=s);let c=t.childNodes,l={},u=c.length;for(let t=0;t<u;t++){let n=c.item(t);n.nodeType===1&&n.localName===`tableStyle`&&this.processTableStyle(e,n,l,r,i)}return Object.keys(l).length>0&&(a.styles=l),Object.keys(a).length>0&&(n.tables=a),n}processCellStyles(e,t,r,i,o){if(!t)return;let s=t.childNodes,c=s.length;for(let e=0;e<c;e++){let t=s.item(e);if(t.nodeType===1&&t.localName===`cellStyle`){let e=parseInt(t.getAttribute(`xfId`)??``),s=t.getAttribute(`name`),c=t.getAttribute(`builtinId`),l=s;if(c!==null){let e=n.nt.builtInNameFromId(parseInt(c));e!==void 0&&(l=e)}if(o.set(e,l),!i[e])continue;let u={name:l,style:i[e]};t.getAttribute(`hidden`)&&(u.hidden=a.p(t.getAttribute(`hidden`))),t.getAttribute(`iLevel`)&&(u.iLevel=parseInt(t.getAttribute(`iLevel`))),r.push(u)}}}afterVisit(e,t,n){}},ue=class extends k{visit(e,t,n){return this.processSheetRefs(e,e.evaluate(`sheets`,t),n),this.processExternalReferences(e,e.evaluate(`externalReferences`,t),n),this.processBookViews(e,e.evaluate(`bookViews`,t),n),this.processDefinedNames(e,e.evaluate(`definedNames`,t),n),this.processCalcPr(e,e.evaluate(`calcPr`,t),n),this.processWorkbookProtection(e,e.evaluate(`workbookProtection`,t),n),this.processWorkbookPr(e,e.evaluate(`workbookPr`,t),n),n}processPassword(e,t,n,r=`workbook`,i=`password`){if(!t)return;let a={};e.copyFromAttribute(t,`${r}AlgorithmName`,a,`algorithm`),e.copyFromAttribute(t,`${r}HashValue`,a,`hash`),e.copyFromAttribute(t,`${r}SaltValue`,a,`salt`),e.copyFromAttribute(t,`${r}SpinCount`,a,`spinCount`,e.INT_COPY),Object.keys(a).length>0&&(n[i]=a)}processWorkbookProtection(e,t,n){if(!t)return;let r={};return this.processPassword(e,t,r,`workbook`,`password`),this.processPassword(e,t,r,`revisions`,`revisionsPassword`),e.copyFromAttribute(t,`lockStructure`,r,`structure`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`lockWindows`,r,`windows`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`lockRevision`,r,`revision`,e.BOOLEAN_COPY),n.protection=r,n}processCalcPr(e,t,n){t&&(n.calc={})}processSheetRefs(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);n.nodeType===1&&n.localName===`sheet`&&this.processSheetRef(e,n,r)}n.sheets=r}processSheetRef(e,t,n){let r={};e.copyFromAttribute(t,`name`,r,`name`),e.copyFromAttribute(t,`state`,r,`visibility`);let i=t.getAttribute(`r:id`),a=e.getRef(i);a&&(r.sheet=a),n.push(r)}processExternalReferences(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`externalReference`){let t=n.getAttribute(`r:id`),i=t?e.getRef(t):null;r.push(i??null)}}r.length>0&&(n.externalBooks=r)}processBookViews(e,t,n){if(!t)return;let r=t.childNodes,i=0,a=r.length;for(let t=0;i<1&&t<a;t++){let a=r.item(t);a.nodeType===1&&a.localName===`workbookView`&&(this.processWorkbookView(e,a,n),i++)}}processWorkbookView(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`activeTab`,r,`activeSheetId`,[e.INT_COPY,e=>e]),t.hasAttribute(`activeTab`)||(r.activeSheetId=0),e.copyFromAttribute(t,`showHorizontalScroll`,r,`showHorizontalScrollbar`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`showVerticalScroll`,r,`showVerticalScrollbar`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`showSheetTabs`,r,`showTabs`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`tabRatio`,r,`tabRatio`,[e.FLOAT_COPY,e=>e]),Object.keys(r).length>0&&(n.view=r)}processDefineName(e,t,n,r){if(!t)return;let i={},a=t.firstChild;if(a&&a.nodeType===3&&(i.ref=a.textContent),e.copyFromAttribute(t,`name`,i),e.copyFromAttribute(t,`comment`,i),e.copyFromAttribute(t,`hidden`,i,`hidden`,e.BOOLEAN_COPY),t.hasAttribute(`localSheetId`)){let e=t.getAttribute(`localSheetId`);if(!r[e]?.name)return void console.warn(`Defined name '${t.getAttribute(`name`)}' references a sheet with localSheetId '${e}' which does not exist.`);i.scope=r[e].name}e.copyFromAttribute(t,`customMenu`,i),e.copyFromAttribute(t,`description`,i),e.copyFromAttribute(t,`statusBar`,i),e.copyFromAttribute(t,`help`,i),e.copyFromAttribute(t,`shortcutKey`,i),e.copyFromAttribute(t,`function`,i,`function`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`functionGroupId`,i,`functionGroupId`,e.INT_COPY),e.copyFromAttribute(t,`publishToServer`,i,`publishToServer`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`vbProcedure`,i,`vbProcedure`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`xlm`,i,`xlm`,e.BOOLEAN_COPY),Object.keys(i).length>0&&n.push(i)}processDefinedNames(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let a=i.item(t);a.nodeType===1&&a.localName===`definedName`&&this.processDefineName(e,a,r,n.sheets)}r.length>0&&(n.names=r)}processWorkbookPr(e,t,n){t&&e.copyFromAttribute(t,`date1904`,n,`date1904`,e.BOOLEAN_COPY)}afterVisit(e,t,n){}},de=class{visit(e,t,n){let r={};return e.copyFromAttribute(t,`ref`,n,`r`),e.getVisitorParamsState().set(`ref`,n.r),n.v=r,e.copyFromAttribute(t,`name`,r),e.copyFromAttribute(t,`displayName`,r),e.copyFromAttribute(t,`headerRowCount`,r,`headerRowCount`,e.INT_COPY),e.copyFromAttribute(t,`totalsRowCount`,r,`totalsRowCount`,e.INT_COPY),this.processTableColumns(e,t,r),this.processTableStyleInfo(e,t,r),e.copyFromAttribute(t,`id`,r),e.copyFromAttribute(t,`comment`,r,`description`),e.copyFromAttribute(t,`connectionId`,r,`connectionId`,e.INT_COPY),e.copyFromAttribute(t,`tableType`,r),e.copyFromAttribute(t,`published`,r,`published`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`insertRow`,r,`insertRow`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`insertRowShift`,r,`insertRowShift`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`totalsRowShown`,r,`totalsRowShown`,e.BOOLEAN_COPY),r}afterVisit(e,t,n){let r=n.v;if(e.evaluate(`autoFilter`,t)){if(Array.isArray(r.hiddenButtons)){let e=r.hiddenButtons.length;e===0?r.hiddenButtons=!1:e===r.columns?.length&&(r.hiddenButtons=!0)}}else r.hiddenButtons=!0,r.showButtons=!1;return r}processTableStyleInfo(e,t,n){if(!t)return;let r=t.childNodes,i={},a=r.length;for(let t=0;t<a;t++){let n=r.item(t);n.nodeType===1&&n.localName===`tableStyleInfo`&&(e.copyFromAttribute(n,`name`,i),e.copyFromAttribute(n,`showColumnStripes`,i,`showColumnStripes`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`showFirstColumn`,i,`showFirstColumn`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`showLastColumn`,i,`showLastColumn`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`showRowStripes`,i,`showRowStripes`,e.BOOLEAN_COPY))}Object.keys(i).length>0&&(n.style=i)}processTableColumn(e,t,n){if(!t)return null;let r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);if(i.nodeType===1&&i.localName===`tableColumn`){let t={};e.copyFromAttribute(i,`name`,t),e.copyFromAttribute(i,`id`,t),e.copyFromAttribute(i,`uniqueName`,t),e.copyFromAttribute(i,`queryTableFieldId`,t),e.copyFromAttribute(i,`totalsRowLabel`,t);let r=i.getAttribute(`totalsRowFunction`);if(r!==null)if(r===`custom`){let n=e.evaluate(`totalsRowFormula`,i);n&&(t.totalsRowFormula=n.textContent)}else t.totalsRowFormula=r;e.copyFromAttribute(i,`totalsRowLabel`,t),n.push(t)}}return n}processTableColumns(e,t,n){let r=t.childNodes,i=[],a=r.length;for(let t=0;t<a;t++){let n=r.item(t);n.nodeType===1&&n.localName===`tableColumns`&&this.processTableColumn(e,n,i)}i.length>0&&(n.columns=i)}},fe=class{visit(e,t,n){let r=e.getVisitorParamsState().get(`ref`);if(r){let n=e.getVisitorParamsState().get(`descriptions`);n&&(n.add(r,t.getAttribute(`altText`)),n.add(r,t.getAttribute(`altTextSummary`)))}return e.copyFromAttribute(t,`altText`,n),e.copyFromAttribute(t,`altTextSummary`,n),n}},pe=class{visit(e,t,n){let r=t.childNodes,i=r.length,a=null;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType===1){t.localName===`externalBook`&&(a=t);break}}return a?(t.getAttribute(`mc:Ignorable`)&&(n.mceIgnorable=!0),n.sheetNames=[],this.processSheetNames(e,a,n),this.processDefinedNames(e,a,n),this.processSheetDataSet(e,a,n),n):n}processSheetNames(e,t,n){let r=this._findChild(t,`sheetNames`);if(!r)return;let i=r.childNodes,a=i.length;for(let e=0;e<a;e++){let t=i.item(e);t.nodeType===1&&t.localName===`sheetName`&&n.sheetNames.push(t.getAttribute(`val`)??``)}}processDefinedNames(e,t,n){let r=this._findChild(t,`definedNames`);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let e=0;e<o;e++){let t=a.item(e);if(t.nodeType!==1||t.localName!==`definedName`)continue;let n=t.getAttribute(`name`);if(!n)continue;let r={name:n,refersTo:t.getAttribute(`refersTo`)??``},o=t.getAttribute(`sheetId`);o!==null&&(r.sheetIndex=parseInt(o,10)),i.push(r)}i.length>0&&(n.definedNames=i)}processSheetDataSet(e,t,n){let r=this._findChild(t,`sheetDataSet`);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType!==1||n.localName!==`sheetData`)continue;let r=n.getAttribute(`sheetId`);if(r===null)continue;let o=this.processSheetData(e,n);o.sheetIndex=parseInt(r,10),n.getAttribute(`refreshError`)===`1`&&(o.refreshError=!0),i.push(o)}i.length>0&&(n.sheetDataSet=i)}processSheetData(e,t){let r=new n.Ct.Builder,i=t.childNodes,a=i.length;for(let e=0;e<a;e++){let t=i.item(e);if(t.nodeType!==1||t.localName!==`row`)continue;let a=t.childNodes,o=a.length;for(let e=0;e<o;e++){let t=a.item(e);if(t.nodeType!==1||t.localName!==`cell`)continue;let i=t.getAttribute(`r`);if(!i)continue;let o=n.D.fastStringToCell(i);if(o?.rowIndex===void 0||o?.colIndex===void 0)continue;let s=this._readCellValue(t);s!==void 0&&r.pushAt(o.rowIndex,o.colIndex,s)}}return{sheetIndex:-1,data:r.build()?.tuples??[]}}_readCellValue(e){let n=this._findChild(e,`v`)?.textContent?.trim();if(n!==void 0&&n!==``)switch(e.getAttribute(`t`)){case null:case`n`:return parseFloat(n);case`b`:return n===`1`||n===`true`;case`str`:default:return n;case`e`:{let e=t.a.getBuiltInByLabel(n);return e?{t:`e`,v:e.getCode()}:n}}}_findChild(e,t){let n=e.childNodes,r=n.length;for(let e=0;e<r;e++){let r=n.item(e);if(r.nodeType===1&&r.localName===t)return r}return null}},me=class{visit(e,t,n){e.copyFromAttribute(t,`name`,n),e.copyFromAttribute(t,`sourceName`,n);let r=e.evaluate(`*/tableSlicerCache`,t);return r?(e.copyFromAttribute(r,`tableId`,n),e.copyFromAttribute(r,`column`,n,`columnId`),e.copyFromAttribute(r,`crossFilter`,n),n):(console.warn(`SlicerCacheDefinitionVisitor: missing tableSlicerCache element`),n)}},he=class{visit(e,t,n){let r=n.slicers;r||(r={},n.slicers=r);let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);n.nodeType===1&&n.localName===`slicer`&&this.processSlicer(e,n,r)}return r}processSlicer(e,t,n){if(!t)return;let r={};n[t.getAttribute(`name`)]=r;let i=t.getAttribute(`cache`),a=e.getVisitorParamsState().get(`slicerCaches`);if(i){let e=a.get(i);e&&(r.columnId=e.columnId,r.tableId=e.tableId)}e.copyFromAttribute(t,`caption`,r),e.copyFromAttribute(t,`startItem`,r,`startItem`,e.INT_COPY),e.copyFromAttribute(t,`columnCount`,r,`columnCount`,e.INT_COPY),e.copyFromAttribute(t,`showCaption`,r,`showCaption`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`level`,r,`level`,e.INT_COPY),e.copyFromAttribute(t,`style`,r),e.copyFromAttribute(t,`locked`,r,`locked`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`rowHeight`,r,`rowHeight`,e.INT_COPY)}},ge=class{visit(e,t,n){return n}},Q=class{visit(e,t,n){if(!t)return;let r={};return e.copyFromAttribute(t,`editAs`,r,`anchorType`),r.anchor={},t.localName===`absoluteAnchor`?(r.anchorType=`absolute`,this.processAbsoluteCoord(e,e.evaluate(`xdr:pos`,t),r.anchor,`from`,`x`,`y`),this.processAbsoluteCoord(e,e.evaluate(`xdr:ext`,t),r.anchor,`to`,`cx`,`cy`)):t.localName===`oneCellAnchor`?(this.processOffsetCoord(e,e.evaluate(`from`,t),r.anchor,`from`),this.processAbsoluteCoord(e,e.evaluate(`xdr:ext`,t),r.anchor,`to`,`cx`,`cy`)):(this.processOffsetCoord(e,e.evaluate(`from`,t),r.anchor,`from`),this.processOffsetCoord(e,e.evaluate(`to`,t),r.anchor,`to`)),n.movables||=[],n.movables.push(r),r}processAbsoluteCoord(e,t,n,r,i,o){if(!t)return;let s={x:0,y:0};return s.x=a.i(t.getAttribute(i)),s.y=a.i(t.getAttribute(o)),r===`from`?n.tl=s:n.br=s,n}processOffsetCoord(e,t,n,r){if(!t)return;let i={c:0,r:0,x:0,y:0};return e.evaluate(`col`,t)&&(i.c=parseInt(e.evaluate(`col`,t).textContent)),e.evaluate(`row`,t)&&(i.r=parseInt(e.evaluate(`row`,t).textContent)),e.evaluate(`colOff`,t)&&(i.x=a.i(e.evaluate(`colOff`,t).textContent)),e.evaluate(`rowOff`,t)&&(i.y=a.i(e.evaluate(`rowOff`,t).textContent)),r===`from`?n.tl=i:n.br=i,n}},_e=class extends j{visit(e,t,n){if(!t)return;n=super.visit(e,t,n);let r=e.evaluate(`nvGraphicFramePr/cNvGraphicFramePr`,t);if(r){let t=e.evaluate(`graphicFrameLocks`,r);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}let i={type:`graphicFrame`,json:{}},o=e.evaluate(`graphic/graphicData`,t).childNodes,s=o.length;for(let n=0;n<s;n++){let r=o.item(n);if(r.nodeType===1)try{let n=r.localName;n===`chart`?n=`chart`:n===`slicer`&&(n=`slicer`),i.type=n;let o=r.getAttribute(`r:id`);if(n===`chart`&&o){let n=e.evaluate(`*/cNvPr`,t);n?.item&&(n=n.item(0));let r,s=n?.getAttribute?.(`id`),c=s?parseInt(s,10):void 0,l=e.getRelationships().get(o);if(l?.target){let t=e.getFileLocation(),n=t.slice(0,t.lastIndexOf(`/`)+1);r=a.u(l.target.startsWith(`/`)?l.target:n+l.target)}i.json={xml:e.serializeElement(t)??void 0,sourceId:c===void 0||isNaN(c)?void 0:c,chartRelId:o,chartTargetPath:r}}else o&&(i.json=e.getRef(o))}catch(e){console.warn(`Unable to parse graphicFrame`,e)}}return i&&(n.content=i),i}},ve=M,ye=class extends j{visit(e,t,n){if(!t)return;let r=super.visit(e,t,n),i=e.evaluate(`nvPicPr/cNvPicPr`,t);if(i){e.copyFromAttribute(t,`preferRelativeResize`,r,`preferRelativeResize`,e.BOOLEAN_COPY);let n=e.evaluate(`picLocks`,i);if(n){n.hasAttribute(`noChangeAspect`)&&(r.lockAspect=n.getAttribute(`noChangeAspect`)===`1`);let t={};e.copyFromAttribute(n,`noChangeArrowheads`,r,`noChangeArrowheads`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noChangeShapeType`,r,`noChangeShapeType`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noEditPoints`,r,`noEditPoints`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noAdjustHandles`,r,`noAdjustHandles`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noCrop`,r,`noCrop`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noGrp`,r,`noGrp`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noMove`,r,`noMove`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noResize`,r,`noResize`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noRot`,r,`noRot`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noSelect`,r,`noSelect`,e.BOOLEAN_COPY),Object.keys(t).length>0&&(r.locks=t)}}let a,o=e.evaluate(`blipFill/blip`,t);if(o){let t;if(t=o.getAttribute(`r:embed`)??o.getAttribute(`embed`),t||=o.getAttribute(`r:link`)??o.getAttribute(`link`),!t)return void console.warn(`no rId found for blip`,o);a=e.getRef(t,!0)}return n.content={type:`picture`,json:{resId:a}},r}},be=class extends M{visit(e,t,n){if(!t)return;n=super.visit(e,t,n);let r=e.evaluate(`nvGrpSpPr/cNvGrpSpPr`,t);if(r){let t=e.evaluate(`grpSpLocks`,r);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}e.warn(`Unable to import '${n.name}', group shapes are not supported.`);let i={};return n.content={type:`grpSp`,json:i},i}},$=class extends M{visit(e,t,n){if(!t)return;n=super.visit(e,t,n);let r=e.evaluate(`nvCxnSpPr/cNvCxnSpPr`,t);if(r){let t=e.evaluate(`cxnSpLocks`,r);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}e.warn(`'${n.name}' is not editable; imported as a fixed drawing.`);let i=e.evaluate(`*/cNvPr`,t);i?.item&&(i=i.item(0));let a=i?.getAttribute?.(`id`),o=a?parseInt(a,10):void 0,s={type:`cxnSp`,xml:e.serializeElement(t)??void 0,sourceId:o===void 0||isNaN(o)?void 0:o};return n.content={type:`cxnSp`,json:s},s}},xe=class{visit(e,t,n){let r=[],i=new Map,a={cells:[],values:[]},o=t.childNodes;for(let e=0;e<o.length;e++){let t=o.item(e);if(t.nodeType===1)switch(t.localName){case`metadataTypes`:this._parseMetadataTypes(t,r,i);break;case`futureMetadata`:this._attachFutureMetadata(t,i);break;case`cellMetadata`:this._resolveBlocks(t,r,a.cells);break;case`valueMetadata`:this._resolveBlocks(t,r,a.values)}}return n.metadata=a,a}_parseMetadataTypes(e,t,n){let r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType===1&&i.localName===`metadataType`){let e=this._parseMetadataType(i);t.push(e),n.set(e.name,e)}}}_parseMetadataType(e){let t={name:e.getAttribute(`name`)??``,_blocks:[]},n=e.getAttribute(`minSupportedVersion`);n!=null&&(t.minSupportedVersion=Number(n));for(let n of[`copy`,`pasteAll`,`pasteValues`,`merge`,`splitFirst`,`splitAll`,`rowColShift`,`clearFormats`,`clearComments`,`assign`,`coerce`,`cellMeta`,`adjust`,`trans`,`delete`,`edit`])e.getAttribute(n)===`1`&&(t[n]=!0);return t}_attachFutureMetadata(e,t){let n=e.getAttribute(`name`)??``,r=t.get(n);if(!r)return;let i=e.childNodes;for(let e=0;e<i.length;e++){let t=i.item(e);t.nodeType===1&&t.localName===`bk`&&r._blocks.push(this._parseFutureBlock(t))}}_parseFutureBlock(e){let t={},n=e.childNodes;for(let e=0;e<n.length;e++){let r=n.item(e);if(r.nodeType!==1||r.localName!==`extLst`)continue;let i=r.childNodes;for(let e=0;e<i.length;e++){let n=i.item(e);if(n.nodeType!==1||n.localName!==`ext`)continue;let r=n.childNodes;for(let e=0;e<r.length;e++){let n=r.item(e);n.nodeType===1&&(n.localName===`dynamicArrayProperties`?(t.fDynamic=n.getAttribute(`fDynamic`)===`1`,t.fCollapsed=n.getAttribute(`fCollapsed`)===`1`):n.localName===`rvb`&&(t.richValueIndex=Number(n.getAttribute(`i`)??`0`)))}}}return t}_resolveBlocks(e,t,n){let r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);i.nodeType===1&&i.localName===`bk`&&n.push(this._resolveBlock(i,t))}}_resolveBlock(e,t){let n=new Map,r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType!==1||i.localName!==`rc`)continue;let a=Number(i.getAttribute(`t`)),o=Number(i.getAttribute(`v`)),s=t[a-1];if(!s)continue;let{_blocks:c,...l}=s,u={...l};for(let e of Object.keys(u))u[e]===void 0&&delete u[e];let d=c[o];d&&(d.fDynamic!==void 0&&(u.fDynamic=d.fDynamic,u.fCollapsed=d.fCollapsed??!1),d.richValueIndex!==void 0&&(u.richValueIndex=d.richValueIndex)),n.set(s.name,u)}return n}},Se=class{visit(e,t,n){let r=e.getVisitorParamsState().get(N);r||(r=[],e.getVisitorParamsState().set(N,r));let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`s`){let t={type:n.getAttribute(`t`)??`n`,keys:[]};this.processKeys(e,n,t),r.push(t)}}return n.richTypes=r,r}processKeys(e,t,n){let r=t.childNodes,i=r.length,a=n.keys;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType===1&&t.localName===`k`){let e=t.getAttribute(`n`),n=t.getAttribute(`t`);a.push([e,n])}}}},Ce=class{visit(e,t,n){let r=e.getVisitorParamsState().get(`richTypes`);if(!r)return void e.warn(`RichValueFound but not type.`);let i=e.getVisitorParamsState().get(P);i||(i=[],e.getVisitorParamsState().set(P,i));let a=t.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType===1&&n.localName===`rv`){let t=r[n.getAttribute(`s`)],a={type:t.type};this.processValues(e,n,a,t);let o=this.mapType(e,a);i.push(o)}}return n.richData=i,i}mapType(e,n){if(n.type===`_error`){let e=n.errorType;if(e)try{n=t.a.getBuiltInByCode(e+1)??t.a.BuiltIn.Unknown}catch{}}return n}processValues(e,t,n,r){let i=t.childNodes,a=i.length;r.type;let o=r.keys;for(let t=0;t<a;t++){let r=i.item(t);if(r.nodeType===1&&r.localName===`v`){let i=o[t];if(!i)return void e.warn(`Invalid richData`);let a=i[0],s=i[1],c=r.textContent;s===`i`&&(c=Number(c)),n[a]=c}}}},we=class{visit(e,t,n){if(!t)return;let r=[];this.processAuthors(e,e.evaluate(`authors`,t),r),r.length>0&&(n.authors=r);let i=[];return n.comments=i,i}processAuthors(e,t,n){if(!t)return;let r=t.childNodes,i=r.length;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType===1&&t.localName===`author`){let e=t.firstChild;e&&e.nodeType===3&&n.push(e.textContent)}}}},Te=class{visit(e,t,n){if(!t)return;let r={},i=t.getAttribute(`ref`);e.copyFromAttribute(t,`authorId`,r,`personId`,e.INT_COPY),r.asNote=!0;let a={r:i,v:r};return n.push(a),r}},Ee=class{visit(e,t,n){if(!t)return;let r=[];return n.comments=r,r}},De=class{visit(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`id`,r,`id`,a.d);let i=t.getAttribute(`ref`);e.copyFromAttribute(t,`personId`,r,`personId`,a.d),e.copyFromAttribute(t,`parentId`,r,`parentId`,a.d),e.copyFromAttribute(t,`dT`,r),t.hasAttribute(`done`)&&(r.done=a.p(t.getAttribute(`done`)));let o={r:i,v:r};return n.push(o),r}},Oe=class{visit(e,t,n){let r=[],i=t.childNodes,o=i.length;for(let t=0;t<o;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`person`){let t={};e.copyFromAttribute(n,`id`,t,`id`,a.d),e.copyFromAttribute(n,`displayName`,t),e.copyFromAttribute(n,`userId`,t,`userId`,a.d),e.copyFromAttribute(n,`providerId`,t),r.push(t)}}return r.length>0&&(n.persons=r),r}},ke=class{constructor(e,t){this.path=e,this.visitor=t}};exports.DOMTransformer=class{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor(`Relationships`,new F),this.registerVisitor(`cp:coreProperties`,new ee),this.registerVisitor(`Properties`,new te),this.registerVisitor(`spPr`,new L),this.registerVisitor(`txBody`,new G),this.registerVisitor(`txPr`,new G),this.registerVisitor(`c:chartSpace`,new ne),this.registerVisitor(`c:plotArea`,new I),this.registerVisitor(`c:barChart`,new R),this.registerVisitor(`c:doughnutChart`,new z),this.registerVisitor(`c:lineChart`,new z),this.registerVisitor(`c:ofPieType`,new z),this.registerVisitor(`c:pieChart`,new z),this.registerVisitor(`c:scatterChart`,new z),this.registerVisitor(`c:barChart`,new B(`dataLabels`),`dLbls`),this.registerVisitor(`c:doughnutChart`,new B(`dataLabels`),`dLbls`),this.registerVisitor(`c:lineChart`,new B(`dataLabels`),`dLbls`),this.registerVisitor(`c:ofPieType`,new B(`dataLabels`),`dLbls`),this.registerVisitor(`c:pieChart`,new B(`dataLabels`),`dLbls`),this.registerVisitor(`c:scatterChart`,new B(`dataLabels`),`dLbls`),this.registerVisitor(`c:ser`,new V),this.registerVisitor(`c:dPt`,new H),this.registerVisitor(`c:marker`,new U),this.registerVisitor(`c:catAx`,new W),this.registerVisitor(`c:valAx`,new W),this.registerVisitor(`c:dateAx`,new W),this.registerVisitor(`c:majorGridlines`,new x(`gridLinesMajor`)),this.registerVisitor(`c:minorGridlines`,new x(`gridLinesMinor`)),this.registerVisitor(`c:chartSpace`,null,`txPr`),this.registerVisitor(`c:catAx`,new G(`labels.text`),`txPr`),this.registerVisitor(`c:valAx`,new G(`labels.text`),`txPr`),this.registerVisitor(`c:dateAx`,new G(`labels.text`),`txPr`),this.registerVisitor(`c:legend`,new q),this.registerVisitor(`c:legend`,new G(`labels.text`),`txPr`),this.registerVisitor(`c:legendEntry`,new K),this.registerVisitor(`c:ser`,new J,`extLst/ext/invertSolidFillFmt/spPr`),this.registerVisitor(`c:ser`,new B(`labels`),`dLbls`),this.registerVisitor(`c:dLbl`,new B(`points`)),this.registerVisitor(`c:title`,new Y),this.registerVisitor(`c:title`,null,`tx/rich`),this.registerVisitor(`c:title`,null,`txPr`),this.registerVisitor(`c:layout`,new X),this.registerVisitor(`c:dispUnits`,new x(`dispUnits`)),this.registerVisitor(`c:dispUnitsLbl`,new Y(`displayUnitsLabel`)),this.registerVisitor(`c:dispUnitsLbl`,new G,`tx/rich`),this.registerVisitor(`a:theme`,new Z),this.registerVisitor(`a:theme`,new re,`themeElements/clrScheme`),this.registerVisitor(`a:theme`,new ie,`themeElements/fontScheme`),this.registerVisitor(`a:theme`,new ae,`themeElements/fmtScheme`),this.registerVisitor(`autoFilter`,new se),this.registerVisitor(`sortState`,new ce),this.registerVisitor(`s:workbook`,new ue),this.registerVisitor(`styleSheet`,new le),this.registerVisitor(`x14:table`,new fe),this.registerVisitor(`table`,new de),this.registerVisitor(`externalLink`,new pe),this.registerVisitor(`hlinkClick`,new oe),this.registerVisitor(`wsDr`,new ge),this.registerVisitor(`twoCellAnchor`,new Q),this.registerVisitor(`oneCellAnchor`,new Q),this.registerVisitor(`absoluteAnchor`,new Q),this.registerVisitor(`graphicFrame`,new _e),this.registerVisitor(`sp`,new ve),this.registerVisitor(`grpSp`,new be),this.registerVisitor(`cxnSp`,new $),this.registerVisitor(`pic`,new ye),this.registerVisitor(`metadata`,new xe),this.registerVisitor(`rvStructures`,new Se),this.registerVisitor(`rvData`,new Ce),this.registerVisitor(`comments`,new we),this.registerVisitor(`comment`,new Te),this.registerVisitor(`comment`,new G(`content`),`text`),this.registerVisitor(`ThreadedComments`,new Ee),this.registerVisitor(`threadedComment`,new De),this.registerVisitor(`threadedComment`,new G(`content`),`text`),this.registerVisitor(`personList`,new Oe),this.registerVisitor(`slicerCacheDefinition`,new me),this.registerVisitor(`slicers`,new he)}registerVisitor(e,t,n=null){e.indexOf(`:`)===-1&&(e=`*:`+e);let r=e.split(`:`),i=r.length>1?r[1]:r[0];if(!n)return this.visitorsByXmlTagName.set(i,t),void this.visitorsByXmlTagName.set(e,t);let a=this.scopedVisitorsByXmlTagName.get(i);a||(a=[],this.scopedVisitorsByXmlTagName.set(i,a),this.scopedVisitorsByXmlTagName.set(e,a)),a.push(new ke(n,t))}getVisitorParamsState(){return this.visitorParamsState}transform(t,n,r=e.A.EmptyObject){let i=t.documentElement;this.visitorParamsState&&!r?.paramMap||(this.visitorParamsState=r?.paramMap??new Map);let a={},o=this.visitorsByXmlTagName.get(i.nodeName);if(o||=this.visitorsByXmlTagName.get(i.localName),!o)throw Error(`A visitor for the root element: '${i.nodeName}' or '${i.localName}' must be registered.`);let s=`/`+i.localName,c=new d(null,this,s,i,a,n,r),l=[];this._doWalk(o,c,l,i,a,n,r);let u=l.length;for(let e=0;e<u;e++){let t=l[e];try{t.visitor?.afterVisit?.(t.context,t.elemParent,t.jsonParent)}catch(e){console.warn(`Error in afterVisit: ${t.context.getPath()}`,e)}}return a}_walkScoped(e,t,n,r,i,a,o){let s=this.scopedVisitorsByXmlTagName.get(e),c=s?s.length:0;for(let l=0;l<c;l++){let c=s[l],u=null;try{u=t.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${e}'.`)}if(!u)continue;let f=e=>{let s=e.localName,l=e.parentNode;for(;l&&l!==r;)s=l.localName+`/`+s,l=l.parentNode;let u=t.getPath()+`/`+s;if(c.visitor){let r=new d(t,this,u,t.getElemRoot(),t.getJsonRoot(),a,o);this._doWalk(c.visitor,r,n,e,i,a,o)}};if(u.length>0){let e=u,t=e.length;for(let n=0;n<t;n++)f(e.item(n))}else f(u)}}_doWalk(e,t,n,r,i,a,o){let s=null;e&&(n.push({visitor:e,context:t,elemParent:r,jsonParent:i}),s=e.visit(t,r,i)),s||=i;let c=r.localName;this._walkScoped(c,t,n,r,s,a,o);let l=this.visitorsByXmlTagName,u=t.getElemRoot(),f=t.getJsonRoot(),p=r.childNodes,m=p.length;for(let e=0;e<m;e++){let r=p.item(e);if(r.nodeType!==1)continue;let c=r,m=c.nodeName,h=l.get(m);h||=(m=c.localName,l.get(m));let g=t.getPath()+`/`+m,_=new d(t,this,g,u,f,a,o);this._doWalk(h,_,n,c,s??i,a,o)}return s}},exports.ExecutionContext=d,exports.NumberUtils=a.r,exports.VisitorUtils=f;