@sheetxl/studio-vanilla 0.8.0-beta.10 → 0.8.0-beta.11

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 (477) hide show
  1. package/browser/esm/1oQRbol_4RzeM8pE.mjs +12 -0
  2. package/{cdn/assets/CwqRA5h1u92Cyit-.js → browser/esm/30kI2LkOs3zgefE5.mjs} +2 -2
  3. package/browser/esm/{BCWTI3jdTPG37r8W.mjs → 4JJNcz4YU6jhtSoO.mjs} +3 -3
  4. package/browser/esm/4o4C9bFlmQd0jPCw.mjs +310 -0
  5. package/browser/esm/6bLEYJYXAK-pOt4_.mjs +294 -0
  6. package/{cdn/assets/J3hutJxqQiHENpIe.js → browser/esm/8j7_68o_ftwk3Slv.mjs} +120 -118
  7. package/browser/esm/{BN2d5U1nw7pRtOrn.mjs → 9MTXF6MTjOgoHb-7.mjs} +1 -1
  8. package/browser/esm/9nCLSPKkGRmkIcuH.mjs +1694 -0
  9. package/browser/esm/{Dwxz0s23ra1tRtsH.mjs → 9wo9OtQmIPqM31Sy.mjs} +2 -2
  10. package/browser/esm/B-O2rWzzFV43__aU.mjs +9523 -0
  11. package/browser/esm/{B7iV5qzlmJlM2nQv.mjs → B-iVqSEgzuf6m47x.mjs} +2 -2
  12. package/browser/esm/{x6GcENwqoUVbd60j.mjs → B0ko2JVTNhsWWWTe.mjs} +1 -1
  13. package/{cdn/assets/pc49xtHdprXZLW2X.js → browser/esm/B1SstI4rcUe8OJ-b.mjs} +1 -1
  14. package/browser/esm/{CqoHxlGpZ3yzPj5V.mjs → B31Krc6W_iL-2TQt.mjs} +12 -12
  15. package/browser/esm/{B00ixdmb8-O5ijEp.mjs → B3ZFz_Z4E28AFJS3.mjs} +1 -1
  16. package/browser/esm/{PtGiIWFBYP-ujLmf.mjs → B5XpACGLcy3zYqlT.mjs} +1 -1
  17. package/browser/esm/{BsUrrzAgfyAdcCJW.mjs → B5cwFaYPxXTSh6vo.mjs} +2 -2
  18. package/browser/esm/{BAdRecWK1maKGOZd.mjs → B8VbElyA5zbjFNs1.mjs} +1 -1
  19. package/browser/esm/B90jZwl6n7fpLoRK.mjs +89 -0
  20. package/browser/esm/{ZbGPiRN9j0629JJQ.mjs → BBS47_AI2p2r0QxX.mjs} +2 -2
  21. package/browser/esm/BBrVIUFf4NJSXblH.mjs +3716 -0
  22. package/browser/esm/{DRm1R4uVOkaMfXNI.mjs → BDWKrgmyLVPkX3h0.mjs} +1 -1
  23. package/browser/esm/{qYca4mdySLkACfo1.mjs → BF9tQV6iUGvJK6QH.mjs} +1 -1
  24. package/browser/esm/{CRAzVh3CaAa16avf.mjs → BFL9_-ur7Lhhkg2F.mjs} +36 -35
  25. package/browser/esm/{ErIXJFPDFXwGEL8V.mjs → BFvZ5JI-hBk3FNJW.mjs} +2 -2
  26. package/browser/esm/{CSEMxasVyGCekxKf.mjs → BGDndra6U64QPYm4.mjs} +1 -1
  27. package/browser/esm/BHAYf-zNKfoCTsTT.mjs +86 -0
  28. package/browser/esm/{ClJvUf8aR8vNC_3Z.mjs → BHKm0iIUckEaUMLV.mjs} +3 -3
  29. package/browser/esm/{_MPToH4oMe4rhTdZ.mjs → BIo-ELlYF8kzkLvH.mjs} +3 -3
  30. package/browser/esm/{CCd192S7yVpc6iOe.mjs → BJKUgLha2XmF08mO.mjs} +17 -16
  31. package/browser/esm/{DvWCBuY0jAL-RmJV.mjs → BKS9kx_PEanwLUuU.mjs} +793 -787
  32. package/browser/esm/BLoUmwvJ5t1eBdZ8.mjs +104 -0
  33. package/browser/esm/{DSviq1TNoiIAGW7W.mjs → BN630GsmoKmNU7ur.mjs} +1 -1
  34. package/browser/esm/{CVxlfyE-gnJM8hOz.mjs → BNWxTMoiH1NkkmAh.mjs} +8 -8
  35. package/{cdn/assets/DQIRFXG4MveFkK3I.js → browser/esm/BNavcunnTVMpcxDs.mjs} +1 -1
  36. package/browser/esm/BRXV-NrDDC3ZrpMt.mjs +55466 -0
  37. package/browser/esm/{FO1Jezau486fH4kN.mjs → BRxDfB_xWCqmT-hR.mjs} +1 -1
  38. package/browser/esm/{DnyZmrwPxShyeUjm.mjs → BT-Bqh_7C0pZ5FlX.mjs} +118 -269
  39. package/{cdn/assets/DfESVLC8CAi8m8A7.js → browser/esm/BUWDOAY73JPQoNzs.mjs} +1 -1
  40. package/browser/esm/{CHMqT9DzYKTxPfP6.mjs → BV2wamfivt6aMUhk.mjs} +1 -1
  41. package/browser/esm/BWQqT6R8MZkUWAe9.mjs +7 -0
  42. package/browser/esm/BYBEZ_hZVBDv3eEU.mjs +1389 -0
  43. package/browser/esm/B_9GaCdaUs6AlWf3.mjs +1417 -0
  44. package/browser/esm/BaNdc_0Lf4FVPUW5.mjs +9715 -0
  45. package/{cdn/assets/BuYS_ZjSlcvWZ1JC.js → browser/esm/BaWDPv9pjRGmAQva.mjs} +2667 -2091
  46. package/{cdn/assets/i0P63Wd0RRlgJotb.js → browser/esm/BaaB1nz3Z8IIy5XL.mjs} +1 -1
  47. package/browser/esm/BbUF-CQBg3zQ_h9S.mjs +323 -0
  48. package/browser/esm/{cwuYkcKwsKkPe3gG.mjs → BdN5nsKULzTfOgkY.mjs} +2 -2
  49. package/{cdn/assets/DXo8mR6t5HGsmTcu.js → browser/esm/Bdt5IdX6u9CLkJdC.mjs} +1 -1
  50. package/browser/esm/BfyWJYjj89_N0zfg.mjs +213 -0
  51. package/browser/esm/{sDVzjXC1mS5rucF5.mjs → BgE-AWbezo3ZcNQU.mjs} +576 -696
  52. package/browser/esm/Bi8dy2A1euGZeE4C.mjs +780 -0
  53. package/browser/esm/{f1OJemsiZnbwnds-.mjs → BiJSAELjvcGbbrB5.mjs} +15 -15
  54. package/browser/esm/{sxxbiJiCMOW2Eivd.mjs → BiLb98_m7AwaRkX6.mjs} +7477 -5995
  55. package/{cdn/assets/FjNOhkR7-JAIaRP6.js → browser/esm/BiSGu7XE2wP-COS-.mjs} +1 -1
  56. package/browser/esm/Bj5v_mMZnT65-EYm.mjs +521 -0
  57. package/browser/esm/Bkf3SJynCJKiDDk9.mjs +1552 -0
  58. package/browser/esm/{iC69oOND5T8khIWf.mjs → BlC9vz791AaVSbC5.mjs} +6 -6
  59. package/browser/esm/{vGKTE7yjY8y-XnsW.mjs → BldyCakCtPYtGXcm.mjs} +2 -2
  60. package/{cdn/assets/DVpi1vC8ixXvUQG_.js → browser/esm/BovxopS-62ImjzWq.mjs} +1 -1
  61. package/browser/esm/BpJup_wq5-qM4TIN.mjs +390 -0
  62. package/browser/esm/Bqf1HNOGA-pPTdl2.mjs +322 -0
  63. package/browser/esm/{BlPn_DXaEXOPxMxC.mjs → Br1Vf_O1YcX7sOJE.mjs} +1 -1
  64. package/{cdn/assets/W1d6GQyySAHrtjEu.js → browser/esm/BsVFvNqmAQw6ai0x.mjs} +1626 -1018
  65. package/browser/esm/Bt4FhwPuIE1PRsBM.mjs +193 -0
  66. package/{cdn/assets/C3r_9RqlWrEmlXZ1.js → browser/esm/Bx9qg5bL1Fzbvk1z.mjs} +1 -1
  67. package/browser/esm/BzZWDsHSEnXClrlJ.mjs +7 -0
  68. package/browser/esm/{CaS8_J5HfBRk5_Nw.mjs → C02QWvfYw-El2r9j.mjs} +32 -32
  69. package/{cdn/assets/BSCja5yvevmKZPBB.js → browser/esm/C4Vjb-3d4J7GxBGw.mjs} +1 -1
  70. package/{cdn/assets/DjtXfgbmXjUAoG0y.js → browser/esm/C635yBozh_t0DPLr.mjs} +1 -1
  71. package/browser/esm/{djM9mJznx8GzVq51.mjs → C7GZIkD5Jz7A5r_a.mjs} +14 -14
  72. package/{cdn/assets/_t0Mx-mUFVtmVNkU.js → browser/esm/C7Yr6jxJx_xXDUR2.mjs} +1 -1
  73. package/browser/esm/C8XNRmzAp2MWyeej.mjs +42 -0
  74. package/{cdn/assets/CQOyeq_-pg3CM-uA.js → browser/esm/C9oBHe1kBAevREtg.mjs} +1 -1
  75. package/browser/esm/{_zRV52yhE4gPf3XI.mjs → C9oIU866QVMlgGyQ.mjs} +55 -55
  76. package/browser/esm/{SNze-adFJwKuGSQW.mjs → CAeD2o0Ls4sIyokt.mjs} +1 -1
  77. package/browser/esm/{C9NyIoUahFiyRCxP.mjs → CBRVZmrwcMfEHc5P.mjs} +1 -1
  78. package/browser/esm/{DTn9oYyiIYgyijAk.mjs → CDWuursC7HDw-bO8.mjs} +25 -24
  79. package/browser/esm/{DoS1sE431fEhdOQb.mjs → CF6TsrZkUX12RY9E.mjs} +4 -4
  80. package/browser/esm/{C4VT6lNbpaDXCpBb.mjs → CFPaTEuxUxH48Dnc.mjs} +2 -2
  81. package/browser/esm/{Dy44qJVkwNseMG-3.mjs → CHGtyPsxQrhRB5bz.mjs} +1 -1
  82. package/browser/esm/{pKc_RPdZPLAgvNDh.mjs → CI2oW6QUhftq4Zxe.mjs} +2 -2
  83. package/browser/esm/CIoNg-5VkB5Nf7xb.mjs +256 -0
  84. package/browser/esm/{CnWNviK4qlX2GVl6.mjs → CJJ6JyOoWWElIIFf.mjs} +12 -13
  85. package/{cdn/assets/gpQ4FdJMbIScKnS_.js → browser/esm/CJdgS3TQ_2BcjCW6.mjs} +8 -8
  86. package/browser/esm/{DNaPo7BQu6hr1fWq.mjs → CK5tMP35Iv98na5Z.mjs} +1 -1
  87. package/browser/esm/CLesyjpCdfNlo_s3.mjs +210 -0
  88. package/browser/esm/CMCV8PICIpUjWafw.mjs +12816 -0
  89. package/browser/esm/{D2coM-dNrlLpnUu5.mjs → CN1_Dq2VdyHJ8cMR.mjs} +6 -6
  90. package/browser/esm/{DLhK_oSGg71ry6-m.mjs → CNTmB0u0Mmzslqit.mjs} +6 -6
  91. package/browser/esm/{D-55MlIn7Wo_hdjI.mjs → CNsG-HP7MrYv4ANy.mjs} +328 -110
  92. package/browser/esm/{DAE3Kv0Vs0VuBecT.mjs → COtPL6l443kTvLpc.mjs} +1 -1
  93. package/browser/esm/{D7DWH3-5fBNx8jtc.mjs → CP_GYwZVbwA9vzxA.mjs} +2 -2
  94. package/{cdn/assets/CFvKDDbrL3wpXnQH.js → browser/esm/CRc3MloTINO1cx9Y.mjs} +1 -1
  95. package/browser/esm/{C5EKgE9Owsc_juw-.mjs → CSUhHtPXRx-MiOJ0.mjs} +1 -1
  96. package/browser/esm/CVB9R-zt99a3DSPN.mjs +3091 -0
  97. package/{cdn/assets/BoFx07POTorOb5g-.js → browser/esm/CVGsocXM6EdK3av8.mjs} +2538 -1728
  98. package/browser/esm/CVg6x0dnCUjr2iMY.mjs +7723 -0
  99. package/browser/esm/{DxwprgjYhcmfDbXH.mjs → CWLvkJU2bOMidhWV.mjs} +17 -17
  100. package/browser/esm/{BBjgqNlHm-ssbSAG.mjs → C_lz-BVnapcDsXH0.mjs} +1 -1
  101. package/browser/esm/C_x94fC0O4_OpNRB.mjs +101 -0
  102. package/browser/esm/CczQS-TJwiXbRhYC.mjs +200 -0
  103. package/{cdn/assets/RfHd1JATBlcsfLPv.js → browser/esm/CdOK8MepIC51cdz1.mjs} +1 -1
  104. package/browser/esm/{rkTVQiYG3wd8oPom.mjs → Cdg4TpupUeYIiz2B.mjs} +3 -3
  105. package/browser/esm/Cf-LLddGP5wUU4hH.mjs +8 -0
  106. package/browser/esm/Cf5dlM0Pkqz1y7Nw.mjs +387 -0
  107. package/{cdn/assets/BI6afPOpgNYkzIWv.js → browser/esm/CfGCIpWOVrKyroeI.mjs} +1775 -1731
  108. package/browser/esm/Cgff_mU98dEc-kSv.mjs +1723 -0
  109. package/browser/esm/{CvWGtHslTdesJik-.mjs → ChTKR1wEz8hgPWRE.mjs} +10 -9
  110. package/{cdn/assets/BAH_cWcQEIBKWnl6.js → browser/esm/Cl1bVTUk0rQUQT9p.mjs} +1 -1
  111. package/browser/esm/{CDsuiN--qdALFyql.mjs → ClKS_5IuXertzGEp.mjs} +2 -2
  112. package/browser/esm/{CWJzHmEgahdOfNjH.mjs → Cnx0vOv2ePi94hMN.mjs} +1 -1
  113. package/browser/esm/{BVJUL2HhoedhbwVy.mjs → CpUZbIdONEC6mghF.mjs} +11 -10
  114. package/browser/esm/{BxhKgo_rPQ2d12HT.mjs → CpzzMIebww7p4m_V.mjs} +4 -4
  115. package/browser/esm/CtX8ODZQGoUqUie3.mjs +162 -0
  116. package/browser/esm/{BeMLfv6hWo15VCIL.mjs → CwIcsETflE-gpYF6.mjs} +23 -23
  117. package/{cdn/assets/CVcCUfSRsiZ1-6hs.js → browser/esm/CzpnOqHBXxESl5Ts.mjs} +1 -1
  118. package/browser/esm/{mZ92wNrHVpYdli1U.mjs → D3HgYapmfdL-RhEV.mjs} +5 -5
  119. package/browser/esm/{ByUcqyCNfqi5Mm7w.mjs → D46u8d3O49bDLflJ.mjs} +1 -1
  120. package/browser/esm/{px-aQ8dMjiWag_pV.mjs → D5KlrP1rlBZO7HyP.mjs} +1 -1
  121. package/{cdn/assets/DONxZZT2Iwu7psS5.js → browser/esm/D5wm_fLXLK3Ve1ir.mjs} +6 -5
  122. package/browser/esm/{DLqc11Pf8vaE4Q5B.mjs → D90zUAjsvdYt4zAc.mjs} +1 -1
  123. package/browser/esm/DAEoN5lF7Xw1VMoH.mjs +520 -0
  124. package/browser/esm/DCA1pexOA5sUcYVT.mjs +181 -0
  125. package/browser/esm/{D0r2MPlWLnStWJNW.mjs → DD6l6wL5lCLFdLOw.mjs} +144 -134
  126. package/browser/esm/DFFX8FaN8Xyq2YvS.mjs +131 -0
  127. package/browser/esm/DFzpsLSn8pIrTlLO.mjs +95 -0
  128. package/browser/esm/DJMHQzwcPgTpS0f5.mjs +1240 -0
  129. package/browser/esm/{VwGokBaawZfZiV2X.mjs → DJhxuNvyE7FzNXTv.mjs} +1 -1
  130. package/{cdn/assets/H-JnJQMcZQbpvjdb.js → browser/esm/DK3BYp4NTX8n36q5.mjs} +1 -1
  131. package/browser/esm/DKXz55ACPsNADpJo.mjs +9 -0
  132. package/browser/esm/{CZOJogyZqMfUxcXj.mjs → DKxCeh3yib-owCxs.mjs} +1 -1
  133. package/browser/esm/{ycmpAs4kQfeh78Pa.mjs → DL57MpyMuNosTcrB.mjs} +1 -1
  134. package/browser/esm/DN14h84frphTmQnr.mjs +367 -0
  135. package/browser/esm/{Cpza4AeltEVHASij.mjs → DPE3kSrS3RMPgCwe.mjs} +3 -3
  136. package/browser/esm/DQsUwoGymfvPjfBo.mjs +86 -0
  137. package/browser/esm/{DJqj66SnUcx0QmSN.mjs → DUZyG-8cyY9A0Zg-.mjs} +1 -1
  138. package/browser/esm/{DNCqTF9EbT-U1TdV.mjs → DWlIofDXtKiTFRl3.mjs} +3 -3
  139. package/browser/esm/{CfltjY8hY-RPwwpd.mjs → DWs_Iccs4ADzMYw7.mjs} +7 -7
  140. package/browser/esm/DZU9jkqaNCYuvDzi.mjs +8196 -0
  141. package/browser/esm/DZxgKlZVMKS5Ta04.mjs +199 -0
  142. package/browser/esm/D_RNoIZHUhzXpaw6.mjs +232 -0
  143. package/{cdn/assets/anQDUZhHMDPi1eha.js → browser/esm/DaJhQHZ8na6yCHir.mjs} +149 -149
  144. package/{cdn/assets/BWo1N4YbK_zGU0nu.js → browser/esm/DagxhIjpKea9MwI8.mjs} +1 -1
  145. package/browser/esm/{DjdkGy-EI1kSo226.mjs → DbewMnLKZoGLGFNh.mjs} +1 -1
  146. package/browser/esm/DcuXU4w8jFVnuLgh.mjs +60 -0
  147. package/browser/esm/Df4WRA6refKZ9x9I.mjs +141 -0
  148. package/browser/esm/Dg8kGViumXiDAGwT.mjs +569 -0
  149. package/{cdn/assets/DWgp4t9N9u0eWthH.js → browser/esm/DhLN5r1sTHL_BWeH.mjs} +1 -1
  150. package/browser/esm/{ZxsFYopF0_WWqw4Q.mjs → DhU_l9pcEddg9s24.mjs} +1 -1
  151. package/browser/esm/{CTI-mCJbJzitJZwj.mjs → DiabpzKzIUUyat-1.mjs} +1 -1
  152. package/browser/esm/Dic2cHiohtgkK2jT.mjs +89 -0
  153. package/browser/esm/DizmXzo0RwB1aISW.mjs +86 -0
  154. package/browser/esm/{DrI_S0A9TQvriTua.mjs → Dl29uXIaOLiBIDEI.mjs} +1 -1
  155. package/browser/esm/{BtGmrIqU9W1L8zfZ.mjs → Dl40S1lFKvsN0DvK.mjs} +1 -1
  156. package/{cdn/assets/DxcRLd7wmBGDgJsA.js → browser/esm/DlWoVcsWZHiN-EYf.mjs} +1 -1
  157. package/{cdn/assets/DQjxp9lDP9DzP8ah.js → browser/esm/DmkrxPsGTgcfP5Rz.mjs} +56 -56
  158. package/browser/esm/{rY-dC3WB558TIbum.mjs → Dn6OF7owJvTQrrts.mjs} +4 -4
  159. package/browser/esm/DpRsbOf9X17if0J7.mjs +1645 -0
  160. package/browser/esm/Drw9hD1JE7JCMign.mjs +422 -0
  161. package/browser/esm/{BThOwSja2ra4xejQ.mjs → DsHzYBPSadCXZi-n.mjs} +1466 -1388
  162. package/browser/esm/{LAbUYeLiPG8z9cmA.mjs → DtegXHCQSKTTGQeu.mjs} +15 -15
  163. package/browser/esm/{C-0viTjg1dT2F-sk.mjs → Dut7EHGO0G5wuZvA.mjs} +2 -2
  164. package/browser/esm/{kVBPUUnVyZfb8pf3.mjs → DwhGTfGva3F7vuwp.mjs} +5 -5
  165. package/{cdn/assets/DYvBgX17ZerZSHEJ.js → browser/esm/DxwdHqgA78DuBgP5.mjs} +30 -31
  166. package/browser/esm/{aUREGNA8H7p4BpMK.mjs → DychvmektExlalXS.mjs} +3 -3
  167. package/{cdn/assets/CBdNC7BOfc5TewHU.js → browser/esm/DyeYHUP9q10K48wL.mjs} +1 -1
  168. package/{cdn/assets/BsTFy_iJXJYmaO3Z.js → browser/esm/DyvMwqOmBhQFYxOo.mjs} +5 -5
  169. package/browser/esm/{Cy00y9b9j17Txyv1.mjs → DzF6mYUZfggTAjhM.mjs} +1 -1
  170. package/browser/esm/Dzj3KK6YPVXSha8q.mjs +5117 -0
  171. package/browser/esm/Dzyz_pks7xPGZbyH.mjs +23434 -0
  172. package/browser/esm/{Dv8aQFTTaQBJKDDk.mjs → GA5X6vLsOcXufGyF.mjs} +1 -1
  173. package/browser/esm/Hx70AIfSA_0RVX86.mjs +415 -0
  174. package/browser/esm/{DaMKWQQTgIF08cT7.mjs → JIICfCUe6qam-nnP.mjs} +7 -7
  175. package/browser/esm/{UTZcodQydbuMfCOS.mjs → Jn0_AtebABdIzyQ8.mjs} +1 -1
  176. package/browser/esm/{CtZPEkaldpJpoGtW.mjs → KG-A3VX4kcf2uLJI.mjs} +67 -67
  177. package/browser/esm/{CMxbiQ5J79M3n1tk.mjs → PD_ckP5IyZurtALu.mjs} +723 -373
  178. package/{cdn/assets/lqknEt3DTma5Juxs.js → browser/esm/PFd1HLX9x3NbZS0Q.mjs} +1 -1
  179. package/browser/esm/{D2aQPiGg0ZoMYzuf.mjs → Q4gowihHveaVg346.mjs} +5 -5
  180. package/browser/esm/TEqlVdpb4Wjm-WJR.mjs +281 -0
  181. package/browser/esm/{DGcvio2uhlrsE3ZY.mjs → Ub7lo1Zsgc4OkWHw.mjs} +10 -10
  182. package/browser/esm/{CxCipDFamYSOctBo.mjs → VHANuEgclliEVOJy.mjs} +48 -46
  183. package/browser/esm/{Db6Tvr45TS9J5Qsb.mjs → WGYh_LRO1dkbp-TV.mjs} +35 -33
  184. package/browser/esm/{ByqhqEMBLrnkaPKE.mjs → WeD0V8DDCj3KQ_8p.mjs} +26 -24
  185. package/browser/esm/{DG3BfxRsbjey-B7E.mjs → XYN8zIYF95HfOLO2.mjs} +2 -2
  186. package/browser/esm/XvS1NvLqAFQgx6eS.mjs +7 -0
  187. package/{cdn/assets/Dc2ZwgbIEgYWwAsF.js → browser/esm/Z10MZFA0Sc2Zcelz.mjs} +1 -1
  188. package/browser/esm/{-LoBx7J6imeqaxCq.mjs → bFtJ6ds2ojy78Wre.mjs} +7 -7
  189. package/browser/esm/{DqBj-9o7UdXu4qhb.mjs → bTZCD31OE4KkUy4u.mjs} +1 -1
  190. package/browser/esm/{CQuv-nk5jtXUfu7C.mjs → bYlwY2JZnvT1cbtL.mjs} +2 -2
  191. package/browser/esm/{BaEZmurTZnX_yfKD.mjs → buJRIWKU9gQ4TTK_.mjs} +323 -369
  192. package/{cdn/assets/BPrHgyAsm2Htx15h.js → browser/esm/c6MwBF7fqj-4Wqct.mjs} +1 -1
  193. package/browser/esm/d3pzf6IOaGjo_S-F.mjs +2213 -0
  194. package/browser/esm/{DSf-Db1h8rlW2A6n.mjs → e5QfIq2gAzQVRtfG.mjs} +5 -5
  195. package/browser/esm/{DGuynZFJ9tqziqQs.mjs → gTTt3H5M0Lh8VxjO.mjs} +7 -7
  196. package/browser/esm/index.mjs +49 -645
  197. package/{cdn/assets/BhkeuRcx8RlLCQ5E.js → browser/esm/lPeOxAutCOlSB-aC.mjs} +1 -1
  198. package/browser/esm/{BRfat1fV3oGLwvin.mjs → mjkAWxWBrwQpoEkc.mjs} +15 -15
  199. package/browser/esm/{Bi5-feQLtwpV6Ai8.mjs → nmaneEnoRhUuMliV.mjs} +5 -5
  200. package/browser/esm/{DeUXRggj8Oz9ru_i.mjs → oLOwgPmipnKc68nJ.mjs} +1 -1
  201. package/browser/esm/{BMlPFJ1glExv-70Z.mjs → oY2yN-_0_AcCI46E.mjs} +1 -1
  202. package/browser/esm/szeZ7VgnRHyi2DxR.mjs +381 -0
  203. package/{cdn/assets/CTdFZ_I-41Vr6Dy4.js → browser/esm/tQAwA9RKsgzjziNe.mjs} +1 -1
  204. package/{cdn/assets/J9i3r1fU0H10b2hX.js → browser/esm/t_7A_GdY394OUV4v.mjs} +1 -1
  205. package/browser/esm/uBm_7th3ordJJKKM.mjs +1298 -0
  206. package/browser/esm/vY2ZLR024kVOwWej.mjs +36 -0
  207. package/browser/esm/{DQEjvIGMgEkiaP6J.mjs → xUNkyQFYnzQAzsVs.mjs} +1 -1
  208. package/browser/esm/xhVehZswNSGVAhdd.mjs +195 -0
  209. package/{cdn/assets/BwOxnbR61WFJwy0A.js → browser/esm/y-iW7vsJV47pYbw4.mjs} +1 -1
  210. package/browser/esm/y5zzqXzWZt9iBT17.mjs +5632 -0
  211. package/{cdn/assets/B0Wjc3lwtjKMwnvn.js → browser/esm/y8mfWM7VlyfJEEwg.mjs} +1 -1
  212. package/{browser/esm/M7RYrx20B_Yl_euJ.mjs → cdn/assets/03NnLxMlQLUwCU6J.js} +8 -8
  213. package/cdn/assets/1oQRbol_4RzeM8pE.js +12 -0
  214. package/cdn/assets/{CILUMtSddGz7WXEv.js → 3Oqq1u2C8zC0TeW9.js} +84 -84
  215. package/cdn/assets/4uPsJWrLx7xRHQAh.js +639 -0
  216. package/cdn/assets/{ENtt4kmaU9mJfVEp.js → 6GgPtwsOcxg8XpRN.js} +10 -10
  217. package/cdn/assets/{D8DghdqjOtBzO2Wx.js → 7twUDisI3AH_vo2v.js} +4 -4
  218. package/cdn/assets/{BeQ95CzwR65il0CK.js → 8CW-puLLSNyeaGce.js} +2 -3
  219. package/cdn/assets/{BB4MW8sSYEXjPvvf.js → 8yRVrfAZmWoSynP2.js} +5 -5
  220. package/cdn/assets/{BN2d5U1nw7pRtOrn.js → 9MTXF6MTjOgoHb-7.js} +1 -1
  221. package/cdn/assets/9zx-c-XsXQJu3H6F.js +237 -0
  222. package/cdn/assets/B-aF0nVKMi0rBQ-X.js +257 -0
  223. package/cdn/assets/{x6GcENwqoUVbd60j.js → B0ko2JVTNhsWWWTe.js} +1 -1
  224. package/{browser/esm/pc49xtHdprXZLW2X.mjs → cdn/assets/B1SstI4rcUe8OJ-b.js} +1 -1
  225. package/cdn/assets/{B00ixdmb8-O5ijEp.js → B3ZFz_Z4E28AFJS3.js} +1 -1
  226. package/cdn/assets/B4zK-38sPk49SiBE.js +9524 -0
  227. package/cdn/assets/{PtGiIWFBYP-ujLmf.js → B5XpACGLcy3zYqlT.js} +1 -1
  228. package/cdn/assets/B6hsm_RseP5jRKxa.js +100 -0
  229. package/cdn/assets/{DHH_uKVzQ_kRYO2N.js → B71MtA2mmixmeooi.js} +18 -18
  230. package/cdn/assets/B7L2gEZlcb8lr2A4.js +8196 -0
  231. package/cdn/assets/{BAdRecWK1maKGOZd.js → B8VbElyA5zbjFNs1.js} +1 -1
  232. package/cdn/assets/B9dUWlxApLMvjz60.js +220 -0
  233. package/cdn/assets/B9w9g_nectPJhun5.js +1724 -0
  234. package/cdn/assets/{AjMG7Fb9r4Fk7Hsf.js → BCypA6VuKdd2n_ru.js} +19 -18
  235. package/cdn/assets/{DRm1R4uVOkaMfXNI.js → BDWKrgmyLVPkX3h0.js} +1 -1
  236. package/cdn/assets/BETDm_1AaWuW6BVj.js +516 -0
  237. package/cdn/assets/{C32co-XulWTkEKrW.js → BEvqzG-mTBe_4aVC.js} +2 -2
  238. package/cdn/assets/{qYca4mdySLkACfo1.js → BF9tQV6iUGvJK6QH.js} +1 -1
  239. package/cdn/assets/BFKaVO5u424S8iQa.js +86 -0
  240. package/cdn/assets/{CSEMxasVyGCekxKf.js → BGDndra6U64QPYm4.js} +1 -1
  241. package/cdn/assets/BI1IDPvx--ARef3O.js +196 -0
  242. package/cdn/assets/{Cw7AJWd0S2sjRmr6.js → BJ5RRYxWA_yTbVpr.js} +1478 -1400
  243. package/cdn/assets/BJV4kSnvZHNfd68y.js +193 -0
  244. package/cdn/assets/BK2u8-YC8sG_k5G1.js +1299 -0
  245. package/cdn/assets/{DSviq1TNoiIAGW7W.js → BN630GsmoKmNU7ur.js} +1 -1
  246. package/{browser/esm/DQIRFXG4MveFkK3I.mjs → cdn/assets/BNavcunnTVMpcxDs.js} +1 -1
  247. package/cdn/assets/BORHWDUKR6caukc5.js +199 -0
  248. package/cdn/assets/BOeafp2_IuiQUCy9.js +7 -0
  249. package/cdn/assets/{FO1Jezau486fH4kN.js → BRxDfB_xWCqmT-hR.js} +1 -1
  250. package/{browser/esm/DfESVLC8CAi8m8A7.mjs → cdn/assets/BUWDOAY73JPQoNzs.js} +1 -1
  251. package/cdn/assets/{0vqRTRN0wEzWao1c.js → BUsC6YAGDNArajFL.js} +75 -74
  252. package/{browser/esm/ztqpWR65YYMZ3EPk.mjs → cdn/assets/BV13zVUdMca1rMPB.js} +120 -118
  253. package/cdn/assets/{C9NyIoUahFiyRCxP.js → BV2wamfivt6aMUhk.js} +1 -1
  254. package/cdn/assets/BWbSAM8vJA9oOVLo.js +46 -0
  255. package/cdn/assets/{De2z8LdHaWRFiR5T.js → BXVCl_xwTk61fpO9.js} +2 -2
  256. package/cdn/assets/BZEFRQpz68GXn6T9.js +96 -0
  257. package/cdn/assets/{wM7DzeOpoEGBVDBe.js → B_sANJqcUwqmlTx5.js} +2 -2
  258. package/{browser/esm/i0P63Wd0RRlgJotb.mjs → cdn/assets/BaaB1nz3Z8IIy5XL.js} +1 -1
  259. package/cdn/assets/{DckmFyHxGX4Y1gOq.js → BbO2UBFWu05VAtNb.js} +18 -17
  260. package/cdn/assets/{CCvBdPu7W2ZF6A9J.js → BdW05SsbRlVhxGr6.js} +3 -3
  261. package/cdn/assets/BdnTLvN0grpQAsLF.js +8 -0
  262. package/{browser/esm/DXo8mR6t5HGsmTcu.mjs → cdn/assets/Bdt5IdX6u9CLkJdC.js} +1 -1
  263. package/cdn/assets/Bebab8nHNHqve2AI.js +233 -0
  264. package/{browser/esm/FjNOhkR7-JAIaRP6.mjs → cdn/assets/BiSGu7XE2wP-COS-.js} +1 -1
  265. package/cdn/assets/BjAnEBtnBD5O0-sc.js +106 -0
  266. package/cdn/assets/{hg8WYI0Yy4WPPPoP.js → BmWMHgdcbZuZUGtm.js} +11 -11
  267. package/{browser/esm/DVpi1vC8ixXvUQG_.mjs → cdn/assets/BovxopS-62ImjzWq.js} +1 -1
  268. package/cdn/assets/Bqlj5Zz-vJpMDs6i.js +311 -0
  269. package/cdn/assets/{BlPn_DXaEXOPxMxC.js → Br1Vf_O1YcX7sOJE.js} +1 -1
  270. package/cdn/assets/{CSIZpJClc66_20kP.js → BuHsbgcxlvkOHGGR.js} +118 -269
  271. package/{browser/esm/C3r_9RqlWrEmlXZ1.mjs → cdn/assets/Bx9qg5bL1Fzbvk1z.js} +1 -1
  272. package/cdn/assets/BzZTldYRBXUqOINX.js +781 -0
  273. package/cdn/assets/C-_jzDXetpu0rH2K.js +8 -0
  274. package/cdn/assets/C2ydnpxcrFknfLw1.js +214 -0
  275. package/{browser/esm/BSCja5yvevmKZPBB.mjs → cdn/assets/C4Vjb-3d4J7GxBGw.js} +1 -1
  276. package/{browser/esm/DjtXfgbmXjUAoG0y.mjs → cdn/assets/C635yBozh_t0DPLr.js} +1 -1
  277. package/cdn/assets/C7FA7N-GON7DscOD.js +19 -0
  278. package/{browser/esm/_t0Mx-mUFVtmVNkU.mjs → cdn/assets/C7Yr6jxJx_xXDUR2.js} +1 -1
  279. package/cdn/assets/C7fZFw4yQ9VNHtnV.js +17 -0
  280. package/cdn/assets/C8XNRmzAp2MWyeej.js +42 -0
  281. package/{browser/esm/DAprxR00V9qvNLL2.mjs → cdn/assets/C9_WZzkqVDNPA1d0.js} +1708 -1660
  282. package/{browser/esm/CQOyeq_-pg3CM-uA.mjs → cdn/assets/C9oBHe1kBAevREtg.js} +1 -1
  283. package/cdn/assets/{SNze-adFJwKuGSQW.js → CAeD2o0Ls4sIyokt.js} +1 -1
  284. package/cdn/assets/{CHMqT9DzYKTxPfP6.js → CBRVZmrwcMfEHc5P.js} +1 -1
  285. package/cdn/assets/CBsadiIVpXoTVHLj.js +183 -0
  286. package/{browser/esm/D88StfSjZJi5E8Xb.mjs → cdn/assets/CDv_hXnUZNB1HY3N.js} +2384 -1905
  287. package/cdn/assets/{CFBgmXap8kmumhoz.js → CELW1QxGUlPfcuHG.js} +144 -134
  288. package/cdn/assets/CF6YxjWkuaqaHcCi.js +2230 -0
  289. package/cdn/assets/{CbTN0q6XnYGJqyEp.js → CGklNVK7pkjOQ6XF.js} +261 -261
  290. package/cdn/assets/{Dy44qJVkwNseMG-3.js → CHGtyPsxQrhRB5bz.js} +1 -1
  291. package/cdn/assets/{D32D_biNXRCZ24vG.js → CIa9t2NsEFKqvGac.js} +10 -10
  292. package/cdn/assets/CIfJsifn66BBcj2W.js +86 -0
  293. package/cdn/assets/CIscj5V7u9g5ZxM3.js +7 -0
  294. package/cdn/assets/{BNsqqoZY7a4N1wWC.js → CJgN6A7fquRRWJ9h.js} +328 -110
  295. package/cdn/assets/{DNaPo7BQu6hr1fWq.js → CK5tMP35Iv98na5Z.js} +1 -1
  296. package/cdn/assets/CLDXVyr5jbJC7Ldf.js +7 -0
  297. package/cdn/assets/CLesyjpCdfNlo_s3.js +210 -0
  298. package/cdn/assets/{Dp-GJXOMz_b8qAxD.js → CMRiIxUHB5XcDtA8.js} +2 -2
  299. package/cdn/assets/{DAE3Kv0Vs0VuBecT.js → COtPL6l443kTvLpc.js} +1 -1
  300. package/{browser/esm/CFvKDDbrL3wpXnQH.mjs → cdn/assets/CRc3MloTINO1cx9Y.js} +1 -1
  301. package/cdn/assets/CS7L0XE_IvJKdpQH.js +416 -0
  302. package/cdn/assets/{C5EKgE9Owsc_juw-.js → CSUhHtPXRx-MiOJ0.js} +1 -1
  303. package/cdn/assets/{D-yz3V2UC54rwctD.js → CSpWGMyjLegYuwTq.js} +2 -2
  304. package/cdn/assets/CVCFVKDhgOFbBNWn.js +382 -0
  305. package/cdn/assets/{DSXJHEORGmMQX_Mb.js → CViBm-zHl4k8Znzm.js} +12 -12
  306. package/cdn/assets/{DZRm4H75lnEtOG8e.js → CWRXS9rkz8fCwbZH.js} +48 -46
  307. package/cdn/assets/CZ0iN5i3edmVHcRK.js +323 -0
  308. package/cdn/assets/{B3NWCYKXucbHhOix.js → C_Q71OCVP6nPyP4U.js} +26 -26
  309. package/cdn/assets/{BBjgqNlHm-ssbSAG.js → C_lz-BVnapcDsXH0.js} +1 -1
  310. package/cdn/assets/CbKXmBz5CY-IwYsS.js +132 -0
  311. package/cdn/assets/CbqZMJ1c683b5iE7.js +278 -0
  312. package/cdn/assets/CdDIc0DsAwHzxpeO.js +5117 -0
  313. package/{browser/esm/RfHd1JATBlcsfLPv.mjs → cdn/assets/CdOK8MepIC51cdz1.js} +1 -1
  314. package/cdn/assets/{C6INLvBy8kdzFpsX.js → CdW0mis0FyG90paw.js} +576 -696
  315. package/cdn/assets/{DicTo_3G-KZyWDiE.js → CevaeSbWdKO5qeRu.js} +294 -340
  316. package/cdn/assets/{DxisV9_27l_WU-nk.js → CeySvrdNiT00QQJC.js} +5 -5
  317. package/cdn/assets/Cf-LLddGP5wUU4hH.js +8 -0
  318. package/cdn/assets/{CIyaijfp6itgRpFM.js → Cf0bbHHOW6iwvyXg.js} +2 -2
  319. package/cdn/assets/CixdB4xXcQhebm5U.js +73 -0
  320. package/cdn/assets/{BelX6bvQPsGuo-x3.js → Cj2lJ05kVoDb5HGx.js} +2 -2
  321. package/cdn/assets/{CsrTRThObSryov1b.js → CkfqUcoAlpPupbbK.js} +2 -2
  322. package/cdn/assets/CkgK3CrVsGp5FE2i.js +2213 -0
  323. package/{browser/esm/BAH_cWcQEIBKWnl6.mjs → cdn/assets/Cl1bVTUk0rQUQT9p.js} +1 -1
  324. package/cdn/assets/Cl3d4ILjFxp4IdO9.js +3716 -0
  325. package/cdn/assets/ClY9HTqosClkllrU.js +522 -0
  326. package/cdn/assets/Cllqhal9LBm1K8Yq.js +391 -0
  327. package/cdn/assets/CnVY0qezymE7-eML.js +89 -0
  328. package/cdn/assets/{CWJzHmEgahdOfNjH.js → Cnx0vOv2ePi94hMN.js} +1 -1
  329. package/cdn/assets/{C7fu6LrSMBlHqwUy.js → CqmrD2Xs8MKJTO4v.js} +4 -4
  330. package/cdn/assets/Cw6ozEzvtFq_HVef.js +8 -0
  331. package/cdn/assets/{BzbP4jaN13wC9aSi.js → CzG0p4x8L99XEdym.js} +40 -40
  332. package/{browser/esm/CVcCUfSRsiZ1-6hs.mjs → cdn/assets/CzpnOqHBXxESl5Ts.js} +1 -1
  333. package/cdn/assets/D-hAYmuTa0x0_oI-.js +1552 -0
  334. package/{browser/esm/By3a43qwWICwXRmw.mjs → cdn/assets/D2H92O2Ji36qebTp.js} +2667 -2091
  335. package/cdn/assets/{ByUcqyCNfqi5Mm7w.js → D46u8d3O49bDLflJ.js} +1 -1
  336. package/cdn/assets/D51TEwta0ZXmlNrx.js +570 -0
  337. package/cdn/assets/{px-aQ8dMjiWag_pV.js → D5KlrP1rlBZO7HyP.js} +1 -1
  338. package/cdn/assets/{Cfg4Dtndwurxv9LM.js → D7g9SLSLSONiRP8_.js} +8 -8
  339. package/cdn/assets/D8fBDoXy-QzJqIfC.js +132 -0
  340. package/cdn/assets/D97AuczhOIBnqMXI.js +55466 -0
  341. package/cdn/assets/DBnswN0nPHV8TM2q.js +8 -0
  342. package/cdn/assets/DE9bhDAlUdLUngdj.js +1646 -0
  343. package/cdn/assets/{D_pMOq6FdH4RSBLc.js → DG4PyKuuGu6RkAEv.js} +810 -804
  344. package/cdn/assets/DG8R6bLrQPHjouy2.js +86 -0
  345. package/cdn/assets/{VwGokBaawZfZiV2X.js → DJhxuNvyE7FzNXTv.js} +1 -1
  346. package/{browser/esm/H-JnJQMcZQbpvjdb.mjs → cdn/assets/DK3BYp4NTX8n36q5.js} +1 -1
  347. package/cdn/assets/{CZOJogyZqMfUxcXj.js → DKxCeh3yib-owCxs.js} +1 -1
  348. package/cdn/assets/{ycmpAs4kQfeh78Pa.js → DL57MpyMuNosTcrB.js} +1 -1
  349. package/{browser/esm/Dme0qpRinBnhzp53.mjs → cdn/assets/DLEPPn_cPPydMrpU.js} +150 -148
  350. package/cdn/assets/{D-bNmX0QsA8SuT0m.js → DP1jRSok-1NvqrBz.js} +34 -34
  351. package/cdn/assets/{DJqj66SnUcx0QmSN.js → DUZyG-8cyY9A0Zg-.js} +1 -1
  352. package/cdn/assets/{Cv5PLuhEmh5IDHjb.js → DWoFVKQrI917IanL.js} +23 -23
  353. package/cdn/assets/DXhizwpX3GUT2ECx.js +90 -0
  354. package/cdn/assets/DYbOfw0BRA2hWOCP.js +1390 -0
  355. package/cdn/assets/DZo_DGKkHCqIyM5N.js +388 -0
  356. package/{browser/esm/DlOVZD0OiAjouS6-.mjs → cdn/assets/D_d2cK3aSl0eMBpj.js} +1626 -1018
  357. package/{browser/esm/BWo1N4YbK_zGU0nu.mjs → cdn/assets/DagxhIjpKea9MwI8.js} +1 -1
  358. package/cdn/assets/{DjdkGy-EI1kSo226.js → DbewMnLKZoGLGFNh.js} +1 -1
  359. package/{browser/esm/8-jmVNNbOHuXFdVQ.mjs → cdn/assets/DdXikMOzMIALd8bz.js} +120 -118
  360. package/cdn/assets/Dg3UJabBou63ReiH.js +12816 -0
  361. package/cdn/assets/Dg9ALylpMhftKvuI.js +23434 -0
  362. package/cdn/assets/DgQFdPeLRIkg5O3C.js +3093 -0
  363. package/{browser/esm/DWgp4t9N9u0eWthH.mjs → cdn/assets/DhLN5r1sTHL_BWeH.js} +1 -1
  364. package/cdn/assets/{ZxsFYopF0_WWqw4Q.js → DhU_l9pcEddg9s24.js} +1 -1
  365. package/cdn/assets/{CTI-mCJbJzitJZwj.js → DiabpzKzIUUyat-1.js} +1 -1
  366. package/cdn/assets/{DrI_S0A9TQvriTua.js → Dl29uXIaOLiBIDEI.js} +1 -1
  367. package/cdn/assets/{BtGmrIqU9W1L8zfZ.js → Dl40S1lFKvsN0DvK.js} +1 -1
  368. package/{browser/esm/DxcRLd7wmBGDgJsA.mjs → cdn/assets/DlWoVcsWZHiN-EYf.js} +1 -1
  369. package/cdn/assets/{B27vTQlxbHhSQJx8.js → DliTwLXIImeC0eub.js} +7803 -6320
  370. package/cdn/assets/{aHTKr1ijZ6bRi3Zg.js → DsRSG0tf_a2zWfcu.js} +4 -4
  371. package/cdn/assets/{7i4WSxDsu2ApJJ2_.js → DsXc1EO6csuKfV4l.js} +3 -3
  372. package/cdn/assets/DtO07D35O2tAh7f4.js +1241 -0
  373. package/cdn/assets/{C-0viTjg1dT2F-sk.js → Dut7EHGO0G5wuZvA.js} +2 -2
  374. package/cdn/assets/DvBV9E2CaadV0-OK.js +104 -0
  375. package/cdn/assets/{CakrxSS_RXtKmcUX.js → Dw7mCCAZtWzy1kDg.js} +99 -98
  376. package/{browser/esm/DEvZj68igS7Q8SZE.mjs → cdn/assets/DwITQzYKh_c7vCO8.js} +5 -5
  377. package/cdn/assets/{C0CeCYdLWLjySEFe.js → DwTdBuvtngstv-Ee.js} +15 -15
  378. package/cdn/assets/{CMVTwWHsRgyfSEDM.js → Dwb9z-Om5vH_9GFX.js} +67 -65
  379. package/{browser/esm/D-KZpU6HMaP4VUva.mjs → cdn/assets/Dwd9mENEUTKk45OD.js} +56 -56
  380. package/cdn/assets/{BvlfKrfrDhE9Jw4d.js → Dwm4Q509nQKTAHZp.js} +2 -2
  381. package/cdn/assets/{mK8HcIZyXkOTvL6E.js → DxI14nqCsNi-yexx.js} +7 -7
  382. package/cdn/assets/Dy07J9xUgFU8srvP.js +7723 -0
  383. package/{browser/esm/CBdNC7BOfc5TewHU.mjs → cdn/assets/DyeYHUP9q10K48wL.js} +1 -1
  384. package/cdn/assets/{Cy00y9b9j17Txyv1.js → DzF6mYUZfggTAjhM.js} +1 -1
  385. package/cdn/assets/{BpZ7P0CO148rR4zW.js → Dzlfx9-RfNxYludH.js} +20 -20
  386. package/cdn/assets/FjjP2q5AOiFod5IL.js +282 -0
  387. package/cdn/assets/{Dv8aQFTTaQBJKDDk.js → GA5X6vLsOcXufGyF.js} +1 -1
  388. package/cdn/assets/Ga_dmEQPXt-tMjfv.js +7 -0
  389. package/cdn/assets/HMCOTgDNR6bpWL7f.js +163 -0
  390. package/cdn/assets/{UTZcodQydbuMfCOS.js → Jn0_AtebABdIzyQ8.js} +1 -1
  391. package/cdn/assets/{CMxbiQ5J79M3n1tk.js → PD_ckP5IyZurtALu.js} +723 -373
  392. package/{browser/esm/lqknEt3DTma5Juxs.mjs → cdn/assets/PFd1HLX9x3NbZS0Q.js} +1 -1
  393. package/{browser/esm/B3Ii8x6RquHW1jMc.mjs → cdn/assets/PlCjmMBePH7hotkL.js} +12 -11
  394. package/cdn/assets/{Bgbi7BFR3rN5qj51.js → RZYxEHY1tap8fDMU.js} +22 -22
  395. package/cdn/assets/{w5IQWbJETgHhqMsY.js → V3xJfVu5YgTJE15l.js} +33 -33
  396. package/cdn/assets/{dn69mDhY7Xcc91kF.js → VtDou2czLTs_x_lJ.js} +20 -20
  397. package/cdn/assets/Xr_m9JQCcD2iBqdf.js +324 -0
  398. package/cdn/assets/{VCiu_neIjCTg2NUa.js → Y0Uf_lVRToNYi395.js} +634 -634
  399. package/{browser/esm/Dc2ZwgbIEgYWwAsF.mjs → cdn/assets/Z10MZFA0Sc2Zcelz.js} +1 -1
  400. package/cdn/assets/ZHMYKkw9GtA9PmwP.js +61 -0
  401. package/cdn/assets/ZaFy1hzL6cnNlROy.js +1302 -0
  402. package/cdn/assets/__mMW0v3QyR1pQYO.js +294 -0
  403. package/cdn/assets/{DqBj-9o7UdXu4qhb.js → bTZCD31OE4KkUy4u.js} +1 -1
  404. package/{browser/esm/BPrHgyAsm2Htx15h.mjs → cdn/assets/c6MwBF7fqj-4Wqct.js} +1 -1
  405. package/cdn/assets/csh4FIrA7Yz0oQR4.js +9 -0
  406. package/cdn/assets/{CDAYVaQYywqaxg4O.js → eyjrmBPp0a3kmDM1.js} +2 -2
  407. package/{browser/esm/BtdRr6IbtO6Gypsk.mjs → cdn/assets/hlphmhe3M3MZPvOh.js} +6 -5
  408. package/cdn/assets/jJoDPeW_80P8c7ET.js +201 -0
  409. package/cdn/assets/kLmFvtw68s1_Kbq9.js +142 -0
  410. package/cdn/assets/kTq1x8_s5V2PwKeX.js +9715 -0
  411. package/{browser/esm/BhkeuRcx8RlLCQ5E.mjs → cdn/assets/lPeOxAutCOlSB-aC.js} +1 -1
  412. package/cdn/assets/{DeUXRggj8Oz9ru_i.js → oLOwgPmipnKc68nJ.js} +1 -1
  413. package/cdn/assets/{BMlPFJ1glExv-70Z.js → oY2yN-_0_AcCI46E.js} +1 -1
  414. package/cdn/assets/{G5z0uVlyF6CLw_PA.js → pS2054G_Le7EvgyY.js} +2 -2
  415. package/cdn/assets/qwL1y5daLJePT9OL.js +7 -0
  416. package/cdn/assets/rNuTuxLduwMl4Fyb.js +182 -0
  417. package/cdn/assets/sCeaYn7GnW1N9bKn.js +423 -0
  418. package/cdn/assets/{Bsn-tUx172sEG2kR.js → t8Ps76FWzb3VX_wg.js} +20 -20
  419. package/{browser/esm/CTdFZ_I-41Vr6Dy4.mjs → cdn/assets/tQAwA9RKsgzjziNe.js} +1 -1
  420. package/{browser/esm/J9i3r1fU0H10b2hX.mjs → cdn/assets/t_7A_GdY394OUV4v.js} +1 -1
  421. package/{browser/esm/CWoPWWRwMgkGPFFP.mjs → cdn/assets/u8iMUyjw60ayROFo.js} +2538 -1728
  422. package/cdn/assets/ubUqS2NO2sn4DX3v.js +1694 -0
  423. package/cdn/assets/vY2ZLR024kVOwWej.js +36 -0
  424. package/cdn/assets/{DQEjvIGMgEkiaP6J.js → xUNkyQFYnzQAzsVs.js} +1 -1
  425. package/{browser/esm/BwOxnbR61WFJwy0A.mjs → cdn/assets/y-iW7vsJV47pYbw4.js} +1 -1
  426. package/{browser/esm/B0Wjc3lwtjKMwnvn.mjs → cdn/assets/y8mfWM7VlyfJEEwg.js} +1 -1
  427. package/cdn/assets/{BIsbcP5RXRU2XPfx.js → yI2dKrysDG0lqxjX.js} +2 -2
  428. package/cdn/assets/{Ba8taVvLslFcKS72.js → yzl98RXbYvgX5DfY.js} +28 -27
  429. package/cdn/assets/z4XcPMxN5hfqRHIt.js +367 -0
  430. package/cdn/assets/{ZSYS1J3uR7UQuHwZ.js → zm4ZwKXeSetbtx9Z.js} +10 -10
  431. package/cdn/index.js +27 -17
  432. package/package.json +3 -3
  433. package/types/src/sheetxl.d.ts +1 -0
  434. package/browser/esm/BNIInlJQbJjH8B6G.mjs +0 -84250
  435. package/browser/esm/B_HB4y7AA88Z775Z.mjs +0 -91
  436. package/browser/esm/CdeXXPCp5cCYvGyD.mjs +0 -14
  437. package/browser/esm/Chr_TXM-48IsK8Va.mjs +0 -155
  438. package/browser/esm/Clx8vvGDOTWK_M2l.mjs +0 -484
  439. package/browser/esm/Cw-4uoMuq_m7ziA3.mjs +0 -36
  440. package/browser/esm/D-9f1NKcpuYSgond.mjs +0 -412
  441. package/browser/esm/D7CGuQcwpkiuesEI.mjs +0 -229
  442. package/browser/esm/D7kkzIFPqKBK94kO.mjs +0 -17952
  443. package/browser/esm/D8exjrado9TJrBp-.mjs +0 -1946
  444. package/browser/esm/DGCOPbZbEmt0x9z0.mjs +0 -155
  445. package/browser/esm/DZRmBfjn2TgOTu5e.mjs +0 -3604
  446. package/browser/esm/D_7BWdsu8yejhUxy.mjs +0 -2353
  447. package/browser/esm/D_thhK0vSez8Yfle.mjs +0 -798
  448. package/browser/esm/Dv2z0548SZRGTN3l.mjs +0 -149
  449. package/browser/esm/DyeY6XwMQ_XNUHiW.mjs +0 -89
  450. package/browser/esm/RLU85PsAYtKPUf6N.mjs +0 -71
  451. package/browser/esm/WMYR09ZOR8JbZEnx.mjs +0 -4748
  452. package/browser/esm/r2Az2Yc4_qj2-sn0.mjs +0 -398
  453. package/cdn/assets/514mXPTuNvdNgw35.js +0 -412
  454. package/cdn/assets/7Sg0ht_ZCMJkPurt.js +0 -516
  455. package/cdn/assets/B_3Musz0q2MSZ5H-.js +0 -799
  456. package/cdn/assets/BgyY4zVPZSXljoCZ.js +0 -14
  457. package/cdn/assets/BlIZ30huelIxNo6S.js +0 -91
  458. package/cdn/assets/BxqXOiOyI_XiOmvN.js +0 -156
  459. package/cdn/assets/CEYyp6Qrr_IopxpL.js +0 -22597
  460. package/cdn/assets/CL6Tgu_rUO6G-fyq.js +0 -2352
  461. package/cdn/assets/COMOqucXq7X1vi0P.js +0 -230
  462. package/cdn/assets/CRXSrbGNABtzf532.js +0 -399
  463. package/cdn/assets/CTvPIYWTcjwlJeEA.js +0 -237
  464. package/cdn/assets/CU5cKipVT1X8Xz7F.js +0 -156
  465. package/cdn/assets/ChAKLV5zrGAHAof2.js +0 -130
  466. package/cdn/assets/Cw-4uoMuq_m7ziA3.js +0 -36
  467. package/cdn/assets/DCnWyVXikb_8Dat3.js +0 -61
  468. package/cdn/assets/DHugYwX4_ZyqGn-C.js +0 -1947
  469. package/cdn/assets/DOHh3pUXxMM09UY5.js +0 -3604
  470. package/cdn/assets/DlpgIJxNq2V4gdDq.js +0 -74
  471. package/cdn/assets/DuAbY54w5gJpQgss.js +0 -84250
  472. package/cdn/assets/DviEoeWW0EvDg1hr.js +0 -149
  473. package/cdn/assets/PzWqv-oXxEuzKdaT.js +0 -484
  474. package/cdn/assets/QJ4AkDD269D1MzmI.js +0 -89
  475. package/cdn/assets/fm3mUdTDo-STB36M.js +0 -4749
  476. package/cdn/assets/lWY3TbG2NDscy9He.js +0 -72
  477. package/cdn/assets/xlXDq-qoj7eOE6_T.js +0 -5153
