@sheetxl/mcp 0.8.0-beta.19 → 0.8.0-beta.21

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 (198) hide show
  1. package/assets/{ArL5bPq60ZcPcwU9.js → -NFft0E2Wj6WH3X9.js} +1 -1
  2. package/assets/{CE4VYOniMmY8sXQ_.js → 0ewqK5X66DZmbhVR.js} +1 -1
  3. package/assets/{Bk6A5eONxLTBIA_p.js → 1bSTbCnkTWvsV82p.js} +4 -4
  4. package/assets/{CqvcgwQ0UcKndrhO.js → 4-DOIpV6Hjaymwy7.js} +2 -2
  5. package/assets/{BgVW1icycJewsx77.js → 69EXDk0YRdjdM86i.js} +1 -1
  6. package/assets/{D1kI9nJRL1RUF3-E.js → 8wMcuw3b1CFk-D5A.js} +1 -1
  7. package/assets/{DAnSdO8615XsOPNe.js → AGdlSbOsXWO1oZAE.js} +1 -1
  8. package/assets/{CjrzyKFdie6KYfsG.js → B1l0k4ErELObdQKE.js} +3 -3
  9. package/assets/{CIOlYUuBZat8FhHa.js → B4Z_YneQya9mUTN5.js} +1 -1
  10. package/assets/{D990KjcBrCaAEz5k.js → B8NDzDM0Gpwmkylq.js} +1 -1
  11. package/assets/{Bpf9jHj5AFY9543y.js → B8URptQcztz4DRvS.js} +39 -39
  12. package/assets/{CIxf9Y_JsuEEO7Nu.js → BABP2ffkRrOs7_Ym.js} +1 -1
  13. package/assets/{BPctZbHQFoqJNYzC.js → BAqvmoeYqG6dwX3I.js} +2 -2
  14. package/assets/{Bl77DvFa09DuVVuj.js → BC2Y5XPkMBKS6jQX.js} +383 -379
  15. package/assets/{D_6TeeMN5zmoQPTm.js → BEOwJnsyIuMC4SaI.js} +4 -4
  16. package/assets/{Bgi6ubwGkGYsILci.js → BJo3edG_rqch-Kw2.js} +78 -78
  17. package/assets/{DT_kCIZ600UsFy4t.js → BM9zwvBRXNbO_uD-.js} +2 -2
  18. package/assets/{DXe8SG12UJoGbbWR.js → BMkhJwKP7goV0vlJ.js} +1 -1
  19. package/assets/{iP-shs7tsDGMVvQh.js → BRiLNigzVwOBIxBy.js} +1 -1
  20. package/assets/{CcGrcjoI12MaDmwV.js → BU7t2vK3_DH_BbMd.js} +2 -2
  21. package/assets/{CkMXAUkUuJ2LJUBE.js → BVDaUnmVOSaDw9e3.js} +1 -1
  22. package/assets/{Bw2Nxye4Qj10uA3o.js → BWqKV3QuZX31WPsa.js} +1 -1
  23. package/assets/{D1nQ_BminCM0cyH0.js → BZJvWc-5DdAyHXFk.js} +1 -1
  24. package/assets/{CubwsTFIaEVf039H.js → B_RppF41PrYlelc_.js} +1 -1
  25. package/assets/{BgUHR-HVjZDY4SaH.js → B_n6s7Kj4_5BWn1q.js} +2 -2
  26. package/assets/{D1ZekPxeTGzhFy2L.js → Bagfe_VVU6NyQNS6.js} +1 -1
  27. package/assets/{CWHuM2GYuKmi0rZx.js → BbsMdXiRzPW9BCEK.js} +1 -1
  28. package/assets/{Bbky1A_gIgE8i0Oy.js → BeMLPoHRWacCbpl2.js} +1 -1
  29. package/assets/{DLJH6ppG9VHjHe_z.js → BneTvtEMcBoSiQnw.js} +3 -3
  30. package/assets/{C06iKc7jZ6affk2m.js → BrgptoFtJepXL46Z.js} +1 -1
  31. package/assets/{D06A3fKIe3WCTFru.js → BtiRDaBbNpPpKelt.js} +3 -3
  32. package/assets/{CKvP54bJ4GkUqcZi.js → BtjG4s0StUieGI5b.js} +3 -3
  33. package/assets/{DSNaHPvgqymqpsko.js → C0pbMKm0FzhOek9r.js} +1 -1
  34. package/assets/{DxTzG7VM8v4WJ6cI.js → C1ZP9W2tiVQUwLqZ.js} +1 -1
  35. package/assets/{1bm0Yqgfehw1Z2QU.js → C1xe-BzKWT17OO8a.js} +13 -13
  36. package/assets/{7MIo82Ay8jEFMBH-.js → C27330XswujHKrLu.js} +1 -1
  37. package/assets/{DrkfG324qZRPckuC.js → C2YOx4ianxuIIeMP.js} +1 -1
  38. package/assets/{CA_22AL82sRhLAko.js → C8huq6_Gvbeyf6Zy.js} +2 -2
  39. package/assets/{Cgf5GQVN-D8SlQ7A.js → CB9TsE5n0FEyFnAz.js} +15 -15
  40. package/assets/{Bj1WHx6LIEq6RVGw.js → CBTQ8dknYY7RVQgL.js} +8 -8
  41. package/assets/{C17Wflhw5IFSgFFY.js → CBqpH_MpBSmQRaGE.js} +1 -1
  42. package/assets/{BTnTQBSbzYU7cwra.js → CC2hfzradb2KOvtU.js} +1 -1
  43. package/assets/{D6fQheA4qCS5CxYQ.js → CDKZI2IIZ9boo7zG.js} +1 -1
  44. package/assets/{CQZq4cA5kbES6htE.js → CDYMLTHkkpRV9igv.js} +1 -1
  45. package/assets/{BHsQeg6najGesUM4.js → CL348305B-kpRYzz.js} +1 -1
  46. package/assets/{Cj4MYfqHewu8IOOL.js → CLT0k5UJYPmi8ked.js} +1 -1
  47. package/assets/{zkoJXSxpRzqfbG8k.js → CME1jbwnNlBD66aW.js} +189 -189
  48. package/assets/{2nx2Wljhbuct4aKx.js → CPmMYI4DPQcXrZ-g.js} +1 -1
  49. package/assets/{Bbxkz6vmyZJftTd-.js → CSd5XfU4JBASIwTI.js} +1 -1
  50. package/assets/{C7Q4V5mU0wsErspO.js → CTLGMulzw-oFbgHy.js} +3 -3
  51. package/assets/{Ds6LQkRDwXsJ-CFR.js → CVlsdN5C8QL-Kljv.js} +1 -1
  52. package/assets/{CBSSZrizrucIG_9i.js → CXb2mlCk1s1VFPHU.js} +577 -577
  53. package/assets/{BfIJP4H3I51jnIVR.js → CZ5v2vTWktJ7qAj1.js} +1 -1
  54. package/assets/{Gd_0grQd-3D1VPXW.js → CcaH1FoDC8o3dzqp.js} +1 -1
  55. package/assets/{Se9JmvmEtu4MfXJh.js → Cg05U6rbXUnaz0rA.js} +34 -34
  56. package/assets/{D4p9Pv82ECKCOlua.js → ChpUbgXIWuQFoXyL.js} +1 -1
  57. package/assets/{D005GbIBowRGfwed.js → ChwSFUzi5mMzUwdW.js} +6 -6
  58. package/assets/{CoXgI3MEnvkXeshj.js → CkGQV_x1SpyzePln.js} +262 -258
  59. package/assets/{DXORLAVmseFlsxkG.js → CmUz8bVbJgWVT-OB.js} +2 -2
  60. package/assets/{D5OYqo56iGB-5gFG.js → CpLUgqgBDtlfFRj3.js} +1 -1
  61. package/assets/{DppU35gFSUPaiCQH.js → CrLDmJU84Dbwl6DZ.js} +1 -1
  62. package/assets/{mrif6ZBbTbZKYaLJ.js → CudjOMo6X7FRW6ME.js} +1 -1
  63. package/assets/{Cz7tKgNBbnr4DZCb.js → CzQ2o7qoMm0K7KSb.js} +4 -4
  64. package/assets/{DIPDNtbm8FAru-FQ.js → D-INtJnS1lCrEs8s.js} +105 -105
  65. package/assets/{DS9HD6_BPxzdun0X.js → D1HLIgumuUqrSyYB.js} +4 -4
  66. package/assets/{CQiv3YkDRDxTjy0r.js → D2XmpdMAe0SAuQWo.js} +51 -51
  67. package/assets/{BcYdUKmFOf5rn2VZ.js → D3RuKyCyAzvT0bGL.js} +1 -1
  68. package/assets/{bJ-XKvDf7IkAafUI.js → D5mfuGSeGXSDHj9-.js} +1 -1
  69. package/assets/{C53f6C0pAU7_9FI-.js → D7WSYqvuwNQjOIuO.js} +1 -1
  70. package/assets/{Bk6SeqUJkn7ft1y1.js → D9F0224gK4j4Iuq9.js} +1 -1
  71. package/assets/{BSNegq0YcivZJmkf.js → DBgOeiZg40MS63pB.js} +14 -14
  72. package/assets/{Di_C31GTbBJ_xVOK.js → DG3hKZ75iK2wrCcz.js} +1 -1
  73. package/assets/{rT5f4v0Q_61nHkff.js → DITcEcZJ58z5yOx7.js} +1 -1
  74. package/assets/{Bq6ocyztkvzKxMMC.js → DO86fHS3WYzHN_Rv.js} +1 -1
  75. package/assets/{DxKZjKyewqvj46S2.js → DO9RVxvm9vQh8A_j.js} +2 -2
  76. package/assets/{EkavVNuGWG95UggH.js → DOYXEbY_WslpyqXW.js} +5 -5
  77. package/assets/{BGLlbVFS6J3lt9Lw.js → DP-m2vK0GTaYqQZM.js} +1 -1
  78. package/assets/{Curuj_knAdRpMy1L.js → DRiAktGToP73uwgm.js} +208 -208
  79. package/assets/{DtD0J-7IetHv5o6E.js → DRqBWzdn9KKN68o8.js} +11 -11
  80. package/assets/{Cur_-XiBPijLpwxX.js → DX0znk3xZmL1AyX8.js} +1 -1
  81. package/assets/{D-LrOz3Yvp17bUT8.js → Deu2acNFlgo__Mcd.js} +2 -2
  82. package/assets/{GZJ4AFFt8qKRADOa.js → DjCHmGw-ixoQ6ZTA.js} +2 -2
  83. package/assets/{B7vRFm79CUJ1VvFw.js → DjbBTiei0H-BIJaN.js} +1 -1
  84. package/assets/{DngcuWO2cSuMCMu1.js → DmJc5VoPPwBBtLIG.js} +1 -1
  85. package/assets/{BiOrM24CFYL1JGFE.js → DnQM29yv6KQQOVfl.js} +2 -2
  86. package/assets/{LV6tvjnxRzrWaFb8.js → Dnn8laImZHy8LouL.js} +1 -1
  87. package/assets/{CrjUfkCuRaXUC8X8.js → DpgBOcByebrqzUrC.js} +3 -3
  88. package/assets/{BUHEmX1fseJVV65_.js → DqxW6EBLDV_6Eegk.js} +1 -1
  89. package/assets/DrgkN0g7OHuD4iD6.js +14 -0
  90. package/assets/{BQkQNqRh5xxYhBy4.js → DsK1Adz0vo-1zPkp.js} +1 -1
  91. package/assets/{CiJq0zSDKpaKhL3y.js → Dt5rA9gefJFLoaeI.js} +2 -2
  92. package/assets/{Bz1lp0mtNAoPuPve.js → DuCNecyIYfZL27SV.js} +1 -1
  93. package/assets/{CYTPpV3lqNGOwme7.js → DwqgvpYiTLOQd5wm.js} +2 -2
  94. package/assets/{DHL-ZmN5GzB4pIrM.js → Dzxe5kLF5GOfh0_l.js} +1 -1
  95. package/assets/{ht0UxaAlRnuYUvpx.js → FOKynZCiA0wU2Spf.js} +1 -1
  96. package/assets/{DwcKSqV5YEBBA8hY.js → H1ICg_-K5ADFNHJj.js} +1 -1
  97. package/assets/{DnMDfty7pU96BIEJ.js → H89MX09YsAj7NAk3.js} +1 -1
  98. package/assets/{C_v4hb9WXIt639Cm.js → I-GZ5PL9n_Sv5yAJ.js} +1 -1
  99. package/assets/{Ln7XTzksutZHFpml.js → IEmEQHg895CUpAQq.js} +1 -1
  100. package/assets/{DNtWf9lfGjzoB9Hy.js → I_yb1hhLA5bYPpWx.js} +1 -1
  101. package/assets/{B6A2URH-mIs7J54h.js → KQGPPHM486XPeClF.js} +2 -2
  102. package/assets/{DFlL4pAqxaQ_hVe1.js → KSE7OWDMxhbfYt82.js} +30 -30
  103. package/assets/{DOg_zvSkhsKmw4q1.js → M62BqR7TbmgOzAEW.js} +3 -3
  104. package/assets/{udbHvSLquJ5xGK3R.js → NEzc406_2k2MuiE3.js} +2 -2
  105. package/assets/{zEyWjY3NhC8w_spQ.js → Q2j8yQZX1kL_MbbB.js} +573 -572
  106. package/assets/{BbvOmnXrmBNjeWjQ.js → QMCI00ZCedkNJd8C.js} +1 -1
  107. package/assets/{-iaCg5U9jrEDEl_O.js → RFPO1vKnkkgwx5Bs.js} +1 -1
  108. package/assets/{0hHP9xpWzhkDrCTL.js → VcTnn2qw_4tmyctb.js} +1 -1
  109. package/assets/{BkhdNc3LdmcyAjwk.js → Vo34QvIefEN595xl.js} +8726 -8652
  110. package/assets/{vb-L2Q2jyjjgDvJy.js → _l84VPWmScznS-9F.js} +11 -11
  111. package/assets/{jPim6WG_KS-ZDker.js → _oaPA65Bm2idKW7f.js} +1 -1
  112. package/assets/{B8Z4-80QEORmYOJ9.js → bpjLDXWxL6nDt4Mv.js} +1 -1
  113. package/assets/{CjoRkjB9NzS4LaFy.js → fUmGsmpgGhd8eZn2.js} +1 -1
  114. package/assets/{DwWcXC4pUR3U2WXU.js → pg0OaBJVRnW7uSz5.js} +1 -1
  115. package/assets/{HVm22OJ1gEeY8kii.js → rIQ1pzaGFqvCfzOk.js} +1 -1
  116. package/assets/{BzkTa7l_e7R--ejo.js → raa4clZOm0L5A0zR.js} +540 -540
  117. package/assets/{exNO4fmccU8Aq8cE.js → rejXA2fTAujW3QRv.js} +276 -276
  118. package/assets/{b6GPrIkdzfTW4f2j.js → rhT64BvdSLOEwglQ.js} +1 -1
  119. package/assets/{CNPUPTd9h7hwijpZ.js → vItpZkDtFsjwsJzb.js} +60 -60
  120. package/assets/{CqOzqRIQFCnEegoB.js → vXmCJwJaPhkPVhy8.js} +1 -1
  121. package/index.js +1775 -1712
  122. package/lib.js +1 -1
  123. package/licenses/dependencies.txt +46 -46
  124. package/package.json +2 -2
  125. package/screenshot-page/assets/{DwNHMH9f_lQyn50d.js → 1s5we6Eqz8n3o0X_.js} +1 -1
  126. package/screenshot-page/assets/9WplgXo__vp3e1Su.js +2 -0
  127. package/screenshot-page/assets/B2oadmu_j6WfNbZ1.js +1 -0
  128. package/screenshot-page/assets/{BU5vg917ZnXC04e-.js → B5ujsbfF1ZBkPI4d.js} +2 -2
  129. package/screenshot-page/assets/BEzCH6tp_dlxe7BH.js +1 -0
  130. package/screenshot-page/assets/BJvuevnsIw3DXQds.js +2 -0
  131. package/screenshot-page/assets/BLON9pILfrgdZqAM.js +5 -0
  132. package/screenshot-page/assets/BVx7CEdRItIR30Fz.js +1 -0
  133. package/screenshot-page/assets/{CLcTX_nmvaVPsxDl.js → Bdt92xZzFotX0vdt.js} +1 -1
  134. package/screenshot-page/assets/{BF6igzahAW9pl35p.js → Ble2ESZnJzZnd3cc.js} +1 -1
  135. package/screenshot-page/assets/{DeGMS3crYErjsRrw.js → Blg5f-jAtZfGnZ71.js} +1 -1
  136. package/screenshot-page/assets/Bozva6Wr4B8Q5QZN.js +2 -0
  137. package/screenshot-page/assets/{Chq6rvtA5qZAwYG4.js → Brp37MPC60tt9V3N.js} +1 -1
  138. package/screenshot-page/assets/Bs65RHirk11sxOB9.js +39 -0
  139. package/screenshot-page/assets/{MzJpKWgPrxR1UN-Y.js → BtydzT-AjL_LBr8x.js} +1 -1
  140. package/screenshot-page/assets/Bu5h0ACtvNxDBmqw.js +1 -0
  141. package/screenshot-page/assets/BwFvwFIcX0dmcBt7.js +1 -0
  142. package/screenshot-page/assets/C0rOvlmOfLDpClJ_.js +1 -0
  143. package/screenshot-page/assets/{Cpwg3bWAqBBcgBmv.js → CBuH_YHDn7A9E_hX.js} +2 -2
  144. package/screenshot-page/assets/CHZ1925OpIa8ssZn.js +1 -0
  145. package/screenshot-page/assets/{BuzI4z8RJGOw8BZD.js → CN3dPtUjDVvcnA4e.js} +1 -1
  146. package/screenshot-page/assets/COO3CwHTbCgxybBd.js +1 -0
  147. package/screenshot-page/assets/CR8Rj_GpSbIqbaEO.js +13 -0
  148. package/screenshot-page/assets/{EY31tFQrw7iYFrr6.js → CV9T0juyAiRmwTR-.js} +2 -2
  149. package/screenshot-page/assets/ClC7zkHPp6egPrjL.js +2 -0
  150. package/screenshot-page/assets/{Dt1A-DUBfvyouz_T.js → CtS8qZB4_3skg_zL.js} +1 -1
  151. package/screenshot-page/assets/CwutTi2EnNm_hyVj.js +1 -0
  152. package/screenshot-page/assets/{BqlVqRKpsFGl-elI.js → CxithxkenssFkfTT.js} +23 -23
  153. package/screenshot-page/assets/{DjVxI3p3ssmCtYky.js → CzZu7Fd_VeHHL-4i.js} +1 -1
  154. package/screenshot-page/assets/CzijGQrSoteeqwmH.js +2 -0
  155. package/screenshot-page/assets/{RutPv2GFWmeBiWvn.js → D4VgxwLDPUfCxPS9.js} +2 -2
  156. package/screenshot-page/assets/DG6q1MKITeSM4XMx.js +1 -0
  157. package/screenshot-page/assets/DHTXoT_pArB1opyI.js +48 -0
  158. package/screenshot-page/assets/{Cx9lvo3Q1xOwYkRK.js → DHUomRu_S2zcBWwt.js} +4 -4
  159. package/screenshot-page/assets/DP2wwd1IM_gQtEaG.js +1 -0
  160. package/screenshot-page/assets/DQeIWKasFD3DnWL7.js +586 -0
  161. package/screenshot-page/assets/Ja-xcEStEdmh2Gwb.js +2 -0
  162. package/screenshot-page/assets/ODq-dKb9mTtqEIJl.js +1 -0
  163. package/screenshot-page/assets/VF7dro9jrDEAX6kD.js +3 -0
  164. package/screenshot-page/assets/{BWDqL5_mwspr6CjI.js → Yz4ksf-M05RGdHO3.js} +1 -1
  165. package/screenshot-page/assets/Z7Av7oqfaK7wy7Eb.js +1 -0
  166. package/screenshot-page/assets/{CrUIo7hXByCWY7in.js → bdWMVOcMKRI8kCDE.js} +1 -1
  167. package/screenshot-page/assets/kJwY8fmEeWlAtTAc.js +1 -0
  168. package/screenshot-page/assets/{ClWDZixRy4DFZdI5.js → p9abCAJQdpScjZVK.js} +1 -1
  169. package/screenshot-page/index.html +8 -8
  170. package/types/scripting-api.json +9338 -9337
  171. package/types/scripting.d.ts +24 -3
  172. package/assets/gCkru9Vv-Ban4DCD.js +0 -14
  173. package/screenshot-page/assets/1yHlU53ypZZelMPx.js +0 -1
  174. package/screenshot-page/assets/A_-Jwzwmm3lkcm2f.js +0 -586
  175. package/screenshot-page/assets/BX9VkTqZoroo08EG.js +0 -13
  176. package/screenshot-page/assets/BdDouZl3VrM4yBP5.js +0 -2
  177. package/screenshot-page/assets/CJmdRzGWq0FZMrp5.js +0 -1
  178. package/screenshot-page/assets/C_vPl50T1L5HWnhv.js +0 -1
  179. package/screenshot-page/assets/CaTGa2NvuuE3qJAV.js +0 -1
  180. package/screenshot-page/assets/Cb8ORg9ENgscK6yl.js +0 -2
  181. package/screenshot-page/assets/CmNlzN3DCl87wNU2.js +0 -1
  182. package/screenshot-page/assets/CoPUxkU9zZy0dXti.js +0 -2
  183. package/screenshot-page/assets/CqogMOf7MzkOk7as.js +0 -2
  184. package/screenshot-page/assets/Cv-YUArreXqhafcU.js +0 -2
  185. package/screenshot-page/assets/D0nZlczIH0ULuSyL.js +0 -3
  186. package/screenshot-page/assets/D1ZZiOS7_HFjpZCA.js +0 -1
  187. package/screenshot-page/assets/D23_69pojBfIh4nV.js +0 -5
  188. package/screenshot-page/assets/D24UBy2L73pOCPPw.js +0 -1
  189. package/screenshot-page/assets/D2q4M3I5Jmxm85P2.js +0 -1
  190. package/screenshot-page/assets/D6LmZnV2h3Kg7G3e.js +0 -1
  191. package/screenshot-page/assets/DAkSmFRVds51vhiy.js +0 -1
  192. package/screenshot-page/assets/DUFPgv-3CtD_sCVO.js +0 -1
  193. package/screenshot-page/assets/DegZKTNqt1LRnSxY.js +0 -1
  194. package/screenshot-page/assets/DwuLl9Ua1k8m9KcK.js +0 -1
  195. package/screenshot-page/assets/fQ13z3k3bntY-jfw.js +0 -1
  196. package/screenshot-page/assets/oO6aFwepb3DDkGYF.js +0 -39
  197. package/screenshot-page/assets/pH9rKZYDE8xrhkC4.js +0 -2
  198. package/screenshot-page/assets/w7IQEh1FiqZA6o5y.js +0 -42
