@sheetxl/studio-vanilla 0.8.0-beta.6 → 0.8.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{CRe8XsjS3Z5BTMZY.cjs → -fvFQTbevbuRecGW.cjs} +1 -1
- package/browser/cjs/{pWgqqjBa4jIrxyvw.cjs → 1bLr8XHpEtM2MjCk.cjs} +1 -1
- package/browser/cjs/5drI55_IEkX8nx_B2.cjs +8 -0
- package/browser/cjs/{9A9bktS1huVGPy37.cjs → B0gP-9ZXQb_QZ8Jm.cjs} +1 -1
- package/browser/cjs/{Dnnr8nzAEuAjhOeE.cjs → B6T_y0ce8SbjxV-I.cjs} +1 -1
- package/browser/cjs/{BkTSml2am1P7ZUlu2.cjs → B6k5f9VFbYVTvfVE2.cjs} +1 -1
- package/browser/cjs/{B-t_DeDrhWtCFPcI.cjs → BCaRwsX64XTvboxS.cjs} +43 -43
- package/browser/cjs/{DcpQZyU6Dg7WiWza2.cjs → BCm6d5TSyOWIner52.cjs} +1 -1
- package/browser/cjs/BDnKbuPYvsWYP-3w.cjs +14 -0
- package/browser/cjs/{JrW6on2mNQQ3NXKs.cjs → BInT189S2DdzvIhp.cjs} +1 -1
- package/browser/cjs/BPjFqEo3wA9GJNPE.cjs +1 -0
- package/browser/cjs/BPtsVWnUZPVQBm21.cjs +22 -0
- package/browser/cjs/{C0_3HFQaCnHzWrhv.cjs → BTr4bJxe0-3IBHPb.cjs} +2 -2
- package/browser/cjs/{CMOeL2fuTqmW07BD.cjs → Be1L2JmTBCRa52VW.cjs} +650 -694
- package/browser/cjs/{B5Fa5-cHf1VTfozN.cjs → BjQ-fIDc7Z3qMcPY.cjs} +1 -1
- package/browser/cjs/{Xd62BMjBfdi9qJzV.cjs → Bzd1x5C01LQtiSb0.cjs} +1 -1
- package/browser/cjs/C03SW3gXtIOgEr3A.cjs +43 -0
- package/browser/cjs/C2THZMKIDIU8VSFH2.cjs +1 -0
- package/browser/cjs/{CCJvU8Lb84A0y65M.cjs → C5RvrnAGhfLzpBNO.cjs} +1 -1
- package/browser/cjs/C9RqCKNI0CK1VHnE2.cjs +1 -0
- package/browser/cjs/{CraHFKICbV6fuCQ-2.cjs → CA37AwwfHsjvbZT62.cjs} +1 -1
- package/browser/cjs/{BDkTCsmZyozmgWz4.cjs → CEEuvrhhkW5TgJnc.cjs} +3 -3
- package/browser/cjs/{NZ9JmwEmwyGM6S7n2.cjs → CLEx2DRw3kmsrkt82.cjs} +1 -1
- package/browser/cjs/{6V1LlorEUj_nSWnU.cjs → CZTLmhvlTal7rnXb2.cjs} +1 -1
- package/browser/cjs/CgfPOPhwYwiOfpBy.cjs +1 -0
- package/browser/cjs/CkIFp77GQAFoyjtq.cjs +1 -0
- package/browser/cjs/{B3dsg6O4Ka8NpEf32.cjs → CsGKVtbBtGlgkYJw2.cjs} +1 -1
- package/browser/cjs/Ct45LEBcOGxMU-VE2.cjs +1 -0
- package/browser/cjs/{CiJ7AoUXfIEucqrd.cjs → D3gV1sduXTeibviI.cjs} +1 -1
- package/browser/cjs/{DUCViiS92Z2CCWkA2.cjs → DB7uY0V24myTsCAO2.cjs} +1 -1
- package/browser/cjs/{BqFUfIMN5tnsMTIi.cjs → DKdgEj89ChMWaDQz.cjs} +1 -1
- package/browser/cjs/DRgeBTxGZFx-ukKA.cjs +1 -0
- package/browser/cjs/{C0m8l7d1fHu9CO2M.cjs → DXGjBmROptbxP3On.cjs} +2 -2
- package/browser/cjs/DXJEany3J8zAcDA5.cjs +32 -0
- package/browser/cjs/{Cgf6tLDBJ3BvtYtr.cjs → Dgxx0CvoFxJobjxY.cjs} +1 -1
- package/browser/cjs/{D-8fngmgZJyw1BQz2.cjs → DnMx7IQDtha_NuLB2.cjs} +1 -1
- package/browser/cjs/Dx79LP1-YCQg8B872.cjs +1 -0
- package/browser/cjs/GN7MZBww4pHIrihk.cjs +5 -0
- package/browser/cjs/{U7_s3uvd0_Kashf9.cjs → HR_JYXh2W9xtKFL2.cjs} +1 -1
- package/browser/cjs/ImnRKBYtNpv7bEa7.cjs +3 -0
- package/browser/cjs/{KMBs7XyoINajcR-L2.cjs → O6F5xVsoF2hTiprv2.cjs} +1 -1
- package/browser/cjs/{Ce0Jppzi_9bXU35v2.cjs → YGQWfCXmA-65lrhA2.cjs} +1 -1
- package/browser/cjs/{vjMDGGRVqaFnYj5r2.cjs → ahQaPMczi7feo-ae2.cjs} +1 -1
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/{C6LCqtqoz6Kag2h42.cjs → namqZsBygpcj2yf42.cjs} +1 -1
- package/browser/cjs/{CYXi2zJwNRVFBiL12.cjs → voiGKFLz_nq_RGBY2.cjs} +1 -1
- package/browser/esm/{ChAYrf_SM2XZlpZ9.mjs → 1Xvtgcae3VR_6R8I.mjs} +10 -10
- package/browser/esm/{Bw8V5WPmS2yA3Nli2.mjs → 4YGRiYPupFKq8BfP2.mjs} +1 -1
- package/browser/esm/{CIwWrEXfSN_3khPI.mjs → 5DCw2IuKPn_ERodw2.mjs} +1 -1
- package/{cdn/assets/CUQpAR2c-_Pwu2Eu.js → browser/esm/9cn1ewqq1BWmzgIL2.mjs} +1 -1
- package/browser/esm/{DTJrlUtokRNyzKgl.mjs → B-svf5wq7V5QDtO4.mjs} +12 -12
- package/browser/esm/{Do4OOIYh99i3VXc5.mjs → B1ZEbc_b-Hug9WON.mjs} +1 -1
- package/{cdn/assets/CeT8chcNlkKehyJE.js → browser/esm/B3PPwwyNEblsUOL8.mjs} +1 -1
- package/browser/esm/{BSXumetIfmtutIwR.mjs → B4OkD-x-7fL0aUxy.mjs} +5 -5
- package/browser/esm/{iV1cp5WFOBxaJU3W2.mjs → B4g2Yf4whV01sYya2.mjs} +1 -1
- package/browser/esm/{yCxQIbbRhwpsIqJu2.mjs → B4jNGg7_t9JeroNp2.mjs} +4 -4
- package/browser/esm/{ISZRBrb20f_6C_zc.mjs → BA63EN1awAh-Inzl.mjs} +199 -199
- package/{cdn/assets/Cfob6FEkwxaSK3jd.js → browser/esm/BASSDm-JY_bgolFA2.mjs} +1 -1
- package/browser/esm/{CCauT418WamqPMCO2.mjs → BBmgXo0P8kU87RB42.mjs} +1 -1
- package/browser/esm/{B_bAeABEjj7U2zzq.mjs → BD1aTBqOuoKSzGSD.mjs} +5 -5
- package/browser/esm/{Cifhu0Tx_Qo7pYUo2.mjs → BDFm0nphkYgT4nS22.mjs} +9 -9
- package/browser/esm/{BmJfxZPHfm_cMD4l.mjs → BJXpsm4jy1MQEydA.mjs} +4154 -3133
- package/browser/esm/{CRD6T2pongEp74eX.mjs → BPnA1nEVe1clG1IF.mjs} +4 -4
- package/browser/esm/{4CqOm3frZRd9UZP4.mjs → BQkwe2PCHBQEw--9.mjs} +2 -2
- package/browser/esm/{CZQe_58fmtS0SgdD.mjs → BRSPE-Kbm0TK7bm4.mjs} +1 -1
- package/browser/esm/{DGsj2g4x9odoy93a.mjs → BS7DCPO7VdYxiXF82.mjs} +1 -1
- package/browser/esm/{CnaNnCl2QaqlLn8r.mjs → BSlFBKA1YartFibf.mjs} +146 -145
- package/browser/esm/{BCECU4i5lxfS0Udy.mjs → BT8V24glIXLW0J7i.mjs} +1 -1
- package/browser/esm/{zW5-tVai7f63Nz_O.mjs → BZvD2AxAqbnxspY6.mjs} +3219 -2862
- package/browser/esm/{BdqrEMXaXGIMDZbw.mjs → BZwg6XaGq6GshkAo.mjs} +127 -127
- package/browser/esm/{DqCCvSVY6MZWH0Z3.mjs → Bb-mZ1cMsciuz4ww.mjs} +241 -237
- package/browser/esm/{CJVG0Axu4gbcyT_I2.mjs → BcO0tjxUkaw8VKEE2.mjs} +8 -8
- package/{cdn/assets/DhJ6QuQLZNVmamW_.js → browser/esm/BdTAWhP-loxlROWg2.mjs} +1 -1
- package/browser/esm/{UWBAgk6dmyMdUUrv.mjs → BdZUKtFZuJHAUStY.mjs} +46 -46
- package/{cdn/assets/DTNjbBBLszx7DUAS2.js → browser/esm/Bdf9NRBqMDRFuqxL.mjs} +1 -1
- package/browser/esm/{CDelk7_2mgy_puiR.mjs → BefWPzywuI_Ptwju.mjs} +12 -12
- package/{cdn/assets/COLxuIHK4CwKSCmM.js → browser/esm/BfqHVT9RAMHzPrq22.mjs} +1 -1
- package/{cdn/assets/C0vo8lE4bLKFYxkh2.js → browser/esm/Bi82rHDsiL2lqeRo2.mjs} +1 -1
- package/browser/esm/{DlWcxpzc1O-m1M2B.mjs → Bjpm9ZVaFQRdne7s.mjs} +1 -1
- package/browser/esm/{DadeKQvFAZsAqr0O.mjs → BkU3OKqpa0ddsfDs.mjs} +2 -2
- package/{cdn/assets/XCCi1PHPbJ6YaXx3.js → browser/esm/BkU3OKqpa0ddsfDs2.mjs} +2 -2
- package/browser/esm/{DbqBX9ozs-Ibg67w.mjs → BmHI7i54YtVAcFrP.mjs} +5 -5
- package/{cdn/assets/OPJN-aKuq0geLnJ8.js → browser/esm/Bp36kaEEsGhP709t2.mjs} +1 -1
- package/browser/esm/{BE7zDEWoGoldNMWX2.mjs → Br0flZ59oGm_KTug2.mjs} +2 -2
- package/{cdn/assets/BlYbn-3NJeiQ8dVU.js → browser/esm/BrDePmlBu6Hb4zjJ.mjs} +1 -1
- package/browser/esm/{XR6551Psdm-EtuN0.mjs → BrUW8pfVTjf65sDi2.mjs} +2 -2
- package/browser/esm/{DlZq7EB3pYTCoBZR2.mjs → Bt3ndQy-OnI4OHTz.mjs} +1 -1
- package/{cdn/assets/D_0WWqsqXJL1liYE.js → browser/esm/BtPBnZB0UiICvNBH.mjs} +3 -3
- package/browser/esm/{Dyt46qi3aJZ-CbpB.mjs → Bu8wK5Vy7X9Vp_2S.mjs} +2 -2
- package/browser/esm/{SVBLkue4Zu6FnHvb.mjs → BuBAtTrlYVvU86de.mjs} +6 -6
- package/browser/esm/{KwY2kcMBX2jKweTI.mjs → BxetdicosmSVg2vW.mjs} +9 -9
- package/browser/esm/{CuV98lDmbEhW59Ae2.mjs → BxhPqvaARsOu1pOy2.mjs} +1378 -1649
- package/browser/esm/{EIHzG71M5NOvWayY.mjs → ByGJZ2rruqWUbaGY.mjs} +6 -6
- package/browser/esm/{CP--voqAl30cGmBl2.mjs → BzY-TCedGBSg3UzZ2.mjs} +7 -7
- package/browser/esm/{CRCjjm1HOTdtQ62k.mjs → C-X2_FUeulh-Fay1.mjs} +5 -5
- package/browser/esm/{Dbr_OAl6EZskoqcA2.mjs → C18TArpE7wOvMYXB2.mjs} +14 -14
- package/{cdn/assets/BG5ptu1QVVE32_SU.js → browser/esm/C2DL_mDwKLFZBqvN2.mjs} +1 -1
- package/browser/esm/{Bx_8Vgu2B9rmr3So.mjs → C55NEfrA6s_yuajX2.mjs} +1 -1
- package/browser/esm/{Bo5_yVXoppQHxkAs.mjs → C6eVL3m02S-Qj2uy2.mjs} +1 -1
- package/browser/esm/{CNYIGTIynWaiXpHk2.mjs → C7926vmEK1-oM95A2.mjs} +18 -18
- package/browser/esm/{0oEGfdAHhaLHKSti.mjs → C7Em8LjBH1VJoyfm.mjs} +1 -1
- package/browser/esm/{BGFPUYyanO54TIB42.mjs → C82u-7ClfP9SoGOY2.mjs} +10 -10
- package/{cdn/assets/C7svWLuGopr_jw0t.js → browser/esm/C8jJJ5X2nIRCaMcu2.mjs} +1 -1
- package/browser/esm/{D1n9gH9C8i-si_ty2.mjs → CBv1rU3xPDQ-215V2.mjs} +9 -9
- package/{cdn/assets/B2bYjv0KEa2vjuau2.js → browser/esm/CCIybQZ3Tgu4CxnN.mjs} +1 -1
- package/{cdn/assets/Bis-2jH6YBF6g66T2.js → browser/esm/CD-JsN04jY0VyY1v.mjs} +1 -1
- package/browser/esm/{BGp2qrSP8wpHTmzp2.mjs → CFnqyLJDpOXdxb3c2.mjs} +5 -5
- package/{cdn/assets/CIT0V8cmnyP4zirK2.js → browser/esm/CHCc5YuSbtNgC6qQ.mjs} +1 -1
- package/browser/esm/{D3X5GNunddfnKs212.mjs → CJfK3Zm2ZKVEv5Mv.mjs} +1 -1
- package/{cdn/assets/DUGWe5q5hsRZixNX2.js → browser/esm/COJLKiCysD7hs2jG.mjs} +1 -1
- package/{cdn/assets/Cum9BHrpjoznUf1x.js → browser/esm/COqCbm81u1WaCS7k.mjs} +1 -1
- package/browser/esm/{BiSNhmfge2gLrdUM.mjs → CWJBcuvUa2RVQMju.mjs} +3 -3
- package/browser/esm/{BOwbDihjRpkwOyYg.mjs → CY8tngENYkEZn2SB.mjs} +6 -6
- package/browser/esm/{Cluu6edX1vMT0APV.mjs → C__NPFffG8xrVl4W.mjs} +12 -12
- package/{cdn/assets/Dg79tbN27bDhGeRt.js → browser/esm/CaHBZElxMjo_v4LY2.mjs} +1 -1
- package/browser/esm/{wr5fEooS-ldJhkIW.mjs → Cl_mxlCr73V-Yg6k.mjs} +7552 -7522
- package/browser/esm/{BQemec4LLoAl92_B.mjs → CoqDXeaMS0XICCe2.mjs} +1 -1
- package/browser/esm/{DfsFfH7JQJvdJWFk2.mjs → CtIl_LU__yf7i0CI2.mjs} +17 -17
- package/browser/esm/D-oV3YlvN_279OAe.mjs +236 -0
- package/{cdn/assets/CBrZYomkgb7qvYFr2.js → browser/esm/D3aXs7hDPXNqjUte.mjs} +2 -2
- package/{cdn/assets/Gj5vl7eMC5BSe_81.js → browser/esm/D4cHE39d638a1U-y2.mjs} +1 -1
- package/browser/esm/{DJt8usFidNohlcHI.mjs → D5MFyg_gQzrtkU5q2.mjs} +1 -1
- package/browser/esm/{CIT0V8cmnyP4zirK.mjs → D9h6T10d18-OYsnY.mjs} +1 -1
- package/browser/esm/{clnF8RB-rpJTNpPY2.mjs → DCOuB4SkbT3JU9bd2.mjs} +7 -7
- package/browser/esm/{DZZ6PVue8DUBcarK2.mjs → DFHP3kC1VW25l54r2.mjs} +1 -1
- package/browser/esm/{acwoMYe1beI5Wrq12.mjs → DFfqXOHApBHKjPmq.mjs} +1 -1
- package/{cdn/assets/DVdhEB3_SE9GEpGw.js → browser/esm/DFgibCVRkv7ROc5v2.mjs} +1 -1
- package/browser/esm/{Tg2o581Nj1mxbygb.mjs → DIxQ75X7k8keCEPD.mjs} +3 -3
- package/{cdn/assets/Bhz4-fERBAhVf8ze2.js → browser/esm/DJfrSiVd9Hm9g2d2.mjs} +1 -1
- package/browser/esm/{DM4ub7OPobMAcSmy.mjs → DL_mqnTNaFcgm_nY.mjs} +2 -2
- package/browser/esm/{D8IjVu2OXXsBZUqt2.mjs → DLxFo71kHJsGXBZ3.mjs} +1 -1
- package/browser/esm/{BprRTOQ5s6y4jMpw.mjs → DNwEAT1MO-6FRFlC.mjs} +5 -5
- package/browser/esm/{BoUvCwncdWQjAB6z.mjs → DU8ox87tBW2BnWct.mjs} +16 -16
- package/browser/esm/{DTvl6pZYgFJuU2Pu.mjs → DZUjFTXDHp2HSvYN.mjs} +11 -11
- package/browser/esm/{4DbJWOjJvf-TOYkv2.mjs → D_Iw8uMiIvx2jhcv2.mjs} +1 -1
- package/browser/esm/{4UIqAp3dgLTz_jQl2.mjs → DaSrO6iF4NOXLpMI2.mjs} +1 -1
- package/browser/esm/{b3BWQGDBSQ4mCgD22.mjs → Dc5MbVn_75FtzgPY2.mjs} +1 -1
- package/{cdn/assets/D8jCy3zoIlOA1GAR2.js → browser/esm/DcKd5bjp1ZnTq_-x.mjs} +1 -1
- package/browser/esm/DcZJy7SSyaWDcelM.mjs +87 -0
- package/browser/esm/{BDn_jC98FsiXZwGr2.mjs → DdWhgxkT5YtvYarN.mjs} +1 -1
- package/{cdn/assets/D94ChP2mwu_ThODV.js → browser/esm/De8YQFKHRYztHtNy2.mjs} +1 -1
- package/browser/esm/{BoEpW3VXHHDA7k4Y2.mjs → DfDgl_4vSuF3nubw2.mjs} +21 -21
- package/browser/esm/{DhCFbzZIeOF7kqNn.mjs → DgCRnAf5wqM0QG4X2.mjs} +1 -1
- package/browser/esm/{DDA9KIxPv8iiAvvy2.mjs → DgmukBO5L3U9_0t42.mjs} +1 -1
- package/browser/esm/{DNTtMdjOWrGcqQGh.mjs → DhZ8HFnFgb6ij3dI.mjs} +112 -111
- package/browser/esm/{BYk8t-CVbU8h5jS6.mjs → DmxxEaNdjPB6nBgy.mjs} +1 -1
- package/browser/esm/{C2Mtau_YqokRY_Xs.mjs → DsGyEBTgXCOEpB4D.mjs} +31 -31
- package/browser/esm/{CCAmUEfkNvVwKNOo2.mjs → DxLzXk_tSrLv1u632.mjs} +1 -1
- package/browser/esm/{AlSePay9xNV3_6bb.mjs → DxkY3Q5VwWkfqW7t.mjs} +1 -1
- package/{cdn/assets/BXlBCVkeDEYvDBJB.js → browser/esm/DyQEm0-NZ41L--1K.mjs} +1 -1
- package/browser/esm/{CMA4SISwnTv_lg9j.mjs → Dy_DuOQMMsoys5uG.mjs} +37 -37
- package/browser/esm/{DNvbB1BNwBuI3ZDp.mjs → GZBYOLZMS5CK612Z.mjs} +8 -8
- package/browser/esm/{iaMUH1DY_mh9eilR2.mjs → KH2MZAMxGzfVMoKB2.mjs} +12 -12
- package/browser/esm/{C_VwHa0tEc_OcSRF2.mjs → KRAw_H4pyLSGG7VM2.mjs} +1 -1
- package/browser/esm/{CrIcPnRynBYfe_Pk.mjs → OF1t5e-IpoCN4nMo.mjs} +133 -133
- package/browser/esm/{zvbdtZ85j__-6Pqt2.mjs → RP044HPTvZ7fRPp62.mjs} +11 -11
- package/browser/esm/{CBXVfpoYV_x0IHcp.mjs → ZMzJhKJMzHflPVYY.mjs} +2 -2
- package/browser/esm/{CnMODHX8BiX4JiLR.mjs → cBQ4eqpoDrXn7JHn.mjs} +3 -3
- package/browser/esm/{DEVCQtXhk-o9aGOV2.mjs → dRE1rh6cW8nKpTsz2.mjs} +2 -2
- package/browser/esm/{B89OWCXpyImxK0eb2.mjs → fY2YKQMUdsYu7XiI.mjs} +1 -1
- package/browser/esm/{Cz7kfadeRVZBAMZ_.mjs → iHpxHAsf4TbCq-TE.mjs} +1 -1
- package/browser/esm/index.mjs +4 -4
- package/browser/esm/{i3SHwvlGdsJN8P5k.mjs → mGzBkmSW0FIS3l47.mjs} +1 -1
- package/browser/esm/{Cw3vteUwx6OB-6Iy.mjs → ooQCodfB4ck6IWqw.mjs} +1 -1
- package/browser/esm/{DEhdjB_Iw2iMcmZh2.mjs → pkHBfquSDF6569Gk2.mjs} +2 -2
- package/browser/esm/{BcdW5Jtz-XtqlpNg2.mjs → q3Mf-6we7Zn-SXlN2.mjs} +92 -92
- package/browser/esm/{h-_FZQM0bW_2jNsi.mjs → q9O6l04D06PeFt9r.mjs} +5 -5
- package/browser/esm/{CTuUdSmxH6QxGmNK.mjs → r5p8Wcz2C4nKJXvc.mjs} +3 -3
- package/browser/esm/{Q53pq80r1Yi_tt2g2.mjs → rFUbFjv5JlDQ1yJw2.mjs} +11 -11
- package/{cdn/assets/B7DAcnxzPv0cz6GS2.js → browser/esm/rTH3jO4xeLwX22po.mjs} +1 -1
- package/{cdn/assets/B-_shlNzdU5vK6-F.js → browser/esm/vFkFpwfIwu3oIJ542.mjs} +1 -1
- package/{cdn/assets/CiKHaK_kIAhKfCdO2.js → browser/esm/y7OPrnmnmsKf_AFC.mjs} +1 -1
- package/cdn/assets/{DFvNGCdvSx5VASsE.js → 2rpiEjMFb7cTkJWu.js} +2 -2
- package/cdn/assets/{BHQdCxqlomq-292-.js → 3fQDDuvcrnAkT5qe.js} +92 -92
- package/cdn/assets/{Bw8V5WPmS2yA3Nli.js → 4YGRiYPupFKq8BfP.js} +1 -1
- package/cdn/assets/{CIwWrEXfSN_3khPI2.js → 5DCw2IuKPn_ERodw.js} +1 -1
- package/cdn/assets/{B1rPJEAA5dgS-yuD2.js → 6NAkWncviZTFXMsY2.js} +9 -9
- package/{browser/esm/CUQpAR2c-_Pwu2Eu.mjs → cdn/assets/9cn1ewqq1BWmzgIL.js} +1 -1
- package/cdn/assets/{Do4OOIYh99i3VXc52.js → B1ZEbc_b-Hug9WON2.js} +1 -1
- package/{browser/esm/CeT8chcNlkKehyJE2.mjs → cdn/assets/B3PPwwyNEblsUOL82.js} +1 -1
- package/cdn/assets/{CB2GXUrOhyLmnsVF2.js → B3xtxS53C7jgKwfe2.js} +46 -46
- package/cdn/assets/{iV1cp5WFOBxaJU3W.js → B4g2Yf4whV01sYya.js} +1 -1
- package/cdn/assets/{AwPuLKuYMSM7s2v_2.js → B5IRoZY13t_fHSz42.js} +19 -19
- package/{browser/esm/Cfob6FEkwxaSK3jd2.mjs → cdn/assets/BASSDm-JY_bgolFA.js} +1 -1
- package/cdn/assets/{CCauT418WamqPMCO.js → BBmgXo0P8kU87RB4.js} +1 -1
- package/cdn/assets/{CjYlIFqHaDFiZlal2.js → BDYtqqyKrm2S3aWJ2.js} +5 -5
- package/cdn/assets/BNBvUyjF30xlfOmr.js +236 -0
- package/cdn/assets/{CZQe_58fmtS0SgdD2.js → BRSPE-Kbm0TK7bm42.js} +1 -1
- package/cdn/assets/{DGsj2g4x9odoy93a.js → BS7DCPO7VdYxiXF8.js} +1 -1
- package/cdn/assets/{BCECU4i5lxfS0Udy.js → BT8V24glIXLW0J7i2.js} +1 -1
- package/cdn/assets/{aFMcUoW7eSrX_WvX.js → BVM91MmuaEyh3X9n.js} +2 -2
- package/{browser/esm/DIzd82jYSriheVOz.mjs → cdn/assets/BX7-HB3e-_oTITi_.js} +3 -3
- package/cdn/assets/{Bcwk_FRKVLyPomW4.js → BbjFUZr9zWRsnpUT2.js} +111 -111
- package/{browser/esm/DhJ6QuQLZNVmamW_2.mjs → cdn/assets/BdTAWhP-loxlROWg.js} +1 -1
- package/{browser/esm/DTNjbBBLszx7DUAS.mjs → cdn/assets/Bdf9NRBqMDRFuqxL2.js} +1 -1
- package/cdn/assets/{Cjeb-kMHzEUFlM_l.js → BfmYSaC7YF8lHawu.js} +8 -8
- package/{browser/esm/COLxuIHK4CwKSCmM2.mjs → cdn/assets/BfqHVT9RAMHzPrq2.js} +1 -1
- package/{browser/esm/C0vo8lE4bLKFYxkh2.mjs → cdn/assets/Bi82rHDsiL2lqeRo2.js} +1 -1
- package/cdn/assets/{DlWcxpzc1O-m1M2B.js → Bjpm9ZVaFQRdne7s.js} +1 -1
- package/{browser/esm/OPJN-aKuq0geLnJ82.mjs → cdn/assets/Bp36kaEEsGhP709t.js} +1 -1
- package/{browser/esm/BlYbn-3NJeiQ8dVU.mjs → cdn/assets/BrDePmlBu6Hb4zjJ.js} +1 -1
- package/cdn/assets/{DxzX_-E3wr0c8-0b.js → BrYD9S8O_9gXuYHf.js} +3 -3
- package/cdn/assets/{DlZq7EB3pYTCoBZR.js → Bt3ndQy-OnI4OHTz.js} +1 -1
- package/cdn/assets/{NaYNBS42-TDUcEoM.js → BvuxB7CzGAv0w7by.js} +8 -8
- package/cdn/assets/{tEVV1QDIj2xjwhXe.js → BwMxbQa51h7P3IFw.js} +3 -3
- package/cdn/assets/{BZSwuzPkthzsadzX.js → ByU4uQWIIAoe9hoQ2.js} +10 -10
- package/cdn/assets/{CPrgeFAwr7BHqmHu.js → C0Nxz1Q33eJ2mdFL2.js} +13 -13
- package/cdn/assets/{BRVkA5J9pds0HKNi2.js → C0VNHurPIrPcmiu02.js} +2 -2
- package/cdn/assets/{C2cKoe4Zik7iVYe42.js → C13AOL3lFAH4T6nv2.js} +18 -18
- package/cdn/assets/{5frl5yk1BX9u5Bd42.js → C1Fgr1CHaaJCZwDE2.js} +19 -19
- package/{browser/esm/BG5ptu1QVVE32_SU2.mjs → cdn/assets/C2DL_mDwKLFZBqvN.js} +1 -1
- package/cdn/assets/{Cjrrmg-P0lKlzEfq2.js → C3wPGkvUzepIQRVC2.js} +121 -120
- package/cdn/assets/{Bx_8Vgu2B9rmr3So.js → C55NEfrA6s_yuajX.js} +1 -1
- package/cdn/assets/{JGftuh24rk6BMfkr2.js → C566hKAp9g__r7-72.js} +127 -127
- package/cdn/assets/{Bo5_yVXoppQHxkAs.js → C6eVL3m02S-Qj2uy.js} +1 -1
- package/{browser/esm/DwhwEhNA_QFs_EaZ.mjs → cdn/assets/C7Em8LjBH1VJoyfm.js} +1 -1
- package/cdn/assets/C7Em8LjBH1VJoyfm2.js +24 -0
- package/cdn/assets/{Dy9SlSZp3B0IfxZM.js → C7fY4QaenhDjniAr.js} +32 -32
- package/cdn/assets/{DsDi-rMPWyWzWitl.js → C8HjRahIuD14iG_b.js} +4 -4
- package/{browser/esm/C7svWLuGopr_jw0t2.mjs → cdn/assets/C8jJJ5X2nIRCaMcu.js} +1 -1
- package/cdn/assets/{GABbnj9qIWyEbare2.js → CA00G9Yi4uXcS5l5.js} +124 -125
- package/{browser/esm/B2bYjv0KEa2vjuau.mjs → cdn/assets/CCIybQZ3Tgu4CxnN2.js} +1 -1
- package/{browser/esm/Bis-2jH6YBF6g66T.mjs → cdn/assets/CD-JsN04jY0VyY1v2.js} +1 -1
- package/cdn/assets/{B6QNFqmlZvu6dS4Z2.js → CEP2pbRcOThbPSHu2.js} +10 -10
- package/cdn/assets/{D3X5GNunddfnKs21.js → CJfK3Zm2ZKVEv5Mv2.js} +1 -1
- package/cdn/assets/{DRJzNrQ15sOSjd2e2.js → CKFb0F8a8b7Bp8XG2.js} +12 -12
- package/{browser/esm/DUGWe5q5hsRZixNX.mjs → cdn/assets/COJLKiCysD7hs2jG2.js} +1 -1
- package/{browser/esm/Cum9BHrpjoznUf1x.mjs → cdn/assets/COqCbm81u1WaCS7k2.js} +1 -1
- package/cdn/assets/{DEgXvxiW0vq9ppwM2.js → CR_q2LxqSxi13Hij2.js} +7502 -7472
- package/cdn/assets/{Oh10DZZ2Ac49rAQC.js → C_zj-VriJ00f1MCn.js} +5 -5
- package/{browser/esm/Dg79tbN27bDhGeRt2.mjs → cdn/assets/CaHBZElxMjo_v4LY.js} +1 -1
- package/cdn/assets/{gB5jSIc2WRvZWgrs2.js → CaW2AIr71l8EwY4q.js} +5 -5
- package/cdn/assets/{I2O4wgRVKQfD0EvR.js → CajvXeO8GjmlYo1w.js} +3 -3
- package/cdn/assets/{DOFrZ-RMlv0mEbr62.js → Ck6OFgakjG9KRLkz2.js} +38 -38
- package/cdn/assets/{BQemec4LLoAl92_B.js → CoqDXeaMS0XICCe2.js} +1 -1
- package/cdn/assets/{DR7GcNKO8jkJSCQs.js → Csgvd2uwdSVvtxd0.js} +3 -3
- package/cdn/assets/{BrZcNYdz3ufxcsyF2.js → CxR_QBoT5nmLyrpM2.js} +10 -10
- package/{browser/esm/Gj5vl7eMC5BSe_812.mjs → cdn/assets/D4cHE39d638a1U-y.js} +1 -1
- package/cdn/assets/{DJt8usFidNohlcHI2.js → D5MFyg_gQzrtkU5q.js} +1 -1
- package/{browser/esm/DadeKQvFAZsAqr0O2.mjs → cdn/assets/D5nFDHDC5F0D8PyZ.js} +2 -2
- package/cdn/assets/{BH_TN28AGDJoWsiz.js → D6o4brLafnJRIFnU.js} +2 -2
- package/cdn/assets/{IfWL5kbc_82yS9Ek2.js → D8Ln6s5Q7xc7NoKg2.js} +15 -15
- package/cdn/assets/D9h6T10d18-OYsnY2.js +24 -0
- package/cdn/assets/{BP16A2unTwME_JUN.js → DA1nRTNBW1PtpWgT.js} +2 -2
- package/cdn/assets/{BPzCgPCFw6OXBqtP2.js → DFAAoXpOwrC4RlJR2.js} +11 -11
- package/cdn/assets/{DZZ6PVue8DUBcarK.js → DFHP3kC1VW25l54r.js} +1 -1
- package/cdn/assets/{acwoMYe1beI5Wrq1.js → DFfqXOHApBHKjPmq.js} +1 -1
- package/{browser/esm/DVdhEB3_SE9GEpGw2.mjs → cdn/assets/DFgibCVRkv7ROc5v.js} +1 -1
- package/cdn/assets/{B4o5v-hrdGJbyWK4.js → DFnfLBAD7P-akaff.js} +2 -2
- package/cdn/assets/{BUxPCLlW-ZMhy0kO.js → DIARlYhdv_2V83X8.js} +2 -2
- package/{browser/esm/Bhz4-fERBAhVf8ze.mjs → cdn/assets/DJfrSiVd9Hm9g2d2.js} +1 -1
- package/cdn/assets/{DdtqpY-XqWQemNlu.js → DLY3Gp_G16n4d85q.js} +6 -6
- package/cdn/assets/{D8IjVu2OXXsBZUqt.js → DLxFo71kHJsGXBZ32.js} +1 -1
- package/cdn/assets/{v49CyNYkIHP85Zly2.js → DVFxFNggaQDjhPuL2.js} +42 -42
- package/cdn/assets/{4DbJWOjJvf-TOYkv.js → D_Iw8uMiIvx2jhcv.js} +1 -1
- package/cdn/assets/{WkWv2DINRHwBdTOP.js → D_qtb6BEhWE61Z7C.js} +17 -17
- package/cdn/assets/{4UIqAp3dgLTz_jQl.js → DaSrO6iF4NOXLpMI.js} +1 -1
- package/cdn/assets/{DQJgLUaP7Ha_fkvr2.js → DavJsn-94WtXCnyy2.js} +1357 -1628
- package/cdn/assets/{b3BWQGDBSQ4mCgD2.js → Dc5MbVn_75FtzgPY.js} +1 -1
- package/{browser/esm/D8jCy3zoIlOA1GAR.mjs → cdn/assets/DcKd5bjp1ZnTq_-x2.js} +1 -1
- package/cdn/assets/{BDn_jC98FsiXZwGr.js → DdWhgxkT5YtvYarN2.js} +1 -1
- package/{browser/esm/D94ChP2mwu_ThODV2.mjs → cdn/assets/De8YQFKHRYztHtNy.js} +1 -1
- package/cdn/assets/{DJ1m0LQ8vRMX16Tx2.js → De94qdhWNQbkhAKb.js} +127 -127
- package/cdn/assets/{CAC_xDUcFxj4WkGc.js → DefFGyX5E__KiHEC.js} +199 -199
- package/cdn/assets/{DhCFbzZIeOF7kqNn2.js → DgCRnAf5wqM0QG4X.js} +1 -1
- package/cdn/assets/{DDA9KIxPv8iiAvvy.js → DgmukBO5L3U9_0t4.js} +1 -1
- package/cdn/assets/{95Rg6-R77DB8vhtt2.js → Dkba6grmCB6y_Yvs2.js} +12 -12
- package/cdn/assets/{CqFpYuZRY1Oa6Kdj.js → Dlk7gS21CL59t8cD.js} +11 -11
- package/cdn/assets/{BYk8t-CVbU8h5jS62.js → DmxxEaNdjPB6nBgy2.js} +1 -1
- package/cdn/assets/{BRXqd83y_8Jm2IXn.js → Dt3O9kdjcB6vva5A.js} +3 -3
- package/cdn/assets/{DHAWMS42nJvjdtuv2.js → Dt52g2i0t1p8L5mE2.js} +8 -8
- package/cdn/assets/{CCAmUEfkNvVwKNOo.js → DxLzXk_tSrLv1u63.js} +1 -1
- package/cdn/assets/{AlSePay9xNV3_6bb2.js → DxkY3Q5VwWkfqW7t2.js} +1 -1
- package/{browser/esm/BXlBCVkeDEYvDBJB.mjs → cdn/assets/DyQEm0-NZ41L--1K.js} +1 -1
- package/cdn/assets/{9zNnsHPCP6dNE6dt.js → HhQT-w3KhQYyLF3E.js} +3 -3
- package/cdn/assets/{C_VwHa0tEc_OcSRF.js → KRAw_H4pyLSGG7VM.js} +1 -1
- package/cdn/assets/{Mo49UfLrLCgf_5pV2.js → N2PDFuHeMIcJXi-I2.js} +146 -145
- package/cdn/assets/{BC5CAuRYyJJli2nd.js → OaIdw_jfk8n1tSOG.js} +2 -2
- package/cdn/assets/{-w9ufIOw-Om_-Wms2.js → P-5R1AyiA1bO8kls2.js} +7 -7
- package/cdn/assets/{BgJZVus3WAJnbiwZ2.js → RRJyZ2WtMoVN8bzW2.js} +22 -22
- package/cdn/assets/{C06Yqqvfz4f-vnXA.js → S2-ef6zfqD83qohl.js} +7 -7
- package/cdn/assets/{C8XBql0-rVxPPgdF.js → SY3JTpsm5Bpu0tXj.js} +8 -8
- package/cdn/assets/{bTb_qWNZ9gqpiDKP2.js → T7quzcPIEGcVdh0D2.js} +6 -6
- package/cdn/assets/{D4a2UOIcVrZtupKH.js → VLBw3i20lk_Yly9G.js} +3693 -3336
- package/cdn/assets/{BmcgeYHDyFh865ey.js → ZDs8hbqQmtSIaDZm.js} +3866 -2845
- package/cdn/assets/{Bb2eLL0IUxmGT8uG2.js → ZFmNH36WAkLLbTKE2.js} +8 -8
- package/cdn/assets/{BUHOArLYzXBeYzXy.js → aIjKRE7sQ1uohehj.js} +12 -12
- package/cdn/assets/{B89OWCXpyImxK0eb.js → fY2YKQMUdsYu7XiI.js} +1 -1
- package/cdn/assets/{Cz7kfadeRVZBAMZ_2.js → iHpxHAsf4TbCq-TE2.js} +1 -1
- package/cdn/assets/{i3SHwvlGdsJN8P5k2.js → mGzBkmSW0FIS3l472.js} +1 -1
- package/cdn/assets/{DAUF2tc_qrKzAbp32.js → ml6iN9Or0sV9rNHQ2.js} +13 -13
- package/cdn/assets/oclc-Ixh46_UsUpL.js +87 -0
- package/cdn/assets/{Cw3vteUwx6OB-6Iy.js → ooQCodfB4ck6IWqw.js} +1 -1
- package/cdn/assets/{DEhdjB_Iw2iMcmZh.js → pkHBfquSDF6569Gk.js} +2 -2
- package/cdn/assets/{DXLCCNbizOqKHb2c.js → q7pkii0gu8s26iBw.js} +2 -2
- package/{browser/esm/B7DAcnxzPv0cz6GS.mjs → cdn/assets/rTH3jO4xeLwX22po2.js} +1 -1
- package/cdn/assets/{B4ij2yZFJa5IX7Gk2.js → rynh3babuCEq2zBn2.js} +9 -9
- package/{browser/esm/DL_3sKPWBfJtpaG3.mjs → cdn/assets/uVz7RxSLXYsjkdHy.js} +2 -2
- package/{browser/esm/B-_shlNzdU5vK6-F2.mjs → cdn/assets/vFkFpwfIwu3oIJ54.js} +1 -1
- package/cdn/assets/{B2PZWx8od3IEHy4E2.js → w8ORLCpD4v-F7nl22.js} +7 -7
- package/{browser/esm/CiKHaK_kIAhKfCdO.mjs → cdn/assets/y7OPrnmnmsKf_AFC.js} +1 -1
- package/cdn/index.js +2 -2
- package/package.json +3 -3
- package/browser/cjs/2nTOupSTLJfwR2Xr2.cjs +0 -1
- package/browser/cjs/BjYqVy9NYB3ZmGEY.cjs +0 -32
- package/browser/cjs/BvUcpUKYVrCK5n2U.cjs +0 -14
- package/browser/cjs/C0PxB67bYqsO7V1G2.cjs +0 -1
- package/browser/cjs/C2XU-hUt1ESe-Lym2.cjs +0 -8
- package/browser/cjs/CClH6iclautDoj8x2.cjs +0 -1
- package/browser/cjs/CXIJNqmAzn6OpqX5.cjs +0 -5
- package/browser/cjs/CXsFagVr04vhY7Uo.cjs +0 -42
- package/browser/cjs/CZSCuGkDSx0WPqjF.cjs +0 -1
- package/browser/cjs/Cez2y8M7jx35Vxwz.cjs +0 -3
- package/browser/cjs/Csx2sg-1yBljNBbj.cjs +0 -1
- package/browser/cjs/Df-fdT9Ac1c258zN.cjs +0 -1
- package/browser/cjs/LZG5aDIiIkN0mGFD.cjs +0 -1
- package/browser/cjs/O9HAYiw9e8V75pJ92.cjs +0 -1
- package/browser/cjs/Ugq14m_1jIROW2RN2.cjs +0 -22
- package/browser/esm/BC57lU_SIXKxcZkP2.mjs +0 -280
- package/browser/esm/CfIyCu9_WLgJL_UT.mjs +0 -87
- package/cdn/assets/D14aC0o9d5RZrVJo.js +0 -280
- package/cdn/assets/DwhwEhNA_QFs_EaZ.js +0 -24
- package/cdn/assets/DwhwEhNA_QFs_EaZ2.js +0 -24
- package/cdn/assets/EcoVJH4is9c6hPnS.js +0 -87
- /package/browser/cjs/{507hQYooKKjnRzsZ2.cjs → 507hQYooKKjnRzsZ.cjs} +0 -0
- /package/browser/cjs/{B6vy56yEA1I3B74O2.cjs → B6vy56yEA1I3B74O.cjs} +0 -0
- /package/browser/cjs/{BvG8N7G_8CXIAlT-2.cjs → BvG8N7G_8CXIAlT-.cjs} +0 -0
- /package/browser/cjs/{C0g87ndP2zMUbX6f2.cjs → C0g87ndP2zMUbX6f.cjs} +0 -0
- /package/browser/cjs/{CFxueP0tbpmvY1Ip2.cjs → CFxueP0tbpmvY1Ip.cjs} +0 -0
- /package/browser/cjs/{CW-b31_-r-_raT8Y.cjs → CW-b31_-r-_raT8Y2.cjs} +0 -0
- /package/browser/cjs/{DF4l8xrxkcLkgExp.cjs → DF4l8xrxkcLkgExp2.cjs} +0 -0
- /package/browser/cjs/{DM7-R_ltoLbA9jde2.cjs → DM7-R_ltoLbA9jde.cjs} +0 -0
- /package/browser/cjs/{DSXLVieENYN9qXYl.cjs → DSXLVieENYN9qXYl2.cjs} +0 -0
- /package/browser/cjs/{DpFg69dDCPoOK2BY2.cjs → DpFg69dDCPoOK2BY.cjs} +0 -0
- /package/browser/cjs/{Dtxj9JR14A-uliu5.cjs → Dtxj9JR14A-uliu52.cjs} +0 -0
- /package/browser/cjs/{Dx7GQ4ALtNG3kshu.cjs → Dx7GQ4ALtNG3kshu2.cjs} +0 -0
- /package/browser/cjs/{a4xpA8d_d22-GKos.cjs → a4xpA8d_d22-GKos2.cjs} +0 -0
- /package/browser/cjs/{aONv0Ys3C8xmnaR8.cjs → aONv0Ys3C8xmnaR82.cjs} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const e=require("./Bj3YkKmVIoQ3YtYm.cjs"),t=require("./BPWKnUtyoTrtW567.cjs"),n=require("./BCaRwsX64XTvboxS.cjs"),r=require("./ImnRKBYtNpv7bEa7.cjs"),i=require("./DXGjBmROptbxP3On.cjs");var a=`resourcesById`,o=class{constructor(e){this._kind=e.kind,this._contentType=e.contentType,this._relTypeUri=e.relTypeUri,this._path=e.path}getKind(){return this._kind}getContentType(e){return this._contentType}getRelTypeUri(e){return this._relTypeUri}getPath(e){return typeof this._path==`function`?this._path(e):this._path}},s=class e{constructor(e,t,n){this.zipWriter=e,this.outputKind=t,this.outWritable=n}static createUint8Array(t){let n=new i.f(new i.E,t);return new e(n,`uint8array`)}static createBlob(t){let n=new i.f(new i.S(`application/zip`),t);return new e(n,`blob`)}static createWritableStream(t,n){let r=new i.f(t,n);return new e(r,`writable`,t)}async add(e,t,n){let r=function(e){let t=e.replace(/\\/g,`/`).trim();for(;t.startsWith(`/`);)t=t.slice(1);return t}(e),a={level:n?.level,password:n?.password,encryptionStrength:n?.encryptionStrength,zipCrypto:n?.zipCrypto,lastModDate:n?.lastModDate,keepOrder:n?.keepOrder,uncompressedSize:n?.uncompressedSize,dataDescriptor:n?.dataDescriptor,passThrough:n?.passThrough,compressionMethod:n?.compressionMethod,signature:n?.signature};if(typeof t==`string`)return void await this.zipWriter.add(r,new i.R(t),a);if(t instanceof Uint8Array||ArrayBuffer.isView(t)||t&&typeof t.byteLength==`number`&&typeof t.byteOffset==`number`){try{await this.zipWriter.add(r,new i.$(t),a)}catch(e){throw console.log(`Error adding Uint8Array source to zip:`,r,a),e}return}let o=(s=t)&&typeof s.getReader==`function`?t:function(e){let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){let{value:n,done:r}=await t.next();r?e.close():e.enqueue(n)},async cancel(e){if(typeof t.return==`function`)try{await t.return(e)}catch{}}})}(t);var s;await this.zipWriter.add(r,o,a)}async close(e){let t=e?.comment,n=await this.zipWriter.close(t,{});return this.outputKind===`writable`?this.outWritable??n:n}};function c(e){let t=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),n=e=>t(e).replace(/"/g,`"`),r=e=>{if(!e)return``;let t=``;for(let[r,i]of Object.entries(e))i!==void 0&&!1!==i&&(t+=!0===i?` ${r}="1"`:` ${r}="${n(String(i))}"`);return t},i=new TextEncoder,a=``,o=()=>{a&&=(e.write(i.encode(a)),``)},s=e=>{a+=e,a.length>65536&&o()},c=[],l=null,u=[],d=!0;return{decl(){s(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`)},pushDefaultNamespace(e){c.push(e),l=e},getDefaultNamespace:()=>c.length>0?c[c.length-1]:null,popDefaultNamespace(){c.length>0&&(c.pop(),l=c.length>0?c[c.length-1]:null)},start(e,t){d&&u.push({tag:e,attrs:t,bufferPos:a.length});let n=e;l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),s(`<${n}${r(t)}>`)},empty(e,t){let n=e;l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),s(`<${n}${r(t)}/>`)},text(e){s(t(String(e)))},raw(e){s(e)},end(e){let t;if(d){if(u.length===0)throw Error(`XML Writer: Unexpected end tag </${e}> - no matching start tag`);if(t=u[u.length-1],t.tag!==e)throw Error(`XML Writer: End tag </${e}> does not match start tag <${t.tag}>`)}let n=e;if(l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),d){let e=a.length,i=`<${n}${r(t.attrs)}>`.length;e===t.bufferPos+i?(a=a.slice(0,t.bufferPos),s(`<${n}${r(t.attrs)}/>`)):s(`</${n}>`),u.pop()}else s(`</${n}>`)},close(){o()},setValidationDisabled(e){d=!e}}}function l(e){switch(e.kind){case`bytes`:return e.bytes;case`text`:return e.text;case`stream`:return e.stream;case`xmlStream`:{let t=[],n=c({write:e=>t.push(e)});return e.writeXml(n),n.close(),function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}(t)}case`xmlStreamed`:return e.write()}}function u(e){let t=d(e);if(!t)return`_rels/.rels`;let n=t.lastIndexOf(`/`),r=n>=0?t.slice(0,n):``;return`${r?`${r}/_rels`:`_rels`}/${n>=0?t.slice(n+1):t}.rels`}function d(e){let t=(e??``).replace(/\\/g,`/`).trim();for(;t.startsWith(`/`);)t=t.slice(1);return t}function f(e){let t=(e??``).replace(/\\/g,`/`).trim();return t.startsWith(`/`)||(t=`/`+t),t}function p(e){let t=/^rId(\d+)$/.exec(e);return t?parseInt(t[1],10):2**53-1}function m(e){return String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/"/g,`"`).replace(/>/g,`>`)}function h(e,t,n,r=!1){let i=t;if(t.startsWith(`/`))i=t.slice(1);else{if(!e)throw Error(`Relative path "${t}" cannot be used at root level. Use an absolute path starting with "/" (e.g., "/xl/workbook.xml").`);i=(e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)+1):``)+t}if(i=g(i),!i.includes(`{n}`)){if(!r&&n.has(i))throw Error(`Path already existing path: ${i}`);return i}let a,o=1;do if(a=i.replace(/{n}/g,String(o)),o++,o>1e4)throw Error(`Failed to resolve path template "${t}" after 10000 attempts. This likely indicates a bug or an impossible constraint.`);while(n.has(a));return a}function g(e){let t=e.split(`/`),n=[];for(let r of t)if(r!==``&&r!==`.`)if(r===`..`){if(n.length===0)throw Error(`Invalid path: too many ".." segments in "${e}"`);n.pop()}else n.push(r);return n.join(`/`)}function _(e,t){if(!e)return t;let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``,r=n?n.split(`/`):[],i=t.split(`/`),a=0,o=Math.min(r.length,i.length-1);for(let e=0;e<o&&r[e]===i[e];e++)a++;let s=r.length-a;return`../`.repeat(s)+i.slice(a).join(`/`)}function v(e){return new TextEncoder().encode(e)}var y=class{constructor(e){this.rels=[],this.usedIds=new Set,this.reservedIds=new Set,this.nextId=1,this.sourcePart=d(e)}add(e,t,n){let r=n?.idHint&&!this.usedIds.has(n.idHint)?n.idHint:void 0;if(!r)do r=`rId`+this.nextId++;while(this.usedIds.has(r)||this.reservedIds.has(r));let i=/^rId(\d+)$/.exec(r);return i&&(this.nextId=Math.max(this.nextId,parseInt(i[1],10)+1)),this.usedIds.add(r),this.rels.push({id:r,type:e,target:t,targetMode:n?.external?`External`:void 0}),r}reserve(e){for(let t of e){if(!t)continue;this.reservedIds.add(t);let e=/^rId(\d+)$/.exec(t);e&&(this.nextId=Math.max(this.nextId,parseInt(e[1],10)+1))}}list(){return this.rels}toXmlBytes(){let e=[...this.rels].sort((e,t)=>p(t.id)-p(e.id)||e.id.localeCompare(t.id)),t=[];t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`),t.push(`<Relationships xmlns="${b}">`);for(let n of e){let e=[`Id="${m(n.id)}"`,`Type="${m(n.type)}"`,`Target="${m(n.target)}"`];n.targetMode===`External`&&e.push(`TargetMode="External"`),t.push(`<Relationship ${e.join(` `)}/>`)}return t.push(`</Relationships>`),v(t.join(``))}},b=`http://schemas.openxmlformats.org/package/2006/relationships`,x=class{constructor(){this._defaultsSet=new Set,this._overridesSet=new Set,this._defaults=[],this._overrides=[]}addDefault(e,t){let n=function(e){let t=(e??``).trim().toLowerCase();return t.startsWith(`.`)&&(t=t.slice(1)),t}(e);this._defaultsSet.has(n)||(this._defaultsSet.add(n),this._defaults.push({key:n,content:t}))}addOverride(e,t){let n=f(e);this._overridesSet.has(n)||(this._overridesSet.add(n),this._overrides.push({key:n,content:t}))}replaceOverride(e,t){let n=f(e);if(!this._overridesSet.has(n))return;let r=this._overrides.find(e=>e.key===n);r&&(r.content=t)}toXmlBytes(){let e=[];e.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`),e.push(`<Types xmlns="${S}">`);let t=this._defaults.reverse();this.addDefault(`rels`,`application/vnd.openxmlformats-package.relationships+xml`),this.addDefault(`xml`,`application/xml`);for(let{key:n,content:r}of t)e.push(`<Default Extension="${m(n)}" ContentType="${m(r)}"/>`);let n=this._overrides;for(let{key:t,content:r}of n)e.push(`<Override PartName="${m(t)}" ContentType="${m(r)}"/>`);return e.push(`</Types>`),v(e.join(``))}},S=`http://schemas.openxmlformats.org/package/2006/content-types`,C=class{constructor(e){this.parts=[],this.relsRoot=new y(``),this.relsByPart=new Map,this.contentTypes=new x,this.zip=e}addContentType(e,t){let n=d(e);this.contentTypes.addOverride(`/`+n,t)}addDefaultType(e,t){this.contentTypes.addDefault(e,t)}replaceContentType(e,t){this.contentTypes.replaceOverride(`/`+d(e),t)}addPart(e,t,n,r){let i=d(e);this.parts.push({path:i,body:t,optionsZip:r}),n&&this.contentTypes.addOverride(`/`+i,n)}rels(e){let t=d(e||``);if(!t)return this.relsRoot;let n=this.relsByPart.get(t);return n||(n=new y(t),this.relsByPart.set(t,n)),n}async emit(){let e=[...this.parts].sort((e,t)=>e.path.localeCompare(t.path));for(let t of e){let e=l(t.body);await this.zip.add(t.path,e,t.optionsZip)}let t=this.relsRoot.toXmlBytes();await this.zip.add(`_rels/.rels`,t,{});let n=[...this.relsByPart.values()].sort((e,t)=>e.sourcePart.localeCompare(t.sourcePart));for(let e of n){let t=u(e.sourcePart),n=e.toXmlBytes();await this.zip.add(t,n,{})}let r=this.contentTypes.toXmlBytes();await this.zip.add(`[Content_Types].xml`,r,{})}async build(e){return await this.emit(),await this.zip.close(e)}},w=new Set([`xl/calcChain.xml`]),T=[/^xl\/slicers\//i,/^xl\/slicerCaches\//i];function E(e){return e===`[Content_Types].xml`||D.test(e)}var D=/^(?:(.*)\/)?_rels\/(.*)\.rels$/;function O(e){if(e===`_rels/.rels`)return``;let t=D.exec(e);if(!t)return null;let n=t[1]??``,r=t[2];return n?`${n}/${r}`:r}function k(e){return e.startsWith(`#`)}function A(e,t){if(t.startsWith(`/`))return g(t);let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``;return g((n?n+`/`:``)+t)}var ee=class{constructor(e,t,n){this._queue=[],this._scheduledByNodeKey=new Map,this._nodesByPath=new Map,this._writtenPaths=new Set,this._explicitRelTargets=new Set,this._partWriter=new C(e),this._registry=t,this._options=n??{},this._mapState=this._options.mapState??new Map,this._sourcePackage=this._options.sourcePackage??null,this._macroEnabled=this._options.macroEnabled??!1,this._reserveSourceRelIds(``)}_isSourcePartCarried(e){let t=this._sourcePackage;return!(!t||!t.has(e)||w.has(e)||t.isAbsorbed(e)||!this._macroEnabled&&e===`xl/vbaProject.bin`||E(e)||t.hasStructuralChange()&&function(e){return T.some(t=>t.test(e))}(e))}_reserveSourceRelIds(e){let t=this._sourcePackage?.getPart(u(e));t&&this._partWriter.rels(e).reserve(i.O(t.data).map(e=>e.id))}async waitEmit(){let e=this._queue;for(;e.length;){let t=e.shift();await this._processPart(t)}}async build(e){return await this.waitEmit(),this._passthroughSourceParts(),this._applyWorkbookContentTypeVariant(),await this._partWriter.build(e??{})}_passthroughSourceParts(){let e=this._sourcePackage;if(!e)return;let t=new Set(this._writtenPaths),n=[];for(let r of e.getNames())t.has(r)||this._isSourcePartCarried(r)&&n.push(r);let r=new Set(t);for(let e of n)r.add(e);let a=e.getPart(`[Content_Types].xml`),o=a?i.w(a.data):null;if(o)for(let{ext:e,contentType:t}of o.defaults)this._partWriter.addDefaultType(e,t);for(let t of n){let n=e.getPart(t),r=o?.overrides.get(`/`+t);n.raw?this._partWriter.addPart(t,{kind:`bytes`,bytes:n.raw.compressedData},r,{passThrough:!0,compressionMethod:n.raw.compressionMethod,signature:n.raw.signature,uncompressedSize:n.uncompressedSize}):this._partWriter.addPart(t,{kind:`bytes`,bytes:n.data},r),this._writtenPaths.add(t)}for(let n of e.getNames()){if(n===`[Content_Types].xml`||!E(n))continue;let i=O(n);i!==null&&(i===``||r.has(i))&&(e.isAbsorbed(i)||this._mergeSourceRelsInto(i,e.getPart(n).data,t,r))}}_applyWorkbookContentTypeVariant(){this._macroEnabled&&this._partWriter.replaceContentType(`xl/workbook.xml`,`application/vnd.ms-excel.sheet.macroEnabled.main+xml`)}_mergeSourceRelsInto(e,t,n,r){let a=this._partWriter.rels(e),o=e===``||n.has(e);for(let s of i.O(t)){if(s.external||k(s.target)){a.add(s.type,s.target,{external:s.external,idHint:s.id});continue}let t=A(e,s.target);o&&(n.has(t)||this._explicitRelTargets.has(`${e}::${t}`))||(r.has(t)?a.add(s.type,s.target,{idHint:s.id}):this._registry.ownsRelType(s.type)||w.has(t)||this._sourcePackage?.isAbsorbed(t)||console.warn(`Dropping preserved relationship to missing part '${t}'`,e||`(root)`))}}addPart(e,t,n,r){return this._addPartInternal(``,e,t,n,r)}_addPartInternal(e,t,n,r,i){let a=this._registry.get(t);if(!a)throw Error(`No emitter registered for kind '${t}'.`);let o=a.getContentType(n),s=a.getRelTypeUri(n),c=r??a.getPath?.(n);if(!c)throw Error(`No path provided in either argument or emitter.`);let l=this._writtenPaths,u=h(e,c,l),d=`${t}:${u}`,f=this._scheduledByNodeKey.get(d);if(!f){let e;this._reserveSourceRelIds(u),f={kind:t,key:d,payload:n,path:u,contentType:o,promise:new Promise(t=>{e=t}),resolve:e},this._scheduledByNodeKey.set(d,f),this._queue.push(f)}let p=this._nodesByPath.get(e);p||(p=new Set,this._nodesByPath.set(e,p)),p.add(d),!o||s||e||this._partWriter.rels(``).add(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,u);let m=null;if(s){let t=_(e,f.path);m=this._partWriter.rels(e).add(s,t,{idHint:i})}return l.add(u),{path:u,contentTypeUri:o,relId:m}}addBinary(e,t,n,r,i=!1,a){return this._addBinaryInternal(``,e,t,n,r,i,a)}_addBinaryInternal(e,t,n,r,i,a=!1,o){if(!i)throw Error(`No path provided for binary.`);if(!n)throw Error(`No content type provided for binary.`);let s=this._writtenPaths,c=h(e,i,s,a),l=null;if(r){let t=_(e,c);l=this._partWriter.rels(e).add(r,t,{idHint:o})}if(e||this._partWriter.rels(``).add(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,c),!s.has(c)){let e=c.split(`.`).pop()||``;e&&this._partWriter.addDefaultType(e,n),this._partWriter.addPart(c,{kind:`bytes`,bytes:t},void 0,{level:0,uncompressedSize:t.byteLength,dataDescriptor:!1}),s.add(c)}return{path:c,contentTypeUri:n,relId:l}}async _waitForDescendants(e){let t=this._nodesByPath.get(e);if(!t||t.size===0)return;let n=[];for(let e of t){let t=this._scheduledByNodeKey.get(e);if(t){let e=this._processPart(t);n.push(e)}}await Promise.all(n)}async _processPart(e){if(e.processed)return e.promise;e.processed=!0;let t=this._registry.get(e.kind),n=e.path;this._partWriter.addContentType(e.path,e.contentType);try{let r,i=[],a={write:e=>{i.push(e)}};await t.emit(e.payload,{getXMLWriter:()=>r||(r=c(a),r),addPart:(e,t,r,i)=>this._addPartInternal(n,e,t,r,i),addBinary:(e,t,r,i,a=!1,o)=>this._addBinaryInternal(n,e,t,r,i,a,o),addExternal:(e,t,r)=>({path:t,contentTypeUri:null,relId:this._partWriter.rels(n).add(e,t,{external:!0,idHint:r})}),addRelationship:(e,t,r)=>{if(!this._writtenPaths.has(t)&&!this._isSourcePartCarried(t))return null;let i=_(n,t),a=this._partWriter.rels(n).add(e,i,{idHint:r});return this._explicitRelTargets.add(`${n}::${t}`),a},waitEmit:()=>this._waitForDescendants(e.path),getPath:()=>e.path,getSharedStates:()=>this._mapState,warn:(t,n,r)=>{let i=n??e.path,a=this._options.onWarning;a?a(t,i,r):console.warn(t,i)},log:(t,n)=>{console.warn(t,n??e.path)}});let o=function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}(i),s=this._options.onPartEmitted;s&&await s(e.kind,e.path,o),te&&(console.log(`\n=== ${e.path} ===`),console.log(function(e,t){return function(e,t=` `){let n=``,r=0,i=e.split(/(<[^>]+>)/g).filter(Boolean);for(let e=0;e<i.length;e++){let a=i[e];if(a.trim())if(a.startsWith(`<?`))n+=a+`
|
|
2
|
+
`;else if(a.startsWith(`</`))r--,r<0&&console.warn(`XML formatting warning: negative indentation depth: ${a}`),n+=t.repeat(Math.max(r,0))+a+`
|
|
3
|
+
`;else if(a.startsWith(`<`)){let e=a.endsWith(`/>`);n+=t.repeat(r)+a+`
|
|
4
|
+
`,e||r++}else n+=t.repeat(r)+a.trim()+`
|
|
5
|
+
`}return n}(function(e){return new TextDecoder(`utf-8`).decode(e)}(e),t)}(o))),this._partWriter.addPart(e.path,{kind:`bytes`,bytes:o},e.contentType)}catch(t){throw this._options.onPartError?.(e.kind,e.path,t),t}finally{this._nodesByPath.delete(e.path),this._scheduledByNodeKey.delete(e.key),e.resolve()}}},te=!1,ne=class{constructor(){this.map=new Map}register(e){let t=e.getKind();if(this.map.has(t))throw Error(`Duplicate part kind: ${t}`);this.map.set(t,e)}get(e){let t=this.map.get(e);if(!t)throw Error(`Unknown part kind: ${e}`);return t}has(e){return this.map.has(e)}ownsRelType(e){for(let t of this.map.values())if(t.getRelTypeUri()===e)return!0;return!1}};function j(e,t,n){e&&(e.algorithm&&(t[n?`${n}AlgorithmName`:`algorithmName`]=e.algorithm),e.hash&&(t[n?`${n}HashValue`:`hashValue`]=e.hash),e.salt&&(t[n?`${n}SaltValue`:`saltValue`]=e.salt),e.spinCount!==void 0&&(t[n?`${n}SpinCount`:`spinCount`]=e.spinCount))}var M=`hiddenFormulaXfs`,N=class{constructor(e,t){this._variants=new Map,this._sources=[],this._json=e,this._styles=t,this._directCount=Math.max(1,e?.direct?.length??0)}getHiddenXf(e){let t=this._variants.get(e);return t!==void 0||(this._isShown(e)?t=e:(t=this._directCount+this._sources.length,this._sources.push(e)),this._variants.set(e,t)),t}getSources(){return this._sources}_isShown(e){let t=this._json?.direct?.[e],r=t?.protection?.showFormulas;if(r!==void 0)return r;let i=(e===0?void 0:t?.named)??n.X.BuiltInName.Normal;return this._styles.getNamedStyles().getByName(i)?.toJSON().style?.protection?.showFormulas??!1}},re=class{constructor(){this._daprFMBks=[],this._daprFMBkMap=new Map,this._rvFMBks=[],this._rvFMBkMap=new Map,this._valueMeta=[]}registerArrayCell(e){let t=+!!e,n=`1,${t}`,r=this._daprFMBkMap.get(n);return r===void 0&&(r=this._daprFMBks.length,this._daprFMBks.push({fDynamic:1,fCollapsed:t}),this._daprFMBkMap.set(n,r)),r+1}registerRichValueCell(e){let t=this._rvFMBkMap.get(e);t===void 0&&(t=this._rvFMBks.length,this._rvFMBks.push(e),this._rvFMBkMap.set(e,t));let n=this._valueMeta.length;return this._valueMeta.push(t),n+1}hasCellMeta(){return this._daprFMBks.length>0}hasValueMeta(){return this._valueMeta.length>0}hasAny(){return this.hasCellMeta()||this.hasValueMeta()}getDAPRFutureMetadataBlocks(){return this._daprFMBks}getRVFutureMetadataBlocks(){return this._rvFMBks}getValueMeta(){return this._valueMeta}},P=class{constructor(e,t=console.warn){this._entries=[],this._keyMap=new Map,this._metaCollector=e,this._onWarn=t}add(e){if(e==null)return this._onWarn?.(`RichValueCollector.add: null/undefined value — falling back to #UNKNOWN!`),this._registerFallback();if(t.i.isError(e)){let t=e.getCode(),n=this._register(`_error:${t}`,{errorType:``+(t-1)},F);return this._metaCollector.registerRichValueCell(n)}return e.isIRichData&&e.getType(),this._onWarn?.(`RichValueCollector.add: unsupported rich value type — falling back to #UNKNOWN!`,e),this._registerFallback()}_registerFallback(){let e=this._register(`_error:fallback`,{errorType:t.i.Code.Unknown-1},F);return this._metaCollector.registerRichValueCell(e)}_register(e,t,n){let r=this._keyMap.get(e);return r===void 0&&(r=this._entries.length,this._entries.push({handler:n,rawValue:t}),this._keyMap.set(e,r)),r}getCount(){return this._entries.length}hasAny(){return this._entries.length>0}getEntries(){return this._entries}uniqueHandlers(){let e=new Set,t=[];for(let n of this._entries)e.has(n.handler)||(e.add(n.handler),t.push(n.handler));return t}handlerStructureIndex(e){let t=0,n=new Set;for(let r of this._entries)if(!n.has(r.handler)){if(r.handler===e)return t;n.add(r.handler),t++}return-1}},F=new class{constructor(e,t){this.type=e,this.props=t}getValues(e){return this.props.map(([t,,n=``])=>{let r=e?.[t];return r==null?n:``+r})}}(`_error`,[[`errorType`,`i`,``],[`subType`,`i`,`0`]]),I=`application/xml`,L=async(e,t)=>{let n=e.parts,r=n?n.length:0;for(let i=0;i<r;i++){let r=n[i];try{await ie(r,t)}catch(n){t.log(`Unable to write the part '${r.name??r.id}' referenced by '${e.name??e.id}'`,n)}}},ie=async(e,t,n)=>{let r=e.resId===void 0?void 0:t.getSharedStates().get(a)?.get(e.resId);if(!r)return e.resId===void 0?t.addPart(`embeddedPart`,e,n,e.id):(t.log(`The part '${e.name??e.id}' cites resource ${e.resId}, which is not in the workbook.`),null);let i=await r.getExternalURI();if(i){let n=t.addExternal(e.type,i,e.id);return n.relId!==e.id&&t.log(`The external reference '${e.id}' was written as '${n.relId}'; the markup will not find it.`),n}let o=await r.toBuffer();return t.addBinary(new Uint8Array(o),e.contentType||I,e.type,n??`./${ae(e.name)}`,!1,e.id)},ae=e=>{let t=e&&/^[\w.\-~%]+$/.test(e)?e:`part.xml`,n=t.lastIndexOf(`.`),r=n>0?t.slice(0,n):t,i=n>0?t.slice(n):``;return`${r.replace(/\d+$/,``)}{n}${i}`},oe=`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml`,se=(e,t)=>e.getSharedStates().get(`pivotCachePaths`)?.get(t)??null,ce=`fileVersion`,le=`sheetParts`,ue=`externalLinkParts`;function de(e){if(!e||e.indexOf(`[`)===-1)return[];let t=[],n=e.replace(/"(?:[^"]|"")*"/g,``);for(let e of n.matchAll(/\[(\d+)\]/g)){let n=Number(e[1]);n>0&&!t.includes(n)&&t.push(n)}return t}var fe={auto:`auto`,automaticExceptTables:`autoNoTable`,manual:`manual`};function R(e,t,r,i){if(!r)return;let a=typeof r==`string`?t.parseColor(r):r;i&&e.start(i);let o=a.getType(),s=a.getVal(),c=a.getAdjustments(),l=c&&c.length>0;switch(o){case`scheme`:l?(e.start(`schemeClr`,{val:s}),z(e,c),e.end(`schemeClr`)):e.empty(`schemeClr`,{val:s});break;case`named`:if(n.A.isSystem(s)){let t=a.getLastColor()??a.getBaseColor().toHex().toString(!1).replace(`#`,``);l?(e.start(`sysClr`,{val:s,lastClr:t}),z(e,c),e.end(`sysClr`)):e.empty(`sysClr`,{val:s,lastClr:t})}else l?(e.start(`prstClr`,{val:s}),z(e,c),e.end(`prstClr`)):e.empty(`prstClr`,{val:s});break;case`auto`:{let t=a.getLastColor()??a.getBaseColor().toHex().toString(!1).replace(`#`,``);l?(e.start(`sysClr`,{val:`windowText`,lastClr:t}),z(e,c),e.end(`sysClr`)):e.empty(`sysClr`,{val:`windowText`,lastClr:t});break}case`index`:l?(e.start(`srgbClr`,{val:s}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:s});break;case`hsl`:let t=a.toHex().toString();l?(e.start(`srgbClr`,{val:t}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:t});break;case`rgb`:case`lrgb`:let r=a.toHex().toString();l?(e.start(`srgbClr`,{val:r}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:r});break;case`hex`:let i=s.replace(`#`,``).toUpperCase();l?(e.start(`srgbClr`,{val:i}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:i});break;default:let o=s.replace(`#`,``).toUpperCase();e.empty(`srgbClr`,{val:o})}i&&e.end(i)}function z(e,t){if(t&&t.length!==0)for(let n of t)for(let[t,r]of Object.entries(n)){if(r==null)continue;let n=t;if(n)if(typeof r==`boolean`)e.empty(n);else{let i;if(t===`alpha`||t===`alphaOff`||t===`alphaMod`)i=Math.round(1e5*r);else{if(t===`eTint`){if(r<0){e.empty(`shade`,{val:Math.round(1e5*(1+r)).toString()});continue}e.empty(`tint`,{val:Math.round(1e5*r).toString()});continue}i=Math.round(1e3*r)}e.empty(n,{val:i.toString()})}}}function B(e,t,r,i,a=!1,o=!1){if(!r)return;let s=typeof r==`string`?t.parseColor(r):r,c=()=>{e.empty(i,{rgb:ye(s.toHex().toString(!0))})},l=s.getAdjustments(),u=l&&l.length>0,d=s.getType();if(d!==n.Gt.Type.Auto){if(d===n.Gt.Type.Scheme){let t=s.getVal(),r=pe[t]??t,a=ge.get(r);if(a===void 0&&r!==`phClr`)return console.warn(`Color scheme not in theme. schemeVal=${t} themeKey=${r}`),c();let o={};if(o.theme=a,u){if(!function(e){for(let t of e)switch(Object.keys(t)[0]){case n.Gt.AdjustmentType.Tint:case n.Gt.AdjustmentType.ETint:case n.Gt.AdjustmentType.Shade:case n.Gt.AdjustmentType.Lum:case n.Gt.AdjustmentType.LumOff:case n.Gt.AdjustmentType.LumMod:case n.Gt.AdjustmentType.Alpha:case n.Gt.AdjustmentType.AlphaOff:case n.Gt.AdjustmentType.AlphaMod:continue;default:return!1}return!0}(l))return c();let e,t=l.length===1?l[0][n.Gt.AdjustmentType.ETint]:void 0;if(t!==void 0)e=_e(t);else{let t=s.getBaseColor().toHex().toString(!0),n=s.toHex().toString(!0);e=_e(function(e,t){let n=V(e,0,255),r=V(t,0,255);return Math.abs(r-n)<1e-9?0:r<n?n<=1e-9?-1:V(r/n-1,-1,0):255-n<=1e-9?0:V((r-n)/(255-n),0,1)}(ve(t),ve(n)))}e!==0&&(o.tint=e)}e.empty(i,o);return}if(d===n.Gt.Type.Index){let t=s.getVal(),n=t.substring(5,t.length);e.empty(i,{indexed:Number(n)});return}return c()}e.empty(i,{auto:1})}var pe={bg1:`lt1`,tx1:`dk1`,bg2:`lt2`,tx2:`dk2`,accent1:`accent1`,accent2:`accent2`,accent3:`accent3`,accent4:`accent4`,accent5:`accent5`,accent6:`accent6`,hlink:`hlink`,folHlink:`folHlink`},me=Object.freeze([`lt1`,`dk1`,`lt2`,`dk2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),he=Object.freeze([`dk1`,`lt1`,`dk2`,`lt2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),ge=new Map(me.map((e,t)=>[e,t]));function V(e,t,n){return Math.max(t,Math.min(n,e))}function _e(e){let t=V(e,-1,1);return Math.abs(t)<1e-12?0:t}function ve(e){let t=function(e){let t=e.replace(/^#/,``).toUpperCase();if(t.length===8)return t.slice(2);if(t.length===6)return t;throw Error(`Invalid hex: ${e}`)}(e),n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255;return(Math.max(n,r,i)+Math.min(n,r,i))/2*255}function ye(e){let t=e.replace(/^#/,``).toUpperCase();if(t.length===8)return t;if(t.length===6)return`FF`+t;throw Error(`Invalid hex: ${e}`)}function be(e,t=!1){let n=e;return n.length===8&&(n=n.substring(2,8)),n.length===6&&(n=(t?`00`:`FF`)+n),n.toUpperCase()}function xe(e){let t=`[Threaded comment]\n\nYour version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924\n\nComment:\n ${e.getContent()}`,n=e.getReplies();for(let e=0;e<n.length;e++)t+=`\nReply:\n ${n[e].getContent()}`;return t}function Se(e,t,n){if(typeof t==`string`)return void Te(e,t);let r=t.runs;for(let t=0;t<r.length;t++){let i=r[t];e.start(`r`),i.font&&we(e,i.font,n),Te(e,i.text??``),e.end(`r`)}}var Ce={serif:1,"sans-serif":2,monospace:3,cursive:4,fantasy:5};function we(e,t,r){e.start(`rPr`);let i=(t,n)=>{n!==void 0&&e.empty(t,n?void 0:{val:0})};if(i(`b`,t.weight===void 0?void 0:t.weight>=700),i(`i`,t.style===void 0?void 0:t.style!==n.p.Style.Normal),i(`strike`,t.strike),i(`extend`,t.extend),i(`outline`,t.outline),i(`shadow`,t.shadow),t.underline&&e.empty(`u`,t.underline===n.p.UnderlineStyle.Single?void 0:{val:t.underline}),t.verticalAlign){let r=t.verticalAlign===n.p.VerticalAlignment.Super?`superscript`:t.verticalAlign===n.p.VerticalAlignment.Sub?`subscript`:t.verticalAlign;e.empty(`vertAlign`,{val:r})}t.size!==void 0&&e.empty(`sz`,{val:t.size}),t.color&&function(e,t,n){let r=/^index(\d+)$/.exec(t);r?e.empty(`color`,{indexed:Number(r[1])}):B(e,n,t,`color`)}(e,t.color,r),t.family&&e.empty(`rFont`,{val:t.family});let a=t.fallbacks;if(a)for(let t=0;t<a.length;t++){let n=Ce[a[t]];if(n!==void 0){e.empty(`family`,{val:n});break}}t.charset!==void 0&&e.empty(`charset`,{val:t.charset}),t.scheme&&t.scheme!==n.p.Scheme.None&&e.empty(`scheme`,{val:t.scheme}),e.end(`rPr`)}function Te(e,t){e.start(`t`,i.i.test(t)||/[\n\r]/.test(t)?i.c:void 0),e.text(t),e.end(`t`)}function Ee(e){let t=e.getRanges();if(t.isInvalid())return null;let r=t.getCoords()[0];return r?{ref:n.Rt.cellToString({rowIndex:r.rowStart,colIndex:r.colStart}),row:r.rowStart,col:r.colStart}:null}function H(t,r,i,a,o=!1,s=!1){let c=a.getTheme();if(o&&r.start(`fill`),typeof i==`string`&&(i={type:n.h.Type.Solid,color:i}),i.type===n.h.Type.None)o?r.empty(`patternFill`,{patternType:`none`}):r.empty(`noFill`);else if(i.type===n.h.Type.Solid){let e=i;o?r.start(`patternFill`,{patternType:`solid`}):r.start(`solidFill`),e.color&&(o?B(r,c,e.color,`fgColor`):R(r,c,e.color)),o?r.end(`patternFill`):r.end(`solidFill`)}else if(i.type===n.h.Type.Pattern){let e=i,t=e.patternType||`solid`;r.start(`patternFill`,{patternType:t}),e.foreground&&(o?B(r,c,s?e.background:e.foreground,`fgColor`):R(r,c,s?e.background:e.foreground)),e.background&&(o?B(r,c,s?e.foreground:e.background,`bgColor`):R(r,c,s?e.foreground:e.background)),r.end(`patternFill`)}else if(i.type===n.h.Type.Gradient&&o){let e=i,t={},a=e.gradientType;if(a!==n.h.GradientType.Path&&a!==n.h.GradientType.Linear||(t.type=a),e.angle!==void 0){let n=(e.angle-90)%360;n!==0&&(t.degree=String(n))}let o=e.focus;o&&(o.left&&(t.left=String(o.left)),o.right&&(t.right=String(o.right)),o.top&&(t.top=String(o.top)),o.bottom&&(t.bottom=String(o.bottom))),r.start(`gradientFill`,t);let s=e.stops;if(s&&s.length>0)for(let e of s){let t,n=0;if(typeof e==`string`||typeof e==`object`&&!(`offset`in e))t=e,n=0;else{let r=e;n=r.offset||0,t=r.color}r.start(`stop`,{position:String(n)}),t&&B(r,c,t,`color`),r.end(`stop`)}r.end(`gradientFill`)}else if(i.type===n.h.Type.Gradient){let t=i,a={};t.isRotatedWithShape!==void 0&&(a.rotWithShape=t.isRotatedWithShape?`1`:`0`),r.start(`gradFill`,a),r.start(`gsLst`);let o=t.stops;if(o&&o.length>0)for(let t of o){let n,i=0;if(typeof t==`string`||typeof t==`object`&&!(`offset`in t))n=t;else{let e=t;i=e.offset||0,n=e.color}r.start(`gs`,{pos:String(e.I.roundAccurately(1e3*i,0))}),n&&R(r,c,n),r.end(`gs`)}r.end(`gsLst`);let s=t.gradientType;if(s&&s!==n.h.GradientType.Linear){let n=s===`radial`?`circle`:s;r.start(`path`,{path:n});let i=t.focus;if(i){let t={};i.t!==void 0&&(t.t=String(e.I.roundAccurately(1e3*i.t,0))),i.l!==void 0&&(t.l=String(e.I.roundAccurately(1e3*i.l,0))),i.b!==void 0&&(t.b=String(e.I.roundAccurately(1e3*i.b,0))),i.r!==void 0&&(t.r=String(e.I.roundAccurately(1e3*i.r,0))),r.empty(`fillToRect`,t)}r.end(`path`)}else{let n={};t.angle!==void 0&&(n.ang=String(e.I.roundAccurately(6e4*t.angle,0)));let i=t.scaled;i!==void 0&&(n.scaled=i?`1`:`0`),r.empty(`lin`,n)}r.end(`gradFill`)}else o?r.empty(`patternFill`,{patternType:`none`}):r.empty(`noFill`);o&&r.end(`fill`)}var De=(t,n,i,a)=>{if(!i)return n.start(`ln`),n.empty(`noFill`),void n.end(`ln`);typeof i==`string`&&(i={fill:i});let o=i,s={};if(o.width!==void 0&&(s.w=String(G(o.width))),o.lineCap!==void 0&&(s.cap=Oe(o.lineCap)),o.compound!==void 0&&(s.cmpd=o.compound),o.align!==void 0&&(s.algn=o.align),n.start(`ln`,s),H(0,n,o.fill??Me,a),Array.isArray(o.dash)){n.start(`custDash`);for(let t=0;t<o.dash.length;t+=2)n.empty(`ds`,{d:String(e.I.roundAccurately(1e3*o.dash[t],0)),sp:String(e.I.roundAccurately(1e3*(o.dash[t+1]??0),0))});n.end(`custDash`)}else typeof o.dash==`string`&&n.empty(`prstDash`,{val:o.dash});if(o.lineJoin===r.g.LineJoin.Round)n.empty(`round`);else if(o.lineJoin===r.g.LineJoin.Bevel)n.empty(`bevel`);else if(o.lineJoin===r.g.LineJoin.Miter){let t={};o.miterLimit!==void 0&&(t.lim=String(e.I.roundAccurately(1e5*o.miterLimit,0))),n.empty(`miter`,t)}n.end(`ln`)},Oe=e=>e===`round`?`rnd`:e===`butt`?`flat`:e===`square`?`sq`:e,ke=(e,t,n,r=void 0,i=!1)=>{if(!n||!(n.fill||n.stroke||n.effects?.length||i))return;let a=e.getXMLWriter();r&&a.start(r),a.pushDefaultNamespace(`a`),n.fill&&H(0,a,n.fill,t),n.stroke&&De(0,a,n.stroke,t),n.effects?.length?Ae(e,a,t.getTheme(),n.effects):i&&a.empty(`effectLst`),a.popDefaultNamespace(),r&&a.end(r)},Ae=(e,t,n,r)=>{t.start(`effectLst`);for(let e of r)je(t,n,e);t.end(`effectLst`)},je=(t,n,i)=>{switch(i.type){case r.m.Type.OuterShadow:{let r=i,a={};r.blur!==void 0&&(a.blurRad=String(G(r.blur))),r.distance!==void 0&&(a.dist=String(G(r.distance))),r.angle!==void 0&&(a.dir=String(q(r.angle))),r.alignment!==void 0&&(a.algn=r.alignment),r.isRotatedWithShape!==void 0&&(a.rotWithShape=r.isRotatedWithShape?`1`:`0`),r.scaleX!==void 0&&(a.sx=String(e.I.roundAccurately(1e3*r.scaleX,0))),r.scaleY!==void 0&&(a.sy=String(e.I.roundAccurately(1e3*r.scaleY,0))),r.skewX!==void 0&&(a.kx=String(q(r.skewX))),r.skewY!==void 0&&(a.ky=String(q(r.skewY))),t.start(`outerShdw`,a),R(t,n,r.color),t.end(`outerShdw`);break}case r.m.Type.InnerShadow:{let e=i,r={};e.blur!==void 0&&(r.blurRad=String(G(e.blur))),e.distance!==void 0&&(r.dist=String(G(e.distance))),e.angle!==void 0&&(r.dir=String(q(e.angle))),t.start(`innerShdw`,r),R(t,n,e.color),t.end(`innerShdw`);break}case r.m.Type.PresetShadow:{let e=i,r={prst:e.preset};e.distance!==void 0&&(r.dist=String(G(e.distance))),e.angle!==void 0&&(r.dir=String(q(e.angle))),t.start(`prstShdw`,r),R(t,n,e.color),t.end(`prstShdw`);break}case r.m.Type.Glow:{let e=i,r={};e.radius!==void 0&&(r.rad=String(G(e.radius))),t.start(`glow`,r),R(t,n,e.color),t.end(`glow`);break}case r.m.Type.SoftEdge:{let e=i,n={};e.radius!==void 0&&(n.rad=String(G(e.radius))),t.empty(`softEdge`,n);break}case r.m.Type.Reflection:{let n=i,r={};n.blur!==void 0&&(r.blurRad=String(G(n.blur))),n.distance!==void 0&&(r.dist=String(G(n.distance))),n.angle!==void 0&&(r.dir=String(q(n.angle))),n.fadeAngle!==void 0&&(r.fadeDir=String(q(n.fadeAngle))),n.startAlpha!==void 0&&(r.stA=String(e.I.roundAccurately(1e3*n.startAlpha,0))),n.startPosition!==void 0&&(r.stPos=String(e.I.roundAccurately(1e3*n.startPosition,0))),n.endAlpha!==void 0&&(r.endA=String(e.I.roundAccurately(1e3*n.endAlpha,0))),n.endPosition!==void 0&&(r.endPos=String(e.I.roundAccurately(1e3*n.endPosition,0))),n.scaleX!==void 0&&(r.sx=String(e.I.roundAccurately(1e3*n.scaleX,0))),n.scaleY!==void 0&&(r.sy=String(e.I.roundAccurately(1e3*n.scaleY,0))),n.skewX!==void 0&&(r.kx=String(q(n.skewX))),n.skewY!==void 0&&(r.ky=String(q(n.skewY))),n.alignment!==void 0&&(r.algn=n.alignment),n.isRotatedWithShape!==void 0&&(r.rotWithShape=n.isRotatedWithShape?`1`:`0`),t.empty(`reflection`,r);break}}},Me={type:`none`},U=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,W=`imagesWritten`,Ne={mime:`image/png`,ext:`png`},G=(t=0)=>e.I.roundAccurately(12700*t,0),K=(t=0)=>e.I.roundAccurately(9525*t,0),q=e=>6e4*e,Pe=(t=0)=>e.I.roundAccurately(100*t,2),Fe=class{constructor(){this._dxfs=[],this._byKey=new Map}add(e){let t=JSON.stringify(e),n=this._byKey.get(t);return n===void 0&&(n=this._dxfs.length,this._dxfs.push(e),this._byKey.set(t,n)),n}getDxfs(){return this._dxfs}getCount(){return this._dxfs.length}},Ie=`cfDxfs`,Le=[`font`,`fill`,`borders`,`numberFormat`,`alignment`];function Re(t,r,i){if(r){if(r.named){let n=r.named,a=n.toLowerCase(),o=i.namedStyleMap;if(!o.has(a)){o.set(a,``+o.size);let r=t.getNamedStyles().getByName(n).toJSON();Re(t,r.style??e.I.EmptyObject,i),i.namedStyles.push(r)}}r.font&&function(t,n,r){if(!n)return;let i=e.z.JSONStableStringify(n),a=r.fontMap;if(!a.has(i)){let e=a.size;a.set(i,``+e),r.fonts.push(n)}}(0,r.font,i),r.fill&&function(t,n,r){if(!n)return;let i=e.z.JSONStableStringify(n),a=r.fillMap;if(!a.has(i)&&typeof n==`object`&&n.type){let e=a.size;a.set(i,``+e),r.fills.push(n)}}(0,r.fill,i),r.borders&&function(t,n,r){if(!n)return;let i=e.z.JSONStableStringify(n),a=r.borderMap;if(!a.has(i)){let e=a.size;a.set(i,``+e),r.borders.push(n)}}(0,r.borders,i),r.numberFormat!==void 0&&function(e,t,r){if(!t)return;let i=n.Wt.toBuiltInID(t),a=r.numFmtMap;if(!a.has(i)){let e=0;typeof i==`number`?e=i:(e=r.numFmtsCustom.length+Ge,r.numFmtsCustom.push(i)),a.set(t,``+e)}}(0,r.numberFormat,i)}}function ze(e,t,n){if(!t)return;let r=t.name.toLowerCase();n.namedStyleMap.has(r)||(n.namedStyleMap.set(r,``+n.namedStyleMap.size),n.namedStyles.push(t),Re(e,t.style,n))}function Be(e,t,n,r,i=!1){let a=r.getDefaultFontSize(),o=r.getTheme().getFontScheme().getMinorFont()??`Calibri`,s=r.getNormal().getFont().getColor();t.start(`font`),n.weight&&n.weight>=700&&t.empty(`b`),n.style&&n.style!==`normal`&&t.empty(`i`),n.strike&&t.empty(`strike`),n.underline&&t.empty(`u`,{val:n.underline}),n.outline&&t.empty(`outline`),n.shadow&&t.empty(`shadow`),n.extend&&t.empty(`extend`);let c=n.verticalAlign;c&&(c===`super`&&(c=`superscript`),c===`sub`&&(c=`subscript`),t.empty(`vertAlign`,{val:c})),i?n.size!==void 0&&t.empty(`sz`,{val:String(n.size)}):t.empty(`sz`,{val:String(n.size??a)}),B(t,r.getTheme(),n.color??s,`color`,!i);let l=!i||n.family&&n.family!==o;if(l&&(t.empty(`name`,{val:n.family??o}),n.fallbacks&&n.fallbacks.length>0)){let e=n.fallbacks;e.includes(`serif`)?t.empty(`family`,{val:1}):e.includes(`sans-serif`)?t.empty(`family`,{val:2}):e.includes(`monospace`)?t.empty(`family`,{val:3}):e.includes(`cursive`)?t.empty(`family`,{val:4}):e.includes(`fantasy`)&&t.empty(`family`,{val:5})}n.charset!==void 0&&n.charset!==null&&t.empty(`charset`,{val:String(n.charset)});let u=n.scheme??(n.family===void 0?`minor`:void 0);l&&u!==void 0&&u!==`none`&&t.empty(`scheme`,{val:u}),t.end(`font`)}function J(e,t,n,r,i,a=!1){if(!i||i.style===`none`||!i.style)return void(a&&!i||t.empty(r));t.start(r,{style:i.style});let o=i.color;o&&B(t,n,o,`color`,!a,a),t.end(r)}function Ve(e,t,n,r,i=!1){let a={};i?(a.diagonalUp=`0`,a.diagonalDown=`0`):(n.diagonalUp&&(a.diagonalUp=`1`),n.diagonalDown&&(a.diagonalDown=`1`)),t.start(`border`,a),J(0,t,r,`left`,n.left,i),J(0,t,r,`right`,n.right,i),J(0,t,r,`top`,n.top,i),J(0,t,r,`bottom`,n.bottom,i),i?(J(0,t,r,`vertical`,n.vertical,i),J(0,t,r,`horizontal`,n.horizontal,i)):J(0,t,r,`diagonal`,n.diagonalUp??n.diagonalDown,i),t.end(`border`)}function He(e,t,r,i=!1){let a={};r.horizontal&&r.horizontal!==n.U.HorizontalAlignment.General&&(a.horizontal=r.horizontal),r.vertical&&r.vertical!==n.U.VerticalAlignment.Bottom&&(a.vertical=r.vertical);let o=r.rotation;r.stacked&&(a.textRotation=`255`,o=0),o&&(o>=270&&o<360?o=360-o:o>0&&o<=90&&(o+=90),a.textRotation=String(o));let s=r.overflow;switch(s===n.U.Overflow.Wrap&&(a.wrapText=`1`),r.indent&&(a.indent=``+r.indent),r.relativeIndent&&(a.relativeIndent=``+r.relativeIndent),r.justifyLastLine&&(a.justifyLastLine=`1`),s===n.U.Overflow.Shrink&&(a.shrinkToFit=`1`),r.readingDirection){case n.U.ReadingDirection.Auto:break;case n.U.ReadingDirection.LeftToRight:a.readingOrder=`1`;break;case n.U.ReadingDirection.RightToLeft:a.readingOrder=`2`}return Object.keys(a).length>0?a:null}function Ue(t,r,i,a,o,s,c=!1){let l={},u=null,d=a.named;d&&(u=i.getNamedStyles().getByName(d).toJSON().style);let f=a.font??u?.font,p=f?o.fontMap.get(e.z.JSONStableStringify(f))??0:0,m=a.fill??u?.fill,h=m?o.fillMap.get(e.z.JSONStableStringify(m))??0:0,g=a.borders??u?.borders,_=g?o.borderMap.get(e.z.JSONStableStringify(g))??0:0,v=a.numberFormat??u?.numberFormat;if(l.numFmtId=(v===void 0?void 0:o.numFmtMap.get(v))??`0`,l.fontId=String(p),l.fillId=String(h),l.borderId=String(_),s){let e=a.named??n.X.BuiltInName.Normal;l.xfId=o.namedStyleMap.get(e.toLowerCase())}let y=null,b=a.alignment??u?.alignment;b&&(y=He(0,0,b)),a.font&&(l.applyFont=`1`),a.fill&&(l.applyFill=`1`),a.numberFormat&&(l.applyNumberFormat=`1`),a.borders&&(l.applyBorder=`1`),y&&(l.applyAlignment=`1`);let x=null,S=a.protection?.alwaysUnlocked??u?.protection?.alwaysUnlocked??!1;(S||c)&&(x={},S&&(x.locked=`0`),c&&(x.hidden=`1`),l.applyProtection=`1`),a.quotePrefix&&(l.quotePrefix=`1`),y||x?(r.start(`xf`,l),y&&r.empty(`alignment`,y),x&&r.empty(`protection`,x),r.end(`xf`)):r.empty(`xf`,l)}function We(e,t,r,i,a,o=`dxf`,s=Ge){if(t.start(o),r.font&&Be(0,t,r.font,i,!0),r.numberFormat!==void 0&&r.numberFormat!==null){let e=n.Wt.toBuiltInID(r.numberFormat),i=typeof e==`number`,a=i?n.Wt.builtInFormat(e):String(e);a&&t.empty(`numFmt`,{numFmtId:String(i?e:s++),formatCode:a})}if(r.fill&&H(0,t,r.fill,i,!0,!0),r.alignment){let e=He(0,0,r.alignment,!0);e&&t.empty(`alignment`,e)}return r.borders&&Ve(0,t,r.borders,a,!0),t.end(o),s}var Ge=164,Ke=Object.freeze([`wholeTable`,`headerRow`,`totalRow`,`firstColumn`,`lastColumn`,`firstRowStripe`,`secondRowStripe`,`firstColumnStripe`,`secondColumnStripe`,`firstHeaderCell`,`lastHeaderCell`,`firstTotalCell`,`lastTotalCell`]),qe=n.tt.BuiltInOperatorNames,Je=(e,t,n,r,i,a)=>{let o=r.sorts,s=o?o.length:0;if(s===0)return;let c={};if(s>0){let e=o[0].criteria?.collatorOptions;e&&(c.caseSensitive=typeof e!=`object`||Array.isArray(e)||e.sensitivity!==`case`&&e.sensitivity!==`variant`?`0`:`1`)}c.ref=n.getRange().toString(),c[`xmlns:xlrd2`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2`,t.start(`sortState`,c);for(let e=0;e<s;e++){let n=o[e],r=n.criteria??{},s=n.index+a.colStart,c={};r.reverse&&(c.descending=`1`),c.ref=i.getIntersect({colStart:s,rowStart:a.rowStart,colEnd:s,rowEnd:a.rowEnd}).toString(),r.sortOn&&(c.sortBy=r.sortOn),r.dxfId!==void 0&&(c.dxfId=r.dxfId),r.iconSet!==void 0&&(c.iconSet=r.iconSet),r.customList!==void 0&&(c.customList=r.customList),t.empty(`sortCondition`,c)}t.end(`sortState`)},Ye=(e,t,n,r,i=!1)=>{let a=n.getRange();n.isShowTotals()&&(a=a.getResizeBy(-1,0));let o=a.getCoords(),s=r.sort,c=r.filter,l=c?c.conditions:void 0,u=l?l.length:0,d=r.hiddenButtons,f={};f.ref=a.toString();let p,m=[];for(let e=0;e<u;e++){let t=l[e];m[t.index]={...t}}if(Array.isArray(d)&&d.length>0){let e=d.length;p=Array(d[e-1]);for(let t=0;t<e;t++)p[d[t]]=!0}if(m||d||p||i){let c=0;r.columns?c=r.columns.length:i&&(c=a.getColumnCount()),t.start(`autoFilter`,f);for(let n=0;n<c;n++){let r=!0===d||!0===p?.[n],i=m[n];(i||r)&&Xe(e,t,n,i,r)}s&&i&&Je(0,t,n,s,a,o),t.end(`autoFilter`)}else t.empty(`autoFilter`,f);s&&!i&&Je(0,t,n,s,a,o)},Y=(e,t,n)=>{let r=i.v(n,t=>e.warn(t,n));if(!r)return;let a={operator:r.operator};r.val!==void 0&&(a.val=r.val),t.empty(`customFilter`,a)},Xe=(e,t,r,a,o)=>{let s={};s.colId=``+r,o&&(s.hiddenButton=`1`),a?(t.start(`filterColumn`,s),((e,t,r)=>{let a=r.operator;if(a!==n.tt.BuiltInOperatorNames.Expression)if(a!==n.tt.BuiltInOperatorNames.Unique){if(a===n.tt.BuiltInOperatorNames.Color){let e=r.param,n={};e.cellColor!==void 0&&(n.cellColor=e.cellColor?`1`:`0`),e.styleId!==void 0&&(n.dxfId=e.styleId),t.empty(`colorFilter`,n)}if(Ze(a))if(a===`between`){let n=r.param;t.start(`customFilters`,{and:`1`}),Y(e,t,{operator:qe.GreaterThanEqualTo,param:n.from}),Y(e,t,{operator:qe.LessThanEqualTo,param:n.to}),t.end(`customFilters`)}else if(a===n.tt.BuiltInOperatorNames.Not){let n=r.param;i.g(n?.operator)?(t.start(`customFilters`),Y(e,t,r),t.end(`customFilters`)):e.warn(`Not rule with non-comparison criteria not supported in OOXML`,n)}else if(a===n.tt.BuiltInOperatorNames.And||a===n.tt.BuiltInOperatorNames.Or){let o=r.param,s=o.length;if(s>0){let r={};a===n.tt.BuiltInOperatorNames.And&&s>1&&(r.and=`1`),t.start(`customFilters`,r);for(let n=0;n<s;n++){let r=o[n],a=r.operator===qe.Not&&i.g(r.param?.operator);i.g(r.operator)||a?Y(e,t,r):e.warn(`Only Comparison criteria supported in Union conditions for Table AutoFilters`,r)}t.end(`customFilters`)}}else i.g(a)&&(t.start(`customFilters`),Y(e,t,r),t.end(`customFilters`));if(a===n.tt.BuiltInOperatorNames.TimePeriod){let e=r.param,n={};e.type&&(n.type=e.type),e.anchorDate!==void 0&&(n.val=``+e.anchorDate),e.maxVal!==void 0&&(n.maxVal=``+e.maxVal),t.empty(`dynamicFilter`,n)}if(a===n.tt.BuiltInOperatorNames.Average){let e=r.param,i={},a=e.type;a&&(a===n.tt.AverageType.Above?i.type=`aboveAverage`:a===n.tt.AverageType.Below&&(i.type=`belowAverage`)),e.stdDevs!==void 0&&(i.val=``+e.stdDevs),t.empty(`dynamicFilter`,i)}if(a===n.tt.BuiltInOperatorNames.InSet){let e=r.param;if(e.dateGroups){let n=e.dateGroups,r=n.length;t.start(`dateGroupItem`);for(let e=0;e<r;e++){let r=n[e],i={};r.day!==void 0&&(i.day=``+r.day),r.hour!==void 0&&(i.hour=``+r.hour),r.minute!==void 0&&(i.minute=``+r.minute),r.second!==void 0&&(i.second=``+r.second),r.year!==void 0&&(i.year=``+r.year),r.month!==void 0&&(i.month=``+r.month),i.dateTimeGrouping=r.group,t.empty(`dateGroupItem`,i)}t.end(`dateGroupItem`)}if(e.items){let n=e.items,r=n.length;t.start(`filters`);for(let e=0;e<r;e++){let r=n[e];t.empty(`filter`,{val:``+r})}t.end(`filters`)}}if(a===n.tt.BuiltInOperatorNames.Icon){let e=r.param,n={};e.iconSet!==void 0&&(n.iconSet=e.iconSet),e.iconId!==void 0&&(n.iconId=``+e.iconId),t.empty(`iconFilter`,n)}if(a===n.tt.BuiltInOperatorNames.TopN){let e=r.param,n={};e.percent&&(n.percent=`1`),e.top!==void 0&&(n.top=e.top?`1`:`0`),e.limit!==void 0&&(n.val=``+e.limit),e.filterVal!==void 0&&(n.filterVal=``+e.filterVal),t.empty(`top10`,n)}}else e.warn(`Unique conditions not supported in Table AutoFilters`,r);else e.warn(`Expression conditions not supported in Table AutoFilters`,r)})(e,t,a),t.end(`filterColumn`)):t.empty(`filterColumn`,s)},Ze=e=>e===n.tt.BuiltInOperatorNames.GreaterThan||e===n.tt.BuiltInOperatorNames.GreaterThanEqualTo||e===n.tt.BuiltInOperatorNames.LessThan||e===n.tt.BuiltInOperatorNames.LessThanEqualTo||e===n.tt.BuiltInOperatorNames.EqualTo||e===n.tt.BuiltInOperatorNames.And||e===n.tt.BuiltInOperatorNames.Or||e===n.tt.BuiltInOperatorNames.Not||e===`between`,Qe={names:new Set,perFormula:[],affects:()=>!1},$e=1048576;function et(e,t){let r=t.type;r===n.sn.ColorStopType.AutoMin?r=n.sn.ColorStopType.Min:r===n.sn.ColorStopType.AutoMax&&(r=n.sn.ColorStopType.Max),e.empty(`cfvo`,{type:r,val:t.value,gte:t.exclusive?`0`:void 0})}function tt(e,t){let n={type:t.type,gte:t.exclusive?`0`:void 0};t.value===void 0?e.empty(`x14:cfvo`,n):(e.start(`x14:cfvo`,n),e.start(`xm:f`),e.text(t.value),e.end(`xm:f`),e.end(`x14:cfvo`))}var nt=new Set([n.X.IconSet.Arrows3,n.X.IconSet.ArrowsGray3,n.X.IconSet.Flags3,n.X.IconSet.Signs3,n.X.IconSet.Symbols3,n.X.IconSet.Symbols3_2,n.X.IconSet.TrafficLights3,n.X.IconSet.TrafficLights3_2,n.X.IconSet.Arrows4,n.X.IconSet.ArrowsGray4,n.X.IconSet.Rating4,n.X.IconSet.RedToBlack4,n.X.IconSet.TrafficLights4,n.X.IconSet.Arrows5,n.X.IconSet.ArrowsGray5,n.X.IconSet.Quarters5,n.X.IconSet.Rating5]);function rt(e){return(e.icon?.length??0)>0||e.iconSet!==void 0&&!nt.has(e.iconSet)}function it(t,r,a,o,s,c,l,u,d){let f=o.scale;o.ext&&t.warn(`Conditional format extension payload is not written to xlsx; it will be lost.`);let p,m={type:s.type,dxfId:o.style&&Object.keys(o.style).length>0?u.add(o.style):void 0,priority:l,stopIfTrue:X(o.stopIfTrue),aboveAverage:X(s.aboveAverage),equalAverage:X(s.equalAverage),stdDev:s.stdDev,bottom:X(s.bottom),percent:X(s.percent),rank:s.rank,operator:s.operator,text:s.text,timePeriod:s.timePeriod};f?.type===n.sn.ScaleType.DataBar&&function(e){if(e.gradient||e.borderColor||e.negativeFillColor||e.negativeBorderColor||e.axisColor||e.axisPosition||e.direction)return!0;let t=e.stops,r=t?t.length:0;for(let e=0;e<r;e++){let r=t[e].type;if(r===n.sn.ColorStopType.AutoMin||r===n.sn.ColorStopType.AutoMax)return!0}return!1}(f)&&(p=i.tt(e.I.uuidV4),d.push({guid:p,sqref:c,priority:l,scale:f}));let h=s.formulas,g=h?h.length:0;if(g!==0||f){r.start(`cfRule`,m);for(let e=0;e<g;e++)r.start(`formula`),r.text(h[e]),r.end(`formula`);if(f?.type===n.sn.ScaleType.ColorScale){let e=f.stops??[];r.start(`colorScale`);for(let t=0;t<e.length;t++)et(r,e[t]);for(let t=0;t<e.length;t++)B(r,a,e[t].color,`color`);r.end(`colorScale`)}else if(f?.type===n.sn.ScaleType.DataBar){let e=f.stops??[];r.start(`dataBar`,{minLength:f.minLength,maxLength:f.maxLength,showValue:X(f.showValue)});for(let t=0;t<e.length;t++)et(r,e[t]);f.color&&B(r,a,f.color,`color`),r.end(`dataBar`)}else if(f?.type===n.sn.ScaleType.IconSet){let e=f.stops??[];r.start(`iconSet`,{iconSet:f.iconSet,reverse:X(f.reverse),showValue:X(f.showValue)});for(let t=0;t<e.length;t++)et(r,e[t]);r.end(`iconSet`)}p&&(r.start(`extLst`),r.start(`ext`,{uri:`{B025F937-C7B1-47D3-B67F-A62EFF666E3E}`,"xmlns:x14":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`}),r.start(`x14:id`),r.text(p),r.end(`x14:id`),r.end(`ext`),r.end(`extLst`)),r.end(`cfRule`)}else r.empty(`cfRule`,m)}function at(e){let t=2**53-1,r=2**53-1,i=e.split(` `);for(let e=0;e<i.length;e++){if(!i[e])continue;let a=n.Rt.fastStringToRange(i[e]);a.rowStart<t&&(t=a.rowStart),a.colStart<r&&(r=a.colStart)}return n.Rt.cellToString({rowIndex:t,colIndex:r})}function ot(e){if(typeof e==`string`)return e.split(`,`).join(` `);if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let i=n.Rt.rangeToString(e[r]);i&&t.push(i)}return t.length>0?t.join(` `):null}return n.Rt.rangeToString(e)}function X(e){if(e!==void 0)return e?`1`:`0`}function st(e){if(typeof e!=`string`)return!1;let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r===`"`)t=!t;else if(r===`!`&&!t)return!0}return!1}function ct(e){let t=e.formulas,n=t?t.length:0;for(let e=0;e<n;e++)if(st(t[e]))return!0;return!1}function lt(e){let t=2**53-1,r=2**53-1,i=e.split(` `);for(let e=0;e<i.length;e++){if(!i[e])continue;let a=n.Rt.fastStringToRange(i[e]);a.rowStart<t&&(t=a.rowStart),a.colStart<r&&(r=a.colStart)}return t===2**53-1?null:{rowIndex:t,colIndex:r}}function ut(e,t,r){if(typeof e!=`string`||!e||!t||!r)return e;try{let i=r.parse(e,t);return i&&n.C.image(r.spell(i,!0),{at:t})||e}catch{return e}}function dt(e,t,n){let r,i=e?.stops;if(!i||!n)return e;for(let e=0;e<i.length;e++){let a=i[e]?.value;if(typeof a!=`string`)continue;let o=ut(a,t,n);o!==a&&(r||=[...i],r[e]={...i[e],value:o})}return r?{...e,stops:r}:e}function ft(e,t,n,r){if(!r?.xml)return;let i=e.addPart(`legacyDrawing`,r);t.empty(n,{"r:id":i.relId})}var pt=(e,t,n,r)=>{let i=(t,n)=>{let r=e.getRangeAtBounds({x:t,y:n,width:0,height:0}),i=r.getCoords(),a=r.getBounds();return[i.colStart,t-a.x,i.rowStart,n-a.y]},a=t.getMovable()?.getBounds()??null,o=a?t.toJSON()?.box?.anchor:void 0;if(a&&o?.tl&&o.br){let t=e.getEntireRange().getCoords(),i=e=>[Math.min(t.colEnd,Math.max(0,r+(e.c??0))),e.x??0,Math.min(t.rowEnd,Math.max(0,n+(e.r??0))),e.y??0];return{bounds:a,anchor:[...i(o.tl),...i(o.br)]}}if(!a){let t=e.getRange({rowStart:n,colStart:r,rowEnd:n,colEnd:r}).getBounds();a={x:t.x+t.width+15,y:Math.max(2,t.y-10),width:144,height:79}}return{bounds:a,anchor:[...i(a.x,a.y),...i(a.x+a.width,a.y+a.height)]}},mt=e=>e.content?.type!==`control`,ht=(e,t,n)=>{e.start(t),e.start(`xdr:col`),e.text(n.c??0),e.end(`xdr:col`),e.start(`xdr:colOff`),e.text(K(n.x)),e.end(`xdr:colOff`),e.start(`xdr:row`),e.text(n.r??0),e.end(`xdr:row`),e.start(`xdr:rowOff`),e.text(K(n.y)),e.end(`xdr:rowOff`),e.end(t)},gt={r:void 0,s:void 0,t:void 0,cm:void 0,vm:void 0},_t={r:void 0,s:void 0,customFormat:void 0,hidden:void 0,ht:void 0,customHeight:void 0,"x14ac:dyDescent":`0.25`,outlineLevel:void 0,collapsed:void 0},vt={t:void 0,aca:void 0,ref:void 0,ca:void 0,si:void 0},yt={t:`shared`,aca:void 0,ref:void 0,ca:void 0,si:void 0},bt={t:`array`,aca:void 0,ref:void 0,ca:void 0,si:void 0};function xt(e,t,n,r){n&&(t.start(r),t.empty(`latin`,{typeface:n}),t.empty(`ea`,{typeface:``}),t.empty(`cs`,{typeface:``}),t.end(r))}var St=e=>e.toISOString().split(`.`)[0]+`Z`,Ct=(e,t,n)=>{switch(t){case`creator`:e.start(`dc:creator`),e.text(n),e.end(`dc:creator`);break;case`lastModifiedBy`:e.start(`cp:lastModifiedBy`),e.text(n),e.end(`cp:lastModifiedBy`);break;case`created`:e.start(`dcterms:created`,{"xsi:type":`dcterms:W3CDTF`}),e.text(n),e.end(`dcterms:created`);break;case`modified`:e.start(`dcterms:modified`,{"xsi:type":`dcterms:W3CDTF`}),e.text(n),e.end(`dcterms:modified`)}},Z=(e,t,n,r)=>{t.start(n),t.text(r),t.end(n)},wt={minSupportedVersion:`120000`,copy:`1`,pasteAll:`1`,pasteValues:`1`,merge:`1`,splitFirst:`1`,rowColShift:`1`,clearFormats:`1`,clearComments:`1`,assign:`1`,coerce:`1`},Tt=(t,n,r=e.I.EmptyArray)=>{if(!n)return{...r};let{text:i,runs:a,color:o,size:s,kern:c,weight:l,style:u,b:d,i:f,spc:p,baseline:m,...h}=n,g={...r,...h};return s!==void 0&&(g.sz=``+Pe(s)),d!==void 0&&(g.b=d?`1`:`0`),l!==void 0&&(g.b=l>500?`1`:`0`),f!==void 0&&(g.i=f?`1`:`0`),u!==void 0&&(g.i=u===`italic`?`1`:`0`),c!==void 0&&(g.kern=``+Pe(c)),p!==void 0&&(g.spc=``+Pe(p)),m!==void 0&&(g.baseline=``+Pe(m)),g},Et=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter();r.start(`txBody`),r.pushDefaultNamespace(`a`),Ot(e,t,{vertOverflow:`clip`,horzOverflow:`clip`,rtlCol:`0`,anchor:`ctr`}),r.empty(`lstStyle`),((e,t,n)=>{if(!n)return;let r=e.getXMLWriter();r.pushDefaultNamespace(`a`),typeof n==`string`&&(n={runs:[{text:n}]}),r.start(`p`),r.empty(`pPr`,{algn:`ctr`});let i=Tt(0,n,{...kt,size:t.getDefaultFontSize()}),a=n?.runs,o=a?a.length:0;if(o>0)for(let e=0;e<o;e++){let n=a[e];r.start(`r`,{});let i=Tt(0,n,kt),o=n.color;o?(r.start(`rPr`,i),H(0,r,o,t),r.end(`rPr`)):r.empty(`rPr`,i),r.start(`t`),r.text(n?.text??``),r.end(`t`),r.end(`r`)}else r.empty(`endParaRPr`,i);r.end(`p`),r.popDefaultNamespace()})(e,t,n),r.popDefaultNamespace(),r.end(`txBody`)},Dt=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter(),i=Tt(0,n);r.empty(`defRPr`,i)},Ot=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter(),{spAutoFit:i,...a}=n;i?(r.start(`bodyPr`,a),r.empty(`spAutoFit`),r.end(`bodyPr`)):r.empty(`bodyPr`,a)},kt=Object.freeze({lang:`en-US`}),At=(e,t)=>{if(t.length!==0){e.start(`a:extLst`);for(let n of t){let t={},r=n[0];r&&(t.uri=r),e.start(`a:ext`,t),e.empty(n[1],n[2]),e.end(`a:ext`)}e.end(`a:extLst`)}},jt=async(e,t,n,r,i)=>{let a,o=e.getSharedStates(),s=r.getContent().getResource(),c=await s.getExternalURI();if(c)a=e.addExternal(U,c);else if(a=n.get(s),!a){let t=o.get(W);t||(t=new Map,o.set(W,t));let r=t.get(s);if(!r){let e=await s.toBuffer();r={bytes:new Uint8Array(e),type:await s.getType()??Ne,index:t.size+1},t.set(s,r)}a=e.addBinary(r.bytes,r.type.mime,U,`../media/image${r.index}.${r.type.ext}`,!0),n.set(s,a)}let l={"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`};c?l[`r:link`]=a.relId:l[`r:embed`]=a.relId;let u=[];c||u.push([`{28A0092B-C50C-407E-A947-70E740481C1C}`,`a14:useLocalDpi`,{"xmlns:a14":`http://schemas.microsoft.com/office/drawing/2010/main`,val:`0`}]);let d=e.getXMLWriter();d.start(`pic`),d.start(`nvPicPr`),zt(e,d,r,i,t),Vt(e,d,r,i),d.end(`nvPicPr`),d.start(`blipFill`),d.start(`a:blip`,l),At(d,u),d.end(`a:blip`),d.start(`a:stretch`),d.empty(`a:fillRect`),d.end(`a:stretch`),d.end(`blipFill`),Lt(e,t,n,r,i),d.end(`pic`)},Mt=async(e,t,n,r,i,a)=>{let o=i.content?.json,s=o?.xml,c=o?.part;if(!s||!c)return Q(e,t,n,r,i);let l=await ie(c,e,`../charts/chart{n}.xml`);if(!l?.relId)return Q(e,t,n,r,i);let u=l.relId===c.id?s:s.replace(`r:id="${c.id}"`,`r:id="${l.relId}"`);a!==void 0&&typeof i.content?.json?.sourceId==`number`&&(u=u.replace(`cNvPr id="${i.content.json.sourceId}"`,`cNvPr id="${a}"`)),e.getXMLWriter().raw(u)},Nt=async(e,t,n,r,i)=>Q(e,t,n,r,i),Pt=async(e,t,n,r,i)=>Q(e,t,n,r,i),Ft=async(e,t,n,r,i)=>Q(e,t,n,r,i),It=async(e,t,n,r,i,a)=>{let o=i.content?.json,s=o?.xml;if(!s)return Q(e,t,n,r,i);let c=a!==void 0&&typeof o?.sourceId==`number`?s.replace(`cNvPr id="${o.sourceId}"`,`cNvPr id="${a}"`):s;e.getXMLWriter().raw(c)},Q=async(e,t,n,r,i)=>{(async(e,t,n,r,i)=>{let a=e.getXMLWriter(),o={},s=i.content?.json,c=s?.type??`sp`,l=t.getStyles();c===`cxnSp`?(o.macro=``,a.start(`cxnSp`,o),a.start(`nvCxnSpPr`),zt(e,a,r,i,t),Bt(e,a,r,i,t),a.start(`cNvCxnSpPr`),a.empty(`a:stCnx`,{id:`0`,idx:`0`}),a.end(`cNvCxnSpPr`),a.end(`nvCxnSpPr`),Lt(e,t,n,r,i),Rt(e,t,n,r,i),Et(e,l,s?.text),a.end(`cxnSp`)):c===`grpSp`||(o.macro=``,o.textlink=``,a.start(`sp`,o),a.start(`nvSpPr`),zt(e,a,r,i,t),Bt(e,a,r,i,t),a.end(`nvSpPr`),Lt(e,t,n,r,i),Rt(e,t,n,r,i),Et(e,l,s?.text),a.end(`sp`))})(e,t,n,r,{...i,content:{type:`shape`,name:i.content?.name,description:i.content?.description,json:{fill:`bg1`,stroke:{width:2,fill:`red`},text:{runs:[{text:`Unsupported Type: `+(i.content?.type??`unknown`),color:`tx1`}]}}}})},Lt=(e,t,n,r,i)=>{let a=e.getXMLWriter(),o=i.content?.json,s=o?.geometry??`rect`,c=t.getStyles();a.start(`spPr`),a.pushDefaultNamespace(`a`),Ht(a,r,i),a.start(`prstGeom`,{prst:s}),a.empty(`avLst`),a.end(`prstGeom`),ke(e,c,o),a.popDefaultNamespace(),a.end(`spPr`)},Rt=(e,t,n,r,i)=>{let a=e.getXMLWriter();a.start(`style`),a.pushDefaultNamespace(`a`),a.start(`lnRef`,{idx:`1`}),a.start(`schemeClr`,{val:`accent1`}),a.empty(`shade`,{val:`15000`}),a.end(`schemeClr`),a.end(`lnRef`),a.start(`fillRef`,{idx:`1`}),a.empty(`schemeClr`,{val:`accent1`}),a.end(`fillRef`),a.start(`effectRef`,{idx:`0`}),a.empty(`schemeClr`,{val:`accent1`}),a.end(`effectRef`),a.start(`fontRef`,{idx:`minor`}),a.empty(`schemeClr`,{val:`lt1`}),a.end(`fontRef`),a.popDefaultNamespace(),a.end(`style`)},zt=(t,n,r,i,a)=>{let o=t.getSharedStates(),s=o.get(`uniqueIdCounter`);s||(s=new Map,o.set(`uniqueIdCounter`,s));let c=s.get(a)??1;c++,s.set(a,c);let l={id:``+c,name:i.content?.name};i.content?.description&&(l.descr=i.content.description),i.hidden&&(l.hidden=`1`);let u=[];u.push([`{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}`,`a16:creationId`,{"xmlns:a16":`http://schemas.microsoft.com/office/drawing/2014/main`,id:`{${e.I.uuidV4().toUpperCase()}}`}]),n.start(`cNvPr`,l),At(n,u),n.end(`cNvPr`)},Bt=(e,t,n,r,i)=>{t.empty(`cNvSpPr`)},Vt=(e,t,n,r)=>{let i={};if(r.lockAspect&&(i.noChangeAspect=`1`),r.locks)for(let e of Object.keys(r.locks))!0===r.locks[e]&&(i[e]=`1`);t.start(`cNvPicPr`,{}),t.empty(`a:picLocks`,i),t.end(`cNvPicPr`)},Ht=(e,t,n)=>{let r=t.getBounds(),i={},a=n.rotation;a!==void 0&&a!==0&&(i.rot=``+q(a)),e.start(`xfrm`,i),e.start(`off`,{x:K(r.x),y:K(r.y)}),e.end(`off`),e.start(`ext`,{cx:K(r.width),cy:K(r.height)}),e.end(`ext`),e.end(`xfrm`)},Ut=(e,t,n)=>{e.start(t),e.start(`col`),e.text(n.c??0),e.end(`col`),e.start(`colOff`),e.text(K(n.x)),e.end(`colOff`),e.start(`row`),e.text(n.r??0),e.end(`row`),e.start(`rowOff`),e.text(K(n.y)),e.end(`rowOff`),e.end(t)},Wt=async(e,t,n)=>{let r=await n.getExternalURI();if(r)return void e.addExternal(U,r);let i=e.getSharedStates(),a=i.get(W);a||(a=new Map,i.set(W,a));let o=a.get(n);if(!o){let e=await n.toBuffer();o={bytes:new Uint8Array(e),type:await n.getType()??Ne,index:a.size+1},a.set(n,o)}let s=e.addBinary(o.bytes,o.type.mime,U,`../media/image${o.index}.${o.type.ext}`,!0,t);s.relId!==t&&e.log(`Legacy drawing image '${t}' was written as '${s.relId}'; the markup will not find it.`)};function Gt(e){return e.toISOString().substring(0,22)}function Kt(e,t,n,r,a,o,s,c,l){let u={ref:t,dT:Gt(a??new Date),personId:r?$(r):void 0,id:$(n),parentId:s?$(s):void 0,done:c?`1`:void 0};if(e.start(`threadedComment`,u),e.start(`text`,i.i.test(o)||/[\n\r]/.test(o)?i.c:void 0),e.text(o),e.end(`text`),l&&l.length>0){e.start(`mentions`);for(let t=0;t<l.length;t++){let n=l[t];e.empty(`mention`,{mentionpersonId:$(n.personId),mentionId:$(n.id),startIndex:n.startIndex??0,length:n.length??0})}e.end(`mentions`)}e.end(`threadedComment`)}function $(e){return`{${e.replace(/^\{|\}$/g,``).toUpperCase()}}`}var qt=0,Jt=(e,t,r,a)=>{let o=e.getSharedStates().get(i.H);if(!o)return a;try{let e=t.getDataRange().getCoords(),i={rowIndex:e.rowStart,colIndex:e.colStart+r},s=o.parse(a,i);return s&&n.C.image(o.spell(s,!1,t.getName()),{at:i})||a}catch{return a}},Yt=new Map([[101,`average`],[102,`countNums`],[103,`count`],[104,`max`],[105,`min`],[107,`stdDev`],[109,`sum`],[110,`var`]]),Xt={rowIndex:0,colIndex:0};function Zt(e,r,i,a){if(a==null)return;Xt.rowIndex=r,Xt.colIndex=i;let o,s,c=n.Rt.cellToString(Xt);switch(typeof a){case`number`:s=``+a;break;case`boolean`:o=`b`,s=a?`1`:`0`;break;case`string`:o=`str`,s=a;break;default:{let e=a;if(e.t!==`e`)return;o=`e`,s=t.i.getBuiltInByCode(e.v)?.getLabel()??t.i.BuiltIn.Value.getLabel()}}e.start(`cell`,o?{r:c,t:o}:{r:c}),e.start(`v`),e.text(s),e.end(`v`),e.end(`cell`)}var Qt=(e,t,n,r,i,a=`0`)=>{let o=i?.color,s={idx:i?.idx??a};o===void 0?t.empty(r,s):(t.start(r,s),o===`auto`?t.empty(`styleClr`,{val:`auto`}):(t.pushDefaultNamespace(`a`),R(t,n.getTheme(),o),t.popDefaultNamespace()),t.end(r))},$t=Object.freeze([{type:`axisTitle`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:10,kern:12}},{type:`categoryAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:9,kern:12}},{type:`chartArea`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`},fill:{type:`solid`,color:`bg1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:10,kern:12}},{type:`dataLabel`,fontRef:{color:`tx1 lumMod 75 lumOff 25`},defRPr:{size:9,kern:12}},{type:`dataLabelCallout`,fontRef:{color:`dk1 lumMod 65 lumOff 35`},fill:{type:`solid`,color:`lt1`},stroke:{fill:`dk1 lumMod 25 lumOff 75`},defRPr:{size:9,kern:12},bodyPr:{rot:`0`,spcFirstLastPara:`1`,vertOverflow:`clip`,horzOverflow:`clip`,vert:`horz`,wrap:`square`,lIns:`36576`,tIns:`18288`,rIns:`36576`,bIns:`18288`,anchor:`ctr`,anchorCtr:`1`,spAutoFit:`true`}},{type:`dataPoint`,fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`}},{type:`dataPoint3D`,fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`}},{type:`dataPointLine`,lineRef:{color:`auto`},fillRef:{idx:`1`},fontRef:{color:`tx1`},stroke:{width:2.25,cap:`rnd`,fill:`phClr`,round:!0}},{type:`dataPointMarker`,lineRef:{color:`auto`},fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`},stroke:{width:.75,fill:`phClr`}},{type:`dataPointMarkerLayout`,mods:{symbol:`circle`,size:`5`},empty:!0},{type:`dataPointWireframe`,lineRef:{color:`auto`},fillRef:{idx:`1`},fontRef:{color:`tx1`},stroke:{width:.75,cap:`rnd`,fill:`phClr`,round:!0}},{type:`dataTable`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},fill:{type:`none`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:9,kern:12}},{type:`downBar`,fontRef:{color:`tx1`},fill:{type:`solid`,color:`dk1 lumMod 75 lumOff 25`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`dropLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`errorBar`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`floor`,fontRef:{color:`tx1`},fill:{type:`none`},stroke:{}},{type:`gridlineMajor`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`}},{type:`gridlineMinor`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 5 lumOff 95`}},{type:`hiLoLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 50 lumOff 50`}},{type:`leaderLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`legend`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`plotArea`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`}},{type:`plotArea3D`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`}},{type:`seriesAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`seriesLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`title`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:14,b:!1,kern:12,spc:0,baseline:0}},{type:`trendline`,lineRef:{color:`auto`},fontRef:{color:`tx1`},stroke:{width:1.5,cap:`rnd`,fill:`phClr`,prstDash:`sysDot`}},{type:`trendlineLabel`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`upBar`,fontRef:{color:`tx1`},fill:{type:`solid`,color:`lt1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`valueAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`wall`,fontRef:{color:`tx1`},fill:{type:`none`},stroke:{}}]),en=Object.freeze([[0,0],[6e4,0],[8e4,2e4],[8e4,0],[6e4,4e4],[5e4,0],[7e4,3e4],[7e4,0],[5e4,5e4]]),tn=[new class extends o{constructor(){super({kind:`workbook`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,path:`/xl/workbook.xml`})}async emit(e,t){let r=t.getXMLWriter();r.decl(),r.start(`workbook`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x15 xr xr6 xr10 xr2`,"xmlns:x15":`http://schemas.microsoft.com/office/spreadsheetml/2010/11/main`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`,"xmlns:xr6":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision6`,"xmlns:xr10":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision10`,"xmlns:xr2":`http://schemas.microsoft.com/office/spreadsheetml/2015/revision2`});let o=t.getSharedStates().get(a),s=await e.toJSON({ignoreData:!0,resources:(e,t)=>(o?.set(t,e),null),includeHeaderStyles:!0,splitDirectBorders:!0});t.getSharedStates().set(i.H,i.q(s.names,function(e){let t=[],n=e.sheets??[];for(let e=0;e<n.length;e++){let r=n[e]?.sheet?.tables;if(r)for(let e=0;e<r.length;e++){let n=r[e],i=Array.isArray(n)?n[1]?.name:n?.v?.name;i&&t.push(String(i))}}return t}(s))),function(e,t){let n=e.getSharedStates().get(ce);n&&t.empty(`fileVersion`,n)}(t,r),function(e,t,n,r){let i={},a=n.getCodeName();a&&(i.codeName=a),n.getRuntime().isDate1904()&&(i.date1904=`1`),r.updateLinks&&(i.updateLinks=r.updateLinks),t.empty(`workbookPr`,i)}(0,r,e,s),function(e,t,n,r){let a=r.protection;if(!a||a.workbook)return;let o={};j(a.password??{},o,`workbook`),j(a.revisionsPassword??{},o,`revisions`);for(let e of i.n){let t=i.s(e,a[e.key]);t!==null&&(o[e.attribute]=t)}t.empty(`workbookProtection`,o)}(0,r,0,s),function(e,t,n){t.start(`bookViews`);let r=n.getView(),i={};r.isShowHorizontalScrollbar()||(i.showHorizontalScroll=`0`),r.isShowVerticalScrollbar()||(i.showVerticalScroll=`0`),r.isShowTabs()||(i.showSheetTabs=`0`);let a=r.getTabRatio();a!==600&&(i.tabRatio=a);let o=n.getSelectedSheet().getIndex();o!==0&&(i.activeTab=``+o),t.empty(`workbookView`,i),t.end(`bookViews`)}(0,r,e,s.view);let c=await(async(e,t)=>{let n=[],r=t?t.length:0;if(r===0)return n;let i=new Map;e.getSharedStates().set(`pivotCachePaths`,i);for(let a=0;a<r;a++){let r=t[a],o=r.cacheId,s=r.part;if(s?.xml&&!i.has(o))try{let t=await ie({...s,type:s.type||`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`,contentType:s.contentType||`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml`},e,`/xl/pivotCache/pivotCacheDefinition{n}.xml`);if(!t?.relId)continue;i.set(o,t.path),n.push({cacheId:o,relId:t.relId})}catch(t){e.log(`Unable to write the pivot cache ${o}; the pivot tables on it will be dropped.`,t)}}return n})(t,s.pivotCaches);(function(e,t){t.getComments().some(e=>!e.isNote())&&e.addPart(`persons`,t.getPeople())})(t,e),r.start(`sheets`);let l=t.getSharedStates(),u=e.getStrings().beginPersist();l.set(`persistStrings`,u);let d=new re;l.set(`metaCollector`,d);let f=new P(d,t.log.bind(t));l.set(`persistRichTypes`,f),l.set(M,new N(s.styles,e.getStyles()));try{let i=e.getSheets().getItems({visibility:n.Tt.Visibility.VeryHidden}),a=s.sheets,o=e.getSelectedSheet(),c=i.length,d=((e,t)=>{let n=Array(t),r=new Set,i=1;for(let a=0;a<t;a++){let t=e?.[a]?.sheetId;t===void 0||!Number.isInteger(t)||t<1||r.has(t)||(r.add(t),n[a]=t,t>=i&&(i=t+1))}for(let e=0;e<t;e++)if(n[e]===void 0){for(;r.has(i);)i++;r.add(i),n[e]=i++}return n})(a,c),f=((e,t,n)=>{let r=t.length,i=Array(r),a=new Set(n?.values()??[]),o=new Set;for(let a=0;a<r;a++){let r=e?.[a]?.sheetId;if(r===void 0||t[a]!==r)continue;let s=n?.get(r);s&&!o.has(s)&&(o.add(s),i[a]=s)}let s=1;for(let e=0;e<r;e++){if(i[e])continue;let t;do t=`xl/worksheets/sheet${s++}.xml`;while(a.has(t)||o.has(t));o.add(t),i[e]=t}return i})(a,d,l.get(le));for(let e=0;e<c;e++){let n=i[e],s=``+d[e],c={name:n.getName(),sheetId:s},l=n.getVisibility();l===`hidden`?c.state=`hidden`:l===`veryHidden`&&(c.state=`veryHidden`);let p=a[e].sheet;c[`r:id`]=t.addPart(`worksheet`,{model:n,isSelected:o===n,json:p,persistStrings:u},`/`+f[e]).relId,r.empty(`sheet`,c)}await t.waitEmit();let p=e.getTheme();t.addPart(`theme`,{model:p,json:s.theme}),await t.waitEmit(),t.addPart(`styles`,{styles:e.getStyles(),theme:e.getTheme(),json:s.styles}),await t.waitEmit();let m=await u.toJSONAsync();m&&m.length>0&&(t.addPart(`sharedStrings`,{model:m,json:m}),await t.waitEmit());let h=l.get(`persistRichTypes`);h?.hasAny()&&(t.addPart(`richValue`,h),t.addPart(`richValueStructure`,h),t.addPart(`richValueTypes`,null),await t.waitEmit());let g=l.get(`metaCollector`);g?.hasAny()&&(t.addPart(`metadata`,g),await t.waitEmit()),l.delete(`persistRichTypes`),l.delete(`metaCollector`),l.delete(`persistStrings`)}catch(e){throw e}finally{u.endPersist()}r.end(`sheets`),function(e,t,n){let r=n.externalBooks,i=r?r.length:0;if(i===0)return;let a=e.getSharedStates().get(ue),o=new Set;if(a)for(let e=0;e<i;e++)!r[e]&&a[e]&&o.add(a[e]);let s=[],c=1;for(let t=0;t<i;t++){let n=r[t];if(n){let t;do t=`xl/externalLinks/externalLink${c++}.xml`;while(o.has(t));s.push(e.addPart(`externalLink`,n,`/`+t).relId);continue}let i=a?.[t],l=i?e.addRelationship(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`,i):null;l?s.push(l):e.log(`External link [${t+1}] cannot be written and is being dropped; later links will renumber.`)}if(s.length!==0){t.start(`externalReferences`);for(let e=0;e<s.length;e++)t.empty(`externalReference`,{"r:id":s[e]});t.end(`externalReferences`)}}(t,r,s),function(e,t,r,a){let o=e.getSharedStates().get(i.H),s=a.names,c=s?s.length:0;if(c===0)return;let l=a.externalBooks?.length??0,u=new Map,d=r.getSheets().getItems({visibility:n.Tt.Visibility.VeryHidden});for(let e=0;e<d.length;e++)u.set(d[e].getName().toLowerCase(),e);t.start(`definedNames`);for(let n=0;n<c;n++){let r=s[n],i={name:r.name};if(r.comment&&(i.comment=r.comment),r.scope){let t=u.get(r.scope.toLowerCase());t===void 0?e.log(`Defined name '${r.name}' is scoped to unknown sheet '${r.scope}'; writing it as global.`):i.localSheetId=``+t}r.hidden&&(i.hidden=`1`);let a=o.writeName(r.ref);for(let t of de(a))t>l&&e.log(`Defined name '${r.name}' cites external book [${t}], but only ${l} ${l===1?`is`:`are`} written; Excel will report the file as needing repair.`);t.start(`definedName`,i),t.text(a),t.end(`definedName`)}t.end(`definedNames`)}(t,r,e,s),function(e,t,n){let r=n.getCalculation().toJSON(),i={calcId:e.getSharedStates().get(`calcId`)??`191029`},a=(e,t)=>{let n=r[e];typeof n==`boolean`&&(i[t]=n?`1`:`0`)};if(r.calcMode){let e=fe[r.calcMode];e&&e!==`auto`&&(i.calcMode=e)}a(`fullCalcOnLoad`,`fullCalcOnLoad`),a(`calcOnSave`,`calcOnSave`),a(`calcCompleted`,`calcCompleted`),a(`fullPrecision`,`fullPrecision`),a(`forceFullCalc`,`forceFullCalc`),a(`concurrentCalc`,`concurrentCalc`),r.refMode&&(i.refMode=r.refMode),r.iterate&&(i.iterate=`1`),r.maxIteration!==void 0&&(i.iterateCount=String(r.maxIteration)),r.maxIterateChange!==void 0&&(i.iterateDelta=String(r.maxIterateChange)),t.empty(`calcPr`,i)}(t,r,e),function(e,t){if(t.length!==0){e.start(`pivotCaches`);for(let n=0;n<t.length;n++)e.empty(`pivotCache`,{cacheId:t[n].cacheId,"r:id":t[n].relId});e.end(`pivotCaches`)}}(r,c),function(e,t){let n=e.getSharedStates().get(`calcFeatures`)??`<ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext>`;t.start(`extLst`),t.raw(n),t.end(`extLst`)}(t,r),r.end(`workbook`),r.close()}},new class extends o{constructor(){super({kind:`worksheet`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`,path:()=>`/xl/worksheets/sheet{n}.xml`})}async emit(r,a){let o=a.getXMLWriter(),s=r.model,c=r.json;o.decl(),o.start(`worksheet`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x14ac`,"xmlns:x14ac":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`}),function(e,t,n){let r=n.getTabColor(),i=n.getCodeName(),a={};i&&(a.codeName=i),n.isConditionalFormatCalculationEnabled()||(a.enableFormatConditionsCalculation=`0`);let o=n.getOutlineSettings(),s={};o.summaryBelow||(s.summaryBelow=`0`),o.summaryRight||(s.summaryRight=`0`),o.showOutlineSymbols||(s.showOutlineSymbols=`0`),o.applyStyles&&(s.applyStyles=`1`);let c=Object.keys(s).length>0,l=!!r||c;if(l||Object.keys(a).length!==0){if(!l)return void t.empty(`sheetPr`,a);t.start(`sheetPr`,a),r&&B(t,n.getStyles().getTheme(),r,`tabColor`,!1),c&&t.empty(`outlinePr`,s),t.end(`sheetPr`)}}(0,o,s),function(t,n,r,a){let o=r.getUsedRange({features:[]}),s=o?o.getCoords():null,c=i.T,l=i.k,u=a.directStyles,d=u?u.length:0;for(let t=0;t<d;t++){let n=r.getRange(u[t][0]).getCoords();if(n.colEnd===l){let e=s?.colStart??0;n={...n,colStart:e,colEnd:e}}if(n.rowEnd===c){let e=s?.rowStart??0;n={...n,rowStart:e,rowEnd:e}}s=e.d.unionRanges(s,n)}let f=a.merges,p=f?f.length:0;for(let t=0;t<p;t++){let n=r.getRange(f[t]).getCoords();n.colEnd===l&&(n={...s},n.colStart=s?.colStart??0,n.colEnd=n.colStart),n.rowEnd===c&&(n={...n},n.rowStart=s?.rowStart??0,n.rowEnd=n.rowStart),s=e.d.unionRanges(s,n)}let m=`A1`;s&&(o=r.getRange(s),m=s.colStart===s.colEnd&&s.rowStart===s.rowEnd?o.getAddress():`${o.getIntersect({colStart:s.colStart,rowStart:s.rowStart,colEnd:s.colStart,rowEnd:s.rowStart}).getAddress()}:${o.getIntersect({colStart:s.colEnd,rowStart:s.rowEnd,colEnd:s.colEnd,rowEnd:s.rowEnd}).getAddress()}`),n.empty(`dimension`,{ref:m})}(0,o,s,c),function(e,t,r,i,a){let o=r.getView(),s=o.getTopLeft(),c=r.getRowHeaders().getIndex(s.top),l=r.getColumnHeaders().getIndex(s.left),u=n.Rt.cellToString({colIndex:l,rowIndex:c});t.start(`sheetViews`);let d={};o.isShowFormulas()&&(d.showFormulas=`1`),o.isShowColumnGridlines()||o.isShowRowGridlines()||(d.showGridLines=`0`),o.isShowColumnHeaders()||o.isShowRowHeaders()||(d.showRowColHeaders=`0`),o.isShowZeros()||(d.showZeros=`0`),o.isRightToLeft()&&(d.rightToLeft=`1`),a&&(d.tabSelected=`1`),u!==`A1`&&(d.topLeftCell=u);let f=o.getZoomScale();f!==100&&(d.zoomScale=f,d.zoomScaleNormal=f);let p=o.getGridLineColor();if(p){d.defaultGridColor=`0`;let e=p.toRGBA(),t=e.red,n=e.green,i=e.blue,a=r.getStyles().getIndexedColors(),o=a.length,s=0,c=Number.MAX_VALUE;for(let e=0;e<o;e++){let r=a[e].toRGBA(),o=(t-r.red)**2+(n-r.green)**2+(i-r.blue)**2;o<c&&(c=o,s=e)}d.colorId=``+s}d.workbookViewId=`0`;let m=r.getSelection().getCoords(),h=n.Rt.cellToString(m.cell),g={},_=o.getFreezePanes(),v=_.coords??{},y=v.colIndex??0,b=v.rowIndex??0;if(y>0||b>0){let e=_.topLeft??{},i=e.top??0,a=e.left??0,o=r.getRowHeaders().getIndex(i),c=r.getColumnHeaders().getIndex(a),l=y-c,u=b-o,f=Math.max(y,r.getColumnHeaders().getIndex(s.left+r.getColumnHeaders().getOffset(y)-a)),p=Math.max(b,r.getRowHeaders().getIndex(s.top+r.getRowHeaders().getOffset(b)-i)),m=n.Rt.cellToString({colIndex:c,rowIndex:o});m===`A1`?delete d.topLeftCell:d.topLeftCell=m,t.start(`sheetView`,d);let h={};if(l>0&&(h.xSplit=l),u>0&&(h.ySplit=u),h.topLeftCell=n.Rt.cellToString({colIndex:f,rowIndex:p}),h.state=`frozen`,y===0){h.activePane=`bottomLeft`,t.empty(`pane`,h);let e=n.Rt.cellToString({colIndex:f,rowIndex:o});e!==`A1`&&t.empty(`selection`,{activeCell:e,sqref:e}),g.pane=`bottomLeft`}else if(b===0){h.activePane=`topRight`,t.empty(`pane`,h);let e=n.Rt.cellToString({colIndex:c,rowIndex:p});e!==`A1`&&t.empty(`selection`,{activeCell:e,sqref:e}),g.pane=`topRight`}else{h.activePane=`bottomRight`,t.empty(`pane`,h),m!==`A1`&&t.empty(`selection`,{activeCell:m,sqref:m});let e=n.Rt.cellToString({colIndex:f,rowIndex:o});t.empty(`selection`,{pane:`topRight`,activeCell:e,sqref:e});let r=n.Rt.cellToString({colIndex:c,rowIndex:p});t.empty(`selection`,{pane:`bottomLeft`,activeCell:r,sqref:r}),g.pane=`bottomRight`}}else t.start(`sheetView`,d);g.activeCell=h;let x=m.ranges,S=x?x.length:0;if(S>0){let e=``;for(let t=0;t<S;t++){let r=x[t];t>0&&(e+=` `),e+=n.Rt.rangeToString(r)}g.sqref=e,(m.rangeIndex??0)>0&&(g.activeCellId=``+m.rangeIndex)}else h===`A1`?g=null:g.sqref=h;g&&t.empty(`selection`,g),t.end(`sheetView`),t.end(`sheetViews`)}(0,o,s,0,r.isSelected),function(e,t,n,r){let i=r.defaultColSize,a=r.defaultRowSize,o={};i!==void 0&&(o.defaultColWidth=i),o.defaultRowHeight=a??.75*n.getRowHeaders().getDefaultSize(),a!==void 0&&(o.customHeight=`1`),o[`x14ac:dyDescent`]=`0.25`,t.empty(`sheetFormatPr`,o)}(0,o,s,c);let l=!1===c.protection?.showFormulas?a.getSharedStates().get(`hiddenFormulaXfs`)??null:null;(function(e,t,r,a,o){let s=a.cols?n.Rt.refsToRuns(a.cols,!0):null,c=s?s.length:0;r.getEntireRange().getColumnEnd();let l=r.getColumnHeaders().getDefaultSizeNative(),u=o?o.getHiddenXf(0):0,d=1,f=e=>{u!==0&&e>=d&&t.empty(`col`,{min:d,max:e,width:l,style:u})};if(c>0||u!==0){t.start(`cols`);for(let e=0;e<c;e++){let n=s[e],r=n.min+1,a=i.k+1;if(r>a)continue;let c=Math.min(n.max+1,a);f(r-1),d=c+1;let u={min:r,max:c},p=n.value,m=p.sz;m===void 0?u.width=l:m!==0&&(u.width=Math.round(256*m)/256);let h=o?o.getHiddenXf(p.s??0):p.s;h&&(u.style=h),p.h!==void 0&&(u.hidden=1),p.csz&&(u.customWidth=1),p.l!==void 0&&(u.outlineLevel=p.l),p.cl!==void 0&&(u.collapsed=1),t.empty(`col`,u)}f(i.k+1),t.end(`cols`)}})(0,o,s,c,l),function(e,r,a,o,s,c){let l=e.getSharedStates(),u=l.get(`persistStrings`),d=l.get(`metaCollector`),f=l.get(`persistRichTypes`),p=0,m=0,h=a.getUsedRange(),g=0,_=o.rows?n.Rt.refsToRuns(o.rows,!1):null,v=_?_.length:0,y=_?.[v-1]?.max??-1,b=o.cols?n.Rt.refsToRuns(o.cols,!0):null,x=b?b.length:0,S=b?.[x-1]?.max??-1;if(h||v>0){let l=.75,h=o.defaultRowSize??a.getRowHeaders().getDefaultSize()*l,v=a.getStyles().getNormal().getBestFit().height*l,x=(e,t)=>{let n=_t;if(n.r=``+(e+1),n.s=void 0,n.customFormat=void 0,n.hidden=void 0,n.ht=void 0,n.customHeight=void 0,n.outlineLevel=void 0,n.collapsed=void 0,!t)return n;let r=t.value;r.s!==void 0&&(n.s=``+(c?c.getHiddenXf(r.s):r.s),n.customFormat=`1`),r.h&&(n.hidden=`1`);let i=r.csz??!1,a=r.sz??h;return(a!==v||i)&&(n.ht=``+a),i&&(n.customHeight=`1`),r.l!==void 0&&(n.outlineLevel=``+r.l),r.cl!==void 0&&(n.collapsed=``+r.cl),n},C=0,w=_?.[C]??null,T=w?.min??2**53-1,E=w?.max??2**53-1,D=w?.value?.s,O=-1,k=0,A=b?.[k]??null,ee=A?.min??2**53-1,te=A?.max??2**53-1,ne=A?.value?.s,j=(e,t=!1)=>{if(O!==e){for(O!==-1&&(r.end(`row`),k!==0&&(k=0,A=b?.[k]??null,ee=A?.min??2**53-1,te=A?.max??2**53-1,ne=A?.value?.s));O+1<=e;){O++,w&&O>E&&(w=_[++C]??null,w?(T=w.min,E=w.max,D=w.value?.s):(T=2**53-1,E=2**53-1,D=void 0)),O<T&&O<e&&(O=w?Math.min(T,e):e);let n=O<e||t&&O===e,i=x(O,w&&O>=T&&O<=E?w:null);n?r.empty(`row`,i):r.start(`row`,i)}if(e<O){let t=x(e,null);r.start(`row`,t)}}};r.setValidationDisabled(!0),r.start(`sheetData`);let M=[];M.push(((e,t,n)=>{if(!n)return[];let r=0;for(let i=0;i<n.length;i++){let a=n[i][0],o=t.getRange(a).getCoords();if(r+=(o.rowEnd-o.rowStart+1)*(o.colEnd-o.colStart+1),r>$e)return e.warn(`Direct styles cover more than ${$e} cells; not writing the styles from '${a}' on. A range that size belongs in a column or row style.`),n.slice(0,i)}return n})(e,a,o.directStyles));let N=o.formulas,re=N?N.length:0;if(re>0){let t=new Map;if(s.names.size>0&&o.formulaArray)for(let e of o.formulaArray)try{let n=a.getRange(e[0]).getCoords();t.set(`${n.rowStart},${n.colStart}`,n)}catch{}let r=[];if(o.formulaArray)for(let e of o.formulaArray)try{r.push(a.getRange(e[0]).getCoords())}catch{}let c=e=>{for(let t=0;t<r.length;t++){let n=r[t];if(n.rowStart<=e.rowEnd&&n.rowEnd>=e.rowStart&&n.colStart<=e.colEnd&&n.colEnd>=e.colStart)return!0}return!1},l=e.getSharedStates().get(`xlsxFormulaDialect`)??i.q(a.getCalculation().getNamedFormulas().toJSON(),a.getTables().getItems().map(e=>e.getName())),u=a.getEntireRange().getCoords(),d=[];for(let e of a.getTables().getItems())d.push([e.getRange().getCoords(),e.getName()]);let f=(e,t)=>{for(let n=0;n<d.length;n++){let r=d[n][0];if(e>=r.rowStart&&e<=r.rowEnd&&t>=r.colStart&&t<=r.colEnd)return d[n][1]}return null},p=new Set;for(let e=0;e<r.length;e++)p.add(`${r[e].rowStart},${r[e].colStart}`);let m=[];for(let r=0;r<re;r++){let o=N[r];try{let e=o[0],d=a.getRange(e),h=d.getCoords(),_=o[1],v=null,y={rowIndex:h.rowStart,colIndex:h.colStart},b=l.parse(_,y),x=b?l.annotate(b):void 0,S=b?l.spell(b,p.has(`${h.rowStart},${h.colStart}`),f(h.rowStart,h.colStart)):null,C=S?n.C.imager(S,{entireCoords:u}):null;C&&(_=C(y));let w=!0===x?.cm,T=!0===x?.ca;if(s.affects(r)){v=null,w=!1;let e=(e,t,r)=>{let i={rowStart:e,colStart:t,rowEnd:e,colEnd:t};m.push([i,{coords:i,formula:r,sharedId:null,ref:n.Rt.rangeToString(i),isDynamicRange:!1,isWrapped:!0}])},r=t.get(`${h.rowStart},${h.colStart}`),o=r!==void 0&&(r.rowEnd>r.rowStart||r.colEnd>r.colStart),s=!1;if(o){let t=i.it(_,d.getCell().getValue());if(t!==null)for(let o=r.rowStart;o<=r.rowEnd;o++)for(let c=r.colStart;c<=r.colEnd;c++){if(o===r.rowStart&&c===r.colStart){e(o,c,t),s=!0;continue}let l=i.d(a.getRange(n.Rt.rangeToString({rowStart:o,colStart:c,rowEnd:o,colEnd:c})).getCell().getValue());l!==null&&e(o,c,l)}}else d.forEach((t,n)=>{let r=n.getCoords(),a=i.it(C?.(r)??_,n.getCell().getValue());a!==null&&(e(r.rowIndex,r.colIndex,a),s=!0)},{includeEmpty:!0});if(s)continue}let E=_.indexOf(`!`)!==-1||_.indexOf(`[`)!==-1;w||d.isSingleCell()||E||c(h)||(v=``+g++);let D=v!==null||d.isSingleCell()?null:C,O=[h,{coords:h,formula:_,sharedId:v,ref:e,isDynamicRange:w,isExcelVolatile:T,memberImage:D}];m.push(O)}catch(t){e.log(`Could not write the formula '${o[1]}' over '${o[0]}'; those cells are written as values only. ${t}`);continue}}M.push(m)}else M.push([]);let P=o.volatile,F=P?P.length:0;if(F>0){let e=Array(F);for(let t=0;t<F;t++){let n=P[t];try{e[t]=[a.getRange(n).getCoords(),!0]}catch(e){console.warn(`Failed to parse volatile: ${n}`,e);continue}}M.push(e)}else M.push([]);let I=o.formulaArray,L=I?I.length:0;if(L>0){let e=Array(L);for(let t=0;t<L;t++){let n=I[t];try{let r=n[0];e[t]=[a.getRange(r).getCoords(),{ref:r,kind:n[1]??`dynamic`}]}catch(e){console.warn(`Failed to parse formula array: ${n}`,e);continue}}M.push(e)}else M.push([]);a.getEntireRange().forEach((n,a)=>{let o=a.getCoords(),s=o.rowIndex,l=o.colIndex;O!==s&&j(s);let h=a.getInjectedReference(0);if(h===void 0&&D!==void 0&&s>=T&&s<=E&&(h=D),h===void 0){for(;l<=S&&l>te;)k++,A=b?.[k]??null,ee=A?.min??2**53-1,te=A?.max??2**53-1,ne=A?.value?.s;ne!==void 0&&l>=ee&&l<=te&&(h=ne)}let g=a.getType(),_=null;re>0&&(_=a.getInjectedReference(1)??null);let v=!1;F>0&&(v=a.getInjectedReference(2)??!1);let y=null;L>0&&(y=a.getInjectedReference(3)??null);let x=y?.kind===`error`,C=y?.kind===`fixed`,w=gt;w.r=a.getAddress(),w.s=void 0,w.t=void 0,w.cm=void 0,w.vm=void 0,c&&(h=c.getHiddenXf(h??0)),h!==void 0&&h!==0&&(w.s=``+h);let M=null,N=null;switch(g){case t.t.Boolean:M=n?`1`:`0`,N=`b`;break;case t.t.Error:let e=n.getCode();if(N=`e`,e>7)M=t.i.BuiltIn.Value.getLabel(),w.vm=``+f.add(n);else if(e<1){let e;N=`s`,_?(e=`=`+_.formula,_=null):e=``+n.getLabel(),M=``+u.add(e),p++}else M=``+n.getLabel();break;case t.t.Number:M=``+n,N=null;break;case t.t.String:M=n,_?(N=`str`,M=n):(N=`s`,M=``+u.add(M),p++);break;case t.t.RichData:N=`e`,M=t.i.BuiltIn.Value.getLabel(),w.vm=``+f.add(n)}N&&(w.t=N);let P=!_?.isWrapped&&(y!==null||(_?.isDynamicRange??!1));if(_!==null||M!==null){if(P&&_!==null&&!C&&(w.cm=``+d.registerArrayCell(x)),r.start(`c`,w),_){let e=s===_.coords.rowStart&&l===_.coords.colStart,t=_.formula;_.memberImage&&!e&&(t=_.memberImage({rowIndex:s,colIndex:l}));let n,i=null,a=_.sharedId;if(a){n=yt;let e=_.coords;e.colStart===l&&e.rowStart===s?(n.ref=_.ref,n.si=a,i=_.formula):(n.ref=void 0,n.si=a)}else P?(n=bt,n.aca=x?`1`:void 0,n.ref=x?w.r:y?.ref??w.r,i=t):(n=vt,i=t);n.ca=v||x||_.isExcelVolatile?`1`:void 0,i?(r.start(`f`,n),r.text(i),r.end(`f`)):r.empty(`f`,n)}M!==null&&(N===`str`&&M?(r.start(`v`,i.i.test(M)?i.c:void 0),r.text(i.p(M))):(r.start(`v`),M&&r.text(M)),r.end(`v`)),r.end(`c`)}else m++<$e?r.empty(`c`,w):m===1048577&&e.warn(`Reached ${$e} style-only cells at '${w.r}'; not writing the rest.`)},{injectReferences:M,features:[]}),O!==-1&&O>=y?r.end(`row`):j(y,!0),r.end(`sheetData`),r.setValidationDisabled(!1)}else r.empty(`sheetData`);if(p>0){let e=l.get(`stringsCount`)??0;l.set(`stringsCount`,e+p)}}(a,o,s,c,await(async(e,t)=>{let r=t?t.length:0;if(r===0)return Qe;let a=new Set,o=Array(r);for(let e=0;e<r;e++){o[e]=null;try{let r=n.C.parse(t[e][1]);if(!r)continue;let i=null,s=e=>{let t=null;e.type===`function`?t=String(e.value):e.type===`call`&&e.inputs?.[0]?.type===`named`&&(t=String(e.inputs[0].value?.name??``)),t&&(t=t.toUpperCase(),a.add(t),(i??=new Set).add(t));let n=e.inputs;if(n)for(let e=0;e<n.length;e++)n[e]&&s(n[e])};s(r),o[e]=i}catch{}}let s=e.getWorkbook();if(!s)return Qe;let c=await i.r(s,a);return c.size===0?Qe:{names:c,perFormula:o,affects:e=>{let t=o[e];if(!t)return!1;for(let e of t)if(c.has(e))return!0;return!1}}})(s,c.formulas),l),function(e,t,n,r){let a=r.protection;if(!a)return;let o={};a.sheet||j(a.password??{},o);for(let e of i.F){let t=i.s(e,a[e.key]);t!==null&&(o[e.attribute]=t)}t.empty(`sheetProtection`,o)}(0,o,0,c),function(e,t,n,r){let i=r.protectedRanges,a=i?i.length:0;if(a===0)return;let o=[];for(let t=0;t<a;t++){let n,r,a=i[t];Array.isArray(a)?(n=a[0],r=a[1]):(n=a.r,r=a.v);let s=ot(n);if(!s||!r){e.log(`Skipping protectedRange with no range.`);continue}if(!r.name){e.log(`Skipping protectedRange with no name.`);continue}let c={};j(r.password??{},c),c.sqref=s,c.name=r.name,r.securityDescriptor&&(c.securityDescriptor=r.securityDescriptor),o.push(c)}if(o.length!==0){t.start(`protectedRanges`);for(let e=0;e<o.length;e++)t.empty(`protectedRange`,o[e]);t.end(`protectedRanges`)}}(a,o,0,c);let u=c.autoTable;if(u){let e,t=u;e=Array.isArray(t)?t[1]:t.v,Ye(a,o,s.getAutoTable(),e,!0)}(function(e,t,r,i){let a=i.merges?i.merges.length:0;if(a>0){t.start(`mergeCells`,{count:a});for(let e=0;e<a;e++){let r=i.merges[e],a=typeof r==`string`?r:n.Rt.rangeToString(r);t.empty(`mergeCell`,{ref:a})}t.end(`mergeCells`)}})(0,o,0,c);let d=function(t,r,a,o){let s=[],c=o.conditionals,l=c?c.length:0;if(l===0)return s;let u=t.getSharedStates(),d=u.get(Ie);d||(d=new Fe,u.set(Ie,d));let f=a.getStyles().getTheme(),p=u.get(i.H),m=null,h=0;for(let a=0;a<l;a++){let o,l,u=c[a];Array.isArray(u)?(o=u[0],l=u[1]):(o=u.r,l=u.v);let g=ot(o);if(!g||!l){t.log(`Skipping conditionalFormatting with no range.`);continue}let _=lt(g),v=dt(l.scale,_,p);v!==l.scale&&(l={...l,scale:v});let y=v?{type:v.type}:i.Z(l.condition,at(g),(e,n)=>t.warn(e,void 0,n));y?(y.formulas&&=y.formulas.map(e=>ut(e,_,p)),v?.type===n.sn.ScaleType.IconSet&&rt(v)?(h++,s.push({guid:i.tt(e.I.uuidV4),sqref:g,priority:h,scale:v})):v||!ct(y)?(g!==m&&(m!==null&&r.end(`conditionalFormatting`),r.start(`conditionalFormatting`,{sqref:g,pivot:l.pivot?`1`:void 0}),m=g),h++,it(t,r,f,l,y,g,h,d,s)):(h++,s.push({guid:i.tt(e.I.uuidV4),sqref:g,priority:h,rule:y,style:l.style,stopIfTrue:l.stopIfTrue}))):l.condition||t.log(`Skipping conditional format with neither a condition nor a scale.`)}return m!==null&&r.end(`conditionalFormatting`),s}(a,o,s,c),f=function(e,t,n,r){let a=[],o=e.getSharedStates().get(i.H),s=r.validations,c=s?s.length:0;if(c===0)return a;let l=[];for(let t=0;t<c;t++){let n,r,c=s[t];Array.isArray(c)?(n=c[0],r=c[1]):(n=c.r,r=c.v);let u=ot(n);if(!u||!r){e.log(`Skipping dataValidation with no range.`);continue}r.ext&&e.warn(`DataValidation extension payload is not written to xlsx; it will be lost.`);let d=(t,n)=>e.warn(t,void 0,n),f=i.ot(r.condition,d),{type:p,operator:m}=f??{},h=lt(u),g=ut(f?.formula1,h,o),_=ut(f?.formula2,h,o),v={type:p,operator:m,allowBlank:X(r.condition?.includeBlanks??!1),showDropDown:r.hideDropdown?`1`:void 0,showInputMessage:X(r.showPromptMessage),showErrorMessage:X(r.showAlertMessage),errorStyle:r.alertStyle??`stop`,errorTitle:i.o(r.alertTitle,`errorTitle`,d),error:i.o(r.alert,`error`,d),promptTitle:i.o(r.promptTitle,`promptTitle`,d),prompt:i.o(r.prompt,`prompt`,d),imeMode:r.imeMode};st(g)||st(_)?a.push({attrs:v,formula1:g,formula2:_,sqref:u}):(v.sqref=u,l.push({attrs:v,formula1:g,formula2:_}))}if(l.length===0)return a;t.start(`dataValidations`,{count:l.length});for(let e=0;e<l.length;e++){let{attrs:n,formula1:r,formula2:i}=l[e];r!==void 0||i!==void 0?(t.start(`dataValidation`,n),r!==void 0&&(t.start(`formula1`),t.text(r),t.end(`formula1`)),i!==void 0&&(t.start(`formula2`),t.text(i),t.end(`formula2`)),t.end(`dataValidation`)):t.empty(`dataValidation`,n)}return t.end(`dataValidations`),a}(a,o,0,c);(function(e,t,n,r){let i=r.hyperlinks,a=i?i.length:0;if(a!==0){t.start(`hyperlinks`);for(let n=0;n<a;n++){let r,a,o=i[n];Array.isArray(o)?(a=o[0],r=o[1]):(a=o.r,r=o.v),typeof r==`string`&&(r={address:r});let s=r.address??``,c=s.indexOf(`#`),l=c===-1?s:s.substring(0,c),u=c===-1?``:s.substring(c+1),d={};d.ref=a,l&&(d[`r:id`]=e.addExternal(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,l).relId),u&&(d.location=u),r.screenTip&&(d.tooltip=r.screenTip),t.empty(`hyperlink`,d)}t.end(`hyperlinks`)}})(a,o,0,c),function(e,t,n,r){let i=r.pageMargins;t.empty(`pageMargins`,{left:i?.left??.7,right:i?.right??.7,top:i?.top??.75,bottom:i?.bottom??.75,header:i?.header??.3,footer:i?.footer??.3})}(0,o,0,c),function(e,t,n,r){let i=r.movables?.filter(mt);if((i?i.length:0)===0||!i.some(e=>{let t=e.content?.type;if(t===`picture`||t===`chart`)return!0;if(t===`shape`){let t=e.content?.json?.type;return t===`sp`||t===`cxnSp`}return!1}))return;let a=n.getMovables().getItems().filter(e=>e.getContent().getType()!==`note`).filter((e,t)=>mt(r.movables[t])),o=e.addPart(`drawing`,{sheet:n,movables:a,jsonMovables:i,resources:n.getResources()});t.empty(`drawing`,{"r:id":o.relId})}(a,o,s,c);let p=function(e){let t=e.getComments().toArray();if(t.length===0)return null;let n=[];for(let e=0;e<t.length;e++){let r=t[e],i=Ee(r);i&&n.push({comment:r,...i})}return n.length===0?null:(n.sort((e,t)=>e.row-t.row||e.col-t.col),{sheet:e,comments:n})}(s);var m,h;ft(a,o,`legacyDrawing`,((e,t)=>{if(!t)return e;let n=e?.xml??null,r=i.x(n??``),a=[],o=t.comments;for(let e=0;e<o.length;e++){let{comment:n,row:s,col:c}=o[e],l=n.isNote()?n.toJSON():null,{bounds:u,anchor:d}=pt(t.sheet,n,s,c);a.push(i.Y(l?.box?.xml,{shapeId:++r,zIndex:e+1,row:s,col:c,anchor:d,bounds:u,visible:!!l?.shown,alt:l?.description}))}let s=i.L(n,a,r);return s?s===n?e:e?{...e,xml:s}:{xml:s}:e})(((e,t)=>{if(!e?.xml)return e;let n=t.movables;if(!n)return e;let r=new Map,i=n.length;for(let e=0;e<i;e++){let t=n[e];if(mt(t))continue;let i=t.content?.json?.shapeId;typeof i==`number`&&r.set(i,t)}if(r.size===0)return e;let a=e.xml.replace(/<v:shape\b[\s\S]*?<\/v:shape>/g,e=>{let t=/\bo:spid="_x0000_s(\d+)"/.exec(e)??/\bid="_x0000_s(\d+)"/.exec(e),n=t?r.get(parseInt(t[1],10)):void 0;if(!n)return e;let i=n.anchor,a=[i.tl.c,i.tl.r,i.br.c,i.br.r];return e.replace(/(<x:Anchor>)([\s\d,-]*)(<\/x:Anchor>)/,(e,t,n,r)=>{let i=n.split(`,`).map(e=>e.trim());if(i.length!==8)return e;let o=i.slice();for(let e=0;e<4;e++)o[2*e]=String(a[e]??0);return o.join(`,`)===i.join(`,`)?e:`${t}${o.join(`, `)}${r}`})});return a===e.xml?e:{...e,xml:a}})(c.legacyDrawing??null,c),p)),ft(a,o,`legacyDrawingHF`,c.legacyDrawingHF??null),await async function(e,t,n){let r=n.getPicture();if(!r)return;let i,a=r.getResource(),o=await a.getExternalURI();if(o)i=e.addExternal(U,o);else{let t=e.getSharedStates(),n=t.get(W);n||(n=new Map,t.set(W,n));let r=n.get(a);if(!r){let e=await a.toBuffer();r={bytes:new Uint8Array(e),type:await a.getType()??Ne,index:n.size+1},n.set(a,r)}i=e.addBinary(r.bytes,r.type.mime,U,`../media/image${r.index}.${r.type.ext}`,!0)}t.empty(`picture`,{"r:id":i.relId})}(a,o,s),await async function(e,t,n){let r=n.movables;if(!r||r.every(mt))return;let a=[],o=r.length;for(let t=0;t<o;t++){let n=r[t];if(mt(n))continue;let i,o=n.content?.json??{},s=o.part;if(s)try{i=(await ie(s.type?s:{...s,type:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp`},e,`../ctrlProps/ctrlProp{n}.xml`))?.relId??void 0}catch(t){e.log(`Unable to write the properties of the control '${n.content?.name}'`,t)}i?a.push({jsonMovable:n,jsonControl:o,relId:i}):e.log(`The control '${n.content?.name}' has no properties to write and was dropped.`)}if(a.length===0)return;t.start(`mc:AlternateContent`,{"xmlns:x14":i.J,"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`}),t.start(`mc:Choice`,{Requires:`x14`}),t.start(`controls`);let s=a.length;for(let e=0;e<s;e++){let{jsonMovable:n,jsonControl:r,relId:i}=a[e];t.start(`mc:AlternateContent`),t.start(`mc:Choice`,{Requires:`x14`}),t.start(`control`,{shapeId:r.shapeId,"r:id":i,name:n.content?.name??void 0});let o=n.anchorType??`twoCell`;t.start(`controlPr`,r.props),t.start(`anchor`,{moveWithCells:o===`absolute`?void 0:`1`,sizeWithCells:o===`twoCell`?`1`:void 0}),ht(t,`from`,n.anchor.tl),ht(t,`to`,n.anchor.br),t.end(`anchor`),r.xml&&t.raw(r.xml),t.end(`controlPr`),t.end(`control`),t.end(`mc:Choice`),t.end(`mc:AlternateContent`)}t.end(`controls`),t.end(`mc:Choice`),t.end(`mc:AlternateContent`)}(a,o,c),function(e,t,n,r){let i=r.tables,a=i?i.length:0;if(a===0)return;let o=n.getTables().getItems();t.start(`tableParts`,{count:a});for(let n=0;n<a;n++){let r,a,s=i[n];Array.isArray(s)?(a=s[0],r=s[1]):(a=s.r,r=s.v);let c=e.addPart(`table`,{json:r,model:o[n],ref:a}),l={};l[`r:id`]=c.relId,t.empty(`tablePart`,l)}t.end(`tableParts`)}(a,o,s,c),function(e,t,r,a,o){if(a.length===0&&o.length===0)return;let s=r.getStyles(),c=s.getTheme();if(t.start(`extLst`),a.length>0){t.start(`ext`,{uri:i.Q,"xmlns:x14":i.J}),t.start(`x14:conditionalFormattings`);for(let e=0;e<a.length;e++){let{guid:r,sqref:i,priority:o,scale:l,rule:u,style:d,stopIfTrue:f}=a[e];if(t.start(`x14:conditionalFormatting`,{"xmlns:xm":`http://schemas.microsoft.com/office/excel/2006/main`}),l)if(l.type===n.sn.ScaleType.DataBar){t.start(`x14:cfRule`,{type:`dataBar`,id:r}),t.start(`x14:dataBar`,{minLength:l.minLength,maxLength:l.maxLength,gradient:l.gradient?void 0:`0`,border:l.borderColor?`1`:void 0,direction:l.direction,negativeBarColorSameAsPositive:l.negativeFillColor?`0`:`1`,negativeBarBorderColorSameAsPositive:l.negativeBorderColor?`0`:void 0,axisPosition:l.axisPosition});let e=l.stops??[];if(e.length===0)tt(t,{type:n.sn.ColorStopType.AutoMin}),tt(t,{type:n.sn.ColorStopType.AutoMax});else for(let n=0;n<e.length;n++)tt(t,e[n]);l.borderColor&&B(t,c,l.borderColor,`x14:borderColor`),l.negativeFillColor&&B(t,c,l.negativeFillColor,`x14:negativeFillColor`),l.negativeBorderColor&&B(t,c,l.negativeBorderColor,`x14:negativeBorderColor`),l.axisColor&&B(t,c,l.axisColor,`x14:axisColor`),t.end(`x14:dataBar`),t.end(`x14:cfRule`)}else{t.start(`x14:cfRule`,{type:`iconSet`,priority:o,id:r}),t.start(`x14:iconSet`,{iconSet:l.iconSet,reverse:X(l.reverse),showValue:X(l.showValue),custom:(l.icon?.length??0)>0?`1`:void 0});let e=l.stops??[];for(let n=0;n<e.length;n++)tt(t,e[n]);let n=l.icon??[];for(let e=0;e<n.length;e++)t.empty(`x14:cfIcon`,{iconSet:n[e].set,iconId:n[e].id});t.end(`x14:iconSet`),t.end(`x14:cfRule`)}else{t.start(`x14:cfRule`,{type:u.type,priority:o,stopIfTrue:X(f),aboveAverage:X(u.aboveAverage),equalAverage:X(u.equalAverage),stdDev:u.stdDev,bottom:X(u.bottom),percent:X(u.percent),rank:u.rank,operator:u.operator,text:u.text,timePeriod:u.timePeriod,id:r});let e=u.formulas??[];for(let n=0;n<e.length;n++)t.start(`xm:f`),t.text(e[n]),t.end(`xm:f`);d&&Object.keys(d).length>0&&We(0,t,d,s,c,`x14:dxf`),t.end(`x14:cfRule`)}t.start(`xm:sqref`),t.text(i),t.end(`xm:sqref`),t.end(`x14:conditionalFormatting`)}t.end(`x14:conditionalFormattings`),t.end(`ext`)}if(o.length>0){t.start(`ext`,{uri:i.I,"xmlns:x14":i.J}),t.start(`x14:dataValidations`,{"xmlns:xm":i.y,count:o.length});for(let e=0;e<o.length;e++){let{attrs:n,formula1:r,formula2:i,sqref:a}=o[e];t.start(`x14:dataValidation`,n),r!==void 0&&(t.start(`x14:formula1`),t.start(`xm:f`),t.text(r),t.end(`xm:f`),t.end(`x14:formula1`)),i!==void 0&&(t.start(`x14:formula2`),t.start(`xm:f`),t.text(i),t.end(`xm:f`),t.end(`x14:formula2`)),t.start(`xm:sqref`),t.text(a),t.end(`xm:sqref`),t.end(`x14:dataValidation`)}t.end(`x14:dataValidations`),t.end(`ext`)}t.end(`extLst`)}(0,o,s,d,f),function(e,t){let n=t.pivotTables,r=n?n.length:0;for(let t=0;t<r;t++){let r=n[t],i=r.part;i?.xml&&(se(e,r.cacheId)?e.addPart(`pivotTable`,r):e.log(`The pivot table '${i.name??``}' has no cache with id ${r.cacheId} and was dropped.`))}}(a,c),m=a,(h=p)&&(m.addPart(`comments`,h),h.comments.some(e=>!e.comment.isNote())&&m.addPart(`threadedComments`,h)),o.end(`worksheet`),o.close()}},new class extends o{constructor(){super({kind:`sharedStrings`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings`,path:`/xl/sharedStrings.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.json,a=r?r.length:0,o=t.getSharedStates().get(`stringsCount`)??0;n.decl(),n.start(`sst`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,count:o,uniqueCount:a});for(let e=0;e<a;e++){let t=r[e];n.start(`si`);let a=i.i.test(t)?i.c:void 0;n.start(`t`,a),n.text(i.p(t)),n.end(`t`),n.end(`si`)}n.end(`sst`),n.close()}},new class extends o{constructor(){super({kind:`theme`,contentType:`application/vnd.openxmlformats-officedocument.theme+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,path:`/xl/theme/theme{n}.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.model,i=e.json;n.decl(),n.pushDefaultNamespace(`a`),n.start(`theme`,{"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,name:r.getName()||`Office Theme`}),n.start(`themeElements`),function(e,t,n,r){let i=n?.getColorScheme();if(i){t.start(r,{name:i.getName()||`Office`});for(let e of he)t.start(e),R(t,n,i[`get`+e.charAt(0).toUpperCase()+e.slice(1)]()),t.end(e);t.end(r)}}(0,n,r,`clrScheme`),function(e,t,n,r){n&&(t.start(r,{name:n.getName()||`Office`}),xt(0,t,n.getMajorFont()||`Calibri Light`,`majorFont`),xt(0,t,n.getMinorFont()||`Calibri`,`minorFont`),t.end(r))}(0,n,r.getFontScheme(),`fontScheme`),function(e,t,n,r,i){i?.fillStyleLst&&i?.lnStyleLst&&i?.effectStyleLst&&i?.bgFillStyleLst?function(e,t,n,r,i){let a={getTheme:()=>r};t.start(n,{name:`Office`}),t.start(`fillStyleLst`);for(let e of i.fillStyleLst)H(0,t,e,a);t.end(`fillStyleLst`),t.start(`lnStyleLst`);for(let e of i.lnStyleLst)De(0,t,e,a);t.end(`lnStyleLst`),t.start(`effectStyleLst`);for(let n of i.effectStyleLst)t.start(`effectStyle`),n.length>0?Ae(e,t,r,n):t.empty(`effectLst`),t.end(`effectStyle`);t.end(`effectStyleLst`),t.start(`bgFillStyleLst`);for(let e of i.bgFillStyleLst)H(0,t,e,a);t.end(`bgFillStyleLst`),t.end(n)}(e,t,n,r,i):i?.formatSchemeXml?t.raw(i.formatSchemeXml):(t.start(n,{name:`Office`}),function(e,t){t.start(`fillStyleLst`),t.start(`solidFill`),t.empty(`schemeClr`,{val:`phClr`}),t.end(`solidFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`50000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`35000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`37000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`15000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`lin`,{ang:`16200000`,scaled:`1`}),t.end(`gradFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`51000`}),t.empty(`satMod`,{val:`130000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`80000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`93000`}),t.empty(`satMod`,{val:`130000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`94000`}),t.empty(`satMod`,{val:`135000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`lin`,{ang:`16200000`,scaled:`0`}),t.end(`gradFill`),t.end(`fillStyleLst`)}(0,t),function(e,t){t.start(`lnStyleLst`);let n=[9525,25400,38100];for(let e=0;e<3;e++)t.start(`ln`,{w:n[e].toString(),cap:`flat`,cmpd:`sng`,algn:`ctr`}),t.start(`solidFill`),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`95000`}),t.empty(`satMod`,{val:`105000`}),t.end(`schemeClr`),t.end(`solidFill`),t.empty(`prstDash`,{val:`solid`}),t.end(`ln`);t.end(`lnStyleLst`)}(0,t),function(e,t){t.start(`effectStyleLst`);for(let e=0;e<3;e++)t.start(`effectStyle`),t.start(`effectLst`),e===2&&(t.start(`outerShdw`,{blurRad:`40000`,dist:`20000`,dir:`5400000`,rotWithShape:`0`}),t.start(`srgbClr`,{val:`000000`}),t.empty(`alpha`,{val:`38000`}),t.end(`srgbClr`),t.end(`outerShdw`)),t.end(`effectLst`),t.end(`effectStyle`);t.end(`effectStyleLst`)}(0,t),function(e,t){t.start(`bgFillStyleLst`),t.start(`solidFill`),t.empty(`schemeClr`,{val:`phClr`}),t.end(`solidFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`40000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`40000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`45000`}),t.empty(`shade`,{val:`99000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`20000`}),t.empty(`satMod`,{val:`255000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`path`,{path:`circle`}),t.empty(`fillToRect`,{l:`50000`,t:`-80000`,r:`50000`,b:`180000`}),t.end(`gradFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`80000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`30000`}),t.empty(`satMod`,{val:`200000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`path`,{path:`circle`}),t.empty(`fillToRect`,{l:`50000`,t:`50000`,r:`50000`,b:`50000`}),t.end(`gradFill`),t.end(`bgFillStyleLst`)}(0,t),t.end(n))}(t,n,`fmtScheme`,r,i),n.end(`themeElements`),n.start(`objectDefaults`),n.end(`objectDefaults`),n.start(`extraClrSchemeLst`),n.end(`extraClrSchemeLst`),n.end(`theme`),n.close()}},new class extends o{constructor(){super({kind:`styles`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles`,path:`/xl/styles.xml`})}async emit(t,r){let i=r.getXMLWriter(),a=t.json,o=(t.theme,t.styles);i.decl(),i.start(`styleSheet`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x14ac x16r2 xr`,"xmlns:x14ac":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`,"xmlns:x16r2":`http://schemas.microsoft.com/office/spreadsheetml/2015/02/main`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`});let s=function(e,t){let r=t?.direct;r&&r.length!==0||(r=[{}]);let i=r.length,a=Array(i);for(let t=0;t<i;t++){let i=t===0?{...r[t],named:n.X.BuiltInName.Normal}:r[t],o=e.resolve(i),s={};i.named!==void 0&&(s.named=i.named),i.quotePrefix!==void 0&&(s.quotePrefix=i.quotePrefix),i.protection!==void 0&&(s.protection=i.protection);for(let e=0;e<Le.length;e++){let t=Le[e];if(i[t]===void 0&&t!==`alignment`)continue;let n=o?.[t]??i[t];n!==void 0&&(s[t]=n)}a[t]=s}return a}(o,a),c=function(t,r,i){let a={fontMap:new Map,fonts:[],fillMap:new Map,fills:[],borderMap:new Map,borders:[],numFmtMap:new Map,numFmtsCustom:[],namedStyleMap:new Map,namedStyles:[]};(function(t,r){let i=(t.getNamedStyles().getByName(n.X.BuiltInName.Normal).toJSON().style??{}).font??{};r.fontMap.set(e.z.JSONStableStringify(i),`0`),r.fonts.push(i)})(t,a),function(t){let n={type:`none`};t.fillMap.set(e.z.JSONStableStringify(n),`0`),t.fills.push(n);let r={type:`pattern`,patternType:`gray125`};t.fillMap.set(e.z.JSONStableStringify(r),`1`),t.fills.push(r)}(a),function(t){let n={bottom:{style:`none`},left:{style:`none`},right:{style:`none`},top:{style:`none`}};t.borderMap.set(e.z.JSONStableStringify(n),`0`),t.borders.push(n)}(a),function(e,t){ze(e,e.getNamedStyles().getByName(n.X.BuiltInName.Normal).toJSON(),t)}(t,a);let o=r?.named??e.I.EmptyArray;for(let e of o)ze(t,e,a);for(let e of i)Re(t,e,a);return a}(o,a,s),l=r.getSharedStates().get(Ie),u=function(e,t=0){let n=e?.tables;if(!n)return null;let r=n.styles;if(!r)return null;let i=[],a=new Map,o=Object.keys(r),s=[...Ke].reverse();for(let e of o){let n=r[e];for(let r of s){let o=n[r];if(!o)continue;let s={};if(o.font&&(s.font=o.font),o.fill&&(s.fill=o.fill),o.borders&&(s.borders=o.borders),o.numberFormat!==void 0&&(s.numberFormat=o.numberFormat),Object.keys(s).length===0)continue;let c=t+i.length;i.push(s);let l=`${e}:${r}`;a.set(l,c)}}return{dxfs:i,dxfIndexMap:a}}(a,l?.getCount()??0);(function(e,t,n){let r=n.numFmtsCustom,i=r.length;if(i!==0){t.start(`numFmts`,{count:String(i)});for(let e=0;e<i;e++){let n=r[e];t.empty(`numFmt`,{numFmtId:String(e+Ge),formatCode:n})}t.end(`numFmts`)}})(0,i,c),function(e,t,n,r){let i=r.fonts,a=i.length;t.start(`fonts`,{count:String(a),"x14ac:knownFonts":`1`});for(let e of i)Be(0,t,e,n);t.end(`fonts`)}(0,i,o,c),function(e,t,n,r){let i=r.fills,a=i.length;t.start(`fills`,{count:String(a)});for(let e of i)H(0,t,e,n,!0);t.end(`fills`)}(0,i,o,c),function(e,t,n,r){let i=r.borders,a=i.length;t.start(`borders`,{count:String(a)});let o=n.getTheme();for(let e of i)Ve(0,t,e,o,!1);t.end(`borders`)}(0,i,o,c),function(t,n,r,i,a){let o=a.namedStyles,s=o.length;n.start(`cellStyleXfs`,{count:String(s)});for(let t of o)Ue(0,n,r,t.style??e.I.EmptyObject,a,!1);n.end(`cellStyleXfs`)}(0,i,o,0,c),function(e,t,n,r,i,a){let o=r.length,s=a?.getSources()??[];t.start(`cellXfs`,{count:String(o+s.length)});for(let e=0;e<o;e++)Ue(0,t,n,r[e],i,!0);for(let e=0;e<s.length;e++)Ue(0,t,n,r[s[e]],i,!0,!0);t.end(`cellXfs`)}(0,i,o,s,c,r.getSharedStates().get(M)),function(e,t,r,i,a){let o=a.namedStyles,s=o.length;t.start(`cellStyles`,{count:String(s)});let c=a.namedStyleMap;for(let e=0;e<s;e++){let i=o[e],a=i.name,s=a.toLowerCase(),l={name:a,xfId:c.get(s)};i.hidden&&(l.hidden=`1`),i.iLevel&&(l.iLevel=String(i.iLevel));let u=null;u=s===n.X.BuiltInName.Normal.toLowerCase()?0:r.getNamedStyles().getByName(a).getBuiltInID(),u!==null&&(l.builtinId=String(u),l.customBuiltin=`1`),t.empty(`cellStyle`,l)}t.end(`cellStyles`)}(0,i,o,0,c),function(e,t,n,r,i){let a=[...i?.getDxfs()??[],...r?.dxfs??[]];if(a.length===0)return void t.empty(`dxfs`,{count:`0`});let o=n.getTheme();t.start(`dxfs`,{count:String(a.length)});let s=Ge;for(let e of a)s=We(0,t,e,n,o,`dxf`,s);t.end(`dxfs`)}(0,i,o,u,l),function(e,t,n,r,i){let a=r?.tables,o=a?.styles??null,s=o?Object.keys(o):null,c=s?s.length:0,l={count:String(c),defaultTableStyle:a?.defaultTableStyle??`TableStyleMedium2`,defaultPivotStyle:a?.defaultPivotStyle??`PivotStyleLight16`};if(c!==0){t.start(`tableStyles`,l);for(let e of s){let n=o[e],r=[];for(let e of Ke){let t=n[e];t&&r.push([e,t])}let a={name:e,pivot:n.pivot?`1`:`0`,count:String(r.length)};t.start(`tableStyle`,a);for(let[n,a]of r){let r=`${e}:${n}`,o=i?.dxfIndexMap.get(r)??`0`,s={};s.type=n,a.size!==void 0&&(s.size=String(a.size)),s.dxfId=String(o),t.empty(`tableStyleElement`,s)}t.end(`tableStyle`)}t.end(`tableStyles`)}else t.empty(`tableStyles`,l)}(0,i,0,a,u),function(e,t,n,r){let i=r?.indexedColors&&r.indexedColors.length>0,a=r?.mruColors&&r.mruColors.length>0;if(i||a){if(t.start(`colors`),i){t.start(`indexedColors`);for(let e of r.indexedColors){let n=be(e,!0);t.empty(`rgbColor`,{rgb:n})}t.end(`indexedColors`)}if(a){t.start(`mruColors`);for(let e of r.mruColors){let n=be(e);t.empty(`color`,{rgb:n})}t.end(`mruColors`)}t.end(`colors`)}}(0,i,0,a),function(e,t){t.start(`extLst`),t.start(`ext`,{uri:`{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}`,"xmlns:x14":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`}),t.empty(`x14:slicerStyles`,{defaultSlicerStyle:`SlicerStyleLight1`}),t.end(`ext`),t.start(`ext`,{uri:`{9260A510-F301-46a8-8635-F512D64BE5F5}`,"xmlns:x15":`http://schemas.microsoft.com/office/spreadsheetml/2010/11/main`}),t.empty(`x15:timelineStyles`,{defaultTimelineStyle:`TimeSlicerStyleLight1`}),t.end(`ext`),t.end(`extLst`)}(0,i),i.end(`styleSheet`),i.close()}},new class extends o{constructor(){super({kind:`propsCore`,contentType:`application/vnd.openxmlformats-package.core-properties+xml`,relTypeUri:`http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties`,path:`/docProps/core.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`cp:coreProperties`,{"xmlns:cp":`http://schemas.openxmlformats.org/package/2006/metadata/core-properties`,"xmlns:dc":`http://purl.org/dc/elements/1.1/`,"xmlns:dcterms":`http://purl.org/dc/terms/`,"xmlns:dcmitype":`http://purl.org/dc/dcmitype/`,"xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`});let r=new Date,i=[[`creator`,`SheetXL`],[`lastModifiedBy`,`SheetXL`],[`created`,St(r)],[`modified`,St(r)]];for(let e of i)Ct(n,e[0],e[1]);n.end(`cp:coreProperties`),n.close()}},new class extends o{constructor(){super({kind:`propsApp`,contentType:`application/vnd.openxmlformats-officedocument.extended-properties+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties`,path:`/docProps/app.xml`})}async emit(e,t){let r=t.getXMLWriter(),a=e.model,o=await n.J.getDetails(),s=i.G(o.getBuildVersion()),c=o.getLicensee()||``;r.setValidationDisabled(!0),r.decl(),r.start(`Properties`,{xmlns:`http://schemas.openxmlformats.org/officeDocument/2006/extended-properties`,"xmlns:vt":`http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes`}),Z(0,r,`Application`,`SheetXL`),Z(0,r,`DocSecurity`,`0`),Z(0,r,`ScaleCrop`,`false`),((e,t,r)=>{let i=r.getSheets().getItems({visibility:n.Tt.Visibility.Hidden}).map(e=>e.getName()),a=r.getNames().getItems({type:`formula`}).filter(e=>!!e.getRanges?.()).map(e=>e.getName());t.start(`HeadingPairs`),t.start(`vt:vector`,{size:a.length>0?`4`:`2`,baseType:`variant`}),t.start(`vt:variant`),t.start(`vt:lpstr`),t.text(`Worksheets`),t.end(`vt:lpstr`),t.end(`vt:variant`),t.start(`vt:variant`),t.start(`vt:i4`),t.text(``+i.length),t.end(`vt:i4`),t.end(`vt:variant`),a.length>0&&(t.start(`vt:variant`),t.start(`vt:lpstr`),t.text(`Named Ranges`),t.end(`vt:lpstr`),t.end(`vt:variant`),t.start(`vt:variant`),t.start(`vt:i4`),t.text(``+a.length),t.end(`vt:i4`),t.end(`vt:variant`)),t.end(`vt:vector`),t.end(`HeadingPairs`),t.start(`TitlesOfParts`),t.start(`vt:vector`,{size:``+(i.length+a.length),baseType:`lpstr`});for(let e of i)t.start(`vt:lpstr`),t.text(e),t.end(`vt:lpstr`);for(let e of a)t.start(`vt:lpstr`),t.text(e),t.end(`vt:lpstr`);t.end(`vt:vector`),t.end(`TitlesOfParts`)})(0,r,a),Z(0,r,`Company`,c),Z(0,r,`LinksUpToDate`,`false`),Z(0,r,`SharedDoc`,`false`),Z(0,r,`HyperlinksChanged`,`false`),Z(0,r,`AppVersion`,s),r.end(`Properties`),r.close()}},new class extends o{constructor(){super({kind:`metadata`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata`,path:`/xl/metadata.xml`})}emit(e,t){let n=t.getXMLWriter(),r=e.hasCellMeta(),i=e.hasValueMeta(),a=e.getDAPRFutureMetadataBlocks(),o=e.getRVFutureMetadataBlocks(),s=e.getValueMeta(),c=0,l=0,u=0;r&&(c=++u),i&&(l=++u);let d={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`};if(r&&(d[`xmlns:xda`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray`),i&&(d[`xmlns:xlrd`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`),n.decl(),n.start(`metadata`,d),n.start(`metadataTypes`,{count:u}),r&&n.empty(`metadataType`,{name:`XLDAPR`,...wt,cellMeta:`1`}),i&&n.empty(`metadataType`,{name:`XLRICHVALUE`,...wt}),n.end(`metadataTypes`),r){n.start(`futureMetadata`,{name:`XLDAPR`,count:a.length});for(let e of a)n.start(`bk`),n.start(`extLst`),n.start(`ext`,{uri:`{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}`}),n.empty(`xda:dynamicArrayProperties`,{fDynamic:e.fDynamic,fCollapsed:e.fCollapsed}),n.end(`ext`),n.end(`extLst`),n.end(`bk`);n.end(`futureMetadata`)}if(i){n.start(`futureMetadata`,{name:`XLRICHVALUE`,count:o.length});for(let e of o)n.start(`bk`),n.start(`extLst`),n.start(`ext`,{uri:`{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}`}),n.empty(`xlrd:rvb`,{i:e}),n.end(`ext`),n.end(`extLst`),n.end(`bk`);n.end(`futureMetadata`)}if(r){n.start(`cellMetadata`,{count:a.length});for(let e=0;e<a.length;e++)n.start(`bk`),n.empty(`rc`,{t:c,v:e}),n.end(`bk`);n.end(`cellMetadata`)}if(i){n.start(`valueMetadata`,{count:s.length});for(let e of s)n.start(`bk`),n.empty(`rc`,{t:l,v:e}),n.end(`bk`);n.end(`valueMetadata`)}n.end(`metadata`),n.close()}},new class extends o{constructor(){super({kind:`richValue`,contentType:`application/vnd.ms-excel.rdrichvalue+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValue`,path:`./richData/rdrichvalue.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.getEntries(),i=r.length;n.decl(),n.start(`rvData`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`,count:i});for(let t of r){let r=e.handlerStructureIndex(t.handler);n.start(`rv`,{s:r});let i=t.handler.getValues(t.rawValue);for(let e of i)n.start(`v`),n.text(e),n.end(`v`);n.end(`rv`)}n.end(`rvData`),n.close()}},new class extends o{constructor(){super({kind:`richValueStructure`,contentType:`application/vnd.ms-excel.rdrichvaluestructure+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueStructure`,path:`./richData/rdrichvaluestructure.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.uniqueHandlers(),i=r.length;n.decl(),n.start(`rvStructures`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`,count:i});for(let e of r){n.start(`s`,{t:e.type});for(let[t,r]of e.props)n.empty(`k`,{n:t,t:r});n.end(`s`)}n.end(`rvStructures`),n.close()}},new class extends o{constructor(){super({kind:`richValueTypes`,contentType:`application/vnd.ms-excel.rdrichvaluetypes+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueTypes`,path:`./richData/rdRichValueTypes.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`rvTypesInfo`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=[[`_self`,[`ExcludeFromFile`,`ExcludeFromCalcComparison`]],[`_DisplayString`,[`ExcludeFromCalcComparison`]],[`_Flags`,[`ExcludeFromCalcComparison`]],[`_Format`,[`ExcludeFromCalcComparison`]],[`_SubLabel`,[`ExcludeFromCalcComparison`]],[`_Attribution`,[`ExcludeFromCalcComparison`]],[`_Icons`,[`ExcludeFromCalcComparison`]],[`_Display`,[`ExcludeFromCalcComparison`]],[`_CanonicalPropertyNames`,[`ExcludeFromCalcComparison`]],[`_ClassificationId`,[`ExcludeFromCalcComparison`]]];n.start(`global`),n.start(`keyFlags`);for(let[e,t]of r){n.start(`key`,{name:e});for(let e of t)n.empty(`flag`,{name:e,value:`1`});n.end(`key`)}n.end(`keyFlags`),n.end(`global`),n.end(`rvTypesInfo`),n.close()}},new class extends o{constructor(){super({kind:`drawing`,contentType:`application/vnd.openxmlformats-officedocument.drawing+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing`,path:`../drawings/drawing{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.pushDefaultNamespace(`xdr`),n.start(`wsDr`,{"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`});let r=new Map,i=e.sheet,a=e.movables,o=e.jsonMovables,s=o?o.length:0,c=0;for(let e=0;e<s;e++){let t=o[e].content?.json?.sourceId;typeof t==`number`&&t>c&&(c=t)}let l,u=new Map;if(c>0){let e=t.getSharedStates();l=e.get(`uniqueIdCounter`),l||(l=new Map,e.set(`uniqueIdCounter`,l)),l.set(i,Math.max(l.get(i)??1,c));let n=new Set;for(let e=0;e<s;e++){let t=o[e].content?.json?.sourceId;if(typeof t==`number`)if(n.has(t)){let t=l.get(i)+1;l.set(i,t),u.set(o[e],t)}else n.add(t)}}for(let e=0;e<s;e++){let s=o[e],c=a[e],l=s.content?.type;switch(n.start(`twoCellAnchor`,{editAs:s.anchorType||`twoCell`}),Ut(n,`from`,s.anchor.tl),Ut(n,`to`,s.anchor.br),l){case`picture`:await jt(t,i,r,c,s);break;case`chart`:await Mt(t,i,r,c,s,u.get(s));break;case`shape`:await It(t,i,r,c,s,u.get(s));break;case`smartArt`:await Nt(t,i,r,c,s);break;case`slicer`:await Pt(t,i,r,c,s);break;case`graphicFrame`:await Ft(t,i,r,c,s);break;default:await Q(t,i,r,c,s)}n.empty(`clientData`),n.end(`twoCellAnchor`)}n.end(`wsDr`),n.close()}},new class extends o{constructor(){super({kind:`legacyDrawing`,contentType:`application/vnd.openxmlformats-officedocument.vmlDrawing`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing`,path:`../drawings/vmlDrawing{n}.vml`})}async emit(e,t){let n=e.images,r=n?n.length:0;if(r>0){let e=t.getSharedStates().get(a);for(let i=0;i<r;i++){let r=n[i],a=e?.get(r.resId);if(a)try{await Wt(t,r.id,a)}catch(e){t.log(`Unable to write legacy drawing image '${r.id}'`,e)}else t.log(`Legacy drawing image '${r.id}' has no resource ${r.resId} and was not written.`)}}let i=t.getXMLWriter();i.setValidationDisabled(!0),i.raw(e.xml),i.close()}},new class extends o{constructor(){super({kind:`embeddedPart`,contentType:I,relTypeUri:``})}getContentType(e){return e?.contentType||I}getRelTypeUri(e){return e?.type??``}getPath(e){return`./${ae(e.name)}`}async emit(e,t){await L(e,t);let n=t.getXMLWriter();n.setValidationDisabled(!0),n.raw(e.xml??``),n.close()}},new class extends o{constructor(){super({kind:`pivotTable`,contentType:oe,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable`,path:`../pivotTables/pivotTable{n}.xml`})}getContentType(e){return e?.part?.contentType||oe}async emit(e,t){let n=e.part;await L(n,t);let r=se(t,e.cacheId);if(!r||!t.addRelationship(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`,r))throw Error(`Pivot table '${n.name??``}' has no cache with id ${e.cacheId}.`);let i=t.getXMLWriter();i.setValidationDisabled(!0),i.raw(n.xml??``),i.close()}},new class extends o{constructor(){super({kind:`comments`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`,path:`../comments{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`comments`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`xr`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`});let r=[],i=new Map,a=e=>{let t=i.get(e);return t===void 0&&(t=r.length,r.push(e),i.set(e,t)),t},o=e.comments,s=[];for(let e=0;e<o.length;e++){let{comment:t,ref:n}=o[e];t.isNote()?s.push({ref:n,authorId:a(t.getAuthor()?.getDisplayName()??``),content:t.getRichContent()??t.getContent()}):s.push({ref:n,authorId:a(`tc={${t.getId().toUpperCase()}}`),content:xe(t)})}n.start(`authors`);for(let e=0;e<r.length;e++)n.start(`author`),n.text(r[e]),n.end(`author`);n.end(`authors`);let c=e.sheet.getStyles().getTheme();n.start(`commentList`);for(let e=0;e<s.length;e++){let t=s[e];n.start(`comment`,{ref:t.ref,authorId:t.authorId,shapeId:0}),n.start(`text`),Se(n,t.content,c),n.end(`text`),n.end(`comment`)}n.end(`commentList`),n.end(`comments`),n.close()}},new class extends o{constructor(){super({kind:`threadedComments`,contentType:`application/vnd.ms-excel.threadedcomments+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`,path:`../threadedComments/threadedComment{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`ThreadedComments`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=e.comments;for(let e=0;e<r.length;e++){let{comment:t,ref:i}=r[e];if(t.isNote())continue;Kt(n,i,t.getId(),t.getAuthor()?.getId(),t.getCreationDate(),t.getContent(),null,t.isResolved(),t.toJSON()?.mentions);let a=t.getReplies();for(let e=0;e<a.length;e++){let r=a[e];Kt(n,i,r.getId(),r.getAuthor()?.getId(),r.getCreationDate(),r.getContent(),t.getId(),!1,r.toJSON().mentions)}}n.end(`ThreadedComments`),n.close()}},new class extends o{constructor(){super({kind:`persons`,contentType:`application/vnd.ms-excel.person+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/10/relationships/person`,path:`persons/person.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`personList`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=e.toArray();for(let e=0;e<r.length;e++){let t=r[e];n.empty(`person`,{displayName:t.getDisplayName(),id:$(t.getId()),userId:t.getUserId()??t.getDisplayName(),providerId:t.getProviderId()??`None`})}n.end(`personList`),n.close()}},new class extends o{constructor(){super({kind:`table`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/table`,path:`../tables/table{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl();let r={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`xr xr3`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`,"xmlns:xr3":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision3`},i=e.json,a=e.model;a.isShowHeaders(),r.id=++qt,r.name=i.name?.trim(),r.displayName=i.description??i.name,r.ref=e.ref,i.headerRowCount!==1&&(r.headerRowCount=i.headerRowCount),i.totalsRowCount!==0&&(r.totalsRowCount=i.totalsRowCount),i.totalsRowShown||a.isShowTotals()||(r.totalsRowShown=`0`),n.start(`table`,r),a.isShowHeaders()&&Ye(t,n,a,i),((e,t,n,r)=>{let i=r.columns,a=i?i.length:0;if(a!==0){t.start(`tableColumns`,{count:a});for(let o=0;o<a;o++){let a=i[o];typeof a==`string`&&(a={name:a});let s={};s.id=o+1,s.name=a.name??`Column${o+1}`;let c=null,l=a.totalsRowFormula;if(typeof l==`number`){let e=Yt.get(l);e?s.totalsRowFunction=e:c=`SUBTOTAL(${l},${r.name?.trim()}[${s.name}])`}else l&&(c=Jt(e,n,o,l.startsWith(`=`)?l.substring(1):l));c&&(s.totalsRowFunction=`custom`),a.totalsRowLabel&&(s.totalsRowLabel=a.totalsRowLabel);let u=a.calculatedColumnFormula?Jt(e,n,o,a.calculatedColumnFormula):null;(c||u)&&(t.start(`tableColumn`,s),u&&(t.start(`calculatedColumnFormula`),t.text(u),t.end(`calculatedColumnFormula`))),c&&(t.start(`totalsRowFormula`),t.text(c),t.end(`totalsRowFormula`)),c||u?t.end(`tableColumn`):t.empty(`tableColumn`,s)}t.end(`tableColumns`)}})(t,n,a,i),((e,t,n)=>{let r={name:n.getStyle().getName(),showFirstColumn:n.isShowHighlightFirstColumn()?`1`:`0`,showLastColumn:n.isShowHighlightLastColumn()?`1`:`0`,showRowStripes:n.isShowBandedRows()?`1`:`0`,showColumnStripes:n.isShowBandedColumns()?`1`:`0`};t.empty(`tableStyleInfo`,r)})(0,n,a),n.end(`table`),n.close()}},new class extends o{constructor(){super({kind:`externalLink`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`,path:`../externalLinks/externalLink{n}.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.sources??[],i=r.findIndex(e=>e.role===`book`);i<0&&r.length>0&&(i=0);let a=null,o=null;for(let e=0;e<r.length;e++){let n=r[e],s=t.addExternal(n.type||`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath`,n.target).relId;e===i?a=s:n.role===`absoluteUrl`&&(o=s)}a||t.log(`External book has no path relationship; Excel cannot locate its source.`,e.sheetNames),n.decl();let s={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`};(e.mceIgnorable||o)&&(s[`xmlns:mc`]=`http://schemas.openxmlformats.org/markup-compatibility/2006`,s[`mc:Ignorable`]=`x14 xxl21`,s[`xmlns:x14`]=`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`,s[`xmlns:xxl21`]=`http://schemas.microsoft.com/office/spreadsheetml/2021/extlinks2021`),n.start(`externalLink`,s);let c={"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`};a&&(c[`r:id`]=a),n.start(`externalBook`,c),o&&(n.start(`xxl21:alternateUrls`),n.empty(`xxl21:absoluteUrl`,{"r:id":o}),n.end(`xxl21:alternateUrls`)),function(e,t){let n=t.sheetNames,r=n?n.length:0;if(r!==0){e.start(`sheetNames`);for(let t=0;t<r;t++)e.empty(`sheetName`,{val:n[t]});e.end(`sheetNames`)}}(n,e),function(e,t){let n=t.definedNames,r=n?n.length:0;if(r!==0){e.start(`definedNames`);for(let t=0;t<r;t++){let r=n[t],i={name:r.name,refersTo:r.refersTo};r.sheetIndex!==void 0&&(i.sheetId=``+r.sheetIndex),e.empty(`definedName`,i)}e.end(`definedNames`)}}(n,e),function(e,t){let n=t.sheetDataSet,r=n?n.length:0;if(r!==0){e.start(`sheetDataSet`);for(let t=0;t<r;t++){let r=n[t],i={sheetId:``+r.sheetIndex};r.refreshError&&(i.refreshError=`1`);let a=r.data,o=a?a.length:0;if(o!==0){e.start(`sheetData`,i);for(let t=0;t<o;t++){let[n,r]=a[t];e.start(`row`,{r:``+(n+1)});let i=r.length;for(let t=0;t<i;t++){let[i,a]=r[t],o=a.length;for(let t=0;t<o;t++)Zt(e,n,i+t,a.at(t))}e.end(`row`)}e.end(`sheetData`)}else e.empty(`sheetData`,i)}e.end(`sheetDataSet`)}}(n,e),n.end(`externalBook`),n.end(`externalLink`),n.close()}},new class extends o{constructor(){super({kind:`chart`,contentType:`application/vnd.openxmlformats-officedocument.drawingml.chart+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart`,path:`../charts/chart{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.pushDefaultNamespace(`c`),n.start(`chartSpace`,{"xmlns:c":`http://schemas.openxmlformats.org/drawingml/2006/chart`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:c16r2":`http://schemas.microsoft.com/office/drawing/2015/06/chart`}),n.empty(`date1904`,{val:`0`}),n.empty(`lang`,{val:`en-US`}),n.empty(`roundedCorners`,{val:`0`}),((e,t)=>{t.start(`mc:AlternateContent`,{"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`}),t.start(`mc:Choice`,{Requires:`c14`,"xmlns:c14":`http://schemas.microsoft.com/office/drawing/2007/8/2/chart`}),t.empty(`c14:style`,{val:`102`}),t.end(`mc:Choice`),t.start(`mc:Fallback`),t.empty(`c:style`,{val:`2`}),t.end(`mc:Fallback`),t.end(`mc:AlternateContent`)})(0,n,e.model,e.json),((e,t,n,r,i)=>{t.start(`chart`),((e,t,n,r,i)=>{t.start(`title`),t.empty(`overlay`,{val:`0`}),ke(e,n,i,`spPr`,!0),t.end(`title`),t.empty(`autoTitleDeleted`,{val:`0`})})(e,t,n,0,i),((e,t,n,r,i)=>{t.start(`plotArea`),t.empty(`layout`),ke(e,n,i,`spPr`,!0),t.end(`plotArea`)})(e,t,n,0,i),t.empty(`plotVisOnly`,{val:`1`}),t.empty(`dispBlanksAs`,{val:`gap`}),t.empty(`showDLblsOverMax`,{val:`0`}),t.end(`chart`)})(t,n,e.styles,e.model,e.json),((e,t)=>{t.start(`printSettings`),t.empty(`headerFooter`),t.empty(`pageMargins`,{b:`0.75`,l:`0.7`,r:`0.7`,t:`0.75`,header:`0.3`,footer:`0.3`}),t.empty(`pageSetup`),t.end(`printSettings`)})(0,n,e.model,e.json),n.end(`chartSpace`),n.popDefaultNamespace(),n.close(),t.addPart(`chartStyle`,{styles:e.styles}),t.addPart(`chartColors`,{styles:e.styles})}},new class extends o{constructor(){super({kind:`chartStyle`,contentType:`application/vnd.ms-office.chartstyle+xml`,relTypeUri:`http://schemas.microsoft.com/office/2011/relationships/chartStyle`,path:`./style{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.pushDefaultNamespace(`cs`),n.start(`chartStyle`,{"xmlns:cs":`http://schemas.microsoft.com/office/drawing/2012/chartStyle`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,id:`297`}),((e,t,n,r)=>{let i=n.length;for(let a=0;a<i;a++){let i=n[a];i.empty?t.empty(i.type,i.mods):(t.start(i.type,i.mods),Qt(0,t,r,`lnRef`,i.lineRef,`0`),Qt(0,t,r,`fillRef`,i.fillRef,`0`),Qt(0,t,r,`effectRef`,i.effectRef,`0`),Qt(0,t,r,`fontRef`,i.fontRef,`minor`),ke(e,r,i,`spPr`),Dt(e,0,i.defRPr),Ot(e,r,i.bodyPr),t.end(i.type))}})(t,n,$t,e.styles),n.end(`chartStyle`),n.close()}},new class extends o{constructor(){super({kind:`chartColors`,contentType:`application/vnd.ms-office.chartcolorstyle+xml`,relTypeUri:`http://schemas.microsoft.com/office/2011/relationships/chartColorStyle`,path:`./colors{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.pushDefaultNamespace(`cs`),n.start(`cs:colorStyle`,{"xmlns:cs":`http://schemas.microsoft.com/office/drawing/2012/chartStyle`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,meth:`cycle`,id:`10`}),n.empty(`a:schemeClr`,{val:`accent1`}),n.empty(`a:schemeClr`,{val:`accent2`}),n.empty(`a:schemeClr`,{val:`accent3`}),n.empty(`a:schemeClr`,{val:`accent4`}),n.empty(`a:schemeClr`,{val:`accent5`}),n.empty(`a:schemeClr`,{val:`accent6`}),((e,t,n)=>{let r=n.length;for(let e=0;e<r;e++){let r=n[e],i={},a=r[0],o=r[1];a||o?(t.start(`variation`,i),a&&t.empty(`a:lumMod`,{val:a}),o&&t.empty(`a:lumOff`,{val:o}),t.end(`variation`)):t.empty(`variation`,i)}})(0,n,en),n.end(`cs:colorStyle`),n.close()}}],nn=e=>{let t=e.getPart(`xl/_rels/workbook.xml.rels`);if(!t)return null;let n=new Map;for(let e of i.O(t.data)){if(!e.id)continue;let t=e.external?e.target:g(e.target.startsWith(`/`)?e.target:`xl/`+e.target);n.set(e.id,{type:e.type,target:t,external:e.external})}return n},rn=e=>{let t=e.getPart(`xl/workbook.xml`);return t?new TextDecoder(`utf-8`).decode(t.data):null},an=e=>{let t=on.get(e);if(t!==void 0)return t;let n=e.getPart(`xl/workbook.xml`),r=n?new TextDecoder(`utf-8`).decode(n.data):null;return on.set(e,r),r},on=new WeakMap,sn=1;exports.writeXLSX=async(e,t)=>{let n=new ne;for(let e of tn)n.register(e);let r=sn,o=s.createUint8Array({lastModDate:new Date(1899,11,29,19,0,0),level:r}),c=t?.format===`Excel`||t?.format===`ExcelMacro`?i.K(e):null,l=new Map,u=c?(e=>{let t=e.getPart(`xl/workbook.xml`);if(!t)return null;let n=new TextDecoder(`utf-8`).decode(t.data.subarray(0,4096)).match(/<fileVersion\b([^>]*)\/?>/);if(!n)return null;let r={};for(let e of n[1].matchAll(/([\w:]+)="([^"]*)"/g))r[e[1]]=e[2];return Object.keys(r).length>0?r:null})(c):null;u&&(t?.macroEnabled||delete u.codeName,l.set(ce,u));let d=c?(e=>{let t=an(e)?.match(/<calcPr\b[^>]*?\bcalcId="([^"]*)"/);return t?t[1]:null})(c):null;d!==null&&l.set(`calcId`,d);let f=c?(e=>{let t=an(e)?.match(/<ext\b[^>]*>\s*<xcalcf:calcFeatures\b[\s\S]*?<\/xcalcf:calcFeatures>\s*<\/ext>/);return t?t[0]:null})(c):null;f!==null&&l.set(`calcFeatures`,f);let p=c?(e=>{let t=rn(e);if(!t)return null;let n=/<externalReferences\b[^>]*>([\s\S]*?)<\/externalReferences>/.exec(t);if(!n)return null;let r=[...n[1].matchAll(/<externalReference\b[^>]*\sr:id="([^"]*)"/g)].map(e=>e[1]);if(r.length===0)return null;let i=nn(e);return i?r.map(e=>{let t=i.get(e);return t&&!t.external?t.target:null}):null})(c):null;p&&l.set(ue,p);let m=c?(e=>{let t=rn(e),n=t?nn(e):null;if(!t||!n)return null;let r=new Map;for(let e of t.matchAll(/<sheet\b([^>]*)\/?>/g)){let t=/\bsheetId="(\d+)"/.exec(e[1])?.[1],i=/\br:id="([^"]*)"/.exec(e[1])?.[1];if(!t||!i)continue;let a=n.get(i);a&&!a.external&&a.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`&&r.set(parseInt(t,10),a.target)}return r.size>0?r:null})(c):null;m&&l.set(le,m),l.set(a,new Map);let h=[],g=new ee(o,n,{strictDuplicateChildren:!0,onPartEmitted:t?.onPartEmitted,onWarning:(e,t,n)=>{h.push([e,t,n])},mapState:l,sourcePackage:c,macroEnabled:t?.macroEnabled??!1});g.addPart(`workbook`,e,`/xl/workbook.xml`),await g.waitEmit(),g.addPart(`propsCore`,{}),g.addPart(`propsApp`,{model:e});let _=await g.build(),v=t?.progress?.onWarning;if(h.length&&v){let e=new Set;for(let[n,r,i]of h){let a=i??n;e.has(a)||(e.add(a),v.call(t.progress,n,r))}}return _.byteOffset===0&&_.byteLength===_.buffer.byteLength?_.buffer:_.slice().buffer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./Ytzw6iUYx5f19wfK.cjs"),n=require("./B1yQqy3iSI5uZPt3.cjs"),r=require("./BmdFT-Ie0SY8YqFf.cjs"),i=require("./
|
|
1
|
+
const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./Ytzw6iUYx5f19wfK.cjs"),n=require("./B1yQqy3iSI5uZPt3.cjs"),r=require("./BmdFT-Ie0SY8YqFf.cjs"),i=require("./DKdgEj89ChMWaDQz.cjs"),a=require("./D3gV1sduXTeibviI.cjs");var o=e.r(t.i(),1),s=e.r(t.r(),1);function c(e){return n.m(`MuiRadio`,e)}var l=n.p(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]),u=i.C;function d(e){return n.m(`MuiFormGroup`,e)}n.p(`MuiFormGroup`,[`root`,`row`,`error`]);var f=r.ut(`div`,{name:`MuiFormGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:`flex`,flexDirection:`column`,flexWrap:`wrap`,variants:[{props:{row:!0},style:{flexDirection:`row`}}]}),p=o.forwardRef(function(e,t){let a=r.ct({props:e,name:`MuiFormGroup`}),{className:o,row:c=!1,...l}=a,[u]=i.O({props:a,states:[`error`]}),p={...a,row:c,error:u.error},m=(e=>{let{classes:t,row:n,error:i}=e;return r._t({root:[`root`,n&&`row`,i&&`error`]},d,t)})(p);return(0,s.jsx)(f,{className:n.h(m.root,o),ownerState:p,ref:t,...l})}),m=r.Q((0,s.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`RadioButtonUnchecked`),h=r.Q((0,s.jsx)(`path`,{d:`M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z`}),`RadioButtonChecked`),g=r.ut(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:r.dt})({position:`relative`,display:`flex`}),_=r.ut(m,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),v=r.ut(h,{name:`MuiRadioButtonIcon`})(r.lt(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,...r.nt(e,`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,...r.nt(e,`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function y(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,s.jsxs)(g,{className:n.root,ownerState:i,children:[(0,s.jsx)(_,{fontSize:r,className:n.background,ownerState:i}),(0,s.jsx)(v,{fontSize:r,className:n.dot,ownerState:i})]})}var b=o.createContext(void 0),x=r.ut(a.r,{shouldForwardProp:e=>r.dt(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${r.st(n.size)}`],t[`color${r.st(n.color)}`]]}})(r.lt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${l.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:`default`,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(r.I()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(r.I()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${l.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),S=(0,s.jsx)(y,{checked:!0}),C=(0,s.jsx)(y,{}),w=o.forwardRef(function(e,t){let a=r.ct({props:e,name:`MuiRadio`}),{checked:l,checkedIcon:d=S,color:f=`primary`,icon:p=C,name:m,onChange:h,size:g=`medium`,className:_,disabled:v,disableRipple:y=!1,slots:w={},slotProps:T={},...E}=a,D=i.D(),O=v;D&&O===void 0&&(O=D.disabled),O??=!1;let k={...a,disabled:O,disableRipple:y,color:f,size:g},A=(e=>{let{classes:t,color:n,size:i}=e,a={root:[`root`,`color${r.st(n)}`,i!==`medium`&&`size${r.st(i)}`]};return{...t,...r._t(a,c,t)}})(k),j=o.useContext(b),M=l,N=u(h,j&&j.onChange),P=m;var F,I;j&&(M===void 0&&(F=j.value,M=typeof(I=a.value)==`object`&&I!==null?F===I:String(F)===String(I)),P===void 0&&(P=j.name));let L=T.input,[R,z]=r.H(`root`,{ref:t,elementType:x,className:n.h(A.root,_),shouldForwardComponentProp:!0,externalForwardedProps:{slots:w,slotProps:T,...E},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),N(t,...n)}}),ownerState:k,additionalProps:{type:`radio`,icon:o.cloneElement(p,{fontSize:p.props.fontSize??g}),checkedIcon:o.cloneElement(d,{fontSize:d.props.fontSize??g}),disabled:O,name:P,checked:M,slots:w,slotProps:{input:typeof L==`function`?L(k):L}}});return(0,s.jsx)(R,{...z,classes:A})});function T(e){return n.m(`MuiRadioGroup`,e)}n.p(`MuiRadioGroup`,[`root`,`row`,`error`]);var E=o.forwardRef(function(e,t){let{actions:i,children:a,className:c,defaultValue:l,name:u,onChange:d,value:f,...m}=e,h=o.useRef(null),g=(e=>{let{classes:t,row:n,error:i}=e;return r._t({root:[`root`,n&&`row`,i&&`error`]},T,t)})(e),[_,v]=r.J({controlled:f,default:l,name:`RadioGroup`});o.useImperativeHandle(i,()=>({focus:()=>{let e=h.current.querySelector(`input:not(:disabled):checked`);e||=h.current.querySelector(`input:not(:disabled)`),e&&e.focus()}}),[]);let y=r.ot(t,h),x=r.X(u),S=o.useMemo(()=>({name:x,onChange(e){v(e.target.value),d&&d(e,e.target.value)},value:_}),[x,d,v,_]);return(0,s.jsx)(b.Provider,{value:S,children:(0,s.jsx)(p,{role:`radiogroup`,ref:y,className:n.h(g.root,c),...m,children:a})})});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return E}});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const e=require("./Bj3YkKmVIoQ3YtYm.cjs"),t=require("./CHFOXPbNUaeZbrXn.cjs"),n=require("./BPWKnUtyoTrtW567.cjs"),r=require("./BCaRwsX64XTvboxS.cjs");var i,a=class extends e.j{constructor(e,t=50){super(t),this._transactions=e,this._floorId=e?e.getCurrentCommit(!1).getId():null,this._removeListener=e?.addListener({onCommitChange:()=>this._notifyOnStackChange()})}_undoCommits(e=this.maxStack){let t=this._transactions;if(!t)return[];let n=t.getLog(t.getCurrentCommit(!1).getId(),2**53-1),r=[];for(let t=0;t<n.length&&r.length<e;t++){let e=n[t];if(e.getId()===this._floorId||t===n.length-1)break;e.getDescription()&&r.push(e)}return r}_redoCommits(e=this.maxStack){let t=this._transactions;if(!t)return[];let n=t.getCurrentCommit(!1).getId(),r=t.getTipCommit().getId();if(r===n)return[];let i=t.getLog(r,2**53-1),a=[],o=!1;for(let e of i){if(e.getId()===n){o=!0;break}a.push(e)}if(!o)return[];a.reverse();let s=[];for(let t of a)if(t.getDescription()&&s.push(t),s.length>=e)break;return s}undo(e=1){let t=this._transactions;if(!t)return;let n=!1;try{for(let r=0;r<e;r++){let[e]=this._undoCommits(1);if(!e)break;t.revert(e.getId()),n=!0}}finally{n&&this._notifyOnStackChange()}}redo(e=1){let t=this._transactions;if(!t)return;let n=!1;try{for(let r=0;r<e;r++){let[e]=this._redoCommits(1);if(!e){r===0&&this._repeatOperation?.repeat();break}t.restore(e.getId()),n=!0}}finally{n&&this._notifyOnStackChange()}}hasUndo(){return this._undoCommits(1).length>0}hasRedo(){return this._redoCommits(1).length>0||this._repeatOperation!==null}getTopUndoDescription(){return this._undoCommits(1)[0]?.getDescription()??null}getTopRedoDescription(){return this._repeatOperation===null?this._redoCommits(1)[0]?.getDescription()??null:this._repeatOperation.description}getUndoDescriptions(){return this._undoCommits().map(e=>e.getDescription())}getRedoDescriptions(){let e=this._redoCommits().map(e=>e.getDescription());return e.length===0&&this._repeatOperation!==null&&e.push(this._repeatOperation.description),Object.freeze(e)}addUndoOperation(){throw Error(`TransactionUndoManager derives its stack from the commit log; commit a described transaction instead.`)}clear(e=!0){this._transactions&&(this._floorId=this._transactions.getCurrentCommit(!1).getId()),super.clear(e)}close(){this._removeListener?.()}},o=class{constructor(e,t){this._dirty=!1,this._store=e,this._savedCommitId=e.getCurrentCommit()?.getId()??null,this._emitter=new r.L(this);let n=this;this._removeStoreListener=e.addListener({onCommitEnd(){n._recompute()},onCommitChange(){n._recompute()}}),this._removeCommitListener=t?.addCommitListener({onCommit(e){e.store===n._store&&n.markSaved(e.commitId)}})}getStore(){return this._store}isDirty(){return(this._store.getCurrentCommit()?.getId()??null)!==this._savedCommitId}getSavedCommitId(){return this._savedCommitId}markSaved(e=this._store.getCurrentCommit()?.getId()??null){e!==this._savedCommitId&&(this._savedCommitId=e??null,this._recompute())}addListeners(e,t){return this._emitter.addListeners(e,t)}_recompute(){let e=this.isDirty();e!==this._dirty&&(this._dirty=e,this._emitter.notify(e?`onDirty`:`onClean`,{transactional:!1}))}close(){this._removeStoreListener?.(),this._removeCommitListener?.(),this._emitter.close()}};i||={};var s=class e{constructor(t,n={}){this._password=null,this._emitter=new r.L(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}static _defaultCanWrite(e){return!!e&&!/^(https?:|data:|blob:)/i.test(e)}_cleanPath(){return this._path?this._path.split(/[?#]/)[0]:null}getName(){if(this._name!==null&&this._name!==void 0)return this._name;let e=this._cleanPath();return e&&r.Mt(e)||null}getPath(){return this._path}getFormat(){return this._format?this._format:this.getExtension()}getExtension(){let e=this._cleanPath();if(!e)return null;let t=r.D(e);return t?t.toLowerCase():null}getEncryption(){return this._encryption}isEncrypted(){return this._encryption!==null||this._password!==null}setPassword(e){this._password!==(e??null)&&(this._password=e??null,this._password===null&&(this._encryption=null),this._emitter.notify(`onChange`))}getPassword(){return this._password}getSize(){return this._size}getLastModified(){return this._lastModified}canWrite(){return this._canWrite}setName(e){this.update({name:e})}update(e){let t=!1;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}addListeners(e,t){return this._emitter.addListeners(e,t)}get[Symbol.toStringTag](){return`[Origin]`}toString(){let e=this._cleanPath(),t=e?e.split(/[/\\]/).pop()||e:this._name??`(unbound)`,n=this._size;if(n==null)return t;if(n<1024)return`${t} ${n}B`;let r=Math.floor(Math.log(n)/Math.log(1024)),i=[`B`,`KB`,`MB`,`GB`,`TB`];return`${t} ${(n/1024**r).toFixed(2)}${i[Math.min(r,i.length-1)]}`}},c=new WeakMap,l=new Set,u=e=>c.get(e)??null,d=()=>Array.from(l,e=>e.getOrigin()),f=class e{constructor(t){this._released=!1,e._assertFree(t),this._emitter=new r.L(this),this._origin=t,c.set(t,this),l.add(this)}getOrigin(){return this._origin}setOrigin(t){t!==this._origin&&(e._assertFree(t),this._released||(c.delete(this._origin),c.set(t,this)),this._origin=t,this._emitter.notify(`onOriginChange`))}release(){this._released||(this._released=!0,c.get(this._origin)===this&&c.delete(this._origin),l.delete(this))}addListeners(e,t){return this._emitter.addListeners(e,t)}static _assertFree(e){if(c.has(e))throw Error(`This origin already backs an open workbook; an origin backs one workbook at a time.`)}},p=class{constructor(){this._defaultStringSourceType=`filepath`}async read(t){let n=t.options??{},i=t.source;if(typeof i==`function`&&(i=i()),i&&typeof i==`object`&&typeof i.then==`function`&&(i=await Promise.resolve(i)),i==null&&(i=await this.resolveSource(t),i==null))return null;let a=i,o=await this.fileFromHandle(i);o&&(i=o);let s=n.format,c=this._detectSourceType(i);if(!c)throw Error(`Unable to detect source type from provided input.`);let l,u,d=!1;if(c===`filepath`){let e=typeof i==`string`&&i.startsWith(`file://`)?i.slice(7):i;i=await this.filePathToFile(e),c=`file`,d=!0}switch(c){case`file`:{let e=i,t=e?.name,a=t?`${r.Mt(t)}`:``;l=await e.arrayBuffer(),u={format:s,ext:r.D(t),name:a,absolutePath:t,size:e.size,lastModified:e.lastModified,canWrite:!n.asCopy&&(!!o||d&&this._canWriteLocalPath())};break}case`blob`:{let e=i;l=await e.arrayBuffer(),u={format:s,size:e.size};break}case`base64`:{let t;if(i&&typeof i==`object`&&`base64`in i)t=i.base64;else if(typeof i==`string`&&i.startsWith(`data:`)){let[,e]=i.split(`,`);t=e}else t=i;l=e.z.base64ToArrayBuffer(t),u={format:s,size:t.length};break}case`fetch`:{let e,t,n;if(typeof i==`string`)e=i;else{if(!i||typeof i!=`object`||!(`input`in i))throw Error(`Invalid fetch source provided.`);{let r=i;e=r.input,t=r.init,n=r.timeout}}let a=n||3e4,o=new AbortController,c=setTimeout(()=>o.abort(),a),d=typeof e==`string`?e:e.toString(),f=r.D(d);try{let n=await fetch(e,{...t,signal:o.signal});if(clearTimeout(c),!n.ok)throw Error(`Failed to fetch: ${n.status} ${n.statusText}`);let i=await n.arrayBuffer();if(!i)throw Error(`Unable to fetched content: ${d}`);l=i,u={format:s,ext:f,name:r.Mt(d,!0),absolutePath:d}}catch(e){throw clearTimeout(c),e.name===`AbortError`?Error(`Fetch timeout after ${a}ms: ${d}`):e}break}case`buffer`:l=i,u={format:s};break;case`stream`:{let e=i.getReader(),t=[],n=0;try{for(;;){let{done:r,value:i}=await e.read();if(r)break;t.push(i),n+=i.length}}finally{e.releaseLock()}let r=new ArrayBuffer(n),a=new Uint8Array(r),o=0;for(let e of t)a.set(e,o),o+=e.length;l=r,u={format:s};break}default:throw Error(`Unsupported source type: ${c}`)}u.canWrite&&await this.findOpenOrigin(a,u)&&(u.canWrite=!1);let f=await t.decode(l,{sourceType:c,...u});return f?(await this.onWorkbookRead(f,a),f):null}async findOpenOrigin(e,t){return t.absolutePath?this.findOpenPath(t.absolutePath):null}findOpenPath(e,t){return d().find(n=>{if(n===t||!n.canWrite())return!1;let r=n.getPath();return!!r&&this.isSamePath(r,e)})??null}isSamePath(e,t){return e===t}async fileFromHandle(e){return null}async resolveSource(e){return null}async onWorkbookRead(e,t){}_canWriteLocalPath(){return!1}_detectSourceType(t){if(t&&typeof t==`object`&&`base64`in t)return`base64`;if(t&&typeof t==`object`&&`input`in t)return`fetch`;if(typeof t==`string`){if(t.startsWith(`data:`))return`base64`;if(t.startsWith(`http://`)||t.startsWith(`https://`))return`fetch`;if(t.startsWith(`file://`))return`filepath`;let e=this._defaultStringSourceType;return t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||/^[a-zA-Z]:[/\\]/.test(t),e}if(typeof File<`u`&&t instanceof File)return`file`;if(typeof Blob<`u`&&t instanceof Blob)return`blob`;let n=t instanceof ArrayBuffer||Object.prototype.toString.call(t)===`[object ArrayBuffer]`,r=ArrayBuffer.isView(t),i=e.z.isNodeBuffer(t);return n||r||i?`buffer`:typeof ReadableStream<`u`&&t instanceof ReadableStream||Object.prototype.toString.call(t)===`[object ReadableStream]`||t&&typeof t.getReader==`function`&&t.locked!==void 0?`stream`:null}},m=class extends p{constructor(e,t){super(),this._getWriteFormats=e,this._getReadFormats=t,this._defaultStringSourceType=`fetch`,this._handleCache=new WeakMap}async fileFromHandle(e){return g(e)?e.getFile():null}async resolveSource(){let t=await this._getReadFormats?.()??[];if(typeof globalThis.showOpenFilePicker==`function`)try{let e=function(e){let t=h(e);if(t.length<=1)return t;let n=new Set,r={};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));return[{description:`All Supported`,accept:r},...t]}(t),[n]=await globalThis.showOpenFilePicker(e.length?{types:e}:void 0);return n}catch(e){if(e?.name===`AbortError`)return null;throw e}let n=t.flatMap(e=>e.exts.map(e=>`.`+e)).join(`, `);return e.b.openFileDialog(n)}async findOpenOrigin(e){return g(e)?this._findOpenHandle(e):null}async _findOpenHandle(e,t){for(let n of d()){if(n===t||!n.canWrite())continue;let r=this._handleCache.get(n);if(r&&typeof r.isSameEntry==`function`&&await r.isSameEntry(e))return n}return null}async onWorkbookRead(e,t){if(!g(t))return;let n=e.getOrigin?.();n?.canWrite()&&this._handleCache.set(n,t)}async filePathToFile(e){throw Error(`Cannot read local file path '${e}' in browser environment. Use a file input element or fetch for remote URLs.`)}async write(t){let{origin:n,suggestedName:r,format:i,encode:a,prompt:o}=t,c=[i,...(await this._getWriteFormats()).filter(e=>e.key!==i.key)],l=typeof globalThis.showSaveFilePicker==`function`,u=!o&&n.canWrite()?this._handleCache.get(n):void 0;if(l)try{if(u){let e=await async function(e){try{if(typeof e.queryPermission!=`function`)return`granted`;let t={mode:`readwrite`};return await e.queryPermission(t)===`granted`||await e.requestPermission(t)===`granted`?`granted`:`denied`}catch{return`unavailable`}}(u);if(e===`denied`)return null;e!==`granted`&&(u=void 0)}let o=!!u;if(!o){u=await globalThis.showSaveFilePicker({suggestedName:r,types:h(c)});let n=await this._findOpenHandle(u,t.workbook?.getOrigin?.());if(n)throw new e.c(e.r(`error.io.openElsewhere`,{name:n.getName()??u.name??``}))}let l=v(u.name??r),d=c.find(e=>e.exts.some(e=>e.toLowerCase()===l))??i,f=o?n:new s(u.name??r,{format:d.key,canWrite:!0}),p=await a(d.key,f);if(!p)return null;let m=new Blob([_(p)],{type:d.mimeType||`application/octet-stream`}),g=await u.createWritable();if(await g.write(m),await g.close(),this._handleCache.set(f,u),f instanceof s){let e=await Promise.resolve(u.getFile?.()).then(e=>e?.lastModified??null,()=>null);f.update({size:m.size,lastModified:e})}return f}catch(t){if(t?.name===`AbortError`)return null;if(t instanceof e.c)throw t}let d=n.getPath(),f=d?d.split(/[/\\]/).pop():null,p=f&&i.exts.some(e=>e.toLowerCase()===v(f))?f:r,m=d!==p||n.canWrite()?new s(p,{format:i.key,canWrite:!1}):n,g=await a(i.key,m);if(!g)return null;let y=new Blob([_(g)],{type:i.mimeType||`application/octet-stream`});return function(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.style.display=`none`,r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}(y,p),m instanceof s&&m.update({size:y.size}),m}};function h(e){return e.map(e=>{let t=e.mimeType&&e.mimeType.includes(`/`)?e.mimeType:`application/octet-stream`;return{description:e.description??e.key,accept:{[t]:e.exts.map(e=>`.`+e)}}})}function g(e){return!!e&&e.kind===`file`&&typeof e.getFile==`function`}function _(e){if(typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer){let t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e}function v(e){let t=e.lastIndexOf(`.`);return t>=0?e.slice(t+1).toLowerCase():``}var y=class{constructor(e){this._private={input:e},typeof e==`string`?this._private.name=e:Object.assign(this._private,e)}toJSON(){return this._private.input}getFamily(){return this._private.name}getPitch(){return this._private.pitch}getPanose(){return this._private.panose}toString(){return typeof this._private.input==`string`?this._private.input:JSON.stringify(this._private.input)}get isIFont(){return!0}},b=t.r({findBestMatch:()=>te,getFontList:()=>ee,setFontList:()=>E}),x=[`Arial`,`Arial Black`,`Brush Script MT`,`Calibri`,`Comic Sans MS`,`Courier New`,`Garamond`,`Georgia`,`Impact`,`Luminari`,`Palatino Linotype`,`Tahoma`,`Times New Roman`,`Trebuchet MS`,`Verdana`],S=new Map;S.set(r.p.GenericName.Serif,[`Tahoma`]),S.set(r.p.GenericName.SanSerif,[`Calibri`]),S.set(r.p.GenericName.MonoSpace,[`Courier New`]),S.set(r.p.GenericName.Cursive,[`Comic Sans MS`]),S.set(r.p.GenericName.Fantasy,[`Luminari`]),S.set(r.p.GenericName.UISystem,[`Arial`]),S.set(r.p.GenericName.UISerif,[`Tahoma`]),S.set(r.p.GenericName.UISanSerif,[`Arial`]),S.set(r.p.GenericName.UIMonoSpace,[`Courier New`]),S.set(r.p.GenericName.UIRounded,[`Arial`]),S.set(r.p.GenericName.Math,[]),S.set(r.p.GenericName.Emoji,[]),S.set(r.p.GenericName.Fangsong,[]);var C=new Map,w=[];E(x);var T=eval;function E(e){e||E(x);let t=[];for(let n=0;n<e.length;n++){let r=e[n];typeof r==`string`&&(r=new y(r));let i=!0;try{i=T(`document.fonts.check('12px ${r.getFamily()}')`)}catch{}let a={fontRef:r,loaded:i};t.push(a),C.set(r.getFamily(),a)}w=Object.freeze(t)}function ee(){return w}var D,O,k,A,j=new Map;function te(e,t){let n=j.get(e);if(n)return n.fontRef===null?null:n;let r=[e];t?.fallbacks&&(r=r.concat(t.fallbacks));let i=null;for(let e=0;!i&&e<r.length;e++){let t=r[e];if(i=C.get(t),!i){let e=S.get(t);if(e)for(let t=0;!i&&t<e.length;t++)i=C.get(e[t])}}return i?j.set(e,i):j.set(e,{fontRef:null,loaded:!1}),i}var ne=t.r({DefaultFontSizes:()=>M,findNextFontSize:()=>re}),M=Object.freeze([8,9,10,11,12,14,16,18,20,22,24,26,28,30,36,48,72]);function re(t,n=!0,r=M){if(!r||r.length===0)return t;if(t===void 0)return r[0];if(n&&t>=r[r.length-1]||!n&&t<=r[0])return t;let i=e.I.findEqualOrGreater(r,t);return n?(r[i]===t&&(i+=1),r[i]||--i,r[i]):(--i,r[i])}(D||={}).SortOn={Value:`value`,FillColor:`fillColor`,FontColor:`fontColor`,Icon:`icon`},(k=O||={}).Compound={Single:`sng`,Double:`dbl`,ThickThin:`thickThin`,ThinThick:`thinThick`,Triple:`tri`},k.Align={Center:`ctr`,Inset:`in`,Outset:`outset`},k.LineCap={Butt:`butt`,Round:`round`,Square:`square`},k.LineJoin={Bevel:`bevel`,Miter:`miter`,Round:`round`},k.PresetMarkerShape={Single:`none`,Double:`double`,ThickThin:`thickThin`,ThinThick:`thinThick`},k.StrokeStyle={None:`none`,Dashed:`dashed`,Dotted:`dotted`,LargeDash:`lgDash`,LargeDashDot:`lgDashDot`,LargeDashDotDot:`lgDashDotDot`,Solid:`solid`,SysDash:`sysDash`,SysDashDot:`sysDashDot`,SysDashDotDot:`sysDashDotDot`,SysDot:`sysDot`},(A||={}).Type={OuterShadow:`outerShadow`,InnerShadow:`innerShadow`,PresetShadow:`presetShadow`,Glow:`glow`,SoftEdge:`softEdge`,Reflection:`reflection`};var N,ie,ae,oe,P=r.X.BuiltInName,se={[P.Normal]:e.q(`style.builtin.normal`),[P.Comma]:e.q(`style.builtin.comma`),[P.Currency]:e.q(`style.builtin.currency`),[P.Percent]:e.q(`style.builtin.percent`),[P.Comma0]:e.q(`style.builtin.comma0`),[P.Currency0]:e.q(`style.builtin.currency0`),[P.Hyperlink]:e.q(`style.builtin.hyperlink`),[P.FollowedHyperlink]:e.q(`style.builtin.followedHyperlink`),[P.Note]:e.q(`style.builtin.note`),[P.WarningText]:e.q(`style.builtin.warningText`),[P.Title]:e.q(`style.builtin.title`),[P.Input]:e.q(`style.builtin.input`),[P.Output]:e.q(`style.builtin.output`),[P.Calculation]:e.q(`style.builtin.calculation`),[P.CheckCell]:e.q(`style.builtin.checkCell`),[P.LinkedCell]:e.q(`style.builtin.linkedCell`),[P.Total]:e.q(`style.builtin.total`),[P.Good]:e.q(`style.builtin.good`),[P.Bad]:e.q(`style.builtin.bad`),[P.Neutral]:e.q(`style.builtin.neutral`),[P.ExplanatoryText]:e.q(`style.builtin.explanatoryText`)},ce=e.q(`style.builtin.heading`),le=e.q(`style.builtin.accent`),ue=e.q(`style.builtin.accentTint`),de=/^Heading ([1-4])$/,fe=/^Accent([1-6])$/,pe=/^(20|40|60)% - Accent([1-6])$/;function me(e){let t=se[e];if(t)return{key:t};let n=de.exec(e);return n?{key:ce,params:{n:+n[1]}}:(n=fe.exec(e),n?{key:le,params:{n:+n[1]}}:(n=pe.exec(e),n?{key:ue,params:{pct:+n[1],n:+n[2]}}:null))}var he=(t,n,i,a,o)=>{let s=JSON.parse(JSON.stringify(t.definition));s.adjs||=[];let c=``,l=0,u=0;n>0?(u=n,l=100-n,c=e.r(`op.lighterPercent`,{percent:n})):n<0&&(l=100+n,c=e.r(`op.darkerPercent`,{percent:-n})),l&&s.adjs.push({[r.Gt.AdjustmentType.LumMod]:l}),u&&s.adjs.push({[r.Gt.AdjustmentType.LumOff]:u});let d=new r.A({val:s.val,adjs:s.adjs},i),f=d.toString();a?.set(f,d);let p=d.toRGBA().toString();return o?.set(p,d),{description:t.description+`, `+c,definition:s}};function ge(e){let t,n=e.trim();if(!n)return;try{let e=r.S.shared().tokenize(n,!1);if(e.errors.length>0)return;t=e.tokens}catch{return}let i=0,a=0;if(t.length===2){let e=t[0].tokenType?.name;e===`MinOp`?(i=-1,a=1):e===`PlusOp`&&(i=1,a=1)}if(t.length-a!==1)return;let o=t[a],s=o.image;try{switch(o.tokenType?.name){case`NumberToken`:case`ScientificDigit`:case`DigitToken`:{let e=r.dt(s).value;return i===0?e:i*e}case`StringToken`:return i===0?r.mt(s).value:void 0;case`BooleanToken`:return i===0?r.Ft(s).value:void 0;case`LiteralError`:case`RefError`:return i===0?r.xt(s).value:void 0;default:return}}catch{return}}function F(e,t){let r=I(e),i=I(t);return r===i?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:n.i.isError(e)&&n.i.isError(t)?e.getCode()-t.getCode():0:r-i}function I(e){if(e===null)return 0;switch(typeof e){case`number`:return 1;case`string`:return 2;case`boolean`:return 3;default:return n.i.isError(e)?4:5}}(N||={}).buildPalette=function(e,t,n,i){let a=[];for(let o=0;o<e.length;o++){let s=[];a.push(s);let c=r=>{for(let a=0;a<r.length;a++)s.push(he(e[o],r[a],t,n,i))},l=new r.A({val:e[o].definition.val,adjs:e[o].definition.adjs},t).toHSLA().lum;c(l===0?[50,35,25,15,5]:l===100?[-5,-15,-25,-35,-50]:l<=20?[90,75,50,25,10]:l>=80?[-10,-25,-50,-75,-90]:[80,60,40,-25,-50])}return a},ie||={},ae||={},oe||={};var _e=class{constructor(e){this._children=e}getCoords(){let e=this._children,t=null;for(let n=0;n<e.length;n++){let r=e[n].getCoords();r&&(t=t?{rowStart:Math.min(t.rowStart,r.rowStart),colStart:Math.min(t.colStart,r.colStart),rowEnd:Math.max(t.rowEnd,r.rowEnd),colEnd:Math.max(t.colEnd,r.colEnd)}:r)}return t}getSize(){let e=this._children,t=e.length,n=0;for(let r=0;r<t;r++)n+=e[r].getSize();return n}getCount(){let e=this._children,t=e.length,n=0;for(let r=0;r<t;r++)n+=e[r].getCount();return n}getAggregates(e){if(e)return this._mergeAggregates(e);let t=this._aggregates;return t||(t=this._mergeAggregates(),this._aggregates=t),t}getSnappedSum(e){let t=e??this.getAggregates().sum??0,n=this._children;for(let e=n.length-1;e>=0;e--)if(n[e].getAggregates().numericalCount>0)return n[e].getSnappedSum(t);return t}getSortedNumbers(){let e=this._sortedNumbers;if(!e){let t=this._children,n=t.length,i=[];for(let e=0;e<n;e++){let n=t[e].getSortedNumbers().getValues();n.length>0&&i.push(n)}e=new r.G(function(e){let t=e.length;if(t===0)return ve;if(t===1)return e[0];let n=e[0];for(let r=1;r<t;r++)n=ye(n,e[r]);return Object.freeze(n)}(i)),this._sortedNumbers=e}return e}getRanked(e){return r.I(this._children,e,F)[Symbol.iterator]()}getFrequencies(e){if(e)return this._mergeFrequencies(e);let t=this._frequencies;return t||(t=this._mergeFrequencies(),this._frequencies=t),t}_mergeFrequencies(e){let t=e?.keyFn??r.Dt,n=e?.limit,i=new Map,a=this._children,o=a.length,s=0,c=0,l=!1;for(let r=0;r<o;r++){let o=a[r].getFrequencies(e);s+=o.getVisitedCount(),c+=o.getTotalCount(),l||=o.isTruncated();let u=o.getValueCounts(),d=u.next();for(;!d.done;){let[e,r]=d.value,a=t(e),o=i.get(a);o?o.count+=r:n===void 0||i.size<n?i.set(a,{value:e,count:r}):l=!0,d=u.next()}}return r.zt.fromGroups(i,t,e,F,s,c,l)}getTypedCounts(e){let t=this._typedCounts;if(!t){let e={[n.t.Number]:0,[n.t.String]:0,[n.t.Boolean]:0,[n.t.Error]:0,[n.t.RichData]:0,[n.t.Null]:0},r=this._children,i=r.length;for(let t=0;t<i;t++){let i=r[t].getTypedCounts();e[n.t.Number]+=i[n.t.Number]??0,e[n.t.String]+=i[n.t.String]??0,e[n.t.Boolean]+=i[n.t.Boolean]??0,e[n.t.Error]+=i[n.t.Error]??0,e[n.t.RichData]+=i[n.t.RichData]??0,e[n.t.Null]+=i[n.t.Null]??0}t=Object.freeze(e),this._typedCounts=t}if(e===void 0)return t;let r={},i=e.length;for(let n=0;n<i;n++)r[e[n]]=t[e[n]]??0;return r}get isIRangeStats(){return!0}_mergeAggregates(e){let t=this._children,i=t.length,a={count:0,min:void 0,max:void 0,numericalCount:0,sum:0,sumSq:0,typed:{[n.t.Number]:0,[n.t.String]:0,[n.t.Boolean]:0,[n.t.Error]:0,[n.t.RichData]:0,[n.t.Null]:0}};for(let n=0;n<i;n++){let r=t[n].getAggregates(e);a.count+=r.count;let i=r.numericalCount;i<=0||(a.numericalCount+=i,a.sum+=r.sum,a.sumSq+=r.varP*i+r.sum*r.sum/i,(a.min===void 0||r.min<a.min)&&(a.min=r.min),(a.max===void 0||r.max>a.max)&&(a.max=r.max))}return r.wt(a)}},ve=Object.freeze([]);function ye(e,t){let n=e.length,r=t.length,i=Array(n+r),a=0,o=0,s=0;for(;a<n&&o<r;)i[s++]=e[a]<=t[o]?e[a++]:t[o++];for(;a<n;)i[s++]=e[a++];for(;o<r;)i[s++]=t[o++];return i}var be=class{constructor(e,t){this._deleted=!1,this._json={...e},this._deleteFromCollection=t??null}getId(){return this._json.id}getDisplayName(){return this._json.displayName}getUserId(){return this._json.userId??null}getProviderId(){return this._json.providerId??null}delete(){this._deleted||(this._deleted=!0,this._deleteFromCollection?.(this))}isDeleted(){return this._deleted}toJSON(){return{...this._json}}get[Symbol.toStringTag](){return`[Person]`}toString(){return`Person:${this.getDisplayName()}`}get isIPerson(){return!0}},L=class extends r.s{constructor(e){super(),this._byId=new Map,this._byDisplayName=new Map,this._items=null,this._current=null,e&&this.fromJSON(e)}_getItems(){return this._items??=Array.from(this._byId.values())}getCount(){return this._byId.size}add(t){let n=typeof t==`string`?{displayName:t}:t,r=n.id;if(r){let e=this._byId.get(r);if(e)return e}let i=n.displayName??``;if(!r){let e=this._byDisplayName.get(i);if(e)return e}let a=new be({...n,displayName:i,id:r??e.I.uuidV4().toUpperCase()},e=>this._remove(e));return this._byId.set(a.getId(),a),i&&!this._byDisplayName.has(i)&&this._byDisplayName.set(i,a),this._items=null,this._notifyCollectionChange(),a}getById(e){return typeof e==`string`?this._byId.get(e)??null:null}getByDisplayName(e){return typeof e==`string`?this._byDisplayName.get(e)??null:null}getCurrent(){return this._current??=this.add(`Author`)}setCurrent(e){if(e!==null){if(typeof e==`object`&&e.isIPerson){let t=e;this._current=this.getById(t.getId())??this.add(t.toJSON());return}this._current=this.add(e)}else this._current=null}_remove(e){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())}toJSON(){return this._byId.size===0?null:this._getItems().map(e=>e.toJSON())}fromJSON(e){if(!e)return;let t=e.length;for(let n=0;n<t;n++){let t=e[n];t&&typeof t.id==`string`&&this.add(t)}}get isIPersonCollection(){return!0}},xe=class{constructor(e){this._options=e,this._emitter=new r.L(this),this._initState()}_initState(){}getModules(){return this._modules}_builtInNames(){try{let t=this._options.getBuiltInFunctions?.();if(!t)return e.I.EmptyArray;let n=[];for(let e of t.getItems())e.isBuiltIn()&&n.push(e.getName());return n}catch{return e.I.EmptyArray}}async createModule(e){let t=await(await Promise.resolve().then(()=>require("./1bLr8XHpEtM2MjCk.cjs")).then(e=>e.n)).ScriptCompiler.compile({builtInNames:this._builtInNames(),minify:!0,...e});return t.module?await r.Bt(r.o.DEFAULT_MODULE,t.module,e?.declarationsOnly??!1,t.diagnostics):null}addModule(e,t,n){this._modules.add(e,t,n)}async addModuleFromJSON(e,t,n){let i=await r.Bt(e,t);return this.addModule(e,i,n),i}executeMacro(e,t,n){let r=this._modules.getItems({name:t}),i=r.length;for(let t=0;t<i;t++){let i=r[t].getFunctions().getByName(e);if(i)return i.execute(this._options.workbook,{applyResult:!0,...n})}throw Error(`No macro ${e} found.`)}async run(e,t){try{let n=typeof e==`string`?await this.createModule({source:e}):await r.Bt(r.o.DEFAULT_MODULE,e),i=typeof e==`string`?e:e?.source??``;return await this._runModule(n,i,t)}catch(e){return{ok:!1,error:e}}}async _runModule(e,t,n){let r=this._options?.workbook;if(!e)return{ok:!1,error:Error(`The script did not compile to a module.`)};let i=e.getDiagnostics(),a=i.filter(e=>e.severity===`error`);if(a.length>0){let e=Error(((e,t)=>{let n=[0];for(let t=0;t<e.length;t++)e[t]===`
|
|
2
|
+
`&&n.push(t+1);let r=t.map(e=>` ${(e=>{let t=0,r=n.length-1;for(;t<r;){let i=t+r+1>>1;n[i]<=e?t=i:r=i-1}return`${t+1}:${e-n[t]+1}`})(e.start)} ${e.code}: ${e.message}`),i=t.length;return`Script has ${i} compile error${i===1?``:`s`}:\n${r.join(`
|
|
3
|
+
`)}`})(t,a));return e.diagnostics=a,{ok:!1,error:e,diagnostics:i}}let o=e.getFunctions(),s=(await o.search({type:`autoRun`}))[0]??(await o.search({type:`macro`}))[0]??null;if(!s)return{ok:!1,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)`).")};let c=await s.execute(r,n);return{ok:!0,result:c?.results,commitId:c?.commitId,diagnostics:i}}async _searchable(e){let t=[];if(e?.includeBuiltIn){await this._options.workbook?.getCalculation()?.start();let e=this._options.getBuiltInFunctions?.();e&&t.push(e)}let n=this._modules;if(!n||n.getCount()===0)return t;let r=e?.moduleName,i=r?n.getItems({name:r}):n.getItems(),a=i.length;for(let e=0;e<a;e++)t.push(i[e].getFunctions());return t}async searchFunctions(t){await this._emitter.notify(`onBeforeSearch`,{async:!0});let n=await this._searchable(t);if(n.length===0)return e.I.EmptyArray;let i,a=t?.limit,o=a===void 0?t:{...t,limit:void 0},s=new Set;for(let e=0;e<n.length;e++){let t=await n[e].search(o);if(t.length!==0){i||=[];for(let e=0;e<t.length;e++){let n=t[e],r=n.getName().toUpperCase();s.has(r)||(s.add(r),i.push(n))}}}if(!i||i.length===0)return e.I.EmptyArray;let c=t?.text?t.text.trim().toUpperCase():null;return c&&n.length>1&&r.Yt(i,c),a!==void 0&&i.length>a?i.slice(0,a):i}async getFunctionCategories(t){await this._emitter.notify(`onBeforeSearch`,{async:!0});let n=await this._searchable(t);if(n.length===0)return e.I.EmptyArray;if(n.length===1)return n[0].getCategories(t);let r=t?.includeDeprecated??!1,i=new Map,a=e=>{let t=e.toUpperCase(),n=i.get(t);n?n.count++:i.set(t,{name:e,count:1})};for(let e of await n[0].getCategories(t))i.set(e.name.toUpperCase(),{name:e.name,count:e.count});for(let e=1;e<n.length;e++){let i=await n[e].search(t?.type?{type:t.type}:void 0);for(let t=0;t<i.length;t++){let o=i[t],s=o.getName().toUpperCase(),c=!1;for(let t=0;t<e&&!c;t++)c=!!n[t].getByName(s);if(c)continue;let l=await o.getDescriptor().catch(()=>null);!r&&l?.isDeprecated()||a(l?.getCategory()??`Uncategorized`)}}let o=Array.from(i.values());return o.sort((e,t)=>e.name.localeCompare(t.name)),o}async start(){if(!this._modules)return this._startPromise||(this._startPromise=this._doStart(),this._startPromise.catch(()=>{this._startPromise=void 0})),this._startPromise}async _doStart(){let t=this._options?.workbook,n=this._options?.json,i={};if(n){let a=Object.keys(n);for(let o=0;o<a.length;o++){let s=a[o],c=n[s];try{i[s]=await r.Bt(s,c,!1,[],c?.scope===`workbook`?t:null)}catch(t){e.J.error(`Could not load script '${s}'; it will be unavailable.`,t)}}}let a=this,o=new r.E({transactions:this._options?.transactions,initial:i,isReadOnly:()=>a.isReadOnly(),onRemove:(e,t)=>{a._options?.onRemove?.(e,t)},onAdd:(e,t)=>{a._emitter.notify(`onChange`),a._options?.onAdd?.(e,t)}});this._modules=o;let s=o.getItems();if(s.length===0)return Promise.resolve(e.I.EmptyArray);let c=s.length;for(let n=0;n<c;n++){let r=s[n];try{let e=await r.getFunctions().search({type:`autoRun`}),n=e.length;for(let r=0;r<n;r++)await e[r].execute(t)}catch(t){e.J.error(`Error executing autoRun script:`,t)}}}addListeners(e,t){return this._emitter.addListeners(e,t)}isReadOnly(){return this._options.workbook?._isStructureProtected?.()??!1}toJSON(){this._emitter.notify(`onBeforeSave`);let e=this._modules;if(!e)throw Error(`Scripts is initializing.`);return e.toJSON()}get isIScript(){return!0}},Se=class{constructor(t,n,i,a){this._mergedReading=[],this._colsReading=[],this._rowsReading=[],this._styles=i,this._topLeft=n??e.d.EmptyCell,this._sheet=new r.y({runtime:t,styles:this._styles,calcOnLoad:`none`,container:{getName:()=>a,getIndex:()=>1}}),this._builder=this._sheet.getEntireRange().createSparseBuilder()}applyCSSStyle(e,t){let n=!1;e.style||(e.style={},n=!0);let i=e.style,a={...t};if(t.msoIgnore){let e=t.msoIgnore.split(`,`),n=Object.keys(a);for(let t=0;t<n.length;t++){let r=n[t];e.includes(r)&&delete a[r]}}let o=r.st(a.fontFamily);i.font={},o&&(i.font.family=o.family,i.font.fallbacks=o.fallbacks,i.font.size=o.size),i.font.size=a.fontSize,i.font.weight=a.fontWeight,i.font.style=a.fontStyle,i.font.color=a.color;let s=r.R(a.textDecoration);i.font.underline=s.underline,i.font.strike=s.strike,a.textUnderlineStyle&&(i.font.underline=r.c(a.textUnderlineStyle)),i.alignment={},a?.textAlign&&(i.alignment.horizontal=r.Jt(a.textAlign)),a?.textAlign&&!i.alignment.horizontal&&a?.textAlign!==`general`&&(a.textAlign===`center-across`?i.alignment.horizontal=r.U.HorizontalAlignment.CenterContinuous:a.textAlign===`fill`?i.alignment.horizontal=r.U.HorizontalAlignment.Fill:a.textAlign===`121`||a.textAlign===`010`?(i.alignment.horizontal=r.U.HorizontalAlignment.Distributed,i.alignment.justifyLastLine=a.textAlign===`121`):console.warn(`unknown text-align`,a.textAlign)),a.verticalAlign&&(a.verticalAlign.toLowerCase()===`super`?i.font.verticalAlign=r.p.VerticalAlignment.Super:a.verticalAlign.toLowerCase()===`sup`?i.font.verticalAlign=r.p.VerticalAlignment.Sub:i.alignment.vertical=r.et(a.verticalAlign),i.alignment.vertical||(a.verticalAlign===`121`?i.alignment.vertical=r.U.VerticalAlignment.Distributed:console.warn(`unknown vertical-align`,a.verticalAlign))),a.msoCharIndentCount&&(i.alignment.indent=a.msoCharIndentCount),a.whiteSpace&&(i.alignment.overflow=a.whiteSpace===`no-wrap`||a.whiteSpace===`nowrap`?r.U.Overflow.Visible:r.U.Overflow.Wrap),a.msoTextControl===`shrinktofit`&&(i.alignment.overflow=r.U.Overflow.Shrink);let c=null;if(a.background?c=a.background:a.backgroundColor&&(c=a.backgroundColor),c&&(i.fill={color:c}),a.msoPattern){let e=r.yt(a.msoPattern);e&&(e.patternType===r.h.BuiltInSheetPattern.Solid?i.fill={color:e.foreground}:e.patternType!==r.h.BuiltInSheetPattern.None&&(c&&(e.background=c),i.fill=e))}a.layoutFlow===`vertical`||a.layoutFlow===`vertical-ideographic`?i.alignment.stacked=!0:a.msoRotate!==void 0&&(i.alignment.rotation=r.bt(a.msoRotate));let l=(e,t)=>{e&&(i.borders||={},i.borders[e]=t)};a.border&&a.border!==`none`&&(l(`top`,a.border),l(`left`,a.border),l(`right`,a.border),l(`bottom`,a.border)),a.borderTop&&l(`top`,a.borderTop),a.borderLeft&&l(`left`,a.borderLeft),a.borderRight&&l(`right`,a.borderRight),a.borderBottom&&l(`bottom`,a.borderBottom),a.msoDiagonalUp&&l(`diagonalUp`,a.msoDiagonalUp),a.msoDiagonalDown&&l(`diagonalDown`,a.msoDiagonalDown);let u=i.numberFormat;a.msoNumberFormat&&(u=r.O(a.msoNumberFormat),u.includes(`\\`)?u=null:u===`Fixed`?u=r.Wt.Styles.lookupStyle(i.numberFormat).formatType===r.Wt.Type.Number?null:r.Wt.Type.Number:u===`Percent`&&(u=r.Wt.Styles.lookupStyle(i.numberFormat).formatType===r.Wt.Type.Percentage?null:r.Wt.Type.Percentage)),u&&(i.numberFormat=u),e.style=this._styles.normalize(i),n&&Object.keys(e.style).length===0&&delete e.style}onCell(t,n,i,a,o){let s=a(o),c={value:n===void 0?i??``:n};if(typeof c.value==`string`&&c.value.length===0&&(c.value=void 0),s&&this.applyCSSStyle(c,s),o?.tagName.toUpperCase()===`TD`){let e=c.style,t=e?.font??{};(o.querySelectorAll(`s`).length>0||o.querySelectorAll(`strike`).length>0)&&(t.strike=!0),o.querySelectorAll(`sub`).length>0&&(t.verticalAlign=r.p.VerticalAlignment.Sub),o.querySelectorAll(`sup`).length>0&&(t.verticalAlign=r.p.VerticalAlignment.Super),(o.querySelectorAll(`b`).length>0||o.querySelectorAll(`strong`).length>0)&&(t.weight=700),o.querySelectorAll(`i`).length>0&&(t.style=r.p.Style.Italic),o.querySelectorAll(`u`).length>0&&(t.underline=r.p.UnderlineStyle.Single),Object.keys(t).length>0&&(e||(e={},c.style=e),e.font||=t);let n=o.querySelectorAll(`a`);if(n.length>0){let e=n[0].getAttribute(`href`);e&&(c.hyperlink=e)}}if(!e.d.isSingleCell(t)){let e={rowStart:this._topLeft.rowIndex+t.rowStart,colStart:this._topLeft.colIndex+t.colStart,rowEnd:this._topLeft.rowIndex+t.rowEnd,colEnd:this._topLeft.colIndex+t.colEnd};this._mergedReading.push(e)}if(c.value===void 0&&!c.style&&Object.keys(c).length<=1)return;let l=this._builder,u=this._topLeft;if(l.pushAt(u.rowIndex+t.rowStart,u.colIndex+t.colStart,c),!e.d.isSingleCell(t)&&s.msoIgnore){if(s.msoIgnore.includes(`colspan`)){let e={};s&&this.applyCSSStyle(e,s);let n=t.colEnd-t.colStart,r=u.rowIndex+t.rowStart;for(let i=1;i<=n;i++)l.pushAt(r,u.colIndex+t.colStart+i,e);t={...t,colEnd:t.colStart}}s.msoIgnore.includes(`rowspan`)&&(t={...t,rowEnd:t.rowStart})}}onNoTable(e,t,n){this.onCell({rowStart:this._topLeft.rowIndex,colStart:this._topLeft.colIndex,rowEnd:this._topLeft.rowIndex,colEnd:this._topLeft.colIndex},e,null,t,n)}onRowStart(e,t,n,i){let a=n(i);if(a.msoHeightSource!==`userset`||!i)return;let o=i.getAttribute(`height`)??a.height,s=null;if(o&&(s=r.ft(o,this._styles.getNormal().getFont().getSize(),`px`)),s===null)for(let e=0;e<i.cells.length;e++){let t=i.cells[e],a=r.ft(t.getAttribute(`height`)??n(t).height,this._styles.getNormal().getFont().getSize(),`px`);a!==null&&(s=Math.max(a,s??0))}s!==null&&this._rowsReading.push({address:{min:this._topLeft.rowIndex+e,max:this._topLeft.rowIndex+e+t-1},update:{size:s*r.p.getDeviceScale()}})}onColumn(e,t,n,i){let a=n(i);if(a.msoWidthSource!==`userset`||!i)return;let o=i.getAttribute(`width`)??a.width,s=null;o&&(s=r.ft(o,this._styles.getNormal().getFont().getSize(),`px`)),s!==null&&this._colsReading.push({address:{min:this._topLeft.colIndex+e,max:this._topLeft.colIndex+e+t-1},update:{size:s*r.p.getDeviceScale()}})}onDone(){this._colsReading.length>0&&this._sheet.getColumnHeaders().updateHeaderPairs(this._colsReading),this._rowsReading.length>0&&this._sheet.getRowHeaders().updateHeaderPairs(this._rowsReading),this._sheet.doBatch(()=>{this._builder.apply()}),this._mergedReading.length>0&&this._sheet.getRanges(this._mergedReading).merge()}sheet(){return this._sheet}},Ce=class{constructor(t){if(!t)throw new e.g(`snapshot is required.`);this._snapshot=t}getItemType(){return`range`}getItem(){return this._snapshot}editMode(){return this._snapshot?.getMarkOptions().editMode??null}isCut(){return this._snapshot?.getMarkOptions().isCut??!1}getName(){return this._snapshot.getName()}toText(){return this._snapshot.toText()}toHtml(){return this._snapshot.toHtml()}toImage(){return this._snapshot.toImage()}get isClipboardItem(){return!0}},we=class{constructor(t,n,r,i,a){if(this._parsed=void 0,this._runtime=t,!n)throw new e.g(`nativeItems are required.`);this._topLeft=r??e.d.EmptyCell,this._native=n,this._markOptions=Object.freeze(i??{}),this._styles=a}getItemType(){return`range`}isCut(){return!1}toText(){return this._native?.text}toHtml(){return this._native?.html?.documentElement.outerHTML||null}toImage(){return this._native?.image}getItem(){let e=this._parsed;if(e===void 0)throw Error(`Must call 'parse()' before getItem().`);if(e===null)return null;if(this._snapshot)return this._snapshot;let t=this;return this._snapshot={copyTo:(n,r)=>e.copyTo(n,{...t._markOptions,...r}),getMarkOptions:()=>t._markOptions,getName:()=>e?.getName()??`Clipboard Data`,getCoords:()=>e?.getCoords?.()??null,toText:()=>t.toText(),toHtml:()=>t.toHtml(),toImage:()=>t.toImage(),getSource:()=>e?.getSource?.()??null,isISnapshot:!0},this._snapshot}async parse(){let t,n=this._native?.text,i=this._native.html;if(i===null&&n&&n.includes(`<table`))try{let t=new DOMParser().parseFromString(n,e.h.Html),r=t.querySelector(`parsererror`);if(r)throw new e.c(`Unable to parse: `+r);i=t,n=null}catch{console.warn(`Discovered text as html table but could could not parse.`)}try{let e,a=new Se(this._runtime,this._topLeft,this._styles,i?`HTML`:`Text`),o=await Promise.resolve(n?r.tn(n):[[]]);if(r.Ot(i,o,a)?(t=a.sheet(),e=t.getUsedRange()):i=null,e)return this._parsed={copyTo:async(t,n)=>(await t.copyFrom(e,n))?.getCoords()??null,getCoords:()=>e.getCoords(),getSource:()=>t,getName:()=>t.getName()},!0}catch(e){throw e}if(!n&&!i&&this._native.image){let t=this;return this._parsed={async copyTo(n,r){let i=n.getSheet(),a=await t._native.image.arrayBuffer(),o=await i.getMovables().addPicture({source:{buffer:a}},{type:`picture`,description:e.q(`op.copyImageFromClipboard`)});return i.getView().selectMovables([o]),null},getName:()=>`Image`},!0}return this._parsed=null,!1}get isClipboardItem(){return!0}},R={showFormulaBar:!0,showTabs:!0,tabRatio:600,showHorizontalScrollbar:!0,showVerticalScrollbar:!0,showStatusBar:!0,activeSheetId:0},z=class{constructor(t){this._id=e.I.uuidV4(),this._emitter=new r.L(this),this._state={...R},t?.json&&this._fromJSON(t?.json)}getId(){return this._id}isShowFormulaBar(){return this._state.showFormulaBar}setShowFormulaBar(e){return this._state.showFormulaBar=e,this._emitter.notify(`onViewChange`),this}isShowTabs(){return this._state.showTabs}setShowTabs(e){return this._state.showTabs=e,this._emitter.notify(`onViewChange`),this}getTabRatio(){return this._state.tabRatio}setTabRatio(e){return this._state.tabRatio=e,this._emitter.notify(`onViewChange`),this}isShowHorizontalScrollbar(){return this._state.showHorizontalScrollbar}setShowHorizontalScrollbar(e){return this._state.showHorizontalScrollbar=e,this._emitter.notify(`onViewChange`),this}isShowVerticalScrollbar(){return this._state.showVerticalScrollbar}setShowVerticalScrollbar(e){return this._state.showVerticalScrollbar=e,this._emitter.notify(`onViewChange`),this}isShowStatusBar(){return this._state.showStatusBar}setShowStatusBar(e){return this._state.showStatusBar=e,this._emitter.notify(`onViewChange`),this}getActiveSheetId(){return this._state.activeSheetId}setActiveSheetId(e){let t=this._state,n=t.activeSheetId;return t.activeSheetId=e,n!==e&&this._emitter.notify(`onViewChange`),this}addListeners(e,t){return this._emitter.addListeners(e,t)}toJSON(){let e={},t=Object.keys(this._state),n=t.length;for(let r=0;r<n;r++){let n=t[r],i=this._state[n];i!=null&&i!==R[n]&&(e[n]=i)}return Object.keys(e).length===0&&(e=null),e}_fromJSON(e,t=!0){let n=e||{};this.update(n,t)}update(e,t=!0){this._state={...R,...this._state,...e},t&&this._emitter.notify(`onViewChange`)}get[Symbol.toStringTag](){return`[WorkbookView]`}toString(){let e=this.toJSON();return e?JSON.stringify(e):`DefaultWorkbookView`}get isIWorkbookView(){return!0}},Te=Object.freeze({structure:!1,windows:!1,revision:!1,password:null,revisionsPassword:null}),B=class extends r.b{isWindowsAllowed(){return this._isPropertyAllowed(`windows`)}isRevisionAllowed(){return this._isPropertyAllowed(`revision`)}isStructureAllowed(){return this._isPropertyAllowed(`structure`)}_getAllowedKey(){return`workbook`}_fromJSON(e){this._properties=e}_toJSON(e){let t=this._properties;if(t){let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=n[i],a=t[r];a!=null&&a!==Te[r]&&(e[r]=a)}}return super._toJSON(e)}get[Symbol.toStringTag](){return`[WorkbookProtection]`}get isIWorkbookProtection(){return!0}};function V(t){return e.r(`error.workbook.invalidSheetKey`,{key:t})}var Ee,De,Oe,H,ke=class extends r.s{constructor(e,t,n){super(),this._add=e,this._get=t,this._addListeners=n}add(e){return this._add(e)}_getItems(e){return this._get(e?.name,e?.visibility)}getByName(e){return this._get(e)?.[0]??null}addListeners(e,t){return this._addListeners(e,t)}get isISheetCollection(){return!0}},U=new RegExp(/[\\/\\*?:[\]]+/),Ae=new RegExp(/\(((\d+)(?!.*\d))\)$/,`g`);function je(t){let n=e.r(e.q(`workbook.defaultSheetName`),{n:t+1});return n===`workbook.defaultSheetName`?`Sheet${t+1}`:n}function W(e,t){return{...r.j,getSheet:()=>null,toString:()=>r.Ht(e,t)}}function G(t,n=!1){if(!t)throw Error(e.r(`error.workbook.sheetNameBlank`));if(U.test(t)){if(!n)throw Error(function(t){return t?e.r(`error.workbook.sheetNameInvalidCharsNamed`,{sheetName:t}):e.r(`error.workbook.sheetNameInvalidChars`)}(t));t=t.replace(U,``)}if(t.length===0)throw Error(e.r(`error.workbook.sheetNameBlank`));let r=t.length;if(r>31){if(!n)throw Error(e.r(`error.workbook.sheetNameTooLong`));t=t.substring(0,31)}if(t.charAt(0)===`'`||t.charAt(r-1)===`'`){if(!n)throw Error(e.r(`error.workbook.sheetNameQuotes`));t=t.replace(/^'|'$/g,``)}return t}var Me,K=`workbook.activeSheet`,q=class e extends r.cn{constructor(e,t,n,r){super(e,t,r),this._workbook=n}getSource(){return this._workbook}_createRanges(t,n){let i=this._options;return n&&(i={...this._options,getOptions:r.Lt(this._options?.getOptions,n)}),new e(t,this._internal,this._workbook,i)}_createRange(e,t){let n=e?{...e}:null,i=n?this._workbook._getSheetRef(n.scope,r.Tt.Visibility.VeryHidden):null;if(!i){let e=this._workbook.getSelectedSheet();return delete n?.scope,W(n,n?{scope:r.K,...e.getEntireRange().getCoords()}:null)}let a=this._options;return t&&(a={...this._options,getOptions:r.Lt(this._options.getOptions,t)}),new J(e,r.un(i.sheet),this._workbook,a)}async select(e){let t=[],n=null,r=this.getCoords();for(let e=0;e<r.length;e++){let i=r[e];i&&(n||=i.scope,i&&i.scope===n&&t.push(i))}n||=this._workbook.getSelectedSheet().getName();let i=this._workbook.getSheets().getByName(n);if(!i)return;let a=await i.getRanges(t).select(e),o=this._workbook._rangesAddressToCoords(a.getCoords());return this._createRanges(o)}addListener(e,t){if(!this.getCoords())return()=>{};let n=this._workbook._sheetToWBEvent(e);return super.addListener(n,t)}get[Symbol.toStringTag](){return`[WorkbookRanges]`}getAddress(e){let t=this._internal.getSheet(),n=t.getEntireRange().getCoords();return r.ht(this.getCoords(),{...n,scope:t.getName()},r.Ht,r.F,e)}toString(){return this.getAddress()}},J=class e extends r.dn{constructor(e,t,n,r){super(e,t,r),this._workbook=n}_createRanges(e,t){let n=this._options;return t&&(n={...this._options,getOptions:r.Lt(this._options?.getOptions,t)}),new q(e,this._internal,this._workbook,n)}_createRange(t,n){let i=this._internal;if(!t)return r.V(i.getSheet(),i.getSheet().getEntireCoords());if(i.validateCoords(t),i.getSheet().isClosed())return r.V(null,i.getSheet().getEntireCoords(),t);let a=this._options;return n&&(a={...this._options,getOptions:r.Lt(this._options?.getOptions,n)}),new e(t,this._internal,this._workbook,a)}addListener(e,t){if(!this.getCoords())return()=>{};let n=this._workbook._sheetToWBEvent(e);return super.addListener(n,t)}get[Symbol.toStringTag](){return`[WorkbookRange]`}getAddress(e){let t=this._internal.getSheet(),n=t?.getEntireRange().getCoords()??null;return r.Ht(this.getCoords(),{...n,scope:t.getName()})}toString(){return this.getAddress()}},Y=e=>!!e&&typeof e==`object`&&typeof e.getOrigin==`function`,X=class{constructor(t){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 r.lt(()=>{let e=[];for(let t of this.getSheets())e.push(...t.getPivotTables());return e}),this._people=new L,this._commentCollection=new r.ln(null,(e,t,n)=>{let r=[];for(let i of this.getSheets())r.push(...i.getComments().getItems(e?{address:e,ignoreHidden:t,fullyContained:n}:{ignoreHidden:t,fullyContained:n}));return r},(e,t)=>this.addListeners({onSheetsChange:e.onCollectionChange?()=>{e.onCollectionChange(this._commentCollection)}:void 0},t)),this._restoringSheets=!1,this._isDate1904=!1,this._codeName=null,this._updateLinks=null,this._locale=null,this._localeOverrides=null;let n=typeof t==`string`?{origin:t}:{...t},i=n.origin;this._ownOriginProvider=!Y(i),this._originProvider=Y(i)?i:new f(typeof i==`string`?new s(null,{name:i}):i??new s(null)),delete n.origin,this._bindOrigin(this._originProvider.getOrigin()),this._listenerOriginProvider=this._originProvider.addListeners({onOriginChange:()=>this._onOriginChange()});let a=n.json;delete n.json,this._transactions=n.transactions??new r.ot,this._id=this._transactions.create(),this._ownTransactions=!n.transactions,this._emitter=new r.L(this,this._transactions),this._runtime=n.runtime??new r.$t(`Workbook Runtime`,{isDate1904:()=>this._isDate1904,getNow:()=>this._transactions.getCurrentCommit().getTimestamp(),getLocale:()=>this._locale??r.Ut()??r.Zt(),getLocaleOverrides:()=>this._localeOverrides}),this._listenerLanguage=e.D.addChangeListener(()=>{this._closed||this._notifyAllChange()});let o=this,c=this._beginCommit({description:e.q(a?`op.openWorkbook`:`op.newWorkbook`)});try{this._strings=n.strings??new r._,this._ownStrings=!n.strings,this._resources=n.resources??new r.Xt,this._ownResources=!n.resources,this._createSheetName=n.createSheetNameCallback??je;let t=n.createSheetCallback;t||=e=>new r.y(e),this._sheetOnNameChange=new Map,this._sheetOnVisibilityChange=new Map,this._sheetOnIndexChange=new Map,this._createSheet=(e,n,i,a,s,c)=>{let l=null,u={runtime:o._runtime,readonly:o._options.readonly??!1,disableLoadAutoFit:o._options.disableLoadAutoFit??!1,opener:o._options.opener,transactions:o._transactions,styles:o._styles,strings:o._strings,resources:o._resources,names:o._names,workbook:o,calculation:o._calculation,resolveRange:e=>o._options.resolveRange?.(e)??o.getRange(e),container:{beforeFromJSON:t=>{l=t,o._addSheetRef({name:n,id:e,visibility:i??r.Tt.Visibility.Visible,sheetId:s,sheet:t},a)},getName:()=>{let e=o._getSheetRef(l);return e?e.name:n},setName:(e,t)=>{o._getSheetRef(l)&&o._setSheetName(l,e,t)},setNameChangeCallback:t=>{o._sheetOnNameChange.set(e,t)},getVisibility:()=>{let e=o._getSheetRef(l);return e?e.visibility:r.Tt.Visibility.Visible},setVisibility:(e,t)=>{o._setSheetVisibility(l,e,t)},setVisibilityCallback:t=>{o._sheetOnVisibilityChange.set(e,t)},duplicate:()=>o._duplicateSheet(l),getIndex:()=>{let e=o._getSheetRef(l);return e?o._getOffsetForId(e.id,o._getSheetRefs(r.Tt.Visibility.VeryHidden)):a},setIndex:(e,t)=>{let n=o._getSheetRef(l,r.Tt.Visibility.VeryHidden);return!!n&&(o._moveSheet(n,e,t),!0)},setIndexCallback:t=>{o._sheetOnIndexChange.set(e,t)},requestSelect:async()=>(o._setSelectedSheet(l),await this._emitter.notify(`onRequestSelect`,{source:o,params:l,async:!0}),o.getSelectedSheet()===l)}};return c&&(u.json=c),l=t(u,n,a,i),l},this._namedTableSource=new r.pt({getSheets:()=>o._sheets?o.getSheets().getItems():e.I.EmptyArray,addSheetsListener:(e,t)=>o.addListeners({onSheetsChange:e},t)}),this._names=n.names??new r.Pt({addressToRanges:e=>o.getRanges(e),getCurrentScope:()=>o.getSelectedSheet().getName(),isReadOnly:()=>(o._options.readonly??!1)||o._isStructureProtected(),transactions:o._transactions,getSources:()=>o._calculation?[o._calculation.getNamedFormulas(),o._namedTableSource]:e.I.EmptyArray}),this._ownNames=!n.names,this._calculation=n.calculation??new r.At({runtime:o._runtime,functions:n.functions,json:a?.calc,isNamesReadOnly:()=>o._isStructureProtected(),getActiveCell:()=>{let e=o.getSelectedSheet(),t=e?.getSelectedRange()?.getCoords();return t?{rowIndex:t.rowStart,colIndex:t.colStart,scope:e.getId()}:null},getRange:o.getRange.bind(o),getRanges:o.getRanges.bind(o),createGraphRanges:(e,t)=>o._createGraphRanges(e,t),getSheetIndex:e=>{if(e===void 0){let e=o.getSelectedSheet();return e?this._getSheetRefs(r.Tt.Visibility.VeryHidden).findIndex(t=>t.sheet===e):-1}let t=this._getSheetRefs(r.Tt.Visibility.VeryHidden);e=e.toLowerCase();let n=t.length;for(let r=0;r<n;r++)if(t[r].name.toLowerCase()===e)return r;try{Z.address=e;let t=this._names.getItems(Z);if(!t||t.length===0)return-1;let n=t[0].getRanges?.()?.getCoords()?.[0]?.scope;if(!n)return-1;let i=this._getSheetRefs(r.Tt.Visibility.VeryHidden);n=n.toLowerCase();let a=i.length;for(let e=0;e<a;e++)if(i[e].name.toLowerCase()===n)return e}catch{return-1}return-1},getSheetCount:()=>o.getSheets().getItems({visibility:r.Tt.Visibility.VeryHidden}).length,getSheetIds:()=>o._sheets?.getItems({visibility:r.Tt.Visibility.VeryHidden}).map(e=>e.getId())??[],addSheetsListener:(e,t)=>o.addListeners({onSheetsChange:()=>{o._restoringSheets||e()}},t),getSheetById:e=>{let t=o.getSheets().getItems({visibility:r.Tt.Visibility.VeryHidden}),n=t.length;for(let r=0;r<n;r++)if(t[r].getId()===e)return t[r];return null},externalBooks:a?.externalBooks,externalBookResolver:n.externalBookResolver,namedCollection:o._names,strings:o._strings,transactions:o._transactions,names:a?.names}),this._ownCalculation=!n.calculation,this._scripts=this._createScripts(a?.modules),this._ownNames=!n.names,this._options=Object.freeze({...n});let i=n.calcOnLoad??`auto`,s=!1,l=(async()=>{try{if(this._ownCalculation&&i!==`none`&&(i===`full`||i===`auto`&&!0===a?.calc?.fullCalcOnLoad?await this._calculation.calculate({full:!0}):await this._calculation.start(),this._closed))return;await this._scripts.start()}finally{s=!0,this._starting=null}})();s||(this._starting=l),this._starting?.catch(()=>{}),a?this._fromJSON(a):(this._initState(),this._addSheet(!1)),this._sheets=new ke(e=>o._addSheetOptions(e),(t,n)=>{if(t){let r=this._getSheetRef(t,n);return r?[r.sheet]:e.I.EmptyArray}return this._getSheets(n)},(e,t)=>{let n=e.onCollectionChange,r=e.onInvalidated;return o._emitter.addListeners({onSheetsChange:n?()=>{n(o._sheets)}:void 0,onInvalidated:r?()=>{r(o._sheets)}:void 0},t)}),this._ownCalculation&&(n.calcOnLoad??`auto`)!==`none`&&this._calculation.hydrateNames(),this._emitter.notify(`onLoad`),this._ownTransactions?c.amend():c.commit()}catch(e){throw c.rollback(),e}this._initializing=!1}_initState(){let e=this._getSheetRefs();for(let t=(e?e.length:0)-1;t>=0;t--);let t=this._options;this._isDate1904=t.runtime?.isDate1904()??!1,this._locale=null,this._localeOverrides=null,this._theme=t.theme??new r.r().getDefaultTheme(),this._styles=t?.styles??new r.g(this._theme),this._ownStyles=!t.styles,this._styles.getTheme()||this._styles.setTheme(this.getTheme()),this._activeSheetOffset=0,this.setView(new z),this._listenerProtection?.(),this._protection=new B(void 0,this._options.readonly??!1),this._listenerProtection=this._protection.addListeners({onChange:e=>{n._emitter.notify(`onProtectionChange`)}});let n=this;this._transactionsRemoveListener=this._transactions.addStateListener(this._id,{async onAfterStateChange(e,t,r,i,a){let o=n._view,s=a?.[K],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;if(d?await d.sheet.select():n._resyncActiveSheet(u,e),n._lastTransactionUUID=t.getId(),r||i){n._restoringSheets=!0;try{n._emitter.notify(`onSheetsChange`)}finally{n._restoringSheets=!1}}n._emitter.notify(`onSelectedSheetChange`),n._emitter.notify(`onViewChange`)},onRestoreOrRevert(){n._ownCalculation,n._emitter.notify(`onInvalidated`)}});let i=this._getState();i?.listenersSheets&&(i?.listenersSheets.forEach(e=>{e()}),i?.listenersSheets.clear()),this._updateState({sheetRefsAll:[],sheetRefsVisibleAndHidden:[],sheetRefsVisible:[],refsById:new Map,sheetsById:new Map,refsByLowerCaseName:new Map,sheetsByLowerCaseName:new Map,refsByInstance:new Map,lastId:-1,sheetsCreated:new Set,listenersSheets:new Map})}getId(){return this._id}getVersionId(){return this._transactions.getVersionId(this._id)}getName(){return this._closed?null:this._origin.getName()}getOrigin(){return this._originProvider.getOrigin()}_onOriginChange(){if(this._closed)return;let e=this._originProvider.getOrigin();if(e===this._origin)return;this._listenerOrigin?.();let t=this._lastOriginName;this._bindOrigin(e),this._emitter.notify(`onOriginChange`),this._lastOriginName!==t&&this._emitter.notify(`onNameChange`)}_bindOrigin(e){this._origin=e,this._lastOriginName=e.getName(),this._listenerOrigin=e.addListeners({onChange:()=>{if(this._closed)return;let t=e.getName();t!==this._lastOriginName&&(this._lastOriginName=t,this._emitter.notify(`onNameChange`))}})}getView(){return this._view}setView(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!t)throw new e.c(e.r(`error.sheet.emptyView`));this._listenerWorkbookView?.();let n=this,r=-1;return this._listenerWorkbookView=t.addListeners({onViewChange:e=>{let t=n._getState(),i=this._view.getActiveSheetId(),a=t.sheetRefsVisible,o=this._getOffsetForId(i,a);this._activeSheetOffset=o,n._emitter.notify(`onViewChange`),r!==i&&(n._emitter.notify(`onSelectionChange`),n._emitter.notify(`onSelectedSheetChange`)),r=i}}),this._view=t,n._emitter.notify(`onViewChange`),this}getRuntime(){return this._runtime}setDate1904(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));return this._isDate1904===t||(this._isDate1904=t,this._emitter.notify(`onRegionalChange`)),this}getLocale(){return this._runtime.getLocale()}getPinnedLocale(){return this._locale}setLocale(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(t)try{new Intl.Locale(t)}catch{throw Error(e.r(`error.workbook.invalidLocale`,{locale:t}))}return this._locale===t||(this._locale=t,this._emitter.notify(`onRegionalChange`)),this}getLocaleOverrides(){return this._localeOverrides}setLocaleOverrides(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));let n=t&&Object.keys(t).length>0?t:null;return this._localeOverrides=n,this._emitter.notify(`onRegionalChange`),this}getStyles(){return this._styles}getResources(){return this._resources}getTransactions(){return this._transactions}getStrings(){return this._strings}getExternalBooks(){return this._calculation.getExternalBooks()}getUpdateLinks(){return this._updateLinks}setUpdateLinks(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));return this._updateLinks=t,this}getPivotTables(){return this._pivotTableCollection}getComments(){return this._commentCollection}getPeople(){return this._people}getTheme(){return this._theme}setTheme(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!t)throw new e.c(e.r(`error.workbook.notSetValue`));let n=this._theme;return this._theme=t,this.getStyles().setTheme(t),this._emitter.notify(`onThemeChange`),n}getSelectedSheetIndex(){return this._activeSheetOffset}getSelectedSheet(){let e=this._getSheetRef(this.getSelectedSheetIndex());return e?e?.sheet:null}getSheet(t,n=r.Tt.Visibility.Visible){if(t===void 0)return this.getSelectedSheet();if(!t)throw Error(e.r(`error.workbook.sheetNameNotProvided`));let i=this._getSheetRef(t,n);if(!i)throw new e.K(e.r(`error.workbook.sheetNameNotFound`,{sheetName:t}));return i.sheet}getSheetAt(t,n=r.Tt.Visibility.Visible){let i=this._getSheetRef(t,n);if(!i)throw new e.K(function(t){return e.r(`error.workbook.sheetIndexNotFound`,{index:t})}(t));return i.sheet}getSheets(){return this._sheets}addSheet(e){return this.getSheets().add(e)}_getSheets(e=r.Tt.Visibility.Visible){let t=this._getSheetRefs(e),n=[],i=t.length;for(let e=0;e<i;e++)n.push(t[e].sheet);return n}_getSheetRefs(t=r.Tt.Visibility.Visible){let n=this._getState();return n?t===r.Tt.Visibility.Visible?n.sheetRefsVisible:t===r.Tt.Visibility.Hidden?n.sheetRefsVisibleAndHidden:t===r.Tt.Visibility.VeryHidden?n.sheetRefsAll:e.I.EmptyArray:[]}_getSheetRef(e,t=r.Tt.Visibility.Visible){let n=null;return typeof e==`number`?this._getSheetRefs(t)[e]:(typeof e==`string`?n=this._getState().refsByLowerCaseName.get(e.toLowerCase()):e instanceof r.y?n=this._getState().refsByInstance.get(e):e?.id!==void 0&&(n=this._getState().refsById.get(e.id)),n)}_validateNewSheetName(t,n=!0){if(t==null)return t;if(G(t),n&&this._getState().sheetsByLowerCaseName.has(t.toLowerCase()))throw new e.c(e.r(`error.workbook.nameTaken`));return t.substring(0,31)}findValidSheetName(e){e&&=G(e,!0);try{return function(e,t){try{if(t(e))return e}catch{}let n,r,i=Ae.exec(e);for(i===null?(n=e+` `,r=1):(n=e.substring(0,i.index),r=parseFloat(i[1]));r<256;){r++;let e=`(`+r+`)`,i=n.substring(0,31-e.length)+e;try{if(t(i))return i}catch{}}throw Error(e+` is not a valid sheet name`)}(e,e=>this._validateNewSheetName(e))}catch{return this._nextSheetName()}}isValidSheetNameCharacter(e){return!U.test(e)}_isStructureProtected(){return!this._initializing&&!this.getProtection().isStructureAllowed()}_addSheetOptions(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!this.getProtection().isStructureAllowed())throw new e.n(e.r(`error.workbook.protection`));let n,r=null;n=typeof t==`string`?{name:t}:typeof t==`number`?{index:t}:t,n={...n,description:n?.description??e.q(`op.addSheet`)};let i=this.beginCommit(n);try{let t=n?.autoSelect??!1;r=this._addSheet(!0,n.name,n.index??null);let a=this.getView().getActiveSheetId();if(t&&this._recordActiveSheet(i,a,this._getSheetRef(r).id),i.commit({description:e.r(`op.addSheetNamed`,{name:r.getName()})}),!1!==t){let e=typeof t==`boolean`?void 0:t;r.select(e)}}catch(e){throw i.rollback(),e}return r}_nextSheetName(t=null){let n=t?t.toLowerCase():null,r=this._getState(),i=r.sheetsByLowerCaseName;if(t&&i.has(n))throw new e.c(function(t){return e.r(`error.workbook.nameDuplicate`,{sheetName:t})}(t));n=(t=this._validateNewSheetName(t))?t.toLowerCase():null;let a=r.lastId+1;for(;!t;){let e=this._createSheetName(a),n=e.toLowerCase();i.has(n)?a++:t=e}return this._updateState({lastId:a}),t}_addSheet(t,n=null,i=null){n=this._nextSheetName(n);let a=this._getState(),o=this._createSheet(a.lastId,n,r.Tt.Visibility.Visible,i,void 0,null);if(!o)throw new e.c(e.r(`error.workbook.sheetNameBlank`));return t&&this._emitter.notify(`onSheetsChange`),o}_updateSheetRefStates(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!this._initializing&&!this.getProtection().isStructureAllowed())throw new e.n(e.r(`error.workbook.protection`));let n=t,i=[],a=[],o=n.length;for(let e=0;e<o;e++)n[e].visibility===r.Tt.Visibility.Visible?(i.push(n[e]),a.push(n[e])):n[e].visibility===r.Tt.Visibility.Hidden&&a.push(n[e]);this._updateState({sheetRefsAll:n,sheetRefsVisible:i,sheetRefsVisibleAndHidden:a})}_addSheetRef(t,n=null){let i=this._getState(),a=i.sheetRefsAll,o=Math.max(0,Math.min(a.length,n??a.length)),s=[...a.slice(0,o),t,...a.slice(o)];this._updateSheetRefStates(s);let c=t.sheet,l=t.name.toLowerCase(),u=new Map(i.refsById);u.set(t.id,t);let d=new Map(i.refsByLowerCaseName);d.set(l,t);let f=new Map(i.refsByInstance);f.set(c,t);let p=new Map(i.sheetsById);p.set(t.id,c);let m=new Map(i.sheetsByLowerCaseName);m.set(l,c);let h=this,g=i.listenersSheets;if(c!==void 0){let n=c.addListeners({onBeforeDelete:e=>{h._validateDeleteSheet(e)},onDelete(t){let n=h._getSheetRef(t,r.Tt.Visibility.VeryHidden);if(!n)return;let i=h._beginCommit({description:e.r(`op.deleteSheet`,{name:n.name})});try{let e=h._getState(),r=e.sheetRefsAll,a=h._getOffsetForId(n.id,r),o=[...r];o.splice(a,1),h._updateSheetRefStates(o);let s=new Map(e.refsById);s.delete(n.id);let l=new Map(e.sheetsById);l.delete(n.id);let u=n.name.toLowerCase(),d=new Map(e.refsByLowerCaseName);d.delete(u);let f=new Map(e.sheetsByLowerCaseName);f.delete(u);let p=new Map(e.refsByInstance);p.delete(t),e.listenersSheets.get(n.id)();let m=new Map(e.listenersSheets);m.delete(n.id),h._adjustRemoveSelectionIfRequired(a,n.id),h._adjustSheetNamesIfRequired(),h._sheetOnNameChange.delete(n.id),h._sheetOnVisibilityChange.delete(n.id),h._sheetOnIndexChange.delete(n.id),h._emitter.notify(`onSheetsChange`);let g=new Set(e.sheetsCreated);g.has(c)&&g.delete(c),h._updateState({refsById:s,sheetsById:l,refsByLowerCaseName:d,sheetsByLowerCaseName:f,refsByInstance:p,sheetsCreated:g,listenersSheets:m}),i.commit()}catch(e){throw i.rollback(),e}}}),a=c.addListeners({onSelectionChange:e=>{h.getView().getActiveSheetId()===h._getSheetRef(e)?.id&&h._emitter.notify(`onSelectionChange`,{source:h,params:e})}},{transactional:!1});g=new Map(i.listenersSheets),g.set(t.id,()=>{n(),a()})}let _=i.lastId;_!==-1&&(_=Math.max(_,t.id)),this._updateState({lastId:_}),this._updateState({refsById:u,refsByLowerCaseName:d,refsByInstance:f,sheetsById:p,sheetsByLowerCaseName:m,listenersSheets:g}),this._adjustSheetNamesIfRequired();let v=new Set(this._getState().sheetsCreated);return v.add(t.sheet),this._updateState({sheetsCreated:v}),t}_recordActiveSheet(e,t,n){let r=this.getView().getId();e.setIntent(K,e=>({viewId:r,before:e?.before??t,after:n}))}_resyncActiveSheet(e,t){let n=t?.sheetRefsVisible;if(!n?.length)return;let r=-1,i=n.length;for(let t=0;t<i;t++)if(n[t].id===e){r=t;break}r===-1&&(r=Math.min(Math.max(this._activeSheetOffset,0),i-1));let a=n[r].id;this._view.getActiveSheetId()===a?this._activeSheetOffset=r:this._view.setActiveSheetId(a)}_adjustRemoveSelectionIfRequired(e,t){if(this._view.getActiveSheetId()===t){let t,n=this._getState().sheetRefsVisible;t=e<n.length?n[e].id:n[e-1].id,this._view.setActiveSheetId(t)}}_adjustSheetNamesIfRequired(){let e=this._getState(),t=e.lastId;if(t===-1)return;let n=this._view.getActiveSheetId();n??=(this._view.setActiveSheetId(t),t);let i=e.refsById.get(n);i||(this._view.setActiveSheetId(t),i=e.refsById.get(t),n=t),i.visibility===r.Tt.Visibility.Visible&&(this._activeSheetOffset=this._getOffsetForId(n,e.sheetRefsVisible))}_validateDeleteSheet(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!this.getProtection().isStructureAllowed())throw new e.n(e.r(`error.workbook.protection`));let n=this._getSheetRef(t);if(!n)throw new e.c(function(t){return e.r(`error.workbook.deleteKey`,{key:t})}(t));let r=this._getState().sheetRefsVisible;if(r.length===1&&r[0].id===n.id)throw new e.c(e.r(`error.workbook.sheetOne`))}_getOffsetForId(t,n){let r=n.length;for(let e=0;e<r;e++)if(n[e].id===t)return e;throw new e.c(e.r(`error.workbook.noVisibleRefs`))}find(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));let n=this._getSheets();if(n.length===1)return n[0].find(t);typeof t==`string`&&(t={text:t});let i=!t?.reverse,a=t?.disableWrap??!1,o=this.getSelectedSheetIndex(),s=o,c=n[s],l=!1;t={...t,disableWrap:!0};let u,d=c.find(t),f=d.next(),p=!1;if(t?.from){let e=this._rangesAddressToCoords(t?.from);u={colIndex:e[0].colStart,rowIndex:e[0].rowStart}}let m=e.d.createCellComparator(t?.axis,t?.reverse);delete(t={...t}).from;let h=()=>{if(!p&&f.done&&(l&&s===o?p=!0:i?(s++,s>n.length-1&&(s=0,l=!0)):(s--,s<0&&(s=n.length-1,l=!0)),a&&l&&(p=!0),p||u||!l||s!==o||(p=!0),!p)){c=n[s],d=c.find(t);let e=f;return f=d.next(),e}if(!p&&l&&s===o&&(f.done||!u||!f.done&&m(f.value.getCoords(),u)>=0)&&(p=!0),p){let e=f;return f=r.k,e}let e=f;return f=d.next(),e};return{next:()=>{let e=h();for(;!p&&e.done;)e=h();return e}}}replace(t,n,i){let a=0,o=null,s=typeof n==`function`,c=i?.maxCount??2**53-1,l=!i?.maxCount,u=``,d=typeof n==`string`?r.T(n):null,f=i?.description??e.q(`op.replace`),p=this._transactions.beginCommit({description:f});try{let r=null,f=null,m=t.next();for(;!m.done&&a<c;){let e=m.value,c=e.getSheet();c!==r&&(r=c,f!==null&&f.apply(),f=r.getEntireRange().createSparseBuilder({axis:i?.axis,allowUnorderedWrites:!0}));let l=s?n(e):n;l!==void 0&&l!==e&&(f.push(e,l),a++,o=e),m=t.next()}f?.apply(),a===1&&c===1&&o&&(u=o.getAddress()),a===0?p.rollback():p.commit({description:i?.description??(l?d===null?e.q(`op.replaceAll`):e.r(`op.replaceAllWith`,{value:d}):u?d===null?e.r(`op.replaceAt`,{address:u}):e.r(`op.replaceAtWith`,{address:u,value:d}):d===null?e.q(`op.replace`):e.r(`op.replaceWith`,{value:d}))})}catch(e){throw p.rollback(),e}return{count:a,last:o}}_nextSheetIndex(e,t=this._getSheetRefs()){let n=t.length;return n===1?0:(e===void 0&&(e=this.getSelectedSheetIndex()),(e=Math.max(0,Math.min(e,n-1)))>=n-1?0:e+1)}_prevSheetIndex(e,t=this._getSheetRefs()){let n=t.length;return n===1?0:(e===void 0&&(e=this.getSelectedSheetIndex()),(e=Math.max(0,Math.min(e,n-1)))<=0?n-1:e-1)}getNextSheet(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));let n=this._getSheetRefs();return n[this._nextSheetIndex(t,n)]?.sheet??null}getPreviousSheet(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));let n=this._getSheetRefs();return n[this._prevSheetIndex(t,n)]?.sheet??null}async _duplicateSheet(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!this.getProtection().isStructureAllowed())throw new e.n(e.r(`error.workbook.protection`));let n=this._getSheetRefs(),r=this.getSelectedSheetIndex(),i=null;if(t){if(i=this._getSheetRef(t),!i)throw new e.c(V(i))}else i=n[r];if(!i)return null;let a=i.sheet,o=this._strings.beginPersist(),s=this.getResources().beginPersist(),c=this.getStyles().beginPersist(),l=null,u=this.beginCommit(e.r(`op.duplicateNamed`,{name:a.getName()}));try{let e=this._getState().refsByInstance.get(a),t=await a.toJSON(),i=n.length+1,o=this.findValidSheetName(e.name),s=this._createSheet(i,o,e.visibility,r,void 0,t);this._emitter.notify(`onSheetsChange`),l=s,u.commit()}catch(e){throw u.rollback(),e}finally{c.endPersist(),s.endPersist(),o.endPersist()}return l}_createRange(t,n){let i=t?{...t}:null,a=i?this._getSheetRef(i.scope,r.Tt.Visibility.VeryHidden):null;if(!a){let t=this.getSelectedSheet();return t?(delete i?.scope,W(i,i?{scope:r.K,...t.getEntireRange().getCoords()}:null)):void console.warn(e.r(`error.workbook.noVisibleRefs`))}let o=a.sheet,s=null;return n&&(s={getOptions:n}),new J(t,r.un(o),this,s)}_createRanges(e,t){let n=this.getSelectedSheet(),i=null;return t&&(i={getOptions:t}),new q(e,r.un(n),this,i)}getRange(t,n){if(t===void 0)return this.getSelectedRange(n);try{let r=this._rangesAddressToCoords(t);if(r.length!==1)throw new e.c(e.r(`error.address.singleRangeOnlyAlt`));return this._createRange(r[0],n)}catch(n){throw n instanceof e.K?new e.K(n.message):new e.c(n.message??r.Q(t))}}getCell(t){if(t===void 0)return this.getSelectedCell();let n=this.getRange(t);if(n.size>1)throw new e.c(e.r(`error.address.singleCellOnly`));return n.getCell()}getRanges(t,n){let i=this._rangesAddressToCoords(t);if(i.length===0)throw new e.c(r.Q(t));return this._createRanges(i,n)}_createGraphRanges(e,t){let n=[],i=this.getCalculation()?.getNamedFormulas()??null;for(let e=0;e<t.length;e++){let a=t[e],o=(a.sheetName?this._getSheetRef(a.sheetName,r.Tt.Visibility.VeryHidden):null)?.sheet??this.getSelectedSheet();o&&n.push(new r.H(a,i,r.un(o),null))}for(let t=0;t<e.length;t++)n.push(e[t]);return n.length===0?null:new q(n,r.un(this.getSelectedSheet()),this,null)}getStats(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));let n=this._getSheets(r.Tt.Visibility.VeryHidden),i=n.length;if(i===1)return n[0].getStats(t);let a=Array(i);for(let e=0;e<i;e++)a[e]=n[e].getStats(t);return new _e(a)}_activeRangeCoords(){let e=this.getSelectedSheet(),t=e.getSelection().getRanges().getCoords(),n=e.getName(),r=t.length,i=Array(r);for(let e=0;e<r;e++){let r=t[e];i[e]={colStart:r.colStart,colEnd:r.colEnd,rowStart:r.rowStart,rowEnd:r.rowEnd,scope:n}}return i}getSelectedRange(e){return this.getRange(this._activeRangeCoords()[0],e)}getSelectedRanges(e){return this.getRanges(this._activeRangeCoords(),e)}getSelectedCell(){return this.getSelectedSheet().getSelectedCell()}_rangesAddressToCoords(t,n=!0,i=r.Tt.Visibility.Hidden){if(!t)throw new e.c(e.r(`error.address.noAddress`));let a=this.getSelectedSheet(),o={...a?.getEntireRange().getCoords()},s=a?.getName();if(s&&(o.scope=s),typeof t==`string`){let e=t.trim().toLowerCase();if(e===`r`||e===`c`){let n=this.getSelectedCell().getCoords(),r={};e===`r`?r.rowStart=r.rowEnd=n.rowIndex:r.colStart=r.colEnd=n.colIndex,t=r}}let c=this,l=r.Et(t,o,r.an,t=>{if(!n)return null;if(typeof t==`string`){let e=c.getNames().getByName(t)?.getRanges?.();if(e)return e.getCoords()}throw new e.c(`Invalid sheet reference '${t}'.`)}),u=l.length;for(let e=0;e<u;e++)this._validateCoords(l[e],i);return l}_validateCoords(t,n=r.Tt.Visibility.Visible,i=e.r(`error.sheet.oobRange`)){if(t===null)return;let a=this.getSheet(t.scope,n).getEntireRange().getCoords();if(!e.d.isRangeWithinRange(t,a))throw new e.K(i);if(t.rowEnd<t.rowStart||t.colEnd<t.colStart)throw new e.c(e.r(`error.address.invalidRangeInverted`))}_updateSheetRef(e,t){let n=this._getState(),r=[...n.sheetRefsAll];r[this._getOffsetForId(e.id,n.sheetRefsAll)]=t,this._updateSheetRefStates(r);let i=new Map(n.refsById);i.set(e.id,t);let a=e.name.toLowerCase(),o=t.name.toLowerCase(),s=new Map(n.refsByLowerCaseName);s.delete(a),s.set(o,t);let c=new Map(n.sheetsByLowerCaseName),l=c.get(a);c.delete(a),c.set(o,l);let u=new Map(n.refsByInstance);return u.set(l,t),this._updateState({refsById:i,refsByLowerCaseName:s,sheetsByLowerCaseName:c,refsByInstance:u}),t}_setSheetName(t,n,r){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!this.getProtection().isStructureAllowed())throw new e.n(e.r(`error.workbook.protection`));let i=this._getSheetRef(t);if(!i)throw new e.c(V(t));if(n===i.name)return i.sheet;if((n=this._validateNewSheetName(n))==null)throw new e.c(e.r(`error.workbook.sheetNameNotProvided`));let a=Object.freeze({...i,name:n}),o=null,s=this.beginCommit(e.q(`op.renameSheet`));try{let e=this._updateSheetRef(i,a);this._adjustSheetNamesIfRequired(),this._sheetOnNameChange.forEach((e,t)=>{i.id===t&&e()}),this._emitter.notify(`onSheetsChange`),i.id===this.getView().getActiveSheetId()&&this._emitter.notify(`onSelectionChange`),o=e.sheet,s.commit(r)}catch(e){throw s.rollback(),e}return o}_setSheetVisibility(t,n=r.Tt.Visibility.Visible,i){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!this.getProtection().isStructureAllowed())throw new e.n(e.r(`error.workbook.protection`));let a=this._getSheetRef(t,r.Tt.Visibility.VeryHidden);if(!a)return null;if(n===a.visibility)return;let o=null,s=``;n===r.Tt.Visibility.Visible?s=e.q(`op.unhideSheet`):n===r.Tt.Visibility.Hidden?s=e.q(`op.hideSheet`):n===r.Tt.Visibility.VeryHidden&&(s=e.q(`op.veryHideSheet`));let c=this.beginCommit(s);try{let t=this._getState().sheetRefsVisible;if(n!==r.Tt.Visibility.Visible&&t.length===1&&t[0].id===a.id)throw new e.c(e.r(`error.workbook.sheetOne`));let s={...a,visibility:n},l=-1;n!==r.Tt.Visibility.Visible&&(l=this._getOffsetForId(a.id,t)),o=this._updateSheetRef(a,s).sheet,n!==r.Tt.Visibility.Visible&&this._adjustRemoveSelectionIfRequired(l,a.id),this._adjustSheetNamesIfRequired(),c.commit(i)}catch(e){throw c.rollback(),e}return this._sheetOnVisibilityChange.forEach((e,t)=>{a.id===t&&e()}),this._emitter.notify(`onSheetsChange`),o}_moveSheet(t,n,r){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));if(!this.getProtection().isStructureAllowed())throw new e.n(e.r(`error.workbook.protection`));let i=null,a=this.beginCommit(e.r(`op.moveSheetNamed`,{name:t.name}));try{let o=this._getState(),s=o.sheetRefsVisible;if(n<0||n>s.length-1)throw new e.c(`Invalid to index: ${n}`);let c=this.getView().getActiveSheetId(),l=o.sheetRefsAll,u=this._getOffsetForId(t.id,l),d=this._getOffsetForId(s[n].id,l);if(u===d)return;let f=l[u],p=[...l];p.splice(u,1),p.splice(d,0,f),this._updateSheetRefStates(p),this._calculation._replaceSheetSpans?.(l.map(e=>e.sheet.getId()),p.map(e=>e.sheet.getId()),f.sheet.getId()),this._adjustSheetNamesIfRequired(),this._sheetOnIndexChange.forEach((e,t)=>{t>=u&&t<=d&&e()}),this._emitter.notify(`onSheetsChange`),i=f.sheet,this._recordActiveSheet(a,c,this.getView().getActiveSheetId()),a.commit(r)}catch(e){throw a.rollback(),e}return i}_setSelectedSheet(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));let n=this._getSheetRef(t);if(!n)throw new e.c(V(t));let i=null;return n.visibility!==r.Tt.Visibility.Visible&&this._setSheetVisibility(n,r.Tt.Visibility.Visible),this._view.setActiveSheetId(n.id),i=n.sheet,i}getProtection(){return this._protection}getCodeName(){return this._codeName}getNames(){return this._names}getCalculation(){return this._calculation}createFormula(e,t,n){return this.getCalculation().createFormula(e,t,n)}evaluate(e,t){return this.getCalculation().evaluate(e,t)}whenCalculationReady(){let e=this._starting;return e?e.then(()=>this.getCalculation().ready()):this.getCalculation().ready()}getScripts(){return this._scripts||=this._createScripts(),this._scripts}getModules(){return this.getScripts().getModules()}_notifyAllChange(){this._emitter.notify(`onSheetsChange`),this._emitter.notify(`onSelectedSheetChange`),this._emitter.notify(`onViewChange`)}addListeners(e,t){return this._emitter.addListeners(e,t)}_sheetToWBEvent(e){let t=this;return n=>{let r=()=>{let e=n.getSource();if(e.isInvalid())return e;if(e.isICellRanges){let n=[...e.getCoords()],r=n.length;for(let t=0;t<r;t++){let r=n[t];!r.scope&&e.getSheet().getName()&&(n[t]={...r,scope:e.getSheet().getName()})}return t.getRanges(n)}if(e.isICellRange){let n=e.getCoords(),r=e.getSheet().getName();return t.getRange({...n,scope:r})}};e({getSource:r,trigger:n.trigger,getFrom:()=>t.getRanges(n.getFrom()),getTo:()=>t.getRange(n.getTo()),isDataChange:n.isDataChange,getTransactionId:n.getTransactionId,isUndo:n.isUndo,toString:()=>`WorkbookRangeEvent: ('${n.trigger}', ${r().toString()})`,timeStamp:Date.now()})}}_fromJSON(t){if(this._emitter.notify(`onBeforeLoad`,{params:t}),this._initState(),!t.sheets||t.sheets.length===0)throw new e.c(e.r(`error.workbook.sheetOne`));t.theme&&(this._theme=new r.it(t.theme),this._styles.setTheme(this._theme));let n=this._strings.beginPersist(),i=this._resources.beginPersist(),a=this._styles.beginPersist();try{n.fromJSON(t.strings),i.fromJSON(t.resources),a.fromJSON(t.styles),t.date1904&&(this._isDate1904=!0),this._codeName=t.codeName??null,this._updateLinks=t.updateLinks??null,t.locale&&(this._locale=t.locale),t.localeOverrides&&(this._localeOverrides=t.localeOverrides),t.view||={};let e=[],o=t.pivotCaches;if(o){let t=i.fromResourceId.bind(i);for(let n=0;n<o.length;n++){let i=o[n];i&&typeof i.cacheId==`number`&&e.push({cacheId:i.cacheId,part:r.ct.fromJSON(i.part,t)})}}this._pivotCaches=e,this._people.fromJSON(t.people);let s=t.sheets,c=s.length,l=t.view.activeSheetId??null;l!==null&&(l=Math.min(Math.max(0,l),c-1));let u=null,d=null;this._isLoadingSheets=!0;for(let e=0;e<c;e++){let t=s[e],n=t.visibility||r.Tt.Visibility.Visible,i=e;d=i,n===r.Tt.Visibility.Visible?u===null&&(u=i):l!==null&&l===i&&(l=null);try{this._createSheet(i,t.name,n,e,t.sheetId,t.sheet)}catch(e){throw this._isLoadingSheets=!1,e}}this._isLoadingSheets=!1,this._updateState({lastId:d}),t.view.activeSheetId=l??u,this.setView(new z({json:t.view})),this._adjustSheetNamesIfRequired(),this._listenerProtection?.();let f=this;this._protection=new B(t?.protection,this._options?.readonly),this._listenerProtection=this._protection.addListeners({onChange:e=>{f._emitter.notify(`onProtectionChange`,{source:e})}}),this._emitter.notify(`onLoad`)}finally{a.endPersist(),i.endPersist(),n.endPersist()}}_createScripts(t){let n=this;return new xe({transactions:this._transactions,json:t,workbook:n,getBuiltInFunctions:()=>n._calculation?.getFunctions(),onAdd:(t,i)=>{let a=n._calculation;a.getStatus()!==r.N.Status.Off&&a.start().then(async()=>{let t=i.getFunctions().getItems({type:`formula`}),n=t.length;for(let r=0;r<n;r++){let n=t[r];try{await this._calculation.getFunctions().add(n)}catch(t){e.J.error(t?.message??String(t),t)}}}).catch(()=>{})},onRemove:(e,t)=>{}})}async toJSON(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));await Promise.resolve(this._starting);let n=this.getCalculation();n.getStatus()!==r.N.Status.Off&&(await n.ready(),await n._whenRequestsSettled?.()),await this._emitter.notify(`onBeforeSave`,{async:!0});let i={sheets:[]},a=t?.ignoreStyles??!1;if(!a){let e=this._theme.toJSON();(e?Object.keys(e).length:0)>0&&(i.theme=e)}if(this._scripts){let e=this._scripts.toJSON();e&&Object.keys(e).length>0&&(i.modules=e)}this._isDate1904&&(i.date1904=!0),this._codeName&&(i.codeName=this._codeName),this._updateLinks&&(i.updateLinks=this._updateLinks),this._locale&&(i.locale=this._locale),this._localeOverrides&&(i.localeOverrides=this._localeOverrides);let o=t?.resources??`embed`,s=o===`ignore`,c=this._strings.beginPersist(),l=s?null:this._resources.beginPersist(),u=this._styles.beginPersist();try{let e=this._getSheetRef(this.getSelectedSheetIndex()).id,n=e,d=null,f=this._getState(),p=f.sheetRefsAll,m=f.sheetsById,h=p.length;for(let a=0;a<h;a++){let o=p[a],s=a+1,c=await m.get(o.id).toJSON(t),l={name:o.name,sheet:c};o.sheetId!==void 0&&(l.sheetId=o.sheetId),o.visibility===r.Tt.Visibility.Visible?d===null&&(d=s):l.visibility=o.visibility,o.id===e&&(n=s),i.sheets.push(l)}if(!a){let e=u.toJSON();e&&Object.keys(e).length>0&&(i.styles=e)}let g=this.getProtection().toJSON();g&&(i.protection=g);let _=this._calculation.toJSON();Object.keys(_).length>0&&(i.calc=_);let v=await c.toJSONAsync();v&&v.length>0&&(i.strings=v);let y=this._calculation.getExternalBooks().toJSON();y&&(i.externalBooks=y);let b=this._pivotCaches;if(b.length>0){let e=l?l.toResourceId.bind(l):()=>null,t=[];for(let n=0;n<b.length;n++){let i={cacheId:b[n].cacheId},a=r.ct.toJSON(b[n].part,e);a&&(i.part=a),t.push(i)}t.length>0&&(i.pivotCaches=t)}let x=this._people.toJSON();if(x&&(i.people=x),!s){let e=await l.toJSONAsync(typeof o==`function`?o:void 0);e&&e.length>0&&(i.resources=e)}let S=this._calculation.getNamedFormulas().toJSON();S&&S.length>0&&(i.names=S);let C=this._view.toJSON();C&&(n===d?delete C.activeSheetId:C.activeSheetId=n,Object.keys(C).length>0&&(i.view=C))}finally{u.endPersist(),s||l.endPersist(),c.endPersist()}return this._emitter.notify(`onSave`,{params:i}),i}isClosed(){return this._closed}close(){if(this._closed)return;this._emitter.notify(`onClose`);let e=this._getState();e.listenersSheets.forEach(e=>{e()}),e.listenersSheets.clear();let t=e.sheetRefsAll;for(let e=t.length-1;e>=0;e--)try{t[e].sheet.close()}catch(e){console.warn(`error on close`,e)}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 f&&this._originProvider.release(),this._closed=!0}beginCommit(t){if(this._closed)throw Error(e.r(`error.workbook.modelClosed`));return this._beginCommit(typeof t==`string`?{description:t}:t)}doBatch(t,n){let r=this;return n=typeof n==`string`?{description:n}:{description:e.q(`op.updateWorkbook`),...n},this._transactions.doBatch(t,n,(e,t)=>{e.getDepth()===0&&(r._lastTransactionUUID=e.getId())})}_beginCommit(e){let t=this;return this._transactions.beginCommit(typeof e==`string`?{description:e}:e,e=>{e.getDepth()===0&&(t._lastTransactionUUID=e.getId())})}_getState(){return this._transactions.getState(this._id)}_updateState(t,n=e.q(`op.updateWorkbook`),r){if(!t)return;let i=this._beginCommit(n);try{i.updateState(this._id,t),i.commit(r)}catch(e){throw i.rollback(),e}}get options(){return this._options}get[Symbol.toStringTag](){return`[Workbook]`}toString(){return`[${this.getName()??`(untitled)`}]`}get isIWorkbook(){return!0}},Z={address:null},Ne=class{constructor(){this._readFormats=[],this._writeFormats=[],this._encryptions=[]}async registerReadFormat(e){this._readFormats=await this._registerFormatType(e,this._readFormats)}async registerWriteFormat(e){this._writeFormats=await this._registerFormatType(e,this._writeFormats)}async registerEncryption(e){if(!e)throw Error(`encryption must be provided.`);if(!e.key)throw Error(`encryption.key must be provided.`);let t=e.key.toLowerCase(),n=this._encryptions.findIndex(e=>e.key.toLowerCase()===t);if(n!==-1){let t=[...this._encryptions];t[n]=e,this._encryptions=Object.freeze(t);return}this._encryptions=Object.freeze([...this._encryptions,e])}async getEncryption(e){return this.peekEncryption(e)}peekEncryption(e){if(!e)return this._encryptions[0]??null;let t=e.toLowerCase();return this._encryptions.find(e=>e.key.toLowerCase()===t)??null}async detectEncryption(e){for(let t of this._encryptions)if(await t.detect(e))return t;return null}async getReadFormats(e){return e?this._filterFormats(e,this._readFormats):[...this._readFormats]}async getWriteFormats(e){return this._writeFormats?e?this._filterFormats(e,this._writeFormats):[...this._writeFormats]:[]}async _registerFormatType(e,t){return this._registerFormatTypeSync(e,t)}_registerFormatTypeSync(e,t){if(!e)throw Error(`format must be provided.`);if(!e.key)throw Error(`format.key must be provided.`);let n=e.key.toLowerCase(),r=t.findIndex(e=>e.key.toLowerCase()===n);if(r!==-1){let n=[...t];return n[r]=e,Object.freeze(n)}return Object.freeze([...t,e])}_filterFormats(e,t,n){if(!e||Object.keys(e).length===0){if(!n)return[...t];e={ext:n}}let r=e.search?.toLocaleLowerCase();return t.filter(t=>{if(r){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);if(!(e||n||i||a||o))return!1}let i=e.ext||n;if(i){let e=i.toLocaleLowerCase();if(!t.exts.some(t=>t.toLocaleLowerCase()===e))return!1}if(e.mimeType&&t.mimeType!==e.mimeType||e.key&&t.key.toLocaleLowerCase()!==e.key.toLocaleLowerCase())return!1;if(e.tags){let n=t.tags||[];if(!(typeof e.tags==`string`?[e.tags]:e.tags).every(e=>n.includes(e)))return!1}return!0})}},Q=new WeakMap,$=e=>!!e&&typeof e==`object`&&typeof e.getPath==`function`&&typeof e.canWrite==`function`,Pe=new class{constructor(){this._setInstalled=new WeakSet,this._backingStore=null,this._emitter=new r.L(this),this._registry=new Ne,this._defaultStore=new m(()=>this.getWriteFormats(),()=>this.getReadFormats())}getBackingStore(){return this._backingStore??this._defaultStore}setBackingStore(e){this._backingStore=e??null}canWrite(){return typeof this.getBackingStore().write==`function`}canRead(){return typeof this.getBackingStore().read==`function`}async install(e){this._setInstalled.has(e)||(await e.register(this._registry),this._setInstalled.add(e))}addListeners(e,t){return this._emitter.addListeners(e,t)}addCommitListener(e){return this._emitter.addListeners({onWrite:(t,n)=>{n.save&&e.onCommit?.({store:n.workbook.getTransactions(),commitId:n.commitId})}})}async getReadFormats(e){return this._registry.getReadFormats(e)}async getWriteFormats(e){return this._registry.getWriteFormats(e)}getOrigin(e){return new s(e)}async read(e){let t=null;if(typeof e==`string`)e={source:e};else if($(e)){let n=e.getPath();if(!n)throw Error(`Cannot read from an unbound origin (no path).`);u(e)?e={source:n,asCopy:!0}:(t=e,e={source:n})}let n=e??{},{source:r=null,...i}=n,a=this.getBackingStore();return(a.read?a:this._defaultStore).read({source:r,options:i,decode:(e,r)=>this._decodeBuffer(e,r,n,t)})}async _decodeBuffer(t,n={},r,i=null){let a=n.format,o=n.ext;if(!a&&!o)throw Error(`Either format or file extension must be provided to determine read type.`);let c=(await this._registry.getReadFormats({search:a,ext:o}))[0];if(!c)throw new e.c(e.r(`error.io.readFormatUnavailable`,{format:a??o}));let l=r?.typedCreateWorkbookOptions,u=l?Object.keys(l).find(e=>e.toLowerCase()===c.key.toLowerCase()):void 0,d={...r,...u===void 0?void 0:l[u]};delete d.typedCreateWorkbookOptions,delete d.source,delete d.asCopy;let f=i??new s(n.absolutePath??null,{name:n.name??null,format:c.key,size:n.size??null,lastModified:n.lastModified??null,canWrite:n.canWrite??!1});i instanceof s&&i.update({format:c.key,size:n.size??null,lastModified:n.lastModified??null}),d.createWorkbookOptions={...d.createWorkbookOptions||{},origin:f},d.readonly!==void 0&&(d.createWorkbookOptions={readonly:d.readonly,...d.createWorkbookOptions},delete d.readonly),d.calcOnly&&(d.createWorkbookOptions={disableLoadAutoFit:!0,...d.createWorkbookOptions});let p=await this._decrypt(t,f,d);if(p===null)return null;t=p.bytes;let m=d?.progress?.onStart?.bind(d.progress);m&&await Promise.resolve(m(f,n.size));try{let e=await this._readArrayBuffer(t,c,d);return p.password!==null&&f.setPassword(p.password),d?.progress?.onComplete?.(f),this._emitter.notify(`onRead`,{params:{workbook:e,origin:f},transactional:!1}),e}catch(e){throw d?.progress?.onError?.(e),d?.progress?.onComplete?.(null),e}}async _decrypt(t,n,r){let i=await this._registry.detectEncryption(t);if(n instanceof s&&n.update({encryption:i?i.key:null}),!i)return{bytes:t,password:null};let a=null,o=async n=>{try{return a=await i.decode(t,n),!0}catch(t){if(!(t instanceof e.s))throw t;return!1}};if(r?.password&&await o(r.password))return{bytes:a,password:r.password};if(!r?.onPassword){let t=n.getName();throw new e.x(t?e.r(`error.io.passwordRequired`,{name:t}):e.r(`error.io.passwordRequiredUnnamed`))}let c=await Promise.resolve(r.onPassword({origin:n,encryption:i.key,validate:o}));if(c==null)return null;if(a!==null||await o(c))return{bytes:a,password:c};throw new e.s(e.r(`error.io.passwordIncorrect`))}async writeArrayBuffer(t,n){if(!n?.format)throw Error(`A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).`);let r=(await this._registry.getWriteFormats({search:n.format}))[0];if(!r)throw new e.c(e.r(`error.io.writeFormatUnavailable`,{format:n.format}));return this._writeArrayBuffer(t,r,n)}async write(e,t,n){return typeof t==`string`||$(t)?this._write(e,t,!1,n):this._write(e,e?.getOrigin?.(),!0,t??n)}async writeAs(e,t,n){if(!t)throw Error(`A target must be provided for writeAs (use write(workbook) for a plain save).`);return this._write(e,t,!0,n)}async _write(t,n,i,a){if(!t)throw Error(`Workbook must be provided.`);if(!t.isIWorkbook)throw Error(`Invalid workbook model provided. Must be an instance of IWorkbook.`);let o,c=typeof n==`string`?this.getOrigin(n):n,l=c.getFormat();if((a?.format||l)&&(o=(await this._registry.getWriteFormats({search:a?.format??l??void 0}))[0]),o||c.getPath()&&c.canWrite()&&c.getExtension()||(o=(await this._registry.getWriteFormats({ext:`sxl`}))[0]??(await this._registry.getWriteFormats())[0]),!o)throw new e.c(e.r(`error.io.writeFormatUnresolved`));let d=c.getExtension();if(a?.format&&d&&c.getPath()&&c.canWrite()&&!o.exts.includes(d)){let t=(await this._registry.getWriteFormats({ext:d}))[0];if(t&&t.key!==o.key){let t=c.getPath().split(/[/\\]/).pop();throw new e.c(e.r(`error.io.writeFormatMismatch`,{format:a.format,file:t}))}}if(typeof n==`string`){let e=c.getPath();c=new s(r.D(e)?e:`${e}.${o.exts[0]}`,{format:o.key})}let f=c.getEncryption(),p=t.getOrigin?.(),m=(c instanceof s?c.getPassword():null)??(p instanceof s?p.getPassword():null),h=c.isEncrypted()||(p?.isEncrypted()??!1),g=a?.password===void 0?m??(h?void 0:null):a.password,_=null;if(g===void 0){if(h){let t=c.getName();throw new e.x(t?e.r(`error.io.passwordRequiredSave`,{name:t}):e.r(`error.io.passwordRequiredSaveUnnamed`))}}else if(g!==null&&(_=await this._registry.getEncryption(f),!_))throw new e.c(e.r(`error.io.encryptionUnavailable`));let v=`${c.getName()??e.r(`workbook.defaultName`)}.${o.exts[0]}`,y=a?.progress,b=!c.getPath()||!c.canWrite()||!!a?.prompt,x=!1,S=this,C=null,w=[],T={workbook:t,format:o,origin:c,suggestedName:v,prompt:a?.prompt,async encode(e,n){let r=n??c;await(async e=>{x||(x=!0,y?.onStart&&await Promise.resolve(y.onStart(e)))})(r),C=t.getTransactions?.()?.getCurrentCommit()??C;let s=e?(await S._registry.getWriteFormats({search:e}))[0]??o:o,l=[],u=((e,t)=>({onStart:e?.onStart?(t,n)=>e.onStart(t,n):void 0,onProgress:e?.onProgress?(t,n)=>e.onProgress(t,n):void 0,onError:e?.onError?t=>e.onError(t):void 0,onComplete:e?.onComplete?t=>e.onComplete(t):void 0,onWarning:(n,r)=>{t.push({message:n??``,context:r}),e?.onWarning?.(n,r)}}))(y,l),d=await S._writeArrayBuffer(t,s,{...a,progress:u}),f=Q.get(r);if(l.some(e=>!f?.has(e.message))&&a?.onWarnings){let e=await Promise.resolve(a.onWarnings({workbook:t,origin:r,warnings:l,save:i,canCancel:!b}));if(!b&&!1===e)return null}return w=l,_?_.encode(d,g):d}},E=null;try{let e=this.getBackingStore();if(!e.write)throw Error(`The active backing store is read-only (no write implementation).`);if(E=await e.write(T),E){if(g!==void 0&&E instanceof s&&(E.setPassword(g),E.update({encryption:_?_.key:null})),w.length){let e=Q.get(E)??new Set;for(let t of w)e.add(t.message);Q.set(E,e)}i&&E!==t.getOrigin()&&u(t.getOrigin())?.setOrigin(E);let e=C??t.getTransactions?.()?.getCurrentCommit()??null;this._emitter.notify(`onWrite`,{params:{workbook:t,origin:E,commitId:e?.getId()??null,save:i},transactional:!1})}y?.onComplete&&await Promise.resolve(y.onComplete(E))}catch(t){let n=t instanceof Error?t:Error(String(t));throw y?.onError&&await Promise.resolve(y.onError(n)),y?.onComplete&&await Promise.resolve(y.onComplete(null)),n instanceof e.c?n:Error(e.r(`error.io.writeFailed`,{reason:n.message}),{cause:t})}return E}_stripExtension(e){let t=r.D(e);return t?e.slice(0,e.length-t.length-1):e}_baseName(e){if(!e)return null;let t=e.split(/[?#]/)[0],n=t.split(/[/\\]/).pop()??t;return this._stripExtension(n)||null}async _writeArrayBuffer(e,t,n){if(!t)throw Error(`A write format must be provided.`);let r=t.handler;if(!r)throw Error(`Unable to resolve a write handler for '${t.key}'.`);return r(e,{...n,format:t.key})}async _readArrayBuffer(t,n,r){if(!t)throw Error(`ArrayBuffer must be specified.`);if(!n)throw Error(`format must be specified.`);if(t.byteLength===0)return new X(r?.createWorkbookOptions);let i,a=n.handler;if(!a)throw Error(`Unable to resolve a read handler for '${n.key}'.`);try{i=await a(t,r)}catch(t){throw t instanceof e.c?t:new e.c(e.r(`error.io.readFailed`,{format:n.description??n.key,reason:t?.message??String(t)}),{cause:t})}return i}get isIWorkbookIO(){return!0}};[`.woff2`,`.woff`,`.ttf`,`.otf`,`.ttc`].map(e=>({suffix:e,place:(e,t)=>t?`${t}/${e}`:e})),Ee||={},De||={},(H=Oe||={}).PathFill={Darken:`darken`,DarkenLess:`darkenLess`,Lighten:`lighten`,LightenLess:`lightenLess`,None:`none`,Normal:`normal`},H.PresetGeometry={Line:`line`,LineInv:`lineInv`,triangle:`triangle`,rtTriangle:`rtTriangle`,Rect:`rect`},Me||={};var Fe=class extends r.gt{constructor(e){super(e)}_initializeOptions(e){return e={...e,coords:{colStart:0,rowStart:0,colEnd:(e?.size?.width??5)-1,rowEnd:(e?.size?.height??5)-1},getRanges:e=>new r.l(null)},super._initializeOptions(e)}};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return`0.8.0-beta.7`}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return Fe}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.loadEnumManifest=async function(){let e=`@0.8.0-beta.
|
|
1
|
+
exports.loadEnumManifest=async function(){let e=`@0.8.0-beta.7`;e!==`@local`&&e!==`@0.0.0`||(e=``);let t=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${e}/types/scripting-enums.json`,n=await fetch(t);if(!n.ok)throw Error(`Unable to load script enum runtime (${n.status}) from ${t}.`);return n.json()};
|