@@ -1,3604 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.8.0-beta.10
3
- *
4
- * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- import { C as e, D as t, E as n, G as r, O as i, P as a, U as o, V as s, X as c, b as l, c as u, o as d, q as f, r as p, s as m, u as h, y as g } from "./CMxbiQ5J79M3n1tk.mjs";
8
- import { r as _ } from "./C9NyIoUahFiyRCxP.mjs";
9
- import { i as v, r as y } from "./D-55MlIn7Wo_hdjI.mjs";
10
- import { C as b, E as x, Et as S, Ht as C, N as w, S as T, V as E, W as ee, Wt as te, Z as ne, b as re, bt as D, ct as O, m as ie, rt as ae, tt as oe } from "./CWoPWWRwMgkGPFFP.mjs";
11
- import { i as k, t as A } from "./BAH_cWcQEIBKWnl6.mjs";
12
- import { A as se, At as ce, C as j, Ct as le, D as ue, E as de, F as M, Ft as N, Gt as fe, H as P, Ht as F, Jt as pe, K as me, L as he, Lt as ge, M as _e, N as ve, Ot as ye, P as be, R as xe, S as Se, St as Ce, Tt as we, U as Te, V as Ee, Xt as De, Y as I, Z as L, _t as Oe, an as ke, b as Ae, c as je, d as Me, en as Ne, et as Pe, ft as Fe, h as Ie, in as Le, k as Re, kt as ze, l as Be, ln as Ve, m as He, mt as Ue, nn as R, nt as We, o as Ge, r as Ke, rn as qe, sn as Je, tn as Ye, tt as Xe, u as Ze, un as Qe, v as $e, vt as et, wt as tt, x as nt, xt as rt, y as z, yt as it, z as at } from "./BNIInlJQbJjH8B6G.mjs";
13
- var ot, st = class extends r {
14
- constructor(e, t = 50) {
15
- super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
16
- }
17
- _undoCommits(e = this.maxStack) {
18
- let t = this._transactions;
19
- if (!t) return [];
20
- let n = t.getLog(t.getCurrentCommit(!1).getId(), 2 ** 53 - 1), r = [];
21
- for (let t = 0; t < n.length && r.length < e; t++) {
22
- let e = n[t];
23
- if (e.getId() === this._floorId || t === n.length - 1) break;
24
- e.getDescription() && r.push(e);
25
- }
26
- return r;
27
- }
28
- _redoCommits(e = this.maxStack) {
29
- let t = this._transactions;
30
- if (!t) return [];
31
- let n = t.getCurrentCommit(!1).getId(), r = t.getTipCommit().getId();
32
- if (r === n) return [];
33
- let i = t.getLog(r, 2 ** 53 - 1), a = [], o = !1;
34
- for (let e of i) {
35
- if (e.getId() === n) {
36
- o = !0;
37
- break;
38
- }
39
- a.push(e);
40
- }
41
- if (!o) return [];
42
- a.reverse();
43
- let s = [];
44
- for (let t of a) if (t.getDescription() && s.push(t), s.length >= e) break;
45
- return s;
46
- }
47
- undo(e = 1) {
48
- let t = this._transactions;
49
- if (!t) return;
50
- let n = !1;
51
- try {
52
- for (let r = 0; r < e; r++) {
53
- let [e] = this._undoCommits(1);
54
- if (!e) break;
55
- t.revert(e.getId()), n = !0;
56
- }
57
- } finally {
58
- n && this._notifyOnStackChange();
59
- }
60
- }
61
- redo(e = 1) {
62
- let t = this._transactions;
63
- if (!t) return;
64
- let n = !1;
65
- try {
66
- for (let r = 0; r < e; r++) {
67
- let [e] = this._redoCommits(1);
68
- if (!e) {
69
- r === 0 && this._repeatOperation?.repeat();
70
- break;
71
- }
72
- t.restore(e.getId()), n = !0;
73
- }
74
- } finally {
75
- n && this._notifyOnStackChange();
76
- }
77
- }
78
- hasUndo() {
79
- return this._undoCommits(1).length > 0;
80
- }
81
- hasRedo() {
82
- return this._redoCommits(1).length > 0 || this._repeatOperation !== null;
83
- }
84
- getTopUndoDescription() {
85
- return this._undoCommits(1)[0]?.getDescription() ?? null;
86
- }
87
- getTopRedoDescription() {
88
- return this._repeatOperation === null ? this._redoCommits(1)[0]?.getDescription() ?? null : this._repeatOperation.description;
89
- }
90
- getUndoDescriptions() {
91
- return this._undoCommits().map((e) => e.getDescription());
92
- }
93
- getRedoDescriptions() {
94
- let e = this._redoCommits().map((e) => e.getDescription());
95
- return e.length === 0 && this._repeatOperation !== null && e.push(this._repeatOperation.description), Object.freeze(e);
96
- }
97
- getUndoEntries() {
98
- return this._undoCommits().map(lt);
99
- }
100
- getRedoEntries() {
101
- let e = this._redoCommits().map(lt);
102
- return e.length === 0 && this._repeatOperation !== null && e.push({
103
- description: this._repeatOperation.description,
104
- author: null,
105
- meta: ct
106
- }), Object.freeze(e);
107
- }
108
- addUndoOperation() {
109
- throw Error("TransactionUndoManager derives its stack from the commit log; commit a described transaction instead.");
110
- }
111
- clear(e = !0) {
112
- this._transactions && (this._floorId = this._transactions.getCurrentCommit(!1).getId()), super.clear(e);
113
- }
114
- close() {
115
- this._removeListener?.();
116
- }
117
- }, ct = Object.freeze({}), lt = (e) => ({
118
- description: e.getDescription(),
119
- author: e.getAuthor(),
120
- meta: e.getMeta() ?? ct
121
- }), ut = class {
122
- constructor(e, t) {
123
- this._dirty = !1, this._store = e, this._savedCommitId = e.getCurrentCommit()?.getId() ?? null, this._emitter = new y(this);
124
- let n = this;
125
- this._removeStoreListener = e.addListener({
126
- onCommitEnd() {
127
- n._recompute();
128
- },
129
- onCommitChange() {
130
- n._recompute();
131
- }
132
- }), this._removeCommitListener = t?.addCommitListener({ onCommit(e) {
133
- e.store === n._store && n.markSaved(e.commitId);
134
- } });
135
- }
136
- getStore() {
137
- return this._store;
138
- }
139
- isDirty() {
140
- return (this._store.getCurrentCommit()?.getId() ?? null) !== this._savedCommitId;
141
- }
142
- getSavedCommitId() {
143
- return this._savedCommitId;
144
- }
145
- markSaved(e = this._store.getCurrentCommit()?.getId() ?? null) {
146
- e !== this._savedCommitId && (this._savedCommitId = e ?? null, this._recompute());
147
- }
148
- addListeners(e, t) {
149
- return this._emitter.addListeners(e, t);
150
- }
151
- _recompute() {
152
- let e = this.isDirty();
153
- e !== this._dirty && (this._dirty = e, this._emitter.notify(e ? "onDirty" : "onClean", { transactional: !1 }));
154
- }
155
- close() {
156
- this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
157
- }
158
- };
159
- ot ||= {};
160
- var B = class e {
161
- constructor(t, n = {}) {
162
- this._password = null, this._emitter = new y(this), this._path = t ?? null, this._name = n.name ?? null, this._format = n.format ?? null, this._size = n.size ?? null, this._lastModified = n.lastModified ?? null, this._canWrite = n.canWrite ?? e._defaultCanWrite(this._path), this._encryption = n.encryption ?? null;
163
- }
164
- static _defaultCanWrite(e) {
165
- return !!e && !/^(https?:|data:|blob:)/i.test(e);
166
- }
167
- _cleanPath() {
168
- return this._path ? this._path.split(/[?#]/)[0] : null;
169
- }
170
- getName() {
171
- if (this._name !== null && this._name !== void 0) return this._name;
172
- let e = this._cleanPath();
173
- return e && I(e) || null;
174
- }
175
- getPath() {
176
- return this._path;
177
- }
178
- getFormat() {
179
- return this._format ? this._format : this.getExtension();
180
- }
181
- getExtension() {
182
- let e = this._cleanPath();
183
- if (!e) return null;
184
- let t = z(e);
185
- return t ? t.toLowerCase() : null;
186
- }
187
- getEncryption() {
188
- return this._encryption;
189
- }
190
- isEncrypted() {
191
- return this._encryption !== null || this._password !== null;
192
- }
193
- setPassword(e) {
194
- this._password !== (e ?? null) && (this._password = e ?? null, this._password === null && (this._encryption = null), this._emitter.notify("onChange"));
195
- }
196
- getPassword() {
197
- return this._password;
198
- }
199
- getSize() {
200
- return this._size;
201
- }
202
- getLastModified() {
203
- return this._lastModified;
204
- }
205
- canWrite() {
206
- return this._canWrite;
207
- }
208
- setName(e) {
209
- this.update({ name: e });
210
- }
211
- update(e) {
212
- let t = !1;
213
- return e.lastModified !== void 0 && e.lastModified !== this._lastModified && (this._lastModified = e.lastModified, t = !0), e.name !== void 0 && e.name !== this._name && (this._name = e.name, t = !0), e.format !== void 0 && e.format !== this._format && (this._format = e.format, t = !0), e.size !== void 0 && e.size !== this._size && (this._size = e.size, t = !0), e.canWrite !== void 0 && e.canWrite !== this._canWrite && (this._canWrite = e.canWrite, t = !0), e.encryption !== void 0 && e.encryption !== this._encryption && (this._encryption = e.encryption, t = !0), t && this._emitter.notify("onChange"), this;
214
- }
215
- addListeners(e, t) {
216
- return this._emitter.addListeners(e, t);
217
- }
218
- get [Symbol.toStringTag]() {
219
- return "[Origin]";
220
- }
221
- toString() {
222
- let e = this._cleanPath(), t = e ? e.split(/[/\\]/).pop() || e : this._name ?? "(unbound)", n = this._size;
223
- if (n == null) return t;
224
- if (n < 1024) return `${t} ${n}B`;
225
- let r = Math.floor(Math.log(n) / Math.log(1024)), i = [
226
- "B",
227
- "KB",
228
- "MB",
229
- "GB",
230
- "TB"
231
- ];
232
- return `${t} ${(n / 1024 ** r).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
233
- }
234
- }, V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new Set(), dt = (e) => V.get(e) ?? null, ft = () => Array.from(H, (e) => e.getOrigin()), pt = class e {
235
- constructor(t) {
236
- this._released = !1, e._assertFree(t), this._emitter = new y(this), this._origin = t, V.set(t, this), H.add(this);
237
- }
238
- getOrigin() {
239
- return this._origin;
240
- }
241
- setOrigin(t) {
242
- t !== this._origin && (e._assertFree(t), this._released || (V.delete(this._origin), V.set(t, this)), this._origin = t, this._emitter.notify("onOriginChange"));
243
- }
244
- release() {
245
- this._released || (this._released = !0, V.get(this._origin) === this && V.delete(this._origin), H.delete(this));
246
- }
247
- addListeners(e, t) {
248
- return this._emitter.addListeners(e, t);
249
- }
250
- static _assertFree(e) {
251
- if (V.has(e)) throw Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
252
- }
253
- }, mt = class {
254
- constructor() {
255
- this._defaultStringSourceType = "filepath";
256
- }
257
- async read(e) {
258
- let t = e.options ?? {}, n = e.source;
259
- if (typeof n == "function" && (n = n()), n && typeof n == "object" && typeof n.then == "function" && (n = await Promise.resolve(n)), n == null && (n = await this.resolveSource(e), n == null)) return null;
260
- let r = n, i = await this.fileFromHandle(n);
261
- i && (n = i);
262
- let a = t.format, o = this._detectSourceType(n);
263
- if (!o) throw Error("Unable to detect source type from provided input.");
264
- let c, l, u = !1;
265
- if (o === "filepath") {
266
- let e = typeof n == "string" && n.startsWith("file://") ? n.slice(7) : n;
267
- n = await this.filePathToFile(e), o = "file", u = !0;
268
- }
269
- switch (o) {
270
- case "file": {
271
- let e = n, r = e?.name, o = r ? `${I(r)}` : "";
272
- c = await e.arrayBuffer(), l = {
273
- format: a,
274
- ext: z(r),
275
- name: o,
276
- absolutePath: r,
277
- size: e.size,
278
- lastModified: e.lastModified,
279
- canWrite: !t.asCopy && (!!i || u && this._canWriteLocalPath())
280
- };
281
- break;
282
- }
283
- case "blob": {
284
- let e = n;
285
- c = await e.arrayBuffer(), l = {
286
- format: a,
287
- size: e.size
288
- };
289
- break;
290
- }
291
- case "base64": {
292
- let e;
293
- if (n && typeof n == "object" && "base64" in n) e = n.base64;
294
- else if (typeof n == "string" && n.startsWith("data:")) {
295
- let [, t] = n.split(",");
296
- e = t;
297
- } else e = n;
298
- c = s.base64ToArrayBuffer(e), l = {
299
- format: a,
300
- size: e.length
301
- };
302
- break;
303
- }
304
- case "fetch": {
305
- let e, t, r;
306
- if (typeof n == "string") e = n;
307
- else {
308
- if (!n || typeof n != "object" || !("input" in n)) throw Error("Invalid fetch source provided.");
309
- {
310
- let i = n;
311
- e = i.input, t = i.init, r = i.timeout;
312
- }
313
- }
314
- let i = r || 3e4, o = new AbortController(), s = setTimeout(() => o.abort(), i), u = typeof e == "string" ? e : e.toString(), d = z(u);
315
- try {
316
- let n = await fetch(e, {
317
- ...t,
318
- signal: o.signal
319
- });
320
- if (clearTimeout(s), !n.ok) throw Error(`Failed to fetch: ${n.status} ${n.statusText}`);
321
- let r = await n.arrayBuffer();
322
- if (!r) throw Error(`Unable to fetched content: ${u}`);
323
- c = r, l = {
324
- format: a,
325
- ext: d,
326
- name: I(u, !0),
327
- absolutePath: u
328
- };
329
- } catch (e) {
330
- throw clearTimeout(s), e.name === "AbortError" ? Error(`Fetch timeout after ${i}ms: ${u}`) : e;
331
- }
332
- break;
333
- }
334
- case "buffer":
335
- c = n, l = { format: a };
336
- break;
337
- case "stream": {
338
- let e = n.getReader(), t = [], r = 0;
339
- try {
340
- for (;;) {
341
- let { done: n, value: i } = await e.read();
342
- if (n) break;
343
- t.push(i), r += i.length;
344
- }
345
- } finally {
346
- e.releaseLock();
347
- }
348
- let i = new ArrayBuffer(r), o = new Uint8Array(i), s = 0;
349
- for (let e of t) o.set(e, s), s += e.length;
350
- c = i, l = { format: a };
351
- break;
352
- }
353
- default: throw Error(`Unsupported source type: ${o}`);
354
- }
355
- l.canWrite && await this.findOpenOrigin(r, l) && (l.canWrite = !1);
356
- let d = await e.decode(c, {
357
- sourceType: o,
358
- ...l
359
- });
360
- return d ? (await this.onWorkbookRead(d, r), d) : null;
361
- }
362
- async findOpenOrigin(e, t) {
363
- return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
364
- }
365
- findOpenPath(e, t) {
366
- return ft().find((n) => {
367
- if (n === t || !n.canWrite()) return !1;
368
- let r = n.getPath();
369
- return !!r && this.isSamePath(r, e);
370
- }) ?? null;
371
- }
372
- isSamePath(e, t) {
373
- return e === t;
374
- }
375
- async fileFromHandle(e) {
376
- return null;
377
- }
378
- async resolveSource(e) {
379
- return null;
380
- }
381
- async onWorkbookRead(e, t) {}
382
- _canWriteLocalPath() {
383
- return !1;
384
- }
385
- _detectSourceType(e) {
386
- if (e && typeof e == "object" && "base64" in e) return "base64";
387
- if (e && typeof e == "object" && "input" in e) return "fetch";
388
- if (typeof e == "string") {
389
- if (e.startsWith("data:")) return "base64";
390
- if (e.startsWith("http://") || e.startsWith("https://")) return "fetch";
391
- if (e.startsWith("file://")) return "filepath";
392
- let t = this._defaultStringSourceType;
393
- return e.startsWith("./") || e.startsWith("../") || e.startsWith("/") || /^[a-zA-Z]:[/\\]/.test(e), t;
394
- }
395
- if (typeof File < "u" && e instanceof File) return "file";
396
- if (typeof Blob < "u" && e instanceof Blob) return "blob";
397
- let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r = s.isNodeBuffer(e);
398
- return t || n || r ? "buffer" : typeof ReadableStream < "u" && e instanceof ReadableStream || Object.prototype.toString.call(e) === "[object ReadableStream]" || e && typeof e.getReader == "function" && e.locked !== void 0 ? "stream" : null;
399
- }
400
- }, ht = class extends mt {
401
- constructor(e, t) {
402
- super(), this._getWriteFormats = e, this._getReadFormats = t, this._defaultStringSourceType = "fetch", this._handleCache = /* @__PURE__ */ new WeakMap();
403
- }
404
- async fileFromHandle(e) {
405
- return U(e) ? e.getFile() : null;
406
- }
407
- async resolveSource() {
408
- let e = await this._getReadFormats?.() ?? [];
409
- if (typeof globalThis.showOpenFilePicker == "function") try {
410
- let t = function(e) {
411
- let t = gt(e);
412
- if (t.length <= 1) return t;
413
- let n = /* @__PURE__ */ new Set(), r = {};
414
- for (let e of t) for (let [t, i] of Object.entries(e.accept)) for (let e of i) n.has(e) || (n.add(e), (r[t] ??= []).push(e));
415
- return [{
416
- description: "All Supported",
417
- accept: r
418
- }, ...t];
419
- }(e), [n] = await globalThis.showOpenFilePicker(t.length ? { types: t } : void 0);
420
- return n;
421
- } catch (e) {
422
- if (e?.name === "AbortError") return null;
423
- throw e;
424
- }
425
- let t = e.flatMap((e) => e.exts.map((e) => "." + e)).join(", ");
426
- return c.openFileDialog(t);
427
- }
428
- async findOpenOrigin(e) {
429
- return U(e) ? this._findOpenHandle(e) : null;
430
- }
431
- async _findOpenHandle(e, t) {
432
- for (let n of ft()) {
433
- if (n === t || !n.canWrite()) continue;
434
- let r = this._handleCache.get(n);
435
- if (r && typeof r.isSameEntry == "function" && await r.isSameEntry(e)) return n;
436
- }
437
- return null;
438
- }
439
- async onWorkbookRead(e, t) {
440
- if (!U(t)) return;
441
- let n = e.getOrigin?.();
442
- n?.canWrite() && this._handleCache.set(n, t);
443
- }
444
- async filePathToFile(e) {
445
- throw Error(`Cannot read local file path '${e}' in browser environment. Use a file input element or fetch for remote URLs.`);
446
- }
447
- async write(e) {
448
- let { origin: t, suggestedName: n, format: r, encode: i, prompt: a } = e, o = [r, ...(await this._getWriteFormats()).filter((e) => e.key !== r.key)], s = typeof globalThis.showSaveFilePicker == "function", c = !a && t.canWrite() ? this._handleCache.get(t) : void 0;
449
- if (s) try {
450
- if (c) {
451
- let e = await async function(e) {
452
- try {
453
- if (typeof e.queryPermission != "function") return "granted";
454
- let t = { mode: "readwrite" };
455
- return await e.queryPermission(t) === "granted" || await e.requestPermission(t) === "granted" ? "granted" : "denied";
456
- } catch {
457
- return "unavailable";
458
- }
459
- }(c);
460
- if (e === "denied") return null;
461
- e !== "granted" && (c = void 0);
462
- }
463
- let a = !!c;
464
- if (!a) {
465
- c = await globalThis.showSaveFilePicker({
466
- suggestedName: n,
467
- types: gt(o)
468
- });
469
- let t = await this._findOpenHandle(c, e.workbook?.getOrigin?.());
470
- if (t) throw new h(d("error.io.openElsewhere", { name: t.getName() ?? c.name ?? "" }));
471
- }
472
- let s = vt(c.name ?? n), l = o.find((e) => e.exts.some((e) => e.toLowerCase() === s)) ?? r, u = a ? t : new B(c.name ?? n, {
473
- format: l.key,
474
- canWrite: !0
475
- }), f = await i(l.key, u);
476
- if (!f) return null;
477
- let p = new Blob([_t(f)], { type: l.mimeType || "application/octet-stream" }), m = await c.createWritable();
478
- if (await m.write(p), await m.close(), this._handleCache.set(u, c), u instanceof B) {
479
- let e = await Promise.resolve(c.getFile?.()).then((e) => e?.lastModified ?? null, () => null);
480
- u.update({
481
- size: p.size,
482
- lastModified: e
483
- });
484
- }
485
- return u;
486
- } catch (e) {
487
- if (e?.name === "AbortError") return null;
488
- if (e instanceof h) throw e;
489
- }
490
- let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, f = u && r.exts.some((e) => e.toLowerCase() === vt(u)) ? u : n, p = l !== f || t.canWrite() ? new B(f, {
491
- format: r.key,
492
- canWrite: !1
493
- }) : t, m = await i(r.key, p);
494
- if (!m) return null;
495
- let g = new Blob([_t(m)], { type: r.mimeType || "application/octet-stream" });
496
- return function(e, t) {
497
- let n = URL.createObjectURL(e), r = document.createElement("a");
498
- r.style.display = "none", r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
499
- }(g, f), p instanceof B && p.update({ size: g.size }), p;
500
- }
501
- };
502
- function gt(e) {
503
- return e.map((e) => {
504
- let t = e.mimeType && e.mimeType.includes("/") ? e.mimeType : "application/octet-stream";
505
- return {
506
- description: e.description ?? e.key,
507
- accept: { [t]: e.exts.map((e) => "." + e) }
508
- };
509
- });
510
- }
511
- function U(e) {
512
- return !!e && e.kind === "file" && typeof e.getFile == "function";
513
- }
514
- function _t(e) {
515
- if (typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) {
516
- let t = new ArrayBuffer(e.byteLength);
517
- return new Uint8Array(t).set(new Uint8Array(e)), t;
518
- }
519
- return e;
520
- }
521
- function vt(e) {
522
- let t = e.lastIndexOf(".");
523
- return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
524
- }
525
- var yt = class {
526
- constructor(e) {
527
- this._private = { input: e }, typeof e == "string" ? this._private.name = e : Object.assign(this._private, e);
528
- }
529
- toJSON() {
530
- return this._private.input;
531
- }
532
- getFamily() {
533
- return this._private.name;
534
- }
535
- getPitch() {
536
- return this._private.pitch;
537
- }
538
- getPanose() {
539
- return this._private.panose;
540
- }
541
- toString() {
542
- return typeof this._private.input == "string" ? this._private.input : JSON.stringify(this._private.input);
543
- }
544
- get isIFont() {
545
- return !0;
546
- }
547
- }, bt = /^\p{White_Space}$/u, W = (e) => Math.max(0, Math.floor(e + .5)) || 0, xt = class e {
548
- constructor(e, t) {
549
- this._perEm = /* @__PURE__ */ new Map(), this.family = e.family, this.weight = e.weight, this.italic = e.italic, this._vertical = t;
550
- }
551
- static fromJSON(t) {
552
- if (t?.format !== e.FORMAT) throw Error(`Not a font metrics table: format '${t?.format}', expected '${e.FORMAT}'.`);
553
- let n = Math.max(1, t.unitsPerEm), r = (e) => e ? {
554
- position: e[0] / n,
555
- thickness: e[1] / n
556
- } : null, i = new e({
557
- family: t.family,
558
- weight: t.weight,
559
- italic: t.italic
560
- }, {
561
- ascent: t.winAscent / n,
562
- descent: t.winDescent / n,
563
- underline: r(t.underline),
564
- strikeout: r(t.strikeout)
565
- }), a = i._perEm;
566
- for (let [e, r] of t.advances) for (let t = 0; t < r.length; t++) a.set(e + t, r[t] / n);
567
- return i;
568
- }
569
- get size() {
570
- return this._perEm.size;
571
- }
572
- advance(e) {
573
- return this._perEm.get(e);
574
- }
575
- set(e) {
576
- for (let [t, n] of e) this._perEm.set(t, n);
577
- }
578
- missing(e) {
579
- let t = /* @__PURE__ */ new Set();
580
- for (let n of e) this._perEm.has(n.codePointAt(0)) || t.add(n);
581
- return [...t];
582
- }
583
- width(e, t, n) {
584
- let r = this._perEm, i = r.get(32) ?? 0, a = 0, o = 0;
585
- for (let t of e) a += r.get(t.codePointAt(0)) ?? (bt.test(t) ? i : 0), o++;
586
- return a * t * (n?.superSub ? .6 : 1) + (n?.letterSpacing ?? 0) * Math.max(0, o - 1);
587
- }
588
- metrics(e) {
589
- let t = W(e), n = W(this._vertical.ascent * t), r = W(this._vertical.descent * t), i = n + r + 2;
590
- return {
591
- ascent: n,
592
- descent: r,
593
- lineHeight: i,
594
- baseline: Math.floor((i - (n + r)) / 2) + n,
595
- lineGap: 2
596
- };
597
- }
598
- underline(e) {
599
- return St(this._vertical.underline, e);
600
- }
601
- strikeout(e) {
602
- return St(this._vertical.strikeout, e);
603
- }
604
- measure(e, t, n) {
605
- return {
606
- width: this.width(e, t, n),
607
- ...this.metrics(t)
608
- };
609
- }
610
- };
611
- function St(e, t) {
612
- return e ? {
613
- position: e.position * t,
614
- thickness: e.thickness * t
615
- } : null;
616
- }
617
- (xt ||= {}).FORMAT = "sheetxl-font-metrics/1";
618
- var G, K, Ct, wt = class {
619
- constructor(e = null) {
620
- this.name = "table-file", this.kind = "table", this._pending = /* @__PURE__ */ new Map(), this._base = e;
621
- }
622
- build(e) {
623
- let t = function(e) {
624
- let t = e.family.trim().toLowerCase().replace(/\s+/g, "-"), n = e.weight >= 600;
625
- return `${t}-${n && e.italic ? "bold-italic" : n ? "bold" : e.italic ? "italic" : "regular"}.metrics.json`;
626
- }(e), n = this._pending.get(t);
627
- return n || (n = this._load(t), this._pending.set(t, n)), n;
628
- }
629
- async _load(e) {
630
- let t;
631
- try {
632
- t = await o("fonts", "@sheetxl/sdk", e, this._base, import.meta.url);
633
- } catch {
634
- return null;
635
- }
636
- return xt.fromJSON(t);
637
- }
638
- }, Tt = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Arial\",\n \"weight\": 700,\n \"italic\": false,\n \"source\": { \"family\": \"Liberation Sans\", \"version\": \"Version 2.1.5\", \"license\": \"OFL-1.1\", \"notice\": \"Licensed under the SIL Open Font License, Version 1.1\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1854,\n \"winDescent\": 434,\n \"underline\": [-2, 215],\n \"strikeout\": [530, 102],\n \"advances\": [\n [32, [569,682,971,1139,1139,1821,1479,487,682,682,797,1196,569,682,569,569,1139,1139,1139,1139,1139,1139,1139,1139,1139,1139,682,682,1196,1196,1196,1251,1997,1479,1479,1479,1479,1366,1251,1593,1479,569,1139,1479,1251,1706,1479,1593,1366,1593,1479,1366,1251,1479,1366,1933,1366,1366,1251,682,569,682,1196,1139,682,1139,1251,1139,1251,1139,682,1251,1251,569,569,1139,569,1821,1251,1251,1251,1251,797,1139,682,1251,1139,1593,1139,1139,1024,797,573,797,1196]],\n [160, [569,682,1139,1139,1139,1139,573,1139,682,1509,758,1139,1196,682,1509,1131,819,1124,682,682,682,1180,1139,682,682,682,748,1139,1708,1708,1708,1251,1479,1479,1479,1479,1479,1479,2048,1479,1366,1366,1366,1366,569,569,569,569,1479,1479,1593,1593,1593,1593,1593,1196,1593,1479,1479,1479,1479,1366,1366,1251,1139,1139,1139,1139,1139,1139,1821,1139,1139,1139,1139,1139,569,569,569,569,1251,1251,1251,1251,1251,1251,1251,1124,1251,1251,1251,1251,1251,1139,1251,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1472,1479,1251,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1593,1251,1593,1251,1593,1251,1593,1251,1479,1251,1479,1251,569,569,569,569,569,569,569,569,569,569,1607,1139,1139,569,1479,1139,1139,1251,569,1251,569,1251,789,1251,981,1251,569,1479,1251,1479,1251,1479,1251,1451,1481,1251,1593,1251,1593,1251,1593,1251,2048,1933,1479,797,1479,797,1479,797,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1251,981,1251,682,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1933,1593,1366,1139,1366,1251,1024,1251,1024,1251,1024,569,1251,1713,1472,1251,1472,1251,1479,1479,1139,1479,1715,1472,1251,1242,1366,1487,1283,1251,1139,1593,1304,1906,569,569,1479,1139,569,1139,2031,1479,1251,1593,1747,1456,1816,1523,1601,1251,1366,1366,1139,1229,737,682,1251,682,1251,1699,1483,1642,1479,1577,1139,1251,1024,1251,1251,1078,1078,1139,1139,1018,1186,1251,573,1019,1197,682,2730,2503,2275,2390,1820,1138,2618,2048,1820,1479,1139,569,569,1593,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1139,1479,1139,1479,1139,2048,1821,1593,1251,1593,1251,1479,1139,1593,1251,1593,1251,1251,1078,569,2730,2503,2275,1593,1251,2115,1362,1479,1251,1479,1139,2048,1821,1593,1251,1479,1139,1479,1139,1366,1139,1366,1139,569,569,569,569,1593,1251,1593,1251,1479,797,1479,797,1479,1251,1479,1251,1366,1139,1251,682,1182,1065,1479,1251,1439,1715,1292,1292,1251,1024,1479,1139,1366,1139,1593,1251,1593,1251,1593,1251,1593,1251,1366,1139,1022,1707,1036,569,1953,1953,1479,1479,1139,1251,1251,1139,1024,1321,991,1479,1479,1366,1366,1139,1139,569,1587,1251,1479,797,1366,1139,1139,1251,1251,1251,1139,1139,1251,1251,1139,1139,1601,1018,1018,1415,1162,682,1251,1251,1200,1139,1230,1251,1251,1251,569,569,830,680,729,569,1236,1821,1821,1821,1251,1251,1259,1251,1707,1730,1535,797,797,797,797,797,797,797,1195,1195,1139,682,682,682,1105,682,682,1251,1272,1192,1139,1593,1139,1169,1024,1392,1078,1078,1139,1139,1139,1139,1593,1259,1162,1200,1237,939,1139,926,1251,1139,1139,2111,1929,2479,1666,1094,1688,1780,1589,1418,1093,1154,1494,1494,753,753,398,516,516,516,768,1071,738,487,971,569,569,569,682,682,768,768,1196,1196,1196,1196,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,749,289,770,750,768,784,784,784,784,784,682,682,682,682,1024,682,682,682,682,682,682,682,682,682,682,682,682,682,682,814,814,682,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [682,682]],\n [890, [682,1139,1139,1139,682]],\n [900, [682,952,1479,682,1747,1855,970]],\n [908, [1689]],\n [910, [1899,1716,569,1479,1479,1231,1472,1366,1251,1479,1593,569,1479,1366,1706,1479,1318,1593,1479,1366]],\n [931, [1229,1251,1366,1681,1366,1657,1642,569,1366,1259,924,1251,569,1192,1259,1250,1139,1242,972,943,1251,1107,569,1142,1139,1253,1139,912,1251,1568,1267,1065,1401,914,1192,1465,1179,1543,1730,569,1192,1251,1192,1730]],\n [976, [1250,1192,1577,2050,1577,1535,1730,1385,1593,1251,1479,1139,1251,926,1539,1084,1647,1250,2031,1821,1439,1251,1439,1239,1366,1366,1316,1236,1505,1184,1038,900,1385,1265,1139,569,1593,980,980,1366,1251,1479,1706,1515,1267,1479,1479,1479,1366,1370,1813,1161,1457,1366,569,565,1139,2240,2176,1792,1250,1472,1274,1472,1479,1472,1479,1161,1459,1366,1851,1283,1472,1472,1250,1437,1706,1479,1593,1472,1366,1479,1251,1274,1748,1366,1496,1439,2058,2087,1781,2005,1472,1457,2112,1472,1139,1265,1259,853,1300,1139,1452,1018,1259,1259,1025,1301,1515,1237,1251,1237,1251,1139,1003,1139,1792,1139,1259,1189,1707,1728,1493,1749,1259,1131,1749,1195,1139,1139,1251,853,1131,1139,569,576,569,1984,1856,1251,1025,1259,1139,1237,2621,1594,1780,1439,1998,1630,1366,1139,1896,1639,1657,1543,2206,2008,1283,1018,1657,1543,1593,1251,1669,1324,1669,1324,2294,1995,1668,1306,2621,1845,2621,1594,1479,1139,1196,0,0,0,0,0,0,0,1472,1259,1472,1259,1366,1251,997,915,1161,853,1439,1225,1851,1452,1283,1018,1250,1025,1250,1025,1250,1025,1559,1276,1479,1237,1801,1462,2306,1887,1479,1183,1479,1139,1251,1003,1139,1139,1139,1139,1366,1139,1746,1411,1439,1189,1439,1189,1439,1251,1754,1389,1754,1389,569,1851,1452,1437,1224,1437,1301,1479,1237,1479,1237,1439,1189,1706,1515,569,1479,1139,1479,1139,2048,1821,1366,1139,1487,1139,1487,1139,1851,1452,1283,1018,1283,1078,1472,1259,1472,1259,1593,1251,1593,1251,1593,1251,1457,1131,1274,1139,1274,1139,1274,1139,1439,1189,1161,853,2005,1749,1161,853,1366,1139,1366,1139,1472,1251,2110,1914,1965,1732,1347,1098,2074,1957,2115,1894,1593,1200,1568,1435,1283,1018,1437,1301]],\n [1306, [1593,1251,1933,1593]],\n [1425, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,784,0,1153,0,0,682,0,0,862,0]],\n [1488, [1397,1311,981,1192,1384,618,748,1434,1409,618,1180,1133,1171,1475,1487,618,883,1430,1266,1382,1335,1128,1247,1339,1180,1649,1470]],\n [1520, [1237,1237,1237,831,1278]],\n [7424, [1205,1589,1821,1259,1139,1177,1177,1025,1018,569,1039,1142,926,1515,1259,1251,1139,1265,1265,1265,1933,1170,1251,1251,1257,1195,1195,1003,1192,1251,1572,1248,1139,1593,1024,991,1010,1260,853,1139,1237,1257,1543,1301,995,1425,930,930,931,853,853,1027,892,370,734,944,798,1058,887,888,1062,890,859,940,887,891,1300,773,773,801,1206,801,801,770,770,719,719,800,289,714,1156,754,840,778,841,841,800,444,754,834,1156,745,844,795,745,835,986,776,289,516,754,745,795,745,834,986,776,1888,1251,1251,682,1821,1251,1251,797,797,1139,682,1024,1251,752,1244,1787,569,569,1251,1192,1272,1251,1251,682,1573,1139,569,1821,1251,1251,797,1139,954,1139,1139,1024,1139,1251,1251,1139,1018,1018,1342,569,1139,682,1251,1078,801,778,778,840,719,496,496,800,753,372,289,289,372,630,398,336,585,1156,1156,863,863,762,840,1027,770,569,444,832,862,746,746,745,740,740,958,778,744,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1479,1139,1479,1251,1479,1251,1479,1251,1479,1139,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1593,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,569,569,569,569,1479,1139,1479,1139,1479,1139,1251,569,1251,569,1251,569,1251,569,1706,1821,1706,1821,1706,1821,1479,1251,1479,1251,1479,1251,1479,1251,1593,1251,1593,1251,1593,1251,1593,1251,1366,1251,1366,1251,1479,797,1479,797,1479,797,1479,797,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1251,682,1251,682,1251,682,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1366,1139,1366,1139,1933,1593,1933,1593,1933,1593,1933,1593,1933,1593,1366,1139,1366,1139,1366,1139,1251,1024,1251,1024,1251,1024,1251,682,1593,1139,1139,569]],\n [7838, [1465]],\n [7840, [1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,569,569,569,569,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1747,1456,1747,1456,1747,1456,1747,1456,1747,1456,1479,1251,1479,1251,1699,1483,1699,1483,1699,1483,1699,1483,1699,1483,1366,1139,1366,1139,1366,1139,1366,1139]],\n [7936, [1259,1259,1259,1259,1259,1259,1259,1259,1479,1479,1779,1779,1779,1779,1779,1779,972,972,972,972,972,972]],\n [7960, [1566,1566,1966,1966,1966,1966]],\n [7968, [1251,1251,1251,1251,1251,1251,1251,1251,1679,1679,2079,2079,2079,2079,2079,2079,569,569,569,569,569,569,569,569,769,769,1169,1169,1169,1169,1169,1169,1251,1251,1251,1251,1251,1251]],\n [8008, [1693,1693,2133,2133,1993,1993]],\n [8016, [1192,1192,1192,1192,1192,1192,1192,1192]],\n [8025, [1666]],\n [8027, [2046]],\n [8029, [2146]],\n [8031, [1966,1730,1730,1730,1730,1730,1730,1730,1730,1742,1742,2182,2182,2042,2042,2042,2042,1259,1259,972,972,1251,1251,569,569,1251,1251,1192,1192,1730,1730]],\n [8064, [1259,1259,1259,1259,1259,1259,1259,1259,1479,1479,1779,1779,1779,1779,1779,1779,1251,1251,1251,1251,1251,1251,1251,1251,1679,1679,2079,2079,2079,2079,2079,2079,1730,1730,1730,1730,1730,1730,1730,1730,1742,1742,2182,2182,2042,2042,2042,2042,1259,1259,1259,1259,1259]],\n [8118, [1259,1259,1479,1479,1479,1479,1479,682,682,682,682,682,1251,1251,1251]],\n [8134, [1251,1251,1766,1766,1879,1879,1479,682,682,682,569,569,569,569]],\n [8150, [569,569,569,569,969,969]],\n [8157, [682,682,682,1192,1192,1192,1192,1267,1267,1192,1192,1366,1366,1766,1866,1566,952,952,682]],\n [8178, [1730,1730,1730]],\n [8182, [1730,1730,1893,1693,1942,1742,1642,682,682]],\n [8192, [1024,2048,1024,2048,683,512,341,1139,569,410,171,0,0,0,0,0,682]],\n [8210, [1139,1139,2048,2048,1019,1131,569,569,569,569,1024,1024,1024,1024,1139,1139,717]],\n [8230, [2048]],\n [8234, [0,0,0,0,0,410,2048]],\n [8242, [491,981,981]],\n [8249, [682,682]],\n [8252, [1237]],\n [8254, [682]],\n [8260, [342]],\n [8286, [682]],\n [8298, [0,0,0,0,0,0]],\n [8308, [1013,962,943,845,968,972]],\n [8319, [811,923,847,910,947,976,939,930,819,959,922]],\n [8336, [773,770,840,750,770]],\n [8352, [1139,1479,1479,1139,1139,1821,1479,2240,2509,1933,1810,1051,1139,1479,1251,2224,1139,1366,1593,1479,1366,1479]],\n [8383, [1669]],\n [8432, [0]],\n [8453, [1813]],\n [8467, [1001]],\n [8470, [2283,1509]],\n [8482, [2048]],\n [8486, [1573]],\n [8494, [1229]],\n [8525, [2048,1025]],\n [8531, [1708,1708]],\n [8539, [1708,1708,1708,1708]],\n [8580, [1139]],\n [8592, [2048,1024,2048,1024,2048,1024]],\n [8616, [1024]],\n [8660, [2048]],\n [8706, [1012]],\n [8710, [1253]],\n [8719, [1686]],\n [8721, [1460,1196]],\n [8725, [342]],\n [8729, [569,1124]],\n [8734, [1460,2005]],\n [8745, [1479]],\n [8747, [561]],\n [8776, [1124]],\n [8800, [1124,1195,2048]],\n [8804, [1124,1124]],\n [8962, [1237]],\n [8976, [1196]],\n [8992, [1237,1237]],\n [9472, [1451]],\n [9474, [1280]],\n [9484, [1451]],\n [9488, [1451]],\n [9492, [1451]],\n [9496, [1451]],\n [9500, [1451]],\n [9508, [1451]],\n [9516, [1451]],\n [9524, [1451]],\n [9532, [1451]],\n [9552, [1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451]],\n [9600, [1451]],\n [9604, [1451]],\n [9608, [1451]],\n [9612, [1451]],\n [9616, [1451,1451,1451,1493]],\n [9632, [1237,1237]],\n [9642, [726,726,2048]],\n [9650, [2027]],\n [9658, [2027]],\n [9660, [2027]],\n [9668, [2027]],\n [9674, [1012,1237,1217]],\n [9679, [1237,1237,1237,1237,1237,1237,1237,1237,1237,1237,1237]],\n [9702, [726]],\n [9786, [2091,2155,1877]],\n [9791, [1536,1536,1536,1536,1536,1536,1536,1536,1536]],\n [9824, [1088]],\n [9827, [1344]],\n [9829, [1216,1045]],\n [9833, [2048,1024,1536,2048]],\n [9839, [1024]],\n [11360, [1251,569,1251,1366,1479,1139,682,1479,1251,1479,1139,1251,1024,1563]],\n [11377, [1241,2139,1758,1139,1108,892,1465]],\n [11799, [682]],\n [42775, [0,0,0,0,1024,1024,682,682,682,0,0]],\n [42888, [682,682,796,487,487]],\n [64257, [1251,1251]],\n [64285, [618,0,1237,1266,1397,1192,1384,1133,1171,1475,1180,1470,1237,1649,1649,1649,1649,1397,1397,1397,1311,981,1192,1384,618,748]],\n [64312, [1409,618,1180,1133,1171]],\n [64318, [1487]],\n [64320, [883,1430]],\n [64323, [1382,1335]],\n [64326, [1247,1339,1180,1649,1470,618,1311,1133,1335,1368]],\n [65056, [0,0,0,0]],\n [65532, [2048]]\n ]\n}\n", Et = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Arial\",\n \"weight\": 400,\n \"italic\": false,\n \"source\": { \"family\": \"Liberation Sans\", \"version\": \"Version 2.1.5\", \"license\": \"OFL-1.1\", \"notice\": \"Licensed under the SIL Open Font License, Version 1.1\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1854,\n \"winDescent\": 434,\n \"underline\": [-67, 150],\n \"strikeout\": [530, 102],\n \"advances\": [\n [32, [569,569,727,1139,1139,1821,1366,391,682,682,797,1196,569,682,569,569,1139,1139,1139,1139,1139,1139,1139,1139,1139,1139,569,569,1196,1196,1196,1139,2079,1366,1366,1479,1479,1366,1251,1593,1479,569,1024,1366,1139,1706,1479,1593,1366,1593,1479,1366,1251,1479,1366,1933,1366,1366,1251,569,569,569,961,1139,682,1139,1139,1024,1139,1139,569,1139,1139,455,455,1024,455,1706,1139,1139,1139,1139,682,1024,569,1139,1024,1479,1024,1024,1024,684,532,684,1196]],\n [160, [569,682,1139,1139,1139,1139,532,1139,682,1509,758,1139,1196,682,1509,1131,819,1124,682,682,682,1180,1100,682,682,682,748,1139,1708,1708,1708,1251,1366,1366,1366,1366,1366,1366,2048,1479,1366,1366,1366,1366,569,569,569,569,1479,1479,1593,1593,1593,1593,1593,1196,1593,1479,1479,1479,1479,1366,1366,1251,1139,1139,1139,1139,1139,1139,1821,1024,1139,1139,1139,1139,569,569,569,569,1139,1139,1139,1139,1139,1139,1139,1124,1251,1139,1139,1139,1139,1024,1139,1024,1366,1139,1366,1139,1366,1139,1479,1024,1479,1024,1479,1024,1479,1024,1479,1259,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1593,1139,1593,1139,1593,1139,1593,1139,1479,1139,1479,1139,569,569,569,569,569,569,569,455,569,569,1505,909,1024,455,1366,1024,1024,1139,455,1139,455,1139,597,1139,684,1139,455,1479,1139,1479,1139,1479,1139,1237,1481,1139,1593,1139,1593,1139,1593,1139,2048,1933,1479,682,1479,682,1479,682,1366,1024,1366,1024,1366,1024,1366,1024,1251,569,1251,768,1251,569,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1933,1479,1366,1024,1366,1251,1024,1251,1024,1251,1024,455,1139,1553,1344,1139,1344,1139,1479,1479,1024,1479,1658,1344,1139,1140,1366,1541,1237,1251,1139,1593,1278,1804,455,569,1366,1024,455,1024,1824,1479,1139,1593,1756,1343,1778,1367,1545,1139,1366,1366,1024,1266,779,569,1251,569,1251,1749,1371,1531,1479,1582,1024,1251,1024,1251,1251,1116,1116,1139,1139,939,997,1139,532,846,1196,569,2730,2503,2148,2175,1706,924,2503,1934,1579,1366,1139,569,455,1593,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1139,1366,1139,1366,1139,2048,1821,1593,1139,1593,1139,1366,1024,1593,1139,1593,1139,1251,1116,455,2730,2503,2148,1593,1139,2118,1266,1479,1139,1366,1139,2048,1821,1593,1251,1366,1139,1366,1139,1366,1139,1366,1139,569,569,569,569,1593,1139,1593,1139,1479,682,1479,682,1479,1139,1479,1139,1366,1024,1251,569,1116,894,1479,1139,1446,1396,1238,1158,1251,1024,1366,1139,1366,1139,1593,1139,1593,1139,1593,1139,1593,1139,1366,1024,715,1402,752,455,1816,1816,1366,1479,1024,1139,1251,1024,1024,1189,928,1366,1479,1368,1366,1139,1024,455,1510,1139,1479,682,1366,1024,1139,1139,1139,1139,1024,1024,1139,1139,1139,1139,1513,939,939,1293,1039,569,1139,1139,1144,1026,1263,1139,1139,1139,455,455,729,670,622,455,1171,1706,1706,1706,1139,1139,1132,1139,1619,1599,1126,682,682,682,682,682,682,682,1109,1109,1024,455,532,455,715,569,569,1139,1164,1120,1024,1479,1024,1064,1024,1108,1116,1116,1024,1024,1024,1024,1593,1088,1039,1144,1131,814,1024,827,1139,1024,1024,1975,1856,2059,1459,879,1472,1564,1354,1295,994,1080,1407,1407,785,785,326,491,491,491,746,985,657,391,727,455,455,455,682,682,714,714,1196,1196,1196,1196,682,682,682,682,682,682,682,682,682,682,569,569,682,682,682,682,682,682,682,682,682,682,682,682,682,682,660,322,696,672,714,784,784,784,784,784,682,682,682,682,682,682,682,682,682,682,682,682,682,682,569,682,682,682,682,814,814,682,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [682,682]],\n [890, [682,1024,1024,1024,569]],\n [900, [682,682,1367,569,1606,1716,786]],\n [908, [1586]],\n [910, [1752,1541,455,1366,1366,1128,1368,1366,1251,1479,1593,569,1366,1368,1706,1479,1331,1593,1479,1366]],\n [931, [1266,1251,1366,1634,1366,1711,1531,569,1366,1184,913,1139,455,1120,1184,1178,1024,1140,913,903,1139,1139,455,1024,1024,1180,1024,917,1139,1413,1165,987,1264,809,1120,1328,1075,1460,1599,455,1120,1139,1120,1599]],\n [976, [1178,1120,1582,1962,1582,1147,1599,1231,1593,1139,1479,1024,1251,827,1279,1084,1549,1181,1824,1706,1381,1139,1380,1024,1366,1366,1248,1221,1509,1134,950,839,1231,1173,1024,455,1593,905,905,1366,1139,1479,1706,1408,1165,1479,1479,1479,1366,1367,1771,1109,1472,1366,569,569,1024,2165,2069,1749,1193,1472,1301,1472,1366,1344,1366,1109,1387,1366,1891,1237,1472,1472,1193,1344,1706,1479,1593,1472,1366,1479,1251,1301,1557,1366,1515,1365,1877,1920,1621,1813,1344,1472,2069,1479,1139,1173,1088,747,1195,1139,1370,939,1144,1144,896,1195,1408,1131,1139,1109,1139,1024,938,1024,1685,1024,1173,1067,1643,1685,1280,1472,1067,1045,1536,1109,1139,1139,1139,747,1045,1024,455,569,455,1856,1664,1139,896,1144,1024,1131,2740,1278,1593,1255,1945,1461,1368,1024,1838,1424,1697,1403,2157,1776,1237,939,1631,1410,1593,1139,1645,1292,1645,1292,2200,1836,1706,1254,2439,1744,2740,1278,1479,1024,1031,0,0,0,0,0,0,0,1472,1144,1344,1067,1366,1139,1001,842,1109,747,1373,1124,1891,1370,1237,939,1193,896,1193,896,1193,896,1519,1097,1479,1131,1801,1327,2328,1782,1542,1067,1479,1024,1251,938,1139,1024,1139,1024,1366,1024,1895,1415,1365,1067,1365,1067,1365,1139,1764,1364,1764,1364,569,1891,1370,1367,1128,1344,1195,1479,1131,1479,1131,1365,1067,1706,1408,455,1366,1139,1366,1139,2048,1821,1366,1139,1541,1139,1541,1139,1891,1370,1237,939,1237,1116,1472,1144,1472,1144,1593,1139,1593,1139,1593,1139,1472,1045,1301,1024,1301,1024,1301,1024,1365,1067,1109,747,1813,1472,1109,747,1366,1024,1366,1024,1344,1139,1983,1795,1958,1670,1357,1043,1987,1863,2118,1799,1593,1144,1529,1363,1237,939,1344,1195]],\n [1306, [1593,1139,1933,1479]],\n [1425, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,784,0,1153,0,0,569,0,0,776,0]],\n [1488, [1286,1225,866,1135,1298,532,662,1348,1337,532,1094,1075,1085,1389,1407,532,797,1343,1192,1276,1249,1032,1116,1208,1094,1495,1415]],\n [1520, [1042,1042,1042,788,1235]],\n [7424, [1016,1531,1821,1088,1024,1129,1129,1003,939,455,865,1024,822,1408,1144,1139,1024,1246,1246,1246,1933,936,1139,1139,1067,1109,1109,938,1120,1222,1502,1222,1024,1479,1024,939,875,1243,747,1024,1109,1067,1460,1195,928,1359,849,849,920,840,840,1016,878,342,644,870,720,1045,881,879,1048,783,857,924,886,879,1275,762,762,772,1228,773,773,761,761,652,652,772,322,694,1173,783,773,725,773,773,774,450,783,834,1173,658,800,789,658,774,901,703,322,491,783,658,789,658,777,901,703,1860,1139,1139,569,1706,1139,1139,682,682,1024,569,1024,1139,779,1140,1609,455,455,1139,1120,1164,1139,1139,569,1460,1024,455,1706,1139,1139,682,1024,792,1024,1024,1024,1139,1139,1139,1139,939,939,1332,455,1024,455,1139,1116,772,725,713,764,652,469,469,772,785,322,322,322,322,554,322,322,563,1171,1171,783,783,782,773,768,696,322,450,783,794,774,724,658,734,734,734,756,746,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1366,1139,1366,1139,1366,1139,1366,1139,1479,1024,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,569,1593,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,569,455,569,569,1366,1024,1366,1024,1366,1024,1139,455,1139,455,1139,455,1139,455,1706,1706,1706,1706,1706,1706,1479,1139,1479,1139,1479,1139,1479,1139,1593,1139,1593,1139,1593,1139,1593,1139,1366,1139,1366,1139,1479,682,1479,682,1479,682,1479,682,1366,1024,1366,1024,1366,1024,1366,1024,1366,1024,1251,569,1251,569,1251,569,1251,569,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1024,1366,1024,1933,1479,1933,1479,1933,1479,1933,1479,1933,1479,1366,1024,1366,1024,1366,1024,1251,1024,1251,1024,1251,1024,1139,569,1479,1024,1139,455]],\n [7838, [1439]],\n [7840, [1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,569,455,569,455,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1756,1343,1756,1343,1756,1343,1756,1343,1756,1343,1479,1139,1479,1139,1749,1371,1749,1371,1749,1371,1749,1371,1749,1371,1366,1024,1366,1024,1366,1024,1366,1024]],\n [7936, [1184,1184,1184,1184,1184,1184,1184,1184,1366,1366,1666,1666,1666,1666,1666,1666,913,913,913,913,913,913]],\n [7960, [1566,1566,1900,1900,1900,1900]],\n [7968, [1139,1139,1139,1139,1139,1139,1139,1139,1679,1679,2079,2079,2079,2079,2079,2079,455,455,455,455,455,455,455,455,769,769,1169,1169,1169,1169,1169,1169,1139,1139,1139,1139,1139,1139]],\n [8008, [1693,1693,2093,2093,1993,1993]],\n [8016, [1120,1120,1120,1120,1120,1120,1120,1120]],\n [8025, [1666]],\n [8027, [1966]],\n [8029, [2066]],\n [8031, [1966,1599,1599,1599,1599,1599,1599,1599,1599,1631,1631,2031,2031,1931,1931,1931,1931,1184,1184,913,913,1139,1139,455,455,1139,1139,1120,1120,1599,1599]],\n [8064, [1184,1184,1184,1184,1184,1184,1184,1184,1366,1366,1666,1666,1666,1666,1666,1666,1139,1139,1139,1139,1139,1139,1139,1139,1679,1679,2079,2079,2079,2079,2079,2079,1599,1599,1599,1599,1599,1599,1599,1599,1631,1631,2031,2031,1931,1931,1931,1931,1184,1184,1184,1184,1184]],\n [8118, [1184,1184,1366,1366,1366,1366,1366,682,682,682,682,682,1139,1139,1139]],\n [8134, [1139,1139,1666,1666,1779,1779,1479,682,682,682,455,455,455,455]],\n [8150, [455,455,569,569,869,869]],\n [8157, [682,682,682,1120,1120,1120,1120,1165,1165,1120,1120,1366,1366,1766,1816,1566,682,682,682]],\n [8178, [1599,1599,1599]],\n [8182, [1599,1599,1893,1693,1831,1631,1531,682,682]],\n [8192, [1024,2048,1024,2048,683,512,341,1139,569,410,171,0,0,0,0,0,682]],\n [8210, [1139,1139,2048,2048,846,1131,455,455,455,455,682,682,682,682,1139,1139,717]],\n [8230, [2048]],\n [8234, [0,0,0,0,0,410,2048]],\n [8242, [384,725,725]],\n [8249, [682,682]],\n [8252, [1024]],\n [8254, [682]],\n [8260, [342]],\n [8286, [569]],\n [8298, [0,0,0,0,0,0]],\n [8308, [880,849,843,741,864,877]],\n [8319, [747,850,691,795,834,836,825,826,704,849,812]],\n [8336, [762,761,773,672,761]],\n [8352, [1139,1479,1479,1139,1139,1706,1479,2240,2384,1933,1739,1051,1139,1366,1251,2048,1067,1366,1593,1366,1139,1479]],\n [8383, [1516]],\n [8432, [0]],\n [8453, [1813]],\n [8467, [662]],\n [8470, [2197,1509]],\n [8482, [2048]],\n [8486, [1573]],\n [8494, [1229]],\n [8525, [1931,1003]],\n [8531, [1708,1708]],\n [8539, [1708,1708,1708,1708]],\n [8580, [1024]],\n [8592, [2048,1024,2048,1024,2048,1024]],\n [8616, [1024]],\n [8660, [2048]],\n [8706, [1012]],\n [8710, [1253]],\n [8719, [1686]],\n [8721, [1460,1196]],\n [8725, [342]],\n [8729, [569,1124]],\n [8734, [1460,2005]],\n [8745, [1472]],\n [8747, [561]],\n [8776, [1124]],\n [8800, [1124,1195,2048]],\n [8804, [1124,1124]],\n [8962, [1237]],\n [8976, [1196]],\n [8992, [1237,1237]],\n [9472, [1451]],\n [9474, [1280]],\n [9484, [1451]],\n [9488, [1451]],\n [9492, [1451]],\n [9496, [1451]],\n [9500, [1451]],\n [9508, [1451]],\n [9516, [1451]],\n [9524, [1451]],\n [9532, [1451]],\n [9552, [1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451]],\n [9600, [1451]],\n [9604, [1451]],\n [9608, [1451]],\n [9612, [1451]],\n [9616, [1451,1451,1451,1493]],\n [9632, [1237,1237]],\n [9642, [726,726,2048]],\n [9650, [2027]],\n [9658, [2027]],\n [9660, [2027]],\n [9668, [2027]],\n [9674, [1012,1237,1217]],\n [9679, [1237,1237,1237,1237,1237,1237,1237,1237,1237,1237,1237]],\n [9702, [726]],\n [9786, [2091,2155,1877]],\n [9791, [1536,1536,1536,1536,1536,1536,1536,1536,1536]],\n [9824, [1088]],\n [9827, [1344]],\n [9829, [1216,1045]],\n [9833, [2048,1024,1536,2048]],\n [9839, [1024]],\n [11360, [1139,455,1139,1366,1479,1139,569,1479,1139,1366,1024,1251,1024,1500]],\n [11377, [1222,2124,1722,1024,1182,871,1328]],\n [11799, [682]],\n [42775, [0,0,0,0,1024,1024,569,569,569,0,0]],\n [42888, [682,569,896,391,391]],\n [64257, [1024,1024]],\n [64285, [532,0,1042,1192,1286,1135,1298,1075,1085,1389,1094,1415,1151,1495,1495,1495,1495,1286,1286,1286,1225,866,1135,1298,532,662]],\n [64312, [1337,532,1094,1075,1085]],\n [64318, [1407]],\n [64320, [797,1343]],\n [64323, [1276,1249]],\n [64326, [1116,1208,1094,1495,1415,532,1225,1075,1249,1286]],\n [65056, [0,0,0,0]],\n [65532, [2048]]\n ]\n}\n", Dt = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Calibri\",\n \"weight\": 700,\n \"italic\": false,\n \"source\": { \"family\": \"Carlito\", \"version\": \"Version 1.103\", \"license\": \"OFL-1.1\", \"notice\": \"Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name \\\"Carlito\\\". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1950,\n \"winDescent\": 550,\n \"underline\": [-103, 194],\n \"strikeout\": [512, 134],\n \"advances\": [\n [0, [0]],\n [13, [0]],\n [32, [463,667,898,1020,1038,1493,1443,478,638,638,1020,1020,528,627,547,880,1038,1038,1038,1038,1038,1038,1038,1038,1038,1038,565,565,1020,1020,1020,949,1840,1241,1148,1084,1291,999,940,1305,1292,546,678,1120,866,1790,1349,1385,1090,1405,1153,968,1014,1337,1211,1856,1128,1064,979,665,880,665,1020,1020,615,1011,1099,857,1099,1031,648,971,1099,503,523,983,503,1666,1099,1101,1099,1099,728,817,710,1099,969,1526,941,970,814,704,973,704,1020]],\n [161, [667,1020,1038,1020,1038,1020,1020,849,1709,852,1103,1020]],\n [174, [1038,799,701,1020,692,688,616,1154,1224,548,621,517,891,1103,1347,1415,1437,949,1241,1241,1241,1241,1241,1241,1588,1084,999,999,999,999,546,546,546,546,1309,1349,1385,1385,1385,1385,1385,1020,1394,1337,1337,1337,1337,1064,1090,1136,1011,1011,1011,1011,1011,1011,1587,857,1031,1031,1031,1031,503,503,503,503,1099,1099,1101,1101,1101,1101,1101,1020,1114,1099,1099,1099,1099,970,1099,970,1241,1011,1241,1011,1241,1011,1084,857,1084,857,1084,857,1084,857,1291,1222,1309,1165,999,1031,999,1031,999,1031,999,1031,999,1031,1305,971,1305,971,1305,971,1305,971,1292,1099,1347,1121,546,503,546,503,546,503,546,503,546,503,1225,1027,678,523,1120,983,983,866,503,866,503,881,627,1150,865,886,540,1349,1099,1349,1099,1349,1099,1274,1313,1099,1385,1101,1385,1101,1385,1101,1790,1726,1153,728,1153,728,1153,728,968,817,968,817,968,817,968,817,1014,710,1014,744,1014,726,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1856,1526,1064,970,1064,979,814,979,814,979,814,529,1170,1368,1138,1099,1171,1119,1075,1243,950,1309,1511,1138,1099,1091,999,1347,1009,940,1020,1395,1210,1646,614,616,1124,983,641,996,1820,1349,1099,1385,1566,1296,1642,1415,1310,1099,1153,975,826,962,913,749,1116,710,1014,1559,1326,1394,1337,1125,1052,979,814,1003,1009,981,884,1038,1038,866,805,1099,541,985,1203,667,2270,2105,1913,1577,1389,1026,2027,1872,1622,1241,1011,546,503,1385,1101,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1031,1241,1011,1241,1011,1588,1587,1321,1140,1305,971,1120,983,1385,1101,1385,1101,1003,937,523,2245,2105,1913,1305,971,1812,1254,1349,1099,1241,1011,1588,1587,1394,1114,1241,1011,1241,1011,999,1031,999,1031,546,503,546,503,1385,1101,1385,1101,1153,728,1153,728,1337,1099,1337,1099,968,817,1014,710,1003,937,1292,1099,1315,1243,1081,1055,1004,826,1241,1011,999,1031,1385,1101,1385,1101,1385,1101,1385,1101,1064,970,676,1276,719,523,1693,1695,1241,1094,866,901,1034,817,814,898,890,1174,1374,1216,1000,1019,707,608,1295,1099,1181,776,1204,1010,1011,1099,1100,1099,867,904,1099,1121,1031,1031,1316,874,874,1103,1079,597,1118,1098,1098,980,992,1099,1099,1099,619,586,503,807,824,516,1195,1666,1666,1666,1099,1099,1128,1097,1473,1447,1432,728,728,729,728,728,672,672,1002,1002,817,494,582,494,671,710,710,1201,1197,1089,969,1526,970,948,824,981,937,942,898,898,898,857,1325,1013,1079,1108,1117,676,983,828,1120,898,898,1716,1789,1883,1314,1030,1439,1634,1268,1214,1075,1007,1117,1118,763,763,388,512,502,524,692,1051,678,439]],\n [699, [528,528,528,462,462,665,665,1020,1020,1099,1099,822,822,593]],\n [715, [615,593,807,615,616,569,569,462,462,682,682,682,682,788,482,671,646,910,995,682,682,682,374,570,681,665,784,784,784,784,784,682,682,822,1178,891,682,682,682,682,671]],\n [757, [961]],\n [759, [910,565,682,682,682,682,1088,1088,770]],\n [773, [0]],\n [781, [0,0,0,0,0]],\n [787, [0,0,508]],\n [792, [0,0,0,682,0,0,0,0,0,0,0]],\n [805, [0]],\n [809, [0,0,0]],\n [815, [0]],\n [818, [0,0]],\n [822, [0]],\n [825, [0,0,0,0,0,0,0]],\n [835, [0]],\n [838, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [857, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [528,528]],\n [890, [562,867,857,867,565]],\n [900, [649,1012,1241,548,999,1292,546]],\n [908, [1385]],\n [910, [1064,1394,586,1241,1148,839,1183,999,979,1292,1385,546,1120,1216,1790,1349,1008,1385,1292,1090]],\n [931, [962,1014,1064,1641,1128,1654,1394,546,1064,1210,937,1114,586,1123,1210,1117,957,1091,937,746,1114,1116,586,983,996,1154,965,789,1101,1186,1086,833,1115,804,1123,1432,923,1511,1470,586,1123,1101,1123,1470]],\n [976, [1098,1208,1071,1071,1071,1441,1733,1252,1385,1101,1075,839,940,914,1131,967,1228,1232,1809,1666,1117,1081,1148,1067,1038,860,1190,974,1368,1105,1031,826,1239,1082,857,523,1385,916,916,1090,1119,1084,1470,1262,1086,1110,1084,1110,999,999,1302,885,1103,968,546,546,678,1834,1836,1295,1153,1335,1121,1287,1241,1138,1148,885,1378,999,1705,987,1335,1335,1153,1288,1790,1292,1385,1290,1090,1084,1014,1121,1482,1128,1347,1166,1837,1898,1309,1635,1133,1103,1871,1176,1011,1090,1013,726,1192,1031,1509,874,1140,1140,1013,1077,1461,1117,1101,1094,1099,857,798,970,1383,941,1151,1000,1563,1616,1143,1458,1013,895,1542,1020,1031,1031,1133,726,896,817,503,503,523,1590,1626,1121,1013,1140,970,1100,1938,1473,1306,1089,1599,1337,1333,1173,1832,1615,1490,1282,1960,1722,1010,870,1654,1511,1385,1097,1253,1017]],\n [1143, [1017,2250,1960,1465,1200,1938,1628,1938,1473,1060,834,1248,0,0,0,0]],\n [1160, [2018,1944,1416,1206,1163,1031,1090,1099,889,752,903,774,1135,935,1818,1598,987,874,1268,1099,1203,1083,1180,1047,1323,1165,1378,1172,1490,1269,1880,1524,1351,1155,1084,857,1014,797,1064,975,1064,975,1239,1026,1541,1254,1227,1086,1166,1030,1166,1030,1597,1285,1597,1285,546,1705,1509,1196,1040,1368,1143,1292,1116,1373,1182,1166,1030,1871,1505,546,1241,1011,1241,1011,1588,1587,999,1031,1347,1031,1347,1031,1705,1509,987,874,1003,937,1335,1140,1335,1140,1385,1101,1385,1101,1385,1101,1103,895,1121,970,1121,970,1121,970,1166,1000,874,726,1635,1458,903,774,1223,1022,1128,941,1133,1099,1673,1595,1536,1395,1078,970,1808,1584,1812,1623,1318,1117,1299,1157,1009,874,1348,1134]],\n [3647, [1038]],\n [7424, [1063,1399,1587,1061,955,1122,1122,864]],\n [7433, [503,621,994,762,1461,1140,1192,955,1162,1161,1320,1726,953,1101,1101,987,1014,1014,853,1158,1135,1507,1175,1033,1595,878,860,817,1012,780,1003,1141,987,1444,1098,787,1047,778,807,875,695,695,892,871,432,517,756,615,1178,914,909,929,761,756,781,688,888,1185,703,684,757,1068,757,757,711,696,635,631,668,378,704,1132,761,757,580,742,742,757,506,763]],\n [7514, [1132,677,679,754,638,732,977,706,378,512,763,677,754,638,749,977,706,1691,1247,1242,813,1907,1362,1212,870,829,1004,813,880,971,813,994,1711,620,669,1140,1250,1236,1099,1198,680,1461,1131,583,1751,1184,1099,728,941,876,979,1070,850,1208,1234,1130,1041,904,874,1041,630,867,494,1224,907,741,580,622,736,631,464,449,668,763,503,434,378,504,557,444,435,584,1132,1132,812,812,802,757,951,570,522,531,855,816,747,740,705,570,670,714,674,790,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1241,1011,1148,1099,1148,1099,1148,1099,1084,857,1291,1099,1291,1099,1291,1099,1291,1099,1291,1099,999,1031,999,1031,999,1031,999,1031,999,1031,940,648,1305,971,1292,1099,1292,1099,1292,1099,1292,1099,1292,1099,546,503,546,503,1120,983,1120,983,1120,983,866,503,866,503,866,503,866,503,1790,1666,1790,1666,1790,1666,1349,1099,1349,1099,1349,1099,1349,1099,1385,1101,1385,1101,1385,1101,1385,1101,1090,1099,1090,1099,1153,728,1153,728,1153,728,1153,728,968,817,968,817,968,817,968,817,968,817,1014,710,1014,710,1014,710,1014,710,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1211,969,1211,969,1856,1526,1856,1526,1856,1526,1856,1526,1856,1526,1128,941,1128,941,1064,970,979,814,979,814,979,814,1099,710,1526,970,1011,529]],\n [7838, [1173]],\n [7840, [1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,546,503,546,503,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1428,1296,1428,1296,1428,1296,1428,1296,1428,1296,1337,1099,1337,1099,1559,1326,1559,1326,1559,1326,1559,1326,1559,1326,1064,970,1064,970,1064,970,1064,970]],\n [7936, [1210,1210,1210,1210,1210,1210,1210,1210,1241,1241,1241,1241,1241,1241,1241,1241,937,937,937,937,937,937]],\n [7960, [999,999,1258,1258,1258,1258]],\n [7968, [1114,1114,1114,1114,1114,1114,1114,1114,1292,1292,1551,1551,1551,1551,1479,1479,586,586,586,586,586,586,586,586,546,546,805,805,805,805,733,546,1101,1101,1101,1101,1101,1101]],\n [8008, [1385,1385,1590,1590,1590,1590]],\n [8016, [1123,1123,1123,1123,1123,1123,1123,1123]],\n [8025, [1064]],\n [8027, [1425]],\n [8029, [1425]],\n [8031, [1425,1470,1470,1470,1470,1470,1470,1470,1470,1394,1394,1598,1598,1598,1598,1523,1530,1210,1210,937,937,1114,1114,586,586,1101,1101,1123,1123,1470,1470]],\n [8064, [1210,1210,1210,1210,1210,1210,1210,1210,1241,1241,1241,1241,1241,1241,1241,1241,1114,1114,1114,1114,1114,1114,1114,1114,1292,1292,1551,1551,1551,1551,1479,1479,1470,1470,1470,1470,1470,1470,1470,1470,1394,1394,1598,1598,1598,1598,1530,1530,1210,1210,1210,1210,1210]],\n [8118, [1210,1210,1241,1241,1241,1241,1241,473]],\n [8127, [473,922,804,1114,1114,1114]],\n [8134, [1114,1114,999,999,1292,1292,1292,809,809,804,586,586,586,586]],\n [8150, [586,586,546,546,546,546]],\n [8157, [809,809,804,1123,1123,1123,1123,1086,1086,1123,1123,1064,1064,1064,1064,1090,1012,1012,649]],\n [8178, [1470,1470,1470]],\n [8182, [1470,1470,1385,1385,1394,1394,1394,649,473]],\n [8192, [1024,2048,1024,2048,687,512,341,1038,444,409,256,0,0,0,0,0]],\n [8210, [1038,1020,1854,1854,985,1022,528,528,528,528,891,891,891,891,1020,1020,1020]],\n [8230, [1457]],\n [8239, [463,2174]],\n [8243, [835,1221]],\n [8249, [705,705]],\n [8252, [1202,1034,1020]],\n [8260, [728]],\n [8286, [601,455]],\n [8304, [815,378]],\n [8308, [749,690,740,669,749,740,727,720,711,455,455,761,815,517,692,688,749,690,740,669,749,740,727,720,711,455,455,652,703,696,757,681,711]],\n [8352, [1323,1114,1084,950,1038,1666,1411,1884,1563,1945,1565,1165,1038,1148,1014,2286,1149,1211,1249,1274,1063,1084]],\n [8376, [1038,1038]],\n [8413, [2036]],\n [8453, [1589]],\n [8467, [1081]],\n [8470, [2142,1709]],\n [8480, [1497]],\n [8482, [1475]],\n [8486, [1394]],\n [8494, [1513]],\n [8498, [940]],\n [8525, [1569,750]],\n [8531, [1428,1530,1428,1530,1515,1543,1370,1457,1426,1512,1512,1392,812]],\n [8579, [1084,867]],\n [8592, [1854,1854,1854,1854,2683,1574,1719,1719,1719,1719]],\n [8616, [967]],\n [8706, [1100]],\n [8710, [1183]],\n [8719, [1602]],\n [8721, [1127,1020]],\n [8725, [780]],\n [8730, [1020]],\n [8734, [1716,1400]],\n [8745, [1437]],\n [8747, [769]],\n [8776, [1020]],\n [8800, [1020,1020]],\n [8804, [1020,1020]],\n [8962, [1793]],\n [8976, [1020]],\n [8992, [1106,1106]],\n [9312, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9450, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9471, [2720,1024]],\n [9474, [1024]],\n [9484, [1024]],\n [9488, [1024]],\n [9492, [1024]],\n [9496, [1024]],\n [9633, [1237]],\n [9642, [725,725]],\n [9674, [1093,1126,1217]],\n [9679, [1237]],\n [9702, [725]],\n [9728, [1506]],\n [9788, [1506]],\n [9833, [0]],\n [10102, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [11360, [912,656,996,1123,1153,1011,761,1378,1160,1228,1069,1013,829]],\n [11380, [1012,1001,846,1433]],\n [11799, [656]],\n [42775, [807,807,804,682]],\n [42784, [1810,1810]],\n [63743, [1522]],\n [64256, [1230,1135,1135,1718,1718]],\n [65056, [0,0,0,0]],\n [65279, [0]]\n ]\n}\n", Ot = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Calibri\",\n \"weight\": 400,\n \"italic\": false,\n \"source\": { \"family\": \"Carlito\", \"version\": \"Version 1.103\", \"license\": \"OFL-1.1\", \"notice\": \"Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name \\\"Carlito\\\". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1950,\n \"winDescent\": 550,\n \"underline\": [-103, 194],\n \"strikeout\": [512, 134],\n \"advances\": [\n [0, [0]],\n [13, [0]],\n [32, [463,667,821,1020,1038,1464,1397,452,621,621,1020,1020,511,627,517,791,1038,1038,1038,1038,1038,1038,1038,1038,1038,1038,548,548,1020,1020,1020,949,1831,1185,1114,1092,1260,1000,941,1292,1276,516,653,1064,861,1751,1322,1356,1058,1378,1112,941,998,1314,1162,1822,1063,998,959,628,791,628,1020,1020,596,981,1076,866,1076,1019,625,964,1076,470,490,931,470,1636,1076,1080,1076,1076,714,801,686,1076,925,1464,887,927,809,644,943,644,1020]],\n [161, [667,1020,1038,1020,1038,1020,1020,804,1709,824,1049,1020]],\n [174, [1038,807,694,1020,688,685,598,1126,1200,517,629,504,865,1049,1303,1375,1383,949,1185,1185,1185,1185,1185,1185,1563,1092,1000,1000,1000,1000,516,516,516,516,1279,1322,1356,1356,1356,1356,1356,1020,1359,1314,1314,1314,1314,998,1058,1080,981,981,981,981,981,981,1583,866,1019,1019,1019,1019,470,470,470,470,1076,1076,1080,1080,1080,1080,1080,1020,1084,1076,1076,1076,1076,927,1076,927,1185,981,1185,981,1185,981,1092,866,1092,866,1092,866,1092,866,1260,1164,1279,1130,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1292,964,1292,964,1292,964,1292,964,1276,1076,1344,1091,516,470,516,470,516,470,516,470,516,470,1170,960,653,490,1064,931,931,861,470,861,470,866,540,1118,765,880,507,1322,1076,1322,1076,1322,1076,1186,1287,1076,1356,1080,1356,1080,1356,1080,1775,1740,1112,714,1112,714,1112,714,941,801,941,801,941,801,941,801,998,686,998,708,998,700,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1822,1464,998,927,998,959,809,959,809,959,809,497,1130,1260,1101,1076,1088,1076,1122,1181,947,1279,1406,1101,1076,1072,1000,1317,970,941,1020,1294,1162,1603,592,550,1064,931,577,948,1801,1322,1100,1356,1428,1184,1583,1342,1252,1076,1112,941,801,939,882,736,1087,686,998,1478,1234,1360,1314,1090,1020,959,809,970,970,970,870,1038,1038,872,801,1076,499,809,1175,667,2219,2069,1885,1539,1351,960,1975,1812,1566,1185,981,516,470,1356,1080,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1019,1185,981,1185,981,1563,1583,1292,1100,1292,964,1064,931,1356,1080,1356,1080,970,970,490,2197,2069,1885,1292,964,1832,1236,1322,1076,1185,981,1563,1583,1359,1084,1185,981,1185,981,1000,1019,1000,1019,516,470,516,470,1356,1080,1356,1080,1112,714,1112,714,1314,1076,1314,1076,941,801,998,686,970,970,1276,1076,1316,1229,1038,1038,1007,844,1185,981,1000,1019,1356,1080,1356,1080,1356,1080,1356,1080,998,927,649,1259,686,490,1683,1682,1185,1092,866,861,998,801,809,916,916,1131,1349,1173,1000,1019,673,576,1290,1076,1129,767,1184,994,981,1076,1076,1076,866,923,1076,1076,1019,1019,1307,866,866,1077,1083,577,1076,1076,1105,925,976,1075,1076,1076,577,562,470,743,761,470,1158,1635,1635,1636,1076,1076,1107,1080,1459,1426,1334,714,714,714,714,714,654,654,920,920,801,490,578,490,650,686,686,1188,1142,1109,925,1464,927,849,809,979,956,955,916,916,916,866,1287,981,1083,1131,1095,650,931,793,1076,916,916,1647,1748,1817,1267,964,1402,1548,1198,1129,1007,1007,1076,1101,745,745,365,502,502,515,651,1007,646,452]],\n [699, [511,511,511,462,462,665,665,1020,1020,1099,1099,809,809,593]],\n [715, [596,593,807,596,598,569,569,462,462,682,682,682,682,780,462,657,639,922,961,682,682,609,350,560,638,665,784,784,784,784,784,682,682,809,1178,857,682,682,682,682,657]],\n [757, [961]],\n [759, [922,548,682,682,682,682,1088,1088,770]],\n [773, [0]],\n [781, [0,0,0,0,0]],\n [787, [0,0,511]],\n [792, [0,0,0,682,0,0,0,0,0,0,0]],\n [805, [0]],\n [809, [0,0,0]],\n [815, [0]],\n [818, [0,0]],\n [822, [0]],\n [825, [0,0,0,0,0,0,0]],\n [835, [0]],\n [838, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [857, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [511,511]],\n [890, [562,866,866,866,548]],\n [900, [649,1012,1185,517,1000,1276,516]],\n [908, [1356]],\n [910, [998,1360,562,1185,1114,851,1156,1000,959,1276,1356,516,1064,1173,1751,1322,1007,1356,1276,1058]],\n [931, [939,998,998,1555,1063,1536,1360,516,998,1162,933,1100,562,1109,1162,1088,914,1072,933,712,1100,1089,562,931,948,1126,919,770,1080,1132,1042,841,1089,793,1109,1334,873,1449,1426,562,1109,1080,1109,1426]],\n [976, [1074,1144,998,1110,998,1339,1668,1239,1356,1080,1092,841,941,888,1117,921,1186,1186,1801,1636,1116,1071,1138,1048,1092,858,1232,1035,1378,1089,969,806,1239,1042,866,490,1356,885,885,1058,1142,1092,1431,1221,1042,1092,1092,1092,1000,1000,1279,880,1121,941,516,516,653,1786,1795,1266,1112,1314,1080,1269,1185,1101,1114,880,1319,1000,1640,970,1314,1314,1112,1251,1751,1276,1356,1273,1058,1092,998,1080,1428,1063,1308,1138,1778,1822,1259,1560,1088,1122,1800,1137,981,1091,981,708,1143,1019,1411,866,1107,1107,950,1045,1385,1095,1080,1066,1076,866,793,927,1278,887,1109,960,1492,1534,1098,1364,962,907,1478,971,1019,1019,1107,708,909,801,470,470,490,1538,1576,1091,950,1107,927,1075,1900,1386,1284,1063,1601,1332,1291,1075,1703,1455,1480,1152,1855,1547,970,846,1536,1449,1356,1073,1208,978]],\n [1143, [978,2140,1861,1356,1180,1900,1602,1900,1386,1092,866,1248,0,0,0,0]],\n [1160, [2018,1944,1358,1119,1088,991,1058,1076,886,725,870,761,1089,927,1714,1472,970,866,1189,1012,1112,950,1130,1003,1292,1095,1316,1137,1457,1240,1848,1521,1323,1135,1092,866,998,793,998,925,998,925,1142,946,1490,1221,1178,1002,1138,960,1138,960,1526,1224,1526,1224,516,1640,1411,1119,975,1294,1057,1276,1095,1276,1108,1138,960,1799,1462,516,1185,981,1185,981,1563,1583,1000,1019,1317,1019,1317,1019,1640,1411,970,866,970,956,1314,1107,1314,1107,1356,1080,1356,1073,1356,1073,1122,907,1080,927,1080,927,1080,927,1138,960,851,708,1560,1364,870,761,1157,945,1063,887,1088,1076,1629,1621,1565,1435,1050,954,1807,1567,1832,1616,1301,1093,1313,1153,970,866,1289,1067]],\n [3647, [1038]],\n [7424, [982,1295,1583,1042,971,1092,1113,831]],\n [7433, [470,551,913,752,1385,1107,1140,971,1193,1192,1320,1740,872,1080,1080,936,975,975,831,1130,1125,1479,1636,990,1550,847,815,801,976,754,990,1104,936,1327,1038,757,1009,743,763,843,680,680,836,859,422,459,736,603,1133,885,885,885,690,728,667,599,788,1093,684,684,741,1067,741,741,696,696,631,631,663,355,663,1110,742,742,590,742,742,741,483,745]],\n [7514, [1110,645,586,702,582,643,869,607,355,502,745,645,702,582,741,869,607,1684,1211,1213,778,1692,1204,1214,850,794,925,783,809,964,772,964,1672,577,617,1128,1243,1220,1076,1105,625,1356,1054,496,1663,1105,1076,714,891,762,925,1005,828,1148,1240,1076,1019,866,866,1019,470,866,563,1240,886,741,590,622,690,631,449,449,663,745,402,426,355,402,485,404,379,548,1110,1110,795,796,772,742,822,560,365,484,745,696,742,742,645,567,660,678,626,742,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1185,981,1114,1076,1114,1076,1114,1076,1092,866,1260,1076,1260,1076,1260,1076,1260,1076,1260,1076,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,941,625,1292,964,1276,1076,1276,1076,1276,1076,1276,1076,1276,1076,516,470,516,470,1064,931,1064,931,1064,931,861,470,861,470,861,470,861,470,1751,1636,1751,1636,1751,1636,1322,1076,1322,1076,1322,1076,1322,1076,1356,1080,1356,1080,1356,1080,1356,1080,1058,1076,1058,1076,1112,714,1112,714,1112,714,1112,714,941,801,941,801,941,801,941,801,941,801,998,686,998,686,998,686,998,686,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1162,925,1162,925,1822,1464,1822,1464,1822,1464,1822,1464,1822,1464,1063,887,1063,887,998,927,959,809,959,809,959,809,1076,686,1464,927,981,497]],\n [7838, [1149]],\n [7840, [1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,516,470,516,470,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1428,1184,1428,1184,1428,1184,1428,1184,1428,1184,1314,1076,1314,1076,1478,1234,1478,1234,1478,1234,1478,1234,1478,1234,998,927,998,927,998,927,998,927]],\n [7936, [1162,1162,1162,1162,1162,1162,1162,1162,1185,1185,1185,1185,1185,1185,1185,1185,933,933,933,933,933,933]],\n [7960, [1000,1000,1213,1213,1213,1217]],\n [7968, [1100,1100,1100,1100,1100,1100,1100,1100,1276,1276,1489,1489,1489,1489,1369,1369,562,562,562,562,562,562,562,562,516,516,729,729,729,729,609,609,1080,1080,1080,1080,1080,1080]],\n [8008, [1356,1356,1548,1541,1525,1522]],\n [8016, [1109,1109,1109,1109,1109,1109,1109,1109]],\n [8025, [998]],\n [8027, [1299]],\n [8029, [1303]],\n [8031, [1183,1426,1426,1426,1426,1426,1426,1426,1426,1360,1360,1549,1553,1522,1522,1433,1433,1162,1162,933,933,1100,1100,562,562,1080,1080,1109,1109,1426,1426]],\n [8064, [1162,1162,1162,1162,1162,1162,1162,1162,1185,1185,1185,1185,1185,1185,1185,1185,1100,1100,1100,1100,1100,1100,1100,1100,1276,1276,1489,1489,1489,1489,1369,1369,1426,1426,1426,1426,1426,1426,1426,1426,1360,1360,1549,1553,1522,1522,1433,1433,1162,1162,1162,1162,1162]],\n [8118, [1162,1162,1185,1185,1185,1185,1185,473]],\n [8127, [473,922,804,1100,1100,1100]],\n [8134, [1100,1100,1000,1000,1276,1276,1276,809,809,804,562,562,562,562]],\n [8150, [562,562,516,516,516,516]],\n [8157, [809,809,804,1109,1109,1109,1109,1042,1042,1109,1109,998,998,998,998,1058,1012,1012,649]],\n [8178, [1426,1426,1426]],\n [8182, [1426,1426,1356,1356,1360,1360,1360,649,473]],\n [8192, [1024,2048,1024,2048,687,512,341,1104,444,409,256,0,0,0,0,0]],\n [8210, [1038,1020,1854,1854,809,1020,511,511,511,511,857,857,857,856,1020,1020,1020]],\n [8230, [1414]],\n [8239, [463,2126]],\n [8243, [820,1188]],\n [8249, [694,694]],\n [8252, [1142,990,1020]],\n [8260, [689]],\n [8286, [548,455]],\n [8304, [801,355]],\n [8308, [731,678,735,657,737,735,746,735,720,444,444,742,801,504,688,685,731,678,735,657,737,735,746,735,720,444,444,631,684,696,742,638,696]],\n [8352, [1262,1092,1092,941,1038,1636,1322,1888,1608,1822,1525,1130,1038,1064,998,2216,1082,1154,1202,1173,941,1092]],\n [8376, [1038,1038]],\n [8413, [2036]],\n [8453, [1569]],\n [8467, [1029]],\n [8470, [2099,1709]],\n [8480, [1452]],\n [8482, [1444]],\n [8486, [1360]],\n [8494, [1513]],\n [8498, [941]],\n [8525, [1569,750]],\n [8531, [1385,1481,1385,1481,1463,1485,1326,1405,1363,1442,1442,1322,787]],\n [8579, [1092,866]],\n [8592, [1854,1854,1854,1854,2638,1592,1806,1806,1806,1806]],\n [8616, [967]],\n [8706, [1091]],\n [8710, [1156]],\n [8719, [1637]],\n [8721, [1108,1020]],\n [8725, [689]],\n [8730, [1020]],\n [8734, [1747,1400]],\n [8745, [1437]],\n [8747, [749]],\n [8776, [1020]],\n [8800, [1020,1020]],\n [8804, [1020,1020]],\n [8962, [1793]],\n [8976, [1020]],\n [8992, [1106,1106]],\n [9312, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9450, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9471, [2720,1024]],\n [9474, [1024]],\n [9484, [1024]],\n [9488, [1024]],\n [9492, [1024]],\n [9496, [1024]],\n [9633, [1237]],\n [9642, [725,725]],\n [9674, [1046,1126,1217]],\n [9679, [1237]],\n [9702, [725]],\n [9728, [1500]],\n [9788, [1500]],\n [9833, [0]],\n [10102, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [11360, [861,577,962,1075,1112,981,686,1316,1123,1137,987,994,836]],\n [11380, [962,949,793,1339]],\n [11799, [627]],\n [42775, [807,807,804,682]],\n [42784, [1810,1810]],\n [63743, [1522]],\n [64256, [1195,1084,1084,1654,1654]],\n [65056, [0,0,0,0]],\n [65279, [0]]\n ]\n}\n", kt = [
639
- "Arial",
640
- "Arial Black",
641
- "Brush Script MT",
642
- "Calibri",
643
- "Comic Sans MS",
644
- "Courier New",
645
- "Garamond",
646
- "Georgia",
647
- "Impact",
648
- "Luminari",
649
- "Palatino Linotype",
650
- "Tahoma",
651
- "Times New Roman",
652
- "Trebuchet MS",
653
- "Verdana"
654
- ], At = /* @__PURE__ */ new Map([
655
- [D.GenericName.Serif, ["Tahoma"]],
656
- [D.GenericName.SanSerif, ["Calibri"]],
657
- [D.GenericName.MonoSpace, ["Courier New"]],
658
- [D.GenericName.Cursive, ["Comic Sans MS"]],
659
- [D.GenericName.Fantasy, ["Luminari"]],
660
- [D.GenericName.UISystem, ["Arial"]],
661
- [D.GenericName.UISerif, ["Tahoma"]],
662
- [D.GenericName.UISanSerif, ["Arial"]],
663
- [D.GenericName.UIMonoSpace, ["Courier New"]],
664
- [D.GenericName.UIRounded, ["Arial"]],
665
- [D.GenericName.Math, []],
666
- [D.GenericName.Emoji, []],
667
- [D.GenericName.Fangsong, []]
668
- ]), jt = /* @__PURE__ */ new Map([
669
- ["aptos", "calibri"],
670
- ["aptos narrow", "calibri"],
671
- ["aptos display", "calibri"],
672
- ["carlito", "calibri"],
673
- ["caladea", "cambria"],
674
- ["helvetica", "arial"],
675
- ["helvetica neue", "arial"],
676
- ["arial nova", "arial"],
677
- ["liberation sans", "arial"],
678
- ["arimo", "arial"],
679
- ["times", "times new roman"],
680
- ["liberation serif", "times new roman"],
681
- ["tinos", "times new roman"],
682
- ["courier", "courier new"],
683
- ["liberation mono", "courier new"],
684
- ["cousine", "courier new"],
685
- ["sans-serif", "calibri"],
686
- ["serif", "times new roman"],
687
- ["monospace", "courier new"],
688
- ["system-ui", "arial"],
689
- ["ui-system", "arial"],
690
- ["ui-sans-serif", "arial"],
691
- ["ui-rounded", "arial"],
692
- ["ui-serif", "times new roman"],
693
- ["ui-monospace", "courier new"]
694
- ]), Mt = /* @__PURE__ */ new Set([
695
- "serif",
696
- "sans-serif",
697
- "monospace",
698
- "cursive",
699
- "fantasy",
700
- "system-ui",
701
- "ui-system",
702
- "ui-serif",
703
- "ui-sans-serif",
704
- "ui-monospace",
705
- "ui-rounded",
706
- "math",
707
- "emoji",
708
- "fangsong"
709
- ]), q = (e) => e.trim().replace(/\s+/g, " ").toLowerCase(), J = (e, t, n) => `${q(e)}|${t ? "b" : ""}${n ? "i" : ""}`, Nt = eval, Pt = (e) => {
710
- try {
711
- return Nt(`document.fonts.check('12px ${e}')`);
712
- } catch {
713
- return !0;
714
- }
715
- }, Ft = class e {
716
- static {
717
- this._shared = null;
718
- }
719
- static getShared() {
720
- return e._shared ??= new e([new wt()]), e._shared;
721
- }
722
- constructor(e) {
723
- this._entries = /* @__PURE__ */ new Map(), this._resolutions = /* @__PURE__ */ new Map(), this._loading = /* @__PURE__ */ new Set(), this._builtins = /* @__PURE__ */ new Map(), this._fontList = [], this._fontsByFamily = /* @__PURE__ */ new Map(), this._bestMatches = /* @__PURE__ */ new Map(), this._builders = e, this._emitter = new y(this), this._seedBuiltins(), this.setFontList(null);
724
- }
725
- getByName(e, t) {
726
- let n = t?.bold ?? !1, r = t?.italic ?? !1, i = J(e, n, r), a = this._resolutions.get(i);
727
- if (a) return a;
728
- let o = this._resolve(e, n, r);
729
- return this._resolutions.set(i, o), o;
730
- }
731
- load(e) {
732
- let t = e.map((e) => {
733
- let t = typeof e == "string" ? { family: e } : e, n = q(t.family);
734
- return Mt.has(n) ? void 0 : this._ensure(n, t.bold ?? !1, t.italic ?? !1).done;
735
- });
736
- return Promise.all(t).then(() => {});
737
- }
738
- async whenReady() {
739
- for (; this._loading.size > 0;) await Promise.all(this._loading);
740
- }
741
- isLoading() {
742
- return this._loading.size > 0;
743
- }
744
- setAdvanceBuilders(e) {
745
- this._builders = e, this._entries.clear(), this._seedBuiltins(), this._changed();
746
- }
747
- getFontList() {
748
- return this._fontList;
749
- }
750
- setFontList(e) {
751
- let t = [];
752
- this._fontsByFamily.clear(), this._bestMatches.clear();
753
- for (let n of e ?? kt) {
754
- let e = typeof n == "string" ? new yt(n) : n, r = {
755
- fontRef: e,
756
- loaded: Pt(e.getFamily())
757
- };
758
- t.push(r), this._fontsByFamily.set(e.getFamily(), r);
759
- }
760
- this._fontList = Object.freeze(t);
761
- }
762
- findBestMatch(e, t) {
763
- let n = this._bestMatches.get(e);
764
- if (n) return n.fontRef ? n : null;
765
- let r = null;
766
- for (let n of [e, ...t?.fallbacks ?? []]) {
767
- r = this._fontsByFamily.get(n) ?? null;
768
- for (let e of r ? [] : At.get(n) ?? []) if (r = this._fontsByFamily.get(e) ?? null, r) break;
769
- if (r) break;
770
- }
771
- return this._bestMatches.set(e, r ?? {
772
- fontRef: null,
773
- loaded: !1
774
- }), r;
775
- }
776
- addListeners(e, t) {
777
- return this._emitter.addListeners(e, t);
778
- }
779
- get isIFontCollection() {
780
- return !0;
781
- }
782
- _seedBuiltins() {
783
- this._builtins = /* @__PURE__ */ new Map();
784
- for (let e of [
785
- Ot,
786
- Dt,
787
- Et,
788
- Tt
789
- ].map((e) => xt.fromJSON(JSON.parse(e)))) {
790
- let t = J(e.family, e.weight >= 700, e.italic);
791
- this._builtins.set(t, e), this._entries.set(t, {
792
- state: "loaded",
793
- table: e,
794
- kind: "table",
795
- done: Promise.resolve()
796
- });
797
- }
798
- }
799
- _resolve(e, t, n) {
800
- let r = {
801
- family: e,
802
- weight: t ? 700 : 400,
803
- italic: n
804
- }, i = q(e), a = Mt.has(i) ? void 0 : this._ensure(i, t, n);
805
- if (a?.state === "loaded") return {
806
- table: a.table,
807
- kind: a.kind,
808
- status: "loaded",
809
- requested: r
810
- };
811
- let o = a?.state === "loading", s = jt.get(i);
812
- if (s) {
813
- let e = this._ensure(s, t, n);
814
- if (e.state === "loaded") return {
815
- table: e.table,
816
- kind: "classified",
817
- status: o ? "loading" : "loaded",
818
- requested: r
819
- };
820
- o ||= e.state === "loading";
821
- }
822
- let c = s === "arial" || i === "arial" ? "arial" : "calibri";
823
- return {
824
- table: this._builtins.get(J(c, t, !1)),
825
- kind: "generic",
826
- status: o ? "loading" : a?.state === "error" ? "error" : "loaded",
827
- requested: r
828
- };
829
- }
830
- _ensure(e, t, n) {
831
- let r = J(e, t, n), i = this._entries.get(r);
832
- if (i) return i;
833
- let a = {
834
- state: "loading",
835
- done: Promise.resolve()
836
- }, o = {
837
- family: e,
838
- weight: t ? 700 : 400,
839
- italic: n
840
- }, s = this._builders, c = (async () => {
841
- try {
842
- for (let e of s) {
843
- let t = await e.build(o);
844
- if (t) return a.table = t, a.kind = e.kind, void (a.state = "loaded");
845
- }
846
- a.state = "missing";
847
- } catch {
848
- a.state = "error";
849
- }
850
- })().finally(() => {
851
- this._loading.delete(c), this._entries.get(r) === a && this._changed();
852
- });
853
- return a.done = c, this._entries.set(r, a), this._loading.add(c), a;
854
- }
855
- _changed() {
856
- this._resolutions.clear(), this._emitter.notify("onCollectionChange");
857
- }
858
- };
859
- (K = G ||= {}).getShared = function() {
860
- return Ft.getShared();
861
- }, K.ResolutionKind = {
862
- Table: "table",
863
- Exact: "exact",
864
- Classified: "classified",
865
- Generic: "generic"
866
- }, K.FontStatus = {
867
- Loading: "loading",
868
- Loaded: "loaded",
869
- Error: "error"
870
- };
871
- var It = _({
872
- DefaultFontSizes: () => Lt,
873
- findNextFontSize: () => Rt
874
- }), Lt = Object.freeze([
875
- 8,
876
- 9,
877
- 10,
878
- 11,
879
- 12,
880
- 14,
881
- 16,
882
- 18,
883
- 20,
884
- 22,
885
- 24,
886
- 26,
887
- 28,
888
- 30,
889
- 36,
890
- 48,
891
- 72
892
- ]);
893
- function Rt(e, t = !0, n = Lt) {
894
- if (!n || n.length === 0) return e;
895
- if (e === void 0) return n[0];
896
- if (t && e >= n[n.length - 1] || !t && e <= n[0]) return e;
897
- let r = a.findEqualOrGreater(n, e);
898
- return t ? (n[r] === e && (r += 1), n[r] || --r, n[r]) : (--r, n[r]);
899
- }
900
- (Ct ||= {}).SortOn = {
901
- Value: "value",
902
- FillColor: "fillColor",
903
- FontColor: "fontColor",
904
- Icon: "icon"
905
- };
906
- var zt, Bt, Vt, Ht, Ut = {
907
- TopLeft: "tl",
908
- Top: "t",
909
- TopRight: "tr",
910
- Left: "l",
911
- Center: "ctr",
912
- Right: "r",
913
- BottomLeft: "bl",
914
- Bottom: "b",
915
- BottomRight: "br"
916
- }, Y = ee.BuiltInName, Wt = {
917
- [Y.Normal]: l("style.builtin.normal"),
918
- [Y.Comma]: l("style.builtin.comma"),
919
- [Y.Currency]: l("style.builtin.currency"),
920
- [Y.Percent]: l("style.builtin.percent"),
921
- [Y.Comma0]: l("style.builtin.comma0"),
922
- [Y.Currency0]: l("style.builtin.currency0"),
923
- [Y.Hyperlink]: l("style.builtin.hyperlink"),
924
- [Y.FollowedHyperlink]: l("style.builtin.followedHyperlink"),
925
- [Y.Note]: l("style.builtin.note"),
926
- [Y.WarningText]: l("style.builtin.warningText"),
927
- [Y.Title]: l("style.builtin.title"),
928
- [Y.Input]: l("style.builtin.input"),
929
- [Y.Output]: l("style.builtin.output"),
930
- [Y.Calculation]: l("style.builtin.calculation"),
931
- [Y.CheckCell]: l("style.builtin.checkCell"),
932
- [Y.LinkedCell]: l("style.builtin.linkedCell"),
933
- [Y.Total]: l("style.builtin.total"),
934
- [Y.Good]: l("style.builtin.good"),
935
- [Y.Bad]: l("style.builtin.bad"),
936
- [Y.Neutral]: l("style.builtin.neutral"),
937
- [Y.ExplanatoryText]: l("style.builtin.explanatoryText")
938
- }, Gt = l("style.builtin.heading"), Kt = l("style.builtin.accent"), qt = l("style.builtin.accentTint"), Jt = /^Heading ([1-4])$/, Yt = /^Accent([1-6])$/, Xt = /^(20|40|60)% - Accent([1-6])$/;
939
- function Zt(e) {
940
- let t = Wt[e];
941
- if (t) return { key: t };
942
- let n = Jt.exec(e);
943
- return n ? {
944
- key: Gt,
945
- params: { n: +n[1] }
946
- } : (n = Yt.exec(e), n ? {
947
- key: Kt,
948
- params: { n: +n[1] }
949
- } : (n = Xt.exec(e), n ? {
950
- key: qt,
951
- params: {
952
- pct: +n[1],
953
- n: +n[2]
954
- }
955
- } : null));
956
- }
957
- var Qt = (e, t, n, r, i) => {
958
- let a = JSON.parse(JSON.stringify(e.definition));
959
- a.adjs ||= [];
960
- let o = "", s = 0, c = 0;
961
- t > 0 ? (c = t, s = 100 - t, o = d("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = d("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [ie.AdjustmentType.LumMod]: s }), c && a.adjs.push({ [ie.AdjustmentType.LumOff]: c });
962
- let l = new w({
963
- val: a.val,
964
- adjs: a.adjs
965
- }, n), u = l.toString();
966
- r?.set(u, l);
967
- let f = l.toRGBA().toString();
968
- return i?.set(f, l), {
969
- description: e.description + ", " + o,
970
- definition: a
971
- };
972
- };
973
- function $t(e) {
974
- let t, n = e.trim();
975
- if (!n) return;
976
- try {
977
- let e = Ue.shared().tokenize(n, !1);
978
- if (e.errors.length > 0) return;
979
- t = e.tokens;
980
- } catch {
981
- return;
982
- }
983
- let r = 0, i = 0;
984
- if (t.length === 2) {
985
- let e = t[0].tokenType?.name;
986
- e === "MinOp" ? (r = -1, i = 1) : e === "PlusOp" && (r = 1, i = 1);
987
- }
988
- if (t.length - i !== 1) return;
989
- let a = t[i], o = a.image;
990
- try {
991
- switch (a.tokenType?.name) {
992
- case "NumberToken":
993
- case "ScientificDigit":
994
- case "DigitToken": {
995
- let e = be(o).value;
996
- return r === 0 ? e : r * e;
997
- }
998
- case "StringToken": return r === 0 ? we(o).value : void 0;
999
- case "BooleanToken": return r === 0 ? Ce(o).value : void 0;
1000
- case "LiteralError":
1001
- case "RefError": return r === 0 ? Re(o).value : void 0;
1002
- default: return;
1003
- }
1004
- } catch {
1005
- return;
1006
- }
1007
- }
1008
- function en(e, t) {
1009
- let n = tn(e), r = tn(t);
1010
- return n === r ? e === t ? 0 : typeof e == "number" && typeof t == "number" ? e < t ? -1 : 1 : typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : typeof e == "boolean" ? e ? 1 : -1 : k.isError(e) && k.isError(t) ? e.getCode() - t.getCode() : 0 : n - r;
1011
- }
1012
- function tn(e) {
1013
- if (e === null) return 0;
1014
- switch (typeof e) {
1015
- case "number": return 1;
1016
- case "string": return 2;
1017
- case "boolean": return 3;
1018
- default: return k.isError(e) ? 4 : 5;
1019
- }
1020
- }
1021
- (zt ||= {}).buildPalette = function(e, t, n, r) {
1022
- let i = [];
1023
- for (let a = 0; a < e.length; a++) {
1024
- let o = [];
1025
- i.push(o);
1026
- let s = (i) => {
1027
- for (let s = 0; s < i.length; s++) o.push(Qt(e[a], i[s], t, n, r));
1028
- }, c = new w({
1029
- val: e[a].definition.val,
1030
- adjs: e[a].definition.adjs
1031
- }, t).toHSLA().lum;
1032
- s(c === 0 ? [
1033
- 50,
1034
- 35,
1035
- 25,
1036
- 15,
1037
- 5
1038
- ] : c === 100 ? [
1039
- -5,
1040
- -15,
1041
- -25,
1042
- -35,
1043
- -50
1044
- ] : c <= 20 ? [
1045
- 90,
1046
- 75,
1047
- 50,
1048
- 25,
1049
- 10
1050
- ] : c >= 80 ? [
1051
- -10,
1052
- -25,
1053
- -50,
1054
- -75,
1055
- -90
1056
- ] : [
1057
- 80,
1058
- 60,
1059
- 40,
1060
- -25,
1061
- -50
1062
- ]);
1063
- }
1064
- return i;
1065
- }, Bt ||= {}, Vt ||= {}, Ht ||= {};
1066
- var nn = class {
1067
- constructor(e) {
1068
- this._children = e;
1069
- }
1070
- getCoords() {
1071
- let e = this._children, t = null;
1072
- for (let n = 0; n < e.length; n++) {
1073
- let r = e[n].getCoords();
1074
- r && (t = t ? {
1075
- rowStart: Math.min(t.rowStart, r.rowStart),
1076
- colStart: Math.min(t.colStart, r.colStart),
1077
- rowEnd: Math.max(t.rowEnd, r.rowEnd),
1078
- colEnd: Math.max(t.colEnd, r.colEnd)
1079
- } : r);
1080
- }
1081
- return t;
1082
- }
1083
- getSize() {
1084
- let e = this._children, t = e.length, n = 0;
1085
- for (let r = 0; r < t; r++) n += e[r].getSize();
1086
- return n;
1087
- }
1088
- getCount() {
1089
- let e = this._children, t = e.length, n = 0;
1090
- for (let r = 0; r < t; r++) n += e[r].getCount();
1091
- return n;
1092
- }
1093
- getAggregates(e) {
1094
- if (e) return this._mergeAggregates(e);
1095
- let t = this._aggregates;
1096
- return t || (t = this._mergeAggregates(), this._aggregates = t), t;
1097
- }
1098
- getSnappedSum(e) {
1099
- let t = e ?? this.getAggregates().sum ?? 0, n = this._children;
1100
- for (let e = n.length - 1; e >= 0; e--) if (n[e].getAggregates().numericalCount > 0) return n[e].getSnappedSum(t);
1101
- return t;
1102
- }
1103
- getSortedNumbers() {
1104
- let e = this._sortedNumbers;
1105
- if (!e) {
1106
- let t = this._children, n = t.length, r = [];
1107
- for (let e = 0; e < n; e++) {
1108
- let n = t[e].getSortedNumbers().getValues();
1109
- n.length > 0 && r.push(n);
1110
- }
1111
- e = new Te(function(e) {
1112
- let t = e.length;
1113
- if (t === 0) return rn;
1114
- if (t === 1) return e[0];
1115
- let n = e[0];
1116
- for (let r = 1; r < t; r++) n = an(n, e[r]);
1117
- return Object.freeze(n);
1118
- }(r)), this._sortedNumbers = e;
1119
- }
1120
- return e;
1121
- }
1122
- getRanked(e) {
1123
- return Ie(this._children, e, en)[Symbol.iterator]();
1124
- }
1125
- getFrequencies(e) {
1126
- if (e) return this._mergeFrequencies(e);
1127
- let t = this._frequencies;
1128
- return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
1129
- }
1130
- _mergeFrequencies(e) {
1131
- let t = e?.keyFn ?? at, n = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, a = i.length, o = 0, s = 0, c = !1;
1132
- for (let l = 0; l < a; l++) {
1133
- let a = i[l].getFrequencies(e);
1134
- o += a.getVisitedCount(), s += a.getTotalCount(), c ||= a.isTruncated();
1135
- let u = a.getValueCounts(), d = u.next();
1136
- for (; !d.done;) {
1137
- let [e, i] = d.value, a = t(e), o = r.get(a);
1138
- o ? o.count += i : n === void 0 || r.size < n ? r.set(a, {
1139
- value: e,
1140
- count: i
1141
- }) : c = !0, d = u.next();
1142
- }
1143
- }
1144
- return ve.fromGroups(r, t, e, en, o, s, c);
1145
- }
1146
- getTypedCounts(e) {
1147
- let t = this._typedCounts;
1148
- if (!t) {
1149
- let e = {
1150
- [A.Number]: 0,
1151
- [A.String]: 0,
1152
- [A.Boolean]: 0,
1153
- [A.Error]: 0,
1154
- [A.RichData]: 0,
1155
- [A.Null]: 0
1156
- }, n = this._children, r = n.length;
1157
- for (let t = 0; t < r; t++) {
1158
- let r = n[t].getTypedCounts();
1159
- e[A.Number] += r[A.Number] ?? 0, e[A.String] += r[A.String] ?? 0, e[A.Boolean] += r[A.Boolean] ?? 0, e[A.Error] += r[A.Error] ?? 0, e[A.RichData] += r[A.RichData] ?? 0, e[A.Null] += r[A.Null] ?? 0;
1160
- }
1161
- t = Object.freeze(e), this._typedCounts = t;
1162
- }
1163
- if (e === void 0) return t;
1164
- let n = {}, r = e.length;
1165
- for (let i = 0; i < r; i++) n[e[i]] = t[e[i]] ?? 0;
1166
- return n;
1167
- }
1168
- get isIRangeStats() {
1169
- return !0;
1170
- }
1171
- _mergeAggregates(e) {
1172
- let t = this._children, n = t.length, r = {
1173
- count: 0,
1174
- min: void 0,
1175
- max: void 0,
1176
- numericalCount: 0,
1177
- sum: 0,
1178
- sumSq: 0,
1179
- typed: {
1180
- [A.Number]: 0,
1181
- [A.String]: 0,
1182
- [A.Boolean]: 0,
1183
- [A.Error]: 0,
1184
- [A.RichData]: 0,
1185
- [A.Null]: 0
1186
- }
1187
- };
1188
- for (let i = 0; i < n; i++) {
1189
- let n = t[i].getAggregates(e);
1190
- r.count += n.count;
1191
- let a = n.numericalCount;
1192
- a <= 0 || (r.numericalCount += a, r.sum += n.sum, r.sumSq += n.varP * a + n.sum * n.sum / a, (r.min === void 0 || n.min < r.min) && (r.min = n.min), (r.max === void 0 || n.max > r.max) && (r.max = n.max));
1193
- }
1194
- return it(r);
1195
- }
1196
- }, rn = Object.freeze([]);
1197
- function an(e, t) {
1198
- let n = e.length, r = t.length, i = Array(n + r), a = 0, o = 0, s = 0;
1199
- for (; a < n && o < r;) i[s++] = e[a] <= t[o] ? e[a++] : t[o++];
1200
- for (; a < n;) i[s++] = e[a++];
1201
- for (; o < r;) i[s++] = t[o++];
1202
- return i;
1203
- }
1204
- var on = class {
1205
- constructor(e, t) {
1206
- this._source = null, this.cacheId = e, this.part = t;
1207
- }
1208
- _hold(e) {
1209
- let t = this.part?.xml;
1210
- if (!t || this._source) return;
1211
- let n = Me(t, "worksheetSource", "ref"), r = Me(t, "worksheetSource", "sheet");
1212
- if (!n || !r || n.includes("#REF!")) return;
1213
- let i = e(r);
1214
- if (!i) return;
1215
- let a = {
1216
- formula: null,
1217
- wired: null,
1218
- last: null
1219
- };
1220
- this._source = a, i(`${We(r)}!${Be(n)}`, (e) => {
1221
- a.formula = e.formula;
1222
- let t = e.formula.getExpression();
1223
- a.wired ??= t, e.formula.hasRefError() || (a.last = t);
1224
- });
1225
- }
1226
- getXML() {
1227
- let e = this.part?.xml ?? null, t = this._source;
1228
- if (!e || !t?.formula) return e;
1229
- let n = t.formula.hasRefError() ? t.last : t.formula.getExpression();
1230
- if (n === null || n === t.wired) return e;
1231
- let r = Ve(n);
1232
- return r ? M(M(e, "worksheetSource", "ref", Le(r.reference)), "worksheetSource", "sheet", r.sheet) : M(e, "worksheetSource", "ref", Le(n));
1233
- }
1234
- toJSON(e) {
1235
- let t = { cacheId: this.cacheId }, n = Fe.toJSON(this.part, e);
1236
- if (n) {
1237
- let e = this.getXML();
1238
- e !== null && (n.xml = e), t.part = n;
1239
- }
1240
- return t;
1241
- }
1242
- }, sn = class {
1243
- constructor(e, t) {
1244
- this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
1245
- }
1246
- getId() {
1247
- return this._json.id;
1248
- }
1249
- getDisplayName() {
1250
- return this._json.displayName;
1251
- }
1252
- getUserId() {
1253
- return this._json.userId ?? null;
1254
- }
1255
- getProviderId() {
1256
- return this._json.providerId ?? null;
1257
- }
1258
- delete() {
1259
- this._deleted || (this._deleted = !0, this._deleteFromCollection?.(this));
1260
- }
1261
- isDeleted() {
1262
- return this._deleted;
1263
- }
1264
- toJSON() {
1265
- return { ...this._json };
1266
- }
1267
- get [Symbol.toStringTag]() {
1268
- return "[Person]";
1269
- }
1270
- toString() {
1271
- return `Person:${this.getDisplayName()}`;
1272
- }
1273
- get isIPerson() {
1274
- return !0;
1275
- }
1276
- }, cn = class extends ue {
1277
- constructor(e) {
1278
- super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
1279
- }
1280
- _getItems() {
1281
- return this._items ??= Array.from(this._byId.values());
1282
- }
1283
- getCount() {
1284
- return this._byId.size;
1285
- }
1286
- add(e) {
1287
- let t = typeof e == "string" ? { displayName: e } : e, n = t.id;
1288
- if (n) {
1289
- let e = this._byId.get(n);
1290
- if (e) return e;
1291
- }
1292
- let r = t.displayName ?? "";
1293
- if (!n) {
1294
- let e = this._byDisplayName.get(r);
1295
- if (e) return e;
1296
- }
1297
- let i = new sn({
1298
- ...t,
1299
- displayName: r,
1300
- id: n ?? a.uuidV4().toUpperCase()
1301
- }, (e) => this._remove(e));
1302
- return this._byId.set(i.getId(), i), r && !this._byDisplayName.has(r) && this._byDisplayName.set(r, i), this._items = null, this._notifyCollectionChange(), i;
1303
- }
1304
- getById(e) {
1305
- return typeof e == "string" ? this._byId.get(e) ?? null : null;
1306
- }
1307
- getByDisplayName(e) {
1308
- return typeof e == "string" ? this._byDisplayName.get(e) ?? null : null;
1309
- }
1310
- getCurrent() {
1311
- return this._current ??= this.add("Author");
1312
- }
1313
- setCurrent(e) {
1314
- if (e !== null) {
1315
- if (typeof e == "object" && e.isIPerson) {
1316
- let t = e;
1317
- this._current = this.getById(t.getId()) ?? this.add(t.toJSON());
1318
- return;
1319
- }
1320
- this._current = this.add(e);
1321
- } else this._current = null;
1322
- }
1323
- _remove(e) {
1324
- this._byId.get(e.getId()) === e && (this._byId.delete(e.getId()), this._byDisplayName.get(e.getDisplayName()) === e && this._byDisplayName.delete(e.getDisplayName()), this._current === e && (this._current = null), this._items = null, this._notifyCollectionChange());
1325
- }
1326
- toJSON() {
1327
- return this._byId.size === 0 ? null : this._getItems().map((e) => e.toJSON());
1328
- }
1329
- fromJSON(e) {
1330
- if (!e) return;
1331
- let t = e.length;
1332
- for (let n = 0; n < t; n++) {
1333
- let t = e[n];
1334
- t && typeof t.id == "string" && this.add(t);
1335
- }
1336
- }
1337
- get isIPersonCollection() {
1338
- return !0;
1339
- }
1340
- }, ln = class {
1341
- constructor(e) {
1342
- this._options = e, this._emitter = new y(this), this._initState();
1343
- }
1344
- _initState() {}
1345
- getModules() {
1346
- return this._modules;
1347
- }
1348
- _builtInNames() {
1349
- try {
1350
- let e = this._options.getBuiltInFunctions?.();
1351
- if (!e) return a.EmptyArray;
1352
- let t = [];
1353
- for (let n of e.getItems({ includeHidden: !0 })) n.isBuiltIn() && t.push(n.getName());
1354
- return t;
1355
- } catch {
1356
- return a.EmptyArray;
1357
- }
1358
- }
1359
- async createModule(e) {
1360
- let t = await (await import("./B_HB4y7AA88Z775Z.mjs").then((e) => e.n)).ScriptCompiler.compile({
1361
- builtInNames: this._builtInNames(),
1362
- minify: !0,
1363
- ...e
1364
- });
1365
- return t.module ? await j(tt.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
1366
- }
1367
- addModule(e, t, n) {
1368
- this._modules.add(e, t, n);
1369
- }
1370
- async addModuleFromJSON(e, t, n) {
1371
- let r = await j(e, t);
1372
- return this.addModule(e, r, n), r;
1373
- }
1374
- executeMacro(e, t, n) {
1375
- let r = this._modules.getItems({ name: t }), i = r.length;
1376
- for (let t = 0; t < i; t++) {
1377
- let i = r[t].getFunctions().getByName(e);
1378
- if (i) return i.execute(this._options.workbook, {
1379
- applyResult: !0,
1380
- ...n
1381
- });
1382
- }
1383
- throw Error(`No macro ${e} found.`);
1384
- }
1385
- async run(e, t) {
1386
- try {
1387
- let n = typeof e == "string" ? await this.createModule({ source: e }) : await j(tt.DEFAULT_MODULE, e), r = typeof e == "string" ? e : e?.source ?? "";
1388
- return await this._runModule(n, r, t);
1389
- } catch (e) {
1390
- return {
1391
- ok: !1,
1392
- error: e
1393
- };
1394
- }
1395
- }
1396
- async _runModule(e, t, n) {
1397
- let r = this._options?.workbook;
1398
- if (!e) return {
1399
- ok: !1,
1400
- error: Error("The script did not compile to a module.")
1401
- };
1402
- let i = e.getDiagnostics(), a = i.filter((e) => e.severity === "error");
1403
- if (a.length > 0) {
1404
- let e = Error(((e, t) => {
1405
- let n = [0];
1406
- for (let t = 0; t < e.length; t++) e[t] === "\n" && n.push(t + 1);
1407
- let r = t.map((e) => ` ${((e) => {
1408
- let t = 0, r = n.length - 1;
1409
- for (; t < r;) {
1410
- let i = t + r + 1 >> 1;
1411
- n[i] <= e ? t = i : r = i - 1;
1412
- }
1413
- return `${t + 1}:${e - n[t] + 1}`;
1414
- })(e.start)} ${e.code}: ${e.message}`), i = t.length;
1415
- return `Script has ${i} compile error${i === 1 ? "" : "s"}:\n${r.join("\n")}`;
1416
- })(t, a));
1417
- return e.diagnostics = a, {
1418
- ok: !1,
1419
- error: e,
1420
- diagnostics: i
1421
- };
1422
- }
1423
- let o = e.getFunctions(), s = o.getItems({
1424
- type: "autoRun",
1425
- includeHidden: !0
1426
- })[0] ?? o.getItems({
1427
- type: "macro",
1428
- includeHidden: !0
1429
- })[0] ?? null;
1430
- if (!s) return {
1431
- ok: !1,
1432
- error: Error("The script has no runnable entry. Export a default function taking the script context, e.g. `export default function run(ctx: IScript.ScriptContext) { ... }` (the workbook is `ctx.wb`; a macro may instead take its target first, e.g. `(sheet: ISheet, ctx)`).")
1433
- };
1434
- let c = await s.execute(r, n);
1435
- return {
1436
- ok: !0,
1437
- result: c?.results,
1438
- commitId: c?.commitId,
1439
- diagnostics: i
1440
- };
1441
- }
1442
- _searchable(e) {
1443
- let t = this._modules;
1444
- return t && t.getCount() !== 0 ? (e ? t.getItems({ name: e }) : t.getItems()).map((e) => e.getFunctions()) : a.EmptyArray;
1445
- }
1446
- async searchFunctions(e) {
1447
- await this._emitter.notify("onBeforeSearch", { async: !0 });
1448
- let t = this._searchable(e?.moduleName);
1449
- if (t.length === 0) return a.EmptyArray;
1450
- if (t.length === 1) return t[0].search(e);
1451
- let n, r = e?.limit, i = r === void 0 ? e : {
1452
- ...e,
1453
- limit: void 0
1454
- }, o = /* @__PURE__ */ new Set();
1455
- for (let e = 0; e < t.length; e++) {
1456
- let r = await t[e].search(i);
1457
- if (r.length !== 0) {
1458
- n ||= [];
1459
- for (let e = 0; e < r.length; e++) {
1460
- let t = r[e], i = t.getName().toUpperCase();
1461
- o.has(i) || (o.add(i), n.push(t));
1462
- }
1463
- }
1464
- }
1465
- if (!n || n.length === 0) return a.EmptyArray;
1466
- let s = e?.text ? e.text.trim().toUpperCase() : null;
1467
- return s ? Ae(n, s) : n.sort((e, t) => {
1468
- let n = e.getName().toUpperCase(), r = t.getName().toUpperCase();
1469
- return n < r ? -1 : +(n > r);
1470
- }), r !== void 0 && n.length > r ? n.slice(0, r) : n;
1471
- }
1472
- async start() {
1473
- if (!this._modules) return this._startPromise || (this._startPromise = this._doStart(), this._startPromise.catch(() => {
1474
- this._startPromise = void 0;
1475
- })), this._startPromise;
1476
- }
1477
- async _doStart() {
1478
- let e = this._options?.workbook, t = this._options?.json, n = {};
1479
- if (t) {
1480
- let r = Object.keys(t);
1481
- for (let i = 0; i < r.length; i++) {
1482
- let a = r[i], o = t[a];
1483
- try {
1484
- n[a] = await j(a, o, !1, [], o?.scope === "workbook" ? e : null);
1485
- } catch (e) {
1486
- m.error(`Could not load script '${a}'; it will be unavailable.`, e);
1487
- }
1488
- }
1489
- }
1490
- let r = this, i = new ke({
1491
- transactions: this._options?.transactions,
1492
- initial: n,
1493
- isReadOnly: () => r.isReadOnly(),
1494
- onRemove: (e, t) => {
1495
- r._options?.onRemove?.(e, t);
1496
- },
1497
- onAdd: (e, t) => {
1498
- r._emitter.notify("onChange"), r._options?.onAdd?.(e, t);
1499
- }
1500
- });
1501
- this._modules = i;
1502
- let o = i.getItems();
1503
- if (o.length === 0) return Promise.resolve(a.EmptyArray);
1504
- let s = o.length;
1505
- for (let t = 0; t < s; t++) {
1506
- let n = o[t];
1507
- try {
1508
- let t = n.getFunctions().getItems({
1509
- type: "autoRun",
1510
- includeHidden: !0
1511
- }), r = t.length;
1512
- for (let n = 0; n < r; n++) await t[n].execute(e);
1513
- } catch (e) {
1514
- m.error("Error executing autoRun script:", e);
1515
- }
1516
- }
1517
- }
1518
- addListeners(e, t) {
1519
- return this._emitter.addListeners(e, t);
1520
- }
1521
- isReadOnly() {
1522
- return this._options.workbook?._isStructureProtected?.() ?? !1;
1523
- }
1524
- toJSON() {
1525
- this._emitter.notify("onBeforeSave");
1526
- let e = this._modules;
1527
- if (!e) throw Error("Scripts is initializing.");
1528
- return e.toJSON();
1529
- }
1530
- get isIScript() {
1531
- return !0;
1532
- }
1533
- }, un = class {
1534
- constructor(t, n, r, i) {
1535
- this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = r, this._topLeft = n ?? e.EmptyCell, this._sheet = new L({
1536
- runtime: t,
1537
- styles: this._styles,
1538
- calcOnLoad: "none",
1539
- container: {
1540
- getName: () => i,
1541
- getIndex: () => 1
1542
- }
1543
- }), this._builder = this._sheet.getEntireRange().createSparseBuilder();
1544
- }
1545
- applyCSSStyle(e, t) {
1546
- let n = !1;
1547
- e.style || (e.style = {}, n = !0);
1548
- let r = e.style, i = { ...t };
1549
- if (t.msoIgnore) {
1550
- let e = t.msoIgnore.split(","), n = Object.keys(i);
1551
- for (let t = 0; t < n.length; t++) {
1552
- let r = n[t];
1553
- e.includes(r) && delete i[r];
1554
- }
1555
- }
1556
- let a = ne(i.fontFamily);
1557
- r.font = {}, a && (r.font.family = a.family, r.font.fallbacks = a.fallbacks, r.font.size = a.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
1558
- let o = oe(i.textDecoration);
1559
- r.font.underline = o.underline, r.font.strike = o.strike, i.textUnderlineStyle && (r.font.underline = ae(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = te(i.textAlign)), i?.textAlign && !r.alignment.horizontal && i?.textAlign !== "general" && (i.textAlign === "center-across" ? r.alignment.horizontal = O.HorizontalAlignment.CenterContinuous : i.textAlign === "fill" ? r.alignment.horizontal = O.HorizontalAlignment.Fill : i.textAlign === "121" || i.textAlign === "010" ? (r.alignment.horizontal = O.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = i.textAlign === "121") : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && (i.verticalAlign.toLowerCase() === "super" ? r.font.verticalAlign = D.VerticalAlignment.Super : i.verticalAlign.toLowerCase() === "sup" ? r.font.verticalAlign = D.VerticalAlignment.Sub : r.alignment.vertical = C(i.verticalAlign), r.alignment.vertical || (i.verticalAlign === "121" ? r.alignment.vertical = O.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = i.whiteSpace === "no-wrap" || i.whiteSpace === "nowrap" ? O.Overflow.Visible : O.Overflow.Wrap), i.msoTextControl === "shrinktofit" && (r.alignment.overflow = O.Overflow.Shrink);
1560
- let s = null;
1561
- if (i.background ? s = i.background : i.backgroundColor && (s = i.backgroundColor), s && (r.fill = { color: s }), i.msoPattern) {
1562
- let e = b(i.msoPattern);
1563
- e && (e.patternType === x.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== x.BuiltInSheetPattern.None && (s && (e.background = s), r.fill = e));
1564
- }
1565
- i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation = re(i.msoRotate));
1566
- let c = (e, t) => {
1567
- e && (r.borders ||= {}, r.borders[e] = t);
1568
- };
1569
- i.border && i.border !== "none" && (c("top", i.border), c("left", i.border), c("right", i.border), c("bottom", i.border)), i.borderTop && c("top", i.borderTop), i.borderLeft && c("left", i.borderLeft), i.borderRight && c("right", i.borderRight), i.borderBottom && c("bottom", i.borderBottom), i.msoDiagonalUp && c("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && c("diagonalDown", i.msoDiagonalDown);
1570
- let l = r.numberFormat;
1571
- i.msoNumberFormat && (l = S(i.msoNumberFormat), l.includes("\\") ? l = null : l === "Fixed" ? l = T.Styles.lookupStyle(r.numberFormat).formatType === T.Type.Number ? null : T.Type.Number : l === "Percent" && (l = T.Styles.lookupStyle(r.numberFormat).formatType === T.Type.Percentage ? null : T.Type.Percentage)), l && (r.numberFormat = l), e.style = this._styles.normalize(r), n && Object.keys(e.style).length === 0 && delete e.style;
1572
- }
1573
- onCell(t, n, r, i, a) {
1574
- let o = i(a), s = { value: n === void 0 ? r ?? "" : n };
1575
- if (typeof s.value == "string" && s.value.length === 0 && (s.value = void 0), o && this.applyCSSStyle(s, o), a?.tagName.toUpperCase() === "TD") {
1576
- let e = s.style, t = e?.font ?? {};
1577
- (a.querySelectorAll("s").length > 0 || a.querySelectorAll("strike").length > 0) && (t.strike = !0), a.querySelectorAll("sub").length > 0 && (t.verticalAlign = D.VerticalAlignment.Sub), a.querySelectorAll("sup").length > 0 && (t.verticalAlign = D.VerticalAlignment.Super), (a.querySelectorAll("b").length > 0 || a.querySelectorAll("strong").length > 0) && (t.weight = 700), a.querySelectorAll("i").length > 0 && (t.style = D.Style.Italic), a.querySelectorAll("u").length > 0 && (t.underline = D.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, s.style = e), e.font || (e.font = t));
1578
- let n = a.querySelectorAll("a");
1579
- if (n.length > 0) {
1580
- let e = n[0].getAttribute("href");
1581
- e && (s.hyperlink = e);
1582
- }
1583
- }
1584
- if (!e.isSingleCell(t)) {
1585
- let e = {
1586
- rowStart: this._topLeft.rowIndex + t.rowStart,
1587
- colStart: this._topLeft.colIndex + t.colStart,
1588
- rowEnd: this._topLeft.rowIndex + t.rowEnd,
1589
- colEnd: this._topLeft.colIndex + t.colEnd
1590
- };
1591
- this._mergedReading.push(e);
1592
- }
1593
- if (s.value === void 0 && !s.style && Object.keys(s).length <= 1) return;
1594
- let c = this._builder, l = this._topLeft;
1595
- if (c.pushAt(l.rowIndex + t.rowStart, l.colIndex + t.colStart, s), !e.isSingleCell(t) && o.msoIgnore) {
1596
- if (o.msoIgnore.includes("colspan")) {
1597
- let e = {};
1598
- o && this.applyCSSStyle(e, o);
1599
- let n = t.colEnd - t.colStart, r = l.rowIndex + t.rowStart;
1600
- for (let i = 1; i <= n; i++) c.pushAt(r, l.colIndex + t.colStart + i, e);
1601
- t = {
1602
- ...t,
1603
- colEnd: t.colStart
1604
- };
1605
- }
1606
- o.msoIgnore.includes("rowspan") && (t = {
1607
- ...t,
1608
- rowEnd: t.rowStart
1609
- });
1610
- }
1611
- }
1612
- onNoTable(e, t, n) {
1613
- this.onCell({
1614
- rowStart: this._topLeft.rowIndex,
1615
- colStart: this._topLeft.colIndex,
1616
- rowEnd: this._topLeft.rowIndex,
1617
- colEnd: this._topLeft.colIndex
1618
- }, e, null, t, n);
1619
- }
1620
- onRowStart(e, t, n, r) {
1621
- let i = n(r);
1622
- if (i.msoHeightSource !== "userset" || !r) return;
1623
- let a = r.getAttribute("height") ?? i.height, o = null;
1624
- if (a && (o = E(a, this._styles.getNormal().getFont().getSize(), "px")), o === null) for (let e = 0; e < r.cells.length; e++) {
1625
- let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a = E(i, this._styles.getNormal().getFont().getSize(), "px");
1626
- a !== null && (o = Math.max(a, o ?? 0));
1627
- }
1628
- o !== null && this._rowsReading.push({
1629
- address: {
1630
- min: this._topLeft.rowIndex + e,
1631
- max: this._topLeft.rowIndex + e + t - 1
1632
- },
1633
- update: { size: o * D.getDeviceScale() }
1634
- });
1635
- }
1636
- onColumn(e, t, n, r) {
1637
- let i = n(r);
1638
- if (i.msoWidthSource !== "userset" || !r) return;
1639
- let a = r.getAttribute("width") ?? i.width, o = null;
1640
- a && (o = E(a, this._styles.getNormal().getFont().getSize(), "px")), o !== null && this._colsReading.push({
1641
- address: {
1642
- min: this._topLeft.colIndex + e,
1643
- max: this._topLeft.colIndex + e + t - 1
1644
- },
1645
- update: { size: o * D.getDeviceScale() }
1646
- });
1647
- }
1648
- onDone() {
1649
- this._colsReading.length > 0 && this._sheet.getColumnHeaders().updateHeaderPairs(this._colsReading), this._rowsReading.length > 0 && this._sheet.getRowHeaders().updateHeaderPairs(this._rowsReading), this._sheet.doBatch(() => {
1650
- this._builder.apply();
1651
- }), this._mergedReading.length > 0 && this._sheet.getRanges(this._mergedReading).merge();
1652
- }
1653
- sheet() {
1654
- return this._sheet;
1655
- }
1656
- }, dn = class {
1657
- constructor(e) {
1658
- if (!e) throw new g("snapshot is required.");
1659
- this._snapshot = e;
1660
- }
1661
- getItemType() {
1662
- return "range";
1663
- }
1664
- getItem() {
1665
- return this._snapshot;
1666
- }
1667
- editMode() {
1668
- return this._snapshot?.getMarkOptions().editMode ?? null;
1669
- }
1670
- isCut() {
1671
- return this._snapshot?.getMarkOptions().isCut ?? !1;
1672
- }
1673
- getName() {
1674
- return this._snapshot.getName();
1675
- }
1676
- toText() {
1677
- return this._snapshot.toText();
1678
- }
1679
- toHtml() {
1680
- return this._snapshot.toHtml();
1681
- }
1682
- toImage() {
1683
- return this._snapshot.toImage();
1684
- }
1685
- get isClipboardItem() {
1686
- return !0;
1687
- }
1688
- }, fn = class {
1689
- constructor(t, n, r, i, a) {
1690
- if (this._parsed = void 0, this._runtime = t, !n) throw new g("nativeItems are required.");
1691
- this._topLeft = r ?? e.EmptyCell, this._native = n, this._markOptions = Object.freeze(i ?? {}), this._styles = a;
1692
- }
1693
- getItemType() {
1694
- return "range";
1695
- }
1696
- isCut() {
1697
- return !1;
1698
- }
1699
- toText() {
1700
- return this._native?.text;
1701
- }
1702
- toHtml() {
1703
- return this._native?.html?.documentElement.outerHTML || null;
1704
- }
1705
- toImage() {
1706
- return this._native?.image;
1707
- }
1708
- getItem() {
1709
- let e = this._parsed;
1710
- if (e === void 0) throw Error("Must call 'parse()' before getItem().");
1711
- if (e === null) return null;
1712
- if (this._snapshot) return this._snapshot;
1713
- let t = this;
1714
- return this._snapshot = {
1715
- copyTo: (n, r) => e.copyTo(n, {
1716
- ...t._markOptions,
1717
- ...r
1718
- }),
1719
- getMarkOptions: () => t._markOptions,
1720
- getName: () => e?.getName() ?? "Clipboard Data",
1721
- getCoords: () => e?.getCoords?.() ?? null,
1722
- toText: () => t.toText(),
1723
- toHtml: () => t.toHtml(),
1724
- toImage: () => t.toImage(),
1725
- getSource: () => e?.getSource?.() ?? null,
1726
- isISnapshot: !0
1727
- }, this._snapshot;
1728
- }
1729
- async parse() {
1730
- let e, t = this._native?.text, r = this._native.html;
1731
- if (r === null && t && t.includes("<table")) try {
1732
- let e = new DOMParser().parseFromString(t, n.Html), i = e.querySelector("parsererror");
1733
- if (i) throw new h("Unable to parse: " + i);
1734
- r = e, t = null;
1735
- } catch {
1736
- console.warn("Discovered text as html table but could could not parse.");
1737
- }
1738
- try {
1739
- let n, i = new un(this._runtime, this._topLeft, this._styles, r ? "HTML" : "Text"), a = await Promise.resolve(t ? rt(t) : [[]]);
1740
- if (xe(r, a, i) ? (e = i.sheet(), n = e.getUsedRange()) : r = null, n) return this._parsed = {
1741
- copyTo: async (e, t) => (await e.copyFrom(n, t))?.getCoords() ?? null,
1742
- getCoords: () => n.getCoords(),
1743
- getSource: () => e,
1744
- getName: () => e.getName()
1745
- }, !0;
1746
- } catch (e) {
1747
- throw e;
1748
- }
1749
- if (!t && !r && this._native.image) {
1750
- let e = this;
1751
- return this._parsed = {
1752
- async copyTo(t, n) {
1753
- let r = t.getSheet(), i = await e._native.image.arrayBuffer();
1754
- return await r.getMovables().addPicture({ source: { buffer: i } }, {
1755
- type: "picture",
1756
- description: l("op.copyImageFromClipboard"),
1757
- autoSelect: !0
1758
- }), null;
1759
- },
1760
- getName: () => "Image"
1761
- }, !0;
1762
- }
1763
- return this._parsed = null, !1;
1764
- }
1765
- get isClipboardItem() {
1766
- return !0;
1767
- }
1768
- }, X = {
1769
- showFormulaBar: !0,
1770
- showTabs: !0,
1771
- tabRatio: 600,
1772
- showHorizontalScrollbar: !0,
1773
- showVerticalScrollbar: !0,
1774
- showStatusBar: !0,
1775
- activeSheetId: 0
1776
- }, pn = class {
1777
- constructor(e) {
1778
- this._id = a.uuidV4(), this._emitter = new y(this), this._state = { ...X }, e?.json && this._fromJSON(e?.json);
1779
- }
1780
- getId() {
1781
- return this._id;
1782
- }
1783
- isShowFormulaBar() {
1784
- return this._state.showFormulaBar;
1785
- }
1786
- setShowFormulaBar(e) {
1787
- return this._state.showFormulaBar = e, this._emitter.notify("onViewChange"), this;
1788
- }
1789
- isShowTabs() {
1790
- return this._state.showTabs;
1791
- }
1792
- setShowTabs(e) {
1793
- return this._state.showTabs = e, this._emitter.notify("onViewChange"), this;
1794
- }
1795
- getTabRatio() {
1796
- return this._state.tabRatio;
1797
- }
1798
- setTabRatio(e) {
1799
- return this._state.tabRatio = e, this._emitter.notify("onViewChange"), this;
1800
- }
1801
- isShowHorizontalScrollbar() {
1802
- return this._state.showHorizontalScrollbar;
1803
- }
1804
- setShowHorizontalScrollbar(e) {
1805
- return this._state.showHorizontalScrollbar = e, this._emitter.notify("onViewChange"), this;
1806
- }
1807
- isShowVerticalScrollbar() {
1808
- return this._state.showVerticalScrollbar;
1809
- }
1810
- setShowVerticalScrollbar(e) {
1811
- return this._state.showVerticalScrollbar = e, this._emitter.notify("onViewChange"), this;
1812
- }
1813
- isShowStatusBar() {
1814
- return this._state.showStatusBar;
1815
- }
1816
- setShowStatusBar(e) {
1817
- return this._state.showStatusBar = e, this._emitter.notify("onViewChange"), this;
1818
- }
1819
- getActiveSheetId() {
1820
- return this._state.activeSheetId;
1821
- }
1822
- setActiveSheetId(e) {
1823
- let t = this._state, n = t.activeSheetId;
1824
- return t.activeSheetId = e, n !== e && this._emitter.notify("onViewChange"), this;
1825
- }
1826
- addListeners(e, t) {
1827
- return this._emitter.addListeners(e, t);
1828
- }
1829
- toJSON() {
1830
- let e = {}, t = Object.keys(this._state), n = t.length;
1831
- for (let r = 0; r < n; r++) {
1832
- let n = t[r], i = this._state[n];
1833
- i != null && i !== X[n] && (e[n] = i);
1834
- }
1835
- return Object.keys(e).length === 0 && (e = null), e;
1836
- }
1837
- _fromJSON(e, t = !0) {
1838
- let n = e || {};
1839
- this.update(n, t);
1840
- }
1841
- update(e, t = !0) {
1842
- this._state = {
1843
- ...X,
1844
- ...this._state,
1845
- ...e
1846
- }, t && this._emitter.notify("onViewChange");
1847
- }
1848
- get [Symbol.toStringTag]() {
1849
- return "[WorkbookView]";
1850
- }
1851
- toString() {
1852
- let e = this.toJSON();
1853
- return e ? JSON.stringify(e) : "DefaultWorkbookView";
1854
- }
1855
- get isIWorkbookView() {
1856
- return !0;
1857
- }
1858
- }, mn = Object.freeze({
1859
- structure: !1,
1860
- windows: !1,
1861
- revision: !1,
1862
- password: null,
1863
- revisionsPassword: null
1864
- }), hn = class extends Je {
1865
- isWindowsAllowed() {
1866
- return this._isPropertyAllowed("windows");
1867
- }
1868
- isRevisionAllowed() {
1869
- return this._isPropertyAllowed("revision");
1870
- }
1871
- isStructureAllowed() {
1872
- return this._isPropertyAllowed("structure");
1873
- }
1874
- _getAllowedKey() {
1875
- return "workbook";
1876
- }
1877
- _fromJSON(e) {
1878
- this._properties = e;
1879
- }
1880
- _toJSON(e) {
1881
- let t = this._properties;
1882
- if (t) {
1883
- let n = Object.keys(t), r = n.length;
1884
- for (let i = 0; i < r; i++) {
1885
- let r = n[i], a = t[r];
1886
- a != null && a !== mn[r] && (e[r] = a);
1887
- }
1888
- }
1889
- return super._toJSON(e);
1890
- }
1891
- get [Symbol.toStringTag]() {
1892
- return "[WorkbookProtection]";
1893
- }
1894
- get isIWorkbookProtection() {
1895
- return !0;
1896
- }
1897
- };
1898
- function Z(e) {
1899
- return d("error.workbook.invalidSheetKey", { key: e });
1900
- }
1901
- var gn, _n, vn = class extends ue {
1902
- constructor(e, t, n) {
1903
- super(), this._add = e, this._get = t, this._addListeners = n;
1904
- }
1905
- add(e) {
1906
- return this._add(e);
1907
- }
1908
- _getItems(e) {
1909
- return this._get(e?.name, e?.visibility);
1910
- }
1911
- getByName(e) {
1912
- return this._get(e)?.[0] ?? null;
1913
- }
1914
- addListeners(e, t) {
1915
- return this._addListeners(e, t);
1916
- }
1917
- get isISheetCollection() {
1918
- return !0;
1919
- }
1920
- }, Q = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), yn = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
1921
- function bn(e) {
1922
- let t = d(l("workbook.defaultSheetName"), { n: e + 1 });
1923
- return t === "workbook.defaultSheetName" ? `Sheet${e + 1}` : t;
1924
- }
1925
- function xn(e, t) {
1926
- return {
1927
- ..._e,
1928
- getSheet: () => null,
1929
- toString: () => F(e, t)
1930
- };
1931
- }
1932
- function Sn(e, t = !1) {
1933
- if (!e) throw Error(d("error.workbook.sheetNameBlank"));
1934
- if (Q.test(e)) {
1935
- if (!t) throw Error(function(e) {
1936
- return e ? d("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : d("error.workbook.sheetNameInvalidChars");
1937
- }(e));
1938
- e = e.replace(Q, "");
1939
- }
1940
- if (e.length === 0) throw Error(d("error.workbook.sheetNameBlank"));
1941
- let n = e.length;
1942
- if (n > 31) {
1943
- if (!t) throw Error(d("error.workbook.sheetNameTooLong"));
1944
- e = e.substring(0, 31);
1945
- }
1946
- if (e.charAt(0) === "'" || e.charAt(n - 1) === "'") {
1947
- if (!t) throw Error(d("error.workbook.sheetNameQuotes"));
1948
- e = e.replace(/^'|'$/g, "");
1949
- }
1950
- return e;
1951
- }
1952
- var Cn, wn, Tn, En = "workbook.activeSheet", Dn = class e extends De {
1953
- constructor(e, t, n, r) {
1954
- super(e, t, r), this._workbook = n;
1955
- }
1956
- getSource() {
1957
- return this._workbook;
1958
- }
1959
- _createRanges(t, n) {
1960
- let r = this._options;
1961
- return n && (r = {
1962
- ...this._options,
1963
- getOptions: N(this._options?.getOptions, n)
1964
- }), new e(t, this._internal, this._workbook, r);
1965
- }
1966
- _createRange(e, t) {
1967
- let n = e ? { ...e } : null, r = n ? this._workbook._getSheetRef(n.scope, R.Visibility.VeryHidden) : null;
1968
- if (!r) {
1969
- let e = this._workbook.getSelectedSheet();
1970
- return delete n?.scope, xn(n, n ? {
1971
- scope: Qe,
1972
- ...e.getEntireRange().getCoords()
1973
- } : null);
1974
- }
1975
- let i = this._options;
1976
- return t && (i = {
1977
- ...this._options,
1978
- getOptions: N(this._options.getOptions, t)
1979
- }), new On(e, P(r.sheet), this._workbook, i);
1980
- }
1981
- async select(e) {
1982
- let t = [], n = null, r = this.getCoords();
1983
- for (let e = 0; e < r.length; e++) {
1984
- let i = r[e];
1985
- i && (n ||= i.scope, i && i.scope === n && t.push(i));
1986
- }
1987
- n ||= this._workbook.getSelectedSheet().getName();
1988
- let i = this._workbook.getSheets().getByName(n);
1989
- if (!i) return;
1990
- let a = await i.getRanges(t).select(e), o = this._workbook._rangesAddressToCoords(a.getCoords());
1991
- return this._createRanges(o);
1992
- }
1993
- addListener(e, t) {
1994
- if (!this.getCoords()) return () => {};
1995
- let n = this._workbook._sheetToWBEvent(e);
1996
- return super.addListener(n, t);
1997
- }
1998
- get [Symbol.toStringTag]() {
1999
- return "[WorkbookRanges]";
2000
- }
2001
- getAddress(e) {
2002
- let t = this._internal.getSheet(), n = t.getEntireRange().getCoords();
2003
- return ye(this.getCoords(), {
2004
- ...n,
2005
- scope: t.getName()
2006
- }, F, Pe, e);
2007
- }
2008
- toString() {
2009
- return this.getAddress();
2010
- }
2011
- }, On = class e extends pe {
2012
- constructor(e, t, n, r) {
2013
- super(e, t, r), this._workbook = n;
2014
- }
2015
- _createRanges(e, t) {
2016
- let n = this._options;
2017
- return t && (n = {
2018
- ...this._options,
2019
- getOptions: N(this._options?.getOptions, t)
2020
- }), new Dn(e, this._internal, this._workbook, n);
2021
- }
2022
- _createRange(t, n) {
2023
- let r = this._internal;
2024
- if (!t) return $e(r.getSheet(), r.getSheet().getEntireCoords());
2025
- if (r.validateCoords(t), r.getSheet().isClosed()) return $e(null, r.getSheet().getEntireCoords(), t);
2026
- let i = this._options;
2027
- return n && (i = {
2028
- ...this._options,
2029
- getOptions: N(this._options?.getOptions, n)
2030
- }), new e(t, this._internal, this._workbook, i);
2031
- }
2032
- addListener(e, t) {
2033
- if (!this.getCoords()) return () => {};
2034
- let n = this._workbook._sheetToWBEvent(e);
2035
- return super.addListener(n, t);
2036
- }
2037
- get [Symbol.toStringTag]() {
2038
- return "[WorkbookRange]";
2039
- }
2040
- getAddress(e) {
2041
- let t = this._internal.getSheet(), n = t?.getEntireRange().getCoords() ?? null;
2042
- return F(this.getCoords(), {
2043
- ...n,
2044
- scope: t.getName()
2045
- });
2046
- }
2047
- toString() {
2048
- return this.getAddress();
2049
- }
2050
- }, kn = (e) => !!e && typeof e == "object" && typeof e.getOrigin == "function", An = class {
2051
- constructor(e) {
2052
- this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new le(() => {
2053
- let e = [];
2054
- for (let t of this.getSheets()) e.push(...t.getPivotTables());
2055
- return e;
2056
- }), this._people = new cn(), this._commentCollection = new nt(null, (e, t, n) => {
2057
- let r = [];
2058
- for (let i of this.getSheets()) r.push(...i.getComments().getItems(e ? {
2059
- address: e,
2060
- ignoreHidden: t,
2061
- fullyContained: n
2062
- } : {
2063
- ignoreHidden: t,
2064
- fullyContained: n
2065
- }));
2066
- return r;
2067
- }, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
2068
- e.onCollectionChange(this._commentCollection);
2069
- } : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._locale = null, this._localeOverrides = null;
2070
- let t = typeof e == "string" ? { origin: e } : { ...e }, n = t.origin;
2071
- this._ownOriginProvider = !kn(n), this._originProvider = kn(n) ? n : new pt(typeof n == "string" ? new B(null, { name: n }) : n ?? new B(null)), delete t.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
2072
- let r = t.json;
2073
- delete t.json, this._transactions = t.transactions ?? new v(), this._id = this._transactions.create(), this._ownTransactions = !t.transactions, this._emitter = new y(this, this._transactions), this._runtime = t.runtime ?? new Ze("Workbook Runtime", {
2074
- isDate1904: () => this._isDate1904,
2075
- getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
2076
- getLocale: () => this._locale ?? He() ?? Ye(),
2077
- getLocaleOverrides: () => this._localeOverrides
2078
- }), this._listenerLanguage = i.addChangeListener(() => {
2079
- this._closed || this._notifyAllChange();
2080
- });
2081
- let o = this, s = this._beginCommit({ description: l(r ? "op.openWorkbook" : "op.newWorkbook") });
2082
- try {
2083
- this._strings = t.strings ?? new ge(), this._ownStrings = !t.strings, this._resources = t.resources ?? new Oe(), this._ownResources = !t.resources, this._createSheetName = t.createSheetNameCallback ?? bn;
2084
- let e = t.createSheetCallback;
2085
- e ||= (e) => new L(e), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, n, r, i, a, s, c) => {
2086
- let l = null, u = {
2087
- runtime: o._runtime,
2088
- readonly: o._options.readonly ?? !1,
2089
- disableLoadAutoFit: o._options.disableLoadAutoFit ?? !1,
2090
- opener: o._options.opener,
2091
- transactions: o._transactions,
2092
- styles: o._styles,
2093
- strings: o._strings,
2094
- resources: o._resources,
2095
- names: o._names,
2096
- workbook: o,
2097
- calculation: o._calculation,
2098
- resolveRange: (e) => o._options.resolveRange?.(e) ?? o.getRange(e),
2099
- container: {
2100
- beforeFromJSON: (e) => {
2101
- l = e, o._addSheetRef({
2102
- name: n,
2103
- id: t,
2104
- visibility: r ?? R.Visibility.Visible,
2105
- sheetId: a,
2106
- sheet: e
2107
- }, i);
2108
- },
2109
- getName: () => {
2110
- let e = o._getSheetRef(l);
2111
- return e ? e.name : n;
2112
- },
2113
- setName: (e, t) => {
2114
- o._getSheetRef(l) && o._setSheetName(l, e, t);
2115
- },
2116
- setNameChangeCallback: (e) => {
2117
- o._sheetOnNameChange.set(t, e);
2118
- },
2119
- getVisibility: () => {
2120
- let e = o._getSheetRef(l);
2121
- return e ? e.visibility : R.Visibility.Visible;
2122
- },
2123
- setVisibility: (e, t) => {
2124
- o._setSheetVisibility(l, e, t);
2125
- },
2126
- setVisibilityCallback: (e) => {
2127
- o._sheetOnVisibilityChange.set(t, e);
2128
- },
2129
- duplicate: () => o._duplicateSheet(l),
2130
- getIndex: () => {
2131
- let e = o._getSheetRef(l);
2132
- return e ? o._getOffsetForId(e.id, o._getSheetRefs(R.Visibility.VeryHidden)) : i;
2133
- },
2134
- setIndex: (e, t) => {
2135
- let n = o._getSheetRef(l, R.Visibility.VeryHidden);
2136
- return !!n && (o._moveSheet(n, e, t), !0);
2137
- },
2138
- setIndexCallback: (e) => {
2139
- o._sheetOnIndexChange.set(t, e);
2140
- },
2141
- requestSelect: async () => (o._setSelectedSheet(l), await this._emitter.notify("onRequestSelect", {
2142
- source: o,
2143
- params: l,
2144
- async: !0
2145
- }), o.getSelectedSheet() === l)
2146
- }
2147
- };
2148
- return s && (u.json = s), c !== void 0 && (u.uid = () => c), l = e(u, n, i, r), l;
2149
- }, this._namedTableSource = new Ge({
2150
- getSheets: () => o._sheets ? o.getSheets().getItems() : a.EmptyArray,
2151
- addSheetsListener: (e, t) => o.addListeners({ onSheetsChange: e }, t)
2152
- }), this._names = t.names ?? new ze({
2153
- addressToRanges: (e) => o.getRanges(e),
2154
- getCurrentScope: () => o.getSelectedSheet().getName(),
2155
- isReadOnly: () => (o._options.readonly ?? !1) || o._isStructureProtected(),
2156
- transactions: o._transactions,
2157
- getSources: () => o._calculation ? [o._calculation.getNamedFormulas(), o._namedTableSource] : a.EmptyArray
2158
- }), this._ownNames = !t.names, this._calculation = t.calculation ?? new je({
2159
- runtime: o._runtime,
2160
- functions: t.functions,
2161
- json: r?.calc,
2162
- isNamesReadOnly: () => o._isStructureProtected(),
2163
- getActiveCell: () => {
2164
- let e = o.getSelectedSheet(), t = e?.getSelectedRange()?.getCoords();
2165
- return t ? {
2166
- rowIndex: t.rowStart,
2167
- colIndex: t.colStart,
2168
- scope: e.getId()
2169
- } : null;
2170
- },
2171
- getRange: o.getRange.bind(o),
2172
- getRanges: o.getRanges.bind(o),
2173
- createGraphRanges: (e, t) => o._createGraphRanges(e, t),
2174
- getSheetIndex: (e) => {
2175
- if (e === void 0) {
2176
- let e = o.getSelectedSheet();
2177
- return e ? this._getSheetRefs(R.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
2178
- }
2179
- let t = this._getSheetRefs(R.Visibility.VeryHidden);
2180
- e = e.toLowerCase();
2181
- let n = t.length;
2182
- for (let r = 0; r < n; r++) if (t[r].name.toLowerCase() === e) return r;
2183
- try {
2184
- jn.address = e;
2185
- let t = this._names.getItems(jn);
2186
- if (!t || t.length === 0) return -1;
2187
- let n = t[0].getRanges?.()?.getCoords()?.[0]?.scope;
2188
- if (!n) return -1;
2189
- let r = this._getSheetRefs(R.Visibility.VeryHidden);
2190
- n = n.toLowerCase();
2191
- let i = r.length;
2192
- for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === n) return e;
2193
- } catch {
2194
- return -1;
2195
- }
2196
- return -1;
2197
- },
2198
- getSheetCount: () => o.getSheets().getItems({ visibility: R.Visibility.VeryHidden }).length,
2199
- externalBooks: r?.externalBooks,
2200
- externalBookResolver: t.externalBookResolver,
2201
- namedCollection: o._names,
2202
- strings: o._strings,
2203
- transactions: o._transactions,
2204
- names: r?.names
2205
- }), this._ownCalculation = !t.calculation, this._scripts = this._createScripts(r?.modules), this._ownNames = !t.names, this._options = Object.freeze({ ...t });
2206
- let n = r?.sheets?.length ? r.sheets.map((e) => e.name) : [this._createSheetName(0)], i = n.map((e) => e + "-" + a.uuidV4());
2207
- this._calculation._setSheets(n.map((e, t) => [i[t], e]));
2208
- let c = t.calcOnLoad ?? "auto", l = !1, u = (async () => {
2209
- try {
2210
- if (this._ownCalculation && c !== "none" && (c === "full" || c === "auto" && !0 === r?.calc?.fullCalcOnLoad ? await this._calculation.calculate({ full: !0 }) : await this._calculation.start(), this._closed)) return;
2211
- await this._scripts.start();
2212
- } finally {
2213
- l = !0, this._starting = null;
2214
- }
2215
- })();
2216
- l || (this._starting = u), this._starting?.catch(() => {}), r ? this._fromJSON(r, i) : (this._initState(), this._addSheet(!1, n[0], null, i[0])), this._sheets = new vn((e) => o._addSheetOptions(e), (e, t) => {
2217
- if (e) {
2218
- let n = this._getSheetRef(e, t);
2219
- return n ? [n.sheet] : a.EmptyArray;
2220
- }
2221
- return this._getSheets(t);
2222
- }, (e, t) => {
2223
- let n = e.onCollectionChange, r = e.onInvalidated;
2224
- return o._emitter.addListeners({
2225
- onSheetsChange: n ? () => {
2226
- n(o._sheets);
2227
- } : void 0,
2228
- onInvalidated: r ? () => {
2229
- r(o._sheets);
2230
- } : void 0
2231
- }, t);
2232
- }), this._ownCalculation && (t.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? s.amend() : s.commit();
2233
- } catch (e) {
2234
- throw s.rollback(), e;
2235
- }
2236
- this._initializing = !1;
2237
- }
2238
- _initState() {
2239
- let e = this._getSheetRefs();
2240
- for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
2241
- let t = this._options;
2242
- this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new Ne().getDefaultTheme(), this._styles = t?.styles ?? new se(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new pn()), this._listenerProtection?.(), this._protection = new hn(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
2243
- n._emitter.notify("onProtectionChange");
2244
- } });
2245
- let n = this;
2246
- this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
2247
- async onAfterStateChange(e, t, r, i, a) {
2248
- let o = n._view, s = a?.[En], c = r ? s?.before : s?.after, l = s?.viewId === o.getId() && c != null, u = l ? c : o.getActiveSheetId(), d = l && t.getId() === n._lastTransactionUUID ? n._getSheetRef({ id: u }) : null;
2249
- d ? await d.sheet.select() : n._resyncActiveSheet(u, e), n._lastTransactionUUID = t.getId(), (r || i) && n._emitter.notify("onSheetsChange"), n._emitter.notify("onSelectedSheetChange"), n._emitter.notify("onViewChange");
2250
- },
2251
- onRestoreOrRevert() {
2252
- n._ownCalculation, n._emitter.notify("onInvalidated");
2253
- }
2254
- });
2255
- let r = this._getState();
2256
- r?.listenersSheets && (r?.listenersSheets.forEach((e) => {
2257
- e();
2258
- }), r?.listenersSheets.clear()), this._updateState({
2259
- sheetRefsAll: [],
2260
- sheetRefsVisibleAndHidden: [],
2261
- sheetRefsVisible: [],
2262
- refsById: /* @__PURE__ */ new Map(),
2263
- sheetsById: /* @__PURE__ */ new Map(),
2264
- refsByLowerCaseName: /* @__PURE__ */ new Map(),
2265
- sheetsByLowerCaseName: /* @__PURE__ */ new Map(),
2266
- refsByInstance: /* @__PURE__ */ new Map(),
2267
- lastId: -1,
2268
- sheetsCreated: /* @__PURE__ */ new Set(),
2269
- listenersSheets: /* @__PURE__ */ new Map()
2270
- });
2271
- }
2272
- getId() {
2273
- return this._id;
2274
- }
2275
- getVersionId() {
2276
- return this._transactions.getVersionId(this._id);
2277
- }
2278
- getName() {
2279
- return this._closed ? null : this._origin.getName();
2280
- }
2281
- getOrigin() {
2282
- return this._originProvider.getOrigin();
2283
- }
2284
- _onOriginChange() {
2285
- if (this._closed) return;
2286
- let e = this._originProvider.getOrigin();
2287
- if (e === this._origin) return;
2288
- this._listenerOrigin?.();
2289
- let t = this._lastOriginName;
2290
- this._bindOrigin(e), this._emitter.notify("onOriginChange"), this._lastOriginName !== t && this._emitter.notify("onNameChange");
2291
- }
2292
- _bindOrigin(e) {
2293
- this._origin = e, this._lastOriginName = e.getName(), this._listenerOrigin = e.addListeners({ onChange: () => {
2294
- if (this._closed) return;
2295
- let t = e.getName();
2296
- t !== this._lastOriginName && (this._lastOriginName = t, this._emitter.notify("onNameChange"));
2297
- } });
2298
- }
2299
- getView() {
2300
- return this._view;
2301
- }
2302
- setView(e) {
2303
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2304
- if (!e) throw new h(d("error.sheet.emptyView"));
2305
- this._listenerWorkbookView?.();
2306
- let t = this, n = -1;
2307
- return this._listenerWorkbookView = e.addListeners({ onViewChange: (e) => {
2308
- let r = t._getState(), i = this._view.getActiveSheetId(), a = r.sheetRefsVisible, o = this._getOffsetForId(i, a);
2309
- this._activeSheetOffset = o, t._emitter.notify("onViewChange"), n !== i && (t._emitter.notify("onSelectionChange"), t._emitter.notify("onSelectedSheetChange")), n = i;
2310
- } }), this._view = e, t._emitter.notify("onViewChange"), this;
2311
- }
2312
- getRuntime() {
2313
- return this._runtime;
2314
- }
2315
- setDate1904(e) {
2316
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2317
- return this._isDate1904 === e || (this._isDate1904 = e, this._emitter.notify("onRegionalChange")), this;
2318
- }
2319
- getLocale() {
2320
- return this._runtime.getLocale();
2321
- }
2322
- getPinnedLocale() {
2323
- return this._locale;
2324
- }
2325
- setLocale(e) {
2326
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2327
- if (e) try {
2328
- new Intl.Locale(e);
2329
- } catch {
2330
- throw Error(d("error.workbook.invalidLocale", { locale: e }));
2331
- }
2332
- return this._locale === e || (this._locale = e, this._emitter.notify("onRegionalChange")), this;
2333
- }
2334
- getLocaleOverrides() {
2335
- return this._localeOverrides;
2336
- }
2337
- setLocaleOverrides(e) {
2338
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2339
- let t = e && Object.keys(e).length > 0 ? e : null;
2340
- return this._localeOverrides = t, this._emitter.notify("onRegionalChange"), this;
2341
- }
2342
- getStyles() {
2343
- return this._styles;
2344
- }
2345
- getResources() {
2346
- return this._resources;
2347
- }
2348
- getTransactions() {
2349
- return this._transactions;
2350
- }
2351
- getStrings() {
2352
- return this._strings;
2353
- }
2354
- getExternalBooks() {
2355
- return this._calculation.getExternalBooks();
2356
- }
2357
- getUpdateLinks() {
2358
- return this._updateLinks;
2359
- }
2360
- setUpdateLinks(e) {
2361
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2362
- return this._updateLinks = e, this;
2363
- }
2364
- getPivotTables() {
2365
- return this._pivotTableCollection;
2366
- }
2367
- getComments() {
2368
- return this._commentCollection;
2369
- }
2370
- getPeople() {
2371
- return this._people;
2372
- }
2373
- getTheme() {
2374
- return this._theme;
2375
- }
2376
- setTheme(e) {
2377
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2378
- if (!e) throw new h(d("error.workbook.notSetValue"));
2379
- let t = this._theme;
2380
- return this._theme = e, this.getStyles().setTheme(e), this._emitter.notify("onThemeChange"), t;
2381
- }
2382
- getSelectedSheetIndex() {
2383
- return this._activeSheetOffset;
2384
- }
2385
- getSelectedSheet() {
2386
- let e = this._getSheetRef(this.getSelectedSheetIndex());
2387
- return e ? e?.sheet : null;
2388
- }
2389
- getSheet(e, t = R.Visibility.Visible) {
2390
- if (e === void 0) return this.getSelectedSheet();
2391
- if (!e) throw Error(d("error.workbook.sheetNameNotProvided"));
2392
- let n = this._getSheetRef(e, t);
2393
- if (!n) throw new f(d("error.workbook.sheetNameNotFound", { sheetName: e }));
2394
- return n.sheet;
2395
- }
2396
- getSheetAt(e, t = R.Visibility.Visible) {
2397
- let n = this._getSheetRef(e, t);
2398
- if (!n) throw new f(function(e) {
2399
- return d("error.workbook.sheetIndexNotFound", { index: e });
2400
- }(e));
2401
- return n.sheet;
2402
- }
2403
- getSheets() {
2404
- return this._sheets;
2405
- }
2406
- addSheet(e) {
2407
- return this.getSheets().add(e);
2408
- }
2409
- _getSheets(e = R.Visibility.Visible) {
2410
- let t = this._getSheetRefs(e), n = [], r = t.length;
2411
- for (let e = 0; e < r; e++) n.push(t[e].sheet);
2412
- return n;
2413
- }
2414
- _getSheetRefs(e = R.Visibility.Visible) {
2415
- let t = this._getState();
2416
- return t ? e === R.Visibility.Visible ? t.sheetRefsVisible : e === R.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === R.Visibility.VeryHidden ? t.sheetRefsAll : a.EmptyArray : [];
2417
- }
2418
- _getSheetRef(e, t = R.Visibility.Visible) {
2419
- let n = null;
2420
- return typeof e == "number" ? this._getSheetRefs(t)[e] : (typeof e == "string" ? n = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : e instanceof L ? n = this._getState().refsByInstance.get(e) : e?.id !== void 0 && (n = this._getState().refsById.get(e.id)), n);
2421
- }
2422
- _validateNewSheetName(e, t = !0) {
2423
- if (e == null) return e;
2424
- if (Sn(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new h(d("error.workbook.nameTaken"));
2425
- return e.substring(0, 31);
2426
- }
2427
- findValidSheetName(e) {
2428
- e &&= Sn(e, !0);
2429
- try {
2430
- return function(e, t) {
2431
- try {
2432
- if (t(e)) return e;
2433
- } catch {}
2434
- let n, r, i = yn.exec(e);
2435
- for (i === null ? (n = e + " ", r = 1) : (n = e.substring(0, i.index), r = parseFloat(i[1])); r < 256;) {
2436
- r++;
2437
- let e = "(" + r + ")", i = n.substring(0, 31 - e.length) + e;
2438
- try {
2439
- if (t(i)) return i;
2440
- } catch {}
2441
- }
2442
- throw Error(e + " is not a valid sheet name");
2443
- }(e, (e) => this._validateNewSheetName(e));
2444
- } catch {
2445
- return this._nextSheetName();
2446
- }
2447
- }
2448
- isValidSheetNameCharacter(e) {
2449
- return !Q.test(e);
2450
- }
2451
- _isStructureProtected() {
2452
- return !this._initializing && !this.getProtection().isStructureAllowed();
2453
- }
2454
- _addSheetOptions(e) {
2455
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2456
- if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2457
- let t, n = null;
2458
- t = typeof e == "string" ? { name: e } : typeof e == "number" ? { index: e } : e, t = {
2459
- ...t,
2460
- description: t?.description ?? l("op.addSheet")
2461
- };
2462
- let r = this.beginCommit(t);
2463
- try {
2464
- let e = t?.autoSelect ?? !1;
2465
- n = this._addSheet(!0, t.name, t.index ?? null);
2466
- let i = this.getView().getActiveSheetId();
2467
- if (e && this._recordActiveSheet(r, i, this._getSheetRef(n).id), r.commit({ description: d("op.addSheetNamed", { name: n.getName() }) }), !1 !== e) {
2468
- let t = typeof e == "boolean" ? void 0 : e;
2469
- n.select(t);
2470
- }
2471
- } catch (e) {
2472
- throw r.rollback(), e;
2473
- }
2474
- return n;
2475
- }
2476
- _nextSheetName(e = null) {
2477
- let t = e ? e.toLowerCase() : null, n = this._getState(), r = n.sheetsByLowerCaseName;
2478
- if (e && r.has(t)) throw new h(function(e) {
2479
- return d("error.workbook.nameDuplicate", { sheetName: e });
2480
- }(e));
2481
- t = (e = this._validateNewSheetName(e)) ? e.toLowerCase() : null;
2482
- let i = n.lastId + 1;
2483
- for (; !e;) {
2484
- let t = this._createSheetName(i), n = t.toLowerCase();
2485
- r.has(n) ? i++ : e = t;
2486
- }
2487
- return this._updateState({ lastId: i }), e;
2488
- }
2489
- _addSheet(e, t = null, n = null, r) {
2490
- t = this._nextSheetName(t);
2491
- let i = this._getState(), a = this._createSheet(i.lastId, t, R.Visibility.Visible, n, void 0, null, r);
2492
- if (!a) throw new h(d("error.workbook.sheetNameBlank"));
2493
- return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), a;
2494
- }
2495
- _updateSheetRefStates(e) {
2496
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2497
- if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2498
- let t = e, n = [], r = [], i = t.length;
2499
- for (let e = 0; e < i; e++) t[e].visibility === R.Visibility.Visible ? (n.push(t[e]), r.push(t[e])) : t[e].visibility === R.Visibility.Hidden && r.push(t[e]);
2500
- this._updateState({
2501
- sheetRefsAll: t,
2502
- sheetRefsVisible: n,
2503
- sheetRefsVisibleAndHidden: r
2504
- });
2505
- }
2506
- _tellSheets() {
2507
- if (this._isLoadingSheets) return;
2508
- let e = this._getState().sheetRefsAll;
2509
- this._calculation._setSheets(e.map((e) => [e.sheet.getId(), e.name]));
2510
- }
2511
- _addSheetRef(e, t = null) {
2512
- let n = this._getState(), r = n.sheetRefsAll, i = Math.max(0, Math.min(r.length, t ?? r.length)), a = [
2513
- ...r.slice(0, i),
2514
- e,
2515
- ...r.slice(i)
2516
- ];
2517
- this._updateSheetRefStates(a);
2518
- let o = e.sheet, s = e.name.toLowerCase(), c = new Map(n.refsById);
2519
- c.set(e.id, e);
2520
- let l = new Map(n.refsByLowerCaseName);
2521
- l.set(s, e);
2522
- let u = new Map(n.refsByInstance);
2523
- u.set(o, e);
2524
- let f = new Map(n.sheetsById);
2525
- f.set(e.id, o);
2526
- let p = new Map(n.sheetsByLowerCaseName);
2527
- p.set(s, o);
2528
- let m = this, h = n.listenersSheets;
2529
- if (o !== void 0) {
2530
- let t = o.addListeners({
2531
- onBeforeDelete: (e) => {
2532
- m._validateDeleteSheet(e);
2533
- },
2534
- onDelete(e) {
2535
- let t = m._getSheetRef(e, R.Visibility.VeryHidden);
2536
- if (!t) return;
2537
- let n = m._beginCommit({ description: d("op.deleteSheet", { name: t.name }) });
2538
- try {
2539
- let r = m._getState(), i = r.sheetRefsAll, a = m._getOffsetForId(t.id, i), s = [...i];
2540
- s.splice(a, 1), m._updateSheetRefStates(s);
2541
- let c = new Map(r.refsById);
2542
- c.delete(t.id);
2543
- let l = new Map(r.sheetsById);
2544
- l.delete(t.id);
2545
- let u = t.name.toLowerCase(), d = new Map(r.refsByLowerCaseName);
2546
- d.delete(u);
2547
- let f = new Map(r.sheetsByLowerCaseName);
2548
- f.delete(u);
2549
- let p = new Map(r.refsByInstance);
2550
- p.delete(e), r.listenersSheets.get(t.id)();
2551
- let h = new Map(r.listenersSheets);
2552
- h.delete(t.id), m._adjustRemoveSelectionIfRequired(a, t.id), m._adjustSheetNamesIfRequired(), m._sheetOnNameChange.delete(t.id), m._sheetOnVisibilityChange.delete(t.id), m._sheetOnIndexChange.delete(t.id), m._tellSheets(), m._emitter.notify("onSheetsChange");
2553
- let g = new Set(r.sheetsCreated);
2554
- g.has(o) && g.delete(o), m._updateState({
2555
- refsById: c,
2556
- sheetsById: l,
2557
- refsByLowerCaseName: d,
2558
- sheetsByLowerCaseName: f,
2559
- refsByInstance: p,
2560
- sheetsCreated: g,
2561
- listenersSheets: h
2562
- }), n.commit();
2563
- } catch (e) {
2564
- throw n.rollback(), e;
2565
- }
2566
- }
2567
- }), r = o.addListeners({ onSelectionChange: (e) => {
2568
- m.getView().getActiveSheetId() === m._getSheetRef(e)?.id && m._emitter.notify("onSelectionChange", {
2569
- source: m,
2570
- params: e
2571
- });
2572
- } }, { transactional: !1 });
2573
- h = new Map(n.listenersSheets), h.set(e.id, () => {
2574
- t(), r();
2575
- });
2576
- }
2577
- let g = n.lastId;
2578
- g !== -1 && (g = Math.max(g, e.id)), this._updateState({ lastId: g }), this._updateState({
2579
- refsById: c,
2580
- refsByLowerCaseName: l,
2581
- refsByInstance: u,
2582
- sheetsById: f,
2583
- sheetsByLowerCaseName: p,
2584
- listenersSheets: h
2585
- }), this._adjustSheetNamesIfRequired();
2586
- let _ = new Set(this._getState().sheetsCreated);
2587
- return _.add(e.sheet), this._updateState({ sheetsCreated: _ }), this._tellSheets(), e;
2588
- }
2589
- _recordActiveSheet(e, t, n) {
2590
- let r = this.getView().getId();
2591
- e.setIntent(En, (e) => ({
2592
- viewId: r,
2593
- before: e?.before ?? t,
2594
- after: n
2595
- }));
2596
- }
2597
- _resyncActiveSheet(e, t) {
2598
- let n = t?.sheetRefsVisible;
2599
- if (!n?.length) return;
2600
- let r = -1, i = n.length;
2601
- for (let t = 0; t < i; t++) if (n[t].id === e) {
2602
- r = t;
2603
- break;
2604
- }
2605
- r === -1 && (r = Math.min(Math.max(this._activeSheetOffset, 0), i - 1));
2606
- let a = n[r].id;
2607
- this._view.getActiveSheetId() === a ? this._activeSheetOffset = r : this._view.setActiveSheetId(a);
2608
- }
2609
- _adjustRemoveSelectionIfRequired(e, t) {
2610
- if (this._view.getActiveSheetId() === t) {
2611
- let t, n = this._getState().sheetRefsVisible;
2612
- t = e < n.length ? n[e].id : n[e - 1].id, this._view.setActiveSheetId(t);
2613
- }
2614
- }
2615
- _adjustSheetNamesIfRequired() {
2616
- let e = this._getState(), t = e.lastId;
2617
- if (t === -1) return;
2618
- let n = this._view.getActiveSheetId();
2619
- n ??= (this._view.setActiveSheetId(t), t);
2620
- let r = e.refsById.get(n);
2621
- r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility === R.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(n, e.sheetRefsVisible));
2622
- }
2623
- _validateDeleteSheet(e) {
2624
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2625
- if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2626
- let t = this._getSheetRef(e);
2627
- if (!t) throw new h(function(e) {
2628
- return d("error.workbook.deleteKey", { key: e });
2629
- }(e));
2630
- let n = this._getState().sheetRefsVisible;
2631
- if (n.length === 1 && n[0].id === t.id) throw new h(d("error.workbook.sheetOne"));
2632
- }
2633
- _getOffsetForId(e, t) {
2634
- let n = t.length;
2635
- for (let r = 0; r < n; r++) if (t[r].id === e) return r;
2636
- throw new h(d("error.workbook.noVisibleRefs"));
2637
- }
2638
- find(t) {
2639
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2640
- let n = this._getSheets();
2641
- if (n.length === 1) return n[0].find(t);
2642
- typeof t == "string" && (t = { text: t });
2643
- let r = !t?.reverse, i = t?.disableWrap ?? !1, a = this.getSelectedSheetIndex(), o = a, s = n[o], c = !1;
2644
- t = {
2645
- ...t,
2646
- disableWrap: !0
2647
- };
2648
- let l, u = s.find(t), f = u.next(), p = !1;
2649
- if (t?.from) {
2650
- let e = this._rangesAddressToCoords(t?.from);
2651
- l = {
2652
- colIndex: e[0].colStart,
2653
- rowIndex: e[0].rowStart
2654
- };
2655
- }
2656
- let m = e.createCellComparator(t?.axis, t?.reverse);
2657
- delete (t = { ...t }).from;
2658
- let h = () => {
2659
- if (!p && f.done && (c && o === a ? p = !0 : r ? (o++, o > n.length - 1 && (o = 0, c = !0)) : (o--, o < 0 && (o = n.length - 1, c = !0)), i && c && (p = !0), p || l || !c || o !== a || (p = !0), !p)) {
2660
- s = n[o], u = s.find(t);
2661
- let e = f;
2662
- return f = u.next(), e;
2663
- }
2664
- if (!p && c && o === a && (f.done || !l || !f.done && m(f.value.getCoords(), l) >= 0) && (p = !0), p) {
2665
- let e = f;
2666
- return f = Se, e;
2667
- }
2668
- let e = f;
2669
- return f = u.next(), e;
2670
- };
2671
- return { next: () => {
2672
- let e = h();
2673
- for (; !p && e.done;) e = h();
2674
- return e;
2675
- } };
2676
- }
2677
- replace(e, t, n) {
2678
- let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", u = typeof t == "string" ? de(t) : null, f = n?.description ?? l("op.replace"), p = this._transactions.beginCommit({ description: f });
2679
- try {
2680
- let f = null, m = null, h = e.next();
2681
- for (; !h.done && r < o;) {
2682
- let o = h.value, s = o.getSheet();
2683
- s !== f && (f = s, m !== null && m.apply(), m = f.getEntireRange().createSparseBuilder({
2684
- axis: n?.axis,
2685
- allowUnorderedWrites: !0
2686
- }));
2687
- let c = a ? t(o) : t;
2688
- c !== void 0 && c !== o && (m.push(o, c), r++, i = o), h = e.next();
2689
- }
2690
- m?.apply(), r === 1 && o === 1 && i && (c = i.getAddress()), r === 0 ? p.rollback() : p.commit({ description: n?.description ?? (s ? u === null ? l("op.replaceAll") : d("op.replaceAllWith", { value: u }) : c ? u === null ? d("op.replaceAt", { address: c }) : d("op.replaceAtWith", {
2691
- address: c,
2692
- value: u
2693
- }) : u === null ? l("op.replace") : d("op.replaceWith", { value: u })) });
2694
- } catch (e) {
2695
- throw p.rollback(), e;
2696
- }
2697
- return {
2698
- count: r,
2699
- last: i
2700
- };
2701
- }
2702
- _nextSheetIndex(e, t = this._getSheetRefs()) {
2703
- let n = t.length;
2704
- return n === 1 ? 0 : (e === void 0 && (e = this.getSelectedSheetIndex()), (e = Math.max(0, Math.min(e, n - 1))) >= n - 1 ? 0 : e + 1);
2705
- }
2706
- _prevSheetIndex(e, t = this._getSheetRefs()) {
2707
- let n = t.length;
2708
- return n === 1 ? 0 : (e === void 0 && (e = this.getSelectedSheetIndex()), (e = Math.max(0, Math.min(e, n - 1))) <= 0 ? n - 1 : e - 1);
2709
- }
2710
- getNextSheet(e) {
2711
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2712
- let t = this._getSheetRefs();
2713
- return t[this._nextSheetIndex(e, t)]?.sheet ?? null;
2714
- }
2715
- getPreviousSheet(e) {
2716
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2717
- let t = this._getSheetRefs();
2718
- return t[this._prevSheetIndex(e, t)]?.sheet ?? null;
2719
- }
2720
- async _duplicateSheet(e) {
2721
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2722
- if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2723
- let t = this._getSheetRefs(), n = this.getSelectedSheetIndex(), r = null;
2724
- if (e) {
2725
- if (r = this._getSheetRef(e), !r) throw new h(Z(r));
2726
- } else r = t[n];
2727
- if (!r) return null;
2728
- let i = r.sheet, a = this._strings.beginPersist(), o = this.getResources().beginPersist(), s = this.getStyles().beginPersist(), c = null, l = this.beginCommit(d("op.duplicateNamed", { name: i.getName() }));
2729
- try {
2730
- let e = this._getState().refsByInstance.get(i), r = await i.toJSON(), a = t.length + 1, o = this.findValidSheetName(e.name), s = this._createSheet(a, o, e.visibility, n, void 0, r);
2731
- this._tellSheets(), this._emitter.notify("onSheetsChange"), c = s, l.commit();
2732
- } catch (e) {
2733
- throw l.rollback(), e;
2734
- } finally {
2735
- s.endPersist(), o.endPersist(), a.endPersist();
2736
- }
2737
- return c;
2738
- }
2739
- _createRange(e, t) {
2740
- let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope, R.Visibility.VeryHidden) : null;
2741
- if (!r) {
2742
- let e = this.getSelectedSheet();
2743
- return e ? (delete n?.scope, xn(n, n ? {
2744
- scope: Qe,
2745
- ...e.getEntireRange().getCoords()
2746
- } : null)) : void console.warn(d("error.workbook.noVisibleRefs"));
2747
- }
2748
- let i = r.sheet, a = null;
2749
- return t && (a = { getOptions: t }), new On(e, P(i), this, a);
2750
- }
2751
- _createRanges(e, t) {
2752
- let n = this.getSelectedSheet(), r = null;
2753
- return t && (r = { getOptions: t }), new Dn(e, P(n), this, r);
2754
- }
2755
- getRange(e, t) {
2756
- if (e === void 0) return this.getSelectedRange(t);
2757
- try {
2758
- let n = this._rangesAddressToCoords(e);
2759
- if (n.length !== 1) throw new h(d("error.address.singleRangeOnlyAlt"));
2760
- return this._createRange(n[0], t);
2761
- } catch (t) {
2762
- throw t instanceof f ? new f(t.message) : new h(t.message ?? qe(e));
2763
- }
2764
- }
2765
- getCell(e) {
2766
- if (e === void 0) return this.getSelectedCell();
2767
- let t = this.getRange(e);
2768
- if (t.size > 1) throw new h(d("error.address.singleCellOnly"));
2769
- return t.getCell();
2770
- }
2771
- getRanges(e, t) {
2772
- let n = this._rangesAddressToCoords(e);
2773
- if (n.length === 0) throw new h(qe(e));
2774
- return this._createRanges(n, t);
2775
- }
2776
- _createGraphRanges(e, t) {
2777
- let n = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
2778
- for (let e = 0; e < t.length; e++) {
2779
- let i = t[e], a = (i.sheetName ? this._getSheetRef(i.sheetName, R.Visibility.VeryHidden) : null)?.sheet ?? this.getSelectedSheet();
2780
- a && n.push(new ce(i, r, P(a), null));
2781
- }
2782
- for (let t = 0; t < e.length; t++) n.push(e[t]);
2783
- return n.length === 0 ? null : new Dn(n, P(this.getSelectedSheet()), this, null);
2784
- }
2785
- getStats(e) {
2786
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2787
- let t = this._getSheets(R.Visibility.VeryHidden), n = t.length;
2788
- if (n === 1) return t[0].getStats(e);
2789
- let r = Array(n);
2790
- for (let i = 0; i < n; i++) r[i] = t[i].getStats(e);
2791
- return new nn(r);
2792
- }
2793
- _activeRangeCoords() {
2794
- let e = this.getSelectedSheet(), t = e.getSelection().getRanges().getCoords(), n = e.getName(), r = t.length, i = Array(r);
2795
- for (let e = 0; e < r; e++) {
2796
- let r = t[e];
2797
- i[e] = {
2798
- colStart: r.colStart,
2799
- colEnd: r.colEnd,
2800
- rowStart: r.rowStart,
2801
- rowEnd: r.rowEnd,
2802
- scope: n
2803
- };
2804
- }
2805
- return i;
2806
- }
2807
- getSelectedRange(e) {
2808
- return this.getRange(this._activeRangeCoords()[0], e);
2809
- }
2810
- getSelectedRanges(e) {
2811
- return this.getRanges(this._activeRangeCoords(), e);
2812
- }
2813
- getSelectedCell() {
2814
- return this.getSelectedSheet().getSelectedCell();
2815
- }
2816
- _rangesAddressToCoords(e, t = !0, n = R.Visibility.Hidden) {
2817
- if (!e) throw new h(d("error.address.noAddress"));
2818
- let r = this.getSelectedSheet(), i = { ...r?.getEntireRange().getCoords() }, a = r?.getName();
2819
- if (a && (i.scope = a), typeof e == "string") {
2820
- let t = e.trim().toLowerCase();
2821
- if (t === "r" || t === "c") {
2822
- let n = this.getSelectedCell().getCoords(), r = {};
2823
- t === "r" ? r.rowStart = r.rowEnd = n.rowIndex : r.colStart = r.colEnd = n.colIndex, e = r;
2824
- }
2825
- }
2826
- let o = this, s = et(e, i, fe, (e) => {
2827
- if (!t) return null;
2828
- if (typeof e == "string") {
2829
- let t = o.getNames().getByName(e)?.getRanges?.();
2830
- if (t) return t.getCoords();
2831
- }
2832
- throw new h(`Invalid sheet reference '${e}'.`);
2833
- }), c = s.length;
2834
- for (let e = 0; e < c; e++) this._validateCoords(s[e], n);
2835
- return s;
2836
- }
2837
- _validateCoords(t, n = R.Visibility.Visible, r = d("error.sheet.oobRange")) {
2838
- if (t === null) return;
2839
- let i = this.getSheet(t.scope, n).getEntireRange().getCoords();
2840
- if (!e.isRangeWithinRange(t, i)) throw new f(r);
2841
- if (t.rowEnd < t.rowStart || t.colEnd < t.colStart) throw new h(d("error.address.invalidRangeInverted"));
2842
- }
2843
- _updateSheetRef(e, t) {
2844
- let n = this._getState(), r = [...n.sheetRefsAll];
2845
- r[this._getOffsetForId(e.id, n.sheetRefsAll)] = t, this._updateSheetRefStates(r);
2846
- let i = new Map(n.refsById);
2847
- i.set(e.id, t);
2848
- let a = e.name.toLowerCase(), o = t.name.toLowerCase(), s = new Map(n.refsByLowerCaseName);
2849
- s.delete(a), s.set(o, t);
2850
- let c = new Map(n.sheetsByLowerCaseName), l = c.get(a);
2851
- c.delete(a), c.set(o, l);
2852
- let u = new Map(n.refsByInstance);
2853
- return u.set(l, t), this._updateState({
2854
- refsById: i,
2855
- refsByLowerCaseName: s,
2856
- sheetsByLowerCaseName: c,
2857
- refsByInstance: u
2858
- }), this._tellSheets(), t;
2859
- }
2860
- _setSheetName(e, t, n) {
2861
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2862
- if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2863
- let r = this._getSheetRef(e);
2864
- if (!r) throw new h(Z(e));
2865
- if (t === r.name) return r.sheet;
2866
- if ((t = this._validateNewSheetName(t)) == null) throw new h(d("error.workbook.sheetNameNotProvided"));
2867
- let i = Object.freeze({
2868
- ...r,
2869
- name: t
2870
- }), a = null, o = this.beginCommit(l("op.renameSheet"));
2871
- try {
2872
- let e = this._updateSheetRef(r, i);
2873
- this._adjustSheetNamesIfRequired(), this._sheetOnNameChange.forEach((e, t) => {
2874
- r.id === t && e();
2875
- }), this._emitter.notify("onSheetsChange"), r.id === this.getView().getActiveSheetId() && this._emitter.notify("onSelectionChange"), a = e.sheet, o.commit(n);
2876
- } catch (e) {
2877
- throw o.rollback(), e;
2878
- }
2879
- return a;
2880
- }
2881
- _setSheetVisibility(e, t = R.Visibility.Visible, n) {
2882
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2883
- if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2884
- let r = this._getSheetRef(e, R.Visibility.VeryHidden);
2885
- if (!r) return null;
2886
- if (t === r.visibility) return;
2887
- let i = null, a = "";
2888
- t === R.Visibility.Visible ? a = l("op.unhideSheet") : t === R.Visibility.Hidden ? a = l("op.hideSheet") : t === R.Visibility.VeryHidden && (a = l("op.veryHideSheet"));
2889
- let o = this.beginCommit(a);
2890
- try {
2891
- let e = this._getState().sheetRefsVisible;
2892
- if (t !== R.Visibility.Visible && e.length === 1 && e[0].id === r.id) throw new h(d("error.workbook.sheetOne"));
2893
- let a = {
2894
- ...r,
2895
- visibility: t
2896
- }, s = -1;
2897
- t !== R.Visibility.Visible && (s = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, a).sheet, t !== R.Visibility.Visible && this._adjustRemoveSelectionIfRequired(s, r.id), this._adjustSheetNamesIfRequired(), o.commit(n);
2898
- } catch (e) {
2899
- throw o.rollback(), e;
2900
- }
2901
- return this._sheetOnVisibilityChange.forEach((e, t) => {
2902
- r.id === t && e();
2903
- }), this._emitter.notify("onSheetsChange"), i;
2904
- }
2905
- _moveSheet(e, t, n) {
2906
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2907
- if (!this.getProtection().isStructureAllowed()) throw new p(d("error.workbook.protection"));
2908
- let r = null, i = this.beginCommit(d("op.moveSheetNamed", { name: e.name }));
2909
- try {
2910
- let a = this._getState(), o = a.sheetRefsVisible;
2911
- if (t < 0 || t > o.length - 1) throw new h(`Invalid to index: ${t}`);
2912
- let s = this.getView().getActiveSheetId(), c = a.sheetRefsAll, l = this._getOffsetForId(e.id, c), u = this._getOffsetForId(o[t].id, c);
2913
- if (l === u) return;
2914
- let d = c[l], f = [...c];
2915
- f.splice(l, 1), f.splice(u, 0, d), this._updateSheetRefStates(f), this._calculation._replaceSheetSpans?.(c.map((e) => e.sheet.getId()), f.map((e) => e.sheet.getId()), d.sheet.getId()), this._adjustSheetNamesIfRequired(), this._sheetOnIndexChange.forEach((e, t) => {
2916
- t >= l && t <= u && e();
2917
- }), this._tellSheets(), this._emitter.notify("onSheetsChange"), r = d.sheet, this._recordActiveSheet(i, s, this.getView().getActiveSheetId()), i.commit(n);
2918
- } catch (e) {
2919
- throw i.rollback(), e;
2920
- }
2921
- return r;
2922
- }
2923
- _setSelectedSheet(e) {
2924
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
2925
- let t = this._getSheetRef(e);
2926
- if (!t) throw new h(Z(e));
2927
- let n = null;
2928
- return t.visibility !== R.Visibility.Visible && this._setSheetVisibility(t, R.Visibility.Visible), this._view.setActiveSheetId(t.id), n = t.sheet, n;
2929
- }
2930
- getProtection() {
2931
- return this._protection;
2932
- }
2933
- getCodeName() {
2934
- return this._codeName;
2935
- }
2936
- getNames() {
2937
- return this._names;
2938
- }
2939
- getCalculation() {
2940
- return this._calculation;
2941
- }
2942
- getFonts() {
2943
- return G.getShared();
2944
- }
2945
- createFormula(e, t, n) {
2946
- return this.getCalculation().createFormula(e, t, n);
2947
- }
2948
- evaluate(e, t) {
2949
- return this.getCalculation().evaluate(e, t);
2950
- }
2951
- async whenCalculationReady() {
2952
- let e = this._starting;
2953
- return e ? e.then(() => this.getCalculation().ready()) : this.getCalculation().ready();
2954
- }
2955
- getScripts() {
2956
- return this._scripts ||= this._createScripts(), this._scripts;
2957
- }
2958
- getModules() {
2959
- return this.getScripts().getModules();
2960
- }
2961
- _notifyAllChange() {
2962
- this._emitter.notify("onSheetsChange"), this._emitter.notify("onSelectedSheetChange"), this._emitter.notify("onViewChange");
2963
- }
2964
- addListeners(e, t) {
2965
- return this._emitter.addListeners(e, t);
2966
- }
2967
- _sheetToWBEvent(e) {
2968
- let t = this;
2969
- return (n) => {
2970
- let r = () => {
2971
- let e = n.getSource();
2972
- if (e.isInvalid()) return e;
2973
- if (e.isICellRanges) {
2974
- let n = [...e.getCoords()], r = n.length;
2975
- for (let t = 0; t < r; t++) {
2976
- let r = n[t];
2977
- !r.scope && e.getSheet().getName() && (n[t] = {
2978
- ...r,
2979
- scope: e.getSheet().getName()
2980
- });
2981
- }
2982
- return t.getRanges(n);
2983
- }
2984
- if (e.isICellRange) {
2985
- let n = e.getCoords(), r = e.getSheet().getName();
2986
- return t.getRange({
2987
- ...n,
2988
- scope: r
2989
- });
2990
- }
2991
- };
2992
- e({
2993
- getSource: r,
2994
- trigger: n.trigger,
2995
- getFrom: () => t.getRanges(n.getFrom()),
2996
- getTo: () => t.getRange(n.getTo()),
2997
- isDataChange: n.isDataChange,
2998
- getTransactionId: n.getTransactionId,
2999
- isUndo: n.isUndo,
3000
- toString: () => `WorkbookRangeEvent: ('${n.trigger}', ${r().toString()})`,
3001
- timeStamp: Date.now()
3002
- });
3003
- };
3004
- }
3005
- _holdPivotCaches() {
3006
- let e = this._pivotCaches;
3007
- if (e.length === 0) return;
3008
- let t = (e) => {
3009
- let t = this._getSheetRef(e)?.sheet;
3010
- return t ? t._contentAddWatch(() => null) : null;
3011
- };
3012
- for (let n = 0; n < e.length; n++) e[n]._hold(t);
3013
- }
3014
- _fromJSON(e, t) {
3015
- if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || e.sheets.length === 0) throw new h(d("error.workbook.sheetOne"));
3016
- e.theme && (this._theme = new me(e.theme), this._styles.setTheme(this._theme));
3017
- let n = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist();
3018
- try {
3019
- n.fromJSON(e.strings), r.fromJSON(e.resources), i.fromJSON(e.styles), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view ||= {};
3020
- let a = [], o = e.pivotCaches;
3021
- if (o) {
3022
- let e = r.fromResourceId.bind(r);
3023
- for (let t = 0; t < o.length; t++) {
3024
- let n = o[t];
3025
- n && typeof n.cacheId == "number" && a.push(new on(n.cacheId, Fe.fromJSON(n.part, e)));
3026
- }
3027
- }
3028
- this._pivotCaches = a, this._people.fromJSON(e.people);
3029
- let s = e.sheets, c = s.length, l = e.view.activeSheetId ?? null;
3030
- l !== null && (l = Math.min(Math.max(0, l), c - 1));
3031
- let u = null, d = null;
3032
- this._isLoadingSheets = !0;
3033
- for (let e = 0; e < c; e++) {
3034
- let n = s[e], r = n.visibility || R.Visibility.Visible, i = e;
3035
- d = i, r === R.Visibility.Visible ? u === null && (u = i) : l !== null && l === i && (l = null);
3036
- try {
3037
- this._createSheet(i, n.name, r, e, n.sheetId, n.sheet, t?.[e]);
3038
- } catch (e) {
3039
- throw this._isLoadingSheets = !1, e;
3040
- }
3041
- }
3042
- this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: d }), e.view.activeSheetId = l ?? u, this.setView(new pn({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
3043
- let f = this;
3044
- this._protection = new hn(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
3045
- f._emitter.notify("onProtectionChange", { source: e });
3046
- } }), this._emitter.notify("onLoad");
3047
- } finally {
3048
- i.endPersist(), r.endPersist(), n.endPersist();
3049
- }
3050
- }
3051
- _createScripts(e) {
3052
- let t = this;
3053
- return new ln({
3054
- transactions: this._transactions,
3055
- json: e,
3056
- workbook: t,
3057
- getBuiltInFunctions: () => t._calculation?.getFunctions(),
3058
- onAdd: (e, n) => {
3059
- let r = t._calculation;
3060
- r.getStatus() !== Xe.Status.Off && r.start().then(async () => {
3061
- let e = n.getFunctions().getItems({
3062
- type: "formula",
3063
- includeHidden: !0
3064
- }), t = e.length;
3065
- for (let n = 0; n < t; n++) {
3066
- let t = e[n];
3067
- try {
3068
- await this._calculation.getFunctions().add(t);
3069
- } catch (e) {
3070
- m.error(e?.message ?? String(e), e);
3071
- }
3072
- }
3073
- }).catch(() => {});
3074
- },
3075
- onRemove: (e, t) => {}
3076
- });
3077
- }
3078
- async toJSON(e) {
3079
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
3080
- await Promise.resolve(this._starting);
3081
- let t = this.getCalculation();
3082
- t.getStatus() !== Xe.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
3083
- let n = { sheets: [] }, r = e?.ignoreStyles ?? !1;
3084
- if (!r) {
3085
- let e = this._theme.toJSON();
3086
- (e ? Object.keys(e).length : 0) > 0 && (n.theme = e);
3087
- }
3088
- if (this._scripts) {
3089
- let e = this._scripts.toJSON();
3090
- e && Object.keys(e).length > 0 && (n.modules = e);
3091
- }
3092
- this._isDate1904 && (n.date1904 = !0), this._codeName && (n.codeName = this._codeName), this._updateLinks && (n.updateLinks = this._updateLinks), this._locale && (n.locale = this._locale), this._localeOverrides && (n.localeOverrides = this._localeOverrides);
3093
- let i = e?.resources ?? "embed", a = i === "ignore", o = this._strings.beginPersist(), s = a ? null : this._resources.beginPersist(), c = this._styles.beginPersist();
3094
- try {
3095
- let t = this._getSheetRef(this.getSelectedSheetIndex()).id, l = t, u = null, d = this._getState(), f = d.sheetRefsAll, p = d.sheetsById, m = f.length;
3096
- for (let r = 0; r < m; r++) {
3097
- let i = f[r], a = r + 1, o = await p.get(i.id).toJSON(e), s = {
3098
- name: i.name,
3099
- sheet: o
3100
- };
3101
- i.sheetId !== void 0 && (s.sheetId = i.sheetId), i.visibility === R.Visibility.Visible ? u === null && (u = a) : s.visibility = i.visibility, i.id === t && (l = a), n.sheets.push(s);
3102
- }
3103
- if (!r) {
3104
- let e = c.toJSON();
3105
- e && Object.keys(e).length > 0 && (n.styles = e);
3106
- }
3107
- let h = this.getProtection().toJSON();
3108
- h && (n.protection = h);
3109
- let g = this._calculation.toJSON();
3110
- Object.keys(g).length > 0 && (n.calc = g);
3111
- let _ = await o.toJSONAsync();
3112
- _ && _.length > 0 && (n.strings = _);
3113
- let v = this._calculation.getExternalBooks().toJSON();
3114
- v && (n.externalBooks = v);
3115
- let y = this._pivotCaches;
3116
- if (y.length > 0) {
3117
- let e = s ? s.toResourceId.bind(s) : () => null, t = /* @__PURE__ */ new Set();
3118
- for (let e of this.getPivotTables()) t.add(e.getCacheId());
3119
- let r = [];
3120
- for (let n = 0; n < y.length; n++) t.has(y[n].cacheId) && r.push(y[n].toJSON(e));
3121
- r.length > 0 && (n.pivotCaches = r);
3122
- }
3123
- let b = this._people.toJSON();
3124
- if (b && (n.people = b), !a) {
3125
- let e = await s.toJSONAsync(typeof i == "function" ? i : void 0);
3126
- e && e.length > 0 && (n.resources = e);
3127
- }
3128
- let x = this._calculation.getNamedFormulas().toJSON();
3129
- x && x.length > 0 && (n.names = x);
3130
- let S = this._view.toJSON();
3131
- S && (l === u ? delete S.activeSheetId : S.activeSheetId = l, Object.keys(S).length > 0 && (n.view = S));
3132
- } finally {
3133
- c.endPersist(), a || s.endPersist(), o.endPersist();
3134
- }
3135
- return this._emitter.notify("onSave", { params: n }), n;
3136
- }
3137
- isClosed() {
3138
- return this._closed;
3139
- }
3140
- close() {
3141
- if (this._closed) return;
3142
- this._emitter.notify("onClose");
3143
- let e = this._getState();
3144
- e.listenersSheets.forEach((e) => {
3145
- e();
3146
- }), e.listenersSheets.clear();
3147
- let t = e.sheetRefsAll;
3148
- for (let e = t.length - 1; e >= 0; e--) try {
3149
- t[e].sheet.close();
3150
- } catch (e) {
3151
- console.warn("error on close", e);
3152
- }
3153
- this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof pt && this._originProvider.release(), this._closed = !0;
3154
- }
3155
- beginCommit(e) {
3156
- if (this._closed) throw Error(d("error.workbook.modelClosed"));
3157
- return this._beginCommit(typeof e == "string" ? { description: e } : e);
3158
- }
3159
- doBatch(e, t) {
3160
- let n = this;
3161
- return t = typeof t == "string" ? { description: t } : {
3162
- description: l("op.updateWorkbook"),
3163
- ...t
3164
- }, this._transactions.doBatch(e, t, (e, t) => {
3165
- e.getDepth() === 0 && (n._lastTransactionUUID = e.getId());
3166
- });
3167
- }
3168
- _beginCommit(e) {
3169
- let t = this;
3170
- return this._transactions.beginCommit(typeof e == "string" ? { description: e } : e, (e) => {
3171
- e.getDepth() === 0 && (t._lastTransactionUUID = e.getId());
3172
- });
3173
- }
3174
- _getState() {
3175
- return this._transactions.getState(this._id);
3176
- }
3177
- _updateState(e, t = l("op.updateWorkbook"), n) {
3178
- if (!e) return;
3179
- let r = this._beginCommit(t);
3180
- try {
3181
- r.updateState(this._id, e), r.commit(n);
3182
- } catch (e) {
3183
- throw r.rollback(), e;
3184
- }
3185
- }
3186
- get options() {
3187
- return this._options;
3188
- }
3189
- get [Symbol.toStringTag]() {
3190
- return "[Workbook]";
3191
- }
3192
- toString() {
3193
- return `[${this.getName() ?? "(untitled)"}]`;
3194
- }
3195
- get isIWorkbook() {
3196
- return !0;
3197
- }
3198
- }, jn = { address: null }, Mn = class {
3199
- constructor() {
3200
- this._readFormats = [], this._writeFormats = [], this._encryptions = [];
3201
- }
3202
- async registerReadFormat(e) {
3203
- this._readFormats = await this._registerFormatType(e, this._readFormats);
3204
- }
3205
- async registerWriteFormat(e) {
3206
- this._writeFormats = await this._registerFormatType(e, this._writeFormats);
3207
- }
3208
- async registerEncryption(e) {
3209
- if (!e) throw Error("encryption must be provided.");
3210
- if (!e.key) throw Error("encryption.key must be provided.");
3211
- let t = e.key.toLowerCase(), n = this._encryptions.findIndex((e) => e.key.toLowerCase() === t);
3212
- if (n !== -1) {
3213
- let t = [...this._encryptions];
3214
- t[n] = e, this._encryptions = Object.freeze(t);
3215
- } else this._encryptions = Object.freeze([...this._encryptions, e]);
3216
- }
3217
- async getEncryption(e) {
3218
- return this.peekEncryption(e);
3219
- }
3220
- peekEncryption(e) {
3221
- if (!e) return this._encryptions[0] ?? null;
3222
- let t = e.toLowerCase();
3223
- return this._encryptions.find((e) => e.key.toLowerCase() === t) ?? null;
3224
- }
3225
- async detectEncryption(e) {
3226
- for (let t of this._encryptions) if (await t.detect(e)) return t;
3227
- return null;
3228
- }
3229
- async getReadFormats(e) {
3230
- return e ? this._filterFormats(e, this._readFormats) : [...this._readFormats];
3231
- }
3232
- async getWriteFormats(e) {
3233
- return this._writeFormats ? e ? this._filterFormats(e, this._writeFormats) : [...this._writeFormats] : [];
3234
- }
3235
- async _registerFormatType(e, t) {
3236
- return this._registerFormatTypeSync(e, t);
3237
- }
3238
- _registerFormatTypeSync(e, t) {
3239
- if (!e) throw Error("format must be provided.");
3240
- if (!e.key) throw Error("format.key must be provided.");
3241
- let n = e.key.toLowerCase(), r = t.findIndex((e) => e.key.toLowerCase() === n);
3242
- if (r !== -1) {
3243
- let n = [...t];
3244
- return n[r] = e, Object.freeze(n);
3245
- }
3246
- return Object.freeze([...t, e]);
3247
- }
3248
- _filterFormats(e, t, n) {
3249
- if (!e || Object.keys(e).length === 0) {
3250
- if (!n) return [...t];
3251
- e = { ext: n };
3252
- }
3253
- let r = e.search?.toLocaleLowerCase();
3254
- return t.filter((t) => {
3255
- if (r) {
3256
- let e = t.key.toLocaleLowerCase().includes(r), n = !!t.exts && t.exts.some((e) => e.toLocaleLowerCase().includes(r)), i = !!t.mimeType && t.mimeType.toLocaleLowerCase().includes(r), a = !!t.tags && t.tags.some((e) => e.toLocaleLowerCase().includes(r)), o = !!t.description && t.description.toLocaleLowerCase().includes(r);
3257
- if (!(e || n || i || a || o)) return !1;
3258
- }
3259
- let i = e.ext || n;
3260
- if (i) {
3261
- let e = i.toLocaleLowerCase();
3262
- if (!t.exts.some((t) => t.toLocaleLowerCase() === e)) return !1;
3263
- }
3264
- if (e.mimeType && t.mimeType !== e.mimeType || e.key && t.key.toLocaleLowerCase() !== e.key.toLocaleLowerCase()) return !1;
3265
- if (e.tags) {
3266
- let n = t.tags || [];
3267
- if (!(typeof e.tags == "string" ? [e.tags] : e.tags).every((e) => n.includes(e))) return !1;
3268
- }
3269
- return !0;
3270
- });
3271
- }
3272
- }, $ = /* @__PURE__ */ new WeakMap(), Nn = (e) => !!e && typeof e == "object" && typeof e.getPath == "function" && typeof e.canWrite == "function", Pn = new class {
3273
- constructor() {
3274
- this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new y(this), this._registry = new Mn(), this._defaultStore = new ht(() => this.getWriteFormats(), () => this.getReadFormats());
3275
- }
3276
- getBackingStore() {
3277
- return this._backingStore ?? this._defaultStore;
3278
- }
3279
- setBackingStore(e) {
3280
- this._backingStore = e ?? null;
3281
- }
3282
- canWrite() {
3283
- return typeof this.getBackingStore().write == "function";
3284
- }
3285
- canRead() {
3286
- return typeof this.getBackingStore().read == "function";
3287
- }
3288
- async install(e) {
3289
- this._setInstalled.has(e) || (await e.register(this._registry), this._setInstalled.add(e));
3290
- }
3291
- addListeners(e, t) {
3292
- return this._emitter.addListeners(e, t);
3293
- }
3294
- addCommitListener(e) {
3295
- return this._emitter.addListeners({ onWrite: (t, n) => {
3296
- n.save && e.onCommit?.({
3297
- store: n.workbook.getTransactions(),
3298
- commitId: n.commitId
3299
- });
3300
- } });
3301
- }
3302
- async getReadFormats(e) {
3303
- return this._registry.getReadFormats(e);
3304
- }
3305
- async getWriteFormats(e) {
3306
- return this._registry.getWriteFormats(e);
3307
- }
3308
- getOrigin(e) {
3309
- return new B(e);
3310
- }
3311
- async read(e) {
3312
- let t = null;
3313
- if (typeof e == "string") e = { source: e };
3314
- else if (Nn(e)) {
3315
- let n = e.getPath();
3316
- if (!n) throw Error("Cannot read from an unbound origin (no path).");
3317
- dt(e) ? e = {
3318
- source: n,
3319
- asCopy: !0
3320
- } : (t = e, e = { source: n });
3321
- }
3322
- let n = e ?? {}, { source: r = null, ...i } = n, a = this.getBackingStore();
3323
- return (a.read ? a : this._defaultStore).read({
3324
- source: r,
3325
- options: i,
3326
- decode: (e, r) => this._decodeBuffer(e, r, n, t)
3327
- });
3328
- }
3329
- async _decodeBuffer(e, t = {}, n, r = null) {
3330
- let i = t.format, a = t.ext;
3331
- if (!i && !a) throw Error("Either format or file extension must be provided to determine read type.");
3332
- let o = (await this._registry.getReadFormats({
3333
- search: i,
3334
- ext: a
3335
- }))[0];
3336
- if (!o) throw new h(d("error.io.readFormatUnavailable", { format: i ?? a }));
3337
- let s = n?.typedCreateWorkbookOptions, c = s ? Object.keys(s).find((e) => e.toLowerCase() === o.key.toLowerCase()) : void 0, l = {
3338
- ...n,
3339
- ...c === void 0 ? void 0 : s[c]
3340
- };
3341
- delete l.typedCreateWorkbookOptions, delete l.source, delete l.asCopy;
3342
- let u = r ?? new B(t.absolutePath ?? null, {
3343
- name: t.name ?? null,
3344
- format: o.key,
3345
- size: t.size ?? null,
3346
- lastModified: t.lastModified ?? null,
3347
- canWrite: t.canWrite ?? !1
3348
- });
3349
- r instanceof B && r.update({
3350
- format: o.key,
3351
- size: t.size ?? null,
3352
- lastModified: t.lastModified ?? null
3353
- }), l.createWorkbookOptions = {
3354
- ...l.createWorkbookOptions || {},
3355
- origin: u
3356
- }, l.readonly !== void 0 && (l.createWorkbookOptions = {
3357
- readonly: l.readonly,
3358
- ...l.createWorkbookOptions
3359
- }, delete l.readonly), l.calcOnly && (l.createWorkbookOptions = {
3360
- disableLoadAutoFit: !0,
3361
- ...l.createWorkbookOptions
3362
- });
3363
- let f = await this._decrypt(e, u, l);
3364
- if (f === null) return null;
3365
- e = f.bytes;
3366
- let p = l?.progress?.onStart?.bind(l.progress);
3367
- p && await Promise.resolve(p(u, t.size));
3368
- try {
3369
- let t = await this._readArrayBuffer(e, o, l);
3370
- return f.password !== null && u.setPassword(f.password), l?.progress?.onComplete?.(u), this._emitter.notify("onRead", {
3371
- params: {
3372
- workbook: t,
3373
- origin: u
3374
- },
3375
- transactional: !1
3376
- }), t;
3377
- } catch (e) {
3378
- throw l?.progress?.onError?.(e), l?.progress?.onComplete?.(null), e;
3379
- }
3380
- }
3381
- async _decrypt(e, n, r) {
3382
- let i = await this._registry.detectEncryption(e);
3383
- if (n instanceof B && n.update({ encryption: i ? i.key : null }), !i) return {
3384
- bytes: e,
3385
- password: null
3386
- };
3387
- let a = null, o = async (t) => {
3388
- try {
3389
- return a = await i.decode(e, t), !0;
3390
- } catch (e) {
3391
- if (!(e instanceof u)) throw e;
3392
- return !1;
3393
- }
3394
- };
3395
- if (r?.password && await o(r.password)) return {
3396
- bytes: a,
3397
- password: r.password
3398
- };
3399
- if (!r?.onPassword) {
3400
- let e = n.getName();
3401
- throw new t(e ? d("error.io.passwordRequired", { name: e }) : d("error.io.passwordRequiredUnnamed"));
3402
- }
3403
- let s = await Promise.resolve(r.onPassword({
3404
- origin: n,
3405
- encryption: i.key,
3406
- validate: o
3407
- }));
3408
- if (s == null) return null;
3409
- if (a !== null || await o(s)) return {
3410
- bytes: a,
3411
- password: s
3412
- };
3413
- throw new u(d("error.io.passwordIncorrect"));
3414
- }
3415
- async writeArrayBuffer(e, t) {
3416
- if (!t?.format) throw Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
3417
- let n = (await this._registry.getWriteFormats({ search: t.format }))[0];
3418
- if (!n) throw new h(d("error.io.writeFormatUnavailable", { format: t.format }));
3419
- return this._writeArrayBuffer(e, n, t);
3420
- }
3421
- async write(e, t, n) {
3422
- return typeof t == "string" || Nn(t) ? this._write(e, t, !1, n) : this._write(e, e?.getOrigin?.(), !0, t ?? n);
3423
- }
3424
- async writeAs(e, t, n) {
3425
- if (!t) throw Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
3426
- return this._write(e, t, !0, n);
3427
- }
3428
- async _write(e, n, r, i) {
3429
- if (!e) throw Error("Workbook must be provided.");
3430
- if (!e.isIWorkbook) throw Error("Invalid workbook model provided. Must be an instance of IWorkbook.");
3431
- let a, o = typeof n == "string" ? this.getOrigin(n) : n, s = o.getFormat();
3432
- if ((i?.format || s) && (a = (await this._registry.getWriteFormats({ search: i?.format ?? s ?? void 0 }))[0]), a || o.getPath() && o.canWrite() && o.getExtension() || (a = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !a) throw new h(d("error.io.writeFormatUnresolved"));
3433
- let c = o.getExtension();
3434
- if (i?.format && c && o.getPath() && o.canWrite() && !a.exts.includes(c)) {
3435
- let e = (await this._registry.getWriteFormats({ ext: c }))[0];
3436
- if (e && e.key !== a.key) {
3437
- let e = o.getPath().split(/[/\\]/).pop();
3438
- throw new h(d("error.io.writeFormatMismatch", {
3439
- format: i.format,
3440
- file: e
3441
- }));
3442
- }
3443
- }
3444
- if (typeof n == "string") {
3445
- let e = o.getPath();
3446
- o = new B(z(e) ? e : `${e}.${a.exts[0]}`, { format: a.key });
3447
- }
3448
- let l = o.getEncryption(), u = e.getOrigin?.(), f = (o instanceof B ? o.getPassword() : null) ?? (u instanceof B ? u.getPassword() : null), p = o.isEncrypted() || (u?.isEncrypted() ?? !1), m = i?.password === void 0 ? f ?? (p ? void 0 : null) : i.password, g = null;
3449
- if (m === void 0) {
3450
- if (p) {
3451
- let e = o.getName();
3452
- throw new t(e ? d("error.io.passwordRequiredSave", { name: e }) : d("error.io.passwordRequiredSaveUnnamed"));
3453
- }
3454
- } else if (m !== null && (g = await this._registry.getEncryption(l), !g)) throw new h(d("error.io.encryptionUnavailable"));
3455
- let _ = `${o.getName() ?? d("workbook.defaultName")}.${a.exts[0]}`, v = i?.progress, y = !o.getPath() || !o.canWrite() || !!i?.prompt, b = !1, x = this, S = null, C = [], w = {
3456
- workbook: e,
3457
- format: a,
3458
- origin: o,
3459
- suggestedName: _,
3460
- prompt: i?.prompt,
3461
- async encode(t, n) {
3462
- let s = n ?? o;
3463
- await (async (e) => {
3464
- b || (b = !0, v?.onStart && await Promise.resolve(v.onStart(e)));
3465
- })(s), S = e.getTransactions?.()?.getCurrentCommit() ?? S;
3466
- let c = t ? (await x._registry.getWriteFormats({ search: t }))[0] ?? a : a, l = [], u = ((e, t) => ({
3467
- onStart: e?.onStart ? (t, n) => e.onStart(t, n) : void 0,
3468
- onProgress: e?.onProgress ? (t, n) => e.onProgress(t, n) : void 0,
3469
- onError: e?.onError ? (t) => e.onError(t) : void 0,
3470
- onComplete: e?.onComplete ? (t) => e.onComplete(t) : void 0,
3471
- onWarning: (n, r) => {
3472
- t.push({
3473
- message: n ?? "",
3474
- context: r
3475
- }), e?.onWarning?.(n, r);
3476
- }
3477
- }))(v, l), d = await x._writeArrayBuffer(e, c, {
3478
- ...i,
3479
- progress: u
3480
- }), f = $.get(s);
3481
- if (l.some((e) => !f?.has(e.message)) && i?.onWarnings) {
3482
- let t = await Promise.resolve(i.onWarnings({
3483
- workbook: e,
3484
- origin: s,
3485
- warnings: l,
3486
- save: r,
3487
- canCancel: !y
3488
- }));
3489
- if (!y && !1 === t) return null;
3490
- }
3491
- return C = l, g ? g.encode(d, m) : d;
3492
- }
3493
- }, T = null;
3494
- try {
3495
- let t = this.getBackingStore();
3496
- if (!t.write) throw Error("The active backing store is read-only (no write implementation).");
3497
- if (T = await t.write(w), T) {
3498
- if (m !== void 0 && T instanceof B && (T.setPassword(m), T.update({ encryption: g ? g.key : null })), C.length) {
3499
- let e = $.get(T) ?? /* @__PURE__ */ new Set();
3500
- for (let t of C) e.add(t.message);
3501
- $.set(T, e);
3502
- }
3503
- r && T !== e.getOrigin() && dt(e.getOrigin())?.setOrigin(T);
3504
- let t = S ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
3505
- this._emitter.notify("onWrite", {
3506
- params: {
3507
- workbook: e,
3508
- origin: T,
3509
- commitId: t?.getId() ?? null,
3510
- save: r
3511
- },
3512
- transactional: !1
3513
- });
3514
- }
3515
- v?.onComplete && await Promise.resolve(v.onComplete(T));
3516
- } catch (e) {
3517
- let t = e instanceof Error ? e : Error(String(e));
3518
- throw v?.onError && await Promise.resolve(v.onError(t)), v?.onComplete && await Promise.resolve(v.onComplete(null)), t instanceof h ? t : Error(d("error.io.writeFailed", { reason: t.message }), { cause: e });
3519
- }
3520
- return T;
3521
- }
3522
- _stripExtension(e) {
3523
- let t = z(e);
3524
- return t ? e.slice(0, e.length - t.length - 1) : e;
3525
- }
3526
- _baseName(e) {
3527
- if (!e) return null;
3528
- let t = e.split(/[?#]/)[0], n = t.split(/[/\\]/).pop() ?? t;
3529
- return this._stripExtension(n) || null;
3530
- }
3531
- async _writeArrayBuffer(e, t, n) {
3532
- if (!t) throw Error("A write format must be provided.");
3533
- let r = t.handler;
3534
- if (!r) throw Error(`Unable to resolve a write handler for '${t.key}'.`);
3535
- return r(e, {
3536
- ...n,
3537
- format: t.key
3538
- });
3539
- }
3540
- async _readArrayBuffer(e, t, n) {
3541
- if (!e) throw Error("ArrayBuffer must be specified.");
3542
- if (!t) throw Error("format must be specified.");
3543
- if (e.byteLength === 0) return new An(n?.createWorkbookOptions);
3544
- let r, i = t.handler;
3545
- if (!i) throw Error(`Unable to resolve a read handler for '${t.key}'.`);
3546
- try {
3547
- r = await i(e, n);
3548
- } catch (e) {
3549
- throw e instanceof h ? e : new h(d("error.io.readFailed", {
3550
- format: t.description ?? t.key,
3551
- reason: e?.message ?? String(e)
3552
- }), { cause: e });
3553
- }
3554
- return await Ee(), r;
3555
- }
3556
- get isIWorkbookIO() {
3557
- return !0;
3558
- }
3559
- }();
3560
- [
3561
- ".woff2",
3562
- ".woff",
3563
- ".ttf",
3564
- ".otf",
3565
- ".ttc"
3566
- ].map((e) => ({
3567
- suffix: e,
3568
- place: (e, t) => t ? `${t}/${e}` : e
3569
- })), gn ||= {}, _n ||= {}, Cn ||= {}, (wn ||= {}).Type = {
3570
- Button: "button",
3571
- CheckBox: "checkBox",
3572
- OptionButton: "optionButton",
3573
- ListBox: "listBox",
3574
- DropDown: "dropDown",
3575
- ScrollBar: "scrollBar",
3576
- Spinner: "spinner",
3577
- GroupBox: "groupBox",
3578
- Label: "label",
3579
- EditBox: "editBox",
3580
- Dialog: "dialog",
3581
- Unknown: "formControl"
3582
- }, (Tn ||= {}).DropStyle = {
3583
- Combo: "combo",
3584
- ComboEdit: "comboEdit",
3585
- Simple: "simple"
3586
- };
3587
- var Fn = class extends Ke {
3588
- constructor(e) {
3589
- super(e);
3590
- }
3591
- _initializeOptions(e) {
3592
- return e = {
3593
- ...e,
3594
- coords: {
3595
- colStart: 0,
3596
- rowStart: 0,
3597
- colEnd: (e?.size?.width ?? 5) - 1,
3598
- rowEnd: (e?.size?.height ?? 5) - 1
3599
- },
3600
- getRanges: (e) => new he(null)
3601
- }, super._initializeOptions(e);
3602
- }
3603
- }, In = "0.8.0-beta.10";
3604
- export { Ct as _, zt as a, dn as c, G as d, ut as f, fn as g, In as h, B as i, $t as l, cn as m, Pn as n, Ut as o, st as p, An as r, Zt as s, It as t, Fn as u };