@@ -1 +1 @@
1
- import{I as e}from"./ChSvXfVMLxZsP9zG.js";import{C as t,D as n,K as r,Ot as i,Z as a,ht as o,t as s}from"./DuYb_otrRZZDq6-f.js";import{c,i as l}from"./CQukCzhuewMuFOlO.js";import{$ as u,Bn as d,Br as f,dn as p,ti as m}from"./A_-Jwzwmm3lkcm2f.js";import{An as h,Ar as g,Cn as _,D as v,En as ee,Et as te,Hr as ne,K as re,Kt as ie,Ln as ae,Lr as oe,N as y,On as b,Or as x,Pn as se,Qt as ce,R as S,Rr as le,Rt as ue,Sn as de,V as C,Vt as fe,Xt as w,b as T,br as pe,bt as E,c as D,en as O,et as k,hr as A,it as j,jt as me,lt as M,on as he,pn as ge,r as N,sn as P,tn as F,vn as I,w as L,z as _e}from"./oO6aFwepb3DDkGYF.js";import"./D0nZlczIH0ULuSyL.js";import{a as ve,c as R,o as ye,s as be,t as xe}from"./BWDqL5_mwspr6CjI.js";var Se=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()}},Ce=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,we=e=>{let t=parseInt(e);return isNaN(t)?null:t},Te=e=>{let t=parseFloat(e);return isNaN(t)?null:t},Ee=new Map,z=class{constructor(t,n,r,i,a,o=null,s=e.EmptyObject){this._fileLocation=``;let c=(e,t,n)=>s?.getRef?.(e,t,n,s?.parsedRefs),l=e=>s?.getRefs?.(e,s?.parsedRefs);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,this._readEmbeddedPart=t._readEmbeddedPart):(o&&(this._fileLocation=o),s?.getRef&&(this._getRef=c),s?.getRefs&&(this._getRefs=l),this._onWarning=s?.onWarning,this._addPerson=s?.addPerson,this._serializeElement=s?.serializeElement,this._readEmbeddedPart=s?.readEmbeddedPart)}getRef(e,t=!1){return this._getRef?.(e,this._fileLocation,t)??null}readEmbeddedPart(e){return this._readEmbeddedPart?.(e,this._fileLocation)??null}getRelationships(){return this._getRefs?.(this._fileLocation)??Ee}getPath(){return this.currentPath}getFileLocation(){return this._fileLocation}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(e,t){this._raiseWarning(e,this.getFileLocation(),t?.onceKey)}_raiseWarning(e,t,n){this._onWarning?this._onWarning(e,t,n):this._parent?this._parent._raiseWarning(e,t,n):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 Se(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.getFromPath(t,n)}setToPath(t,n,r){return e.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 Ce}get INT_COPY(){return we}get FLOAT_COPY(){return Te}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)}},B=(e,t)=>{let n=[],r=e.childNodes,i=r.length;for(let e=0;e<i;e++){let i=r.item(e);i.nodeType===1&&i.localName===t&&n.push(i)}return n},De=[[`fillRef`,`fill`],[`lnRef`,`stroke`],[`effectRef`,`effect`]],V=(e,t)=>{let n=new j,r={};for(let[i,a]of De){let o=e.evaluate(i,t);if(!o)continue;let s={index:parseInt(o.getAttribute(`idx`)??`0`,10)||0},c=n.processAdjColor(e,o);c&&(s.color=c),r[a]=s}let i=e.evaluate(`fontRef`,t);if(i){let t={index:i.getAttribute(`idx`)??`none`},a=n.processAdjColor(e,i);a&&(t.color=a),r.font=t}return r},H=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),this.readNonVisualDetails(e,r,n),e.copyFromAttribute(r,`id`,n)),n}readNonVisualDetails(e,t,n){t.hasAttribute(`title`)&&(n.title=t.getAttribute(`title`));let r=e.evaluate(`hlinkClick`,t);r&&(n.hyperlink=y(e,r));let i=e.evaluate(`hlinkHover`,t);i&&(n.hoverHyperlink=y(e,i));let a=e.evaluate(`extLst`,t),o=a?e.serializeElement(a):null;o&&(n.extLst={...n.extLst,nonVisual:o})}setContent(e,t){let n=e;n.name!==void 0&&(t.name=n.name,delete n.name),n.description!==void 0&&(t.description=n.description,delete n.description);for(let e of[`title`,`hyperlink`,`hoverHyperlink`,`extLst`])n[e]!==void 0&&(t.json&&(t.json[e]=n[e]),delete n[e]);e.content=t}isGroupContent(e){return Array.isArray(e?.members)}readMemberHeader(e,t,n){let r={},i={anchor:void 0,content:{type:n,json:r}},a=e.evaluate(`*/cNvPr`,t);if(a?.item&&(a=a.item(0)),a){let n=a.getAttribute(`name`);n!==null&&(i.content.name=n);let o=a.getAttribute(`descr`);o&&(i.content.description=o),e.copyFromAttribute(a,`hidden`,i,`hidden`,e.BOOLEAN_COPY),this.readNonVisualDetails(e,a,r);let s=this.readSourceId(e,t);s!==void 0&&(r.sourceId=s)}return{movable:i,content:r}}readStyleRefs(e,t,n){let r=e.evaluate(`style`,t);if(!r)return void(n.style=null);let i=V(e,r),o=a.withoutDefaultStyleRefs({...n,style:i});o&&(n.style=o)}readLocks(e){let t=e?.attributes;if(!t||t.length===0)return;let n={};for(let e=0;e<t.length;e++){let r=t.item(e);r.name.startsWith(`xmlns`)||(n[r.localName??r.name]=A(r.value))}return Object.keys(n).length>0?n:void 0}readSourceId(e,t){let n=e.evaluate(`*/cNvPr`,t);n?.item&&(n=n.item(0));let r=n?.getAttribute?.(`id`),i=r?parseInt(r,10):void 0;return i===void 0||isNaN(i)?void 0:i}},Oe=[[`spDef`,`shape`],[`lnDef`,`line`],[`txDef`,`text`]],U=(e,t)=>{let n=t.getAttribute(`dxfId`);if(n===null)return;let r=parseInt(n);return e.getVisitorParamsState().get(`dxfs`)?.get(r)||(e.warn(`A color filter or sort names a format that does not exist (dxfId '${n}').`),{})},W=e=>e===`1`||e===`true`,G=class{visit(e,t,n){}processDataBarColor(e,t,n,r,i=`auto`){if(!t)return;let a=v(e=>t.getAttribute(e),i);return a&&(n[r]=a),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.Style.Italic),e.getValAttrAsBoolean(`strike`,t,!0)&&(r.strike=M(!0));let i=e.evaluate(`u`,t);if(i){let e=i.getAttribute(`val`);r.underline=E(e)}let a=k(e.evaluate(`vertAlign`,t)?.getAttribute(`val`));a!==void 0&&(r.baseline=a),P(e,t,r,`sz`,`size`);let o=e.evaluate(`color`,t);this.processDataBarColor(e,o,r,`color`),r.color||=`auto`,w(e,t,r,`name`,`family`),w(e,t,r,`rFont`,`family`);let s=e.evaluate(`family`,t);if(s){let e=s.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`]}}D(r,e.evaluate(`scheme`,t)?.getAttribute(`val`)),x(e,t,r,`shadow`,`shadow`,!0),x(e,t,r,`outline`,`outline`,!0);for(let n of[`condense`,`extend`]){let i=C(n,!!e.getValAttrAsBoolean(n,t,!0));i!==void 0&&(r.letterSpacing=i)}return le(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,n,i){let a={type:r.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 n[i]=a,n}processGradientFill(e,t,n){if(!t)return;n.type=r.Type.Gradient;let i=[];n.stops=i;let a=t.getAttribute(`type`);a&&(n.gradientType=a);let o=t.hasAttribute(`degree`)?parseFloat(t.getAttribute(`degree`)):0;(o+90)%360!=0&&(n.angle=(o+90)%360),(t.hasAttribute(`left`)||t.hasAttribute(`top`)||t.hasAttribute(`right`)||t.hasAttribute(`bottom`))&&(n.focus={left:K(t.getAttribute(`left`)),top:K(t.getAttribute(`top`)),right:K(t.getAttribute(`right`)),bottom:K(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 n}processPatternFill(e,t,n){if(!t)return;let i=e.getVisitorParamsState().get(`processingDXFs`),a=t.getAttribute(`patternType`)||(i?r.BuiltInSheetPattern.Solid:r.BuiltInSheetPattern.None);if(a===r.BuiltInSheetPattern.None)return{none:!0};n.type=r.Type.Pattern,a&&(n.patternType=a);let o=`foreground`,s=`background`,c=n.patternType===r.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,n,o,l);let f=e.evaluate(`bgColor`,t);return this.processDataBarColor(e,f,n,s,u),c&&(n.foreground||=`lt1`,n.background||=`dk1`),n}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,n,r,a){if(!t)return;let o={};this.processBorderStroke(e,t,o,i.Edge.Left),this.processBorderStroke(e,t,o,i.Edge.Right),a?(o.right||o.left)&&(o.vertical=o.right?{...o.right}:{...o.left}):this.processBorderStroke(e,t,o,i.Edge.Vertical),this.processBorderStroke(e,t,o,i.Edge.Top),this.processBorderStroke(e,t,o,i.Edge.Bottom),a?(o.bottom||o.top)&&(o.horizontal=o.bottom?{...o.bottom}:{...o.top}):this.processBorderStroke(e,t,o,i.Edge.Horizontal);let s=this.processBorderStroke(e,t,{},`diagonal`);return s&&(W(t.getAttribute(`diagonalUp`))&&(o.diagonalUp={...s}),W(t.getAttribute(`diagonalDown`))&&(o.diagonalDown={...s})),n[r]=o,n}processBorderStroke(e,t,n,r){if(!t)return;let a=e.evaluate(r,t);if(!a)return;let o={};a.hasAttribute(`style`)?o.style=a.getAttribute(`style`):e.getVisitorParamsState().get(`processingDXFs`)&&(o.style=i.StrokeStyle.None);let s=e.evaluate(`color`,a);return s&&this.processDataBarColor(e,s,o,`color`),Object.keys(o).length>0?n[r]=o:null}},K=e=>{if(!e)return 0;let t=parseFloat(e);return isNaN(t)?0:t},q=(e,t)=>{if(!e||e.nodeType!==1)return null;let n=e.childNodes;for(let e=0;e<n.length;e++){let r=n.item(e);if(r.nodeType===1&&r.localName===t)return r}return null},ke=new Set(Object.values(p.ElementType).filter(e=>e!==p.ElementType.WholeTable&&e!==p.ElementType.HeaderRow)),Ae={auto:`auto`,autoNoTable:`automaticExceptTables`,manual:`manual`},J=[`tableId`,`columnId`,`cacheName`,`cachePath`,`sourceName`,`sortOrder`,`customListSort`,`crossFilter`,`pivotTables`,`pivotCacheId`,`pivotBody`,`tabular`,`pivotData`,`showMissing`],je=new Set([`name`,`xr10:uid`,`cache`,`caption`]),Y=(e,t)=>{let n=e.content,r=n?.json;if(r){if(n.type===`shape`||n.type===`picture`){let{rotation:n,flipH:i,flipV:a,bounds:o}=r;delete r.rotation,delete r.flipH,delete r.flipV,delete r.bounds,n!==void 0&&n!==0&&(e.rotation=n),i&&(e.flipH=!0),a&&(e.flipV=!0),t&&o&&(e.anchor={tl:{x:o.x,y:o.y},br:{x:o.width,y:o.height}})}if(n.type===`group`)for(let e of r.members??[])Y(e,!0)}},X=class extends H{visit(e,t,n){if(t)return this.visitShape(e,t,n,`sp`,`nvSpPr/cNvSpPr/spLocks`)}visitShape(e,n,r,i,a){let o=F[i];if(this.isGroupContent(r)){if(e.getPath().includes(`Fallback`))return{};let{movable:s,content:c}=this.readMemberHeader(e,n,`shape`);o!==t.Type.Shape&&(c.type=o),this.readShapeDetails(e,n,i,a,c),this.readStyleRefs(e,n,c);let l=e.evaluate(a,n);l?.hasAttribute?.(`noChangeAspect`)&&(s.lockAspect=l.getAttribute(`noChangeAspect`)===`1`);let u=this.readTwinOf(e,n);return u!==void 0&&Object.assign(c,{twinOf:u}),r.members.push(s),c}if(e.getPath().includes(`Fallback`)&&r.content){let i=r.content.json;if(r.content.type===`shape`&&i&&(i.type??t.Type.Shape)===o){let t=e.evaluate(`txBody`,n),r=t?new O().readTextBody(e,t):null;r&&ie(r)!==``&&(i.text=r)}return{}}r=super.visit(e,n,r);let s=e.evaluate(a,n);s?.hasAttribute?.(`noChangeAspect`)&&(r.lockAspect=s.getAttribute(`noChangeAspect`)===`1`);let c=o===t.Type.Shape?{}:{type:o},l=this.readSourceId(e,n);l!==void 0&&(c.sourceId=l),this.readShapeDetails(e,n,i,a,c),this.readStyleRefs(e,n,c);let u=this.readTwinOf(e,n);return u!==void 0&&Object.assign(c,{twinOf:u}),this.setContent(r,{type:`shape`,json:c}),c}readTwinOf(e,t){let n=e.evaluate(`*/cNvPr/extLst/ext/compatExt`,t);n?.item&&(n=n.item(0));let r=/^_x0000_s(\d+)$/.exec(n?.getAttribute?.(`spid`)??``);return r?parseInt(r[1],10):void 0}readShapeDetails(e,t,n,r,i){let a=t.getAttribute(`macro`);a&&(i.macro=a);let o=t.getAttribute(`textlink`);o&&(i.textLink=o),t.hasAttribute(`fLocksText`)&&(i.locksText=A(t.getAttribute(`fLocksText`))),t.hasAttribute(`fPublished`)&&(i.published=A(t.getAttribute(`fPublished`)));let s=r.slice(0,r.lastIndexOf(`/`)),c=e.evaluate(s,t);c?.getAttribute?.(`txBox`)===`1`&&(i.textBox=!0);let l=this.readLocks(e.evaluate(r,t));if(l&&(i.locks=l),n===`cxnSp`&&c){let t=t=>{let n=e.evaluate(t,c);if(n?.getAttribute)return{id:parseInt(n.getAttribute(`id`)??`0`,10)||0,index:parseInt(n.getAttribute(`idx`)??`0`,10)||0}},n=t(`stCxn`),r=t(`endCxn`);(n||r)&&(i.connectorEnds={},n&&(i.connectorEnds.start=n),r&&(i.connectorEnds.end=r))}}},Me=/^<a:extLst(?:\s+xmlns:a="[^"]*")?><a:ext uri="\{28A0092B-C50C-407E-A947-70E740481C1C\}"><a14:useLocalDpi(?:\s+xmlns:a14="[^"]*")?\s+val="0"\s*\/><\/a:ext><\/a:extLst>$/,Z=(e,t,n,r)=>{let i=e.evaluate(n,t),a=e.evaluate(r,t);return i||a?{x:h(i?.getAttribute(`x`)??null)??0,y:h(i?.getAttribute(`y`)??null)??0,width:h(a?.getAttribute(`cx`)??null)??0,height:h(a?.getAttribute(`cy`)??null)??0}:null},Ne={Checkbox:`checkbox`},Q=e=>{let t=e.getAttribute(`val`);return t!==`0`&&t!==`false`},Pe={1:`serif`,2:`sans-serif`,3:`monospace`,4:`cursive`,5:`fantasy`};function Fe(e){let t={},r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType===1)switch(i.localName){case`b`:t.weight=Q(i)?700:400;break;case`i`:t.style=Q(i)?n.Style.Italic:n.Style.Normal;break;case`strike`:t.strike=M(Q(i));break;case`outline`:t.outline=Q(i);break;case`shadow`:t.shadow=Q(i);break;case`condense`:case`extend`:{let e=C(i.localName,Q(i));e!==void 0&&(t.letterSpacing=e);break}case`u`:t.underline=E(i.getAttribute(`val`));break;case`vertAlign`:{let e=k(i.getAttribute(`val`));e!==void 0&&(t.baseline=e);break}case`sz`:{let e=parseFloat(i.getAttribute(`val`)??``);isNaN(e)||(t.size=e);break}case`rFont`:{let e=i.getAttribute(`val`);e&&(t.family=e);break}case`family`:{let e=Pe[i.getAttribute(`val`)??``];e&&(t.fallbacks=[e]);break}case`charset`:{let e=parseInt(i.getAttribute(`val`)??``,10);isNaN(e)||(t.charset=e);break}case`scheme`:D(t,i.getAttribute(`val`));break;case`color`:{let e=i.getAttribute(`rgb`);if(e&&!i.hasAttribute(`theme`)){t.color=`#`+(e.length===8?e.substring(2):e).toUpperCase();break}let n=v(e=>i.getAttribute(e));n&&(t.color=n);break}}}return Object.keys(t).length>0?t:null}var $={RelsVisitor: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}},CorePropertiesVisitor: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||``}}},AppPropertiesVisitor:class{visit(e,t,n){let r=t.childNodes,i=r.length;for(let e=0;e<i;e++)if(r.item(e).localName===`property`)return this.visitCustom(t,n);let a=[];for(let t=0;t<i;t++){let n=r.item(t);if(n.nodeType!==1)continue;let i=this.processProperty(e,n);i&&a.push(i)}return a.length>0&&(n.properties=a),a}visitCustom(e,t){let n=[],r=e.childNodes,i=r.length;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType!==1||t.localName!==`property`)continue;let i=t.getAttribute(`name`);if(!i)continue;let a=null;for(let e=0;e<t.childNodes.length&&!a;e++){let n=t.childNodes.item(e);n.nodeType===1&&(a=n)}let o={key:i,kind:a?.localName??null,value:a?.textContent??``},s=t.getAttribute(`linkTarget`);s&&(o.linkTarget=s),n.push(o)}return n.length>0&&(t.custom=n),n}processProperty(e,t){if(t)return{key:t.localName,value:t.textContent||``}}},ShapePropertiesVisitor:S,TextPropertiesVisitor:re,ShapeTextVisitor:O,ThemeVisitor:class{visit(e,t,n){n.name=t.getAttribute(`name`),n.objectDefaults={};let r=B(t,`custClrLst`)[0];if(r){let t=new j,i=[];for(let n of B(r,`custClr`)){let r=t.processAdjColor(e,n);if(!r)continue;let a={color:r},o=n.getAttribute(`name`);o&&(a.name=o),i.push(a)}i.length&&(n.customColors=i)}for(let e of B(t,`extLst`))for(let t of B(e,`ext`)){if(t.getAttribute(`uri`)!==`{05A4C25C-085E-4340-85A3-A5531E510DB2}`)continue;let e=B(t,`themeFamily`)[0],r=e?.getAttribute(`id`);if(!r)continue;let i={name:e.getAttribute(`name`)??``,id:r},a=e.getAttribute(`vid`);a&&(i.vid=a),n.family=i}return n}},ClrSchemeVisitor:class extends j{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}},FontSchemeVisitor:class{visit(e,t,n){let r={};r.name=t.getAttribute(`name`);let i=this.processFontCollection(e,e.evaluate(`majorFont`,t));i&&(r.major=i);let a=this.processFontCollection(e,e.evaluate(`minorFont`,t));return a&&(r.minor=a),n.fonts=r,r}processFontCollection(e,t){if(!t)return;let n={},r=e.evaluate(`latin`,t),i=r?.getAttribute(`typeface`);i&&(n.latin=i);let a=r?.getAttribute(`panose`);a&&(n.panose=a);let o=e.evaluate(`ea`,t)?.getAttribute(`typeface`);o&&(n.eastAsian=o);let s=e.evaluate(`cs`,t)?.getAttribute(`typeface`),c;s&&(n.complexScript=s);let l=t.childNodes,u=l.length;for(let e=0;e<u;e++){let t=l.item(e);if(t.nodeType!==1||t.localName!==`font`)continue;let n=t.getAttribute(`script`);n&&((c??={})[n]=t.getAttribute(`typeface`)??``)}return c&&(n.scripts=c),n}},ObjectDefaultsVisitor:class{visit(e,t,n){let r={};for(let[n,i]of Oe){let a=e.evaluate(n,t);a&&(r[i]=this.processDefault(e,a))}return n.objectDefaults=r,{}}processDefault(e,t){let n={},r=e.evaluate(`spPr`,t);r&&new S().visit(e,r,n);let i=new O().readTextBody(e,t);(i.body||i.listStyle)&&(n.text=i);let a=e.evaluate(`style`,t);return a&&(n.style=V(e,a)),n}},FmtSchemeVisitor:class extends j{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&&(n.fillStyleLst=r),i&&(n.lnStyleLst=i),a&&(n.effectStyleLst=a),o&&(n.bgFillStyleLst=o),r&&i&&a&&o)return;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:r.Type.None};case`solidFill`:{let n=this.processAdjColor(e,t);return n?{type:r.Type.Solid,color:n}: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);n.nodeType===1&&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}},AutoFilterVisitor: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),n}processColorFilter(e,t){let n={},r={operator:d.BuiltInOperatorNames.Color,param:n};e.copyFromAttribute(t,`cellColor`,n,`cellColor`,e.BOOLEAN_COPY);let i=U(e,t);return i&&(n.style=i),r}processCustomFilter(e,t){return oe({operator:t.getAttribute(`operator`),val:t.getAttribute(`val`)},t=>e.warn(t))}processCustomFilters(e,t){let n=t.getAttribute(`and`),r=n===`and`||n===`1`;t.getAttribute(`val`);let i=[],a={operator:r?d.BuiltInOperatorNames.And:d.BuiltInOperatorNames.Or,param:i},o=t.childNodes,s=o.length;for(let t=0;t<s;t++){let n=o.item(t);if(n.nodeType!==1)continue;let r=null;n.localName===`customFilter`&&(r=this.processCustomFilter(e,n)),r&&i.push(r)}return i.length===1?i[0]:he(a)}processDynamicFilter(e,t){return N(t.getAttribute(`type`),t.getAttribute(`val`),t.getAttribute(`maxVal`))}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 n={},r={operator:d.BuiltInOperatorNames.InSet,param:n};r.selector=d.BuiltInSelectorNames.Display,e.copyFromAttribute(t,`blank`,n,`blank`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calendarType`,n,`calendarType`);let i=[],a=[],o=t.childNodes,s=o.length;for(let t=0;t<s;t++){let n=o.item(t);if(n.nodeType===1){if(n.localName===`dateGroupItem`){let t=this.processDateGroupItem(e,n);t&&i.push(t)}else if(n.localName===`filter`){let t=this.processFilterItem(e,n);t!==void 0&&a.push(t)}}}return i.length>0&&(n.dateGroups=i),a.length>0&&(n.items=a),r}processIcon(e,t){let n={},r={operator:d.BuiltInOperatorNames.Icon,param:n};return e.copyFromAttribute(t,`iconId`,n,`iconId`,e.INT_COPY),e.copyFromAttribute(t,`iconSet`,n),r}processTop10(e,t){let n={},r={operator:d.BuiltInOperatorNames.TopN,param:n};return e.copyFromAttribute(t,`filterVal`,n,`filterVal`,e.FLOAT_COPY),e.copyFromAttribute(t,`percent`,n,`percent`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`top`,n,`top`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`val`,n,`limit`,e.FLOAT_COPY),r}processFilterColumnExt(e,t){let n=t.childNodes;for(let t=0;t<n.length;t++){let r=n.item(t);if(r.nodeType!==1||r.localName!==`ext`||b(r.getAttribute(`uri`))!==b(`{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}`))continue;let i=r.childNodes;for(let t=0;t<i.length;t++){let n=i.item(t);if(n.nodeType!==1||n.localName!==`filterColumn`)continue;let r=n.childNodes;for(let t=0;t<r.length;t++){let n=r.item(t);if(n.nodeType===1&&n.localName===`filters`)return this.processFilters(e,n)}}}}processFilterCriteria(e,t){if(!t)return;let n=t.childNodes,r,i=n.length;for(let t=0;t<i;t++){let i=n.item(t);i.nodeType===1&&(i.localName===`colorFilter`?r=this.processColorFilter(e,i):i.localName===`customFilters`?r=this.processCustomFilters(e,i):i.localName===`dynamicFilter`?r=this.processDynamicFilter(e,i):i.localName===`filters`?r=this.processFilters(e,i):i.localName===`iconFilter`?r=this.processIcon(e,i):i.localName===`top10`?r=this.processTop10(e,i):i.localName===`extLst`&&(r=this.processFilterColumnExt(e,i)??r))}return r}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(t.getAttribute(`hiddenButton`))),i&&n){let e=n.hiddenButtons;e||(e=[],n.hiddenButtons=e),e.push(r)}let a=!1;if(t.hasAttribute(`showButton`)&&(a=A(t.getAttribute(`showButton`))),a&&n){let e=n.showButtons;!0!==e&&(e||(e=[],n.showButtons=e),e[r]=!0)}let o=this.processFilterCriteria(e,t);return o?(o.index=r,o):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}},SortStateVisitor:class{visit(e,t,n){if(!t)return;let r=t.getAttribute(`ref`),i={};t.hasAttribute(`caseSensitive`)&&(i.collatorOptions=A(t.getAttribute(`caseSensitive`))?m.CaseSensitiveOptions:m.CaseInsensitiveOptions);let a=t.getAttribute(`sortMethod`);a!=null&&a!==`none`&&(a===`stroke`?i.collatorOptions={...i.collatorOptions,collation:`stroke`}:a===`pinYin`&&(i.collatorOptions={...i.collatorOptions,collation:`pinyin`}));let o={};t.hasAttribute(`columnSort`)&&A(t.getAttribute(`columnSort`))&&(o.axis=c.Axis.Column);let s=f.fastStringToRange(r),l=[],u=[];this.processSortConditions(e,t,l,s,i,u),l.length>0&&(o.sorts=l);let d=e.getVisitorParamsState().get(`ref`);if(d&&r){let e=f.fastStringToRange(d);o.extent={range:g(e,s),sorts:u.map(t=>L(e,s,t))}}return Object.keys(l).length>0&&(n.sort=o),o}processSortCondition(e,t,n,r,i){if(!t)return null;let a={};if(!t.hasAttribute(`ref`))return void e.warn(`A sort condition has no ref; it was dropped.`,{onceKey:`xlsx.sheet.sort.noRef`});if(t.hasAttribute(`ref`)){let e=t.getAttribute(`ref`),r=f.fastStringToRange(e);a.index=n?r.colStart-n.colStart:r.colStart,i?.push(r)}let o={...r};a.criteria=o,o.reverse=!1,t.hasAttribute(`descending`)&&(o.reverse=A(t.getAttribute(`descending`)));let s=te(t.getAttribute(`sortBy`));s&&(o.sortOn=s);let c=U(e,t);return c&&(o.style=c),e.copyFromAttribute(t,`iconSet`,o),e.copyFromAttribute(t,`customList`,o),a}processSortConditions(e,t,n,r,i,a){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===`sortCondition`){let t=this.processSortCondition(e,s,r,i,a);t&&n.push(t)}}}},SheetStyleVisitor:class extends G{visit(e,t,n){this.processNumFmts(e,e.evaluate(`numFmts`,t),null),e.getVisitorParamsState().set(`colorsToProcess`,new Set);let a={fills:{},fonts:{},borders:{}},o=e.evaluate(`fonts`,t);this.processFonts(e,o,a.fonts);let s=a.fonts[this.normalFontId(e,t)],c={declared:[`1`,`true`].includes(o?.getAttribute(`x14ac:knownFonts`)??``),normalIsThemeFont:ae(s?.family),faces:de(Object.values(a.fonts).map(e=>({...e,family:se(e?.family,e?.fallbacks,null,!1).name})))};e.getVisitorParamsState().set(ge,c),s&&e.getVisitorParamsState().set(`defaultFont`,s),this.processFills(e,e.evaluate(`fills`,t),a.fills),this.processBorders(e,e.evaluate(`borders`,t),a.borders,!0),a.fills[0]={type:r.Type.None},a.fills[1]={type:r.Type.Pattern,patternType:r.BuiltInSheetPattern.Gray125},a.borders[0]={bottom:{style:i.StrokeStyle.None},left:{style:i.StrokeStyle.None},right:{style:i.StrokeStyle.None},top:{style:i.StrokeStyle.None}};let l=[];this.processXFs(e,e.evaluate(`cellStyleXfs`,t),l,a,null,!1);let u=new Map;if(l.length>0){let r=[];this.processCellStyles(e,e.evaluate(`cellStyles`,t),r,l,u),n.named=r}let d=[];this.processXFs(e,e.evaluate(`cellXfs`,t),d,a,u),Object.keys(d).length>0&&(n.direct=d);let f=this.collectHiddenXfs(e.evaluate(`cellXfs`,t));f.size>0&&e.getVisitorParamsState().set(`hiddenXfs`,f);let p=this.collectPivotButtonXfs(e.evaluate(`cellXfs`,t));p.size>0&&e.getVisitorParamsState().set(`pivotButtonXfs`,p);let m=this.collectXfComplements(e.evaluate(`cellXfs`,t));m.size>0&&e.getVisitorParamsState().set(`xfComplements`,m);let h=[];return this.processDXFs(e,e.evaluate(`dxfs`,t),h),this.processTableStyles(e,e.evaluate(`tableStyles`,t),n,h),this.processSlicerStyles(e,e.evaluate(`extLst`,t),n),this.processIndexColors(e,e.evaluate(`colors/indexedColors`,t),n),this.processMruColors(e,e.evaluate(`colors/mruColors`,t),n),n}normalFontId(e,t){let n=e.evaluate(`cellStyles`,t)?.childNodes,r=0;for(let e=0;e<(n?.length??0);e++){let t=n.item(e);if(t.nodeType===1&&t.getAttribute(`builtinId`)===`0`){r=parseInt(t.getAttribute(`xfId`)??`0`,10)||0;break}}let i=e.evaluate(`cellStyleXfs`,t)?.childNodes,a=0;for(let e=0;e<(i?.length??0);e++){let t=i.item(e);if(t.nodeType===1&&a++===r)return parseInt(t.getAttribute(`fontId`)??`0`,10)||0}return 0}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,n,r,i,a){if(!t)return;let o=t.getAttribute(`xfId`);if(o&&i){let e=i.get(parseInt(o));e&&e!==s.BuiltInName.Normal&&(n.named=e)}let c=e=>!(!a&&t.hasAttribute(e))||A(t.getAttribute(e)),l=e=>!a||t.hasAttribute(e)&&A(t.getAttribute(e)),u=a?`0`:void 0;if(c(`applyFont`)){let e=t.getAttribute(`fontId`)??u;if(e!==void 0&&(e!==`0`||l(`applyFont`))){let t=r.fonts[e];t!==void 0&&(n.font=t)}}if(c(`applyFill`)){let e=t.getAttribute(`fillId`)??u;if(e!==void 0&&(e!==`0`||l(`applyFill`))){let t=r.fills[e];t!==void 0&&Object.keys(t).length>0&&(n.fill=t)}}if(c(`applyBorder`)){let e=t.getAttribute(`borderId`)??u;if(e!==void 0&&(e!==`0`||l(`applyBorder`))){let t=r.borders[e];t!==void 0&&(n.borders=t)}}if(c(`applyNumberFormat`)){let r=t.getAttribute(`numFmtId`)??u;if(r!==void 0&&(r!==`0`||l(`applyNumberFormat`))){let t=parseInt(r),i,a=e.getVisitorParamsState();if(a){let e=a.get(`numFmts`);e&&(i=e.get(t)),n.numberFormat=i??t}else e.warn(`Number formats were unavailable; a cell format was not read.`,{onceKey:`xlsx.style.numberFormat.state`})}}if(c(`applyAlignment`)){let r=e.evaluate(`alignment`,t);(r||l(`applyAlignment`))&&this.processAlignment(e,r,n)}if(c(`applyProtection`)){let r=e.evaluate(`protection`,t);(r||l(`applyProtection`))&&this.processProtection(e,r,n)}let d=A(t.getAttribute(`quotePrefix`)??``);d&&(n.quotePrefix=d)}processAlignment(e,t,n){let r={};if(r.horizontal=t?.hasAttribute(`horizontal`)?t.getAttribute(`horizontal`):o.HorizontalAlignment.General,r.vertical=t?.hasAttribute(`vertical`)?t.getAttribute(`vertical`):o.VerticalAlignment.Bottom,r.indent=t?.hasAttribute(`indent`)?parseInt(t.getAttribute(`indent`)):0,r.relativeIndent=t?.hasAttribute(`relativeIndent`)?parseInt(t.getAttribute(`relativeIndent`)):0,r.overflow=A(t?.getAttribute(`wrapText`)??``)?o.Overflow.Wrap:o.Overflow.Visible,A(t?.getAttribute(`shrinkToFit`)??``)&&(r.overflow=o.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,r.stacked=!0),r.rotation=e}else r.rotation=0;t?.hasAttribute(`justifyLastLine`)&&(r.justifyLastLine=A(t.getAttribute(`justifyLastLine`)));let i=t?.getAttribute(`readingOrder`);return i&&(i===`0`?r.readingDirection=o.ReadingDirection.Auto:i===`1`?r.readingDirection=o.ReadingDirection.LeftToRight:i===`2`?r.readingDirection=o.ReadingDirection.RightToLeft:e.warn(`Invalid readingOrder '${i}'; the direction was left automatic.`,{onceKey:`xlsx.style.readingOrder`})),Object.keys(r).length>0&&(n.alignment=r),n}collectHiddenXfs(e){let t=new Set;if(!e)return t;let n=e.childNodes,r=0;for(let e=0;e<n.length;e++){let i=n.item(e);if(i.nodeType!==1||i.localName!==`xf`)continue;let a=i.childNodes;for(let e=0;e<a.length;e++){let n=a.item(e);n.nodeType===1&&n.localName===`protection`&&A(n.getAttribute(`hidden`)??``)&&t.add(r)}r++}return t}collectPivotButtonXfs(e){let t=new Set;if(!e)return t;let n=e.childNodes,r=0;for(let e=0;e<n.length;e++){let i=n.item(e);i.nodeType===1&&i.localName===`xf`&&(A(i.getAttribute(`pivotButton`)??``)&&t.add(r),r++)}return t}collectXfComplements(e){let t=new Map;if(!e)return t;let n=e.childNodes,r=0;for(let e=0;e<n.length;e++){let i=n.item(e);if(i.nodeType!==1||i.localName!==`xf`)continue;let a=q(i,`extLst`);if(a){let e=a.childNodes;for(let n=0;n<e.length;n++){let i=q(e.item(n),`xfComplement`),a=parseInt(i?.getAttribute(`i`)??``,10);isNaN(a)||t.set(r,a)}}r++}return t}processProtection(e,t,n){if(!t)return;let r=t.getAttribute(`locked`);return n.protection={alwaysUnlocked:!!r&&!A(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.borders=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`)}processSlicerStyles(e,t,n){if(!t)return;let r=null,i=null,a=t.childNodes;for(let e=0;e<a.length;e++){let t=a.item(e);if(t.nodeType!==1||t.localName!==`ext`)continue;let n=t.childNodes;for(let e=0;e<n.length;e++){let t=n.item(e);t.nodeType===1&&(t.localName===`dxfs`?r=t:t.localName===`slicerStyles`&&(i=t))}}if(!i)return;let o=[];if(r){e.getVisitorParamsState().set(`processingDXFs`,!0);let t=r.childNodes;for(let n=0;n<t.length;n++){let r=t.item(n);if(r.nodeType!==1||r.localName!==`dxf`)continue;let i={};this.processDXF(e,r,i),o.push(i)}e.getVisitorParamsState().delete(`processingDXFs`)}let s={},c=i.getAttribute(`defaultSlicerStyle`);c&&c!==`SlicerStyleLight1`&&(s.defaultSlicerStyle=c);let l=n.tables?.styles,u=i.childNodes;for(let t=0;t<u.length;t++){let n=u.item(t);if(n.nodeType!==1||n.localName!==`slicerStyle`)continue;let r=n.getAttribute(`name`);if(!r)continue;let i={},a=l?.[r];a&&!1===a.table&&!a.pivot&&(a.wholeTable&&(i.wholeTable=a.wholeTable),a.headerRow&&(i.headerRow=a.headerRow),delete l[r]);let c=e.evaluate(`slicerStyleElements`,n)?.childNodes,d=c?.length??0;for(let t=0;t<d;t++){let n=c.item(t);if(n.nodeType!==1||n.localName!==`slicerStyleElement`)continue;let r=n.getAttribute(`type`);if(!r||!ke.has(r))continue;let a=n.getAttribute(`dxfId`),s=a==null?void 0:o[parseInt(a)];s?i[r]=s:e.warn(`A slicer style names a format that does not exist (dxfId '${a}').`,{onceKey:`xlsx.style.slicerStyle.dxf`})}(s.styles??={})[r]=i}l&&Object.keys(l).length===0&&(delete n.tables.styles,Object.keys(n.tables).length===0&&delete n.tables),Object.keys(s).length>0&&(n.slicers=s)}processTableStyle(e,t,n,r,i=!1){let a=t.getAttribute(`name`),o={name:a};t.hasAttribute(`table`)&&(o.table=A(t.getAttribute(`table`))),o.pivot=!t.hasAttribute(`pivot`)||A(t.getAttribute(`pivot`)),i&&!o.pivot&&r.unshift(null);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===`tableStyleElement`){let t=n.getAttribute(`type`),i=n.getAttribute(`dxfId`),a=i==null?void 0:r?.[i];a||=(e.warn(`A table style names a format that does not exist (dxfId '${i}').`,{onceKey:`xlsx.style.tableStyle.dxf`}),{}),o[t]=a;let s=null;n.hasAttribute(`size`)&&(s=parseInt(n.getAttribute(`size`))),s&&!isNaN(s)&&(a.size=s)}}delete o.name,n[a]=o}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,n,r,i){if(!t)return;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===`cellStyle`){let e=parseInt(t.getAttribute(`xfId`)??``),a=t.getAttribute(`name`),o=t.getAttribute(`builtinId`),c=a;if(o!==null){let e=s.builtInNameFromId(parseInt(o));e!==void 0&&(c=e)}if(i.set(e,c),!r[e])continue;let l={name:c,style:r[e]};t.getAttribute(`hidden`)&&(l.hidden=A(t.getAttribute(`hidden`))),t.getAttribute(`iLevel`)&&(l.iLevel=parseInt(t.getAttribute(`iLevel`))),o!==null&&A(t.getAttribute(`customBuiltin`)??`0`)&&(l.customized=!0),n.push(l)}}}afterVisit(e,t,n){}},WorkbookVisitor:class extends G{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.processPivotCaches(e,e.evaluate(`pivotCaches`,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),e.copyFromAttribute(t,`${r}Password`,a,`legacyHash`),Object.keys(a).length>0&&(n[i]=a)}processWorkbookProtection(e,t,n){if(!t)return;let r={};this.processPassword(e,t,r,`workbook`,`password`),this.processPassword(e,t,r,`revisions`,`revisionsPassword`);for(let e of ue)r[e.key]=_e(e,t.getAttribute(e.attribute));return n.protection=r,n}processCalcPr(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`calcMode`,r,`calcMode`,e=>Ae[e]??null),e.copyFromAttribute(t,`fullCalcOnLoad`,r,`fullCalcOnLoad`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calcOnSave`,r,`calcOnSave`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calcCompleted`,r,`calcCompleted`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`fullPrecision`,r,`fullPrecision`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`forceFullCalc`,r,`forceFullCalc`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`concurrentCalc`,r,`concurrentCalc`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`concurrentManualCount`,r,`concurrentManualCount`,e.INT_COPY),e.copyFromAttribute(t,`refMode`,r,`refMode`),e.copyFromAttribute(t,`iterate`,r,`iterate`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`iterateCount`,r,`maxIteration`,e.INT_COPY),e.copyFromAttribute(t,`iterateDelta`,r,`maxIterateChange`,e.FLOAT_COPY);let i=t.getAttribute(`calcId`);i!==null&&e.getVisitorParamsState().set(`calcId`,i),n.calc=r}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`),e.copyFromAttribute(t,`sheetId`,r,`sheetId`,e.INT_COPY);let i=t.getAttribute(`r:id`),a=i?ne(e.getRelationships().get(i)?.type):null;if(a){let t=e.readEmbeddedPart(i);if(t?.xml){let e={part:t},i=fe(t.xml),o=i?v(e=>i.get(e)):void 0;o&&(e.tabColor=o),r.kind=a,r.sheet=e,n.push(r);return}e.warn(`The ${a} sheet '${r.name}' could not be read and was loaded as an empty worksheet.`),n.push(r);return}let o=i?e.getRef(i):null;o&&(r.sheet=o),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)}processPivotCaches(e,t,n){if(!t)return;let r=[],i=e.evaluate(`workbookPr`,t.parentNode)?.getAttribute?.(`date1904`),a=i===`1`||i===`true`,o=pe(e.getVisitorParamsState().get(`numFmts`),void 0),s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType!==1||n.localName!==`pivotCache`)continue;let i=parseInt(n.getAttribute(`cacheId`)??``,10),c=n.getAttribute(`r:id`);if(isNaN(i)||!c)continue;let l=e.readEmbeddedPart(c);if(!l)continue;let u=be(l,a,e=>o.numberFormat(e)),d=!u&&l.xml?ce(l.xml,o):void 0,f=!u&&l.xml?ye(l.xml):void 0;r.push({cacheId:i,part:l,...d?{partFormats:d}:{},...f?{source:f}:{},...u})}r.length>0&&(n.pivotCaches=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={},i=[`xWindow`,`yWindow`,`windowWidth`,`windowHeight`].map(e=>parseInt(t.getAttribute(e)??``,10));if(i.some(e=>Number.isFinite(e))){let[e,t,n,a]=i.map(e=>Number.isFinite(e)?e:0);r.windowBounds={left:e,top:t,width:n,height:a}}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]),e.copyFromAttribute(t,`firstSheet`,r,`firstTab`,[e.INT_COPY,e=>e]),e.copyFromAttribute(t,`minimized`,r,`minimized`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`autoFilterDateGrouping`,r,`autoFilterDateGrouping`,e.BOOLEAN_COPY);let a=t.getAttribute(`visibility`);a!==`hidden`&&a!==`veryHidden`||(r.visibility=a),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 n=t.getAttribute(`localSheetId`);if(!r[n]?.name)return void e.warn(`Defined name '${t.getAttribute(`name`)}' references a sheet with localSheetId '${n}' which does not exist.`);i.scope=r[n].name}let o={};for(let n of ve)e.copyFromAttribute(t,n,o);for(let e of R){let n=t.getAttribute(e);n!==`1`&&n!==`true`||(o[e]=!0)}e.copyFromAttribute(t,`functionGroupId`,o,`functionGroupId`,e.INT_COPY),Object.keys(o).length>0&&(i.fileAttributes=o),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){if(!t)return;e.copyFromAttribute(t,`date1904`,n,`date1904`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`codeName`,n,`codeName`),e.copyFromAttribute(t,`updateLinks`,n,`updateLinks`);let r=t.getAttribute(`hidePivotFieldList`);r!==`1`&&r!==`true`||(n.hiddenPivotFieldList=!0)}afterVisit(e,t,n){}},TableVisitor: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,`name`),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),r.totalsRowShown=t.getAttribute(`totalsRowShown`)!==`0`,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);let a=e.evaluate(`calculatedColumnFormula`,i);a?.textContent&&(t.calculatedColumnFormula=a.textContent),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)}},TableX14Visitor: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}},ExternalLinkVisitor: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}}if(!a)return n;t.getAttribute(`mc:Ignorable`)&&(n.mceIgnorable=!0);let o=a.getAttribute(`r:id`);o&&(n.__bookRelId=o);let s=this._findAbsoluteUrlRelId(a);return s&&(n.__absoluteUrlRelId=s),n.sheetNames=[],this.processSheetNames(e,a,n),this.processDefinedNames(e,a,n),this.processSheetDataSet(e,a,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 n=new u.Builder,r=t.childNodes,i=r.length;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType!==1||t.localName!==`row`)continue;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!==`cell`)continue;let r=t.getAttribute(`r`);if(!r)continue;let a=f.fastStringToCell(r);if(a?.rowIndex===void 0||a?.colIndex===void 0)continue;let o=this._readCellValue(t);o!==void 0&&n.pushAt(a.rowIndex,a.colIndex,o)}}return{sheetIndex:-1,data:n.build()?.tuples??[]}}_readCellValue(e){let t=this._findChild(e,`v`)?.textContent?.trim();if(t!==void 0&&t!==``)switch(e.getAttribute(`t`)){case null:case`n`:return parseFloat(t);case`b`:return t===`1`||t===`true`;case`str`:default:return t;case`e`:{let e=l.getBuiltInByLabel(t);return e?{t:`e`,v:e.getCode()}:t}}}_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}_findAbsoluteUrlRelId(e){let t=this._findChild(e,`alternateUrls`);return t?this._findChild(t,`absoluteUrl`)?.getAttribute(`r:id`)??null:null}},SlicerCacheDefinitionVisitor:class{visit(e,t,n){e.copyFromAttribute(t,`name`,n,`cacheName`),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,`sortOrder`,n),e.copyFromAttribute(r,`customListSort`,n,`customListSort`,e.BOOLEAN_COPY),e.copyFromAttribute(r,`crossFilter`,n),n):(this.processPivot(e,t,n),n)}processPivot(e,t,n){let r=[],i=``,a=t.childNodes;for(let t=0;t<a.length;t++){let o=a.item(t);if(o.nodeType!==1)continue;if(o.localName===`pivotTables`){let e=o.childNodes;for(let t=0;t<e.length;t++){let n=e.item(t);n.nodeType===1&&n.localName===`pivotTable`&&r.push({tabId:n.getAttribute(`tabId`)??``,name:n.getAttribute(`name`)??``})}continue}let s=o.getAttribute(`pivotCacheId`);if(s&&(n.pivotCacheId=s),o.localName===`state`||o.localName===`timelinePivotFilter`){n.tabular=!0,n.pivotData=(n.pivotData??``)+(e.serializeElement(o)??``);continue}if(o.localName===`data`){let t=null,r=o.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType!==1)continue;let a=i.getAttribute(`pivotCacheId`);a&&(n.pivotCacheId=a),i.localName===`tabular`&&(t=i)}if(t){n.tabular=!0,e.copyFromAttribute(t,`sortOrder`,n),e.copyFromAttribute(t,`customListSort`,n,`customListSort`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`crossFilter`,n),e.copyFromAttribute(t,`showMissing`,n,`showMissing`,e.BOOLEAN_COPY),n.pivotData=e.serializeElement(o)??void 0;continue}}let c=e.serializeElement(o);if(c===null)return;i+=c}n.pivotTables=r,n.pivotBody=i}},SlicersVisitor: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,e.copyFromAttribute(t,`xr10:uid`,r,`uid`);let i=t.getAttribute(`cache`),a=e.getVisitorParamsState().get(`slicerCaches`),o=i?a?.get(i):void 0;if(o)for(let e=0;e<J.length;e++){let t=J[e];o[t]!==void 0&&(r[t]=o[t])}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,`lockedPosition`,r,`lockedPosition`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`rowHeight`,r,`rowHeight`,e.INT_COPY)}},TimelinesVisitor:class{visit(e,t,n){let r=n.slicers;r||(r={},n.slicers=r);let i=t.childNodes;for(let t=0;t<i.length;t++){let n=i.item(t);n.nodeType===1&&n.localName===`timeline`&&this.processTimeline(e,n,r)}return r}processTimeline(e,t,n){let r={};n[t.getAttribute(`name`)]=r,e.copyFromAttribute(t,`xr10:uid`,r,`uid`);let i=t.getAttribute(`cache`),a=e.getVisitorParamsState().get(`slicerCaches`),o=i?a?.get(i):void 0;if(o)for(let e=0;e<J.length;e++){let t=J[e];o[t]!==void 0&&(r[t]=o[t])}e.copyFromAttribute(t,`caption`,r);let s={};for(let e=0;e<t.attributes.length;e++){let n=t.attributes.item(e);je.has(n.name)||n.name.startsWith(`xmlns`)||(s[n.name]=n.value)}r.timelineAttributes=s;let c=``,l=t.childNodes;for(let t=0;t<l.length;t++){let n=l.item(t);n.nodeType===1&&(c+=e.serializeElement(n)??``)}r.timelineBody=c}},FormControlPrVisitor:class{visit(e,t,n){let r={},i=t.attributes;for(let e=0;e<i.length;e++){let t=i.item(e),n=t.name;n===`xmlns`||n.startsWith(`xmlns:`)||(r[n]=t.value)}let a=[],o,s=t.childNodes;for(let t=0;t<s.length;t++){let n=s.item(t);if(n.nodeType===1){if(n.localName===`itemLst`){let e=n.childNodes;for(let t=0;t<e.length;t++){let n=e.item(t);n.nodeType===1&&n.localName===`item`&&a.push(n.getAttribute(`val`)??``)}}else n.localName===`extLst`&&(o=e.serializeElement(n)??void 0)}}let c=me(r,a,o);return n.formControl=c,c}},DrawingVisitor:class{visit(e,t,n){return n}afterVisit(e,t,n){for(let e of n?.movables??[])Y(e,!1)}},DrawingAnchorVisitor:class{visit(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`editAs`,r,`anchorType`),r.anchor={},t.localName===`absoluteAnchor`?(r.anchorType=`absolute`,this.processAbsoluteCoord(e,e.evaluate(`pos`,t),r.anchor,`from`,`x`,`y`),this.processAbsoluteCoord(e,e.evaluate(`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(`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`));let i=e.evaluate(`clientData`,t),a=e=>{let t=i?.getAttribute(e);return t===`0`||t===`false`};return a(`fPrintsWithSheet`)&&(r.noPrint=!0),a(`fLocksWithSheet`)&&(r.unlocked=!0),n.movables||=[],n.movables.push(r),r}processAbsoluteCoord(e,t,n,r,i,a){if(!t)return;let o={x:0,y:0};return o.x=h(t.getAttribute(i)),o.y=h(t.getAttribute(a)),r===`from`?n.tl=o:n.br=o,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=h(e.evaluate(`colOff`,t).textContent)),e.evaluate(`rowOff`,t)&&(i.y=h(e.evaluate(`rowOff`,t).textContent)),r===`from`?n.tl=i:n.br=i,n}},DrawingGraphicFrameVisitor:class extends H{visit(e,t,n){if(!t)return;if(this.isGroupContent(n)){if(e.getPath().includes(`Fallback`))return{};let{movable:r}=this.readMemberHeader(e,t,`graphicFrame`),i=e.evaluate(`xfrm`,t);if(i){_(i,r);let t=e.evaluate(`off`,i),n=e.evaluate(`ext`,i);r.anchor={tl:{x:h(t?.getAttribute(`x`)??null)??0,y:h(t?.getAttribute(`y`)??null)??0},br:{x:h(n?.getAttribute(`cx`)??null)??0,y:h(n?.getAttribute(`cy`)??null)??0}}}let a=this.readGraphic(e,t),o=a.type===`chart`?{...r.content.json,...a.json}:a.json;return r.content={...r.content,type:a.type,json:o},n.members.push(r),a.json}n=super.visit(e,t,n);let r=e.evaluate(`nvGraphicFramePr/cNvGraphicFramePr`,t);if(r){let t=e.evaluate(`graphicFrameLocks`,r);t&&t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`)}let i=this.readGraphic(e,t);return this.setContent(n,i),i}readGraphic(e,t){let n=e.evaluate(`graphic/graphicData`,t),r={type:`graphicFrame`,json:{}};if(!n)return r;let i=n.childNodes,a=i.length;for(let n=0;n<a;n++){let a=i.item(n);if(a.nodeType===1)try{let n=a.localName;n===`chart`?n=`chart`:n!==`slicer`&&n!==`timeslicer`||(n=`slicer`),r.type=n;let i=a.getAttribute(`r:id`);if(n===`chart`&&i){let n=this.readSourceId(e,t),a=e.readEmbeddedPart(i)??void 0,o;try{let t=a?.xml?xe(a.xml):null;o=t?.model,t?.lossy&&e.warn(`A chart states something its model does not; it is saved as it was until it is changed.`,{onceKey:`xlsx.chart.lossy`})}catch(t){e.warn(`A chart could not be read into the chart model; it is kept as its markup: ${t?.message??t}`,{onceKey:`xlsx.chart.model`})}r.json={sourceId:n,part:a,model:o}}else if(n===`slicer`){let n=this.readSourceId(e,t);n!==void 0&&(r.json={sourceId:n})}else i&&(r.json=e.getRef(i))}catch(t){e.warn(`Unable to read a graphic frame: ${t?.message??t}`,{onceKey:`xlsx.drawing.graphicFrame`})}}return r}},DrawingSpVisitor:X,DrawingPicVisitor:class extends H{visit(e,t,n){if(!t)return;if(this.isGroupContent(n)){if(e.getPath().includes(`Fallback`))return{};let{movable:r,content:i}=this.readMemberHeader(e,t,`picture`),a=this.readImage(e,t);return a?(this.readPictureDetails(e,t,a,r,i),n.members.push(r),i):{}}let r=super.visit(e,t,n),i=this.readImage(e,t);if(i===null)return;let a={},o=this.readSourceId(e,t);return o!==void 0&&(a.sourceId=o),this.readPictureDetails(e,t,i,r,a),this.setContent(r,{type:`picture`,json:a}),a}readPictureDetails(e,t,n,r,i){n?.resId!==void 0&&(i.resId=n.resId),n?.image&&(i.image=n.image);let a=t.getAttribute(`macro`);a&&(i.macro=a),t.hasAttribute(`fPublished`)&&(i.published=A(t.getAttribute(`fPublished`)));let o=e.evaluate(`nvPicPr/cNvPicPr`,t);if(o?.getAttribute){o.getAttribute(`preferRelativeResize`)===`0`&&(i.noRelativeResize=!0);let t=this.readLocks(e.evaluate(`picLocks`,o));t&&(i.locks=t),r.lockAspect=t?.noChangeAspect??!1}}readImage(e,t){let n=e.evaluate(`blipFill`,t),r=n?e.evaluate(`blip`,n):null;if(!r)return;if(!(r.getAttribute(`r:embed`)??r.getAttribute(`embed`)??r.getAttribute(`r:link`)??r.getAttribute(`link`)))return e.warn(`A picture names no image; it was not imported.`,{onceKey:`xlsx.drawing.picture.noRel`}),null;let{type:i,resId:a,...o}=new j().processImageFill(e,n);return!o.tile&&o.stretch&&Object.keys(o.stretch).length===0&&delete o.stretch,o.extLst&&Me.test(o.extLst)&&delete o.extLst,{resId:a,image:Object.keys(o).length>0?o:void 0}}},DrawingGrpSpVisitor:class extends H{constructor(...e){super(...e),this._fills=new j}visit(e,t,n){if(!t)return;let r=this.isGroupContent(n),i,a;if(r){if(e.getPath().includes(`Fallback`))return{};let r=this.readMemberHeader(e,t,`group`);i=r.movable,a=r.content,n.members.push(i)}else{if(e.getPath().includes(`Fallback`)&&n.content)return{};i=super.visit(e,t,n),a={};let r=this.readSourceId(e,t);r!==void 0&&(a.sourceId=r),this.setContent(i,{type:`group`,json:a})}a.members=[];let o=e.evaluate(`nvGrpSpPr/cNvGrpSpPr/grpSpLocks`,t);o?.hasAttribute?.(`noChangeAspect`)&&(i.lockAspect=o.getAttribute(`noChangeAspect`)===`1`);let s=this.readLocks(o);s&&(a.locks=s);let c=e.evaluate(`grpSpPr`,t);if(c){let t=e.evaluate(`xfrm`,c);if(t){_(t,i),t.getAttribute(`flipH`)===`1`&&(i.flipH=!0),t.getAttribute(`flipV`)===`1`&&(i.flipV=!0);let n=Z(e,t,`off`,`ext`),o=Z(e,t,`chOff`,`chExt`)??n;o&&(a.childBounds=o),r&&n&&(i.anchor={tl:{x:n.x,y:n.y},br:{x:n.width,y:n.height}})}let n=this._fills.getFill(e,c);n&&Object.keys(n).length>0&&(a.fill=n);let o=this._fills.getEffects(e,c);o&&(a.effects=o);let s=e.evaluate(`scene3d`,c),l=s?e.serializeElement(s):null;l&&(a.scene3d=l);let u=e.evaluate(`extLst`,c),d=u?e.serializeElement(u):null;d&&(a.extLst={...a.extLst,properties:d})}return a}},DrawingCxnSpVisitor:class extends X{visit(e,t,n){if(t)return this.visitShape(e,t,n,`cxnSp`,`nvCxnSpPr/cNvCxnSpPr/cxnSpLocks`)}},MetadataVisitor: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}},FeaturePropertyBagVisitor:class{visit(e,t,n){let r=[],i=t.childNodes;for(let e=0;e<i.length;e++){let t=i.item(e);t.nodeType===1&&t.localName===`bag`&&r.push(this._readBag(t))}let a=[],o=r.find(e=>e.type===`XFComplements`)?.arrays.get(`MappedFeaturePropertyBags`)??[];for(let t=0;t<o.length;t++){let n=r[o[t]]?.ids.get(`XFControls`),i=n===void 0?void 0:r[n]?.ids.get(`CellControl`),s=i===void 0?void 0:r[i]?.type,c=s?Ne[s]:void 0;c||e.warn(`A cell format's feature '${s??`unknown`}' is not read; its cells keep their values.`),a.push(c?{type:c}:null)}let s={controls:a};return n.featurePropertyBag=s,s}_readBag(e){let t={type:e.getAttribute(`type`)??``,ids:new Map,arrays:new Map},n=e.childNodes;for(let e=0;e<n.length;e++){let r=n.item(e);if(r.nodeType!==1)continue;let i=r.getAttribute(`k`)??``;if(r.localName===`bagId`){let e=parseInt(r.textContent??``,10);isNaN(e)||t.ids.set(i,e)}else if(r.localName===`a`){let e=[],n=r.childNodes;for(let t=0;t<n.length;t++){let r=n.item(t);if(r.nodeType!==1||r.localName!==`bagId`)continue;let i=parseInt(r.textContent??``,10);isNaN(i)||e.push(i)}t.arrays.set(i,e)}}return t}},CommentsVisitor: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)}}}},CommentVisitor:class{visit(e,t,n){if(!t)return;let r=t.getAttribute(`ref`);if(!r)return;let i={content:``};if(t.hasAttribute(`authorId`)){let e=parseInt(t.getAttribute(`authorId`),10);isNaN(e)||(i.authorId=e)}return i.content=function(e){if(!e)return``;let t=[],n=!0,r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType===1){if(i.localName===`t`)t.push({text:i.textContent??``});else if(i.localName===`r`){let e={text:``},r=i.childNodes;for(let t=0;t<r.length;t++){let n=r.item(t);if(n.nodeType===1){if(n.localName===`t`)e.text+=n.textContent??``;else if(n.localName===`rPr`){let t=Fe(n);t&&(e.font=t)}}}e.font&&(n=!1),t.push(e)}}}return t.length===0?e.textContent??``:n?t.map(e=>e.text).join(``):{runs:t}}(e.evaluate(`text`,t)),n.push({r,v:i}),i}},ThreadedCommentsVisitor:class{visit(e,t,n){if(!t)return;let r=[];return n.comments=r,r}},ThreadedCommentVisitor:class{visit(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`id`,r,`id`,T);let i=t.getAttribute(`ref`);e.copyFromAttribute(t,`personId`,r,`personId`,T),e.copyFromAttribute(t,`parentId`,r,`parentId`,T);let a=t.getAttribute(`dT`);a&&(r.dt=function(e){let t=/^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(e.trim());if(!t)return e;let[,n,r,i]=t;return`${n}${r?`.${(r+`00`).substring(0,3)}`:``}${i??`Z`}`}(a)),t.hasAttribute(`done`)&&(r.done=A(t.getAttribute(`done`)));let o=function(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!==`mentions`)continue;let i=r.childNodes;for(let e=0;e<i.length;e++){let n=i.item(e);if(n.nodeType!==1||n.localName!==`mention`)continue;let r=n.getAttribute(`mentionId`),a=n.getAttribute(`mentionpersonId`);if(!r||!a)continue;let o={id:T(r),personId:T(a)},s=parseInt(n.getAttribute(`startIndex`)??``,10);isNaN(s)||(o.startIndex=s);let c=parseInt(n.getAttribute(`length`)??``,10);isNaN(c)||(o.length=c),(t??=[]).push(o)}}return t}(t);return o&&(r.mentions=o),n.push({r:i,v:r}),r}},PersonListVisitor: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&&n.localName===`person`){let t={};e.copyFromAttribute(n,`id`,t,`id`,T),e.copyFromAttribute(n,`displayName`,t),e.copyFromAttribute(n,`userId`,t,`userId`,T),e.copyFromAttribute(n,`providerId`,t),r.push(t)}}return r.length>0&&(n.persons=r),r}}},Ie=class{constructor(e,t){this.path=e,this.visitor=t}},Le=class{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor(`Relationships`,new $.RelsVisitor),this.registerVisitor(`cp:coreProperties`,new $.CorePropertiesVisitor),this.registerVisitor(`Properties`,new $.AppPropertiesVisitor),this.registerVisitor(`spPr`,new $.ShapePropertiesVisitor),this.registerVisitor(`txBody`,new $.ShapeTextVisitor),this.registerVisitor(`txPr`,new $.TextPropertiesVisitor),this.registerVisitor(`a:theme`,new $.ThemeVisitor),this.registerVisitor(`a:theme`,new $.ClrSchemeVisitor,`themeElements/clrScheme`),this.registerVisitor(`a:theme`,new $.FontSchemeVisitor,`themeElements/fontScheme`),this.registerVisitor(`a:theme`,new $.FmtSchemeVisitor,`themeElements/fmtScheme`),this.registerVisitor(`a:theme`,new $.ObjectDefaultsVisitor,`objectDefaults`),this.registerVisitor(`autoFilter`,new $.AutoFilterVisitor),this.registerVisitor(`sortState`,new $.SortStateVisitor),this.registerVisitor(`s:workbook`,new $.WorkbookVisitor),this.registerVisitor(`styleSheet`,new $.SheetStyleVisitor),this.registerVisitor(`x14:table`,new $.TableX14Visitor),this.registerVisitor(`table`,new $.TableVisitor),this.registerVisitor(`externalLink`,new $.ExternalLinkVisitor),this.registerVisitor(`wsDr`,new $.DrawingVisitor),this.registerVisitor(`twoCellAnchor`,new $.DrawingAnchorVisitor),this.registerVisitor(`oneCellAnchor`,new $.DrawingAnchorVisitor),this.registerVisitor(`absoluteAnchor`,new $.DrawingAnchorVisitor),this.registerVisitor(`graphicFrame`,new $.DrawingGraphicFrameVisitor),this.registerVisitor(`sp`,new $.DrawingSpVisitor),this.registerVisitor(`grpSp`,new $.DrawingGrpSpVisitor),this.registerVisitor(`cxnSp`,new $.DrawingCxnSpVisitor),this.registerVisitor(`pic`,new $.DrawingPicVisitor),this.registerVisitor(`metadata`,new $.MetadataVisitor),this.registerVisitor(`FeaturePropertyBags`,new $.FeaturePropertyBagVisitor),this.registerVisitor(`comments`,new $.CommentsVisitor),this.registerVisitor(`comment`,new $.CommentVisitor),this.registerVisitor(`ThreadedComments`,new $.ThreadedCommentsVisitor),this.registerVisitor(`threadedComment`,new $.ThreadedCommentVisitor),this.registerVisitor(`threadedComment`,new $.TextPropertiesVisitor(`content`),`text`),this.registerVisitor(`personList`,new $.PersonListVisitor),this.registerVisitor(`slicerCacheDefinition`,new $.SlicerCacheDefinitionVisitor),this.registerVisitor(`slicers`,new $.SlicersVisitor),this.registerVisitor(`timelineCacheDefinition`,new $.SlicerCacheDefinitionVisitor),this.registerVisitor(`timelines`,new $.TimelinesVisitor),this.registerVisitor(`formControlPr`,new $.FormControlPrVisitor)}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 Ie(n,t))}parseDxf(t,n=``,r=e.EmptyObject){this.visitorParamsState||=new Map;let i=this.visitorParamsState,a=i.get(`processingDXFs`);i.set(`processingDXFs`,!0);try{let e=new z(null,this,`/dxf`,t,{},n,r),i={};return new $.SheetStyleVisitor().processDXF(e,t,i),i}finally{a===void 0?i.delete(`processingDXFs`):i.set(`processingDXFs`,a)}}getVisitorParamsState(){return this.visitorParamsState}transform(t,n,r=e.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 z(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){t.context.warn(`Unable to finish reading '${t.context.getPath()}': ${e?.message??e}`,{onceKey:`xlsx.transform.afterVisit`})}}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{t.warn(`Invalid path '${c.path}' for '${e}'.`,{onceKey:`xlsx.transform.invalidPath`})}if(!u)continue;let d=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 z(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++)d(e.item(n))}else d(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(),d=t.getJsonRoot(),f=r.childNodes,p=f.length;for(let e=0;e<p;e++){let r=f.item(e);if(r.nodeType!==1)continue;let c=r,p=c.nodeName,m=l.get(p);m||=(p=c.localName,l.get(p));let h=t.getPath()+`/`+p,g=new z(t,this,h,u,d,a,o);this._doWalk(m,g,n,c,s??i,a,o)}return s}};export{Le as DOMTransformer,z as ExecutionContext,I as NumberUtils,ee as VisitorUtils};
1
+ import{I as e}from"./ChSvXfVMLxZsP9zG.js";import{C as t,D as n,K as r,Ot as i,Z as a,ht as o,t as s}from"./DuYb_otrRZZDq6-f.js";import{c,i as l}from"./CQukCzhuewMuFOlO.js";import{Bn as u,Ca as d,M as f,Zr as p,nn as m}from"./DQeIWKasFD3DnWL7.js";import{An as h,Ar as g,Cn as _,D as v,En as ee,Et as te,Hr as ne,K as re,Kt as ie,Ln as ae,Lr as oe,N as y,On as b,Or as x,Pn as se,Qt as ce,R as S,Rr as le,Rt as ue,Sn as de,V as C,Vt as fe,Xt as w,b as T,br as pe,bt as E,c as D,en as O,et as k,hr as A,it as j,jt as me,lt as M,on as he,pn as ge,r as N,sn as P,tn as F,vn as I,w as L,z as _e}from"./Bs65RHirk11sxOB9.js";import"./VF7dro9jrDEAX6kD.js";import{a as ve,c as R,o as ye,s as be,t as xe}from"./Yz4ksf-M05RGdHO3.js";var Se=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()}},Ce=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,we=e=>{let t=parseInt(e);return isNaN(t)?null:t},Te=e=>{let t=parseFloat(e);return isNaN(t)?null:t},Ee=new Map,z=class{constructor(t,n,r,i,a,o=null,s=e.EmptyObject){this._fileLocation=``;let c=(e,t,n)=>s?.getRef?.(e,t,n,s?.parsedRefs),l=e=>s?.getRefs?.(e,s?.parsedRefs);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,this._readEmbeddedPart=t._readEmbeddedPart):(o&&(this._fileLocation=o),s?.getRef&&(this._getRef=c),s?.getRefs&&(this._getRefs=l),this._onWarning=s?.onWarning,this._addPerson=s?.addPerson,this._serializeElement=s?.serializeElement,this._readEmbeddedPart=s?.readEmbeddedPart)}getRef(e,t=!1){return this._getRef?.(e,this._fileLocation,t)??null}readEmbeddedPart(e){return this._readEmbeddedPart?.(e,this._fileLocation)??null}getRelationships(){return this._getRefs?.(this._fileLocation)??Ee}getPath(){return this.currentPath}getFileLocation(){return this._fileLocation}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(e,t){this._raiseWarning(e,this.getFileLocation(),t?.onceKey)}_raiseWarning(e,t,n){this._onWarning?this._onWarning(e,t,n):this._parent?this._parent._raiseWarning(e,t,n):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 Se(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.getFromPath(t,n)}setToPath(t,n,r){return e.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 Ce}get INT_COPY(){return we}get FLOAT_COPY(){return Te}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)}},B=(e,t)=>{let n=[],r=e.childNodes,i=r.length;for(let e=0;e<i;e++){let i=r.item(e);i.nodeType===1&&i.localName===t&&n.push(i)}return n},De=[[`fillRef`,`fill`],[`lnRef`,`stroke`],[`effectRef`,`effect`]],V=(e,t)=>{let n=new j,r={};for(let[i,a]of De){let o=e.evaluate(i,t);if(!o)continue;let s={index:parseInt(o.getAttribute(`idx`)??`0`,10)||0},c=n.processAdjColor(e,o);c&&(s.color=c),r[a]=s}let i=e.evaluate(`fontRef`,t);if(i){let t={index:i.getAttribute(`idx`)??`none`},a=n.processAdjColor(e,i);a&&(t.color=a),r.font=t}return r},H=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),this.readNonVisualDetails(e,r,n),e.copyFromAttribute(r,`id`,n)),n}readNonVisualDetails(e,t,n){t.hasAttribute(`title`)&&(n.title=t.getAttribute(`title`));let r=e.evaluate(`hlinkClick`,t);r&&(n.hyperlink=y(e,r));let i=e.evaluate(`hlinkHover`,t);i&&(n.hoverHyperlink=y(e,i));let a=e.evaluate(`extLst`,t),o=a?e.serializeElement(a):null;o&&(n.extLst={...n.extLst,nonVisual:o})}setContent(e,t){let n=e;n.name!==void 0&&(t.name=n.name,delete n.name),n.description!==void 0&&(t.description=n.description,delete n.description);for(let e of[`title`,`hyperlink`,`hoverHyperlink`,`extLst`])n[e]!==void 0&&(t.json&&(t.json[e]=n[e]),delete n[e]);e.content=t}isGroupContent(e){return Array.isArray(e?.members)}readMemberHeader(e,t,n){let r={},i={anchor:void 0,content:{type:n,json:r}},a=e.evaluate(`*/cNvPr`,t);if(a?.item&&(a=a.item(0)),a){let n=a.getAttribute(`name`);n!==null&&(i.content.name=n);let o=a.getAttribute(`descr`);o&&(i.content.description=o),e.copyFromAttribute(a,`hidden`,i,`hidden`,e.BOOLEAN_COPY),this.readNonVisualDetails(e,a,r);let s=this.readSourceId(e,t);s!==void 0&&(r.sourceId=s)}return{movable:i,content:r}}readStyleRefs(e,t,n){let r=e.evaluate(`style`,t);if(!r)return void(n.style=null);let i=V(e,r),o=a.withoutDefaultStyleRefs({...n,style:i});o&&(n.style=o)}readLocks(e){let t=e?.attributes;if(!t||t.length===0)return;let n={};for(let e=0;e<t.length;e++){let r=t.item(e);r.name.startsWith(`xmlns`)||(n[r.localName??r.name]=A(r.value))}return Object.keys(n).length>0?n:void 0}readSourceId(e,t){let n=e.evaluate(`*/cNvPr`,t);n?.item&&(n=n.item(0));let r=n?.getAttribute?.(`id`),i=r?parseInt(r,10):void 0;return i===void 0||isNaN(i)?void 0:i}},Oe=[[`spDef`,`shape`],[`lnDef`,`line`],[`txDef`,`text`]],U=(e,t)=>{let n=t.getAttribute(`dxfId`);if(n===null)return;let r=parseInt(n);return e.getVisitorParamsState().get(`dxfs`)?.get(r)||(e.warn(`A color filter or sort names a format that does not exist (dxfId '${n}').`),{})},W=e=>e===`1`||e===`true`,G=class{visit(e,t,n){}processDataBarColor(e,t,n,r,i=`auto`){if(!t)return;let a=v(e=>t.getAttribute(e),i);return a&&(n[r]=a),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.Style.Italic),e.getValAttrAsBoolean(`strike`,t,!0)&&(r.strike=M(!0));let i=e.evaluate(`u`,t);if(i){let e=i.getAttribute(`val`);r.underline=E(e)}let a=k(e.evaluate(`vertAlign`,t)?.getAttribute(`val`));a!==void 0&&(r.baseline=a),P(e,t,r,`sz`,`size`);let o=e.evaluate(`color`,t);this.processDataBarColor(e,o,r,`color`),r.color||=`auto`,w(e,t,r,`name`,`family`),w(e,t,r,`rFont`,`family`);let s=e.evaluate(`family`,t);if(s){let e=s.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`]}}D(r,e.evaluate(`scheme`,t)?.getAttribute(`val`)),x(e,t,r,`shadow`,`shadow`,!0),x(e,t,r,`outline`,`outline`,!0);for(let n of[`condense`,`extend`]){let i=C(n,!!e.getValAttrAsBoolean(n,t,!0));i!==void 0&&(r.letterSpacing=i)}return le(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,n,i){let a={type:r.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 n[i]=a,n}processGradientFill(e,t,n){if(!t)return;n.type=r.Type.Gradient;let i=[];n.stops=i;let a=t.getAttribute(`type`);a&&(n.gradientType=a);let o=t.hasAttribute(`degree`)?parseFloat(t.getAttribute(`degree`)):0;(o+90)%360!=0&&(n.angle=(o+90)%360),(t.hasAttribute(`left`)||t.hasAttribute(`top`)||t.hasAttribute(`right`)||t.hasAttribute(`bottom`))&&(n.focus={left:K(t.getAttribute(`left`)),top:K(t.getAttribute(`top`)),right:K(t.getAttribute(`right`)),bottom:K(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 n}processPatternFill(e,t,n){if(!t)return;let i=e.getVisitorParamsState().get(`processingDXFs`),a=t.getAttribute(`patternType`)||(i?r.BuiltInSheetPattern.Solid:r.BuiltInSheetPattern.None);if(a===r.BuiltInSheetPattern.None)return{none:!0};n.type=r.Type.Pattern,a&&(n.patternType=a);let o=`foreground`,s=`background`,c=n.patternType===r.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,n,o,l);let f=e.evaluate(`bgColor`,t);return this.processDataBarColor(e,f,n,s,u),c&&(n.foreground||=`lt1`,n.background||=`dk1`),n}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,n,r,a){if(!t)return;let o={};this.processBorderStroke(e,t,o,i.Edge.Left),this.processBorderStroke(e,t,o,i.Edge.Right),a?(o.right||o.left)&&(o.vertical=o.right?{...o.right}:{...o.left}):this.processBorderStroke(e,t,o,i.Edge.Vertical),this.processBorderStroke(e,t,o,i.Edge.Top),this.processBorderStroke(e,t,o,i.Edge.Bottom),a?(o.bottom||o.top)&&(o.horizontal=o.bottom?{...o.bottom}:{...o.top}):this.processBorderStroke(e,t,o,i.Edge.Horizontal);let s=this.processBorderStroke(e,t,{},`diagonal`);return s&&(W(t.getAttribute(`diagonalUp`))&&(o.diagonalUp={...s}),W(t.getAttribute(`diagonalDown`))&&(o.diagonalDown={...s})),n[r]=o,n}processBorderStroke(e,t,n,r){if(!t)return;let a=e.evaluate(r,t);if(!a)return;let o={};a.hasAttribute(`style`)?o.style=a.getAttribute(`style`):e.getVisitorParamsState().get(`processingDXFs`)&&(o.style=i.StrokeStyle.None);let s=e.evaluate(`color`,a);return s&&this.processDataBarColor(e,s,o,`color`),Object.keys(o).length>0?n[r]=o:null}},K=e=>{if(!e)return 0;let t=parseFloat(e);return isNaN(t)?0:t},q=(e,t)=>{if(!e||e.nodeType!==1)return null;let n=e.childNodes;for(let e=0;e<n.length;e++){let r=n.item(e);if(r.nodeType===1&&r.localName===t)return r}return null},ke=new Set(Object.values(f.ElementType).filter(e=>e!==f.ElementType.WholeTable&&e!==f.ElementType.HeaderRow)),Ae={auto:`auto`,autoNoTable:`automaticExceptTables`,manual:`manual`},J=[`tableId`,`columnId`,`cacheName`,`cachePath`,`sourceName`,`sortOrder`,`customListSort`,`crossFilter`,`pivotTables`,`pivotCacheId`,`pivotBody`,`tabular`,`pivotData`,`showMissing`],je=new Set([`name`,`xr10:uid`,`cache`,`caption`]),Y=(e,t)=>{let n=e.content,r=n?.json;if(r){if(n.type===`shape`||n.type===`picture`){let{rotation:n,flipH:i,flipV:a,bounds:o}=r;delete r.rotation,delete r.flipH,delete r.flipV,delete r.bounds,n!==void 0&&n!==0&&(e.rotation=n),i&&(e.flipH=!0),a&&(e.flipV=!0),t&&o&&(e.anchor={tl:{x:o.x,y:o.y},br:{x:o.width,y:o.height}})}if(n.type===`group`)for(let e of r.members??[])Y(e,!0)}},X=class extends H{visit(e,t,n){if(t)return this.visitShape(e,t,n,`sp`,`nvSpPr/cNvSpPr/spLocks`)}visitShape(e,n,r,i,a){let o=F[i];if(this.isGroupContent(r)){if(e.getPath().includes(`Fallback`))return{};let{movable:s,content:c}=this.readMemberHeader(e,n,`shape`);o!==t.Type.Shape&&(c.type=o),this.readShapeDetails(e,n,i,a,c),this.readStyleRefs(e,n,c);let l=e.evaluate(a,n);l?.hasAttribute?.(`noChangeAspect`)&&(s.lockAspect=l.getAttribute(`noChangeAspect`)===`1`);let u=this.readTwinOf(e,n);return u!==void 0&&Object.assign(c,{twinOf:u}),r.members.push(s),c}if(e.getPath().includes(`Fallback`)&&r.content){let i=r.content.json;if(r.content.type===`shape`&&i&&(i.type??t.Type.Shape)===o){let t=e.evaluate(`txBody`,n),r=t?new O().readTextBody(e,t):null;r&&ie(r)!==``&&(i.text=r)}return{}}r=super.visit(e,n,r);let s=e.evaluate(a,n);s?.hasAttribute?.(`noChangeAspect`)&&(r.lockAspect=s.getAttribute(`noChangeAspect`)===`1`);let c=o===t.Type.Shape?{}:{type:o},l=this.readSourceId(e,n);l!==void 0&&(c.sourceId=l),this.readShapeDetails(e,n,i,a,c),this.readStyleRefs(e,n,c);let u=this.readTwinOf(e,n);return u!==void 0&&Object.assign(c,{twinOf:u}),this.setContent(r,{type:`shape`,json:c}),c}readTwinOf(e,t){let n=e.evaluate(`*/cNvPr/extLst/ext/compatExt`,t);n?.item&&(n=n.item(0));let r=/^_x0000_s(\d+)$/.exec(n?.getAttribute?.(`spid`)??``);return r?parseInt(r[1],10):void 0}readShapeDetails(e,t,n,r,i){let a=t.getAttribute(`macro`);a&&(i.macro=a);let o=t.getAttribute(`textlink`);o&&(i.textLink=o),t.hasAttribute(`fLocksText`)&&(i.locksText=A(t.getAttribute(`fLocksText`))),t.hasAttribute(`fPublished`)&&(i.published=A(t.getAttribute(`fPublished`)));let s=r.slice(0,r.lastIndexOf(`/`)),c=e.evaluate(s,t);c?.getAttribute?.(`txBox`)===`1`&&(i.textBox=!0);let l=this.readLocks(e.evaluate(r,t));if(l&&(i.locks=l),n===`cxnSp`&&c){let t=t=>{let n=e.evaluate(t,c);if(n?.getAttribute)return{id:parseInt(n.getAttribute(`id`)??`0`,10)||0,index:parseInt(n.getAttribute(`idx`)??`0`,10)||0}},n=t(`stCxn`),r=t(`endCxn`);(n||r)&&(i.connectorEnds={},n&&(i.connectorEnds.start=n),r&&(i.connectorEnds.end=r))}}},Me=/^<a:extLst(?:\s+xmlns:a="[^"]*")?><a:ext uri="\{28A0092B-C50C-407E-A947-70E740481C1C\}"><a14:useLocalDpi(?:\s+xmlns:a14="[^"]*")?\s+val="0"\s*\/><\/a:ext><\/a:extLst>$/,Z=(e,t,n,r)=>{let i=e.evaluate(n,t),a=e.evaluate(r,t);return i||a?{x:h(i?.getAttribute(`x`)??null)??0,y:h(i?.getAttribute(`y`)??null)??0,width:h(a?.getAttribute(`cx`)??null)??0,height:h(a?.getAttribute(`cy`)??null)??0}:null},Ne={Checkbox:`checkbox`},Q=e=>{let t=e.getAttribute(`val`);return t!==`0`&&t!==`false`},Pe={1:`serif`,2:`sans-serif`,3:`monospace`,4:`cursive`,5:`fantasy`};function Fe(e){let t={},r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType===1)switch(i.localName){case`b`:t.weight=Q(i)?700:400;break;case`i`:t.style=Q(i)?n.Style.Italic:n.Style.Normal;break;case`strike`:t.strike=M(Q(i));break;case`outline`:t.outline=Q(i);break;case`shadow`:t.shadow=Q(i);break;case`condense`:case`extend`:{let e=C(i.localName,Q(i));e!==void 0&&(t.letterSpacing=e);break}case`u`:t.underline=E(i.getAttribute(`val`));break;case`vertAlign`:{let e=k(i.getAttribute(`val`));e!==void 0&&(t.baseline=e);break}case`sz`:{let e=parseFloat(i.getAttribute(`val`)??``);isNaN(e)||(t.size=e);break}case`rFont`:{let e=i.getAttribute(`val`);e&&(t.family=e);break}case`family`:{let e=Pe[i.getAttribute(`val`)??``];e&&(t.fallbacks=[e]);break}case`charset`:{let e=parseInt(i.getAttribute(`val`)??``,10);isNaN(e)||(t.charset=e);break}case`scheme`:D(t,i.getAttribute(`val`));break;case`color`:{let e=i.getAttribute(`rgb`);if(e&&!i.hasAttribute(`theme`)){t.color=`#`+(e.length===8?e.substring(2):e).toUpperCase();break}let n=v(e=>i.getAttribute(e));n&&(t.color=n);break}}}return Object.keys(t).length>0?t:null}var $={RelsVisitor: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}},CorePropertiesVisitor: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||``}}},AppPropertiesVisitor:class{visit(e,t,n){let r=t.childNodes,i=r.length;for(let e=0;e<i;e++)if(r.item(e).localName===`property`)return this.visitCustom(t,n);let a=[];for(let t=0;t<i;t++){let n=r.item(t);if(n.nodeType!==1)continue;let i=this.processProperty(e,n);i&&a.push(i)}return a.length>0&&(n.properties=a),a}visitCustom(e,t){let n=[],r=e.childNodes,i=r.length;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType!==1||t.localName!==`property`)continue;let i=t.getAttribute(`name`);if(!i)continue;let a=null;for(let e=0;e<t.childNodes.length&&!a;e++){let n=t.childNodes.item(e);n.nodeType===1&&(a=n)}let o={key:i,kind:a?.localName??null,value:a?.textContent??``},s=t.getAttribute(`linkTarget`);s&&(o.linkTarget=s),n.push(o)}return n.length>0&&(t.custom=n),n}processProperty(e,t){if(t)return{key:t.localName,value:t.textContent||``}}},ShapePropertiesVisitor:S,TextPropertiesVisitor:re,ShapeTextVisitor:O,ThemeVisitor:class{visit(e,t,n){n.name=t.getAttribute(`name`),n.objectDefaults={};let r=B(t,`custClrLst`)[0];if(r){let t=new j,i=[];for(let n of B(r,`custClr`)){let r=t.processAdjColor(e,n);if(!r)continue;let a={color:r},o=n.getAttribute(`name`);o&&(a.name=o),i.push(a)}i.length&&(n.customColors=i)}for(let e of B(t,`extLst`))for(let t of B(e,`ext`)){if(t.getAttribute(`uri`)!==`{05A4C25C-085E-4340-85A3-A5531E510DB2}`)continue;let e=B(t,`themeFamily`)[0],r=e?.getAttribute(`id`);if(!r)continue;let i={name:e.getAttribute(`name`)??``,id:r},a=e.getAttribute(`vid`);a&&(i.vid=a),n.family=i}return n}},ClrSchemeVisitor:class extends j{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}},FontSchemeVisitor:class{visit(e,t,n){let r={};r.name=t.getAttribute(`name`);let i=this.processFontCollection(e,e.evaluate(`majorFont`,t));i&&(r.major=i);let a=this.processFontCollection(e,e.evaluate(`minorFont`,t));return a&&(r.minor=a),n.fonts=r,r}processFontCollection(e,t){if(!t)return;let n={},r=e.evaluate(`latin`,t),i=r?.getAttribute(`typeface`);i&&(n.latin=i);let a=r?.getAttribute(`panose`);a&&(n.panose=a);let o=e.evaluate(`ea`,t)?.getAttribute(`typeface`);o&&(n.eastAsian=o);let s=e.evaluate(`cs`,t)?.getAttribute(`typeface`),c;s&&(n.complexScript=s);let l=t.childNodes,u=l.length;for(let e=0;e<u;e++){let t=l.item(e);if(t.nodeType!==1||t.localName!==`font`)continue;let n=t.getAttribute(`script`);n&&((c??={})[n]=t.getAttribute(`typeface`)??``)}return c&&(n.scripts=c),n}},ObjectDefaultsVisitor:class{visit(e,t,n){let r={};for(let[n,i]of Oe){let a=e.evaluate(n,t);a&&(r[i]=this.processDefault(e,a))}return n.objectDefaults=r,{}}processDefault(e,t){let n={},r=e.evaluate(`spPr`,t);r&&new S().visit(e,r,n);let i=new O().readTextBody(e,t);(i.body||i.listStyle)&&(n.text=i);let a=e.evaluate(`style`,t);return a&&(n.style=V(e,a)),n}},FmtSchemeVisitor:class extends j{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&&(n.fillStyleLst=r),i&&(n.lnStyleLst=i),a&&(n.effectStyleLst=a),o&&(n.bgFillStyleLst=o),r&&i&&a&&o)return;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:r.Type.None};case`solidFill`:{let n=this.processAdjColor(e,t);return n?{type:r.Type.Solid,color:n}: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);n.nodeType===1&&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}},AutoFilterVisitor: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),n}processColorFilter(e,t){let n={},r={operator:u.BuiltInOperatorNames.Color,param:n};e.copyFromAttribute(t,`cellColor`,n,`cellColor`,e.BOOLEAN_COPY);let i=U(e,t);return i&&(n.style=i),r}processCustomFilter(e,t){return oe({operator:t.getAttribute(`operator`),val:t.getAttribute(`val`)},t=>e.warn(t))}processCustomFilters(e,t){let n=t.getAttribute(`and`),r=n===`and`||n===`1`;t.getAttribute(`val`);let i=[],a={operator:r?u.BuiltInOperatorNames.And:u.BuiltInOperatorNames.Or,param:i},o=t.childNodes,s=o.length;for(let t=0;t<s;t++){let n=o.item(t);if(n.nodeType!==1)continue;let r=null;n.localName===`customFilter`&&(r=this.processCustomFilter(e,n)),r&&i.push(r)}return i.length===1?i[0]:he(a)}processDynamicFilter(e,t){return N(t.getAttribute(`type`),t.getAttribute(`val`),t.getAttribute(`maxVal`))}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 n={},r={operator:u.BuiltInOperatorNames.InSet,param:n};r.selector=u.BuiltInSelectorNames.Display,e.copyFromAttribute(t,`blank`,n,`blank`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calendarType`,n,`calendarType`);let i=[],a=[],o=t.childNodes,s=o.length;for(let t=0;t<s;t++){let n=o.item(t);if(n.nodeType===1){if(n.localName===`dateGroupItem`){let t=this.processDateGroupItem(e,n);t&&i.push(t)}else if(n.localName===`filter`){let t=this.processFilterItem(e,n);t!==void 0&&a.push(t)}}}return i.length>0&&(n.dateGroups=i),a.length>0&&(n.items=a),r}processIcon(e,t){let n={},r={operator:u.BuiltInOperatorNames.Icon,param:n};return e.copyFromAttribute(t,`iconId`,n,`iconId`,e.INT_COPY),e.copyFromAttribute(t,`iconSet`,n),r}processTop10(e,t){let n={},r={operator:u.BuiltInOperatorNames.TopN,param:n};return e.copyFromAttribute(t,`filterVal`,n,`filterVal`,e.FLOAT_COPY),e.copyFromAttribute(t,`percent`,n,`percent`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`top`,n,`top`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`val`,n,`limit`,e.FLOAT_COPY),r}processFilterColumnExt(e,t){let n=t.childNodes;for(let t=0;t<n.length;t++){let r=n.item(t);if(r.nodeType!==1||r.localName!==`ext`||b(r.getAttribute(`uri`))!==b(`{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}`))continue;let i=r.childNodes;for(let t=0;t<i.length;t++){let n=i.item(t);if(n.nodeType!==1||n.localName!==`filterColumn`)continue;let r=n.childNodes;for(let t=0;t<r.length;t++){let n=r.item(t);if(n.nodeType===1&&n.localName===`filters`)return this.processFilters(e,n)}}}}processFilterCriteria(e,t){if(!t)return;let n=t.childNodes,r,i=n.length;for(let t=0;t<i;t++){let i=n.item(t);i.nodeType===1&&(i.localName===`colorFilter`?r=this.processColorFilter(e,i):i.localName===`customFilters`?r=this.processCustomFilters(e,i):i.localName===`dynamicFilter`?r=this.processDynamicFilter(e,i):i.localName===`filters`?r=this.processFilters(e,i):i.localName===`iconFilter`?r=this.processIcon(e,i):i.localName===`top10`?r=this.processTop10(e,i):i.localName===`extLst`&&(r=this.processFilterColumnExt(e,i)??r))}return r}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(t.getAttribute(`hiddenButton`))),i&&n){let e=n.hiddenButtons;e||(e=[],n.hiddenButtons=e),e.push(r)}let a=!1;if(t.hasAttribute(`showButton`)&&(a=A(t.getAttribute(`showButton`))),a&&n){let e=n.showButtons;!0!==e&&(e||(e=[],n.showButtons=e),e[r]=!0)}let o=this.processFilterCriteria(e,t);return o?(o.index=r,o):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}},SortStateVisitor:class{visit(e,t,n){if(!t)return;let r=t.getAttribute(`ref`),i={};t.hasAttribute(`caseSensitive`)&&(i.collatorOptions=A(t.getAttribute(`caseSensitive`))?p.CaseSensitiveOptions:p.CaseInsensitiveOptions);let a=t.getAttribute(`sortMethod`);a!=null&&a!==`none`&&(a===`stroke`?i.collatorOptions={...i.collatorOptions,collation:`stroke`}:a===`pinYin`&&(i.collatorOptions={...i.collatorOptions,collation:`pinyin`}));let o={};t.hasAttribute(`columnSort`)&&A(t.getAttribute(`columnSort`))&&(o.axis=c.Axis.Column);let s=d.fastStringToRange(r),l=[],u=[];this.processSortConditions(e,t,l,s,i,u),l.length>0&&(o.sorts=l);let f=e.getVisitorParamsState().get(`ref`);if(f&&r){let e=d.fastStringToRange(f);o.extent={range:g(e,s),sorts:u.map(t=>L(e,s,t))}}return Object.keys(l).length>0&&(n.sort=o),o}processSortCondition(e,t,n,r,i){if(!t)return null;let a={};if(!t.hasAttribute(`ref`))return void e.warn(`A sort condition has no ref; it was dropped.`,{onceKey:`xlsx.sheet.sort.noRef`});if(t.hasAttribute(`ref`)){let e=t.getAttribute(`ref`),r=d.fastStringToRange(e);a.index=n?r.colStart-n.colStart:r.colStart,i?.push(r)}let o={...r};a.criteria=o,o.reverse=!1,t.hasAttribute(`descending`)&&(o.reverse=A(t.getAttribute(`descending`)));let s=te(t.getAttribute(`sortBy`));s&&(o.sortOn=s);let c=U(e,t);return c&&(o.style=c),e.copyFromAttribute(t,`iconSet`,o),e.copyFromAttribute(t,`customList`,o),a}processSortConditions(e,t,n,r,i,a){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===`sortCondition`){let t=this.processSortCondition(e,s,r,i,a);t&&n.push(t)}}}},SheetStyleVisitor:class extends G{visit(e,t,n){this.processNumFmts(e,e.evaluate(`numFmts`,t),null),e.getVisitorParamsState().set(`colorsToProcess`,new Set);let a={fills:{},fonts:{},borders:{}},o=e.evaluate(`fonts`,t);this.processFonts(e,o,a.fonts);let s=a.fonts[this.normalFontId(e,t)],c={declared:[`1`,`true`].includes(o?.getAttribute(`x14ac:knownFonts`)??``),normalIsThemeFont:ae(s?.family),faces:de(Object.values(a.fonts).map(e=>({...e,family:se(e?.family,e?.fallbacks,null,!1).name})))};e.getVisitorParamsState().set(ge,c),s&&e.getVisitorParamsState().set(`defaultFont`,s),this.processFills(e,e.evaluate(`fills`,t),a.fills),this.processBorders(e,e.evaluate(`borders`,t),a.borders,!0),a.fills[0]={type:r.Type.None},a.fills[1]={type:r.Type.Pattern,patternType:r.BuiltInSheetPattern.Gray125},a.borders[0]={bottom:{style:i.StrokeStyle.None},left:{style:i.StrokeStyle.None},right:{style:i.StrokeStyle.None},top:{style:i.StrokeStyle.None}};let l=[];this.processXFs(e,e.evaluate(`cellStyleXfs`,t),l,a,null,!1);let u=new Map;if(l.length>0){let r=[];this.processCellStyles(e,e.evaluate(`cellStyles`,t),r,l,u),n.named=r}let d=[];this.processXFs(e,e.evaluate(`cellXfs`,t),d,a,u),Object.keys(d).length>0&&(n.direct=d);let f=this.collectHiddenXfs(e.evaluate(`cellXfs`,t));f.size>0&&e.getVisitorParamsState().set(`hiddenXfs`,f);let p=this.collectPivotButtonXfs(e.evaluate(`cellXfs`,t));p.size>0&&e.getVisitorParamsState().set(`pivotButtonXfs`,p);let m=this.collectXfComplements(e.evaluate(`cellXfs`,t));m.size>0&&e.getVisitorParamsState().set(`xfComplements`,m);let h=[];return this.processDXFs(e,e.evaluate(`dxfs`,t),h),this.processTableStyles(e,e.evaluate(`tableStyles`,t),n,h),this.processSlicerStyles(e,e.evaluate(`extLst`,t),n),this.processIndexColors(e,e.evaluate(`colors/indexedColors`,t),n),this.processMruColors(e,e.evaluate(`colors/mruColors`,t),n),n}normalFontId(e,t){let n=e.evaluate(`cellStyles`,t)?.childNodes,r=0;for(let e=0;e<(n?.length??0);e++){let t=n.item(e);if(t.nodeType===1&&t.getAttribute(`builtinId`)===`0`){r=parseInt(t.getAttribute(`xfId`)??`0`,10)||0;break}}let i=e.evaluate(`cellStyleXfs`,t)?.childNodes,a=0;for(let e=0;e<(i?.length??0);e++){let t=i.item(e);if(t.nodeType===1&&a++===r)return parseInt(t.getAttribute(`fontId`)??`0`,10)||0}return 0}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,n,r,i,a){if(!t)return;let o=t.getAttribute(`xfId`);if(o&&i){let e=i.get(parseInt(o));e&&e!==s.BuiltInName.Normal&&(n.named=e)}let c=e=>!(!a&&t.hasAttribute(e))||A(t.getAttribute(e)),l=e=>!a||t.hasAttribute(e)&&A(t.getAttribute(e)),u=a?`0`:void 0;if(c(`applyFont`)){let e=t.getAttribute(`fontId`)??u;if(e!==void 0&&(e!==`0`||l(`applyFont`))){let t=r.fonts[e];t!==void 0&&(n.font=t)}}if(c(`applyFill`)){let e=t.getAttribute(`fillId`)??u;if(e!==void 0&&(e!==`0`||l(`applyFill`))){let t=r.fills[e];t!==void 0&&Object.keys(t).length>0&&(n.fill=t)}}if(c(`applyBorder`)){let e=t.getAttribute(`borderId`)??u;if(e!==void 0&&(e!==`0`||l(`applyBorder`))){let t=r.borders[e];t!==void 0&&(n.borders=t)}}if(c(`applyNumberFormat`)){let r=t.getAttribute(`numFmtId`)??u;if(r!==void 0&&(r!==`0`||l(`applyNumberFormat`))){let t=parseInt(r),i,a=e.getVisitorParamsState();if(a){let e=a.get(`numFmts`);e&&(i=e.get(t)),n.numberFormat=i??t}else e.warn(`Number formats were unavailable; a cell format was not read.`,{onceKey:`xlsx.style.numberFormat.state`})}}if(c(`applyAlignment`)){let r=e.evaluate(`alignment`,t);(r||l(`applyAlignment`))&&this.processAlignment(e,r,n)}if(c(`applyProtection`)){let r=e.evaluate(`protection`,t);(r||l(`applyProtection`))&&this.processProtection(e,r,n)}let d=A(t.getAttribute(`quotePrefix`)??``);d&&(n.quotePrefix=d)}processAlignment(e,t,n){let r={};if(r.horizontal=t?.hasAttribute(`horizontal`)?t.getAttribute(`horizontal`):o.HorizontalAlignment.General,r.vertical=t?.hasAttribute(`vertical`)?t.getAttribute(`vertical`):o.VerticalAlignment.Bottom,r.indent=t?.hasAttribute(`indent`)?parseInt(t.getAttribute(`indent`)):0,r.relativeIndent=t?.hasAttribute(`relativeIndent`)?parseInt(t.getAttribute(`relativeIndent`)):0,r.overflow=A(t?.getAttribute(`wrapText`)??``)?o.Overflow.Wrap:o.Overflow.Visible,A(t?.getAttribute(`shrinkToFit`)??``)&&(r.overflow=o.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,r.stacked=!0),r.rotation=e}else r.rotation=0;t?.hasAttribute(`justifyLastLine`)&&(r.justifyLastLine=A(t.getAttribute(`justifyLastLine`)));let i=t?.getAttribute(`readingOrder`);return i&&(i===`0`?r.readingDirection=o.ReadingDirection.Auto:i===`1`?r.readingDirection=o.ReadingDirection.LeftToRight:i===`2`?r.readingDirection=o.ReadingDirection.RightToLeft:e.warn(`Invalid readingOrder '${i}'; the direction was left automatic.`,{onceKey:`xlsx.style.readingOrder`})),Object.keys(r).length>0&&(n.alignment=r),n}collectHiddenXfs(e){let t=new Set;if(!e)return t;let n=e.childNodes,r=0;for(let e=0;e<n.length;e++){let i=n.item(e);if(i.nodeType!==1||i.localName!==`xf`)continue;let a=i.childNodes;for(let e=0;e<a.length;e++){let n=a.item(e);n.nodeType===1&&n.localName===`protection`&&A(n.getAttribute(`hidden`)??``)&&t.add(r)}r++}return t}collectPivotButtonXfs(e){let t=new Set;if(!e)return t;let n=e.childNodes,r=0;for(let e=0;e<n.length;e++){let i=n.item(e);i.nodeType===1&&i.localName===`xf`&&(A(i.getAttribute(`pivotButton`)??``)&&t.add(r),r++)}return t}collectXfComplements(e){let t=new Map;if(!e)return t;let n=e.childNodes,r=0;for(let e=0;e<n.length;e++){let i=n.item(e);if(i.nodeType!==1||i.localName!==`xf`)continue;let a=q(i,`extLst`);if(a){let e=a.childNodes;for(let n=0;n<e.length;n++){let i=q(e.item(n),`xfComplement`),a=parseInt(i?.getAttribute(`i`)??``,10);isNaN(a)||t.set(r,a)}}r++}return t}processProtection(e,t,n){if(!t)return;let r=t.getAttribute(`locked`);return n.protection={alwaysUnlocked:!!r&&!A(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.borders=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`)}processSlicerStyles(e,t,n){if(!t)return;let r=null,i=null,a=t.childNodes;for(let e=0;e<a.length;e++){let t=a.item(e);if(t.nodeType!==1||t.localName!==`ext`)continue;let n=t.childNodes;for(let e=0;e<n.length;e++){let t=n.item(e);t.nodeType===1&&(t.localName===`dxfs`?r=t:t.localName===`slicerStyles`&&(i=t))}}if(!i)return;let o=[];if(r){e.getVisitorParamsState().set(`processingDXFs`,!0);let t=r.childNodes;for(let n=0;n<t.length;n++){let r=t.item(n);if(r.nodeType!==1||r.localName!==`dxf`)continue;let i={};this.processDXF(e,r,i),o.push(i)}e.getVisitorParamsState().delete(`processingDXFs`)}let s={},c=i.getAttribute(`defaultSlicerStyle`);c&&c!==`SlicerStyleLight1`&&(s.defaultSlicerStyle=c);let l=n.tables?.styles,u=i.childNodes;for(let t=0;t<u.length;t++){let n=u.item(t);if(n.nodeType!==1||n.localName!==`slicerStyle`)continue;let r=n.getAttribute(`name`);if(!r)continue;let i={},a=l?.[r];a&&!1===a.table&&!a.pivot&&(a.wholeTable&&(i.wholeTable=a.wholeTable),a.headerRow&&(i.headerRow=a.headerRow),delete l[r]);let c=e.evaluate(`slicerStyleElements`,n)?.childNodes,d=c?.length??0;for(let t=0;t<d;t++){let n=c.item(t);if(n.nodeType!==1||n.localName!==`slicerStyleElement`)continue;let r=n.getAttribute(`type`);if(!r||!ke.has(r))continue;let a=n.getAttribute(`dxfId`),s=a==null?void 0:o[parseInt(a)];s?i[r]=s:e.warn(`A slicer style names a format that does not exist (dxfId '${a}').`,{onceKey:`xlsx.style.slicerStyle.dxf`})}(s.styles??={})[r]=i}l&&Object.keys(l).length===0&&(delete n.tables.styles,Object.keys(n.tables).length===0&&delete n.tables),Object.keys(s).length>0&&(n.slicers=s)}processTableStyle(e,t,n,r,i=!1){let a=t.getAttribute(`name`),o={name:a};t.hasAttribute(`table`)&&(o.table=A(t.getAttribute(`table`))),o.pivot=!t.hasAttribute(`pivot`)||A(t.getAttribute(`pivot`)),i&&!o.pivot&&r.unshift(null);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===`tableStyleElement`){let t=n.getAttribute(`type`),i=n.getAttribute(`dxfId`),a=i==null?void 0:r?.[i];a||=(e.warn(`A table style names a format that does not exist (dxfId '${i}').`,{onceKey:`xlsx.style.tableStyle.dxf`}),{}),o[t]=a;let s=null;n.hasAttribute(`size`)&&(s=parseInt(n.getAttribute(`size`))),s&&!isNaN(s)&&(a.size=s)}}delete o.name,n[a]=o}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,n,r,i){if(!t)return;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===`cellStyle`){let e=parseInt(t.getAttribute(`xfId`)??``),a=t.getAttribute(`name`),o=t.getAttribute(`builtinId`),c=a;if(o!==null){let e=s.builtInNameFromId(parseInt(o));e!==void 0&&(c=e)}if(i.set(e,c),!r[e])continue;let l={name:c,style:r[e]};t.getAttribute(`hidden`)&&(l.hidden=A(t.getAttribute(`hidden`))),t.getAttribute(`iLevel`)&&(l.iLevel=parseInt(t.getAttribute(`iLevel`))),o!==null&&A(t.getAttribute(`customBuiltin`)??`0`)&&(l.customized=!0),n.push(l)}}}afterVisit(e,t,n){}},WorkbookVisitor:class extends G{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.processPivotCaches(e,e.evaluate(`pivotCaches`,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),e.copyFromAttribute(t,`${r}Password`,a,`legacyHash`),Object.keys(a).length>0&&(n[i]=a)}processWorkbookProtection(e,t,n){if(!t)return;let r={};this.processPassword(e,t,r,`workbook`,`password`),this.processPassword(e,t,r,`revisions`,`revisionsPassword`);for(let e of ue)r[e.key]=_e(e,t.getAttribute(e.attribute));return n.protection=r,n}processCalcPr(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`calcMode`,r,`calcMode`,e=>Ae[e]??null),e.copyFromAttribute(t,`fullCalcOnLoad`,r,`fullCalcOnLoad`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calcOnSave`,r,`calcOnSave`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calcCompleted`,r,`calcCompleted`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`fullPrecision`,r,`fullPrecision`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`forceFullCalc`,r,`forceFullCalc`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`concurrentCalc`,r,`concurrentCalc`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`concurrentManualCount`,r,`concurrentManualCount`,e.INT_COPY),e.copyFromAttribute(t,`refMode`,r,`refMode`),e.copyFromAttribute(t,`iterate`,r,`iterate`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`iterateCount`,r,`maxIteration`,e.INT_COPY),e.copyFromAttribute(t,`iterateDelta`,r,`maxIterateChange`,e.FLOAT_COPY);let i=t.getAttribute(`calcId`);i!==null&&e.getVisitorParamsState().set(`calcId`,i),n.calc=r}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`),e.copyFromAttribute(t,`sheetId`,r,`sheetId`,e.INT_COPY);let i=t.getAttribute(`r:id`),a=i?ne(e.getRelationships().get(i)?.type):null;if(a){let t=e.readEmbeddedPart(i);if(t?.xml){let e={part:t},i=fe(t.xml),o=i?v(e=>i.get(e)):void 0;o&&(e.tabColor=o),r.kind=a,r.sheet=e,n.push(r);return}e.warn(`The ${a} sheet '${r.name}' could not be read and was loaded as an empty worksheet.`),n.push(r);return}let o=i?e.getRef(i):null;o&&(r.sheet=o),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)}processPivotCaches(e,t,n){if(!t)return;let r=[],i=e.evaluate(`workbookPr`,t.parentNode)?.getAttribute?.(`date1904`),a=i===`1`||i===`true`,o=pe(e.getVisitorParamsState().get(`numFmts`),void 0),s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType!==1||n.localName!==`pivotCache`)continue;let i=parseInt(n.getAttribute(`cacheId`)??``,10),c=n.getAttribute(`r:id`);if(isNaN(i)||!c)continue;let l=e.readEmbeddedPart(c);if(!l)continue;let u=be(l,a,e=>o.numberFormat(e)),d=!u&&l.xml?ce(l.xml,o):void 0,f=!u&&l.xml?ye(l.xml):void 0;r.push({cacheId:i,part:l,...d?{partFormats:d}:{},...f?{source:f}:{},...u})}r.length>0&&(n.pivotCaches=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={},i=[`xWindow`,`yWindow`,`windowWidth`,`windowHeight`].map(e=>parseInt(t.getAttribute(e)??``,10));if(i.some(e=>Number.isFinite(e))){let[e,t,n,a]=i.map(e=>Number.isFinite(e)?e:0);r.windowBounds={left:e,top:t,width:n,height:a}}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]),e.copyFromAttribute(t,`firstSheet`,r,`firstTab`,[e.INT_COPY,e=>e]),e.copyFromAttribute(t,`minimized`,r,`minimized`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`autoFilterDateGrouping`,r,`autoFilterDateGrouping`,e.BOOLEAN_COPY);let a=t.getAttribute(`visibility`);a!==`hidden`&&a!==`veryHidden`||(r.visibility=a),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 n=t.getAttribute(`localSheetId`);if(!r[n]?.name)return void e.warn(`Defined name '${t.getAttribute(`name`)}' references a sheet with localSheetId '${n}' which does not exist.`);i.scope=r[n].name}let o={};for(let n of ve)e.copyFromAttribute(t,n,o);for(let e of R){let n=t.getAttribute(e);n!==`1`&&n!==`true`||(o[e]=!0)}e.copyFromAttribute(t,`functionGroupId`,o,`functionGroupId`,e.INT_COPY),Object.keys(o).length>0&&(i.fileAttributes=o),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){if(!t)return;e.copyFromAttribute(t,`date1904`,n,`date1904`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`codeName`,n,`codeName`),e.copyFromAttribute(t,`updateLinks`,n,`updateLinks`);let r=t.getAttribute(`hidePivotFieldList`);r!==`1`&&r!==`true`||(n.hiddenPivotFieldList=!0)}afterVisit(e,t,n){}},TableVisitor: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,`name`),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),r.totalsRowShown=t.getAttribute(`totalsRowShown`)!==`0`,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);let a=e.evaluate(`calculatedColumnFormula`,i);a?.textContent&&(t.calculatedColumnFormula=a.textContent),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)}},TableX14Visitor: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}},ExternalLinkVisitor: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}}if(!a)return n;t.getAttribute(`mc:Ignorable`)&&(n.mceIgnorable=!0);let o=a.getAttribute(`r:id`);o&&(n.__bookRelId=o);let s=this._findAbsoluteUrlRelId(a);return s&&(n.__absoluteUrlRelId=s),n.sheetNames=[],this.processSheetNames(e,a,n),this.processDefinedNames(e,a,n),this.processSheetDataSet(e,a,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 n=new m.Builder,r=t.childNodes,i=r.length;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType!==1||t.localName!==`row`)continue;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!==`cell`)continue;let r=t.getAttribute(`r`);if(!r)continue;let a=d.fastStringToCell(r);if(a?.rowIndex===void 0||a?.colIndex===void 0)continue;let o=this._readCellValue(t);o!==void 0&&n.pushAt(a.rowIndex,a.colIndex,o)}}return{sheetIndex:-1,data:n.build()?.tuples??[]}}_readCellValue(e){let t=this._findChild(e,`v`)?.textContent?.trim();if(t!==void 0&&t!==``)switch(e.getAttribute(`t`)){case null:case`n`:return parseFloat(t);case`b`:return t===`1`||t===`true`;case`str`:default:return t;case`e`:{let e=l.getBuiltInByLabel(t);return e?{t:`e`,v:e.getCode()}:t}}}_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}_findAbsoluteUrlRelId(e){let t=this._findChild(e,`alternateUrls`);return t?this._findChild(t,`absoluteUrl`)?.getAttribute(`r:id`)??null:null}},SlicerCacheDefinitionVisitor:class{visit(e,t,n){e.copyFromAttribute(t,`name`,n,`cacheName`),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,`sortOrder`,n),e.copyFromAttribute(r,`customListSort`,n,`customListSort`,e.BOOLEAN_COPY),e.copyFromAttribute(r,`crossFilter`,n),n):(this.processPivot(e,t,n),n)}processPivot(e,t,n){let r=[],i=``,a=t.childNodes;for(let t=0;t<a.length;t++){let o=a.item(t);if(o.nodeType!==1)continue;if(o.localName===`pivotTables`){let e=o.childNodes;for(let t=0;t<e.length;t++){let n=e.item(t);n.nodeType===1&&n.localName===`pivotTable`&&r.push({tabId:n.getAttribute(`tabId`)??``,name:n.getAttribute(`name`)??``})}continue}let s=o.getAttribute(`pivotCacheId`);if(s&&(n.pivotCacheId=s),o.localName===`state`||o.localName===`timelinePivotFilter`){n.tabular=!0,n.pivotData=(n.pivotData??``)+(e.serializeElement(o)??``);continue}if(o.localName===`data`){let t=null,r=o.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType!==1)continue;let a=i.getAttribute(`pivotCacheId`);a&&(n.pivotCacheId=a),i.localName===`tabular`&&(t=i)}if(t){n.tabular=!0,e.copyFromAttribute(t,`sortOrder`,n),e.copyFromAttribute(t,`customListSort`,n,`customListSort`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`crossFilter`,n),e.copyFromAttribute(t,`showMissing`,n,`showMissing`,e.BOOLEAN_COPY),n.pivotData=e.serializeElement(o)??void 0;continue}}let c=e.serializeElement(o);if(c===null)return;i+=c}n.pivotTables=r,n.pivotBody=i}},SlicersVisitor: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,e.copyFromAttribute(t,`xr10:uid`,r,`uid`);let i=t.getAttribute(`cache`),a=e.getVisitorParamsState().get(`slicerCaches`),o=i?a?.get(i):void 0;if(o)for(let e=0;e<J.length;e++){let t=J[e];o[t]!==void 0&&(r[t]=o[t])}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,`lockedPosition`,r,`lockedPosition`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`rowHeight`,r,`rowHeight`,e.INT_COPY)}},TimelinesVisitor:class{visit(e,t,n){let r=n.slicers;r||(r={},n.slicers=r);let i=t.childNodes;for(let t=0;t<i.length;t++){let n=i.item(t);n.nodeType===1&&n.localName===`timeline`&&this.processTimeline(e,n,r)}return r}processTimeline(e,t,n){let r={};n[t.getAttribute(`name`)]=r,e.copyFromAttribute(t,`xr10:uid`,r,`uid`);let i=t.getAttribute(`cache`),a=e.getVisitorParamsState().get(`slicerCaches`),o=i?a?.get(i):void 0;if(o)for(let e=0;e<J.length;e++){let t=J[e];o[t]!==void 0&&(r[t]=o[t])}e.copyFromAttribute(t,`caption`,r);let s={};for(let e=0;e<t.attributes.length;e++){let n=t.attributes.item(e);je.has(n.name)||n.name.startsWith(`xmlns`)||(s[n.name]=n.value)}r.timelineAttributes=s;let c=``,l=t.childNodes;for(let t=0;t<l.length;t++){let n=l.item(t);n.nodeType===1&&(c+=e.serializeElement(n)??``)}r.timelineBody=c}},FormControlPrVisitor:class{visit(e,t,n){let r={},i=t.attributes;for(let e=0;e<i.length;e++){let t=i.item(e),n=t.name;n===`xmlns`||n.startsWith(`xmlns:`)||(r[n]=t.value)}let a=[],o,s=t.childNodes;for(let t=0;t<s.length;t++){let n=s.item(t);if(n.nodeType===1){if(n.localName===`itemLst`){let e=n.childNodes;for(let t=0;t<e.length;t++){let n=e.item(t);n.nodeType===1&&n.localName===`item`&&a.push(n.getAttribute(`val`)??``)}}else n.localName===`extLst`&&(o=e.serializeElement(n)??void 0)}}let c=me(r,a,o);return n.formControl=c,c}},DrawingVisitor:class{visit(e,t,n){return n}afterVisit(e,t,n){for(let e of n?.movables??[])Y(e,!1)}},DrawingAnchorVisitor:class{visit(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`editAs`,r,`anchorType`),r.anchor={},t.localName===`absoluteAnchor`?(r.anchorType=`absolute`,this.processAbsoluteCoord(e,e.evaluate(`pos`,t),r.anchor,`from`,`x`,`y`),this.processAbsoluteCoord(e,e.evaluate(`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(`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`));let i=e.evaluate(`clientData`,t),a=e=>{let t=i?.getAttribute(e);return t===`0`||t===`false`};return a(`fPrintsWithSheet`)&&(r.noPrint=!0),a(`fLocksWithSheet`)&&(r.unlocked=!0),n.movables||=[],n.movables.push(r),r}processAbsoluteCoord(e,t,n,r,i,a){if(!t)return;let o={x:0,y:0};return o.x=h(t.getAttribute(i)),o.y=h(t.getAttribute(a)),r===`from`?n.tl=o:n.br=o,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=h(e.evaluate(`colOff`,t).textContent)),e.evaluate(`rowOff`,t)&&(i.y=h(e.evaluate(`rowOff`,t).textContent)),r===`from`?n.tl=i:n.br=i,n}},DrawingGraphicFrameVisitor:class extends H{visit(e,t,n){if(!t)return;if(this.isGroupContent(n)){if(e.getPath().includes(`Fallback`))return{};let{movable:r}=this.readMemberHeader(e,t,`graphicFrame`),i=e.evaluate(`xfrm`,t);if(i){_(i,r);let t=e.evaluate(`off`,i),n=e.evaluate(`ext`,i);r.anchor={tl:{x:h(t?.getAttribute(`x`)??null)??0,y:h(t?.getAttribute(`y`)??null)??0},br:{x:h(n?.getAttribute(`cx`)??null)??0,y:h(n?.getAttribute(`cy`)??null)??0}}}let a=this.readGraphic(e,t),o=a.type===`chart`?{...r.content.json,...a.json}:a.json;return r.content={...r.content,type:a.type,json:o},n.members.push(r),a.json}n=super.visit(e,t,n);let r=e.evaluate(`nvGraphicFramePr/cNvGraphicFramePr`,t);if(r){let t=e.evaluate(`graphicFrameLocks`,r);t&&t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`)}let i=this.readGraphic(e,t);return this.setContent(n,i),i}readGraphic(e,t){let n=e.evaluate(`graphic/graphicData`,t),r={type:`graphicFrame`,json:{}};if(!n)return r;let i=n.childNodes,a=i.length;for(let n=0;n<a;n++){let a=i.item(n);if(a.nodeType===1)try{let n=a.localName;n===`chart`?n=`chart`:n!==`slicer`&&n!==`timeslicer`||(n=`slicer`),r.type=n;let i=a.getAttribute(`r:id`);if(n===`chart`&&i){let n=this.readSourceId(e,t),a=e.readEmbeddedPart(i)??void 0,o;try{let t=a?.xml?xe(a.xml):null;o=t?.model,t?.lossy&&e.warn(`A chart states something its model does not; it is saved as it was until it is changed.`,{onceKey:`xlsx.chart.lossy`})}catch(t){e.warn(`A chart could not be read into the chart model; it is kept as its markup: ${t?.message??t}`,{onceKey:`xlsx.chart.model`})}r.json={sourceId:n,part:a,model:o}}else if(n===`slicer`){let n=this.readSourceId(e,t);n!==void 0&&(r.json={sourceId:n})}else i&&(r.json=e.getRef(i))}catch(t){e.warn(`Unable to read a graphic frame: ${t?.message??t}`,{onceKey:`xlsx.drawing.graphicFrame`})}}return r}},DrawingSpVisitor:X,DrawingPicVisitor:class extends H{visit(e,t,n){if(!t)return;if(this.isGroupContent(n)){if(e.getPath().includes(`Fallback`))return{};let{movable:r,content:i}=this.readMemberHeader(e,t,`picture`),a=this.readImage(e,t);return a?(this.readPictureDetails(e,t,a,r,i),n.members.push(r),i):{}}let r=super.visit(e,t,n),i=this.readImage(e,t);if(i===null)return;let a={},o=this.readSourceId(e,t);return o!==void 0&&(a.sourceId=o),this.readPictureDetails(e,t,i,r,a),this.setContent(r,{type:`picture`,json:a}),a}readPictureDetails(e,t,n,r,i){n?.resId!==void 0&&(i.resId=n.resId),n?.image&&(i.image=n.image);let a=t.getAttribute(`macro`);a&&(i.macro=a),t.hasAttribute(`fPublished`)&&(i.published=A(t.getAttribute(`fPublished`)));let o=e.evaluate(`nvPicPr/cNvPicPr`,t);if(o?.getAttribute){o.getAttribute(`preferRelativeResize`)===`0`&&(i.noRelativeResize=!0);let t=this.readLocks(e.evaluate(`picLocks`,o));t&&(i.locks=t),r.lockAspect=t?.noChangeAspect??!1}}readImage(e,t){let n=e.evaluate(`blipFill`,t),r=n?e.evaluate(`blip`,n):null;if(!r)return;if(!(r.getAttribute(`r:embed`)??r.getAttribute(`embed`)??r.getAttribute(`r:link`)??r.getAttribute(`link`)))return e.warn(`A picture names no image; it was not imported.`,{onceKey:`xlsx.drawing.picture.noRel`}),null;let{type:i,resId:a,...o}=new j().processImageFill(e,n);return!o.tile&&o.stretch&&Object.keys(o.stretch).length===0&&delete o.stretch,o.extLst&&Me.test(o.extLst)&&delete o.extLst,{resId:a,image:Object.keys(o).length>0?o:void 0}}},DrawingGrpSpVisitor:class extends H{constructor(...e){super(...e),this._fills=new j}visit(e,t,n){if(!t)return;let r=this.isGroupContent(n),i,a;if(r){if(e.getPath().includes(`Fallback`))return{};let r=this.readMemberHeader(e,t,`group`);i=r.movable,a=r.content,n.members.push(i)}else{if(e.getPath().includes(`Fallback`)&&n.content)return{};i=super.visit(e,t,n),a={};let r=this.readSourceId(e,t);r!==void 0&&(a.sourceId=r),this.setContent(i,{type:`group`,json:a})}a.members=[];let o=e.evaluate(`nvGrpSpPr/cNvGrpSpPr/grpSpLocks`,t);o?.hasAttribute?.(`noChangeAspect`)&&(i.lockAspect=o.getAttribute(`noChangeAspect`)===`1`);let s=this.readLocks(o);s&&(a.locks=s);let c=e.evaluate(`grpSpPr`,t);if(c){let t=e.evaluate(`xfrm`,c);if(t){_(t,i),t.getAttribute(`flipH`)===`1`&&(i.flipH=!0),t.getAttribute(`flipV`)===`1`&&(i.flipV=!0);let n=Z(e,t,`off`,`ext`),o=Z(e,t,`chOff`,`chExt`)??n;o&&(a.childBounds=o),r&&n&&(i.anchor={tl:{x:n.x,y:n.y},br:{x:n.width,y:n.height}})}let n=this._fills.getFill(e,c);n&&Object.keys(n).length>0&&(a.fill=n);let o=this._fills.getEffects(e,c);o&&(a.effects=o);let s=e.evaluate(`scene3d`,c),l=s?e.serializeElement(s):null;l&&(a.scene3d=l);let u=e.evaluate(`extLst`,c),d=u?e.serializeElement(u):null;d&&(a.extLst={...a.extLst,properties:d})}return a}},DrawingCxnSpVisitor:class extends X{visit(e,t,n){if(t)return this.visitShape(e,t,n,`cxnSp`,`nvCxnSpPr/cNvCxnSpPr/cxnSpLocks`)}},MetadataVisitor: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}},FeaturePropertyBagVisitor:class{visit(e,t,n){let r=[],i=t.childNodes;for(let e=0;e<i.length;e++){let t=i.item(e);t.nodeType===1&&t.localName===`bag`&&r.push(this._readBag(t))}let a=[],o=r.find(e=>e.type===`XFComplements`)?.arrays.get(`MappedFeaturePropertyBags`)??[];for(let t=0;t<o.length;t++){let n=r[o[t]]?.ids.get(`XFControls`),i=n===void 0?void 0:r[n]?.ids.get(`CellControl`),s=i===void 0?void 0:r[i]?.type,c=s?Ne[s]:void 0;c||e.warn(`A cell format's feature '${s??`unknown`}' is not read; its cells keep their values.`),a.push(c?{type:c}:null)}let s={controls:a};return n.featurePropertyBag=s,s}_readBag(e){let t={type:e.getAttribute(`type`)??``,ids:new Map,arrays:new Map},n=e.childNodes;for(let e=0;e<n.length;e++){let r=n.item(e);if(r.nodeType!==1)continue;let i=r.getAttribute(`k`)??``;if(r.localName===`bagId`){let e=parseInt(r.textContent??``,10);isNaN(e)||t.ids.set(i,e)}else if(r.localName===`a`){let e=[],n=r.childNodes;for(let t=0;t<n.length;t++){let r=n.item(t);if(r.nodeType!==1||r.localName!==`bagId`)continue;let i=parseInt(r.textContent??``,10);isNaN(i)||e.push(i)}t.arrays.set(i,e)}}return t}},CommentsVisitor: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)}}}},CommentVisitor:class{visit(e,t,n){if(!t)return;let r=t.getAttribute(`ref`);if(!r)return;let i={content:``};if(t.hasAttribute(`authorId`)){let e=parseInt(t.getAttribute(`authorId`),10);isNaN(e)||(i.authorId=e)}return i.content=function(e){if(!e)return``;let t=[],n=!0,r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType===1){if(i.localName===`t`)t.push({text:i.textContent??``});else if(i.localName===`r`){let e={text:``},r=i.childNodes;for(let t=0;t<r.length;t++){let n=r.item(t);if(n.nodeType===1){if(n.localName===`t`)e.text+=n.textContent??``;else if(n.localName===`rPr`){let t=Fe(n);t&&(e.font=t)}}}e.font&&(n=!1),t.push(e)}}}return t.length===0?e.textContent??``:n?t.map(e=>e.text).join(``):{runs:t}}(e.evaluate(`text`,t)),n.push({r,v:i}),i}},ThreadedCommentsVisitor:class{visit(e,t,n){if(!t)return;let r=[];return n.comments=r,r}},ThreadedCommentVisitor:class{visit(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`id`,r,`id`,T);let i=t.getAttribute(`ref`);e.copyFromAttribute(t,`personId`,r,`personId`,T),e.copyFromAttribute(t,`parentId`,r,`parentId`,T);let a=t.getAttribute(`dT`);a&&(r.dt=function(e){let t=/^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(e.trim());if(!t)return e;let[,n,r,i]=t;return`${n}${r?`.${(r+`00`).substring(0,3)}`:``}${i??`Z`}`}(a)),t.hasAttribute(`done`)&&(r.done=A(t.getAttribute(`done`)));let o=function(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!==`mentions`)continue;let i=r.childNodes;for(let e=0;e<i.length;e++){let n=i.item(e);if(n.nodeType!==1||n.localName!==`mention`)continue;let r=n.getAttribute(`mentionId`),a=n.getAttribute(`mentionpersonId`);if(!r||!a)continue;let o={id:T(r),personId:T(a)},s=parseInt(n.getAttribute(`startIndex`)??``,10);isNaN(s)||(o.startIndex=s);let c=parseInt(n.getAttribute(`length`)??``,10);isNaN(c)||(o.length=c),(t??=[]).push(o)}}return t}(t);return o&&(r.mentions=o),n.push({r:i,v:r}),r}},PersonListVisitor: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&&n.localName===`person`){let t={};e.copyFromAttribute(n,`id`,t,`id`,T),e.copyFromAttribute(n,`displayName`,t),e.copyFromAttribute(n,`userId`,t,`userId`,T),e.copyFromAttribute(n,`providerId`,t),r.push(t)}}return r.length>0&&(n.persons=r),r}}},Ie=class{constructor(e,t){this.path=e,this.visitor=t}},Le=class{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor(`Relationships`,new $.RelsVisitor),this.registerVisitor(`cp:coreProperties`,new $.CorePropertiesVisitor),this.registerVisitor(`Properties`,new $.AppPropertiesVisitor),this.registerVisitor(`spPr`,new $.ShapePropertiesVisitor),this.registerVisitor(`txBody`,new $.ShapeTextVisitor),this.registerVisitor(`txPr`,new $.TextPropertiesVisitor),this.registerVisitor(`a:theme`,new $.ThemeVisitor),this.registerVisitor(`a:theme`,new $.ClrSchemeVisitor,`themeElements/clrScheme`),this.registerVisitor(`a:theme`,new $.FontSchemeVisitor,`themeElements/fontScheme`),this.registerVisitor(`a:theme`,new $.FmtSchemeVisitor,`themeElements/fmtScheme`),this.registerVisitor(`a:theme`,new $.ObjectDefaultsVisitor,`objectDefaults`),this.registerVisitor(`autoFilter`,new $.AutoFilterVisitor),this.registerVisitor(`sortState`,new $.SortStateVisitor),this.registerVisitor(`s:workbook`,new $.WorkbookVisitor),this.registerVisitor(`styleSheet`,new $.SheetStyleVisitor),this.registerVisitor(`x14:table`,new $.TableX14Visitor),this.registerVisitor(`table`,new $.TableVisitor),this.registerVisitor(`externalLink`,new $.ExternalLinkVisitor),this.registerVisitor(`wsDr`,new $.DrawingVisitor),this.registerVisitor(`twoCellAnchor`,new $.DrawingAnchorVisitor),this.registerVisitor(`oneCellAnchor`,new $.DrawingAnchorVisitor),this.registerVisitor(`absoluteAnchor`,new $.DrawingAnchorVisitor),this.registerVisitor(`graphicFrame`,new $.DrawingGraphicFrameVisitor),this.registerVisitor(`sp`,new $.DrawingSpVisitor),this.registerVisitor(`grpSp`,new $.DrawingGrpSpVisitor),this.registerVisitor(`cxnSp`,new $.DrawingCxnSpVisitor),this.registerVisitor(`pic`,new $.DrawingPicVisitor),this.registerVisitor(`metadata`,new $.MetadataVisitor),this.registerVisitor(`FeaturePropertyBags`,new $.FeaturePropertyBagVisitor),this.registerVisitor(`comments`,new $.CommentsVisitor),this.registerVisitor(`comment`,new $.CommentVisitor),this.registerVisitor(`ThreadedComments`,new $.ThreadedCommentsVisitor),this.registerVisitor(`threadedComment`,new $.ThreadedCommentVisitor),this.registerVisitor(`threadedComment`,new $.TextPropertiesVisitor(`content`),`text`),this.registerVisitor(`personList`,new $.PersonListVisitor),this.registerVisitor(`slicerCacheDefinition`,new $.SlicerCacheDefinitionVisitor),this.registerVisitor(`slicers`,new $.SlicersVisitor),this.registerVisitor(`timelineCacheDefinition`,new $.SlicerCacheDefinitionVisitor),this.registerVisitor(`timelines`,new $.TimelinesVisitor),this.registerVisitor(`formControlPr`,new $.FormControlPrVisitor)}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 Ie(n,t))}parseDxf(t,n=``,r=e.EmptyObject){this.visitorParamsState||=new Map;let i=this.visitorParamsState,a=i.get(`processingDXFs`);i.set(`processingDXFs`,!0);try{let e=new z(null,this,`/dxf`,t,{},n,r),i={};return new $.SheetStyleVisitor().processDXF(e,t,i),i}finally{a===void 0?i.delete(`processingDXFs`):i.set(`processingDXFs`,a)}}getVisitorParamsState(){return this.visitorParamsState}transform(t,n,r=e.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 z(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){t.context.warn(`Unable to finish reading '${t.context.getPath()}': ${e?.message??e}`,{onceKey:`xlsx.transform.afterVisit`})}}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{t.warn(`Invalid path '${c.path}' for '${e}'.`,{onceKey:`xlsx.transform.invalidPath`})}if(!u)continue;let d=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 z(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++)d(e.item(n))}else d(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(),d=t.getJsonRoot(),f=r.childNodes,p=f.length;for(let e=0;e<p;e++){let r=f.item(e);if(r.nodeType!==1)continue;let c=r,p=c.nodeName,m=l.get(p);m||=(p=c.localName,l.get(p));let h=t.getPath()+`/`+p,g=new z(t,this,h,u,d,a,o);this._doWalk(m,g,n,c,s??i,a,o)}return s}};export{Le as DOMTransformer,z as ExecutionContext,I as NumberUtils,ee as VisitorUtils};
@@ -0,0 +1 @@
1
+ import{Z as e,u as t,y as n}from"./ChSvXfVMLxZsP9zG.js";import{a as r}from"./DcrVJCyDwGKeil2U.js";import{Bn as i,E as a,Er as o,Sa as s,Y as c,gt as l,mi as u,na as d,rn as f,vt as p,wi as m,wn as h}from"./DQeIWKasFD3DnWL7.js";var g=`SlicerStyleLight1`,_=`ascending`,v=`showItemsWithDataAtTop`,y=e(`op.setSlicerCaption`),b=e(`op.setSlicerStyle`),x=e(`op.setSlicerLayout`),S=e(`op.setSlicerSort`),C=e(`op.selectSlicerItems`),w=i.BuiltInSelectorNames.Display,T=Object.freeze({selector:w,scope:`column`}),E=Object.freeze({transactional:!1}),D=class extends r{constructor(e){let t=p(e.json?.source)?.column??e.json?.pivot?.sourceName??``,n=e.name;!n&&e.getMovable&&(n=t||null),super({...e,name:n}),this._formula=null,this._wired=null,this._binding=null,this._lossPending=!1,this._pivotTables=null,this._pivotBinding=null,this._columnName=t;let r=e.json;r&&this._updateState({data:{...r}}),r?.source&&this._addWatch(r.source,e=>{this._formula=e.formula,this._wired??=e.formula.getExpression(),this._checkSource(!1)})}getType(){return`slicer`}getTypeDescription(){return`Slicer`}getDefaultAnchorType(){return l.Type.Absolute}getSourceName(){return this._data()?.pivot?.sourceName??this._getColumnName()}getTable(){return this._data()?.pivot?this._getPivotTables()?.[0]??null:this._resolve()?.table??null}getColumn(){return this._resolve()?.column??null}getPivotTables(){return this._getPivotTables()??A}getPivotField(){let e=this._getPivotTables()?.[0];if(!e)return null;let t=m(e._getCache(),this.getSourceName());return t<0?null:e.getFields()[t]??null}_getSource(){let e=this._data()?.source??``,t=this._formula?.getExpression()??null;return t===null||t===this._wired?e:t}setName(e){let r=this._getWorkbook();if(r&&a(r,e,this)!==e)throw new t(n(`error.slicer.nameTaken`,{name:e}));return super.setName(e)}getCaption(){return this._data()?.caption??this._getColumnName()}setCaption(e,t){return this._set({caption:e??void 0},y,t)}isShowCaption(){return!0!==this._data()?.hiddenCaption}setShowCaption(e,t){return this._set({hiddenCaption:!e||void 0},y,t)}getCacheName(){return this._data()?.cacheName||(c(this._getWorkbook()).get(this)??h(this._getColumnName()))}getStyle(){return this._data()?.style??g}setStyle(e,t){return this._set({style:e&&e!==g?e:void 0},b,t)}getSortOrder(){return this._data()?.sortOrder??_}setSortOrder(e,r){if(e===`dataSource`&&this._data()?.pivot)throw new t(n(`error.slicer.pivotSortOrder`));return this._set({sortOrder:e===_?void 0:e},S,r)}getCrossFilter(){return this._data()?.crossFilter??v}setCrossFilter(e,t){return this._set({crossFilter:e===v?void 0:e},S,t)}getColumnCount(){return this._data()?.columnCount??1}setColumnCount(e,t){let n=Math.max(1,Math.trunc(e));return this._set({columnCount:n===1?void 0:n},x,t)}getRowHeight(){return this._data()?.rowHeight??27}setRowHeight(e,t){let n=Math.max(1,e);return this._set({rowHeight:n===27?void 0:n},x,t)}isLockedPosition(){return!0===this._data()?.lockedPosition}setLockedPosition(e,t){return this._set({lockedPosition:e||void 0},x,t)}isFilterCleared(){if(this.isITimeline){let e=this._timelineField();return!e?.table._getModel()?.filters?.some(t=>t.field===e.field&&t.dataField===void 0)}return this._data()?.pivot?this._getPivotItems()?.items.every(e=>e.isSelected)??!0:!this.getColumn()?.getFilter()?.getCondition()}async getItems(){let e=this._data()?.pivot;if(e?.timeline)return O;if(e){let t=this.getCrossFilter();return(this._getPivotItems()?.items??k).flatMap(n=>{if(t===`none`&&!n.hasData||e.tabular?.hideMissing&&n.missing)return[];let{id:r,missing:i,...a}=n;return[a]})}let t=this.getColumn()?.getFilter();if(!t)return O;let r=await t.getItems(T),a=t.getCondition(),s=a?function(e,t){let n=e.toJSON();if(n.operator!==i.BuiltInOperatorNames.InSet)return()=>!1;let r=n.param??{},a=new Set,o=r.items??[];for(let e=0;e<o.length;e++)o[e]!==null&&a.add(String(o[e]).toLowerCase());let s=r.dateGroups??[],c=t.dates?.[t.dates.length-1]??null;return e=>{if(e<0)return!0===r.blank;if(a.has(t.items[e].text.toLowerCase()))return!0;if(!c||s.length===0)return!1;let n=null;for(let t=0;t<c.runs.length&&!n;t++){let r=c.runs[t];r.min<=e&&e<=r.max&&(n=r.value??null)}if(!n)return!1;for(let e=0;e<s.length;e++)if(N(s[e],n))return!0;return!1}}(a,r):null,c=[];for(let e=0;e<r.items.length;e++){let t=r.items[e],n=!0===t.passesOthers;c.push({item:{key:t.text,name:t.text,value:t.value,hasData:n,isSelected:!s||(n?t.checked:s(e))},firstRow:t.firstRow})}let l=this.getSortOrder();if(l===`dataSource`)c.sort((e,t)=>e.firstRow-t.firstRow);else{let e=t.getRange().getWorksheet().getRuntime().getLocaleProfile(),n=l===`descending`?-1:1;c.sort((t,r)=>n*(o.compare(t.item.value,r.item.value,e)||o.compare(t.item.key,r.item.key,e)))}let u=null;if(r.hasBlanks){let e=!0===r.blanksPassOthers;u={key:j,name:n(`slicer.blankItem`),value:null,hasData:e,isSelected:!s||(e?r.blanksChecked:s(-1))}}let d=[],f=this.getCrossFilter();if(f===`showItemsWithNoData`){for(let e=0;e<c.length;e++)d.push(c[e].item);return u&&d.push(u),d}for(let e=0;e<c.length;e++)c[e].item.hasData&&d.push(c[e].item);if(u?.hasData&&d.push(u),f===`none`)return d;for(let e=0;e<c.length;e++)c[e].item.hasData||d.push(c[e].item);return u&&!u.hasData&&d.push(u),d}async getItem(e){let t=await this.getItems();for(let n=0;n<t.length;n++)if(t[n].key===e)return t[n];return null}async selectItems(e,t){if(this.isITimeline)return this;if(this._data()?.pivot){let n=this._getPivotItems()?.items;if(!n)return this;let r=new Set(e),i=new Set(n.flatMap(e=>r.has(e.key)?[e.id]:[]));return await this._showPivotItems(i.size===0||i.size===n.length?null:i,t),this}let n=this.getColumn()?.getFilter();if(!n)return this;if(!e||e.length===0)return this.clearFilters(t);let r=await n.getItems(T),a=new Set(e),o=r.dates?.[r.dates.length-1]??null,s=o&&o.runs.length>0?o.runs[o.runs.length-1].max:-1,c=[],l=[],u=!0,d=0;for(let e=0;e<r.items.length;e++){if(!a.has(r.items[e].text)){u=!1;continue}if(e>s){c.push(r.items[e].text);continue}for(;o.runs[d].max<e;)d++;let t=o.runs[d].value;t&&l[l.length-1]!==t&&l.push(t)}let f=r.hasBlanks&&a.has(j);if(r.hasBlanks&&!f&&(u=!1),u&&!r.truncated)return this.clearFilters(t);let p={items:c};return l.length>0&&(p.dateGroups=l),f&&(p.blank=!0),await n.setCondition({selector:w,operator:i.BuiltInOperatorNames.InSet,param:p},!1,{description:C,...t}),this}async clearFilters(e){return this.isITimeline?this.setDateRange(null,e):this._data()?.pivot?(await this._showPivotItems(null,e),this):(await this.getColumn()?.getFilter()?.delete(e),this)}addListeners(e,t){let n=super.addListeners(e,t);if(this._data()?.pivot)return this._bindPivot(),n;if(!this._binding){let e=this._resolve();e&&this._bind(e)}return n}toJSON(e){let t=this._data();if(!t)return null;if(t.pivot){let e=this._getPivotTables();if(!e)return t;let n={...t.pivot,tables:e.map(e=>({sheet:e.getWorksheet().getName(),name:e.getName()}))};return n.tabular&&e.length>0&&(n.cacheId=e[0].getCacheId()),{...t,pivot:n}}let n=this._getSource();return n?{...t,source:n}:t}get isISlicer(){return!0}get isITimeline(){return this._data()?.pivot?.timeline!==void 0}getDateRange(){let e=this._timelineField(),t=e?.table._getModel();return t?d(t,e.field):null}async setDateRange(e,t){let n=this.isITimeline?this._getPivotTables()??[]:[],r=this._getWorkbook();if(!r||n.length===0)return this;let i=this.getSourceName();return await r.doBatch(async()=>{for(let t of n){let n=m(t._getCache(),i);n>=0&&await t._setDateRange(n,i,e)}},{description:C,...t}),this}_getTimelineState(){let e=this._data()?.pivot;if(!e?.timeline||!e.tabular)return null;let t=this._timelineField();if(t){let e=t.table._getModel(),n=t.table._getCache();return{cacheId:t.table.getCacheId(),range:e?d(e,t.field):null,filtered:!!e?.filters?.some(e=>e.field===t.field&&e.dataField===void 0),dates:s(n,t.field)}}if(e.cacheId===void 0)return null;let n=this._getWorkbook()?._getPivotCache?.(e.cacheId)?.toJSON()??null,r=m(n,e.sourceName);return{cacheId:e.cacheId,range:null,filtered:!1,dates:n&&r>=0?s(n,r):null}}_timelineField(){if(!this.isITimeline)return null;let e=this._getPivotTables()?.[0],t=e?m(e._getCache(),this.getSourceName()):-1;return t>=0?{table:e,field:t}:null}get[Symbol.toStringTag](){return`[Slicer]`}toString(){return this.getTypeDescription()}_attach(){this._checkSource(!0)}_getPivotTables(){if(!this._data()?.pivot)return null;if(!this._pivotTables){let e=this._getWorkbook();if(!e)return null;this._holdPivotTables((t,n)=>e.getWorksheets().getByName(t)?.getPivotTables().getByName(n)??null)}return this._pivotTables.filter(e=>!e.isDeleted())}_holdPivotTables(e){let t=this._data()?.pivot;if(!t)return;let n=[];for(let r=0;r<t.tables.length;r++){let i=e(t.tables[r].sheet,t.tables[r].name);i&&!n.includes(i)&&n.push(i)}this._pivotTables=n}_getPivotItems(){let e=this._data()?.pivot;if(!e?.tabular||e.timeline)return null;let t=this._getPivotTables()?.[0],n=t?t.getCacheId():e.cacheId;if(n===void 0)return null;let r=this._getWorkbook(),i=t?t._getModel():{},a=t?t._getCache():r?._getPivotCache?.(n)?.toJSON()??null,o=m(a,e.sourceName),s=(t?.getWorksheet()??this.getMovable()?.getRange().getWorksheet())?.getRuntime();return!i||!a||o<0||!s?null:{cacheId:n,items:u(i,a,o,this.getSortOrder(),this.getCrossFilter(),s.getLocaleProfile())}}async _showPivotItems(e,t){let n=this._getPivotTables()??[],r=this._getWorkbook();if(!r||n.length===0)return;let i=this.getSourceName();await r.doBatch(async()=>{for(let t of n){let n=m(t._getCache(),i);n>=0&&await t._showSlicerItems(n,e)}},{description:C,...t})}_bindPivot(){let e=this._getPivotTables()??[],t=this._pivotBinding;if(t&&t.tables.length===e.length&&t.tables.every((t,n)=>t===e[n]))return;this._unbindPivot();let n=()=>{this._notify(`onSelectionChange`),this._notify(`onItemsChange`)};this._pivotBinding={tables:[...e],removes:e.map(e=>e.addListeners({onAnyChange:n,onDelete:n},E))}}_unbindPivot(){let e=this._pivotBinding;if(e){this._pivotBinding=null;for(let t of e.removes)t()}}_data(){return this._getState()?.data??null}_getWorkbook(){try{return this.getMovable()?.getRange().getWorksheet().getWorkbook()??null}catch{return null}}_resolve(){if(this._closed)return null;let e=p(this._getSource());if(!e)return null;let t=f(this._getWorkbook(),e.table),n=t?.getColumnByName(e.column)??null;return n?(this._columnName=n.getName(),{table:t,column:n}):null}_getColumnName(){return this._resolve()?.column.getName()??this._columnName}_checkSource(e){if(this._closed||this.isDeleted()||this._data()?.pivot)return;let t=this._resolve();if(t)return void this._bind(t);let n=this._getTransactions();n.isRestoring()||(n.isOpenTransaction()?this.delete():e&&!this._lossPending&&(this._lossPending=!0,queueMicrotask(()=>{if(this._lossPending=!1,this._closed||this.isDeleted()||n.isOpenTransaction()||n.isRestoring())return;let e=this._resolve();e?this._bind(e):n.amend(n.getCurrentCommit(!1).getId(),()=>{this.delete()})})))}_bind(e){let t=e.table;if(this._binding?.table!==t){this._unbind();let e=()=>{this._checkSource(!0)};this._binding={table:t,removeTable:t.addListeners({onFilterChange:()=>{this._notify(`onSelectionChange`)},onAnyChange:()=>{this._checkSource(!0),this._bindRange(!0)},onAnchorCoordsChange:()=>{this._bindRange(!0)},onDelete:e},E),coords:null,removeRange:null}}this._bindRange(!1)}_bindRange(e){let t=this._binding;if(!t||this._closed)return;let n=this.getColumn()?.getFilter()?.getRange()??null,r=n?n.getCoords():null;(r&&t.coords?r.rowStart!==t.coords.rowStart||r.rowEnd!==t.coords.rowEnd||r.colStart!==t.coords.colStart||r.colEnd!==t.coords.colEnd:r!==t.coords)&&(t.removeRange?.(),t.removeRange=n?.addListener(()=>{this._notify(`onItemsChange`)},{ignoreAddressChanges:!0,...E})??null,t.coords=r,e&&this._notify(`onItemsChange`))}_unbind(){let e=this._binding;e&&(this._binding=null,e.removeTable(),e.removeRange?.())}_notify(e){this._closed||this.isDeleted()||(this._emitter.notify(e),this._emitter.notify(`onAnyChange`))}_set(e,t,n){this._protectionCheck(t);let r=this._data();if(!r)return this;let i={...r,...e};for(let t in e)i[t]===void 0&&delete i[t];return this._updateState({data:i},{...n,description:t},[`onAnyChange`]),this}_processDelete(){this._unbind(),this._unbindPivot();let e=this._data()?.pivot?.tabular?this._getPivotTables()??[]:[];super._processDelete();for(let t of e)t._relayForSlicers?.()}_processRestoreOrRevert(e,t){if(super._processRestoreOrRevert(e,t),this.isDeleted())return void this._unbind();let n=this._resolve();n&&this._bind(n)}close(){this._unbind(),this._unbindPivot(),super.close()}},O=Object.freeze([]),k=Object.freeze([]),A=Object.freeze([]),j=``,M=[`year`,`month`,`day`,`hour`,`minute`,`second`];function N(e,t){for(let n=0;n<M.length;n++){let r=M[n];if(e[r]!==t[r])return!1;if(r===e.group)return!0}return!0}export{D as Slicer};