dealpos 25.50.1 → 25.51.0
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/{chunk-HGSF7LOB.js → chunk-27OXTS7Y.js} +1 -1
- package/browser/{chunk-2EP6XDTW.js → chunk-2EHLYOAD.js} +1 -1
- package/browser/{chunk-7HOW5QOQ.js → chunk-2GIDUMXS.js} +1 -1
- package/browser/{chunk-BRNU2JXC.js → chunk-2MAOKHWO.js} +1 -1
- package/browser/{chunk-KVMBRL53.js → chunk-2WSP3Y6V.js} +1 -1
- package/browser/{chunk-HWPSC7RE.js → chunk-3DL5OLEL.js} +1 -1
- package/browser/{chunk-CFWHBIM3.js → chunk-3DUSH3ND.js} +1 -1
- package/browser/{chunk-NOYC5PIT.js → chunk-3FS7DBBR.js} +1 -1
- package/browser/{chunk-5Y24QJWR.js → chunk-3HDEMBWS.js} +1 -1
- package/browser/chunk-3M5FKEPW.js +1 -0
- package/browser/{chunk-O2VVATBW.js → chunk-3MAZIRSX.js} +1 -1
- package/browser/{chunk-CI4ULOBO.js → chunk-3PKJLXTC.js} +1 -1
- package/browser/{chunk-PHH2AA3W.js → chunk-3Q5WV3VF.js} +1 -1
- package/browser/{chunk-CMKONRKZ.js → chunk-3XDE3GJ3.js} +1 -1
- package/browser/{chunk-ZMJLTU5O.js → chunk-3XH2STFE.js} +1 -1
- package/browser/{chunk-26YFRPR2.js → chunk-3ZH3XK5V.js} +1 -1
- package/browser/{chunk-42EJHS3A.js → chunk-43G72GH2.js} +1 -1
- package/browser/{chunk-MLBTUOHX.js → chunk-4467AQLM.js} +1 -1
- package/browser/chunk-4CYACZL5.js +149 -0
- package/browser/{chunk-2MPRVJXH.js → chunk-4HJHXVYF.js} +1 -1
- package/browser/{chunk-S7FOJJP2.js → chunk-4HLKKTIV.js} +1 -1
- package/browser/{chunk-MNJSQKLX.js → chunk-4L4MSVOU.js} +1 -1
- package/browser/{chunk-XLKF6N3S.js → chunk-4MWVPOV6.js} +1 -1
- package/browser/{chunk-FIHBOJV4.js → chunk-4OTZNFYS.js} +1 -1
- package/browser/{chunk-W26SBQKL.js → chunk-57WKDIDF.js} +1 -1
- package/browser/{chunk-OQI4P5JW.js → chunk-5HIJCKLY.js} +1 -1
- package/browser/{chunk-TXJJUZ26.js → chunk-5PDQ5UNO.js} +1 -1
- package/browser/{chunk-FW4OCSXV.js → chunk-5RFSSCAR.js} +1 -1
- package/browser/{chunk-36GWLMZX.js → chunk-5RYL4EJ2.js} +1 -1
- package/browser/{chunk-B36P4U32.js → chunk-5VYU6SHE.js} +1 -1
- package/browser/chunk-5YBSS4EL.js +21 -0
- package/browser/{chunk-HGD6HRSU.js → chunk-5ZPO7V26.js} +1 -1
- package/browser/{chunk-I3SVXKZW.js → chunk-67UFIJ2O.js} +1 -1
- package/browser/{chunk-NEP77MPC.js → chunk-6AHKVKAZ.js} +2 -2
- package/browser/chunk-6F45DEGR.js +136 -0
- package/browser/{chunk-DC3TCY6D.js → chunk-6G7LPAEQ.js} +1 -1
- package/browser/{chunk-NZLZ6H6Q.js → chunk-6GCAXVFO.js} +1 -1
- package/browser/{chunk-7F4QLFQQ.js → chunk-6I2YT4SH.js} +1 -1
- package/browser/{chunk-KAPQ56CY.js → chunk-6LZENMYE.js} +1 -1
- package/browser/{chunk-JIE2RXLX.js → chunk-6O6OE4KQ.js} +14 -14
- package/browser/{chunk-XAT2P7QI.js → chunk-6UY42XOC.js} +1 -1
- package/browser/{chunk-OXWQ7ZZS.js → chunk-6WMEGLEF.js} +1 -1
- package/browser/{chunk-D7DUI5NF.js → chunk-6XNP4ZXB.js} +1 -1
- package/browser/chunk-735YXRQB.js +1 -0
- package/browser/{chunk-OYGBAHVX.js → chunk-73ADHCC2.js} +1 -1
- package/browser/{chunk-QZZ2NRA3.js → chunk-75FYOZH7.js} +1 -1
- package/browser/{chunk-CCD6EYWH.js → chunk-76CUXDTU.js} +1 -1
- package/browser/{chunk-C4M7VQFI.js → chunk-7JBFR3T4.js} +1 -1
- package/browser/{chunk-DWZ5JTI2.js → chunk-7MRUPBXU.js} +1 -1
- package/browser/{chunk-KZFNI67M.js → chunk-7YYWBCWJ.js} +1 -1
- package/browser/{chunk-E4L4PN2C.js → chunk-A2EDYIYP.js} +1 -1
- package/browser/{chunk-PFIN2VSA.js → chunk-A5LIALQE.js} +1 -1
- package/browser/{chunk-QI7I46MV.js → chunk-A7C35XPM.js} +1 -1
- package/browser/{chunk-AQW4VS3Y.js → chunk-ACXQ2FOW.js} +1 -1
- package/browser/{chunk-WMZLH4YK.js → chunk-AHTR7XKG.js} +1 -1
- package/browser/{chunk-XTCEZONP.js → chunk-AJAUI7BA.js} +1 -1
- package/browser/{chunk-6C2HPRJZ.js → chunk-AQKJ3LSN.js} +1 -1
- package/browser/{chunk-RESN2GAB.js → chunk-ARAUAPQU.js} +1 -1
- package/browser/{chunk-3HZIDGPN.js → chunk-AXCTEREY.js} +1 -1
- package/browser/{chunk-SIQZO2WM.js → chunk-B4TZQBTN.js} +1 -1
- package/browser/{chunk-BFTWW3SB.js → chunk-B6TCVVAN.js} +1 -1
- package/browser/{chunk-BT7NN7PT.js → chunk-BAXZ74LK.js} +1 -1
- package/browser/{chunk-KB4247J2.js → chunk-BHQZXJKQ.js} +1 -1
- package/browser/{chunk-TY24TZEK.js → chunk-BVOUQJCA.js} +1 -1
- package/browser/{chunk-RSNEHVIM.js → chunk-C22G4JGX.js} +1 -1
- package/browser/{chunk-4BXCIT62.js → chunk-CCIHCGP5.js} +1 -1
- package/browser/{chunk-FQZELIHB.js → chunk-CERE2LBX.js} +1 -1
- package/browser/{chunk-VOTRMLKO.js → chunk-CRKJEU3Z.js} +1 -1
- package/browser/{chunk-FAED643P.js → chunk-CVN6ZXXJ.js} +1 -1
- package/browser/{chunk-BYTV42NJ.js → chunk-D6HBPIFD.js} +1 -1
- package/browser/{chunk-NYZIEOHQ.js → chunk-D7YMUC3H.js} +1 -1
- package/browser/{chunk-RTYMNLFW.js → chunk-DCONKX6G.js} +1 -1
- package/browser/{chunk-TYE7PH3R.js → chunk-DIWYKKLA.js} +1 -1
- package/browser/{chunk-UU4IU25V.js → chunk-DJUOMCAV.js} +1 -1
- package/browser/{chunk-GWKBJZYT.js → chunk-DODZXMH2.js} +1 -1
- package/browser/{chunk-GTPQNPNO.js → chunk-DSXOFWO7.js} +1 -1
- package/browser/{chunk-XSNUFD7O.js → chunk-DX56EYRS.js} +1 -1
- package/browser/{chunk-VVYRPW2Y.js → chunk-E4AXPU4U.js} +1 -1
- package/browser/{chunk-R2GUMKAU.js → chunk-E634BI4W.js} +1 -1
- package/browser/chunk-ECW7GAZQ.js +1 -0
- package/browser/{chunk-C2NCV7VC.js → chunk-EMH25BNO.js} +1 -1
- package/browser/{chunk-TCUCRGQD.js → chunk-EXFA6B6P.js} +1 -1
- package/browser/{chunk-B5IABJO5.js → chunk-EZNBK62W.js} +3 -3
- package/browser/chunk-F3HDP5CA.js +1 -0
- package/browser/{chunk-IFIH2CE2.js → chunk-F6LSMAF4.js} +1 -1
- package/browser/{chunk-ESDXMFGP.js → chunk-FINTUPRM.js} +1 -1
- package/browser/{chunk-D4FCXEV4.js → chunk-FM7BHGBW.js} +1 -1
- package/browser/{chunk-VZUPDSBH.js → chunk-FMEMQRBJ.js} +1 -1
- package/browser/{chunk-A565EUMD.js → chunk-FVNQ7SQY.js} +1 -1
- package/browser/{chunk-X44CHNHS.js → chunk-FZQE7J2C.js} +1 -1
- package/browser/{chunk-HSIXOQO7.js → chunk-G7L6AVIG.js} +1 -1
- package/browser/{chunk-DTVCBHPA.js → chunk-GFSJZHCB.js} +1 -1
- package/browser/{chunk-QPAUI5EG.js → chunk-GXAF3JUO.js} +1 -1
- package/browser/{chunk-WC6DBADN.js → chunk-H2RXYP7A.js} +1 -1
- package/browser/{chunk-4XJWQAS6.js → chunk-HAXEFEKW.js} +1 -1
- package/browser/{chunk-DMWJZNTI.js → chunk-HHCNN3XR.js} +2 -2
- package/browser/{chunk-RRIGLMUN.js → chunk-HHM4L75O.js} +1 -1
- package/browser/{chunk-JVNUQR5F.js → chunk-HIA4J5DB.js} +1 -1
- package/browser/{chunk-RSDLXHSH.js → chunk-HQGZC4Y3.js} +1 -1
- package/browser/{chunk-467KNI4M.js → chunk-HSLDD424.js} +1 -1
- package/browser/{chunk-SLTQIIWW.js → chunk-HVFYCXLX.js} +1 -1
- package/browser/{chunk-FPRM3L6U.js → chunk-HYCKETL4.js} +1 -1
- package/browser/{chunk-PASO7BB6.js → chunk-HZP6OUOI.js} +1 -1
- package/browser/{chunk-CCWIK546.js → chunk-I7AQHKKG.js} +7 -7
- package/browser/{chunk-4OEDK7YE.js → chunk-IDJEXQ5I.js} +1 -1
- package/browser/{chunk-XMZLK7EB.js → chunk-IDOUPEKS.js} +1 -1
- package/browser/{chunk-H74MLHRV.js → chunk-IET73YWA.js} +1 -1
- package/browser/{chunk-VKWSK452.js → chunk-IEX7S7T7.js} +1 -1
- package/browser/chunk-IHIJW73V.js +1 -0
- package/browser/chunk-IKSROKD5.css +1 -0
- package/browser/{chunk-L5UAK2LQ.js → chunk-IM3B5EF2.js} +1 -1
- package/browser/{chunk-WM2DGNWH.js → chunk-ITTFNOLB.js} +1 -1
- package/browser/{chunk-JXXYVM7W.js → chunk-IZF7S2RF.js} +1 -1
- package/browser/{chunk-C3STDN73.js → chunk-JEZMYDZR.js} +1 -1
- package/browser/{chunk-T4MU3R7Y.js → chunk-JIRDK6TJ.js} +1 -1
- package/browser/chunk-JOLAOKHD.js +21 -0
- package/browser/{chunk-6WATOQG3.js → chunk-JQDS4BXR.js} +1 -1
- package/browser/{chunk-J6M7UWVR.js → chunk-JT4M6AIA.js} +1 -1
- package/browser/{chunk-USD2ALDX.js → chunk-K355XAWO.js} +1 -1
- package/browser/{chunk-WFQIMZGL.js → chunk-KBLVOO4J.js} +1 -1
- package/browser/{chunk-DU2VBWSN.js → chunk-KEILLJ6G.js} +1 -1
- package/browser/{chunk-FHB5KLDR.js → chunk-KFOEUAQT.js} +1 -1
- package/browser/chunk-KOZYTEZI.js +1 -0
- package/browser/{chunk-KUG5VVV4.js → chunk-KRBFME4B.js} +1 -1
- package/browser/chunk-L3U6V3BF.js +5 -0
- package/browser/{chunk-45E6XCHN.js → chunk-LB5UXGDG.js} +1 -1
- package/browser/{chunk-NM3IQUNN.js → chunk-LGD5WUG2.js} +1 -1
- package/browser/{chunk-M4EQZHIE.js → chunk-LKVUZZ5J.js} +1 -1
- package/browser/{chunk-4ZITX27A.js → chunk-LMUFX64W.js} +1 -1
- package/browser/{chunk-53VS5DA7.js → chunk-MM4IJDHI.js} +1 -1
- package/browser/chunk-MTUBVUM5.js +1 -0
- package/browser/{chunk-TRCRCGLM.js → chunk-MUWJSYXR.js} +1 -1
- package/browser/{chunk-LNDHYAFW.js → chunk-MWGICBEB.js} +1 -1
- package/browser/{chunk-ZTD4APMR.js → chunk-N5RDRDT7.js} +1 -1
- package/browser/{chunk-7WB7XD5V.js → chunk-N6EBK52R.js} +3 -3
- package/browser/{chunk-7P3L3ODB.js → chunk-N7OS7SFI.js} +1 -1
- package/browser/{chunk-RACYAEOL.js → chunk-NFWYR26Q.js} +1 -1
- package/browser/{chunk-S27D5MBU.js → chunk-NJ4KEQKH.js} +1 -1
- package/browser/{chunk-A72QOXN4.js → chunk-NQQB5U5S.js} +1 -1
- package/browser/{chunk-ULNAGOA3.js → chunk-NRTKHF45.js} +1 -1
- package/browser/{chunk-72RZBOHX.js → chunk-NS6IC2PT.js} +1 -1
- package/browser/{chunk-BNNKSBQ6.js → chunk-O22HDFH6.js} +1 -1
- package/browser/{chunk-WK7YCGTV.js → chunk-OAVGNXY4.js} +1 -1
- package/browser/{chunk-7YUPYNWQ.js → chunk-OB6KFXD6.js} +2 -2
- package/browser/{chunk-5ZD6KTDH.js → chunk-ODYEJFNJ.js} +1 -1
- package/browser/{chunk-EHXF34TI.js → chunk-OEOAWKXA.js} +1 -1
- package/browser/{chunk-JL4CFBF2.js → chunk-OR4H5IKL.js} +1 -1
- package/browser/chunk-OTLU2WY3.js +3 -0
- package/browser/{chunk-TSH564VU.js → chunk-OUJXEQKL.js} +1 -1
- package/browser/{chunk-VIZOMY6L.js → chunk-OURNAI65.js} +2 -2
- package/browser/chunk-OZ2R2K2V.js +1 -0
- package/browser/{chunk-PRVQ3NAP.js → chunk-P3TFDLWR.js} +2 -2
- package/browser/{chunk-R7KECBQD.js → chunk-P5XKSQ34.js} +1 -1
- package/browser/{chunk-COA4UL2V.js → chunk-P7KMHPVN.js} +1 -1
- package/browser/{chunk-7JULWG2B.js → chunk-PCRUTQ3T.js} +1 -1
- package/browser/{chunk-T7XU5W5A.js → chunk-PNFJVQUF.js} +1 -1
- package/browser/{chunk-ZT57H2NK.js → chunk-PQSGJR4P.js} +1 -1
- package/browser/{chunk-WKM2QOAU.js → chunk-PSFQWURP.js} +1 -1
- package/browser/{chunk-4I3C6CNY.js → chunk-PV27CMZ2.js} +1 -1
- package/browser/{chunk-S3IZOS7R.js → chunk-QERITLZK.js} +2 -2
- package/browser/{chunk-2CL5FM3P.js → chunk-QJ3CWKQT.js} +1 -1
- package/browser/{chunk-PS7477UG.js → chunk-QLSGGWTW.js} +1 -1
- package/browser/{chunk-J36LAI7P.js → chunk-QS2AUXB7.js} +1 -1
- package/browser/{chunk-TEGIL5RZ.js → chunk-QWLNF7VL.js} +1 -1
- package/browser/chunk-R3HIQ5AX.js +1 -0
- package/browser/{chunk-VXTQ5VEM.js → chunk-RF5FWMSR.js} +1 -1
- package/browser/{chunk-JZTKA4ST.js → chunk-RHDU4PR2.js} +1 -1
- package/browser/{chunk-FU2ZGMX4.js → chunk-RIZ4YVMH.js} +1 -1
- package/browser/chunk-RJYFOAYX.js +1 -0
- package/browser/{chunk-TNHTSFQM.js → chunk-RU3GD3GY.js} +1 -1
- package/browser/{chunk-IZLEZJ6U.js → chunk-SCAKRK4B.js} +1 -1
- package/browser/{chunk-THT6CY5E.js → chunk-SCGKVOSE.js} +1 -1
- package/browser/{chunk-HNTY7S25.js → chunk-SCHTN7VQ.js} +1 -1
- package/browser/chunk-SMEVWRVE.js +1 -0
- package/browser/{chunk-TWS5PR4T.js → chunk-SUCJCOST.js} +1 -1
- package/browser/{chunk-B534JAF4.js → chunk-SVUFU2AS.js} +1 -1
- package/browser/{chunk-IKKPP4JS.js → chunk-SWF6XISV.js} +1 -1
- package/browser/{chunk-VVWAYTKN.js → chunk-SWVQK6HM.js} +1 -1
- package/browser/{chunk-7DAPNQYU.js → chunk-SXRKKO75.js} +1 -1
- package/browser/{chunk-OZTSXG5Y.js → chunk-T5IJP474.js} +1 -1
- package/browser/{chunk-PYSTCFF2.js → chunk-T6GXIGYG.js} +1 -1
- package/browser/{chunk-LGOSIAUC.js → chunk-TANYEHMZ.js} +1 -1
- package/browser/chunk-TCW7SVU5.js +22 -0
- package/browser/{chunk-PQ6W7KXC.js → chunk-TDHDQRJN.js} +1 -1
- package/browser/{chunk-EUSVY4UJ.js → chunk-TOJPS7BJ.js} +1 -1
- package/browser/{chunk-6P2ASCNY.js → chunk-TP6ZUC53.js} +1 -1
- package/browser/{chunk-ZKOARDC2.js → chunk-TPJWIEYA.js} +1 -1
- package/browser/{chunk-L6PKNRWO.js → chunk-TRK4LJDS.js} +1 -1
- package/browser/{chunk-32QBWLTN.js → chunk-U4MC22BG.js} +1 -1
- package/browser/{chunk-QJUU75N6.js → chunk-U56LRRCE.js} +1 -1
- package/browser/{chunk-B7AC4RMR.js → chunk-UIVJ2JQT.js} +1 -1
- package/browser/chunk-UMFN4AJF.js +1 -0
- package/browser/{chunk-ZTU3TIGR.js → chunk-UPZZHMG6.js} +1 -1
- package/browser/{chunk-MZITJQAC.js → chunk-UX4QS4XQ.js} +1 -1
- package/browser/{chunk-DIFPP2ZV.js → chunk-V36Z6WRV.js} +1 -1
- package/browser/{chunk-PPVORSJQ.js → chunk-V4LDEQZZ.js} +1 -1
- package/browser/chunk-V4V55JMO.js +1 -0
- package/browser/{chunk-JBS5UYZC.js → chunk-V6D6TV7B.js} +1 -1
- package/browser/{chunk-IGDDA2RG.js → chunk-V6NXOOJA.js} +1 -1
- package/browser/{chunk-REZUKRTR.js → chunk-VA6MHJ5E.js} +1 -1
- package/browser/{chunk-KYXB2UQI.js → chunk-VEQJR5VL.js} +1 -1
- package/browser/{chunk-5USF4MRW.js → chunk-VGHEGWAM.js} +1 -1
- package/browser/{chunk-7BQKGIZM.js → chunk-VL7THV5U.js} +1 -1
- package/browser/{chunk-BEXFUC6A.js → chunk-VOY3BJZP.js} +9 -9
- package/browser/{chunk-OEUCWGFD.js → chunk-VQKO557Q.js} +1 -1
- package/browser/chunk-VRKJC53Z.js +10 -0
- package/browser/{chunk-BKZYMEVP.js → chunk-WFTIOB7Q.js} +1 -1
- package/browser/{chunk-4CPRMZL6.js → chunk-WFVMID6Q.js} +1 -1
- package/browser/{chunk-Z6X5UYRZ.js → chunk-WFWUOLEG.js} +1 -1
- package/browser/{chunk-ARYZHNFV.js → chunk-WGOUSPMF.js} +1 -1
- package/browser/{chunk-3CSCTT6I.js → chunk-WOAKN4QZ.js} +1 -1
- package/browser/chunk-WQMYMJLR.js +4 -0
- package/browser/chunk-WR54IKY6.js +1 -0
- package/browser/{chunk-GDNVMJOU.js → chunk-WSFSSHIX.js} +1 -1
- package/browser/{chunk-ZZBF7AOW.js → chunk-WSWTWRKJ.js} +1 -1
- package/browser/{chunk-COGKLKKE.js → chunk-XEPEGKS2.js} +1 -1
- package/browser/{chunk-7NFGGAUY.js → chunk-XPN6EISF.js} +1 -1
- package/browser/{chunk-XPR2GPHE.js → chunk-XVTXHAKW.js} +1 -1
- package/browser/{chunk-7IKZACPQ.js → chunk-XWV7AI2C.js} +16 -16
- package/browser/{chunk-4W3WYXI2.js → chunk-XWYCNPUZ.js} +1 -1
- package/browser/{chunk-PJ3DTEH2.js → chunk-Y4MERAVA.js} +1 -1
- package/browser/{chunk-363IDTE3.js → chunk-Y7ZKGM5U.js} +1 -1
- package/browser/{chunk-34U6PVY5.js → chunk-YC2LQSY3.js} +1 -1
- package/browser/{chunk-SIDUUVNA.js → chunk-YDL2MTWE.js} +1 -1
- package/browser/{chunk-JTZHHVPI.js → chunk-YMKZUNJH.js} +1 -1
- package/browser/{chunk-VXPORXGI.js → chunk-YQ5PAXUW.js} +1 -1
- package/browser/{chunk-BOQBXDOK.js → chunk-YXRJV3RQ.js} +1 -1
- package/browser/{chunk-C5N3GKEC.js → chunk-Z4WEJMVU.js} +1 -1
- package/browser/{chunk-IISHJIET.js → chunk-Z5BFBI3D.js} +1 -1
- package/browser/{chunk-SLX34TWD.js → chunk-Z76C52NM.js} +1 -1
- package/browser/{chunk-A2EVMYAR.js → chunk-ZBHPM2JC.js} +1 -1
- package/browser/{chunk-WOLF2DPX.js → chunk-ZNJ4JTTS.js} +1 -1
- package/browser/chunk-ZNPC63ZV.js +380 -0
- package/browser/{chunk-BNX6XXDZ.js → chunk-ZO3XZXWW.js} +2 -2
- package/browser/{chunk-LGINK7BD.js → chunk-ZOYWCF3Q.js} +1 -1
- package/browser/{chunk-VZBXT2TV.js → chunk-ZRC22L45.js} +1 -1
- package/browser/{chunk-BQUL7SGN.js → chunk-ZV4K4PP6.js} +3 -3
- package/browser/chunk-ZVWC6CBP.js +1 -0
- package/browser/index.html +2 -2
- package/browser/main-4BFS7RVV.css +1 -0
- package/browser/main-PHIUFC5R.js +3 -0
- package/browser/{styles-URIEURGQ.css → styles-LFDMQGKE.css} +1 -1
- package/package.json +1 -1
- package/browser/chunk-2VE2WNSA.js +0 -21
- package/browser/chunk-33OKCUGA.js +0 -1
- package/browser/chunk-3FAXTVQI.js +0 -3
- package/browser/chunk-4HEJOI53.js +0 -1
- package/browser/chunk-4SRWAPD4.js +0 -1
- package/browser/chunk-6ACGUR3D.js +0 -1
- package/browser/chunk-6DMG2LMI.js +0 -149
- package/browser/chunk-7MCT2FSH.js +0 -4
- package/browser/chunk-CQLZHUT4.js +0 -9
- package/browser/chunk-CUDCXMJN.js +0 -1
- package/browser/chunk-DOCQN2VL.js +0 -1
- package/browser/chunk-DTX2BFBV.js +0 -1
- package/browser/chunk-E2NGOMCD.js +0 -1
- package/browser/chunk-HRM7HE6Z.js +0 -380
- package/browser/chunk-IEVGW2RT.js +0 -5
- package/browser/chunk-JAUNAK7P.js +0 -22
- package/browser/chunk-JB7Y2263.js +0 -1
- package/browser/chunk-M3DKYPGC.js +0 -1
- package/browser/chunk-NBMH5YL2.css +0 -1
- package/browser/chunk-OWS3IW26.js +0 -1
- package/browser/chunk-Q7YUJXQP.js +0 -1
- package/browser/chunk-R4NTCBWJ.js +0 -137
- package/browser/chunk-V432I4ZE.js +0 -21
- package/browser/chunk-VM4K4MNV.js +0 -1
- package/browser/chunk-XY3FCZN2.js +0 -1
- package/browser/chunk-ZCQDZKFQ.js +0 -1
- package/browser/main-EWD2LJE4.js +0 -3
- package/browser/main-WPNH2WGQ.css +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{p as Sa}from"./chunk-TANYEHMZ.js";import{Ab as gi,Ca as Lr,Cb as yi,Ed as vt,Ha as ya,Hb as Es,I as ga,Ib as qt,Id as Ea,Ja as Qa,Jb as Xt,Kb as kr,Rc as Cr,Rd as va,Sa as xa,Vc as Pi,Wb as Qi,Xa as kt,Xb as Fa,Ya as mi,Yb as Ba,c as Ut,d as fa,ib as Nr,jc as xi,kc as Ua,la as Dr,lc as vs,mb as ba,oa as Rr,p as ma,pa as Ii,s as Et}from"./chunk-L3U6V3BF.js";import{a as B,b as J,d as ca,e as Yt,f as Ne,h as we,k as H,l as fi,m as vr,n as Sr,o as wr}from"./chunk-SNAKHGZS.js";var Xi=Ne((Q0,ln)=>{"use strict";ln.exports=function(e){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected a number, got ${typeof e}`);let t=e<0,r=Math.abs(e);if(t&&(r=-r),r===0)return"0 B";let s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(Math.floor(Math.log(r)/Math.log(1024)),s.length-1),a=Number(r/1024**o),n=s[o];return`${a>=10||a%1===0?Math.round(a):a.toFixed(1)} ${n}`}});var un=Ne((x0,dn)=>{"use strict";function pn(i,e){this.text=i=i||"",this.hasWild=~i.indexOf("*"),this.separator=e,this.parts=i.split(e)}pn.prototype.match=function(i){var e=!0,t=this.parts,r,s=t.length,o;if(typeof i=="string"||i instanceof String)if(!this.hasWild&&this.text!=i)e=!1;else{for(o=(i||"").split(this.separator),r=0;e&&r<s;r++)t[r]!=="*"&&(r<o.length?e=t[r]===o[r]:e=!1);e=e&&o}else if(typeof i.splice=="function")for(e=[],r=i.length;r--;)this.match(i[r])&&(e[e.length]=i[r]);else if(typeof i=="object"){e={};for(var a in i)this.match(a)&&(e[a]=i[a])}return e};dn.exports=function(i,e,t){var r=new pn(i,t||/[\/\.]/);return typeof e<"u"?r.match(e):r}});var cn=Ne((b0,hn)=>{var Hd=un(),jd=/[\/\+\.]/;hn.exports=function(i,e){function t(r){var s=Hd(r,i,jd);return s&&s.length>=2}return e?t(e.split(";")[0]):t}});var Jr=Ne((L0,Qn)=>{function Wd(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}Qn.exports=Wd});var bn=Ne((N0,xn)=>{var Yd=typeof global=="object"&&global&&global.Object===Object&&global;xn.exports=Yd});var Ys=Ne((k0,Fn)=>{var qd=bn(),Xd=typeof self=="object"&&self&&self.Object===Object&&self,Kd=qd||Xd||Function("return this")();Fn.exports=Kd});var Un=Ne((C0,Bn)=>{var $d=Ys(),eu=function(){return $d.Date.now()};Bn.exports=eu});var vn=Ne((T0,En)=>{var tu=/\s/;function iu(i){for(var e=i.length;e--&&tu.test(i.charAt(e)););return e}En.exports=iu});var wn=Ne((I0,Sn)=>{var ru=vn(),su=/^\s+/;function ou(i){return i&&i.slice(0,ru(i)+1).replace(su,"")}Sn.exports=ou});var qs=Ne((P0,Dn)=>{var au=Ys(),nu=au.Symbol;Dn.exports=nu});var kn=Ne((_0,Nn)=>{var Rn=qs(),Ln=Object.prototype,lu=Ln.hasOwnProperty,pu=Ln.toString,$i=Rn?Rn.toStringTag:void 0;function du(i){var e=lu.call(i,$i),t=i[$i];try{i[$i]=void 0;var r=!0}catch{}var s=pu.call(i);return r&&(e?i[$i]=t:delete i[$i]),s}Nn.exports=du});var Tn=Ne((V0,Cn)=>{var uu=Object.prototype,hu=uu.toString;function cu(i){return hu.call(i)}Cn.exports=cu});var Vn=Ne((M0,_n)=>{var In=qs(),fu=kn(),mu=Tn(),gu="[object Null]",yu="[object Undefined]",Pn=In?In.toStringTag:void 0;function Qu(i){return i==null?i===void 0?yu:gu:Pn&&Pn in Object(i)?fu(i):mu(i)}_n.exports=Qu});var zn=Ne((z0,Mn)=>{function xu(i){return i!=null&&typeof i=="object"}Mn.exports=xu});var On=Ne((A0,An)=>{var bu=Vn(),Fu=zn(),Bu="[object Symbol]";function Uu(i){return typeof i=="symbol"||Fu(i)&&bu(i)==Bu}An.exports=Uu});var Jn=Ne((O0,jn)=>{var Eu=wn(),Gn=Jr(),vu=On(),Hn=NaN,Su=/^[-+]0x[0-9a-f]+$/i,wu=/^0b[01]+$/i,Du=/^0o[0-7]+$/i,Ru=parseInt;function Lu(i){if(typeof i=="number")return i;if(vu(i))return Hn;if(Gn(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=Gn(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=Eu(i);var t=wu.test(i);return t||Du.test(i)?Ru(i.slice(2),t?2:8):Su.test(i)?Hn:+i}jn.exports=Lu});var Zr=Ne((G0,Wn)=>{var Nu=Jr(),Xs=Un(),Zn=Jn(),ku="Expected a function",Cu=Math.max,Tu=Math.min;function Iu(i,e,t){var r,s,o,a,n,u,f=0,m=!1,c=!1,v=!0;if(typeof i!="function")throw new TypeError(ku);e=Zn(e)||0,Nu(t)&&(m=!!t.leading,c="maxWait"in t,o=c?Cu(Zn(t.maxWait)||0,e):o,v="trailing"in t?!!t.trailing:v);function w(Q){var x=r,U=s;return r=s=void 0,f=Q,a=i.apply(U,x),a}function D(Q){return f=Q,n=setTimeout(W,e),m?w(Q):a}function G(Q){var x=Q-u,U=Q-f,V=e-x;return c?Tu(V,o-U):V}function q(Q){var x=Q-u,U=Q-f;return u===void 0||x>=e||x<0||c&&U>=o}function W(){var Q=Xs();if(q(Q))return te(Q);n=setTimeout(W,G(Q))}function te(Q){return n=void 0,v&&r?w(Q):(r=s=void 0,a)}function j(){n!==void 0&&clearTimeout(n),f=0,r=u=s=n=void 0}function ue(){return n===void 0?a:te(Xs())}function $(){var Q=Xs(),x=q(Q);if(r=arguments,s=this,u=Q,x){if(n===void 0)return D(u);if(c)return clearTimeout(n),n=setTimeout(W,e),w(u)}return n===void 0&&(n=setTimeout(W,e)),a}return $.cancel=j,$.flush=ue,$}Wn.exports=Iu});var qn=Ne((H0,Yn)=>{var Pu=Zr(),_u=Jr(),Vu="Expected a function";function Mu(i,e,t){var r=!0,s=!0;if(typeof i!="function")throw new TypeError(Vu);return _u(t)&&(r="leading"in t?!!t.leading:r,s="trailing"in t?!!t.trailing:s),Pu(i,e,{leading:r,maxWait:e,trailing:s})}Yn.exports=Mu});var Kn=Ne((j0,Xn)=>{Xn.exports=function(){var e={},t=e._fns={};e.emit=function(a,n,u,f,m,c,v){var w=r(a);w.length&&s(a,w,[n,u,f,m,c,v])},e.on=function(a,n){t[a]||(t[a]=[]),t[a].push(n)},e.once=function(a,n){function u(){n.apply(this,arguments),e.off(a,u)}this.on(a,u)},e.off=function(a,n){var u=[];if(a&&n){var f=this._fns[a],m=0,c=f?f.length:0;for(m;m<c;m++)f[m]!==n&&u.push(f[m])}u.length?this._fns[a]=u:delete this._fns[a]};function r(o){var a=t[o]?t[o]:[],n=o.indexOf(":"),u=n===-1?[o]:[o.substring(0,n),o.substring(n+1)],f=Object.keys(t),m=0,c=f.length;for(m;m<c;m++){var v=f[m];if(v==="*"&&(a=a.concat(t[v])),u.length===2&&u[0]===v){a=a.concat(t[v]);break}}return a}function s(o,a,n){var u=0,f=a.length;for(u;u<f&&a[u];u++)a[u].event=o,a[u].apply(a[u],n)}return e}});var $e=Ne((Fm,Yr)=>{(function(){"use strict";var i={}.hasOwnProperty;function e(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=r(s,t(a)))}return s}function t(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return e.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)i.call(s,a)&&s[a]&&(o=r(o,a));return o}function r(s,o){return o?s?s+" "+o:s+o:s}typeof Yr<"u"&&Yr.exports?(e.default=e,Yr.exports=e):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return e}):window.classNames=e})()});var gl=Ne((tg,ao)=>{"use strict";var oh=Object.prototype.hasOwnProperty,et="~";function er(){}Object.create&&(er.prototype=Object.create(null),new er().__proto__||(et=!1));function ah(i,e,t){this.fn=i,this.context=e,this.once=t||!1}function ml(i,e,t,r,s){if(typeof t!="function")throw new TypeError("The listener must be a function");var o=new ah(t,r||i,s),a=et?et+e:e;return i._events[a]?i._events[a].fn?i._events[a]=[i._events[a],o]:i._events[a].push(o):(i._events[a]=o,i._eventsCount++),i}function Xr(i,e){--i._eventsCount===0?i._events=new er:delete i._events[e]}function Ke(){this._events=new er,this._eventsCount=0}Ke.prototype.eventNames=function(){var e=[],t,r;if(this._eventsCount===0)return e;for(r in t=this._events)oh.call(t,r)&&e.push(et?r.slice(1):r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};Ke.prototype.listeners=function(e){var t=et?et+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var s=0,o=r.length,a=new Array(o);s<o;s++)a[s]=r[s].fn;return a};Ke.prototype.listenerCount=function(e){var t=et?et+e:e,r=this._events[t];return r?r.fn?1:r.length:0};Ke.prototype.emit=function(e,t,r,s,o,a){var n=et?et+e:e;if(!this._events[n])return!1;var u=this._events[n],f=arguments.length,m,c;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),f){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,s),!0;case 5:return u.fn.call(u.context,t,r,s,o),!0;case 6:return u.fn.call(u.context,t,r,s,o,a),!0}for(c=1,m=new Array(f-1);c<f;c++)m[c-1]=arguments[c];u.fn.apply(u.context,m)}else{var v=u.length,w;for(c=0;c<v;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),f){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,s);break;default:if(!m)for(w=1,m=new Array(f-1);w<f;w++)m[w-1]=arguments[w];u[c].fn.apply(u[c].context,m)}}return!0};Ke.prototype.on=function(e,t,r){return ml(this,e,t,r,!1)};Ke.prototype.once=function(e,t,r){return ml(this,e,t,r,!0)};Ke.prototype.removeListener=function(e,t,r,s){var o=et?et+e:e;if(!this._events[o])return this;if(!t)return Xr(this,o),this;var a=this._events[o];if(a.fn)a.fn===t&&(!s||a.once)&&(!r||a.context===r)&&Xr(this,o);else{for(var n=0,u=[],f=a.length;n<f;n++)(a[n].fn!==t||s&&!a[n].once||r&&a[n].context!==r)&&u.push(a[n]);u.length?this._events[o]=u.length===1?u[0]:u:Xr(this,o)}return this};Ke.prototype.removeAllListeners=function(e){var t;return e?(t=et?et+e:e,this._events[t]&&Xr(this,t)):(this._events=new er,this._eventsCount=0),this};Ke.prototype.off=Ke.prototype.removeListener;Ke.prototype.addListener=Ke.prototype.on;Ke.prefixed=et;Ke.EventEmitter=Ke;typeof ao<"u"&&(ao.exports=Ke)});var Mp=Ne((qo,Xo)=>{(function(i,e){typeof qo=="object"&&typeof Xo<"u"?Xo.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.Compressor=e())})(qo,function(){"use strict";function i(T,E){var N=Object.keys(T);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(T);E&&(k=k.filter(function(P){return Object.getOwnPropertyDescriptor(T,P).enumerable})),N.push.apply(N,k)}return N}function e(T){for(var E=1;E<arguments.length;E++){var N=arguments[E]!=null?arguments[E]:{};E%2?i(Object(N),!0).forEach(function(k){o(T,k,N[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(N)):i(Object(N)).forEach(function(k){Object.defineProperty(T,k,Object.getOwnPropertyDescriptor(N,k))})}return T}function t(T,E){if(!(T instanceof E))throw new TypeError("Cannot call a class as a function")}function r(T,E){for(var N=0;N<E.length;N++){var k=E[N];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(T,u(k.key),k)}}function s(T,E,N){return E&&r(T.prototype,E),N&&r(T,N),Object.defineProperty(T,"prototype",{writable:!1}),T}function o(T,E,N){return E=u(E),E in T?Object.defineProperty(T,E,{value:N,enumerable:!0,configurable:!0,writable:!0}):T[E]=N,T}function a(){return a=Object.assign?Object.assign.bind():function(T){for(var E=1;E<arguments.length;E++){var N=arguments[E];for(var k in N)Object.prototype.hasOwnProperty.call(N,k)&&(T[k]=N[k])}return T},a.apply(this,arguments)}function n(T,E){if(typeof T!="object"||T===null)return T;var N=T[Symbol.toPrimitive];if(N!==void 0){var k=N.call(T,E||"default");if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(T)}function u(T){var E=n(T,"string");return typeof E=="symbol"?E:String(E)}var f={exports:{}};(function(T){typeof window>"u"||(function(E){var N=E.HTMLCanvasElement&&E.HTMLCanvasElement.prototype,k=E.Blob&&(function(){try{return!!new Blob}catch{return!1}})(),P=k&&E.Uint8Array&&(function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}})(),M=E.BlobBuilder||E.WebKitBlobBuilder||E.MozBlobBuilder||E.MSBlobBuilder,re=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,Z=(k||M)&&E.atob&&E.ArrayBuffer&&E.Uint8Array&&function(X){var ee,ae,oe,se,ge,O,he,ce,Ye;if(ee=X.match(re),!ee)throw new Error("invalid data URI");for(ae=ee[2]?ee[1]:"text/plain"+(ee[3]||";charset=US-ASCII"),oe=!!ee[4],se=X.slice(ee[0].length),oe?ge=atob(se):ge=decodeURIComponent(se),O=new ArrayBuffer(ge.length),he=new Uint8Array(O),ce=0;ce<ge.length;ce+=1)he[ce]=ge.charCodeAt(ce);return k?new Blob([P?he:O],{type:ae}):(Ye=new M,Ye.append(O),Ye.getBlob(ae))};E.HTMLCanvasElement&&!N.toBlob&&(N.mozGetAsFile?N.toBlob=function(X,ee,ae){var oe=this;setTimeout(function(){ae&&N.toDataURL&&Z?X(Z(oe.toDataURL(ee,ae))):X(oe.mozGetAsFile("blob",ee))})}:N.toDataURL&&Z&&(N.msToBlob?N.toBlob=function(X,ee,ae){var oe=this;setTimeout(function(){(ee&&ee!=="image/png"||ae)&&N.toDataURL&&Z?X(Z(oe.toDataURL(ee,ae))):X(oe.msToBlob(ee))})}:N.toBlob=function(X,ee,ae){var oe=this;setTimeout(function(){X(Z(oe.toDataURL(ee,ae)))})})),T.exports?T.exports=Z:E.dataURLtoBlob=Z})(window)})(f);var m=f.exports,c=function(E){return typeof Blob>"u"?!1:E instanceof Blob||Object.prototype.toString.call(E)==="[object Blob]"},v={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},w=typeof window<"u"&&typeof window.document<"u",D=w?window:{},G=function(E){return E>0&&E<1/0},q=Array.prototype.slice;function W(T){return Array.from?Array.from(T):q.call(T)}var te=/^image\/.+$/;function j(T){return te.test(T)}function ue(T){var E=j(T)?T.substr(6):"";return E==="jpeg"&&(E="jpg"),".".concat(E)}var $=String.fromCharCode;function Q(T,E,N){var k="",P;for(N+=E,P=E;P<N;P+=1)k+=$(T.getUint8(P));return k}var x=D.btoa;function U(T,E){for(var N=[],k=8192,P=new Uint8Array(T);P.length>0;)N.push($.apply(null,W(P.subarray(0,k)))),P=P.subarray(k);return"data:".concat(E,";base64,").concat(x(N.join("")))}function V(T){var E=new DataView(T),N;try{var k,P,M;if(E.getUint8(0)===255&&E.getUint8(1)===216)for(var re=E.byteLength,Z=2;Z+1<re;){if(E.getUint8(Z)===255&&E.getUint8(Z+1)===225){P=Z;break}Z+=1}if(P){var X=P+4,ee=P+10;if(Q(E,X,4)==="Exif"){var ae=E.getUint16(ee);if(k=ae===18761,(k||ae===19789)&&E.getUint16(ee+2,k)===42){var oe=E.getUint32(ee+4,k);oe>=8&&(M=ee+oe)}}}if(M){var se=E.getUint16(M,k),ge,O;for(O=0;O<se;O+=1)if(ge=M+O*12+2,E.getUint16(ge,k)===274){ge+=8,N=E.getUint16(ge,k),E.setUint16(ge,1,k);break}}}catch{N=1}return N}function A(T){var E=0,N=1,k=1;switch(T){case 2:N=-1;break;case 3:E=-180;break;case 4:k=-1;break;case 5:E=90,k=-1;break;case 6:E=90;break;case 7:E=90,N=-1;break;case 8:E=-90;break}return{rotate:E,scaleX:N,scaleY:k}}var Y=/\.\d*(?:0|9){12}\d*$/;function me(T){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Y.test(T)?Math.round(T*E)/E:T}function Ee(T){var E=T.aspectRatio,N=T.height,k=T.width,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",M=G(k),re=G(N);if(M&&re){var Z=N*E;(P==="contain"||P==="none")&&Z>k||P==="cover"&&Z<k?N=k/E:k=N*E}else M?N=k/E:re&&(k=N*E);return{width:k,height:N}}function Te(T){for(var E=W(new Uint8Array(T)),N=E.length,k=[],P=0;P+3<N;){var M=E[P],re=E[P+1];if(M===255&&re===218)break;if(M===255&&re===216)P+=2;else{var Z=E[P+2]*256+E[P+3],X=P+Z+2,ee=E.slice(P,X);k.push(ee),P=X}}return k.reduce(function(ae,oe){return oe[0]===255&&oe[1]===225?ae.concat(oe):ae},[])}function le(T,E){var N=W(new Uint8Array(T));if(N[2]!==255||N[3]!==224)return T;var k=N[4]*256+N[5],P=[255,216].concat(E,N.slice(4+k));return new Uint8Array(P)}var xe=D.ArrayBuffer,ie=D.FileReader,pe=D.URL||D.webkitURL,ne=/\.\w+$/,de=D.Compressor,K=(function(){function T(E,N){t(this,T),this.file=E,this.exif=[],this.image=new Image,this.options=e(e({},v),N),this.aborted=!1,this.result=null,this.init()}return s(T,[{key:"init",value:function(){var N=this,k=this.file,P=this.options;if(!c(k)){this.fail(new Error("The first argument must be a File or Blob object."));return}var M=k.type;if(!j(M)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!pe||!ie){this.fail(new Error("The current browser does not support image compression."));return}xe||(P.checkOrientation=!1,P.retainExif=!1);var re=M==="image/jpeg",Z=re&&P.checkOrientation,X=re&&P.retainExif;if(pe&&!Z&&!X)this.load({url:pe.createObjectURL(k)});else{var ee=new ie;this.reader=ee,ee.onload=function(ae){var oe=ae.target,se=oe.result,ge={},O=1;Z&&(O=V(se),O>1&&a(ge,A(O))),X&&(N.exif=Te(se)),Z||X?!pe||O>1?ge.url=U(se,M):ge.url=pe.createObjectURL(k):ge.url=se,N.load(ge)},ee.onabort=function(){N.fail(new Error("Aborted to read the image with FileReader."))},ee.onerror=function(){N.fail(new Error("Failed to read the image with FileReader."))},ee.onloadend=function(){N.reader=null},Z||X?ee.readAsArrayBuffer(k):ee.readAsDataURL(k)}}},{key:"load",value:function(N){var k=this,P=this.file,M=this.image;M.onload=function(){k.draw(e(e({},N),{},{naturalWidth:M.naturalWidth,naturalHeight:M.naturalHeight}))},M.onabort=function(){k.fail(new Error("Aborted to load the image."))},M.onerror=function(){k.fail(new Error("Failed to load the image."))},D.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(D.navigator.userAgent)&&(M.crossOrigin="anonymous"),M.alt=P.name,M.src=N.url}},{key:"draw",value:function(N){var k=this,P=N.naturalWidth,M=N.naturalHeight,re=N.rotate,Z=re===void 0?0:re,X=N.scaleX,ee=X===void 0?1:X,ae=N.scaleY,oe=ae===void 0?1:ae,se=this.file,ge=this.image,O=this.options,he=document.createElement("canvas"),ce=he.getContext("2d"),Ye=Math.abs(Z)%180===90,We=(O.resize==="contain"||O.resize==="cover")&&G(O.width)&&G(O.height),it=Math.max(O.maxWidth,0)||1/0,De=Math.max(O.maxHeight,0)||1/0,Ae=Math.max(O.minWidth,0)||0,Re=Math.max(O.minHeight,0)||0,ke=P/M,ve=O.width,Ie=O.height;if(Ye){var It=[De,it];it=It[0],De=It[1];var dt=[Re,Ae];Ae=dt[0],Re=dt[1];var qe=[Ie,ve];ve=qe[0],Ie=qe[1]}We&&(ke=ve/Ie);var xt=Ee({aspectRatio:ke,width:it,height:De},"contain");it=xt.width,De=xt.height;var Gt=Ee({aspectRatio:ke,width:Ae,height:Re},"cover");if(Ae=Gt.width,Re=Gt.height,We){var fe=Ee({aspectRatio:ke,width:ve,height:Ie},O.resize);ve=fe.width,Ie=fe.height}else{var Ni=Ee({aspectRatio:ke,width:ve,height:Ie}),pi=Ni.width;ve=pi===void 0?P:pi;var bt=Ni.height;Ie=bt===void 0?M:bt}ve=Math.floor(me(Math.min(Math.max(ve,Ae),it))),Ie=Math.floor(me(Math.min(Math.max(Ie,Re),De)));var xs=-ve/2,Pt=-Ie/2,Xe=ve,bs=Ie,di=[];if(We){var Ce=0,Se=0,ki=P,Ft=M,Fr=Ee({aspectRatio:ke,width:P,height:M},{contain:"cover",cover:"contain"}[O.resize]);ki=Fr.width,Ft=Fr.height,Ce=(P-ki)/2,Se=(M-Ft)/2,di.push(Ce,Se,ki,Ft)}if(di.push(xs,Pt,Xe,bs),Ye){var ft=[Ie,ve];ve=ft[0],Ie=ft[1]}he.width=ve,he.height=Ie,j(O.mimeType)||(O.mimeType=se.type);var Br="transparent";se.size>O.convertSize&&O.convertTypes.indexOf(O.mimeType)>=0&&(O.mimeType="image/jpeg");var Pe=O.mimeType==="image/jpeg";if(Pe&&(Br="#fff"),ce.fillStyle=Br,ce.fillRect(0,0,ve,Ie),O.beforeDraw&&O.beforeDraw.call(this,ce,he),!this.aborted&&(ce.save(),ce.translate(ve/2,Ie/2),ce.rotate(Z*Math.PI/180),ce.scale(ee,oe),ce.drawImage.apply(ce,[ge].concat(di)),ce.restore(),O.drew&&O.drew.call(this,ce,he),!this.aborted)){var ot=function(jt){if(!k.aborted){var ui=function(_t){return k.done({naturalWidth:P,naturalHeight:M,result:_t})};if(jt&&Pe&&O.retainExif&&k.exif&&k.exif.length>0){var hi=function(_t){return ui(m(U(le(_t,k.exif),O.mimeType)))};if(jt.arrayBuffer)jt.arrayBuffer().then(hi).catch(function(){k.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var ut=new ie;k.reader=ut,ut.onload=function(Ci){var _t=Ci.target;hi(_t.result)},ut.onabort=function(){k.fail(new Error("Aborted to read the compressed image with FileReader."))},ut.onerror=function(){k.fail(new Error("Failed to read the compressed image with FileReader."))},ut.onloadend=function(){k.reader=null},ut.readAsArrayBuffer(jt)}}else ui(jt)}};he.toBlob?he.toBlob(ot,O.mimeType,O.quality):ot(m(he.toDataURL(O.mimeType,O.quality)))}}},{key:"done",value:function(N){var k=N.naturalWidth,P=N.naturalHeight,M=N.result,re=this.file,Z=this.image,X=this.options;if(pe&&Z.src.indexOf("blob:")===0&&pe.revokeObjectURL(Z.src),M)if(X.strict&&!X.retainExif&&M.size>re.size&&X.mimeType===re.type&&!(X.width>k||X.height>P||X.minWidth>k||X.minHeight>P||X.maxWidth<k||X.maxHeight<P))M=re;else{var ee=new Date;M.lastModified=ee.getTime(),M.lastModifiedDate=ee,M.name=re.name,M.name&&M.type!==re.type&&(M.name=M.name.replace(ne,ue(M.type)))}else M=re;this.result=M,X.success&&X.success.call(this,M)}},{key:"fail",value:function(N){var k=this.options;if(k.error)k.error.call(this,N);else throw N}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=de,T}},{key:"setDefaults",value:function(N){a(v,N)}}]),T})();return K})});var Gp=Ne(($o,ea)=>{(function(i,e){typeof $o=="object"&&typeof ea<"u"?ea.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.Cropper=e())})($o,function(){"use strict";function i(g,p){var h=Object.keys(g);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(g);p&&(d=d.filter(function(F){return Object.getOwnPropertyDescriptor(g,F).enumerable})),h.push.apply(h,d)}return h}function e(g){for(var p=1;p<arguments.length;p++){var h=arguments[p]!=null?arguments[p]:{};p%2?i(Object(h),!0).forEach(function(d){u(g,d,h[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(d){Object.defineProperty(g,d,Object.getOwnPropertyDescriptor(h,d))})}return g}function t(g,p){if(typeof g!="object"||!g)return g;var h=g[Symbol.toPrimitive];if(h!==void 0){var d=h.call(g,p||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(g)}function r(g){var p=t(g,"string");return typeof p=="symbol"?p:p+""}function s(g){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},s(g)}function o(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function a(g,p){for(var h=0;h<p.length;h++){var d=p[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,r(d.key),d)}}function n(g,p,h){return p&&a(g.prototype,p),h&&a(g,h),Object.defineProperty(g,"prototype",{writable:!1}),g}function u(g,p,h){return p=r(p),p in g?Object.defineProperty(g,p,{value:h,enumerable:!0,configurable:!0,writable:!0}):g[p]=h,g}function f(g){return m(g)||c(g)||v(g)||D()}function m(g){if(Array.isArray(g))return w(g)}function c(g){if(typeof Symbol<"u"&&g[Symbol.iterator]!=null||g["@@iterator"]!=null)return Array.from(g)}function v(g,p){if(g){if(typeof g=="string")return w(g,p);var h=Object.prototype.toString.call(g).slice(8,-1);if(h==="Object"&&g.constructor&&(h=g.constructor.name),h==="Map"||h==="Set")return Array.from(g);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return w(g,p)}}function w(g,p){(p==null||p>g.length)&&(p=g.length);for(var h=0,d=new Array(p);h<p;h++)d[h]=g[h];return d}function D(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var G=typeof window<"u"&&typeof window.document<"u",q=G?window:{},W=G&&q.document.documentElement?"ontouchstart"in q.document.documentElement:!1,te=G?"PointerEvent"in q:!1,j="cropper",ue="all",$="crop",Q="move",x="zoom",U="e",V="w",A="s",Y="n",me="ne",Ee="nw",Te="se",le="sw",xe="".concat(j,"-crop"),ie="".concat(j,"-disabled"),pe="".concat(j,"-hidden"),ne="".concat(j,"-hide"),de="".concat(j,"-invisible"),K="".concat(j,"-modal"),T="".concat(j,"-move"),E="".concat(j,"Action"),N="".concat(j,"Preview"),k="crop",P="move",M="none",re="crop",Z="cropend",X="cropmove",ee="cropstart",ae="dblclick",oe=W?"touchstart":"mousedown",se=W?"touchmove":"mousemove",ge=W?"touchend touchcancel":"mouseup",O=te?"pointerdown":oe,he=te?"pointermove":se,ce=te?"pointerup pointercancel":ge,Ye="ready",We="resize",it="wheel",De="zoom",Ae="image/jpeg",Re=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ke=/^data:/,ve=/^data:image\/jpeg;base64,/,Ie=/^img|canvas$/i,It=200,dt=100,qe={viewMode:0,dragMode:k,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:It,minContainerHeight:dt,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},xt='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',Gt=Number.isNaN||q.isNaN;function fe(g){return typeof g=="number"&&!Gt(g)}var Ni=function(p){return p>0&&p<1/0};function pi(g){return typeof g>"u"}function bt(g){return s(g)==="object"&&g!==null}var xs=Object.prototype.hasOwnProperty;function Pt(g){if(!bt(g))return!1;try{var p=g.constructor,h=p.prototype;return p&&h&&xs.call(h,"isPrototypeOf")}catch{return!1}}function Xe(g){return typeof g=="function"}var bs=Array.prototype.slice;function di(g){return Array.from?Array.from(g):bs.call(g)}function Ce(g,p){return g&&Xe(p)&&(Array.isArray(g)||fe(g.length)?di(g).forEach(function(h,d){p.call(g,h,d,g)}):bt(g)&&Object.keys(g).forEach(function(h){p.call(g,g[h],h,g)})),g}var Se=Object.assign||function(p){for(var h=arguments.length,d=new Array(h>1?h-1:0),F=1;F<h;F++)d[F-1]=arguments[F];return bt(p)&&d.length>0&&d.forEach(function(y){bt(y)&&Object.keys(y).forEach(function(b){p[b]=y[b]})}),p},ki=/\.\d*(?:0|9){12}\d*$/;function Ft(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return ki.test(g)?Math.round(g*p)/p:g}var Fr=/^width|height|left|top|marginLeft|marginTop$/;function ft(g,p){var h=g.style;Ce(p,function(d,F){Fr.test(F)&&fe(d)&&(d="".concat(d,"px")),h[F]=d})}function Br(g,p){return g.classList?g.classList.contains(p):g.className.indexOf(p)>-1}function Pe(g,p){if(p){if(fe(g.length)){Ce(g,function(d){Pe(d,p)});return}if(g.classList){g.classList.add(p);return}var h=g.className.trim();h?h.indexOf(p)<0&&(g.className="".concat(h," ").concat(p)):g.className=p}}function ot(g,p){if(p){if(fe(g.length)){Ce(g,function(h){ot(h,p)});return}if(g.classList){g.classList.remove(p);return}g.className.indexOf(p)>=0&&(g.className=g.className.replace(p,""))}}function Ht(g,p,h){if(p){if(fe(g.length)){Ce(g,function(d){Ht(d,p,h)});return}h?Pe(g,p):ot(g,p)}}var jt=/([a-z\d])([A-Z])/g;function ui(g){return g.replace(jt,"$1-$2").toLowerCase()}function hi(g,p){return bt(g[p])?g[p]:g.dataset?g.dataset[p]:g.getAttribute("data-".concat(ui(p)))}function ut(g,p,h){bt(h)?g[p]=h:g.dataset?g.dataset[p]=h:g.setAttribute("data-".concat(ui(p)),h)}function Ci(g,p){if(bt(g[p]))try{delete g[p]}catch{g[p]=void 0}else if(g.dataset)try{delete g.dataset[p]}catch{g.dataset[p]=void 0}else g.removeAttribute("data-".concat(ui(p)))}var _t=/\s\s*/,ra=(function(){var g=!1;if(G){var p=!1,h=function(){},d=Object.defineProperty({},"once",{get:function(){return g=!0,p},set:function(y){p=y}});q.addEventListener("test",h,d),q.removeEventListener("test",h,d)}return g})();function mt(g,p,h){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},F=h;p.trim().split(_t).forEach(function(y){if(!ra){var b=g.listeners;b&&b[y]&&b[y][h]&&(F=b[y][h],delete b[y][h],Object.keys(b[y]).length===0&&delete b[y],Object.keys(b).length===0&&delete g.listeners)}g.removeEventListener(y,F,d)})}function ht(g,p,h){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},F=h;p.trim().split(_t).forEach(function(y){if(d.once&&!ra){var b=g.listeners,S=b===void 0?{}:b;F=function(){delete S[y][h],g.removeEventListener(y,F,d);for(var C=arguments.length,R=new Array(C),L=0;L<C;L++)R[L]=arguments[L];h.apply(g,R)},S[y]||(S[y]={}),S[y][h]&&g.removeEventListener(y,S[y][h],d),S[y][h]=F,g.listeners=S}g.addEventListener(y,F,d)})}function ci(g,p,h){var d;return Xe(Event)&&Xe(CustomEvent)?d=new CustomEvent(p,{detail:h,bubbles:!0,cancelable:!0}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(p,!0,!0,h)),g.dispatchEvent(d)}function sa(g){var p=g.getBoundingClientRect();return{left:p.left+(window.pageXOffset-document.documentElement.clientLeft),top:p.top+(window.pageYOffset-document.documentElement.clientTop)}}var Fs=q.location,ed=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function oa(g){var p=g.match(ed);return p!==null&&(p[1]!==Fs.protocol||p[2]!==Fs.hostname||p[3]!==Fs.port)}function aa(g){var p="timestamp=".concat(new Date().getTime());return g+(g.indexOf("?")===-1?"?":"&")+p}function Ti(g){var p=g.rotate,h=g.scaleX,d=g.scaleY,F=g.translateX,y=g.translateY,b=[];fe(F)&&F!==0&&b.push("translateX(".concat(F,"px)")),fe(y)&&y!==0&&b.push("translateY(".concat(y,"px)")),fe(p)&&p!==0&&b.push("rotate(".concat(p,"deg)")),fe(h)&&h!==1&&b.push("scaleX(".concat(h,")")),fe(d)&&d!==1&&b.push("scaleY(".concat(d,")"));var S=b.length?b.join(" "):"none";return{WebkitTransform:S,msTransform:S,transform:S}}function td(g){var p=e({},g),h=0;return Ce(g,function(d,F){delete p[F],Ce(p,function(y){var b=Math.abs(d.startX-y.startX),S=Math.abs(d.startY-y.startY),_=Math.abs(d.endX-y.endX),C=Math.abs(d.endY-y.endY),R=Math.sqrt(b*b+S*S),L=Math.sqrt(_*_+C*C),I=(L-R)/R;Math.abs(I)>Math.abs(h)&&(h=I)})}),h}function Ur(g,p){var h=g.pageX,d=g.pageY,F={endX:h,endY:d};return p?F:e({startX:h,startY:d},F)}function id(g){var p=0,h=0,d=0;return Ce(g,function(F){var y=F.startX,b=F.startY;p+=y,h+=b,d+=1}),p/=d,h/=d,{pageX:p,pageY:h}}function Vt(g){var p=g.aspectRatio,h=g.height,d=g.width,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",y=Ni(d),b=Ni(h);if(y&&b){var S=h*p;F==="contain"&&S>d||F==="cover"&&S<d?h=d/p:d=h*p}else y?h=d/p:b&&(d=h*p);return{width:d,height:h}}function rd(g){var p=g.width,h=g.height,d=g.degree;if(d=Math.abs(d)%180,d===90)return{width:h,height:p};var F=d%90*Math.PI/180,y=Math.sin(F),b=Math.cos(F),S=p*b+h*y,_=p*y+h*b;return d>90?{width:_,height:S}:{width:S,height:_}}function sd(g,p,h,d){var F=p.aspectRatio,y=p.naturalWidth,b=p.naturalHeight,S=p.rotate,_=S===void 0?0:S,C=p.scaleX,R=C===void 0?1:C,L=p.scaleY,I=L===void 0?1:L,Qe=h.aspectRatio,ye=h.naturalWidth,Le=h.naturalHeight,be=d.fillColor,Oe=be===void 0?"transparent":be,He=d.imageSmoothingEnabled,Ve=He===void 0?!0:He,Lt=d.imageSmoothingQuality,at=Lt===void 0?"low":Lt,z=d.maxWidth,Fe=z===void 0?1/0:z,Ge=d.maxHeight,ct=Ge===void 0?1/0:Ge,Nt=d.minWidth,Jt=Nt===void 0?0:Nt,Zt=d.minHeight,Mt=Zt===void 0?0:Zt,Bt=document.createElement("canvas"),rt=Bt.getContext("2d"),Wt=Vt({aspectRatio:Qe,width:Fe,height:ct}),Er=Vt({aspectRatio:Qe,width:Jt,height:Mt},"cover"),Bs=Math.min(Wt.width,Math.max(Er.width,ye)),Us=Math.min(Wt.height,Math.max(Er.height,Le)),pa=Vt({aspectRatio:F,width:Fe,height:ct}),da=Vt({aspectRatio:F,width:Jt,height:Mt},"cover"),ua=Math.min(pa.width,Math.max(da.width,y)),ha=Math.min(pa.height,Math.max(da.height,b)),Qd=[-ua/2,-ha/2,ua,ha];return Bt.width=Ft(Bs),Bt.height=Ft(Us),rt.fillStyle=Oe,rt.fillRect(0,0,Bs,Us),rt.save(),rt.translate(Bs/2,Us/2),rt.rotate(_*Math.PI/180),rt.scale(R,I),rt.imageSmoothingEnabled=Ve,rt.imageSmoothingQuality=at,rt.drawImage.apply(rt,[g].concat(f(Qd.map(function(xd){return Math.floor(Ft(xd))})))),rt.restore(),Bt}var na=String.fromCharCode;function od(g,p,h){var d="";h+=p;for(var F=p;F<h;F+=1)d+=na(g.getUint8(F));return d}var ad=/^data:.*,/;function nd(g){var p=g.replace(ad,""),h=atob(p),d=new ArrayBuffer(h.length),F=new Uint8Array(d);return Ce(F,function(y,b){F[b]=h.charCodeAt(b)}),d}function ld(g,p){for(var h=[],d=8192,F=new Uint8Array(g);F.length>0;)h.push(na.apply(null,di(F.subarray(0,d)))),F=F.subarray(d);return"data:".concat(p,";base64,").concat(btoa(h.join("")))}function pd(g){var p=new DataView(g),h;try{var d,F,y;if(p.getUint8(0)===255&&p.getUint8(1)===216)for(var b=p.byteLength,S=2;S+1<b;){if(p.getUint8(S)===255&&p.getUint8(S+1)===225){F=S;break}S+=1}if(F){var _=F+4,C=F+10;if(od(p,_,4)==="Exif"){var R=p.getUint16(C);if(d=R===18761,(d||R===19789)&&p.getUint16(C+2,d)===42){var L=p.getUint32(C+4,d);L>=8&&(y=C+L)}}}if(y){var I=p.getUint16(y,d),Qe,ye;for(ye=0;ye<I;ye+=1)if(Qe=y+ye*12+2,p.getUint16(Qe,d)===274){Qe+=8,h=p.getUint16(Qe,d),p.setUint16(Qe,1,d);break}}}catch{h=1}return h}function dd(g){var p=0,h=1,d=1;switch(g){case 2:h=-1;break;case 3:p=-180;break;case 4:d=-1;break;case 5:p=90,d=-1;break;case 6:p=90;break;case 7:p=90,h=-1;break;case 8:p=-90;break}return{rotate:p,scaleX:h,scaleY:d}}var ud={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var p=this.element,h=this.options,d=this.container,F=this.cropper,y=Number(h.minContainerWidth),b=Number(h.minContainerHeight);Pe(F,pe),ot(p,pe);var S={width:Math.max(d.offsetWidth,y>=0?y:It),height:Math.max(d.offsetHeight,b>=0?b:dt)};this.containerData=S,ft(F,{width:S.width,height:S.height}),Pe(p,pe),ot(F,pe)},initCanvas:function(){var p=this.containerData,h=this.imageData,d=this.options.viewMode,F=Math.abs(h.rotate)%180===90,y=F?h.naturalHeight:h.naturalWidth,b=F?h.naturalWidth:h.naturalHeight,S=y/b,_=p.width,C=p.height;p.height*S>p.width?d===3?_=p.height*S:C=p.width/S:d===3?C=p.width/S:_=p.height*S;var R={aspectRatio:S,naturalWidth:y,naturalHeight:b,width:_,height:C};this.canvasData=R,this.limited=d===1||d===2,this.limitCanvas(!0,!0),R.width=Math.min(Math.max(R.width,R.minWidth),R.maxWidth),R.height=Math.min(Math.max(R.height,R.minHeight),R.maxHeight),R.left=(p.width-R.width)/2,R.top=(p.height-R.height)/2,R.oldLeft=R.left,R.oldTop=R.top,this.initialCanvasData=Se({},R)},limitCanvas:function(p,h){var d=this.options,F=this.containerData,y=this.canvasData,b=this.cropBoxData,S=d.viewMode,_=y.aspectRatio,C=this.cropped&&b;if(p){var R=Number(d.minCanvasWidth)||0,L=Number(d.minCanvasHeight)||0;S>1?(R=Math.max(R,F.width),L=Math.max(L,F.height),S===3&&(L*_>R?R=L*_:L=R/_)):S>0&&(R?R=Math.max(R,C?b.width:0):L?L=Math.max(L,C?b.height:0):C&&(R=b.width,L=b.height,L*_>R?R=L*_:L=R/_));var I=Vt({aspectRatio:_,width:R,height:L});R=I.width,L=I.height,y.minWidth=R,y.minHeight=L,y.maxWidth=1/0,y.maxHeight=1/0}if(h)if(S>(C?0:1)){var Qe=F.width-y.width,ye=F.height-y.height;y.minLeft=Math.min(0,Qe),y.minTop=Math.min(0,ye),y.maxLeft=Math.max(0,Qe),y.maxTop=Math.max(0,ye),C&&this.limited&&(y.minLeft=Math.min(b.left,b.left+(b.width-y.width)),y.minTop=Math.min(b.top,b.top+(b.height-y.height)),y.maxLeft=b.left,y.maxTop=b.top,S===2&&(y.width>=F.width&&(y.minLeft=Math.min(0,Qe),y.maxLeft=Math.max(0,Qe)),y.height>=F.height&&(y.minTop=Math.min(0,ye),y.maxTop=Math.max(0,ye))))}else y.minLeft=-y.width,y.minTop=-y.height,y.maxLeft=F.width,y.maxTop=F.height},renderCanvas:function(p,h){var d=this.canvasData,F=this.imageData;if(h){var y=rd({width:F.naturalWidth*Math.abs(F.scaleX||1),height:F.naturalHeight*Math.abs(F.scaleY||1),degree:F.rotate||0}),b=y.width,S=y.height,_=d.width*(b/d.naturalWidth),C=d.height*(S/d.naturalHeight);d.left-=(_-d.width)/2,d.top-=(C-d.height)/2,d.width=_,d.height=C,d.aspectRatio=b/S,d.naturalWidth=b,d.naturalHeight=S,this.limitCanvas(!0,!1)}(d.width>d.maxWidth||d.width<d.minWidth)&&(d.left=d.oldLeft),(d.height>d.maxHeight||d.height<d.minHeight)&&(d.top=d.oldTop),d.width=Math.min(Math.max(d.width,d.minWidth),d.maxWidth),d.height=Math.min(Math.max(d.height,d.minHeight),d.maxHeight),this.limitCanvas(!1,!0),d.left=Math.min(Math.max(d.left,d.minLeft),d.maxLeft),d.top=Math.min(Math.max(d.top,d.minTop),d.maxTop),d.oldLeft=d.left,d.oldTop=d.top,ft(this.canvas,Se({width:d.width,height:d.height},Ti({translateX:d.left,translateY:d.top}))),this.renderImage(p),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(p){var h=this.canvasData,d=this.imageData,F=d.naturalWidth*(h.width/h.naturalWidth),y=d.naturalHeight*(h.height/h.naturalHeight);Se(d,{width:F,height:y,left:(h.width-F)/2,top:(h.height-y)/2}),ft(this.image,Se({width:d.width,height:d.height},Ti(Se({translateX:d.left,translateY:d.top},d)))),p&&this.output()},initCropBox:function(){var p=this.options,h=this.canvasData,d=p.aspectRatio||p.initialAspectRatio,F=Number(p.autoCropArea)||.8,y={width:h.width,height:h.height};d&&(h.height*d>h.width?y.height=y.width/d:y.width=y.height*d),this.cropBoxData=y,this.limitCropBox(!0,!0),y.width=Math.min(Math.max(y.width,y.minWidth),y.maxWidth),y.height=Math.min(Math.max(y.height,y.minHeight),y.maxHeight),y.width=Math.max(y.minWidth,y.width*F),y.height=Math.max(y.minHeight,y.height*F),y.left=h.left+(h.width-y.width)/2,y.top=h.top+(h.height-y.height)/2,y.oldLeft=y.left,y.oldTop=y.top,this.initialCropBoxData=Se({},y)},limitCropBox:function(p,h){var d=this.options,F=this.containerData,y=this.canvasData,b=this.cropBoxData,S=this.limited,_=d.aspectRatio;if(p){var C=Number(d.minCropBoxWidth)||0,R=Number(d.minCropBoxHeight)||0,L=S?Math.min(F.width,y.width,y.width+y.left,F.width-y.left):F.width,I=S?Math.min(F.height,y.height,y.height+y.top,F.height-y.top):F.height;C=Math.min(C,F.width),R=Math.min(R,F.height),_&&(C&&R?R*_>C?R=C/_:C=R*_:C?R=C/_:R&&(C=R*_),I*_>L?I=L/_:L=I*_),b.minWidth=Math.min(C,L),b.minHeight=Math.min(R,I),b.maxWidth=L,b.maxHeight=I}h&&(S?(b.minLeft=Math.max(0,y.left),b.minTop=Math.max(0,y.top),b.maxLeft=Math.min(F.width,y.left+y.width)-b.width,b.maxTop=Math.min(F.height,y.top+y.height)-b.height):(b.minLeft=0,b.minTop=0,b.maxLeft=F.width-b.width,b.maxTop=F.height-b.height))},renderCropBox:function(){var p=this.options,h=this.containerData,d=this.cropBoxData;(d.width>d.maxWidth||d.width<d.minWidth)&&(d.left=d.oldLeft),(d.height>d.maxHeight||d.height<d.minHeight)&&(d.top=d.oldTop),d.width=Math.min(Math.max(d.width,d.minWidth),d.maxWidth),d.height=Math.min(Math.max(d.height,d.minHeight),d.maxHeight),this.limitCropBox(!1,!0),d.left=Math.min(Math.max(d.left,d.minLeft),d.maxLeft),d.top=Math.min(Math.max(d.top,d.minTop),d.maxTop),d.oldLeft=d.left,d.oldTop=d.top,p.movable&&p.cropBoxMovable&&ut(this.face,E,d.width>=h.width&&d.height>=h.height?Q:ue),ft(this.cropBox,Se({width:d.width,height:d.height},Ti({translateX:d.left,translateY:d.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ci(this.element,re,this.getData())}},hd={initPreview:function(){var p=this.element,h=this.crossOrigin,d=this.options.preview,F=h?this.crossOriginUrl:this.url,y=p.alt||"The image to preview",b=document.createElement("img");if(h&&(b.crossOrigin=h),b.src=F,b.alt=y,this.viewBox.appendChild(b),this.viewBoxImage=b,!!d){var S=d;typeof d=="string"?S=p.ownerDocument.querySelectorAll(d):d.querySelector&&(S=[d]),this.previews=S,Ce(S,function(_){var C=document.createElement("img");ut(_,N,{width:_.offsetWidth,height:_.offsetHeight,html:_.innerHTML}),h&&(C.crossOrigin=h),C.src=F,C.alt=y,C.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',_.innerHTML="",_.appendChild(C)})}},resetPreview:function(){Ce(this.previews,function(p){var h=hi(p,N);ft(p,{width:h.width,height:h.height}),p.innerHTML=h.html,Ci(p,N)})},preview:function(){var p=this.imageData,h=this.canvasData,d=this.cropBoxData,F=d.width,y=d.height,b=p.width,S=p.height,_=d.left-h.left-p.left,C=d.top-h.top-p.top;!this.cropped||this.disabled||(ft(this.viewBoxImage,Se({width:b,height:S},Ti(Se({translateX:-_,translateY:-C},p)))),Ce(this.previews,function(R){var L=hi(R,N),I=L.width,Qe=L.height,ye=I,Le=Qe,be=1;F&&(be=I/F,Le=y*be),y&&Le>Qe&&(be=Qe/y,ye=F*be,Le=Qe),ft(R,{width:ye,height:Le}),ft(R.getElementsByTagName("img")[0],Se({width:b*be,height:S*be},Ti(Se({translateX:-_*be,translateY:-C*be},p))))}))}},cd={bind:function(){var p=this.element,h=this.options,d=this.cropper;Xe(h.cropstart)&&ht(p,ee,h.cropstart),Xe(h.cropmove)&&ht(p,X,h.cropmove),Xe(h.cropend)&&ht(p,Z,h.cropend),Xe(h.crop)&&ht(p,re,h.crop),Xe(h.zoom)&&ht(p,De,h.zoom),ht(d,O,this.onCropStart=this.cropStart.bind(this)),h.zoomable&&h.zoomOnWheel&&ht(d,it,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),h.toggleDragModeOnDblclick&&ht(d,ae,this.onDblclick=this.dblclick.bind(this)),ht(p.ownerDocument,he,this.onCropMove=this.cropMove.bind(this)),ht(p.ownerDocument,ce,this.onCropEnd=this.cropEnd.bind(this)),h.responsive&&ht(window,We,this.onResize=this.resize.bind(this))},unbind:function(){var p=this.element,h=this.options,d=this.cropper;Xe(h.cropstart)&&mt(p,ee,h.cropstart),Xe(h.cropmove)&&mt(p,X,h.cropmove),Xe(h.cropend)&&mt(p,Z,h.cropend),Xe(h.crop)&&mt(p,re,h.crop),Xe(h.zoom)&&mt(p,De,h.zoom),mt(d,O,this.onCropStart),h.zoomable&&h.zoomOnWheel&&mt(d,it,this.onWheel,{passive:!1,capture:!0}),h.toggleDragModeOnDblclick&&mt(d,ae,this.onDblclick),mt(p.ownerDocument,he,this.onCropMove),mt(p.ownerDocument,ce,this.onCropEnd),h.responsive&&mt(window,We,this.onResize)}},fd={resize:function(){if(!this.disabled){var p=this.options,h=this.container,d=this.containerData,F=h.offsetWidth/d.width,y=h.offsetHeight/d.height,b=Math.abs(F-1)>Math.abs(y-1)?F:y;if(b!==1){var S,_;p.restore&&(S=this.getCanvasData(),_=this.getCropBoxData()),this.render(),p.restore&&(this.setCanvasData(Ce(S,function(C,R){S[R]=C*b})),this.setCropBoxData(Ce(_,function(C,R){_[R]=C*b})))}}},dblclick:function(){this.disabled||this.options.dragMode===M||this.setDragMode(Br(this.dragBox,xe)?P:k)},wheel:function(p){var h=this,d=Number(this.options.wheelZoomRatio)||.1,F=1;this.disabled||(p.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){h.wheeling=!1},50),p.deltaY?F=p.deltaY>0?1:-1:p.wheelDelta?F=-p.wheelDelta/120:p.detail&&(F=p.detail>0?1:-1),this.zoom(-F*d,p)))},cropStart:function(p){var h=p.buttons,d=p.button;if(!(this.disabled||(p.type==="mousedown"||p.type==="pointerdown"&&p.pointerType==="mouse")&&(fe(h)&&h!==1||fe(d)&&d!==0||p.ctrlKey))){var F=this.options,y=this.pointers,b;p.changedTouches?Ce(p.changedTouches,function(S){y[S.identifier]=Ur(S)}):y[p.pointerId||0]=Ur(p),Object.keys(y).length>1&&F.zoomable&&F.zoomOnTouch?b=x:b=hi(p.target,E),Re.test(b)&&ci(this.element,ee,{originalEvent:p,action:b})!==!1&&(p.preventDefault(),this.action=b,this.cropping=!1,b===$&&(this.cropping=!0,Pe(this.dragBox,K)))}},cropMove:function(p){var h=this.action;if(!(this.disabled||!h)){var d=this.pointers;p.preventDefault(),ci(this.element,X,{originalEvent:p,action:h})!==!1&&(p.changedTouches?Ce(p.changedTouches,function(F){Se(d[F.identifier]||{},Ur(F,!0))}):Se(d[p.pointerId||0]||{},Ur(p,!0)),this.change(p))}},cropEnd:function(p){if(!this.disabled){var h=this.action,d=this.pointers;p.changedTouches?Ce(p.changedTouches,function(F){delete d[F.identifier]}):delete d[p.pointerId||0],h&&(p.preventDefault(),Object.keys(d).length||(this.action=""),this.cropping&&(this.cropping=!1,Ht(this.dragBox,K,this.cropped&&this.options.modal)),ci(this.element,Z,{originalEvent:p,action:h}))}}},md={change:function(p){var h=this.options,d=this.canvasData,F=this.containerData,y=this.cropBoxData,b=this.pointers,S=this.action,_=h.aspectRatio,C=y.left,R=y.top,L=y.width,I=y.height,Qe=C+L,ye=R+I,Le=0,be=0,Oe=F.width,He=F.height,Ve=!0,Lt;!_&&p.shiftKey&&(_=L&&I?L/I:1),this.limited&&(Le=y.minLeft,be=y.minTop,Oe=Le+Math.min(F.width,d.width,d.left+d.width),He=be+Math.min(F.height,d.height,d.top+d.height));var at=b[Object.keys(b)[0]],z={x:at.endX-at.startX,y:at.endY-at.startY},Fe=function(ct){switch(ct){case U:Qe+z.x>Oe&&(z.x=Oe-Qe);break;case V:C+z.x<Le&&(z.x=Le-C);break;case Y:R+z.y<be&&(z.y=be-R);break;case A:ye+z.y>He&&(z.y=He-ye);break}};switch(S){case ue:C+=z.x,R+=z.y;break;case U:if(z.x>=0&&(Qe>=Oe||_&&(R<=be||ye>=He))){Ve=!1;break}Fe(U),L+=z.x,L<0&&(S=V,L=-L,C-=L),_&&(I=L/_,R+=(y.height-I)/2);break;case Y:if(z.y<=0&&(R<=be||_&&(C<=Le||Qe>=Oe))){Ve=!1;break}Fe(Y),I-=z.y,R+=z.y,I<0&&(S=A,I=-I,R-=I),_&&(L=I*_,C+=(y.width-L)/2);break;case V:if(z.x<=0&&(C<=Le||_&&(R<=be||ye>=He))){Ve=!1;break}Fe(V),L-=z.x,C+=z.x,L<0&&(S=U,L=-L,C-=L),_&&(I=L/_,R+=(y.height-I)/2);break;case A:if(z.y>=0&&(ye>=He||_&&(C<=Le||Qe>=Oe))){Ve=!1;break}Fe(A),I+=z.y,I<0&&(S=Y,I=-I,R-=I),_&&(L=I*_,C+=(y.width-L)/2);break;case me:if(_){if(z.y<=0&&(R<=be||Qe>=Oe)){Ve=!1;break}Fe(Y),I-=z.y,R+=z.y,L=I*_}else Fe(Y),Fe(U),z.x>=0?Qe<Oe?L+=z.x:z.y<=0&&R<=be&&(Ve=!1):L+=z.x,z.y<=0?R>be&&(I-=z.y,R+=z.y):(I-=z.y,R+=z.y);L<0&&I<0?(S=le,I=-I,L=-L,R-=I,C-=L):L<0?(S=Ee,L=-L,C-=L):I<0&&(S=Te,I=-I,R-=I);break;case Ee:if(_){if(z.y<=0&&(R<=be||C<=Le)){Ve=!1;break}Fe(Y),I-=z.y,R+=z.y,L=I*_,C+=y.width-L}else Fe(Y),Fe(V),z.x<=0?C>Le?(L-=z.x,C+=z.x):z.y<=0&&R<=be&&(Ve=!1):(L-=z.x,C+=z.x),z.y<=0?R>be&&(I-=z.y,R+=z.y):(I-=z.y,R+=z.y);L<0&&I<0?(S=Te,I=-I,L=-L,R-=I,C-=L):L<0?(S=me,L=-L,C-=L):I<0&&(S=le,I=-I,R-=I);break;case le:if(_){if(z.x<=0&&(C<=Le||ye>=He)){Ve=!1;break}Fe(V),L-=z.x,C+=z.x,I=L/_}else Fe(A),Fe(V),z.x<=0?C>Le?(L-=z.x,C+=z.x):z.y>=0&&ye>=He&&(Ve=!1):(L-=z.x,C+=z.x),z.y>=0?ye<He&&(I+=z.y):I+=z.y;L<0&&I<0?(S=me,I=-I,L=-L,R-=I,C-=L):L<0?(S=Te,L=-L,C-=L):I<0&&(S=Ee,I=-I,R-=I);break;case Te:if(_){if(z.x>=0&&(Qe>=Oe||ye>=He)){Ve=!1;break}Fe(U),L+=z.x,I=L/_}else Fe(A),Fe(U),z.x>=0?Qe<Oe?L+=z.x:z.y>=0&&ye>=He&&(Ve=!1):L+=z.x,z.y>=0?ye<He&&(I+=z.y):I+=z.y;L<0&&I<0?(S=Ee,I=-I,L=-L,R-=I,C-=L):L<0?(S=le,L=-L,C-=L):I<0&&(S=me,I=-I,R-=I);break;case Q:this.move(z.x,z.y),Ve=!1;break;case x:this.zoom(td(b),p),Ve=!1;break;case $:if(!z.x||!z.y){Ve=!1;break}Lt=sa(this.cropper),C=at.startX-Lt.left,R=at.startY-Lt.top,L=y.minWidth,I=y.minHeight,z.x>0?S=z.y>0?Te:me:z.x<0&&(C-=L,S=z.y>0?le:Ee),z.y<0&&(R-=I),this.cropped||(ot(this.cropBox,pe),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}Ve&&(y.width=L,y.height=I,y.left=C,y.top=R,this.action=S,this.renderCropBox()),Ce(b,function(Ge){Ge.startX=Ge.endX,Ge.startY=Ge.endY})}},gd={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Pe(this.dragBox,K),ot(this.cropBox,pe),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Se({},this.initialImageData),this.canvasData=Se({},this.initialCanvasData),this.cropBoxData=Se({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Se(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ot(this.dragBox,K),Pe(this.cropBox,pe)),this},replace:function(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&p&&(this.isImg&&(this.element.src=p),h?(this.url=p,this.image.src=p,this.ready&&(this.viewBoxImage.src=p,Ce(this.previews,function(d){d.getElementsByTagName("img")[0].src=p}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(p))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ot(this.cropper,ie)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Pe(this.cropper,ie)),this},destroy:function(){var p=this.element;return p[j]?(p[j]=void 0,this.isImg&&this.replaced&&(p.src=this.originalUrl),this.uncreate(),this):this},move:function(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p,d=this.canvasData,F=d.left,y=d.top;return this.moveTo(pi(p)?p:F+Number(p),pi(h)?h:y+Number(h))},moveTo:function(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p,d=this.canvasData,F=!1;return p=Number(p),h=Number(h),this.ready&&!this.disabled&&this.options.movable&&(fe(p)&&(d.left=p,F=!0),fe(h)&&(d.top=h,F=!0),F&&this.renderCanvas(!0)),this},zoom:function(p,h){var d=this.canvasData;return p=Number(p),p<0?p=1/(1-p):p=1+p,this.zoomTo(d.width*p/d.naturalWidth,null,h)},zoomTo:function(p,h,d){var F=this.options,y=this.canvasData,b=y.width,S=y.height,_=y.naturalWidth,C=y.naturalHeight;if(p=Number(p),p>=0&&this.ready&&!this.disabled&&F.zoomable){var R=_*p,L=C*p;if(ci(this.element,De,{ratio:p,oldRatio:b/_,originalEvent:d})===!1)return this;if(d){var I=this.pointers,Qe=sa(this.cropper),ye=I&&Object.keys(I).length?id(I):{pageX:d.pageX,pageY:d.pageY};y.left-=(R-b)*((ye.pageX-Qe.left-y.left)/b),y.top-=(L-S)*((ye.pageY-Qe.top-y.top)/S)}else Pt(h)&&fe(h.x)&&fe(h.y)?(y.left-=(R-b)*((h.x-y.left)/b),y.top-=(L-S)*((h.y-y.top)/S)):(y.left-=(R-b)/2,y.top-=(L-S)/2);y.width=R,y.height=L,this.renderCanvas(!0)}return this},rotate:function(p){return this.rotateTo((this.imageData.rotate||0)+Number(p))},rotateTo:function(p){return p=Number(p),fe(p)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=p%360,this.renderCanvas(!0,!0)),this},scaleX:function(p){var h=this.imageData.scaleY;return this.scale(p,fe(h)?h:1)},scaleY:function(p){var h=this.imageData.scaleX;return this.scale(fe(h)?h:1,p)},scale:function(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p,d=this.imageData,F=!1;return p=Number(p),h=Number(h),this.ready&&!this.disabled&&this.options.scalable&&(fe(p)&&(d.scaleX=p,F=!0),fe(h)&&(d.scaleY=h,F=!0),F&&this.renderCanvas(!0,!0)),this},getData:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,h=this.options,d=this.imageData,F=this.canvasData,y=this.cropBoxData,b;if(this.ready&&this.cropped){b={x:y.left-F.left,y:y.top-F.top,width:y.width,height:y.height};var S=d.width/d.naturalWidth;if(Ce(b,function(R,L){b[L]=R/S}),p){var _=Math.round(b.y+b.height),C=Math.round(b.x+b.width);b.x=Math.round(b.x),b.y=Math.round(b.y),b.width=C-b.x,b.height=_-b.y}}else b={x:0,y:0,width:0,height:0};return h.rotatable&&(b.rotate=d.rotate||0),h.scalable&&(b.scaleX=d.scaleX||1,b.scaleY=d.scaleY||1),b},setData:function(p){var h=this.options,d=this.imageData,F=this.canvasData,y={};if(this.ready&&!this.disabled&&Pt(p)){var b=!1;h.rotatable&&fe(p.rotate)&&p.rotate!==d.rotate&&(d.rotate=p.rotate,b=!0),h.scalable&&(fe(p.scaleX)&&p.scaleX!==d.scaleX&&(d.scaleX=p.scaleX,b=!0),fe(p.scaleY)&&p.scaleY!==d.scaleY&&(d.scaleY=p.scaleY,b=!0)),b&&this.renderCanvas(!0,!0);var S=d.width/d.naturalWidth;fe(p.x)&&(y.left=p.x*S+F.left),fe(p.y)&&(y.top=p.y*S+F.top),fe(p.width)&&(y.width=p.width*S),fe(p.height)&&(y.height=p.height*S),this.setCropBoxData(y)}return this},getContainerData:function(){return this.ready?Se({},this.containerData):{}},getImageData:function(){return this.sized?Se({},this.imageData):{}},getCanvasData:function(){var p=this.canvasData,h={};return this.ready&&Ce(["left","top","width","height","naturalWidth","naturalHeight"],function(d){h[d]=p[d]}),h},setCanvasData:function(p){var h=this.canvasData,d=h.aspectRatio;return this.ready&&!this.disabled&&Pt(p)&&(fe(p.left)&&(h.left=p.left),fe(p.top)&&(h.top=p.top),fe(p.width)?(h.width=p.width,h.height=p.width/d):fe(p.height)&&(h.height=p.height,h.width=p.height*d),this.renderCanvas(!0)),this},getCropBoxData:function(){var p=this.cropBoxData,h;return this.ready&&this.cropped&&(h={left:p.left,top:p.top,width:p.width,height:p.height}),h||{}},setCropBoxData:function(p){var h=this.cropBoxData,d=this.options.aspectRatio,F,y;return this.ready&&this.cropped&&!this.disabled&&Pt(p)&&(fe(p.left)&&(h.left=p.left),fe(p.top)&&(h.top=p.top),fe(p.width)&&p.width!==h.width&&(F=!0,h.width=p.width),fe(p.height)&&p.height!==h.height&&(y=!0,h.height=p.height),d&&(F?h.height=h.width/d:y&&(h.width=h.height*d)),this.renderCropBox()),this},getCroppedCanvas:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var h=this.canvasData,d=sd(this.image,this.imageData,h,p);if(!this.cropped)return d;var F=this.getData(p.rounded),y=F.x,b=F.y,S=F.width,_=F.height,C=d.width/Math.floor(h.naturalWidth);C!==1&&(y*=C,b*=C,S*=C,_*=C);var R=S/_,L=Vt({aspectRatio:R,width:p.maxWidth||1/0,height:p.maxHeight||1/0}),I=Vt({aspectRatio:R,width:p.minWidth||0,height:p.minHeight||0},"cover"),Qe=Vt({aspectRatio:R,width:p.width||(C!==1?d.width:S),height:p.height||(C!==1?d.height:_)}),ye=Qe.width,Le=Qe.height;ye=Math.min(L.width,Math.max(I.width,ye)),Le=Math.min(L.height,Math.max(I.height,Le));var be=document.createElement("canvas"),Oe=be.getContext("2d");be.width=Ft(ye),be.height=Ft(Le),Oe.fillStyle=p.fillColor||"transparent",Oe.fillRect(0,0,ye,Le);var He=p.imageSmoothingEnabled,Ve=He===void 0?!0:He,Lt=p.imageSmoothingQuality;Oe.imageSmoothingEnabled=Ve,Lt&&(Oe.imageSmoothingQuality=Lt);var at=d.width,z=d.height,Fe=y,Ge=b,ct,Nt,Jt,Zt,Mt,Bt;Fe<=-S||Fe>at?(Fe=0,ct=0,Jt=0,Mt=0):Fe<=0?(Jt=-Fe,Fe=0,ct=Math.min(at,S+Fe),Mt=ct):Fe<=at&&(Jt=0,ct=Math.min(S,at-Fe),Mt=ct),ct<=0||Ge<=-_||Ge>z?(Ge=0,Nt=0,Zt=0,Bt=0):Ge<=0?(Zt=-Ge,Ge=0,Nt=Math.min(z,_+Ge),Bt=Nt):Ge<=z&&(Zt=0,Nt=Math.min(_,z-Ge),Bt=Nt);var rt=[Fe,Ge,ct,Nt];if(Mt>0&&Bt>0){var Wt=ye/S;rt.push(Jt*Wt,Zt*Wt,Mt*Wt,Bt*Wt)}return Oe.drawImage.apply(Oe,[d].concat(f(rt.map(function(Er){return Math.floor(Ft(Er))})))),be},setAspectRatio:function(p){var h=this.options;return!this.disabled&&!pi(p)&&(h.aspectRatio=Math.max(0,p)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(p){var h=this.options,d=this.dragBox,F=this.face;if(this.ready&&!this.disabled){var y=p===k,b=h.movable&&p===P;p=y||b?p:M,h.dragMode=p,ut(d,E,p),Ht(d,xe,y),Ht(d,T,b),h.cropBoxMovable||(ut(F,E,p),Ht(F,xe,y),Ht(F,T,b))}return this}},yd=q.Cropper,la=(function(){function g(p){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(o(this,g),!p||!Ie.test(p.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=p,this.options=Se({},qe,Pt(h)&&h),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return n(g,[{key:"init",value:function(){var h=this.element,d=h.tagName.toLowerCase(),F;if(!h[j]){if(h[j]=this,d==="img"){if(this.isImg=!0,F=h.getAttribute("src")||"",this.originalUrl=F,!F)return;F=h.src}else d==="canvas"&&window.HTMLCanvasElement&&(F=h.toDataURL());this.load(F)}}},{key:"load",value:function(h){var d=this;if(h){this.url=h,this.imageData={};var F=this.element,y=this.options;if(!y.rotatable&&!y.scalable&&(y.checkOrientation=!1),!y.checkOrientation||!window.ArrayBuffer){this.clone();return}if(ke.test(h)){ve.test(h)?this.read(nd(h)):this.clone();return}var b=new XMLHttpRequest,S=this.clone.bind(this);this.reloading=!0,this.xhr=b,b.onabort=S,b.onerror=S,b.ontimeout=S,b.onprogress=function(){b.getResponseHeader("content-type")!==Ae&&b.abort()},b.onload=function(){d.read(b.response)},b.onloadend=function(){d.reloading=!1,d.xhr=null},y.checkCrossOrigin&&oa(h)&&F.crossOrigin&&(h=aa(h)),b.open("GET",h,!0),b.responseType="arraybuffer",b.withCredentials=F.crossOrigin==="use-credentials",b.send()}}},{key:"read",value:function(h){var d=this.options,F=this.imageData,y=pd(h),b=0,S=1,_=1;if(y>1){this.url=ld(h,Ae);var C=dd(y);b=C.rotate,S=C.scaleX,_=C.scaleY}d.rotatable&&(F.rotate=b),d.scalable&&(F.scaleX=S,F.scaleY=_),this.clone()}},{key:"clone",value:function(){var h=this.element,d=this.url,F=h.crossOrigin,y=d;this.options.checkCrossOrigin&&oa(d)&&(F||(F="anonymous"),y=aa(d)),this.crossOrigin=F,this.crossOriginUrl=y;var b=document.createElement("img");F&&(b.crossOrigin=F),b.src=y||d,b.alt=h.alt||"The image to crop",this.image=b,b.onload=this.start.bind(this),b.onerror=this.stop.bind(this),Pe(b,ne),h.parentNode.insertBefore(b,h.nextSibling)}},{key:"start",value:function(){var h=this,d=this.image;d.onload=null,d.onerror=null,this.sizing=!0;var F=q.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(q.navigator.userAgent),y=function(C,R){Se(h.imageData,{naturalWidth:C,naturalHeight:R,aspectRatio:C/R}),h.initialImageData=Se({},h.imageData),h.sizing=!1,h.sized=!0,h.build()};if(d.naturalWidth&&!F){y(d.naturalWidth,d.naturalHeight);return}var b=document.createElement("img"),S=document.body||document.documentElement;this.sizingImage=b,b.onload=function(){y(b.width,b.height),F||S.removeChild(b)},b.src=d.src,F||(b.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",S.appendChild(b))}},{key:"stop",value:function(){var h=this.image;h.onload=null,h.onerror=null,h.parentNode.removeChild(h),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var h=this.element,d=this.options,F=this.image,y=h.parentNode,b=document.createElement("div");b.innerHTML=xt;var S=b.querySelector(".".concat(j,"-container")),_=S.querySelector(".".concat(j,"-canvas")),C=S.querySelector(".".concat(j,"-drag-box")),R=S.querySelector(".".concat(j,"-crop-box")),L=R.querySelector(".".concat(j,"-face"));this.container=y,this.cropper=S,this.canvas=_,this.dragBox=C,this.cropBox=R,this.viewBox=S.querySelector(".".concat(j,"-view-box")),this.face=L,_.appendChild(F),Pe(h,pe),y.insertBefore(S,h.nextSibling),ot(F,ne),this.initPreview(),this.bind(),d.initialAspectRatio=Math.max(0,d.initialAspectRatio)||NaN,d.aspectRatio=Math.max(0,d.aspectRatio)||NaN,d.viewMode=Math.max(0,Math.min(3,Math.round(d.viewMode)))||0,Pe(R,pe),d.guides||Pe(R.getElementsByClassName("".concat(j,"-dashed")),pe),d.center||Pe(R.getElementsByClassName("".concat(j,"-center")),pe),d.background&&Pe(S,"".concat(j,"-bg")),d.highlight||Pe(L,de),d.cropBoxMovable&&(Pe(L,T),ut(L,E,ue)),d.cropBoxResizable||(Pe(R.getElementsByClassName("".concat(j,"-line")),pe),Pe(R.getElementsByClassName("".concat(j,"-point")),pe)),this.render(),this.ready=!0,this.setDragMode(d.dragMode),d.autoCrop&&this.crop(),this.setData(d.data),Xe(d.ready)&&ht(h,Ye,d.ready,{once:!0}),ci(h,Ye)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var h=this.cropper.parentNode;h&&h.removeChild(this.cropper),ot(this.element,pe)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=yd,g}},{key:"setDefaults",value:function(h){Se(qe,Pt(h)&&h)}}])})();return Se(la.prototype,ud,hd,cd,fd,md,gd),la})});var Kp=Ne((ta,ia)=>{((i,e)=>{typeof define=="function"&&define.amd?define([],e):typeof ia=="object"&&typeof ta<"u"?ia.exports=e():i.Papa=e()})(ta,function i(){var e=typeof self<"u"?self:typeof window<"u"?window:e!==void 0?e:{},t,r=!e.document&&!!e.postMessage,s=e.IS_PAPA_WORKER||!1,o={},a=0,n={};function u(Q){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(x){var U=j(x);U.chunkSize=parseInt(U.chunkSize),x.step||x.chunk||(U.chunkSize=null),this._handle=new w(U),(this._handle.streamer=this)._config=U}).call(this,Q),this.parseChunk=function(x,U){var V=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<V){let Y=this._config.newline;Y||(A=this._config.quoteChar||'"',Y=this._handle.guessLineEndings(x,A)),x=[...x.split(Y).slice(V)].join(Y)}this.isFirstChunk&&$(this._config.beforeFirstChunk)&&(A=this._config.beforeFirstChunk(x))!==void 0&&(x=A),this.isFirstChunk=!1,this._halted=!1;var V=this._partialLine+x,A=(this._partialLine="",this._handle.parse(V,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(x=A.meta.cursor,V=(this._finished||(this._partialLine=V.substring(x-this._baseIndex),this._baseIndex=x),A&&A.data&&(this._rowCount+=A.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),s)e.postMessage({results:A,workerId:n.WORKER_ID,finished:V});else if($(this._config.chunk)&&!U){if(this._config.chunk(A,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=A=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(A.data),this._completeResults.errors=this._completeResults.errors.concat(A.errors),this._completeResults.meta=A.meta),this._completed||!V||!$(this._config.complete)||A&&A.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),V||A&&A.meta.paused||this._nextChunk(),A}this._halted=!0},this._sendError=function(x){$(this._config.error)?this._config.error(x):s&&this._config.error&&e.postMessage({workerId:n.WORKER_ID,error:x,finished:!1})}}function f(Q){var x;(Q=Q||{}).chunkSize||(Q.chunkSize=n.RemoteChunkSize),u.call(this,Q),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(U){this._input=U,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(x=new XMLHttpRequest,this._config.withCredentials&&(x.withCredentials=this._config.withCredentials),r||(x.onload=ue(this._chunkLoaded,this),x.onerror=ue(this._chunkError,this)),x.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var U,V=this._config.downloadRequestHeaders;for(U in V)x.setRequestHeader(U,V[U])}var A;this._config.chunkSize&&(A=this._start+this._config.chunkSize-1,x.setRequestHeader("Range","bytes="+this._start+"-"+A));try{x.send(this._config.downloadRequestBody)}catch(Y){this._chunkError(Y.message)}r&&x.status===0&&this._chunkError()}},this._chunkLoaded=function(){x.readyState===4&&(x.status<200||400<=x.status?this._chunkError():(this._start+=this._config.chunkSize||x.responseText.length,this._finished=!this._config.chunkSize||this._start>=(U=>(U=U.getResponseHeader("Content-Range"))!==null?parseInt(U.substring(U.lastIndexOf("/")+1)):-1)(x),this.parseChunk(x.responseText)))},this._chunkError=function(U){U=x.statusText||U,this._sendError(new Error(U))}}function m(Q){(Q=Q||{}).chunkSize||(Q.chunkSize=n.LocalChunkSize),u.call(this,Q);var x,U,V=typeof FileReader<"u";this.stream=function(A){this._input=A,U=A.slice||A.webkitSlice||A.mozSlice,V?((x=new FileReader).onload=ue(this._chunkLoaded,this),x.onerror=ue(this._chunkError,this)):x=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var A=this._input,Y=(this._config.chunkSize&&(Y=Math.min(this._start+this._config.chunkSize,this._input.size),A=U.call(A,this._start,Y)),x.readAsText(A,this._config.encoding));V||this._chunkLoaded({target:{result:Y}})},this._chunkLoaded=function(A){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(A.target.result)},this._chunkError=function(){this._sendError(x.error)}}function c(Q){var x;u.call(this,Q=Q||{}),this.stream=function(U){return x=U,this._nextChunk()},this._nextChunk=function(){var U,V;if(!this._finished)return U=this._config.chunkSize,x=U?(V=x.substring(0,U),x.substring(U)):(V=x,""),this._finished=!x,this.parseChunk(V)}}function v(Q){u.call(this,Q=Q||{});var x=[],U=!0,V=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(A){this._input=A,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){V&&x.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),x.length?this.parseChunk(x.shift()):U=!0},this._streamData=ue(function(A){try{x.push(typeof A=="string"?A:A.toString(this._config.encoding)),U&&(U=!1,this._checkIsFinished(),this.parseChunk(x.shift()))}catch(Y){this._streamError(Y)}},this),this._streamError=ue(function(A){this._streamCleanUp(),this._sendError(A)},this),this._streamEnd=ue(function(){this._streamCleanUp(),V=!0,this._streamData("")},this),this._streamCleanUp=ue(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function w(Q){var x,U,V,A,Y=Math.pow(2,53),me=-Y,Ee=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Te=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,le=this,xe=0,ie=0,pe=!1,ne=!1,de=[],K={data:[],errors:[],meta:{}};function T(P){return Q.skipEmptyLines==="greedy"?P.join("").trim()==="":P.length===1&&P[0].length===0}function E(){if(K&&V&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+n.DefaultDelimiter+"'"),V=!1),Q.skipEmptyLines&&(K.data=K.data.filter(function(X){return!T(X)})),N()){let X=function(ee,ae){$(Q.transformHeader)&&(ee=Q.transformHeader(ee,ae)),de.push(ee)};var Z=X;if(K)if(Array.isArray(K.data[0])){for(var P=0;N()&&P<K.data.length;P++)K.data[P].forEach(X);K.data.splice(0,1)}else K.data.forEach(X)}function M(X,ee){for(var ae=Q.header?{}:[],oe=0;oe<X.length;oe++){var se=oe,ge=X[oe],ge=((O,he)=>(ce=>(Q.dynamicTypingFunction&&Q.dynamicTyping[ce]===void 0&&(Q.dynamicTyping[ce]=Q.dynamicTypingFunction(ce)),(Q.dynamicTyping[ce]||Q.dynamicTyping)===!0))(O)?he==="true"||he==="TRUE"||he!=="false"&&he!=="FALSE"&&((ce=>{if(Ee.test(ce)&&(ce=parseFloat(ce),me<ce&&ce<Y))return 1})(he)?parseFloat(he):Te.test(he)?new Date(he):he===""?null:he):he)(se=Q.header?oe>=de.length?"__parsed_extra":de[oe]:se,ge=Q.transform?Q.transform(ge,se):ge);se==="__parsed_extra"?(ae[se]=ae[se]||[],ae[se].push(ge)):ae[se]=ge}return Q.header&&(oe>de.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+de.length+" fields but parsed "+oe,ie+ee):oe<de.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+de.length+" fields but parsed "+oe,ie+ee)),ae}var re;K&&(Q.header||Q.dynamicTyping||Q.transform)&&(re=1,!K.data.length||Array.isArray(K.data[0])?(K.data=K.data.map(M),re=K.data.length):K.data=M(K.data,0),Q.header&&K.meta&&(K.meta.fields=de),ie+=re)}function N(){return Q.header&&de.length===0}function k(P,M,re,Z){P={type:P,code:M,message:re},Z!==void 0&&(P.row=Z),K.errors.push(P)}$(Q.step)&&(A=Q.step,Q.step=function(P){K=P,N()?E():(E(),K.data.length!==0&&(xe+=P.data.length,Q.preview&&xe>Q.preview?U.abort():(K.data=K.data[0],A(K,le))))}),this.parse=function(P,M,re){var Z=Q.quoteChar||'"',Z=(Q.newline||(Q.newline=this.guessLineEndings(P,Z)),V=!1,Q.delimiter?$(Q.delimiter)&&(Q.delimiter=Q.delimiter(P),K.meta.delimiter=Q.delimiter):((Z=((X,ee,ae,oe,se)=>{var ge,O,he,ce;se=se||[","," ","|",";",n.RECORD_SEP,n.UNIT_SEP];for(var Ye=0;Ye<se.length;Ye++){for(var We,it=se[Ye],De=0,Ae=0,Re=0,ke=(he=void 0,new G({comments:oe,delimiter:it,newline:ee,preview:10}).parse(X)),ve=0;ve<ke.data.length;ve++)ae&&T(ke.data[ve])?Re++:(We=ke.data[ve].length,Ae+=We,he===void 0?he=We:0<We&&(De+=Math.abs(We-he),he=We));0<ke.data.length&&(Ae/=ke.data.length-Re),(O===void 0||De<=O)&&(ce===void 0||ce<Ae)&&1.99<Ae&&(O=De,ge=it,ce=Ae)}return{successful:!!(Q.delimiter=ge),bestDelimiter:ge}})(P,Q.newline,Q.skipEmptyLines,Q.comments,Q.delimitersToGuess)).successful?Q.delimiter=Z.bestDelimiter:(V=!0,Q.delimiter=n.DefaultDelimiter),K.meta.delimiter=Q.delimiter),j(Q));return Q.preview&&Q.header&&Z.preview++,x=P,U=new G(Z),K=U.parse(x,M,re),E(),pe?{meta:{paused:!0}}:K||{meta:{paused:!1}}},this.paused=function(){return pe},this.pause=function(){pe=!0,U.abort(),x=$(Q.chunk)?"":x.substring(U.getCharIndex())},this.resume=function(){le.streamer._halted?(pe=!1,le.streamer.parseChunk(x,!0)):setTimeout(le.resume,3)},this.aborted=function(){return ne},this.abort=function(){ne=!0,U.abort(),K.meta.aborted=!0,$(Q.complete)&&Q.complete(K),x=""},this.guessLineEndings=function(X,Z){X=X.substring(0,1048576);var Z=new RegExp(D(Z)+"([^]*?)"+D(Z),"gm"),re=(X=X.replace(Z,"")).split("\r"),Z=X.split(`
|
|
3
|
+
`),X=1<Z.length&&Z[0].length<re[0].length;if(re.length===1||X)return`
|
|
4
|
+
`;for(var ee=0,ae=0;ae<re.length;ae++)re[ae][0]===`
|
|
5
|
+
`&&ee++;return ee>=re.length/2?`\r
|
|
6
|
+
`:"\r"}}function D(Q){return Q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function G(Q){var x=(Q=Q||{}).delimiter,U=Q.newline,V=Q.comments,A=Q.step,Y=Q.preview,me=Q.fastMode,Ee=null,Te=!1,le=Q.quoteChar==null?'"':Q.quoteChar,xe=le;if(Q.escapeChar!==void 0&&(xe=Q.escapeChar),(typeof x!="string"||-1<n.BAD_DELIMITERS.indexOf(x))&&(x=","),V===x)throw new Error("Comment character same as delimiter");V===!0?V="#":(typeof V!="string"||-1<n.BAD_DELIMITERS.indexOf(V))&&(V=!1),U!==`
|
|
7
|
+
`&&U!=="\r"&&U!==`\r
|
|
8
|
+
`&&(U=`
|
|
9
|
+
`);var ie=0,pe=!1;this.parse=function(ne,de,K){if(typeof ne!="string")throw new Error("Input must be a string");var T=ne.length,E=x.length,N=U.length,k=V.length,P=$(A),M=[],re=[],Z=[],X=ie=0;if(!ne)return De();if(me||me!==!1&&ne.indexOf(le)===-1){for(var ee=ne.split(U),ae=0;ae<ee.length;ae++){if(Z=ee[ae],ie+=Z.length,ae!==ee.length-1)ie+=U.length;else if(K)return De();if(!V||Z.substring(0,k)!==V){if(P){if(M=[],ce(Z.split(x)),Ae(),pe)return De()}else ce(Z.split(x));if(Y&&Y<=ae)return M=M.slice(0,Y),De(!0)}}return De()}for(var oe=ne.indexOf(x,ie),se=ne.indexOf(U,ie),ge=new RegExp(D(xe)+D(le),"g"),O=ne.indexOf(le,ie);;)if(ne[ie]===le)for(O=ie,ie++;;){if((O=ne.indexOf(le,O+1))===-1)return K||re.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:M.length,index:ie}),We();if(O===T-1)return We(ne.substring(ie,O).replace(ge,le));if(le===xe&&ne[O+1]===xe)O++;else if(le===xe||O===0||ne[O-1]!==xe){oe!==-1&&oe<O+1&&(oe=ne.indexOf(x,O+1));var he=Ye((se=se!==-1&&se<O+1?ne.indexOf(U,O+1):se)===-1?oe:Math.min(oe,se));if(ne.substr(O+1+he,E)===x){Z.push(ne.substring(ie,O).replace(ge,le)),ne[ie=O+1+he+E]!==le&&(O=ne.indexOf(le,ie)),oe=ne.indexOf(x,ie),se=ne.indexOf(U,ie);break}if(he=Ye(se),ne.substring(O+1+he,O+1+he+N)===U){if(Z.push(ne.substring(ie,O).replace(ge,le)),it(O+1+he+N),oe=ne.indexOf(x,ie),O=ne.indexOf(le,ie),P&&(Ae(),pe))return De();if(Y&&M.length>=Y)return De(!0);break}re.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:M.length,index:ie}),O++}}else if(V&&Z.length===0&&ne.substring(ie,ie+k)===V){if(se===-1)return De();ie=se+N,se=ne.indexOf(U,ie),oe=ne.indexOf(x,ie)}else if(oe!==-1&&(oe<se||se===-1))Z.push(ne.substring(ie,oe)),ie=oe+E,oe=ne.indexOf(x,ie);else{if(se===-1)break;if(Z.push(ne.substring(ie,se)),it(se+N),P&&(Ae(),pe))return De();if(Y&&M.length>=Y)return De(!0)}return We();function ce(Re){M.push(Re),X=ie}function Ye(Re){var ke=0;return ke=Re!==-1&&(Re=ne.substring(O+1,Re))&&Re.trim()===""?Re.length:ke}function We(Re){return K||(Re===void 0&&(Re=ne.substring(ie)),Z.push(Re),ie=T,ce(Z),P&&Ae()),De()}function it(Re){ie=Re,ce(Z),Z=[],se=ne.indexOf(U,ie)}function De(Re){if(Q.header&&!de&&M.length&&!Te){var ke=M[0],ve=Object.create(null),Ie=new Set(ke);let It=!1;for(let dt=0;dt<ke.length;dt++){let qe=ke[dt];if(ve[qe=$(Q.transformHeader)?Q.transformHeader(qe,dt):qe]){let xt,Gt=ve[qe];for(;xt=qe+"_"+Gt,Gt++,Ie.has(xt););Ie.add(xt),ke[dt]=xt,ve[qe]++,It=!0,(Ee=Ee===null?{}:Ee)[xt]=qe}else ve[qe]=1,ke[dt]=qe;Ie.add(qe)}It&&console.warn("Duplicate headers found and renamed."),Te=!0}return{data:M,errors:re,meta:{delimiter:x,linebreak:U,aborted:pe,truncated:!!Re,cursor:X+(de||0),renamedHeaders:Ee}}}function Ae(){A(De()),M=[],re=[]}},this.abort=function(){pe=!0},this.getCharIndex=function(){return ie}}function q(Q){var x=Q.data,U=o[x.workerId],V=!1;if(x.error)U.userError(x.error,x.file);else if(x.results&&x.results.data){var A={abort:function(){V=!0,W(x.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:te,resume:te};if($(U.userStep)){for(var Y=0;Y<x.results.data.length&&(U.userStep({data:x.results.data[Y],errors:x.results.errors,meta:x.results.meta},A),!V);Y++);delete x.results}else $(U.userChunk)&&(U.userChunk(x.results,A,x.file),delete x.results)}x.finished&&!V&&W(x.workerId,x.results)}function W(Q,x){var U=o[Q];$(U.userComplete)&&U.userComplete(x),U.terminate(),delete o[Q]}function te(){throw new Error("Not implemented.")}function j(Q){if(typeof Q!="object"||Q===null)return Q;var x,U=Array.isArray(Q)?[]:{};for(x in Q)U[x]=j(Q[x]);return U}function ue(Q,x){return function(){Q.apply(x,arguments)}}function $(Q){return typeof Q=="function"}return n.parse=function(Q,x){var U=(x=x||{}).dynamicTyping||!1;if($(U)&&(x.dynamicTypingFunction=U,U={}),x.dynamicTyping=U,x.transform=!!$(x.transform)&&x.transform,!x.worker||!n.WORKERS_SUPPORTED)return U=null,n.NODE_STREAM_INPUT,typeof Q=="string"?(Q=(V=>V.charCodeAt(0)!==65279?V:V.slice(1))(Q),U=new(x.download?f:c)(x)):Q.readable===!0&&$(Q.read)&&$(Q.on)?U=new v(x):(e.File&&Q instanceof File||Q instanceof Object)&&(U=new m(x)),U.stream(Q);(U=(()=>{var V;return!!n.WORKERS_SUPPORTED&&(V=(()=>{var A=e.URL||e.webkitURL||null,Y=i.toString();return n.BLOB_URL||(n.BLOB_URL=A.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",Y,")();"],{type:"text/javascript"})))})(),(V=new e.Worker(V)).onmessage=q,V.id=a++,o[V.id]=V)})()).userStep=x.step,U.userChunk=x.chunk,U.userComplete=x.complete,U.userError=x.error,x.step=$(x.step),x.chunk=$(x.chunk),x.complete=$(x.complete),x.error=$(x.error),delete x.worker,U.postMessage({input:Q,config:x,workerId:U.id})},n.unparse=function(Q,x){var U=!1,V=!0,A=",",Y=`\r
|
|
10
|
+
`,me='"',Ee=me+me,Te=!1,le=null,xe=!1,ie=((()=>{if(typeof x=="object"){if(typeof x.delimiter!="string"||n.BAD_DELIMITERS.filter(function(de){return x.delimiter.indexOf(de)!==-1}).length||(A=x.delimiter),typeof x.quotes!="boolean"&&typeof x.quotes!="function"&&!Array.isArray(x.quotes)||(U=x.quotes),typeof x.skipEmptyLines!="boolean"&&typeof x.skipEmptyLines!="string"||(Te=x.skipEmptyLines),typeof x.newline=="string"&&(Y=x.newline),typeof x.quoteChar=="string"&&(me=x.quoteChar),typeof x.header=="boolean"&&(V=x.header),Array.isArray(x.columns)){if(x.columns.length===0)throw new Error("Option columns is empty");le=x.columns}x.escapeChar!==void 0&&(Ee=x.escapeChar+me),x.escapeFormulae instanceof RegExp?xe=x.escapeFormulae:typeof x.escapeFormulae=="boolean"&&x.escapeFormulae&&(xe=/^[=+\-@\t\r].*$/)}})(),new RegExp(D(me),"g"));if(typeof Q=="string"&&(Q=JSON.parse(Q)),Array.isArray(Q)){if(!Q.length||Array.isArray(Q[0]))return pe(null,Q,Te);if(typeof Q[0]=="object")return pe(le||Object.keys(Q[0]),Q,Te)}else if(typeof Q=="object")return typeof Q.data=="string"&&(Q.data=JSON.parse(Q.data)),Array.isArray(Q.data)&&(Q.fields||(Q.fields=Q.meta&&Q.meta.fields||le),Q.fields||(Q.fields=Array.isArray(Q.data[0])?Q.fields:typeof Q.data[0]=="object"?Object.keys(Q.data[0]):[]),Array.isArray(Q.data[0])||typeof Q.data[0]=="object"||(Q.data=[Q.data])),pe(Q.fields||[],Q.data||[],Te);throw new Error("Unable to serialize unrecognized input");function pe(de,K,T){var E="",N=(typeof de=="string"&&(de=JSON.parse(de)),typeof K=="string"&&(K=JSON.parse(K)),Array.isArray(de)&&0<de.length),k=!Array.isArray(K[0]);if(N&&V){for(var P=0;P<de.length;P++)0<P&&(E+=A),E+=ne(de[P],P);0<K.length&&(E+=Y)}for(var M=0;M<K.length;M++){var re=(N?de:K[M]).length,Z=!1,X=N?Object.keys(K[M]).length===0:K[M].length===0;if(T&&!N&&(Z=T==="greedy"?K[M].join("").trim()==="":K[M].length===1&&K[M][0].length===0),T==="greedy"&&N){for(var ee=[],ae=0;ae<re;ae++){var oe=k?de[ae]:ae;ee.push(K[M][oe])}Z=ee.join("").trim()===""}if(!Z){for(var se=0;se<re;se++){0<se&&!X&&(E+=A);var ge=N&&k?de[se]:se;E+=ne(K[M][ge],se)}M<K.length-1&&(!T||0<re&&!X)&&(E+=Y)}}return E}function ne(de,K){var T,E;return de==null?"":de.constructor===Date?JSON.stringify(de).slice(1,25):(E=!1,xe&&typeof de=="string"&&xe.test(de)&&(de="'"+de,E=!0),T=de.toString().replace(ie,Ee),(E=E||U===!0||typeof U=="function"&&U(de,K)||Array.isArray(U)&&U[K]||((N,k)=>{for(var P=0;P<k.length;P++)if(-1<N.indexOf(k[P]))return!0;return!1})(T,n.BAD_DELIMITERS)||-1<T.indexOf(A)||T.charAt(0)===" "||T.charAt(T.length-1)===" ")?me+T+me:T)}},n.RECORD_SEP="",n.UNIT_SEP="",n.BYTE_ORDER_MARK="\uFEFF",n.BAD_DELIMITERS=["\r",`
|
|
11
|
+
`,'"',n.BYTE_ORDER_MARK],n.WORKERS_SUPPORTED=!r&&!!e.Worker,n.NODE_STREAM_INPUT=1,n.LocalChunkSize=10485760,n.RemoteChunkSize=5242880,n.DefaultDelimiter=",",n.Parser=G,n.ParserHandle=w,n.NetworkStreamer=f,n.FileStreamer=m,n.StringStreamer=c,n.ReadableStreamStreamer=v,e.jQuery&&((t=e.jQuery).fn.parse=function(Q){var x=Q.config||{},U=[];return this.each(function(Y){if(!(t(this).prop("tagName").toUpperCase()==="INPUT"&&t(this).attr("type").toLowerCase()==="file"&&e.FileReader)||!this.files||this.files.length===0)return!0;for(var me=0;me<this.files.length;me++)U.push({file:this.files[me],inputElem:this,instanceConfig:t.extend({},x)})}),V(),this;function V(){if(U.length===0)$(Q.complete)&&Q.complete();else{var Y,me,Ee,Te,le=U[0];if($(Q.before)){var xe=Q.before(le.file,le.inputElem);if(typeof xe=="object"){if(xe.action==="abort")return Y="AbortError",me=le.file,Ee=le.inputElem,Te=xe.reason,void($(Q.error)&&Q.error({name:Y},me,Ee,Te));if(xe.action==="skip")return void A();typeof xe.config=="object"&&(le.instanceConfig=t.extend(le.instanceConfig,xe.config))}else if(xe==="skip")return void A()}var ie=le.instanceConfig.complete;le.instanceConfig.complete=function(pe){$(ie)&&ie(pe,le.file,le.inputElem),A()},n.parse(le.file,le.instanceConfig)}}function A(){U.splice(0,1),V()}}),s&&(e.onmessage=function(Q){Q=Q.data,n.WORKER_ID===void 0&&Q&&(n.WORKER_ID=Q.workerId),typeof Q.input=="string"?e.postMessage({workerId:n.WORKER_ID,results:n.parse(Q.input,Q.config),finished:!0}):(e.File&&Q.input instanceof File||Q.input instanceof Object)&&(Q=n.parse(Q.input,Q.config))&&e.postMessage({workerId:n.WORKER_ID,results:Q,finished:!0})}),(f.prototype=Object.create(u.prototype)).constructor=f,(m.prototype=Object.create(u.prototype)).constructor=m,(c.prototype=Object.create(c.prototype)).constructor=c,(v.prototype=Object.create(u.prototype)).constructor=v,n})});var wa=(()=>{let e=class e{constructor(){this.subject$=new fa}onFileLoad(r){let o=r.target.result,a=!1,n=[],u=[],f=0;for(let m of o.split(/[\r\n]+/))if(a){let c={};for(let v=0;v<f;v++)c[u[v]]=m.split(",")[v];n.push(c)}else{for(let c=0;c<m.split(",").length;c++)f=m.split(",").length,u.push(m.split(",")[c].replace(/ /g,""));a=!0}return n.splice(-1),n}convertFile(r){let s=r,o=new FileReader;return o.onload=a=>{let n=this.onFileLoad(a);this.subject$.next(n)},o.readAsText(s,"UTF-8"),this.subject$.asObservable()}};e.\u0275fac=function(s){return new(s||e)},e.\u0275prov=Dr({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Da=(()=>{let e=class e{constructor(r,s,o){this.http=r,this.toastr=s,this.router=o}PostToUrlEncode(r,s,o=1e5){let a=new vt;return a=a.set("Content-Type","application/x-www-form-urlencoded"),new Ut(n=>{this.http.post(r,s,{headers:a}).pipe(Et(o)).subscribe(u=>{n.next(u),n.complete()})})}GetText(r=1e5){let s=localStorage.getItem("Token"),a={responseType:"text",headers:new vt({Authorization:"Bearer "+s})};return new Ut(n=>{this.http.get("/API/Token/GetZendeskJWT",a).pipe(Et(r)).subscribe(u=>{n.next(u),n.complete()})})}POSText(r,s,o=1e5){let a=localStorage.getItem("Token"),u={responseType:"text",headers:new vt({"Content-Type":"application/json","Cache-Control":"no-cache",Authorization:"Bearer "+a})};return new Ut(f=>{this.http.post(r,s,u).pipe(Et(o)).subscribe(m=>{f.next(m),f.complete()})})}get(r){let s=localStorage.getItem("Token"),o=new vt({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(o=o.append("Authorization","Bearer "+s));let a={headers:o};return this.http.get(r,a).pipe(ga(n=>{if(!this.unauthorizedErrorHandling(n)){let f=this.errorMessageHandling(n);this.toastr.error(f.Message!=""?f.Message:"An unknown error has occured!",f.header),this.paymentErrorHandling(n)}return ma(()=>n)}))}getNews(r){return this.http.get(r)}paymentErrorHandling(r){r.status==402&&this.router.navigate(["/menu/Profile/Main/My_Subscription"])}post(r,s,o=1e5){return new Ut(a=>{let n=localStorage.getItem("Token"),u=new vt({"Content-Type":"application/json","Cache-Control":"no-cache"});n&&(u=u.append("Authorization","Bearer "+n));let f={headers:u};Date.prototype.toJSON=function(){return this.getFullYear()+"-"+m(this.getMonth()+1)+"-"+m(this.getDate())+"T"+m(this.getHours())+":"+m(this.getMinutes())+":"+m(this.getSeconds())+".000"};function m(c){return c<10?"0"+c:c}this.http.post(r,s,f).pipe(Et(o)).subscribe({next:c=>{a.next(c),a.complete()},error:c=>{if(c.status==200)a.next(c.error.text),a.complete();else{if(!this.unauthorizedErrorHandling(c)){let w=this.errorMessageHandling(c);this.toastr.error(w.Message!=""?w.Message:"An unknown error has occured!",w.header,{enableHtml:!0})}a.error(c)}}})})}postFile(r,s,o=1e5){return new Ut(a=>{let n=localStorage.getItem("Token"),u=new vt({"Content-Type":"application/json","Cache-Control":"no-cache"});n&&(u=u.append("Authorization","Bearer "+n)),this.http.post(r,s,{headers:u,observe:"response",responseType:"blob"}).pipe(Et(o)).subscribe({next:f=>{a.next({title:f.headers.get("Content-Disposition"),file:f.body}),a.complete()},error:f=>{if(f.headers.get("Content-Type")==="application/json; charset=utf-8"){let m=new FileReader;m.addEventListener("loadend",c=>{let v=JSON.parse(c.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(f)){let D=this.errorMessageHandling(f);this.toastr.error(v??"An unknown error has occured!",D.header,{enableHtml:!0})}}),m.readAsText(f.error)}a.error(f)}})})}put(r,s,o=1e5){return new Ut(a=>{let n=localStorage.getItem("Token"),u=new vt({"Content-Type":"application/json","Cache-Control":"no-cache"});n&&(u=u.append("Authorization","Bearer "+n));let f={headers:u};this.http.put(r,s,f).pipe(Et(o)).subscribe({next:m=>{a.next(m),a.complete()},error:m=>{if(m.status==200)a.next(m.error.text),a.complete();else{if(!this.unauthorizedErrorHandling(m)){let v=this.errorMessageHandling(m);this.toastr.error(v.Message!=""?v.Message:"An unknown error has occured!",v.header)}a.error(m)}}})})}delete(r,s,o=1e5){return new Ut(a=>{let n=localStorage.getItem("Token"),u=new vt({"Content-Type":"application/json","Cache-Control":"no-cache"});n&&(u=u.append("Authorization","Bearer "+n));let f={headers:u,body:s};this.http.delete(r,f).pipe(Et(o)).subscribe({next:m=>{a.next(m),a.complete()},error:m=>{if(m.status==200)a.next(m.error.text),a.complete();else{if(!this.unauthorizedErrorHandling(m)){let v=this.errorMessageHandling(m);this.toastr.error(v.Message!=""?v.Message:"An unknown error has occured!",v.header)}a.error(m)}}})})}unauthorizedErrorHandling(r){let s=!1;return(r.status==401||r.status==403)&&(localStorage.getItem("Token")?this.router.navigate(["/menu/Unauthorized/Main/Unauthorized"]):window.location.href="/",s=!0),s}errorMessageHandling(r){let s="API Error",o="Exception Message";return r.error?(s="API Error - "+r.status,r.status==451&&(s="Error"),r.error&&(o=r.error.Message)):r.Message&&(s="API Error - "+r.name,o=r.Message),{header:s,Message:o}}postFormDataWithoutBearer(r,s){return new Ut(o=>{this.http.post(r,s).pipe(Et(1e5)).subscribe({next:a=>{o.next(a),o.complete()},error:a=>{a.status==200&&(o.next(a.error.text),o.complete()),o.error(a)}})})}postFormData(r,s,o=!0){return new Ut(a=>{let n=localStorage.getItem("Token"),f={headers:new vt({Authorization:"Bearer "+n})};this.http.post(r,s,f).pipe(Et(1e5)).subscribe({next:m=>{a.next(m),a.complete()},error:m=>{if(m.status==200)a.next(m.error.text),a.complete();else{if(!this.unauthorizedErrorHandling(m)&&o){let v=this.errorMessageHandling(m);this.toastr.error(v.Message!=""?v.Message:"An unknown error has occured!",v.header)}a.error(m)}}})})}};e.\u0275fac=function(s){return new(s||e)(Rr(Ea),Rr(Sa),Rr(va))},e.\u0275prov=Dr({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var bd=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;function Fd(i,e,t){let r=bd.exec(i),s=e.mimeType??r?.[1]??"plain/text",o;if(r?.[2]!=null){let a=atob(decodeURIComponent(r[3])),n=new Uint8Array(a.length);for(let u=0;u<a.length;u++)n[u]=a.charCodeAt(u);o=[n]}else r?.[3]!=null&&(o=[decodeURIComponent(r[3])]);return t?new File(o,e.name||"",{type:s}):new Blob(o,{type:s})}var ws=Fd;function _i(i,e,t,r){return t===0||i===e?i:r===0?e:i+(e-i)*2**(-r/t)}var Vi=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];function Mi(i){return typeof i!="object"||i===null||!("nodeType"in i)?!1:i.nodeType===Node.ELEMENT_NODE}function Bd(i){if(typeof i=="string"){let e=document.querySelectorAll(i);return e.length===0?null:Array.from(e)}return typeof i=="object"&&Mi(i)?[i]:null}var Tr=Bd;function Ud(i,e=document){return typeof i=="string"?e.querySelector(i):Mi(i)?i:null}var Ds=Ud;function gt(i){let e=i.lastIndexOf(".");return e===-1||e===i.length-1?{name:i,extension:void 0}:{name:i.slice(0,e),extension:i.slice(e+1)}}var Rs={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function bi(i){if(i.type)return i.type;let e=i.name?gt(i.name).extension?.toLowerCase():null;return e&&e in Rs?Rs[e]:"application/octet-stream"}function Ed(i){return i.charCodeAt(0).toString(32)}function Ra(i){let e="";return i.replace(/[^A-Z0-9]/gi,t=>(e+=`-${Ed(t)}`,"/"))+e}function Ls(i,e){let t=e||"uppy";return typeof i.name=="string"&&(t+=`-${Ra(i.name.toLowerCase())}`),i.type!==void 0&&(t+=`-${i.type}`),i.meta&&typeof i.meta.relativePath=="string"&&(t+=`-${Ra(i.meta.relativePath.toLowerCase())}`),i.data?.size!==void 0&&(t+=`-${i.data.size}`),i.data.lastModified!==void 0&&(t+=`-${i.data.lastModified}`),t}function vd(i){return!i.isRemote||!i.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(i.remote.provider)}function zi(i,e){if(vd(i))return i.id;let t=bi(i);return Ls(J(B({},i),{type:t}),e)}var Ct=Array.from;function Ns(i){let e=Ct(i.files);return Promise.resolve(e)}function Ir(i,e,t,{onSuccess:r}){i.readEntries(s=>{let o=[...e,...s];s.length?queueMicrotask(()=>{Ir(i,o,t,{onSuccess:r})}):r(o)},s=>{t(s),r(e)})}function La(i,e){return i==null?i:{kind:i.isFile?"file":i.isDirectory?"directory":void 0,name:i.name,getFile(){return new Promise((r,s)=>i.file(r,s))},values(){return vr(this,null,function*(){let r=i.createReader(),s=yield new fi(new Promise(o=>{Ir(r,[],e,{onSuccess:a=>o(a.map(n=>La(n,e)))})}));yield*Sr(s)})},isSameEntry:void 0}}function Na(i,e,t=void 0){return vr(this,null,function*(){let r=()=>`${e}/${i.name}`;if(i.kind==="file"){let u=yield new fi(i.getFile());u!=null?(u.relativePath=e?r():null,yield u):t!=null&&(yield t)}else if(i.kind==="directory")try{for(var s=wr(i.values()),o,a,n;o=!(a=yield new fi(s.next())).done;o=!1){let u=a.value;yield*Sr(Na(u,e?r():i.name))}}catch{n=[a]}finally{try{o&&(a=s.return)&&(yield new fi(a.call(s)))}finally{if(n)throw n[0]}}else t!=null&&(yield t)})}function ks(i,e){return vr(this,null,function*(){let t=yield new fi(Promise.all(Array.from(i.items,r=>H(null,null,function*(){let s;return s??=La(typeof r.getAsEntry=="function"?r.getAsEntry():r.webkitGetAsEntry(),e),{fileSystemHandle:s,lastResortFile:r.getAsFile()}}))));for(let{lastResortFile:r,fileSystemHandle:s}of t)if(s!=null)try{yield*Sr(Na(s,"",r))}catch(o){r!=null?yield r:e(o)}else r!=null&&(yield r)})}function Pr(i,e){return H(this,null,function*(){let t=e?.logDropError??Function.prototype;try{let n=[];try{for(var r=wr(ks(i,t)),s,o,a;s=!(o=yield r.next()).done;s=!1){let u=o.value;n.push(u)}}catch{a=[o]}finally{try{s&&(o=r.return)&&(yield o.call(r))}finally{if(a)throw a[0]}}return n}catch{return Ns(i)}})}function Sd(i){for(;i&&!i.dir;)i=i.parentNode;return i?.dir}var Cs=Sd;function Ts(i){return i<10?`0${i}`:i.toString()}function Kt(){let i=new Date,e=Ts(i.getHours()),t=Ts(i.getMinutes()),r=Ts(i.getSeconds());return`${e}:${t}:${r}`}function _r(){if(typeof window>"u")return!1;let i=document.body;return!(i==null||window==null||!("draggable"in i)||!("ondragstart"in i)||!("ondrop"in i)||!("FormData"in window)||!("FileReader"in window))}function Ai(i){return i.startsWith("blob:")}function Oi(i){return i?/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(i):!1}function Is(i){let e=Math.floor(i/3600)%24,t=Math.floor(i/60)%60,r=Math.floor(i%60);return{hours:e,minutes:t,seconds:r}}function Vr(i){let e=Is(i),t=e.hours===0?"":`${e.hours}h`,r=e.minutes===0?"":`${e.hours===0?e.minutes:` ${e.minutes.toString(10).padStart(2,"0")}`}m`,s=e.hours!==0?"":`${e.minutes===0?e.seconds:` ${e.seconds.toString(10).padStart(2,"0")}`}s`;return`${t}${r}${s}`}function wd(i){return new Error("Cancelled",{cause:i})}function ka(i){if(i!=null){let e=()=>this.abort(i.reason);i.addEventListener("abort",e,{once:!0});let t=()=>{i.removeEventListener("abort",e)};this.then?.(t,t)}return this}var Gi=class{#e=0;#t=[];#i=!1;#r;#s=1;#p;#a;limit;constructor(e){typeof e!="number"||e===0?this.limit=1/0:this.limit=e}#n(e){this.#e+=1;let t=!1,r;try{r=e()}catch(s){throw this.#e-=1,s}return{abort:s=>{t||(t=!0,this.#e-=1,r?.(s),this.#o())},done:()=>{t||(t=!0,this.#e-=1,this.#o())}}}#o(){queueMicrotask(()=>this.#c())}#c(){if(this.#i||this.#e>=this.limit||this.#t.length===0)return;let e=this.#t.shift();if(e==null)throw new Error("Invariant violation: next is null");let t=this.#n(e.fn);e.abort=t.abort,e.done=t.done}#l(e,t){let r={fn:e,priority:t?.priority||0,abort:()=>{this.#u(r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},s=this.#t.findIndex(o=>r.priority>o.priority);return s===-1?this.#t.push(r):this.#t.splice(s,0,r),r}#u(e){let t=this.#t.indexOf(e);t!==-1&&this.#t.splice(t,1)}run(e,t){return!this.#i&&this.#e<this.limit?this.#n(e):this.#l(e,t)}wrapSyncFunction(e,t){return(...r)=>{let s=this.run(()=>(e(...r),queueMicrotask(()=>s.done()),()=>{}),t);return{abortOn:ka,abort(){s.abort()}}}}wrapPromiseFunction(e,t){return(...r)=>{let s,o=new Promise((a,n)=>{s=this.run(()=>{let u,f;try{f=Promise.resolve(e(...r))}catch(m){f=Promise.reject(m)}return f.then(m=>{u?n(u):(s.done(),a(m))},m=>{u?n(u):(s.done(),n(m))}),m=>{u=wd(m)}},t)});return o.abort=a=>{s.abort(a)},o.abortOn=ka,o}}resume(){this.#i=!1,clearTimeout(this.#r);for(let e=0;e<this.limit;e++)this.#o()}#d=()=>this.resume();pause(e=null){this.#i=!0,clearTimeout(this.#r),e!=null&&(this.#r=setTimeout(this.#d,e))}rateLimit(e){clearTimeout(this.#a),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(this.#p=this.limit-1,this.limit=this.#s,this.#a=setTimeout(this.#h,e))}#h=()=>{if(this.#i){this.#a=setTimeout(this.#h,0);return}this.#s=this.limit,this.limit=Math.ceil((this.#p+this.#s)/2);for(let e=this.#s;e<=this.limit;e++)this.#o();this.#p-this.#s>3?this.#a=setTimeout(this.#h,2e3):this.#s=Math.floor(this.#s/2)};get isPaused(){return this.#i}},Dd=Symbol("__queue");function Mr(i){return J(B({},i),{type:i.mimeType,extension:i.name?gt(i.name).extension:null})}function Rd(i,e,t){let r=[];return i.forEach(s=>typeof s!="string"?r.push(s):e[Symbol.split](s).forEach((o,a,n)=>{o!==""&&r.push(o),a<n.length-1&&r.push(t)})),r}function Ca(i,e){let t=/\$/g,r="$$$$",s=[i];if(e==null)return s;for(let o of Object.keys(e))if(o!=="_"){let a=e[o];typeof a=="string"&&(a=t[Symbol.replace](a,r)),s=Rd(s,new RegExp(`%\\{${o}\\}`,"g"),a)}return s}var Ld=i=>{throw new Error(`missing string: ${i}`)},$t=class{locale;constructor(e,{onMissingKey:t=Ld}={}){this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(e)?e.forEach(this.#t,this):this.#t(e),this.#e=t}#e;#t(e){if(!e?.strings)return;let t=this.locale;Object.assign(this.locale,{strings:B(B({},t.strings),e.strings),pluralize:e.pluralize||t.pluralize})}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let r=this.locale.strings[e];if(r==null&&(this.#e(e),r=e),typeof r=="object"){if(t&&typeof t.smart_count<"u"){let o=this.locale.pluralize(t.smart_count);return Ca(r[o],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if(typeof r!="string")throw new Error("string was not a string");return Ca(r,t)}};function Hi(i,e){if(e===0)return"";if(i.length<=e)return i;if(e<=4)return`${i.slice(0,e-1)}\u2026`;let t=e-3,r=Math.ceil(t/2),s=Math.floor(t/2);return i.slice(0,r)+"..."+i.slice(-s)}var Zi,Ue,Va,Nd,ei,Ta,Ma,Ps,za,Ms,_s,Vs,kd,Ji={},Aa=[],Cd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Or=Array.isArray;function Tt(i,e){for(var t in e)i[t]=e[t];return i}function zs(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function Wi(i,e,t){var r,s,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?s=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?Zi.call(arguments,2):t),typeof i=="function"&&i.defaultProps!=null)for(o in i.defaultProps)a[o]===void 0&&(a[o]=i.defaultProps[o]);return ji(i,a,r,s,null)}function ji(i,e,t,r,s){var o={type:i,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Va,__i:-1,__u:0};return s==null&&Ue.vnode!=null&&Ue.vnode(o),o}function Oa(){return{current:null}}function Je(i){return i.children}function je(i,e){this.props=i,this.context=e}function Fi(i,e){if(e==null)return i.__?Fi(i.__,i.__i+1):null;for(var t;e<i.__k.length;e++)if((t=i.__k[e])!=null&&t.__e!=null)return t.__e;return typeof i.type=="function"?Fi(i):null}function Ga(i){var e,t;if((i=i.__)!=null&&i.__c!=null){for(i.__e=i.__c.base=null,e=0;e<i.__k.length;e++)if((t=i.__k[e])!=null&&t.__e!=null){i.__e=i.__c.base=t.__e;break}return Ga(i)}}function Ia(i){(!i.__d&&(i.__d=!0)&&ei.push(i)&&!Ar.__r++||Ta!==Ue.debounceRendering)&&((Ta=Ue.debounceRendering)||Ma)(Ar)}function Ar(){var i,e,t,r,s,o,a,n;for(ei.sort(Ps);i=ei.shift();)i.__d&&(e=ei.length,r=void 0,o=(s=(t=i).__v).__e,a=[],n=[],t.__P&&((r=Tt({},s)).__v=s.__v+1,Ue.vnode&&Ue.vnode(r),As(t.__P,r,s,t.__n,t.__P.namespaceURI,32&s.__u?[o]:null,a,o??Fi(s),!!(32&s.__u),n),r.__v=s.__v,r.__.__k[r.__i]=r,Ja(a,r,n),r.__e!=o&&Ga(r)),ei.length>e&&ei.sort(Ps));Ar.__r=0}function Ha(i,e,t,r,s,o,a,n,u,f,m){var c,v,w,D,G,q,W=r&&r.__k||Aa,te=e.length;for(u=Td(t,e,W,u,te),c=0;c<te;c++)(w=t.__k[c])!=null&&(v=w.__i===-1?Ji:W[w.__i]||Ji,w.__i=c,q=As(i,w,v,s,o,a,n,u,f,m),D=w.__e,w.ref&&v.ref!=w.ref&&(v.ref&&Os(v.ref,null,w),m.push(w.ref,w.__c||D,w)),G==null&&D!=null&&(G=D),4&w.__u||v.__k===w.__k?u=ja(w,u,i):typeof w.type=="function"&&q!==void 0?u=q:D&&(u=D.nextSibling),w.__u&=-7);return t.__e=G,u}function Td(i,e,t,r,s){var o,a,n,u,f,m=t.length,c=m,v=0;for(i.__k=new Array(s),o=0;o<s;o++)(a=e[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(u=o+v,(a=i.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?ji(null,a,null,null,null):Or(a)?ji(Je,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?ji(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=i,a.__b=i.__b+1,n=null,(f=a.__i=Id(a,t,u,c))!==-1&&(c--,(n=t[f])&&(n.__u|=2)),n==null||n.__v===null?(f==-1&&v--,typeof a.type!="function"&&(a.__u|=4)):f!=u&&(f==u-1?v--:f==u+1?v++:(f>u?v--:v++,a.__u|=4))):i.__k[o]=null;if(c)for(o=0;o<m;o++)(n=t[o])!=null&&(2&n.__u)==0&&(n.__e==r&&(r=Fi(n)),Za(n,n));return r}function ja(i,e,t){var r,s;if(typeof i.type=="function"){for(r=i.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=i,e=ja(r[s],e,t));return e}i.__e!=e&&(e&&i.type&&!t.contains(e)&&(e=Fi(i)),t.insertBefore(i.__e,e||null),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function St(i,e){return e=e||[],i==null||typeof i=="boolean"||(Or(i)?i.some(function(t){St(t,e)}):e.push(i)),e}function Id(i,e,t,r){var s,o,a=i.key,n=i.type,u=e[t];if(u===null||u&&a==u.key&&n===u.type&&(2&u.__u)==0)return t;if(r>(u!=null&&(2&u.__u)==0?1:0))for(s=t-1,o=t+1;s>=0||o<e.length;){if(s>=0){if((u=e[s])&&(2&u.__u)==0&&a==u.key&&n===u.type)return s;s--}if(o<e.length){if((u=e[o])&&(2&u.__u)==0&&a==u.key&&n===u.type)return o;o++}}return-1}function Pa(i,e,t){e[0]=="-"?i.setProperty(e,t??""):i[e]=t==null?"":typeof t!="number"||Cd.test(e)?t:t+"px"}function zr(i,e,t,r,s){var o;e:if(e=="style")if(typeof t=="string")i.style.cssText=t;else{if(typeof r=="string"&&(i.style.cssText=r=""),r)for(e in r)t&&e in t||Pa(i.style,e,"");if(t)for(e in t)r&&t[e]===r[e]||Pa(i.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(za,"$1")),e=e.toLowerCase()in i||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),i.l||(i.l={}),i.l[e+o]=t,t?r?t.u=r.u:(t.u=Ms,i.addEventListener(e,o?Vs:_s,o)):i.removeEventListener(e,o?Vs:_s,o);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in i)try{i[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?i.removeAttribute(e):i.setAttribute(e,e=="popover"&&t==1?"":t))}}function _a(i){return function(e){if(this.l){var t=this.l[e.type+i];if(e.t==null)e.t=Ms++;else if(e.t<t.u)return;return t(Ue.event?Ue.event(e):e)}}}function As(i,e,t,r,s,o,a,n,u,f){var m,c,v,w,D,G,q,W,te,j,ue,$,Q,x,U,V,A,Y=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(u=!!(32&t.__u),o=[n=e.__e=t.__e]),(m=Ue.__b)&&m(e);e:if(typeof Y=="function")try{if(W=e.props,te="prototype"in Y&&Y.prototype.render,j=(m=Y.contextType)&&r[m.__c],ue=m?j?j.props.value:m.__:r,t.__c?q=(c=e.__c=t.__c).__=c.__E:(te?e.__c=c=new Y(W,ue):(e.__c=c=new je(W,ue),c.constructor=Y,c.render=_d),j&&j.sub(c),c.props=W,c.state||(c.state={}),c.context=ue,c.__n=r,v=c.__d=!0,c.__h=[],c._sb=[]),te&&c.__s==null&&(c.__s=c.state),te&&Y.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Tt({},c.__s)),Tt(c.__s,Y.getDerivedStateFromProps(W,c.__s))),w=c.props,D=c.state,c.__v=e,v)te&&Y.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),te&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(te&&Y.getDerivedStateFromProps==null&&W!==w&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(W,ue),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(W,c.__s,ue)===!1||e.__v==t.__v)){for(e.__v!=t.__v&&(c.props=W,c.state=c.__s,c.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(me){me&&(me.__=e)}),$=0;$<c._sb.length;$++)c.__h.push(c._sb[$]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(W,c.__s,ue),te&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(w,D,G)})}if(c.context=ue,c.props=W,c.__P=i,c.__e=!1,Q=Ue.__r,x=0,te){for(c.state=c.__s,c.__d=!1,Q&&Q(e),m=c.render(c.props,c.state,c.context),U=0;U<c._sb.length;U++)c.__h.push(c._sb[U]);c._sb=[]}else do c.__d=!1,Q&&Q(e),m=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++x<25);c.state=c.__s,c.getChildContext!=null&&(r=Tt(Tt({},r),c.getChildContext())),te&&!v&&c.getSnapshotBeforeUpdate!=null&&(G=c.getSnapshotBeforeUpdate(w,D)),n=Ha(i,Or(V=m!=null&&m.type===Je&&m.key==null?m.props.children:m)?V:[V],e,t,r,s,o,a,n,u,f),c.base=e.__e,e.__u&=-161,c.__h.length&&a.push(c),q&&(c.__E=c.__=null)}catch(me){if(e.__v=null,u||o!=null)if(me.then){for(e.__u|=u?160:128;n&&n.nodeType==8&&n.nextSibling;)n=n.nextSibling;o[o.indexOf(n)]=null,e.__e=n}else for(A=o.length;A--;)zs(o[A]);else e.__e=t.__e,e.__k=t.__k;Ue.__e(me,e,t)}else o==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):n=e.__e=Pd(t.__e,e,t,r,s,o,a,u,f);return(m=Ue.diffed)&&m(e),128&e.__u?void 0:n}function Ja(i,e,t){for(var r=0;r<t.length;r++)Os(t[r],t[++r],t[++r]);Ue.__c&&Ue.__c(e,i),i.some(function(s){try{i=s.__h,s.__h=[],i.some(function(o){o.call(s)})}catch(o){Ue.__e(o,s.__v)}})}function Pd(i,e,t,r,s,o,a,n,u){var f,m,c,v,w,D,G,q=t.props,W=e.props,te=e.type;if(te=="svg"?s="http://www.w3.org/2000/svg":te=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),o!=null){for(f=0;f<o.length;f++)if((w=o[f])&&"setAttribute"in w==!!te&&(te?w.localName==te:w.nodeType==3)){i=w,o[f]=null;break}}if(i==null){if(te==null)return document.createTextNode(W);i=document.createElementNS(s,te,W.is&&W),n&&(Ue.__m&&Ue.__m(e,o),n=!1),o=null}if(te===null)q===W||n&&i.data===W||(i.data=W);else{if(o=o&&Zi.call(i.childNodes),q=t.props||Ji,!n&&o!=null)for(q={},f=0;f<i.attributes.length;f++)q[(w=i.attributes[f]).name]=w.value;for(f in q)if(w=q[f],f!="children"){if(f=="dangerouslySetInnerHTML")c=w;else if(!(f in W)){if(f=="value"&&"defaultValue"in W||f=="checked"&&"defaultChecked"in W)continue;zr(i,f,null,w,s)}}for(f in W)w=W[f],f=="children"?v=w:f=="dangerouslySetInnerHTML"?m=w:f=="value"?D=w:f=="checked"?G=w:n&&typeof w!="function"||q[f]===w||zr(i,f,w,q[f],s);if(m)n||c&&(m.__html===c.__html||m.__html===i.innerHTML)||(i.innerHTML=m.__html),e.__k=[];else if(c&&(i.innerHTML=""),Ha(i,Or(v)?v:[v],e,t,r,te=="foreignObject"?"http://www.w3.org/1999/xhtml":s,o,a,o?o[0]:t.__k&&Fi(t,0),n,u),o!=null)for(f=o.length;f--;)zs(o[f]);n||(f="value",te=="progress"&&D==null?i.removeAttribute("value"):D!==void 0&&(D!==i[f]||te=="progress"&&!D||te=="option"&&D!==q[f])&&zr(i,f,D,q[f],s),f="checked",G!==void 0&&G!==i[f]&&zr(i,f,G,q[f],s))}return i}function Os(i,e,t){try{if(typeof i=="function"){var r=typeof i.__u=="function";r&&i.__u(),r&&e==null||(i.__u=i(e))}else i.current=e}catch(s){Ue.__e(s,t)}}function Za(i,e,t){var r,s;if(Ue.unmount&&Ue.unmount(i),(r=i.ref)&&(r.current&&r.current!==i.__e||Os(r,null,e)),(r=i.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){Ue.__e(o,e)}r.base=r.__P=null}if(r=i.__k)for(s=0;s<r.length;s++)r[s]&&Za(r[s],e,t||typeof i.type!="function");t||zs(i.__e),i.__c=i.__=i.__e=void 0}function _d(i,e,t){return this.constructor(i,t)}function Gs(i,e,t){var r,s,o,a;e==document&&(e=document.documentElement),Ue.__&&Ue.__(i,e),s=(r=typeof t=="function")?null:t&&t.__k||e.__k,o=[],a=[],As(e,i=(!r&&t||e).__k=Wi(Je,null,[i]),s||Ji,Ji,e.namespaceURI,!r&&t?[t]:s?null:e.firstChild?Zi.call(e.childNodes):null,o,!r&&t?t:s?s.__e:e.firstChild,r,a),Ja(o,i,a)}function Gr(i,e,t){var r,s,o,a,n=Tt({},i.props);for(o in i.type&&i.type.defaultProps&&(a=i.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?s=e[o]:n[o]=e[o]===void 0&&a!==void 0?a[o]:e[o];return arguments.length>2&&(n.children=arguments.length>3?Zi.call(arguments,2):t),ji(i.type,n,r||i.key,s||i.ref,null)}Zi=Aa.slice,Ue={__e:function(i,e,t,r){for(var s,o,a;e=e.__;)if((s=e.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(i)),a=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(i,r||{}),a=s.__d),a)return s.__E=s}catch(n){i=n}throw i}},Va=0,Nd=function(i){return i!=null&&i.constructor==null},je.prototype.setState=function(i,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Tt({},this.state),typeof i=="function"&&(i=i(Tt({},t),this.props)),i&&Tt(t,i),i!=null&&this.__v&&(e&&this._sb.push(e),Ia(this))},je.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),Ia(this))},je.prototype.render=Je,ei=[],Ma=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ps=function(i,e){return i.__v.__b-e.__v.__b},Ar.__r=0,za=/(PointerCapture)$|Capture$/i,Ms=0,_s=_a(!1),Vs=_a(!0),kd=0;var Vd=0,Pf=Array.isArray;function l(i,e,t,r,s,o){e||(e={});var a,n,u=e;if("ref"in u)for(n in u={},e)n=="ref"?a=e[n]:u[n]=e[n];var f={type:i,props:u,key:t,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vd,__i:-1,__u:0,__source:s,__self:o};if(typeof i=="function"&&(a=i.defaultProps))for(n in a)u[n]===void 0&&(u[n]=a[n]);return Ue.vnode&&Ue.vnode(f),f}var Yi,_e,Hs,Wa,qi=0,rn=[],Me=Ue,Ya=Me.__b,qa=Me.__r,Xa=Me.diffed,Ka=Me.__c,$a=Me.unmount,en=Me.__;function Js(i,e){Me.__h&&Me.__h(_e,i,qi||e),qi=0;var t=_e.__H||(_e.__H={__:[],__h:[]});return i>=t.__.length&&t.__.push({}),t.__[i]}function nt(i){return qi=1,Md(on,i)}function Md(i,e,t){var r=Js(Yi++,2);if(r.t=i,!r.__c&&(r.__=[t?t(e):on(void 0,e),function(n){var u=r.__N?r.__N[0]:r.__[0],f=r.t(u,n);u!==f&&(r.__N=[f,r.__[1]],r.__c.setState({}))}],r.__c=_e,!_e.u)){var s=function(n,u,f){if(!r.__c.__H)return!0;var m=r.__c.__H.__.filter(function(v){return!!v.__c});if(m.every(function(v){return!v.__N}))return!o||o.call(this,n,u,f);var c=r.__c.props!==n;return m.forEach(function(v){if(v.__N){var w=v.__[0];v.__=v.__N,v.__N=void 0,w!==v.__[0]&&(c=!0)}}),o&&o.call(this,n,u,f)||c};_e.u=!0;var o=_e.shouldComponentUpdate,a=_e.componentWillUpdate;_e.componentWillUpdate=function(n,u,f){if(this.__e){var m=o;o=void 0,s(n,u,f),o=m}a&&a.call(this,n,u,f)},_e.shouldComponentUpdate=s}return r.__N||r.__}function yt(i,e){var t=Js(Yi++,3);!Me.__s&&sn(t.__H,e)&&(t.__=i,t.i=e,_e.__H.__h.push(t))}function wt(i){return qi=5,ti(function(){return{current:i}},[])}function ti(i,e){var t=Js(Yi++,7);return sn(t.__H,e)&&(t.__=i(),t.__H=e,t.__h=i),t.__}function Qt(i,e){return qi=8,ti(function(){return i},e)}function zd(){for(var i;i=rn.shift();)if(i.__P&&i.__H)try{i.__H.__h.forEach(Hr),i.__H.__h.forEach(js),i.__H.__h=[]}catch(e){i.__H.__h=[],Me.__e(e,i.__v)}}Me.__b=function(i){_e=null,Ya&&Ya(i)},Me.__=function(i,e){i&&e.__k&&e.__k.__m&&(i.__m=e.__k.__m),en&&en(i,e)},Me.__r=function(i){qa&&qa(i),Yi=0;var e=(_e=i.__c).__H;e&&(Hs===_e?(e.__h=[],_e.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0})):(e.__h.forEach(Hr),e.__h.forEach(js),e.__h=[],Yi=0)),Hs=_e},Me.diffed=function(i){Xa&&Xa(i);var e=i.__c;e&&e.__H&&(e.__H.__h.length&&(rn.push(e)!==1&&Wa===Me.requestAnimationFrame||((Wa=Me.requestAnimationFrame)||Ad)(zd)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.i=void 0})),Hs=_e=null},Me.__c=function(i,e){e.some(function(t){try{t.__h.forEach(Hr),t.__h=t.__h.filter(function(r){return!r.__||js(r)})}catch(r){e.some(function(s){s.__h&&(s.__h=[])}),e=[],Me.__e(r,t.__v)}}),Ka&&Ka(i,e)},Me.unmount=function(i){$a&&$a(i);var e,t=i.__c;t&&t.__H&&(t.__H.__.forEach(function(r){try{Hr(r)}catch(s){e=s}}),t.__H=void 0,e&&Me.__e(e,t.__v))};var tn=typeof requestAnimationFrame=="function";function Ad(i){var e,t=function(){clearTimeout(r),tn&&cancelAnimationFrame(e),setTimeout(i)},r=setTimeout(t,100);tn&&(e=requestAnimationFrame(t))}function Hr(i){var e=_e,t=i.__c;typeof t=="function"&&(i.__c=void 0,t()),_e=e}function js(i){var e=_e;i.__c=i.__(),_e=e}function sn(i,e){return!i||i.length!==e.length||e.some(function(t,r){return t!==i[r]})}function on(i,e){return typeof e=="function"?e(i):e}var Od={position:"relative",width:"100%",minHeight:"100%"},Gd={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};function Bi(a){var n=a,{data:i,rowHeight:e,renderRow:t,overscanCount:r=10,padding:s=4}=n,o=Yt(n,["data","rowHeight","renderRow","overscanCount","padding"]);let u=wt(null),[f,m]=nt(0),[c,v]=nt(0);yt(()=>{function ue(){u.current!=null&&c!==u.current.offsetHeight&&v(u.current.offsetHeight)}return ue(),window.addEventListener("resize",ue),()=>{window.removeEventListener("resize",ue)}},[c]);let w=Qt(()=>{u.current&&m(u.current.scrollTop)},[]),D=Math.floor(f/e),G=Math.floor(c/e);r&&(D=Math.max(0,D-D%r),G+=r);let q=D+G+s,W=i.slice(D,q),te=J(B({},Od),{height:i.length*e}),j=J(B({},Gd),{top:D*e});return l("div",J(B({onScroll:w,ref:u},o),{children:l("div",{role:"presentation",style:te,children:l("div",{role:"presentation",style:j,children:W.map(t)})})}))}var ii=class{uppy;opts;id;defaultLocale;i18n;i18nArray;type;VERSION;constructor(e,t){this.uppy=e,this.opts=t??{}}getPluginState(){let{plugins:e}=this.uppy.getState();return e?.[this.id]||{}}setPluginState(e){let{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:J(B({},t),{[this.id]:B(B({},t[this.id]),e)})})}setOptions(e){this.opts=B(B({},this.opts),e),this.setPluginState(void 0),this.i18nInit()}i18nInit(){let e=new $t([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(e){}afterUpdate(){}};var an={debug:()=>{},warn:()=>{},error:(...i)=>console.error(`[Uppy] [${Kt()}]`,...i)},nn={debug:(...i)=>console.debug(`[Uppy] [${Kt()}]`,...i),warn:(...i)=>console.warn(`[Uppy] [${Kt()}]`,...i),error:(...i)=>console.error(`[Uppy] [${Kt()}]`,...i)};var Ki=we(Xi(),1),fn=we(cn(),1),mn={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},st=class extends Error{isUserFacing;file;constructor(e,t){super(e),this.isUserFacing=t?.isUserFacing??!0,t?.file&&(this.file=t.file)}isRestriction=!0},jr=class{getI18n;getOpts;constructor(e,t){this.getI18n=t,this.getOpts=()=>{let r=e();if(r.restrictions?.allowedFileTypes!=null&&!Array.isArray(r.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return r}}validateAggregateRestrictions(e,t){let{maxTotalFileSize:r,maxNumberOfFiles:s}=this.getOpts().restrictions;if(s&&e.filter(a=>!a.isGhost).length+t.length>s)throw new st(`${this.getI18n()("youCanOnlyUploadX",{smart_count:s})}`);if(r){let o=[...e,...t].reduce((a,n)=>a+(n.size??0),0);if(o>r)throw new st(this.getI18n()("aggregateExceedsSize",{sizeAllowed:(0,Ki.default)(r),size:(0,Ki.default)(o)}))}}validateSingleFile(e){let{maxFileSize:t,minFileSize:r,allowedFileTypes:s}=this.getOpts().restrictions;if(s&&!s.some(a=>a.includes("/")?e.type?(0,fn.default)(e.type.replace(/;.*?$/,""),a):!1:a[0]==="."&&e.extension?e.extension.toLowerCase()===a.slice(1).toLowerCase():!1)){let a=s.join(", ");throw new st(this.getI18n()("youCanOnlyUploadFileTypes",{types:a}),{file:e})}if(t&&e.size!=null&&e.size>t)throw new st(this.getI18n()("exceedsSize",{size:(0,Ki.default)(t),file:e.name??this.getI18n()("unnamed")}),{file:e});if(r&&e.size!=null&&e.size<r)throw new st(this.getI18n()("inferiorSize",{size:(0,Ki.default)(r)}),{file:e})}validate(e,t){t.forEach(r=>{this.validateSingleFile(r)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){let{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new st(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){let t=new st(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name??this.getI18n()("unnamed")})),{requiredMetaFields:r}=this.getOpts().restrictions,s=[];for(let o of r)(!Object.hasOwn(e.meta,o)||e.meta[o]==="")&&s.push(o);return{missingFields:s,error:t}}};function Jd(i){let e=null,t;return(...r)=>(t=r,e||(e=Promise.resolve().then(()=>(e=null,i(...t)))),e)}var Zs=class i extends ii{#e;isTargetDOMEl;el;parent;title;getTargetPlugin(e){let t;if(typeof e?.addTarget=="function")t=e,t instanceof i||console.warn(new Error("The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.",{cause:{targetPlugin:t,UIPlugin:i}}));else if(typeof e=="function"){let r=e;this.uppy.iteratePlugins(s=>{s instanceof r&&(t=s)})}return t}mount(e,t){let r=t.id,s=Ds(e);if(s){this.isTargetDOMEl=!0;let n=document.createElement("div");return n.classList.add("uppy-Root"),this.#e=Jd(u=>{this.uppy.getPlugin(this.id)&&(Gs(this.render(u,n),n),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(s.innerHTML=""),Gs(this.render(this.uppy.getState(),n),n),this.el=n,s.appendChild(n),n.dir=this.opts.direction||Cs(n)||"ltr",this.onMount(),this.el}let o=this.getTargetPlugin(e);if(o)return this.uppy.log(`Installing ${r} to ${o.id}`),this.parent=o,this.el=o.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${r}`);let a=`Invalid target option given to ${r}.`;throw typeof e=="function"?a+=" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":a+="If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(a)}render(e,t){throw new Error("Extend the render method to add your plugin to a DOM element")}update(e){this.el!=null&&this.#e?.(e)}unmount(){this.isTargetDOMEl&&this.el?.remove(),this.onUnmount()}onMount(){}onUnmount(){}},ri=Zs;var gn={name:"@uppy/store-default",description:"The default simple object-based store for Uppy.",version:"5.0.0",license:"MIT",main:"lib/index.js",type:"module",sideEffects:!1,scripts:{build:"tsc --build tsconfig.build.json",typecheck:"tsc --build",test:"vitest run --environment=jsdom --silent='passed-only'"},keywords:["file uploader","uppy","uppy-store"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},devDependencies:{jsdom:"^26.1.0",typescript:"^5.8.3",vitest:"^3.2.4"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},exports:{".":"./lib/index.js","./package.json":"./package.json"},files:["src","lib","dist","CHANGELOG.md"]};var Ws=class{static VERSION=gn.version;state={};#e=new Set;getState(){return this.state}setState(e){let t=B({},this.state),r=B(B({},this.state),e);this.state=r,this.#t(t,r,e)}subscribe(e){return this.#e.add(e),()=>{this.#e.delete(e)}}#t(...e){this.#e.forEach(t=>{t(...e)})}},yn=Ws;var tl=we(qn(),1),il=we(Kn(),1);var zu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var zt=(i=21)=>{let e="",t=i|0;for(;t--;)e+=zu[Math.random()*64|0];return e};var $n={name:"@uppy/core",description:"Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:",version:"5.2.0",license:"MIT",style:"dist/style.min.css",type:"module",sideEffects:["*.css"],scripts:{build:"tsc --build tsconfig.build.json","build:css":"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",typecheck:"tsc --build",test:"vitest run --environment=jsdom --silent='passed-only'"},keywords:["file uploader","uppy","uppy-plugin"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},files:["src","lib","dist","CHANGELOG.md"],exports:{".":"./lib/index.js","./css/style.min.css":"./dist/style.min.css","./css/style.css":"./dist/style.css","./css/style.scss":"./src/style.scss","./package.json":"./package.json"},dependencies:{"@transloadit/prettier-bytes":"^0.3.4","@uppy/store-default":"^5.0.0","@uppy/utils":"^7.1.4",lodash:"^4.17.21","mime-match":"^1.0.2","namespace-emitter":"^2.0.1",nanoid:"^5.0.9",preact:"^10.5.13"},devDependencies:{"@types/deep-freeze":"^0",cssnano:"^7.0.7","deep-freeze":"^0.0.1",jsdom:"^26.1.0",postcss:"^8.5.6","postcss-cli":"^11.0.1",sass:"^1.89.2",typescript:"^5.8.3",vitest:"^3.2.4"}};function Ks(i,e){return e.name?e.name:i.split("/")[0]==="image"?`${i.split("/")[0]}.${i.split("/")[1]}`:"noname"}var el={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",logIn:"Log in",pickFiles:"Pick files",pickPhotos:"Pick photos",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed",pleaseWait:"Please wait"}};function $s(i){if(i==null&&typeof navigator<"u"&&(i=navigator.userAgent),!i)return!0;let e=/Edge\/(\d+\.\d+)/.exec(i);if(!e)return!0;let r=e[1].split(".",2),s=parseInt(r[0],10),o=parseInt(r[1],10);return s<15||s===15&&o<15063||s>18||s===18&&o>=18218}var Wr={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null},eo=class i{static VERSION=$n.version;#e=Object.create(null);#t;#i;#r=(0,il.default)();#s=new Set;#p=new Set;#a=new Set;defaultLocale;locale;opts;store;i18n;i18nArray;scheduledAutoProceed=null;wasOffline=!1;constructor(e){this.defaultLocale=el;let t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:mn,meta:{},onBeforeFileAdded:(s,o)=>!Object.hasOwn(o,s.id),onBeforeUpload:s=>s,store:new yn,logger:an,infoTimeout:5e3},r=B(B({},t),e);this.opts=J(B({},r),{restrictions:B(B({},t.restrictions),e?.restrictions)}),e?.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e?.debug&&(this.opts.logger=nn),this.log(`Using Core v${i.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState(J(B({},Wr),{plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:$s(),individualCancellation:!0,resumableUploads:!1},meta:B({},this.opts.meta),info:[]})),this.#t=new jr(()=>this.opts,()=>this.i18n),this.#i=this.store.subscribe((s,o,a)=>{this.emit("state-update",s,o,a),this.updateAll(o)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),this.#Q()}emit(e,...t){this.#r.emit(e,...t)}on(e,t){return this.#r.on(e,t),this}once(e,t){return this.#r.once(e,t),this}off(e,t){return this.#r.off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){let t=this.getState().files;this.setState({files:B(B({},t),Object.fromEntries(Object.entries(e).map(([r,s])=>[r,B(B({},t[r]),s)])))})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can\u2019t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){let e=r=>this.log(`Missing i18n string: ${r}`,"error"),t=new $t([this.defaultLocale,this.opts.locale],{onMissingKey:e});this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(e){this.opts=J(B(B({},this.opts),e),{restrictions:B(B({},this.opts.restrictions),e?.restrictions)}),e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){let e={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},t=B({},this.getState().files),r=Object.create(null);Object.keys(t).forEach(s=>{r[s]=J(B({},t[s]),{progress:B(B({},t[s].progress),e),tus:void 0,transloadit:void 0})}),this.setState(B({files:r},Wr))}clear(){let{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState(J(B({},Wr),{files:{}}))}addPreProcessor(e){this.#s.add(e)}removePreProcessor(e){return this.#s.delete(e)}addPostProcessor(e){this.#a.add(e)}removePostProcessor(e){return this.#a.delete(e)}addUploader(e){this.#p.add(e)}removeUploader(e){return this.#p.delete(e)}setMeta(e){let t=B(B({},this.getState().meta),e),r=B({},this.getState().files);Object.keys(r).forEach(s=>{r[s]=J(B({},r[s]),{meta:B(B({},r[s].meta),e)})}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:r})}setFileMeta(e,t){let r=B({},this.getState().files);if(!r[e]){this.log(`Was trying to set metadata for a file that has been removed: ${e}`);return}let s=B(B({},r[e].meta),t);r[e]=J(B({},r[e]),{meta:s}),this.setState({files:r})}getFile(e){return this.getState().files[e]}getFiles(){let{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(t=>this.getFile(t))}getObjectOfFilesPerState(){let{files:e,totalProgress:t,error:r}=this.getState(),s=Object.values(e),o=[],a=[],n=[],u=[],f=[],m=[],c=[],v=[],w=[];for(let D of s){let{progress:G}=D;!G.uploadComplete&&G.uploadStarted&&(o.push(D),D.isPaused||v.push(D)),G.uploadStarted||a.push(D),(G.uploadStarted||G.preprocess||G.postprocess)&&n.push(D),G.uploadStarted&&u.push(D),D.isPaused&&f.push(D),G.uploadComplete&&m.push(D),D.error&&c.push(D),(G.preprocess||G.postprocess)&&w.push(D)}return{newFiles:a,startedFiles:n,uploadStartedFiles:u,pausedFiles:f,completeFiles:m,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:v,processingFiles:w,isUploadStarted:u.length>0,isAllComplete:t===100&&m.length===s.length&&w.length===0,isAllErrored:!!r&&c.length===s.length,isAllPaused:o.length!==0&&f.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:s.some(D=>D.isGhost)}}#n(e){for(let a of e)a.isRestriction?this.emit("restriction-failed",a.file,a):this.emit("error",a,a.file),this.log(a,"warning");let t=e.filter(a=>a.isUserFacing),r=4,s=t.slice(0,r),o=t.slice(r);s.forEach(({message:a,details:n=""})=>{this.info({message:a,details:n},"error",this.opts.infoTimeout)}),o.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:o.length})})}validateRestrictions(e,t=this.getFiles()){try{this.#t.validate(t,[e])}catch(r){return r}return null}validateSingleFile(e){try{this.#t.validateSingleFile(e)}catch(t){return t.message}return null}validateAggregateRestrictions(e){let t=this.getFiles();try{this.#t.validateAggregateRestrictions(t,e)}catch(r){return r.message}return null}#o(e){let{missingFields:t,error:r}=this.#t.getMissingRequiredMetaFields(e);return t.length>0?(this.setFileState(e.id,{missingRequiredMetaFields:t,error:r.message}),this.log(r.message),this.emit("restriction-failed",e,r),!1):(t.length===0&&e.missingRequiredMetaFields&&this.setFileState(e.id,{missingRequiredMetaFields:[]}),!0)}#c(e){let t=!0;for(let r of Object.values(e))this.#o(r)||(t=!1);return t}#l(e){let{allowNewUpload:t}=this.getState();if(t===!1){let r=new st(this.i18n("noMoreFilesAllowed"),{file:e});throw this.#n([r]),r}}checkIfFileAlreadyExists(e){let{files:t}=this.getState();return!!(t[e]&&!t[e].isGhost)}#u(e){let t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e,meta:{},isRemote:!1,source:void 0,preview:void 0}:e,r=bi(t),s=Ks(r,t),o=gt(s).extension,a=zi(t,this.getID()),n=J(B({},t.meta),{name:s,type:r}),u=Number.isFinite(t.data.size)?t.data.size:null;return J(B({source:t.source||"",id:a,name:s,extension:o||"",meta:B(B({},this.getState().meta),n),type:r,progress:{percentage:0,bytesUploaded:!1,bytesTotal:u,uploadComplete:!1,uploadStarted:null},size:u,isGhost:!1},t.isRemote?{isRemote:!0,remote:t.remote,data:t.data}:{isRemote:!1,data:t.data}),{preview:t.preview})}#d(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}#h(e){let{files:t}=this.getState(),r=B({},t),s=[],o=[];for(let a of e)try{let n=this.#u(a);this.#l(n);let u=t[n.id],f=u?.isGhost;if(f&&!n.isRemote){if(n.data==null)throw new Error("File data is missing");n=J(B({},u),{isGhost:!1,data:n.data}),this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)}let m=this.opts.onBeforeFileAdded(n,r);if(t=this.getState().files,r=B(B({},t),r),!m&&this.checkIfFileAlreadyExists(n.id))throw new st(this.i18n("noDuplicates",{fileName:n.name??this.i18n("unnamed")}),{file:n});if(m===!1&&!f)throw new st("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:n});typeof m=="object"&&m!==null&&(n=m),this.#t.validateSingleFile(n),r[n.id]=n,s.push(n)}catch(n){o.push(n)}try{this.#t.validateAggregateRestrictions(Object.values(t),s)}catch(a){return o.push(a),{nextFilesState:t,validFilesToAdd:[],errors:o}}return{nextFilesState:r,validFilesToAdd:s,errors:o}}addFile(e){let{nextFilesState:t,validFilesToAdd:r,errors:s}=this.#h([e]),o=s.filter(n=>n.isRestriction);if(this.#n(o),s.length>0)throw s[0];this.setState({files:t});let[a]=r;return this.emit("file-added",a),this.emit("files-added",r),this.log(`Added file: ${a.name}, ${a.id}, mime type: ${a.type}`),this.#d(),a.id}addFiles(e){let{nextFilesState:t,validFilesToAdd:r,errors:s}=this.#h(e),o=s.filter(n=>n.isRestriction);this.#n(o);let a=s.filter(n=>!n.isRestriction);if(a.length>0){let n=`Multiple errors occurred while adding files:
|
|
12
|
+
`;if(a.forEach(u=>{n+=`
|
|
13
|
+
* ${u.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:a.length}),details:n},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(a,n);{let u=new Error(n);throw u.errors=a,u}}this.setState({files:t}),r.forEach(n=>{this.emit("file-added",n)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.values(r).forEach(n=>{this.log(`Added file: ${n.name}
|
|
14
|
+
id: ${n.id}
|
|
15
|
+
type: ${n.type}`)}),r.length>0&&this.#d()}removeFiles(e){let{files:t,currentUploads:r}=this.getState(),s=B({},t),o=B({},r),a=Object.create(null);e.forEach(m=>{t[m]&&(a[m]=t[m],delete s[m])});function n(m){return a[m]===void 0}Object.keys(o).forEach(m=>{let c=r[m].fileIDs.filter(n);if(c.length===0){delete o[m];return}let{capabilities:v}=this.getState();if(c.length!==r[m].fileIDs.length&&!v.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");o[m]=J(B({},r[m]),{fileIDs:c})});let u={currentUploads:o,files:s};Object.keys(s).length===0&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.#g();let f=Object.keys(a);f.forEach(m=>{this.emit("file-removed",a[m])}),f.length>5?this.log(`Removed ${f.length} files`):this.log(`Removed files: ${f.join(", ")}`)}removeFile(e){this.removeFiles([e])}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;let t=this.getFile(e),s=!(t.isPaused||!1);return this.setFileState(e,{isPaused:s}),this.emit("upload-pause",t,s),s}pauseAll(){let e=B({},this.getState().files);Object.keys(e).filter(r=>!e[r].progress.uploadComplete&&e[r].progress.uploadStarted).forEach(r=>{let s=J(B({},e[r]),{isPaused:!0});e[r]=s}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){let e=B({},this.getState().files);Object.keys(e).filter(r=>!e[r].progress.uploadComplete&&e[r].progress.uploadStarted).forEach(r=>{let s=J(B({},e[r]),{isPaused:!1,error:null});e[r]=s}),this.setState({files:e}),this.emit("resume-all")}#b(){let{files:e}=this.getState();return Object.keys(e).filter(t=>{let r=e[t];return r.error&&(!r.missingRequiredMetaFields||r.missingRequiredMetaFields.length===0)})}#F(){return H(this,null,function*(){let e=this.#b(),t=B({},this.getState().files);if(e.forEach(s=>{t[s]=J(B({},t[s]),{isPaused:!1,error:null})}),this.setState({files:t,error:null}),this.emit("retry-all",this.getFilesByIds(e)),e.length===0)return{successful:[],failed:[]};let r=this.#m(e,{forceAllowNewUpload:!0});return this.#U(r)})}retryAll(){return H(this,null,function*(){let e=yield this.#F();return this.emit("complete",e),e})}cancelAll(){this.emit("cancel-all");let{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t),this.setState(Wr)}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",this.getFile(e));let t=this.#m([e],{forceAllowNewUpload:!0});return this.#U(t)}logout(){this.iteratePlugins(e=>{e.provider?.logout?.()})}#E=(e,t)=>{let r=e?this.getFile(e.id):void 0;if(e==null||!r){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}if(r.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);return}let s={bytesTotal:t.bytesTotal,percentage:t.bytesTotal!=null&&Number.isFinite(t.bytesTotal)&&t.bytesTotal>0?Math.round(t.bytesUploaded/t.bytesTotal*100):void 0};r.progress.uploadStarted!=null?this.setFileState(e.id,{progress:J(B(B({},r.progress),s),{bytesUploaded:t.bytesUploaded})}):this.setFileState(e.id,{progress:B(B({},r.progress),s)}),this.#g()};#B(){let e=this.#v(),t=null;e!=null&&(t=Math.round(e*100),t>100?t=100:t<0&&(t=0)),this.emit("progress",t??0),this.setState({totalProgress:t??0})}#g=(0,tl.default)(()=>this.#B(),500,{leading:!0,trailing:!0});[Symbol.for("uppy test: updateTotalProgress")](){return this.#B()}#v(){let t=this.getFiles().filter(u=>u.progress.uploadStarted||u.progress.preprocess||u.progress.postprocess);if(t.length===0)return 0;if(t.every(u=>u.progress.uploadComplete))return 1;let r=u=>u.progress.bytesTotal!=null&&u.progress.bytesTotal!==0,s=t.filter(r),o=t.filter(u=>!r(u));if(s.every(u=>u.progress.uploadComplete)&&o.length>0&&!o.every(u=>u.progress.uploadComplete))return null;let a=s.reduce((u,f)=>u+(f.progress.bytesTotal??0),0),n=s.reduce((u,f)=>u+(f.progress.bytesUploaded||0),0);return a===0?0:n/a}#Q(){let e=(s,o,a)=>{let n=s.message||"Unknown error";s.details&&(n+=` ${s.details}`),this.setState({error:n}),o!=null&&o.id in this.getState().files&&this.setFileState(o.id,{error:n,response:a})};this.on("error",e),this.on("upload-error",(s,o,a)=>{if(e(o,s,a),typeof o=="object"&&o.message){this.log(o.message,"error");let n=new Error(this.i18n("failedToUpload",{file:s?.name??""}));n.isUserFacing=!0,n.details=o.message,o.details&&(n.details+=` ${o.details}`),this.#n([n])}else this.#n([o])});let t=null;this.on("upload-stalled",(s,o)=>{let{message:a}=s,n=o.map(u=>u.meta.name).join(", ");t||(this.info({message:a,details:n},"warning",this.opts.infoTimeout),t=setTimeout(()=>{t=null},this.opts.infoTimeout)),this.log(`${a} ${n}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});let r=s=>{let o=s.filter(n=>{let u=n!=null&&this.getFile(n.id);return u||this.log(`Not setting progress for a file that has been removed: ${n?.id}`),u}),a=Object.fromEntries(o.map(n=>[n.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:n.size}}]));this.patchFilesState(a)};this.on("upload-start",r),this.on("upload-progress",this.#E),this.on("upload-success",(s,o)=>{if(s==null||!this.getFile(s.id)){this.log(`Not setting progress for a file that has been removed: ${s?.id}`);return}let a=this.getFile(s.id).progress,n=this.#a.size>0;this.setFileState(s.id,{progress:J(B(J(B({},a),{postprocess:n?{mode:"indeterminate"}:void 0,uploadComplete:!0}),!n&&{complete:!0}),{percentage:100,bytesUploaded:a.bytesTotal}),response:o,uploadURL:o.uploadURL,isPaused:!1}),s.size==null&&this.setFileState(s.id,{size:o.bytesUploaded||a.bytesTotal}),this.#g()}),this.on("preprocess-progress",(s,o)=>{if(s==null||!this.getFile(s.id)){this.log(`Not setting progress for a file that has been removed: ${s?.id}`);return}this.setFileState(s.id,{progress:J(B({},this.getFile(s.id).progress),{preprocess:o})})}),this.on("preprocess-complete",s=>{if(s==null||!this.getFile(s.id)){this.log(`Not setting progress for a file that has been removed: ${s?.id}`);return}let o=B({},this.getState().files);o[s.id]=J(B({},o[s.id]),{progress:B({},o[s.id].progress)}),delete o[s.id].progress.preprocess,this.setState({files:o})}),this.on("postprocess-progress",(s,o)=>{if(s==null||!this.getFile(s.id)){this.log(`Not setting progress for a file that has been removed: ${s?.id}`);return}this.setFileState(s.id,{progress:J(B({},this.getState().files[s.id].progress),{postprocess:o})})}),this.on("postprocess-complete",s=>{let o=s&&this.getFile(s.id);if(o==null){this.log(`Not setting progress for a file that has been removed: ${s?.id}`);return}let u=o.progress,{postprocess:a}=u,n=Yt(u,["postprocess"]);this.patchFilesState({[o.id]:{progress:J(B({},n),{complete:!0})}})}),this.on("restored",()=>{this.#g()}),this.on("dashboard:file-edit-complete",s=>{s&&this.#o(s)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",this.#f),window.addEventListener("offline",this.#f),setTimeout(this.#f,3e3))}updateOnlineStatus(){window.navigator.onLine??!0?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}#f=this.updateOnlineStatus.bind(this);getID(){return this.opts.id}use(e,...t){if(typeof e!="function"){let a=`Expected a plugin class, but got ${e===null?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(a)}let r=new e(this,...t),s=r.id;if(!s)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");let o=this.getPlugin(s);if(o){let a=`Already found a plugin named '${o.id}'. Tried to use: '${s}'.
|
|
16
|
+
Uppy plugins must have unique \`id\` options.`;throw new Error(a)}return e.VERSION&&this.log(`Using ${s} v${e.VERSION}`),r.type in this.#e?this.#e[r.type].push(r):this.#e[r.type]=[r],r.install(),this.emit("plugin-added",r),this}getPlugin(e){for(let t of Object.values(this.#e)){let r=t.find(s=>s.id===e);if(r!=null)return r}}[Symbol.for("uppy test: getPlugins")](e){return this.#e[e]}iteratePlugins(e){Object.values(this.#e).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();let t=this.#e[e.type],r=t.findIndex(a=>a.id===e.id);r!==-1&&t.splice(r,1);let s=this.getState(),o={plugins:J(B({},s.plugins),{[e.id]:void 0})};this.setState(o)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),this.#i(),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",this.#f),window.removeEventListener("offline",this.#f))}hideInfo(){let{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t="info",r=3e3){let s=typeof e=="object";this.setState({info:[...this.getState().info,{type:t,message:s?e.message:e,details:s?e.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(e,t){let{logger:r}=this.opts;switch(t){case"error":r.error(e);break;case"warning":r.warn(e);break;default:r.debug(e);break}}#x=new Map;registerRequestClient(e,t){this.#x.set(e,t)}getRequestClientForFile(e){if(!("remote"in e&&e.remote))throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);let t=this.#x.get(e.remote.requestClientId);if(t==null)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}restore(e){return H(this,null,function*(){this.log(`Core: Running restored upload "${e}"`);let t=yield this.#U(e);return this.emit("complete",t),t})}#m(e,t={}){let{forceAllowNewUpload:r=!1}=t,{allowNewUpload:s,currentUploads:o}=this.getState();if(!s&&!r)throw new Error("Cannot create a new upload: already uploading.");let a=zt();return this.emit("upload",a,this.getFilesByIds(e)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:J(B({},o),{[a]:{fileIDs:e,step:0,result:{}}})}),a}[Symbol.for("uppy test: createUpload")](...e){return this.#m(...e)}#S(e){let{currentUploads:t}=this.getState();return t[e]}addResultData(e,t){if(!this.#S(e)){this.log(`Not setting result for an upload that has been removed: ${e}`);return}let{currentUploads:r}=this.getState(),s=J(B({},r[e]),{result:B(B({},r[e].result),t)});this.setState({currentUploads:J(B({},r),{[e]:s})})}#y(e){let s=this.getState().currentUploads,{[e]:t}=s,r=Yt(s,[ca(e)]);this.setState({currentUploads:r})}#U(e){return H(this,null,function*(){let t=()=>{let{currentUploads:a}=this.getState();return a[e]},r=t();if(!r)throw new Error("Nonexistent upload");let s=[...this.#s,...this.#p,...this.#a];try{for(let a=r.step||0;a<s.length;a++){let n=s[a];this.setState({currentUploads:J(B({},this.getState().currentUploads),{[e]:J(B({},r),{step:a})})});let{fileIDs:u}=r;if(yield n(u,e),r=t(),!r)break}}catch(a){throw this.#y(e),a}if(r){r.fileIDs.forEach(f=>{let m=this.getFile(f);m?.progress.postprocess&&this.emit("postprocess-complete",m)});let a=r.fileIDs.map(f=>this.getFile(f)),n=a.filter(f=>!f.error),u=a.filter(f=>f.error);this.addResultData(e,{successful:n,failed:u,uploadID:e}),r=t()}let o;return r&&(o=r.result,this.#y(e)),o==null&&(this.log(`Not setting result for an upload that has been removed: ${e}`),o={successful:[],failed:[],uploadID:e}),o})}upload(){return H(this,null,function*(){this.#e.uploader?.length||this.log("No uploader type plugins are used","warning");let{files:e}=this.getState();if(this.#b().length>0){let s=yield this.#F();if(!(this.getFiles().filter(a=>a.progress.uploadStarted==null).length>0))return this.emit("complete",s),s;({files:e}=this.getState())}let r=this.opts.onBeforeUpload(e);if(r===!1)throw new Error("Not starting the upload because onBeforeUpload returned false");r&&typeof r=="object"&&(e=r,this.setState({files:e}));try{if(this.#t.validateMinNumberOfFiles(e),!this.#c(e))throw new st(this.i18n("missingRequiredMetaField"));let{currentUploads:s}=this.getState(),o=Object.values(s).flatMap(f=>f.fileIDs),a=Object.keys(e).filter(f=>{let m=this.getFile(f);return m&&!m.progress.uploadStarted&&!o.includes(f)}),n=this.#m(a),u=yield this.#U(n);return this.emit("complete",u),u}catch(s){throw this.#n([s]),s}})}},Ui=eo;function rl(i){let e=Qt(r=>{r.preventDefault(),i()},[i]),[t]=nt(()=>{let r=document.createElement("form");return r.setAttribute("tabindex","-1"),r.id=zt(),r});return yt(()=>(document.body.appendChild(t),t.addEventListener("submit",e),()=>{t.removeEventListener("submit",e),document.body.removeChild(t)}),[t,e]),{formId:t.id}}function Ou({value:i,onChange:e,onSubmit:t,inputLabel:r,i18n:s}){let{formId:o}=rl(t);return l("section",{className:"uppy-ProviderBrowser-searchFilter",children:[l("input",{className:"uppy-u-reset uppy-ProviderBrowser-searchFilterInput",type:"search","aria-label":r,placeholder:r,value:i,onInput:a=>e(a.target.value),form:o,"data-uppy-super-focusable":!0}),l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-ProviderBrowser-searchFilterIcon",width:"12",height:"12",viewBox:"0 0 12 12",children:l("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})}),i&&l("button",{className:"uppy-u-reset uppy-ProviderBrowser-searchFilterReset",type:"button","aria-label":s("resetFilter"),onClick:()=>e(""),children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",viewBox:"0 0 19 19",children:l("path",{d:"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"})})})]})}var sl=Ou;function Gu(){return l("svg",{width:"26",height:"26",viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg",children:l("g",{fill:"none","fill-rule":"evenodd",children:[l("circle",{fill:"#FFF",cx:"13",cy:"13",r:"13"}),l("path",{d:"M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",fill:"#4285F4","fill-rule":"nonzero"}),l("path",{d:"M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",fill:"#34A853","fill-rule":"nonzero"}),l("path",{d:"M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",fill:"#FBBC05","fill-rule":"nonzero"}),l("path",{d:"M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",fill:"#EA4335","fill-rule":"nonzero"}),l("path",{d:"M4 4h18v18H4z"})]})})}function Hu({pluginName:i,i18n:e,onAuth:t}){let r=i==="Google Drive",s=Qt(o=>{o.preventDefault(),t()},[t]);return l("form",{onSubmit:s,children:r?l("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google","data-uppy-super-focusable":!0,children:[l(Gu,{}),e("signInWithGoogle")]}):l("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn","data-uppy-super-focusable":!0,children:e("authenticateWith",{pluginName:i})})})}var ju=({pluginName:i,i18n:e,onAuth:t})=>l(Hu,{pluginName:i,i18n:e,onAuth:t});function to({loading:i,pluginName:e,pluginIcon:t,i18n:r,handleAuth:s,renderForm:o=ju}){return l("div",{className:"uppy-Provider-auth",children:[l("div",{className:"uppy-Provider-authIcon",children:t()}),l("div",{className:"uppy-Provider-authTitle",children:r("authenticateWithTitle",{pluginName:e})}),o({pluginName:e,i18n:r,loading:i,onAuth:s})]})}var kl=we($e(),1),Cl=we(Zr(),1);var ol={name:"@uppy/provider-views",description:"View library for Uppy remote provider plugins.",version:"5.2.2",license:"MIT",style:"dist/style.min.css",type:"module",sideEffects:["*.css"],scripts:{build:"tsc --build tsconfig.build.json","build:css":"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",typecheck:"tsc --build",test:"vitest run --environment=jsdom --silent='passed-only'"},keywords:["file uploader","uppy"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},files:["src","lib","dist","CHANGELOG.md"],exports:{".":"./lib/index.js","./css/style.min.css":"./dist/style.min.css","./css/style.css":"./dist/style.css","./css/style.scss":"./src/style.scss","./package.json":"./package.json"},dependencies:{"@uppy/utils":"^7.1.5",classnames:"^2.2.6",lodash:"^4.17.21",nanoid:"^5.0.9","p-queue":"^8.0.0",preact:"^10.5.13"},devDependencies:{"@types/gapi":"^0.0.47","@types/google.accounts":"^0.0.14","@types/google.picker":"^0.0.42",cssnano:"^7.0.7",jsdom:"^26.1.0",postcss:"^8.5.6","postcss-cli":"^11.0.1",sass:"^1.89.2",typescript:"^5.8.3",vitest:"^3.2.4"},peerDependencies:{"@uppy/core":"^5.2.0"}};var al=we($e(),1);function Zu(){return l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:11,height:14.5,viewBox:"0 0 44 58",children:l("path",{d:"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"})})}function Wu(){return l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",style:{minWidth:16,marginRight:3},viewBox:"0 0 276.157 276.157",children:l("path",{d:"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"})})}function Yu(){return l("svg",{"aria-hidden":"true",focusable:"false",style:{width:16,marginRight:4},viewBox:"0 0 58 58",children:[l("path",{d:"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"}),l("path",{d:"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"})]})}function At({itemIconString:i,alt:e=void 0}){if(i===null)return null;switch(i){case"file":return l(Zu,{});case"folder":return l(Wu,{});case"video":return l(Yu,{});default:return l("img",{src:i,alt:e,referrerPolicy:"no-referrer",loading:"lazy",width:16,height:16})}}function qu({file:i,toggleCheckbox:e,className:t,isDisabled:r,restrictionError:s,showTitles:o,children:a=null,i18n:n}){return l("li",{className:t,title:r&&s?s:void 0,children:[l("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox uppy-ProviderBrowserItem-checkbox--grid",onChange:e,name:"listitem",id:i.id,checked:i.status==="checked",disabled:r,"data-uppy-super-focusable":!0}),l("label",{htmlFor:i.id,"aria-label":i.data.name??n("unnamed"),className:"uppy-u-reset uppy-ProviderBrowserItem-inner",children:[l(At,{itemIconString:i.data.thumbnail||i.data.icon}),o&&(i.data.name??n("unnamed")),a]})]})}var io=qu;function ro({file:i,openFolder:e,className:t,isDisabled:r,restrictionError:s,toggleCheckbox:o,showTitles:a,i18n:n}){return l("li",{className:t,title:i.status!=="checked"&&s?s:void 0,children:[l("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox",onChange:o,name:"listitem",id:i.id,checked:i.status==="checked","aria-label":i.data.isFolder?n("allFilesFromFolderNamed",{name:i.data.name??n("unnamed")}):null,disabled:r,"data-uppy-super-focusable":!0}),i.data.isFolder?l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowserItem-inner",onClick:()=>e(i.id),"aria-label":n("openFolderNamed",{name:i.data.name??n("unnamed")}),children:[l("div",{className:"uppy-ProviderBrowserItem-iconWrap",children:l(At,{itemIconString:i.data.icon})}),a&&i.data.name?l("span",{className:"uppy-truncate-text",children:i.data.name}):n("unnamed")]}):l("label",{htmlFor:i.id,className:"uppy-u-reset uppy-ProviderBrowserItem-inner",children:[l("div",{className:"uppy-ProviderBrowserItem-iconWrap",children:l(At,{itemIconString:i.data.icon})}),a&&l("span",{className:"uppy-truncate-text",children:i.data.name??n("unnamed")})]})]})}function so(i){let{viewType:e,toggleCheckbox:t,showTitles:r,i18n:s,openFolder:o,file:a,utmSource:n}=i,u=a.type==="folder"?null:a.restrictionError,f=!!u&&a.status!=="checked",m={file:a,openFolder:o,toggleCheckbox:t,utmSource:n,i18n:s,viewType:e,showTitles:r,className:(0,al.default)("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--disabled":f},{"uppy-ProviderBrowserItem--noPreview":a.data.icon==="video"},{"uppy-ProviderBrowserItem--is-checked":a.status==="checked"},{"uppy-ProviderBrowserItem--is-partial":a.status==="partial"}),isDisabled:f,restrictionError:u};switch(e){case"grid":return l(io,B({},m));case"list":return l(ro,B({},m));case"unsplash":return l(io,J(B({},m),{children:l("a",{href:`${a.data.author.url}?utm_source=${n}&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer",className:"uppy-ProviderBrowserItem-author",tabIndex:-1,children:a.data.author.name})}));default:throw new Error(`There is no such type ${e}`)}}function Xu(i){let{displayedPartialTree:e,viewType:t,toggleCheckbox:r,handleScroll:s,showTitles:o,i18n:a,isLoading:n,openFolder:u,noResultsLabel:f,virtualList:m,utmSource:c}=i,[v,w]=nt(!1);if(yt(()=>{let G=W=>{W.key==="Shift"&&w(!1)},q=W=>{W.key==="Shift"&&w(!0)};return document.addEventListener("keyup",G),document.addEventListener("keydown",q),()=>{document.removeEventListener("keyup",G),document.removeEventListener("keydown",q)}},[]),n)return l("div",{className:"uppy-Provider-loading",children:typeof n=="string"?n:a("loading")});if(e.length===0)return l("div",{className:"uppy-Provider-empty",children:f});let D=G=>l(so,{viewType:t,toggleCheckbox:q=>{q.stopPropagation(),q.preventDefault(),document.getSelection()?.removeAllRanges(),r(G,v)},showTitles:o,i18n:a,openFolder:u,file:G,utmSource:c},G.id);return m?l("div",{className:"uppy-ProviderBrowser-body",children:l(Bi,{className:"uppy-ProviderBrowser-list",data:e,renderRow:D,rowHeight:35.5})}):l("div",{className:"uppy-ProviderBrowser-body",children:l("ul",{className:"uppy-ProviderBrowser-list",onScroll:s,tabIndex:-1,children:e.map(D)})})}var nl=Xu;var ll=we($e(),1);var Ku=i=>i.filter(t=>t.type==="file"&&t.status==="checked"?!0:t.type==="folder"&&t.status==="checked"?!i.some(s=>s.type!=="root"&&s.parentId===t.id):!1).length,qr=Ku;function oo({cancelSelection:i,donePicking:e,i18n:t,partialTree:r,validateAggregateRestrictions:s}){let o=ti(()=>s(r),[r,s]),a=ti(()=>qr(r),[r]);return a===0?null:l("div",{className:"uppy-ProviderBrowser-footer",children:[l("div",{className:"uppy-ProviderBrowser-footer-buttons",children:[l("button",{className:(0,ll.default)("uppy-u-reset uppy-c-btn uppy-c-btn-primary",{"uppy-c-btn--disabled":o}),disabled:!!o,onClick:e,type:"button",children:t("selectX",{smart_count:a})}),l("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link",onClick:i,type:"button",children:t("cancel")})]}),o&&l("div",{className:"uppy-ProviderBrowser-footer-error",children:o})]})}var $u=(i,e,t)=>{let r=i.name||i.id;return{id:i.id,source:e.id,name:r,type:i.mimeType,isRemote:!0,data:i,preview:i.thumbnail||void 0,meta:{authorName:i.author?.name,authorUrl:i.author?.url,relativePath:i.relDirPath||null,absolutePath:i.absDirPath},body:{fileId:i.id},remote:{companionUrl:e.opts.companionUrl,url:`${t.fileUrl(i.requestPath)}`,body:{fileId:i.id},providerName:t.name,provider:t.provider,requestClientId:t.provider}}},pl=$u;var eh=(i,e,t)=>{let r=i.map(a=>pl(a,e,t)),s=[],o=[];r.forEach(a=>{e.uppy.checkIfFileAlreadyExists(zi(a,e.uppy.getID()))?o.push(a):s.push(a)}),s.length>0&&e.uppy.info(e.uppy.i18n("addedNumFiles",{numFiles:s.length})),o.length>0&&e.uppy.info(`Not adding ${o.length} files because they already exist`),e.uppy.addFiles(s)},dl=eh;var th=(i,e,t,r)=>{let s=e.findIndex(o=>o.id===r);if(s!==-1&&t){let o=e.findIndex(n=>n.id===i);return e.slice(Math.min(s,o),Math.max(s,o)+1).map(n=>n.id)}return[i]},ul=th;var ih=i=>e=>{if(!e.isAuthError){if(e.name==="AbortError"){i.log("Aborting request","warning");return}i.log(e,"error"),e.name==="UserFacingApiError"&&i.info({message:i.i18n("companionError"),details:i.i18n(e.message)},"warning",5e3)}},si=ih;var rh=(i,e)=>{let t=i.find(s=>s.id===e),r=[];for(;r=[t,...r],t.type!=="root";){let s=t.parentId;t=i.find(o=>o.id===s)}return r},hl=rh;var cl=(i,e,t)=>{let r=e===null?"null":e;if(t[r])return t[r];let s=i.find(a=>a.id===e);if(s.type==="root")return[];let o=[...cl(i,s.parentId,t),s];return t[r]=o,o},sh=i=>{let e=Object.create(null);return i.filter(s=>s.type==="file"&&s.status==="checked").map(s=>{let o=cl(i,s.id,e),a=o.findIndex(m=>m.type==="folder"&&m.status==="checked"),n=o.slice(a),u=`/${o.map(m=>m.data.name).join("/")}`,f=n.length===1?void 0:n.map(m=>m.data.name).join("/");return J(B({},s.data),{absDirPath:u,relDirPath:f})})},fl=sh;var no=we(gl(),1);var tr=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},lo=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},yl=i=>globalThis.DOMException===void 0?new lo(i):new DOMException(i),Ql=i=>{let e=i.reason===void 0?yl("This operation was aborted."):i.reason;return e instanceof Error?e:yl(e)};function po(i,e){let{milliseconds:t,fallback:r,message:s,customTimers:o={setTimeout,clearTimeout}}=e,a,n,f=new Promise((m,c)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(e.signal){let{signal:w}=e;w.aborted&&c(Ql(w)),n=()=>{c(Ql(w))},w.addEventListener("abort",n,{once:!0})}if(t===Number.POSITIVE_INFINITY){i.then(m,c);return}let v=new tr;a=o.setTimeout.call(void 0,()=>{if(r){try{m(r())}catch(w){c(w)}return}typeof i.cancel=="function"&&i.cancel(),s===!1?m():s instanceof Error?c(s):(v.message=s??`Promise timed out after ${t} milliseconds`,c(v))},t),H(null,null,function*(){try{m(yield i)}catch(w){c(w)}})}).finally(()=>{f.clear(),n&&e.signal&&e.signal.removeEventListener("abort",n)});return f.clear=()=>{o.clearTimeout.call(void 0,a),a=void 0},f}function uo(i,e,t){let r=0,s=i.length;for(;s>0;){let o=Math.trunc(s/2),a=r+o;t(i[a],e)<=0?(r=++a,s-=o+1):s=o}return r}var Kr=class{#e=[];enqueue(e,t){t=B({priority:0},t);let r={priority:t.priority,id:t.id,run:e};if(this.size===0||this.#e[this.size-1].priority>=t.priority){this.#e.push(r);return}let s=uo(this.#e,r,(o,a)=>a.priority-o.priority);this.#e.splice(s,0,r)}setPriority(e,t){let r=this.#e.findIndex(o=>o.id===e);if(r===-1)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[s]=this.#e.splice(r,1);this.enqueue(s.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(t=>t.run)}get size(){return this.#e.length}};var $r=class extends no.default{#e;#t;#i=0;#r;#s;#p=0;#a;#n;#o;#c;#l=0;#u;#d;#h;#b=1n;timeout;constructor(e){if(super(),e=B({carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Kr},e),!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);this.#e=e.carryoverConcurrencyCount,this.#t=e.intervalCap===Number.POSITIVE_INFINITY||e.interval===0,this.#r=e.intervalCap,this.#s=e.interval,this.#o=new e.queueClass,this.#c=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#h=e.throwOnTimeout===!0,this.#d=e.autoStart===!1}get#F(){return this.#t||this.#i<this.#r}get#E(){return this.#l<this.#u}#B(){this.#l--,this.#Q(),this.emit("next")}#g(){this.#x(),this.#f(),this.#n=void 0}get#v(){let e=Date.now();if(this.#a===void 0){let t=this.#p-e;if(t<0)this.#i=this.#e?this.#l:0;else return this.#n===void 0&&(this.#n=setTimeout(()=>{this.#g()},t)),!0}return!1}#Q(){if(this.#o.size===0)return this.#a&&clearInterval(this.#a),this.#a=void 0,this.emit("empty"),this.#l===0&&this.emit("idle"),!1;if(!this.#d){let e=!this.#v;if(this.#F&&this.#E){let t=this.#o.dequeue();return t?(this.emit("active"),t(),e&&this.#f(),!0):!1}}return!1}#f(){this.#t||this.#a!==void 0||(this.#a=setInterval(()=>{this.#x()},this.#s),this.#p=Date.now()+this.#s)}#x(){this.#i===0&&this.#l===0&&this.#a&&(clearInterval(this.#a),this.#a=void 0),this.#i=this.#e?this.#l:0,this.#m()}#m(){for(;this.#Q(););}get concurrency(){return this.#u}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#u=e,this.#m()}#S(e){return H(this,null,function*(){return new Promise((t,r)=>{e.addEventListener("abort",()=>{r(e.reason)},{once:!0})})})}setPriority(e,t){this.#o.setPriority(e,t)}add(r){return H(this,arguments,function*(e,t={}){return t.id??=(this.#b++).toString(),t=B({timeout:this.timeout,throwOnTimeout:this.#h},t),new Promise((s,o)=>{this.#o.enqueue(()=>H(this,null,function*(){this.#l++;try{t.signal?.throwIfAborted(),this.#i++;let a=e({signal:t.signal});t.timeout&&(a=po(Promise.resolve(a),{milliseconds:t.timeout})),t.signal&&(a=Promise.race([a,this.#S(t.signal)]));let n=yield a;s(n),this.emit("completed",n)}catch(a){if(a instanceof tr&&!t.throwOnTimeout){s();return}o(a),this.emit("error",a)}finally{this.#B()}}),t),this.emit("add"),this.#Q()})})}addAll(e,t){return H(this,null,function*(){return Promise.all(e.map(r=>H(this,null,function*(){return this.add(r,t)})))})}start(){return this.#d?(this.#d=!1,this.#m(),this):this}pause(){this.#d=!0}clear(){this.#o=new this.#c}onEmpty(){return H(this,null,function*(){this.#o.size!==0&&(yield this.#y("empty"))})}onSizeLessThan(e){return H(this,null,function*(){this.#o.size<e||(yield this.#y("next",()=>this.#o.size<e))})}onIdle(){return H(this,null,function*(){this.#l===0&&this.#o.size===0||(yield this.#y("idle"))})}#y(e,t){return H(this,null,function*(){return new Promise(r=>{let s=()=>{t&&!t()||(this.off(e,s),r())};this.on(e,s)})})}get size(){return this.#o.size}sizeBy(e){return this.#o.filter(e).length}get pending(){return this.#l}get isPaused(){return this.#d}};var nh=i=>i.map(e=>B({},e)),es=nh;var xl=(i,e,t,r,s)=>H(null,null,function*(){let o=[],a=t.cached?t.nextPagePath:t.id;for(;a;){let c=yield r(a);o=o.concat(c.items),a=c.nextPagePath}let n=o.filter(c=>c.isFolder===!0),u=o.filter(c=>c.isFolder===!1),f=n.map(c=>({type:"folder",id:c.requestPath,cached:!1,nextPagePath:null,status:"checked",parentId:t.id,data:c})),m=u.map(c=>{let v=s(c);return{type:"file",id:c.requestPath,restrictionError:v,status:v?"unchecked":"checked",parentId:t.id,data:c}});t.cached=!0,t.nextPagePath=null,e.push(...m,...f),f.forEach(c=>H(null,null,function*(){i.add(()=>xl(i,e,c,r,s))}))}),lh=(i,e,t,r)=>H(null,null,function*(){let s=new $r({concurrency:6}),o=es(i);return o.filter(n=>n.type==="folder"&&n.status==="checked"&&(n.cached===!1||n.nextPagePath)).forEach(n=>{s.add(()=>xl(s,o,n,e,t))}),s.on("completed",()=>{let n=o.filter(u=>u.type==="file"&&u.status==="checked").length;r(n)}),yield s.onIdle(),o}),bl=lh;var ph=(i,e,t,r,s)=>{let o=e.filter(D=>!i.find(G=>G.id===D.requestPath)),a=o.filter(D=>D.isFolder===!0),n=o.filter(D=>D.isFolder===!1),u=t.type==="folder"&&t.status==="checked",f=a.map(D=>({type:"folder",id:D.requestPath,cached:!1,nextPagePath:null,status:u?"checked":"unchecked",parentId:t.id,data:D})),m=n.map(D=>{let G=s(D);return{type:"file",id:D.requestPath,restrictionError:G,status:u&&!G?"checked":"unchecked",parentId:t.id,data:D}}),c=J(B({},t),{cached:!0,nextPagePath:r});return[...i.map(D=>D.id===c.id?c:D),...f,...m]},Fl=ph;var dh=(i,e,t,r,s)=>{let o=i.find(D=>D.id===e),a=t.filter(D=>D.isFolder===!0),n=t.filter(D=>D.isFolder===!1),u=J(B({},o),{nextPagePath:r}),f=i.map(D=>D.id===u.id?u:D),m=u.type==="folder"&&u.status==="checked",c=a.map(D=>({type:"folder",id:D.requestPath,cached:!1,nextPagePath:null,status:m?"checked":"unchecked",parentId:u.id,data:D})),v=n.map(D=>{let G=s(D);return{type:"file",id:D.requestPath,restrictionError:G,status:m&&!G?"checked":"unchecked",parentId:u.id,data:D}});return[...f,...c,...v]},Bl=dh;var Ul=(i,e,t)=>{i.filter(s=>s.type!=="root"&&s.parentId===e).forEach(s=>{s.status=t&&!(s.type==="file"&&s.restrictionError)?"checked":"unchecked",Ul(i,s.id,t)})},El=(i,e)=>{let t=i.find(a=>a.id===e);if(t.type==="root")return;let r=i.filter(a=>a.type!=="root"&&a.parentId===t.id&&!(a.type==="file"&&a.restrictionError)),s=r.every(a=>a.status==="checked"),o=r.every(a=>a.status==="unchecked");s&&t.cached?t.status="checked":o?t.status="unchecked":t.status="partial",El(i,t.parentId)},uh=(i,e)=>{let t=es(i),r=t.filter(s=>s.type!=="root"&&e.includes(s.id));return r.forEach(s=>{let o=s.status==="checked"?"unchecked":"checked";s.type==="file"?s.status=s.restrictionError?"unchecked":o:s.status=o,Ul(t,s.id,s.status==="checked")}),El(t,r[0].parentId),t},vl=uh;var ir={afterOpenFolder:Fl,afterScrollFolder:Bl,afterToggleCheckbox:vl,afterFill:bl};var hh=i=>{let{scrollHeight:e,scrollTop:t,offsetHeight:r}=i.target;return e-(t+r)<50},Sl=hh;var wl=we($e(),1);var ch=({i18n:i,item:e,toggleCheckbox:t,openFolder:r})=>{let s="restrictionError"in e&&e.restrictionError!=null&&e.status!=="checked";return l("li",{className:(0,wl.default)("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--disabled":s},{"uppy-ProviderBrowserItem--noPreview":e.data.icon==="video"},{"uppy-ProviderBrowserItem--is-checked":e.status==="checked"},{"uppy-ProviderBrowserItem--is-partial":e.status==="partial"}),title:("restrictionError"in e?e.restrictionError:void 0)??void 0,children:[l("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox",onChange:()=>t(e,!1),checked:e.status==="checked","aria-label":e.data.name??i("unnamed"),disabled:s,"data-uppy-super-focusable":!0}),l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowserItem-inner",disabled:s,"aria-label":e.data.name,onClick:()=>{e.data.isFolder&&r(e.id)},children:[l("div",{className:"uppy-ProviderBrowserItem-iconWrap",children:l(At,{itemIconString:e.data.icon})}),e.data.name??i("unnamed")]})]})},Dl=ch;var fh=({searchResults:i,toggleCheckbox:e,openFolder:t,i18n:r})=>i.length===0?l("div",{className:"uppy-Provider-empty",children:r("noFilesFound")}):l("div",{className:"uppy-ProviderBrowser-body",children:l("ul",{className:"uppy-ProviderBrowser-list",children:i.map(s=>l(Dl,{i18n:r,item:s,toggleCheckbox:e,openFolder:t},s.id))})}),Rl=fh;var Ll=we($e(),1);function ho(i){let{openFolder:e,title:t,breadcrumbsIcon:r,breadcrumbs:s,i18n:o}=i;return l("div",{className:"uppy-Provider-breadcrumbs",children:[l("div",{className:"uppy-Provider-breadcrumbsIcon",children:r}),s.map((a,n)=>l(Je,{children:[l("button",{type:"button",className:"uppy-u-reset uppy-c-btn",onClick:()=>e(a.id),children:a.type==="root"?t:a.data.name??o("unnamed")},a.id),s.length===n+1?"":" / "]}))]})}function co({i18n:i,logout:e,username:t}){return l(Je,{children:[t&&l("span",{className:"uppy-ProviderBrowser-user",children:t},"username"),l("button",{type:"button",onClick:e,className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowser-userLogout",children:i("logOut")},"logout")]})}function fo(i){return l("div",{className:"uppy-ProviderBrowser-header",children:l("div",{className:(0,Ll.default)("uppy-ProviderBrowser-headerBar",!i.showBreadcrumbs&&"uppy-ProviderBrowser-headerBar--simple"),children:[i.showBreadcrumbs&&l(ho,{openFolder:i.openFolder,breadcrumbs:i.breadcrumbs,breadcrumbsIcon:i.pluginIcon?.(),title:i.title,i18n:i.i18n}),l(co,{logout:i.logout,username:i.username,i18n:i.i18n})]})})}function rr(){return l("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30",children:l("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"})})}var Nl=i=>({authenticated:void 0,partialTree:[{type:"root",id:i,cached:!1,nextPagePath:null}],currentFolderId:i,searchString:"",didFirstRender:!1,username:null,loading:!1}),ts=class i{static VERSION=ol.version;static[Symbol.for("uppy test: searchDebounceMs")];plugin;provider;opts;isHandlingScroll=!1;previousCheckbox=null;#e;constructor(e,t){this.plugin=e,this.provider=t.provider;let r={viewType:"list",showTitles:!0,showFilter:!0,showBreadcrumbs:!0,loadAllFiles:!1,virtualList:!1};this.opts=B(B({},r),t),this.openFolder=this.openFolder.bind(this),this.logout=this.logout.bind(this),this.handleAuth=this.handleAuth.bind(this),this.handleScroll=this.handleScroll.bind(this),this.resetPluginState=this.resetPluginState.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.cancelSelection=this.cancelSelection.bind(this),this.toggleCheckbox=this.toggleCheckbox.bind(this),this.openSearchResultFolder=this.openSearchResultFolder.bind(this),this.clearSearchState=this.clearSearchState.bind(this),this.resetPluginState(),this.plugin.uppy.on("dashboard:close-panel",this.resetPluginState),this.plugin.uppy.registerRequestClient(this.provider.provider,this.provider);let s=Symbol.for("uppy test: searchDebounceMs"),o=i[s],a=o??500,n=o===0?{leading:!0,trailing:!0}:void 0;this.#e=(0,Cl.default)(this.#r,a,n)}resetPluginState(){this.plugin.setPluginState(Nl(this.plugin.rootFolderId))}tearDown(){}setLoading(e){this.plugin.setPluginState({loading:e})}get isLoading(){return this.plugin.getPluginState().loading}cancelSelection(){let{partialTree:e}=this.plugin.getPluginState(),t=e.map(r=>r.type==="root"?r:J(B({},r),{status:"unchecked"}));this.plugin.setPluginState({partialTree:t})}clearSearchState(){this.plugin.setPluginState({searchResults:void 0})}#t;#i(e){return H(this,null,function*(){this.#t?.abort();let t=new AbortController;this.#t=t;let r=()=>{t.abort()};try{this.plugin.uppy.on("dashboard:close-panel",r),this.plugin.uppy.on("cancel-all",r),yield e(t.signal)}finally{this.plugin.uppy.off("dashboard:close-panel",r),this.plugin.uppy.off("cancel-all",r),this.#t=void 0}})}#r(){return H(this,null,function*(){let{partialTree:e,currentFolderId:t,searchString:r}=this.plugin.getPluginState(),s=e.find(o=>o.id===t);if(r.trim()===""){this.#t?.abort(),this.clearSearchState();return}this.setLoading(!0),yield this.#i(o=>H(this,null,function*(){let a=s.type==="root"?void 0:t,{items:n}=yield this.provider.search(r,{signal:o,path:a}),{partialTree:u}=this.plugin.getPluginState(),f=[...u];for(let m of n){let v=decodeURIComponent(m.requestPath).split("/").filter(G=>G.length>0),w=this.plugin.rootFolderId,D;v.forEach((G,q,W)=>{let te=v.slice(0,q+1),j=encodeURIComponent(`/${te.join("/")}`),ue=f.find(U=>U.id===j&&U.type!=="root");if(ue){w=j,D=ue.status==="checked";return}let $=q===W.length-1,Q,x=D?"checked":"unchecked";if($)if(m.isFolder)Q={type:"folder",id:j,cached:!1,nextPagePath:null,status:x,parentId:w,data:m};else{let U=this.validateSingleFile(m);Q={type:"file",id:j,restrictionError:U,status:U?"unchecked":x,parentId:w,data:m}}else Q={type:"folder",id:j,cached:!1,nextPagePath:null,status:x,parentId:w,data:{name:decodeURIComponent(G),icon:"folder",isFolder:!0}};f.push(Q),w=j,D=x==="checked"})}this.plugin.setPluginState({partialTree:f,searchResults:n.map(m=>m.requestPath)})})).catch(si(this.plugin.uppy)),this.setLoading(!1)})}onSearchInput=e=>{this.plugin.setPluginState({searchString:e}),this.opts.supportsSearch&&this.#e()};openSearchResultFolder(e){return H(this,null,function*(){this.plugin.setPluginState({searchString:""}),yield this.openFolder(e)})}openFolder(e){return H(this,null,function*(){this.clearSearchState(),this.previousCheckbox=null;let{partialTree:t}=this.plugin.getPluginState(),r=t.find(s=>s.id===e);if(r.cached){this.plugin.setPluginState({currentFolderId:e,searchString:""});return}this.setLoading(!0),yield this.#i(s=>H(this,null,function*(){let o=e,a=[];do{let{username:u,nextPagePath:f,items:m}=yield this.provider.list(o,{signal:s});this.plugin.setPluginState({username:u}),o=f,a=a.concat(m),this.setLoading(this.plugin.uppy.i18n("loadedXFiles",{numFiles:a.length}))}while(this.opts.loadAllFiles&&o);let n=ir.afterOpenFolder(t,a,r,o,this.validateSingleFile);this.plugin.setPluginState({partialTree:n,currentFolderId:e,searchString:""})})).catch(si(this.plugin.uppy)),this.setLoading(!1)})}logout(){return H(this,null,function*(){yield this.#i(e=>H(this,null,function*(){let t=yield this.provider.logout({signal:e});if(t.ok){if(!t.revoked){let r=this.plugin.uppy.i18n("companionUnauthorizeHint",{provider:this.plugin.title,url:t.manual_revoke_url});this.plugin.uppy.info(r,"info",7e3)}this.plugin.setPluginState(J(B({},Nl(this.plugin.rootFolderId)),{authenticated:!1}))}})).catch(si(this.plugin.uppy))})}handleAuth(e){return H(this,null,function*(){yield this.#i(t=>H(this,null,function*(){this.setLoading(!0),yield this.provider.login({authFormData:e,signal:t}),this.plugin.setPluginState({authenticated:!0}),yield Promise.all([this.provider.fetchPreAuthToken(),this.openFolder(this.plugin.rootFolderId)])})).catch(si(this.plugin.uppy)),this.setLoading(!1)})}handleScroll(e){return H(this,null,function*(){let{partialTree:t,currentFolderId:r}=this.plugin.getPluginState(),s=t.find(o=>o.id===r);Sl(e)&&!this.isHandlingScroll&&s.nextPagePath&&(this.isHandlingScroll=!0,yield this.#i(o=>H(this,null,function*(){let{nextPagePath:a,items:n}=yield this.provider.list(s.nextPagePath,{signal:o}),u=ir.afterScrollFolder(t,r,n,a,this.validateSingleFile);this.plugin.setPluginState({partialTree:u})})).catch(si(this.plugin.uppy)),this.isHandlingScroll=!1)})}validateSingleFile=e=>{let t=Mr(e);return this.plugin.uppy.validateSingleFile(t)};donePicking(){return H(this,null,function*(){let{partialTree:e}=this.plugin.getPluginState();this.isLoading||(this.setLoading(!0),yield this.#i(t=>H(this,null,function*(){let r=yield ir.afterFill(e,a=>this.provider.list(a,{signal:t}),this.validateSingleFile,a=>{this.setLoading(this.plugin.uppy.i18n("addedNumFiles",{numFiles:a}))});if(this.validateAggregateRestrictions(r)){this.plugin.setPluginState({partialTree:r});return}let o=fl(r);dl(o,this.plugin,this.provider),this.resetPluginState()})).catch(si(this.plugin.uppy)),this.setLoading(!1))})}toggleCheckbox(e,t){let{partialTree:r}=this.plugin.getPluginState(),s=ul(e.id,this.getDisplayedPartialTree(),t,this.previousCheckbox),o=ir.afterToggleCheckbox(r,s);this.plugin.setPluginState({partialTree:o}),this.previousCheckbox=e.id}getDisplayedPartialTree=()=>{let{partialTree:e,currentFolderId:t,searchString:r}=this.plugin.getPluginState(),s=e.filter(a=>a.type!=="root"&&a.parentId===t);return this.opts.supportsSearch||r.trim()===""?s:s.filter(a=>(a.data.name??this.plugin.uppy.i18n("unnamed")).toLowerCase().indexOf(r.trim().toLowerCase())!==-1)};getBreadcrumbs=()=>{let{partialTree:e,currentFolderId:t}=this.plugin.getPluginState();return hl(e,t)};getSelectedAmount=()=>{let{partialTree:e}=this.plugin.getPluginState();return qr(e)};validateAggregateRestrictions=e=>{let r=e.filter(s=>s.type==="file"&&s.status==="checked").map(s=>s.data);return this.plugin.uppy.validateAggregateRestrictions(r)};#s(){let{i18n:e}=this.plugin.uppy,{searchResults:t,partialTree:r}=this.plugin.getPluginState(),s=new Map;r.forEach(a=>{a.type!=="root"&&s.set(a.id,a)});let o=t.map(a=>{let n=s.get(a);if(n==null)throw new Error("Partial tree not complete");return n});return l(Rl,{searchResults:o,openFolder:this.openSearchResultFolder,toggleCheckbox:this.toggleCheckbox,i18n:e})}render(e,t={}){let{didFirstRender:r}=this.plugin.getPluginState(),{i18n:s}=this.plugin.uppy;r||(this.plugin.setPluginState({didFirstRender:!0}),this.provider.fetchPreAuthToken(),this.openFolder(this.plugin.rootFolderId));let o=B(B({},this.opts),t),{authenticated:a,loading:n}=this.plugin.getPluginState(),u=this.plugin.icon||rr;if(a===!1)return l(to,{pluginName:this.plugin.title,pluginIcon:u,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18n,renderForm:o.renderAuthForm,loading:n});let{partialTree:f,username:m,searchString:c,searchResults:v}=this.plugin.getPluginState(),w=this.getBreadcrumbs();return l("div",{className:(0,kl.default)("uppy-ProviderBrowser",`uppy-ProviderBrowser-viewType--${o.viewType}`),children:[l(fo,{showBreadcrumbs:o.showBreadcrumbs,openFolder:this.openFolder,breadcrumbs:w,pluginIcon:u,title:this.plugin.title,logout:this.logout,username:m,i18n:s}),o.showFilter&&l(sl,{value:c,onChange:D=>this.onSearchInput(D),onSubmit:()=>{},inputLabel:s("filter"),i18n:s}),v?this.#s():l(nl,{toggleCheckbox:this.toggleCheckbox,displayedPartialTree:this.getDisplayedPartialTree(),openFolder:this.openFolder,virtualList:o.virtualList,noResultsLabel:s("noFilesFound"),handleScroll:this.handleScroll,viewType:o.viewType,showTitles:o.showTitles,i18n:this.plugin.uppy.i18n,isLoading:n,utmSource:"Companion"}),l(oo,{partialTree:f,donePicking:this.donePicking,cancelSelection:this.cancelSelection,i18n:s,validateAggregateRestrictions:this.validateAggregateRestrictions})]})}};function Be(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}var Ol=typeof self<"u"?self:global,nr=typeof navigator<"u",mh=nr&&typeof HTMLImageElement>"u",Tl=!(typeof global>"u"||typeof process>"u"||!process.versions||!process.versions.node),Gl=Ol.Buffer,Hl=!!Gl,gh=i=>i!==void 0;function jl(i){return i===void 0||(i instanceof Map?i.size===0:Object.values(i).filter(gh).length===0)}function Ze(i){let e=new Error(i);throw delete e.stack,e}function Il(i){let e=(function(t){let r=0;return t.ifd0.enabled&&(r+=1024),t.exif.enabled&&(r+=2048),t.makerNote&&(r+=2048),t.userComment&&(r+=1024),t.gps.enabled&&(r+=512),t.interop.enabled&&(r+=100),t.ifd1.enabled&&(r+=1024),r+2048})(i);return i.jfif.enabled&&(e+=50),i.xmp.enabled&&(e+=2e4),i.iptc.enabled&&(e+=14e3),i.icc.enabled&&(e+=6e3),e}var mo=i=>String.fromCharCode.apply(null,i),Pl=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0,ai=class i{static from(e,t){return e instanceof this&&e.le===t?e:new i(e,void 0,void 0,t)}constructor(e,t=0,r,s){if(typeof s=="boolean"&&(this.le=s),Array.isArray(e)&&(e=new Uint8Array(e)),e===0)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){r===void 0&&(r=e.byteLength-t);let o=new DataView(e,t,r);this._swapDataView(o)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof i){r===void 0&&(r=e.byteLength-t),(t+=e.byteOffset)+r>e.byteOffset+e.byteLength&&Ze("Creating view outside of available memory in ArrayBuffer");let o=new DataView(e.buffer,t,r);this._swapDataView(o)}else if(typeof e=="number"){let o=new DataView(new ArrayBuffer(e));this._swapDataView(o)}else Ze("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,r=i){return e instanceof DataView||e instanceof i?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||Ze("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new r(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new i(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return s=this.getUint8Array(e,t),Pl?Pl.decode(s):Hl?Buffer.from(s).toString("utf8"):decodeURIComponent(escape(mo(s)));var s}getLatin1String(e=0,t=this.byteLength){let r=this.getUint8Array(e,t);return mo(r)}getUnicodeString(e=0,t=this.byteLength){let r=[];for(let s=0;s<t&&e+s<this.byteLength;s+=2)r.push(this.getUint16(e+s));return mo(r)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,r){switch(t){case 1:return this.getUint8(e,r);case 2:return this.getUint16(e,r);case 4:return this.getUint32(e,r);case 8:return this.getUint64&&this.getUint64(e,r)}}getUint(e,t,r){switch(t){case 8:return this.getUint8(e,r);case 16:return this.getUint16(e,r);case 32:return this.getUint32(e,r);case 64:return this.getUint64&&this.getUint64(e,r)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}};function yo(i,e){Ze(`${i} '${e}' was not loaded, try using full build of exifr.`)}var lr=class extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||yo(this.kind,e),t&&(e in t||(function(r,s){Ze(`Unknown ${r} '${s}'.`)})(this.kind,e),t[e].enabled||yo(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}},as=new lr("file parser"),lt=new lr("segment parser"),ur=new lr("file reader"),yh=Ol.fetch;function _l(i,e){return(t=i).startsWith("data:")||t.length>1e4?xo(i,e,"base64"):Tl&&i.includes("://")?Qo(i,e,"url",is):Tl?xo(i,e,"fs"):nr?Qo(i,e,"url",is):void Ze("Invalid input argument");var t}function Qo(i,e,t,r){return H(this,null,function*(){return ur.has(t)?xo(i,e,t):r?(function(s,o){return H(this,null,function*(){let a=yield o(s);return new ai(a)})})(i,r):void Ze(`Parser ${t} is not loaded`)})}function xo(i,e,t){return H(this,null,function*(){let r=new(ur.get(t))(i,e);return yield r.read(),r})}var is=i=>yh(i).then(e=>e.arrayBuffer()),pr=i=>new Promise((e,t)=>{let r=new FileReader;r.onloadend=()=>e(r.result||new ArrayBuffer),r.onerror=t,r.readAsArrayBuffer(i)}),bo=class extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}};function Jl(i,e,t){let r=new bo;for(let[s,o]of t)r.set(s,o);if(Array.isArray(e))for(let s of e)i.set(s,r);else i.set(e,r);return r}function Zl(i,e,t){let r,s=i.get(e);for(r of t)s.set(r[0],r[1])}var hr=new Map,vo=new Map,So=new Map,Ei=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],ns=["jfif","xmp","icc","iptc","ihdr"],dr=["tiff",...ns],ze=["ifd0","ifd1","exif","gps","interop"],vi=[...dr,...ze],Si=["makerNote","userComment"],ls=["translateKeys","translateValues","reviveValues","multiSegment"],wi=[...ls,"sanitize","mergeOutput","silentErrors"],rs=class{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}},oi=class extends rs{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,r,s){if(super(),Be(this,"enabled",!1),Be(this,"skip",new Set),Be(this,"pick",new Set),Be(this,"deps",new Set),Be(this,"translateKeys",!1),Be(this,"translateValues",!1),Be(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(s),this.canBeFiltered=ze.includes(e),this.canBeFiltered&&(this.dict=hr.get(e)),r!==void 0)if(Array.isArray(r))this.parse=this.enabled=!0,this.canBeFiltered&&r.length>0&&this.translateTagSet(r,this.pick);else if(typeof r=="object"){if(this.enabled=!0,this.parse=r.parse!==!1,this.canBeFiltered){let{pick:o,skip:a}=r;o&&o.length>0&&this.translateTagSet(o,this.pick),a&&a.length>0&&this.translateTagSet(a,this.skip)}this.applyInheritables(r)}else r===!0||r===!1?this.parse=this.enabled=r:Ze(`Invalid options argument: ${r}`)}applyInheritables(e){let t,r;for(t of ls)r=e[t],r!==void 0&&(this[t]=r)}translateTagSet(e,t){if(this.dict){let r,s,{tagKeys:o,tagValues:a}=this.dict;for(r of e)typeof r=="string"?(s=a.indexOf(r),s===-1&&(s=o.indexOf(Number(r))),s!==-1&&t.add(Number(o[s]))):t.add(r)}else for(let r of e)t.add(r)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,ss(this.pick,this.deps)):this.enabled&&this.pick.size>0&&ss(this.pick,this.deps)}},tt={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Vl=new Map,ni=class extends rs{static useCached(e){let t=Vl.get(e);return t!==void 0||(t=new this(e),Vl.set(e,t)),t}constructor(e){super(),e===!0?this.setupFromTrue():e===void 0?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):typeof e=="object"?this.setupFromObject(e):Ze(`Invalid options argument ${e}`),this.firstChunkSize===void 0&&(this.firstChunkSize=nr?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of Ei)this[e]=tt[e];for(e of wi)this[e]=tt[e];for(e of Si)this[e]=tt[e];for(e of vi)this[e]=new oi(e,tt[e],void 0,this)}setupFromTrue(){let e;for(e of Ei)this[e]=tt[e];for(e of wi)this[e]=tt[e];for(e of Si)this[e]=!0;for(e of vi)this[e]=new oi(e,!0,void 0,this)}setupFromArray(e){let t;for(t of Ei)this[t]=tt[t];for(t of wi)this[t]=tt[t];for(t of Si)this[t]=tt[t];for(t of vi)this[t]=new oi(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,ze)}setupFromObject(e){let t;for(t of(ze.ifd0=ze.ifd0||ze.image,ze.ifd1=ze.ifd1||ze.thumbnail,Object.assign(this,e),Ei))this[t]=go(e[t],tt[t]);for(t of wi)this[t]=go(e[t],tt[t]);for(t of Si)this[t]=go(e[t],tt[t]);for(t of dr)this[t]=new oi(t,tt[t],e[t],this);for(t of ze)this[t]=new oi(t,tt[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,ze,vi),e.tiff===!0?this.batchEnableWithBool(ze,!0):e.tiff===!1?this.batchEnableWithUserValue(ze,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,ze):typeof e.tiff=="object"&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,ze)}batchEnableWithBool(e,t){for(let r of e)this[r].enabled=t}batchEnableWithUserValue(e,t){for(let r of e){let s=t[r];this[r].enabled=s!==!1&&s!==void 0}}setupGlobalFilters(e,t,r,s=r){if(e&&e.length){for(let a of s)this[a].enabled=!1;let o=Ml(e,r);for(let[a,n]of o)ss(this[a].pick,n),this[a].enabled=!0}else if(t&&t.length){let o=Ml(t,r);for(let[a,n]of o)ss(this[a].skip,n)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:r,iptc:s,icc:o}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),r.enabled||e.skip.add(700),s.enabled||e.skip.add(33723),o.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:r,interop:s}=this;s.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),r.needed&&e.deps.add(34853),this.tiff.enabled=ze.some(o=>this[o].enabled===!0)||this.makerNote||this.userComment;for(let o of ze)this[o].finalizeFilters()}get onlyTiff(){return!ns.map(e=>this[e].enabled).some(e=>e===!0)&&this.tiff.enabled}checkLoadedPlugins(){for(let e of dr)this[e].enabled&&!lt.has(e)&&yo("segment parser",e)}};function Ml(i,e){let t,r,s,o,a=[];for(s of e){for(o of(t=hr.get(s),r=[],t))(i.includes(o[0])||i.includes(o[1]))&&r.push(o[0]);r.length&&a.push([s,r])}return a}function go(i,e){return i!==void 0?i:e!==void 0?e:void 0}function ss(i,e){for(let t of e)i.add(t)}Be(ni,"default",tt);var Di=class{constructor(e){Be(this,"parsers",{}),Be(this,"output",{}),Be(this,"errors",[]),Be(this,"pushToErrors",t=>this.errors.push(t)),this.options=ni.useCached(e)}read(e){return H(this,null,function*(){this.file=yield(function(t,r){return typeof t=="string"?_l(t,r):nr&&!mh&&t instanceof HTMLImageElement?_l(t.src,r):t instanceof Uint8Array||t instanceof ArrayBuffer||t instanceof DataView?new ai(t):nr&&t instanceof Blob?Qo(t,r,"blob",pr):void Ze("Invalid input argument")})(e,this.options)})}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[r,s]of as)if(s.canHandle(e,t))return this.fileParser=new s(this.options,this.file,this.parsers),e[r]=!0;this.file.close&&this.file.close(),Ze("Unknown file format")}parse(){return H(this,null,function*(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(yield this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):yield this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),jl(r=e)?void 0:r;var r})}executeParsers(){return H(this,null,function*(){let{output:e}=this;yield this.fileParser.parse();let t=Object.values(this.parsers).map(r=>H(this,null,function*(){let s=yield r.parse();r.assignToOutput(e,s)}));this.options.silentErrors&&(t=t.map(r=>r.catch(this.pushToErrors))),yield Promise.all(t)})}extractThumbnail(){return H(this,null,function*(){this.setup();let{options:e,file:t}=this,r=lt.get("tiff",e);var s;if(t.tiff?s={start:0,type:"tiff"}:t.jpeg&&(s=yield this.fileParser.getOrFindSegment("tiff")),s===void 0)return;let o=yield this.fileParser.ensureSegmentChunk(s),a=this.parsers.tiff=new r(o,e,t),n=yield a.extractThumbnail();return t.close&&t.close(),n})}};function Wl(i,e){return H(this,null,function*(){let t=new Di(e);return yield t.read(i),t.parse()})}var Qh=Object.freeze({__proto__:null,parse:Wl,Exifr:Di,fileParsers:as,segmentParsers:lt,fileReaders:ur,tagKeys:hr,tagValues:vo,tagRevivers:So,createDictionary:Jl,extendDictionary:Zl,fetchUrlAsArrayBuffer:is,readBlobAsArrayBuffer:pr,chunkedProps:Ei,otherSegments:ns,segments:dr,tiffBlocks:ze,segmentsAndBlocks:vi,tiffExtractables:Si,inheritables:ls,allFormatters:wi,Options:ni}),Ot=class{static findPosition(e,t){let r=e.getUint16(t+2)+2,s=typeof this.headerLength=="function"?this.headerLength(e,t,r):this.headerLength,o=t+s,a=r-s;return{offset:t,length:r,headerLength:s,start:o,size:a,end:o+a}}static parse(e,t={}){return new this(e,new ni({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof ai?e:new ai(e)}constructor(e,t={},r){Be(this,"errors",[]),Be(this,"raw",new Map),Be(this,"handleError",s=>{if(!this.options.silentErrors)throw s;this.errors.push(s.message)}),this.chunk=this.normalizeInput(e),this.file=r,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let r=So.get(t),s=vo.get(t),o=hr.get(t),a=this.options[t],n=a.reviveValues&&!!r,u=a.translateValues&&!!s,f=a.translateKeys&&!!o,m={};for(let[c,v]of e)n&&r.has(c)?v=r.get(c)(v):u&&s.has(c)&&(v=this.translateValue(v,s.get(c))),f&&o.has(c)&&(c=o.get(c)||c),m[c]=v;return m}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,r){if(this.globalOptions.mergeOutput)return Object.assign(e,r);e[t]?Object.assign(e[t],r):e[t]=r}};Be(Ot,"headerLength",4),Be(Ot,"type",void 0),Be(Ot,"multiSegment",!1),Be(Ot,"canHandle",()=>!1);function xh(i){return i===192||i===194||i===196||i===219||i===221||i===218||i===254}function bh(i){return i>=224&&i<=239}function Fh(i,e,t){for(let[r,s]of lt)if(s.canHandle(i,e,t))return r}var os=class extends class{constructor(e,t,r){Be(this,"errors",[]),Be(this,"ensureSegmentChunk",s=>H(this,null,function*(){let o=s.start,a=s.size||65536;if(this.file.chunked)if(this.file.available(o,a))s.chunk=this.file.subarray(o,a);else try{s.chunk=yield this.file.readChunk(o,a)}catch(n){Ze(`Couldn't read segment: ${JSON.stringify(s)}. ${n.message}`)}else this.file.byteLength>o+a?s.chunk=this.file.subarray(o,a):s.size===void 0?s.chunk=this.file.subarray(o):Ze("Segment unreachable: "+JSON.stringify(s));return s.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=r}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let r=new(lt.get(e))(t,this.options,this.file);return this.parsers[e]=r}createParsers(e){for(let t of e){let{type:r,chunk:s}=t,o=this.options[r];if(o&&o.enabled){let a=this.parsers[r];a&&a.append||a||this.createParser(r,s)}}}readSegments(e){return H(this,null,function*(){let t=e.map(this.ensureSegmentChunk);yield Promise.all(t)})}}{constructor(...e){super(...e),Be(this,"appSegments",[]),Be(this,"jpegSegments",[]),Be(this,"unknownSegments",[])}static canHandle(e,t){return t===65496}parse(){return H(this,null,function*(){yield this.findAppSegments(),yield this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)})}setupSegmentFinderArgs(e){e===!0?(this.findAll=!0,this.wanted=new Set(lt.keyList())):(e=e===void 0?lt.keyList().filter(t=>this.options[t].enabled):e.filter(t=>this.options[t].enabled&<.has(t)),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}findAppSegments(e=0,t){return H(this,null,function*(){this.setupSegmentFinderArgs(t);let{file:r,findAll:s,wanted:o,remaining:a}=this;if(!s&&this.file.chunked&&(s=Array.from(o).some(n=>{let u=lt.get(n),f=this.options[n];return u.multiSegment&&f.multiSegment}),s&&(yield this.file.readWhole())),e=this.findAppSegmentsInRange(e,r.byteLength),!this.options.onlyTiff&&r.chunked){let n=!1;for(;a.size>0&&!n&&(r.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:u}=r,f=this.appSegments.some(m=>!this.file.available(m.offset||m.start,m.length||m.size));if(n=e>u&&!f?!(yield r.readNextChunk(e)):!(yield r.readNextChunk(u)),(e=this.findAppSegmentsInRange(e,r.byteLength))===void 0)return}}})}findAppSegmentsInRange(e,t){t-=2;let r,s,o,a,n,u,{file:f,findAll:m,wanted:c,remaining:v,options:w}=this;for(;e<t;e++)if(f.getUint8(e)===255){if(r=f.getUint8(e+1),bh(r)){if(s=f.getUint16(e+2),o=Fh(f,e,s),o&&c.has(o)&&(a=lt.get(o),n=a.findPosition(f,e),u=w[o],n.type=o,this.appSegments.push(n),!m&&(a.multiSegment&&u.multiSegment?(this.unfinishedMultiSegment=n.chunkNumber<n.chunkCount,this.unfinishedMultiSegment||v.delete(o)):v.delete(o),v.size===0)))break;w.recordUnknownSegments&&(n=Ot.findPosition(f,e),n.marker=r,this.unknownSegments.push(n)),e+=s+1}else if(xh(r)){if(s=f.getUint16(e+2),r===218&&w.stopAfterSos!==!1)return;w.recordJpegSegments&&this.jpegSegments.push({offset:e,length:s,marker:r}),e+=s+1}}return e}mergeMultiSegments(){if(!this.appSegments.some(t=>t.multiSegment))return;let e=(function(t,r){let s,o,a,n=new Map;for(let u=0;u<t.length;u++)s=t[u],o=s[r],n.has(o)?a=n.get(o):n.set(o,a=[]),a.push(s);return Array.from(n)})(this.appSegments,"type");this.mergedAppSegments=e.map(([t,r])=>{let s=lt.get(t,this.options);return s.handleMultiSegments?{type:t,chunk:s.handleMultiSegments(r)}:r[0]})}getSegment(e){return this.appSegments.find(t=>t.type===e)}getOrFindSegment(e){return H(this,null,function*(){let t=this.getSegment(e);return t===void 0&&(yield this.findAppSegments(0,[e]),t=this.getSegment(e)),t})}};Be(os,"type","jpeg"),as.set("jpeg",os);var Bh=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4],Fo=class extends Ot{parseHeader(){var e=this.chunk.getUint16();e===18761?this.le=!0:e===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,r=new Map){let{pick:s,skip:o}=this.options[t];s=new Set(s);let a=s.size>0,n=o.size===0,u=this.chunk.getUint16(e);e+=2;for(let f=0;f<u;f++){let m=this.chunk.getUint16(e);if(a){if(s.has(m)&&(r.set(m,this.parseTag(e,m,t)),s.delete(m),s.size===0))break}else!n&&o.has(m)||r.set(m,this.parseTag(e,m,t));e+=12}return r}parseTag(e,t,r){let{chunk:s}=this,o=s.getUint16(e+2),a=s.getUint32(e+4),n=Bh[o];if(n*a<=4?e+=8:e=s.getUint32(e+8),(o<1||o>13)&&Ze(`Invalid TIFF value type. block: ${r.toUpperCase()}, tag: ${t.toString(16)}, type: ${o}, offset ${e}`),e>s.byteLength&&Ze(`Invalid TIFF value offset. block: ${r.toUpperCase()}, tag: ${t.toString(16)}, type: ${o}, offset ${e} is outside of chunk size ${s.byteLength}`),o===1)return s.getUint8Array(e,a);if(o===2)return(u=(function(f){for(;f.endsWith("\0");)f=f.slice(0,-1);return f})(u=s.getString(e,a)).trim())===""?void 0:u;var u;if(o===7)return s.getUint8Array(e,a);if(a===1)return this.parseTagValue(o,e);{let f=new((function(c){switch(c){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}})(o))(a),m=n;for(let c=0;c<a;c++)f[c]=this.parseTagValue(o,e),e+=m;return f}}parseTagValue(e,t){let{chunk:r}=this;switch(e){case 1:return r.getUint8(t);case 3:return r.getUint16(t);case 4:return r.getUint32(t);case 5:return r.getUint32(t)/r.getUint32(t+4);case 6:return r.getInt8(t);case 8:return r.getInt16(t);case 9:return r.getInt32(t);case 10:return r.getInt32(t)/r.getInt32(t+4);case 11:return r.getFloat(t);case 12:return r.getDouble(t);case 13:return r.getUint32(t);default:Ze(`Invalid tiff type ${e}`)}}},ar=class extends Fo{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1165519206&&e.getUint16(t+8)===0}parse(){return H(this,null,function*(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&(yield this.parseIfd0Block()),e.exif.enabled&&(yield this.safeParse("parseExifBlock")),e.gps.enabled&&(yield this.safeParse("parseGpsBlock")),e.interop.enabled&&(yield this.safeParse("parseInteropBlock")),e.ifd1.enabled&&(yield this.safeParse("parseThumbnailBlock")),this.createOutput()})}safeParse(e){let t=this[e]();return t.catch!==void 0&&(t=t.catch(this.handleError)),t}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let r=new Map;return this[t]=r,this.parseTags(e,t,r),r}parseIfd0Block(){return H(this,null,function*(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&Ze("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&Ze(`IFD0 offset points to outside of file.
|
|
17
|
+
this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&(yield e.ensureChunk(this.ifd0Offset,Il(this.options)));let t=this.parseBlock(this.ifd0Offset,"ifd0");return t.size!==0?(this.exifOffset=t.get(34665),this.interopOffset=t.get(40965),this.gpsOffset=t.get(34853),this.xmp=t.get(700),this.iptc=t.get(33723),this.icc=t.get(34675),this.options.sanitize&&(t.delete(34665),t.delete(40965),t.delete(34853),t.delete(700),t.delete(33723),t.delete(34675)),t):void 0})}parseExifBlock(){return H(this,null,function*(){if(this.exif||(this.ifd0||(yield this.parseIfd0Block()),this.exifOffset===void 0))return;this.file.tiff&&(yield this.file.ensureChunk(this.exifOffset,Il(this.options)));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(40965)),this.makerNote=e.get(37500),this.userComment=e.get(37510),this.options.sanitize&&(e.delete(40965),e.delete(37500),e.delete(37510)),this.unpack(e,41728),this.unpack(e,41729),e})}unpack(e,t){let r=e.get(t);r&&r.length===1&&e.set(t,r[0])}parseGpsBlock(){return H(this,null,function*(){if(this.gps||(this.ifd0||(yield this.parseIfd0Block()),this.gpsOffset===void 0))return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",zl(...e.get(2),e.get(1))),e.set("longitude",zl(...e.get(4),e.get(3)))),e})}parseInteropBlock(){return H(this,null,function*(){if(!this.interop&&(this.ifd0||(yield this.parseIfd0Block()),this.interopOffset!==void 0||this.exif||(yield this.parseExifBlock()),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,"interop")})}parseThumbnailBlock(e=!1){return H(this,null,function*(){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1})}extractThumbnail(){return H(this,null,function*(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||(yield this.parseThumbnailBlock(!0)),this.ifd1===void 0)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)})}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,r,s={};for(t of ze)if(e=this[t],!jl(e))if(r=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if(t==="ifd1")continue;Object.assign(s,r)}else s[t]=r;return this.makerNote&&(s.makerNote=this.makerNote),this.userComment&&(s.userComment=this.userComment),s}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[r,s]of Object.entries(t))this.assignObjectToOutput(e,r,s)}};function zl(i,e,t,r){var s=i+e/60+t/3600;return r!=="S"&&r!=="W"||(s*=-1),s}Be(ar,"type","tiff"),Be(ar,"headerLength",10),lt.set("tiff",ar);var yy=Object.freeze({__proto__:null,default:Qh,Exifr:Di,fileParsers:as,segmentParsers:lt,fileReaders:ur,tagKeys:hr,tagValues:vo,tagRevivers:So,createDictionary:Jl,extendDictionary:Zl,fetchUrlAsArrayBuffer:is,readBlobAsArrayBuffer:pr,chunkedProps:Ei,otherSegments:ns,segments:dr,tiffBlocks:ze,segmentsAndBlocks:vi,tiffExtractables:Si,inheritables:ls,allFormatters:wi,Options:ni,parse:Wl}),wo={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},Qy=Object.assign({},wo,{firstChunkSize:4e4,gps:[1,2,3,4]});var xy=Object.assign({},wo,{tiff:!1,ifd1:!0,mergeOutput:!1});var Uh=Object.assign({},wo,{firstChunkSize:4e4,ifd0:[274]});function Eh(i){return H(this,null,function*(){let e=new Di(Uh);yield e.read(i);let t=yield e.parse();if(t&&t.ifd0)return t.ifd0[274]})}var vh=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}}),sr=!0,or=!0;if(typeof navigator=="object"){let i=navigator.userAgent;if(i.includes("iPad")||i.includes("iPhone")){let e=i.match(/OS (\d+)_(\d+)/);if(e){let[,t,r]=e;sr=Number(t)+.1*Number(r)<13.4,or=!1}}else if(i.includes("OS X 10")){let[,e]=i.match(/OS X 10[_.](\d+)/);sr=or=Number(e)<15}if(i.includes("Chrome/")){let[,e]=i.match(/Chrome\/(\d+)/);sr=or=Number(e)<81}else if(i.includes("Firefox/")){let[,e]=i.match(/Firefox\/(\d+)/);sr=or=Number(e)<77}}function Yl(i){return H(this,null,function*(){let e=yield Eh(i);return Object.assign({canvas:sr,css:or},vh[e])})}var Bo=class extends ai{constructor(...e){super(...e),Be(this,"ranges",new Uo),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,r){if(e===0&&this.byteLength===0&&r){let s=new DataView(r.buffer||r,r.byteOffset,r.byteLength);this._swapDataView(s)}else{let s=e+t;if(s>this.byteLength){let{dataView:o}=this._extend(s);this._swapDataView(o)}}}_extend(e){let t;t=Hl?Gl.allocUnsafe(e):new Uint8Array(e);let r=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:r}}subarray(e,t,r=!1){return t=t||this._lengthToEnd(e),r&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,r=!1){r&&this._tryExtend(t,e.byteLength,e);let s=super.set(e,t);return this.ranges.add(t,s.byteLength),s}ensureChunk(e,t){return H(this,null,function*(){this.chunked&&(this.ranges.available(e,t)||(yield this.readChunk(e,t)))})}available(e,t){return this.ranges.available(e,t)}},Uo=class{constructor(){Be(this,"list",[])}get length(){return this.list.length}add(e,t,r=0){let s=e+t,o=this.list.filter(a=>Al(e,a.offset,s)||Al(e,a.end,s));if(o.length>0){e=Math.min(e,...o.map(n=>n.offset)),s=Math.max(s,...o.map(n=>n.end)),t=s-e;let a=o.shift();a.offset=e,a.length=t,a.end=s,this.list=this.list.filter(n=>!o.includes(n))}else this.list.push({offset:e,length:t,end:s})}available(e,t){let r=e+t;return this.list.some(s=>s.offset<=e&&r<=s.end)}};function Al(i,e,t){return i<=e&&e<=t}var Eo=class extends Bo{constructor(e,t){super(0),Be(this,"chunksRead",0),this.input=e,this.options=t}readWhole(){return H(this,null,function*(){this.chunked=!1,yield this.readChunk(this.nextChunkOffset)})}readChunked(){return H(this,null,function*(){this.chunked=!0,yield this.readChunk(0,this.options.firstChunkSize)})}readNextChunk(){return H(this,arguments,function*(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,r=yield this.readChunk(e,t);return!!r&&r.byteLength===t})}readChunk(e,t){return H(this,null,function*(){if(this.chunksRead++,(t=this.safeWrapAddress(e,t))!==0)return this._readChunk(e,t)})}safeWrapAddress(e,t){return this.size!==void 0&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}};ur.set("blob",class extends Eo{readWhole(){return H(this,null,function*(){this.chunked=!1;let i=yield pr(this.input);this._swapArrayBuffer(i)})}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}_readChunk(i,e){return H(this,null,function*(){let t=e?i+e:void 0,r=this.input.slice(i,t),s=yield pr(r);return this.set(s,i,!0)})}});var ql={name:"@uppy/thumbnail-generator",description:"Uppy plugin that generates small previews of images to show on your upload UI.",version:"5.1.0",license:"MIT",type:"module",sideEffects:!1,scripts:{build:"tsc --build tsconfig.build.json",typecheck:"tsc --build",test:"vitest run --environment=jsdom --silent='passed-only'"},keywords:["file uploader","uppy","uppy-plugin","thumbnail","preview","resize"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},files:["src","lib","dist","CHANGELOG.md"],exports:{".":"./lib/index.js","./package.json":"./package.json"},dependencies:{"@uppy/utils":"^7.1.4",exifr:"^7.0.0"},devDependencies:{jsdom:"^26.1.0","namespace-emitter":"2.0.1",typescript:"^5.8.3",vitest:"^3.2.4"},peerDependencies:{"@uppy/core":"^5.2.0"}};var Xl={strings:{generatingThumbnails:"Generating thumbnails..."}};function wh(i,e,t){try{i.getContext("2d").getImageData(0,0,1,1)}catch(r){if(r.code===18)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return i.toBlob?new Promise(r=>{i.toBlob(r,e,t)}).then(r=>{if(r===null)throw new Error("cannot read image, probably an svg with external resources");return r}):Promise.resolve().then(()=>ws(i.toDataURL(e,t),{})).then(r=>{if(r===null)throw new Error("could not extract blob, probably an old browser");return r})}function Dh(i,e){let t=i.width,r=i.height;(e.deg===90||e.deg===270)&&(t=i.height,r=i.width);let s=document.createElement("canvas");s.width=t,s.height=r;let o=s.getContext("2d");return o.translate(t/2,r/2),e.canvas&&(o.rotate(e.rad),o.scale(e.scaleX,e.scaleY)),o.drawImage(i,-i.width/2,-i.height/2,i.width,i.height),s}function Rh(i){let e=i.width/i.height,t=5e6,r=4096,s=Math.floor(Math.sqrt(t*e)),o=Math.floor(t/Math.sqrt(t*e));if(s>r&&(s=r,o=Math.round(s/e)),o>r&&(o=r,s=Math.round(e*o)),i.width>s){let a=document.createElement("canvas");return a.width=s,a.height=o,a.getContext("2d").drawImage(i,0,0,s,o),a}return i}var Lh={thumbnailWidth:null,thumbnailHeight:null,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,lazy:!1},ps=class extends ri{static VERSION=ql.version;queue;queueProcessing;defaultThumbnailDimension;thumbnailType;constructor(e,t){if(super(e,B(B({},Lh),t)),this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType,this.defaultLocale=Xl,this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,r){if(e.data==null)throw new Error("File data is empty");let s=URL.createObjectURL(e.data),o=new Promise((n,u)=>{let f=new Image;f.src=s,f.addEventListener("load",()=>{URL.revokeObjectURL(s),n(f)}),f.addEventListener("error",m=>{URL.revokeObjectURL(s),u(m.error||new Error("Could not create thumbnail"))})}),a=Yl(e.data).catch(()=>1);return Promise.all([o,a]).then(([n,u])=>{let f=this.getProportionalDimensions(n,t,r,u.deg),m=Dh(n,u),c=this.resizeImage(m,f.width,f.height);return wh(c,this.thumbnailType,80)}).then(n=>URL.createObjectURL(n))}getProportionalDimensions(e,t,r,s){let o=e.width/e.height;if((s===90||s===270)&&(o=e.height/e.width),t!=null){let a=t;return e.width<t&&(a=e.width),{width:a,height:Math.round(a/o)}}if(r!=null){let a=r;return e.height<r&&(a=e.height),{width:Math.round(a*o),height:a}}return{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/o)}}resizeImage(e,t,r){let s=Rh(e),o=Math.ceil(Math.log2(s.width/t));o<1&&(o=1);let a=t*2**(o-1),n=r*2**(o-1),u=2;for(;o--;){let f=document.createElement("canvas");f.width=a,f.height=n,f.getContext("2d").drawImage(s,0,0,a,n),s=f,a=Math.round(a/u),n=Math.round(n/u)}return s}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),this.queueProcessing===!1&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){let e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch(()=>{}).then(()=>this.processQueue()):(this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated"),Promise.resolve()}requestThumbnail(e){return Oi(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then(t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)}).catch(t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)}):Promise.resolve()}onFileAdded=e=>{!e.preview&&e.data&&Oi(e.type)&&!e.isRemote&&this.addToQueue(e.id)};onCancelRequest=e=>{let t=this.queue.indexOf(e.id);t!==-1&&this.queue.splice(t,1)};onFileRemoved=e=>{let t=this.queue.indexOf(e.id);t!==-1&&this.queue.splice(t,1),e.preview&&Ai(e.preview)&&URL.revokeObjectURL(e.preview)};onRestored=()=>{this.uppy.getFiles().filter(t=>t.isRestored).forEach(t=>{(!t.preview||Ai(t.preview))&&this.addToQueue(t.id)})};onAllFilesRemoved=()=>{this.queue=[]};waitUntilAllProcessed=e=>{e.forEach(r=>{let s=this.uppy.getFile(r);this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})});let t=()=>{e.forEach(r=>{let s=this.uppy.getFile(r);this.uppy.emit("preprocess-complete",s)})};return new Promise(r=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",()=>{t(),r()}):(t(),r())})};install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}};var Kl={name:"@uppy/dashboard",description:"Universal UI plugin for Uppy.",version:"5.1.0",license:"MIT",style:"dist/style.min.css",type:"module",sideEffects:["*.css"],scripts:{build:"tsc --build tsconfig.build.json","build:css":"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",typecheck:"tsc --build",test:"vitest run --silent='passed-only'","test:e2e":"vitest run --project browser"},keywords:["file uploader","uppy","uppy-plugin","dashboard","ui"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},files:["src","lib","dist","CHANGELOG.md"],exports:{".":"./lib/index.js","./css/style.css":"./dist/style.css","./css/style.min.css":"./dist/style.min.css","./css/style.scss":"./src/style.scss","./package.json":"./package.json"},dependencies:{"@transloadit/prettier-bytes":"^0.3.4","@uppy/provider-views":"^5.2.0","@uppy/thumbnail-generator":"^5.1.0","@uppy/utils":"^7.1.4",classnames:"^2.2.6",lodash:"^4.17.21",nanoid:"^5.0.9",preact:"^10.5.13","shallow-equal":"^3.0.0"},devDependencies:{"@uppy/core":"^5.2.0","@uppy/dropbox":"^5.1.0","@uppy/google-drive":"^5.1.0","@uppy/url":"^5.1.0","@uppy/webcam":"^5.1.0","@vitest/browser":"^3.2.4",cssnano:"^7.0.7",jsdom:"^26.1.0",playwright:"1.54.1",postcss:"^8.5.6","postcss-cli":"^11.0.1","resize-observer-polyfill":"^1.5.0",sass:"^1.89.2",typescript:"^5.8.3",vitest:"^3.2.4"},peerDependencies:{"@uppy/core":"^5.2.0"}};var Np=we($e(),1);var Do=class extends je{fileInput=null;folderInput=null;mobilePhotoFileInput=null;mobileVideoFileInput=null;triggerFileInputClick=()=>{this.fileInput?.click()};triggerFolderInputClick=()=>{this.folderInput?.click()};triggerVideoCameraInputClick=()=>{this.mobileVideoFileInput?.click()};triggerPhotoCameraInputClick=()=>{this.mobilePhotoFileInput?.click()};onFileInputChange=e=>{this.props.handleInputChange(e),e.currentTarget.value=""};renderHiddenInput=(e,t)=>l("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:this.props.maxNumberOfFiles!==1,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes?.join(", "),ref:t});renderHiddenCameraInput=(e,t,r)=>{let o={photo:"image/*",video:"video/*"}[e];return l("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,type:"file",name:`camera-${e}`,onChange:this.onFileInputChange,capture:t===""?"environment":t,accept:o,ref:r})};renderMyDeviceAcquirer=()=>l("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice",children:l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick,children:[l("div",{className:"uppy-DashboardTab-inner",children:l("svg",{className:"uppy-DashboardTab-iconMyDevice","aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32",children:l("path",{d:"M8.45 22.087l-1.305-6.674h17.678l-1.572 6.674H8.45zm4.975-12.412l1.083 1.765a.823.823 0 00.715.386h7.951V13.5H8.587V9.675h4.838zM26.043 13.5h-1.195v-2.598c0-.463-.336-.75-.798-.75h-8.356l-1.082-1.766A.823.823 0 0013.897 8H7.728c-.462 0-.815.256-.815.718V13.5h-.956a.97.97 0 00-.746.37.972.972 0 00-.19.81l1.724 8.565c.095.44.484.755.933.755H24c.44 0 .824-.3.929-.727l2.043-8.568a.972.972 0 00-.176-.825.967.967 0 00-.753-.38z",fill:"currentcolor","fill-rule":"evenodd"})})}),l("div",{className:"uppy-DashboardTab-name",children:this.props.i18n("myDevice")})]})});renderPhotoCamera=()=>l("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobilePhotoCamera",children:l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerPhotoCameraInputClick,children:[l("div",{className:"uppy-DashboardTab-inner",children:l("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32",children:l("path",{d:"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z",fill:"#02B383","fill-rule":"nonzero"})})}),l("div",{className:"uppy-DashboardTab-name",children:this.props.i18n("takePictureBtn")})]})});renderVideoCamera=()=>l("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobileVideoCamera",children:l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerVideoCameraInputClick,children:[l("div",{className:"uppy-DashboardTab-inner",children:l("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",children:l("path",{fill:"#FF675E",fillRule:"nonzero",d:"m21.254 14.277 2.941-2.588c.797-.313 1.243.818 1.09 1.554-.01 2.094.02 4.189-.017 6.282-.126.915-1.145 1.08-1.58.34l-2.434-2.142c-.192.287-.504 1.305-.738.468-.104-1.293-.028-2.596-.05-3.894.047-.312.381.823.426 1.069.063-.384.206-.744.362-1.09zm-12.939-3.73c3.858.013 7.717-.025 11.574.02.912.129 1.492 1.237 1.351 2.217-.019 2.412.04 4.83-.03 7.239-.17 1.025-1.166 1.59-2.029 1.429-3.705-.012-7.41.025-11.114-.019-.913-.129-1.492-1.237-1.352-2.217.018-2.404-.036-4.813.029-7.214.136-.82.83-1.473 1.571-1.454z "})})}),l("div",{className:"uppy-DashboardTab-name",children:this.props.i18n("recordVideoBtn")})]})});renderBrowseButton=(e,t)=>{let r=this.props.acquirers.length;return l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":r===0,children:e})};renderDropPasteBrowseTagline=e=>{let t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),r=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),s=this.props.fileManagerSelectionType,o=s.charAt(0).toUpperCase()+s.slice(1);return l("div",{class:"uppy-Dashboard-AddFiles-title",children:this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${o}`,{browseFiles:t,browseFolders:r,browse:t}):this.props.i18nArray(`dropPaste${o}`,{browseFiles:t,browseFolders:r,browse:t})})};[Symbol.for("uppy test: disable unused locale key warning")](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderAcquirer=e=>l("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id,children:l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":this.props.activePickerPanel?.id===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id),children:[l("div",{className:"uppy-DashboardTab-inner",children:e.icon()}),l("div",{className:"uppy-DashboardTab-name",children:e.name})]})});renderAcquirers=e=>{let t=[...e],r=t.splice(e.length-2,e.length);return l(Je,{children:[t.map(s=>this.renderAcquirer(s)),l("span",{role:"presentation",style:{"white-space":"nowrap"},children:r.map(s=>this.renderAcquirer(s))})]})};renderSourcesList=(e,t)=>{let{showNativePhotoCameraButton:r,showNativeVideoCameraButton:s}=this.props,o=[],a="myDevice";t||o.push({key:a,elements:this.renderMyDeviceAcquirer()}),r&&o.push({key:"nativePhotoCameraButton",elements:this.renderPhotoCamera()}),s&&o.push({key:"nativePhotoCameraButton",elements:this.renderVideoCamera()}),o.push(...e.map(m=>({key:m.id,elements:this.renderAcquirer(m)}))),o.length===1&&o[0].key===a&&(o=[]);let u=[...o],f=u.splice(o.length-2,o.length);return l(Je,{children:[this.renderDropPasteBrowseTagline(o.length),l("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist",children:[u.map(({key:m,elements:c})=>l(Je,{children:c},m)),l("span",{role:"presentation",style:{"white-space":"nowrap"},children:f.map(({key:m,elements:c})=>l(Je,{children:c},m))})]})]})};renderPoweredByUppy(){let{i18nArray:e}=this.props,t=l("span",{children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11",children:l("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})}),l("span",{className:"uppy-Dashboard-poweredByUppy",children:"Uppy"})]}),r=e("poweredBy",{uppy:t});return l("a",{tabIndex:-1,href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy",children:r})}render(){let{showNativePhotoCameraButton:e,showNativeVideoCameraButton:t,nativeCameraFacingMode:r}=this.props;return l("div",{className:"uppy-Dashboard-AddFiles",children:[this.renderHiddenInput(!1,s=>{this.fileInput=s}),this.renderHiddenInput(!0,s=>{this.folderInput=s}),e&&this.renderHiddenCameraInput("photo",r,s=>{this.mobilePhotoFileInput=s}),t&&this.renderHiddenCameraInput("video",r,s=>{this.mobileVideoFileInput=s}),this.renderSourcesList(this.props.acquirers,this.props.disableLocalFiles),l("div",{className:"uppy-Dashboard-AddFiles-info",children:[this.props.note&&l("div",{className:"uppy-Dashboard-note",children:this.props.note}),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy()]})]})}},ds=Do;var $l=we($e(),1);var kh=i=>l("div",{className:(0,$l.default)("uppy-Dashboard-AddFilesPanel",i.className),"data-uppy-panelType":"AddFiles","aria-hidden":!i.showAddFilesPanel,children:[l("div",{className:"uppy-DashboardContent-bar",children:[l("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":1,children:i.i18n("addingMoreFiles")}),l("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>i.toggleAddFilesPanel(!1),children:i.i18n("back")})]}),l(ds,B({},i))]}),ep=kh;var tp=we($e(),1);function Ch(i){let e=i.files[i.fileCardFor],t=()=>{i.uppy.emit("file-editor:cancel",e),i.closeFileEditor()};return l("div",{className:(0,tp.default)("uppy-DashboardContent-panel",i.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor",children:[l("div",{className:"uppy-DashboardContent-bar",children:[l("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":1,children:i.i18nArray("editing",{file:l("span",{className:"uppy-DashboardContent-titleFile",children:e.meta?e.meta.name:e.name})})}),l("button",{className:"uppy-DashboardContent-back",type:"button",onClick:t,children:i.i18n("cancel")}),l("button",{className:"uppy-DashboardContent-save",type:"button",onClick:i.saveFileEditor,children:i.i18n("save")})]}),l("div",{className:"uppy-DashboardContent-panelBody",children:i.editors.map(r=>i.uppy.getPlugin(r.id).render(i.state))})]})}var ip=Ch;var rp=we($e(),1);function Th(){return l("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25",children:l("g",{fill:"#686DE0",fillRule:"evenodd",children:[l("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),l("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),l("circle",{cx:"7.5",cy:"9.5",r:"1.5"})]})})}function Ih(){return l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25",children:l("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"})})}function Ph(){return l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25",children:l("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"})})}function _h(){return l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25",children:l("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"})})}function Vh(){return l("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25",children:l("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"})})}function Mh(){return l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25",children:l("g",{fill:"#A7AFB7",fillRule:"nonzero",children:[l("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),l("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})]})})}function zh(){return l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25",children:l("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"})})}function li(i){let e={color:"#838999",icon:Mh()};if(!i)return e;let t=i.split("/")[0],r=i.split("/")[1];return t==="text"?{color:"#5a5e69",icon:zh()}:t==="image"?{color:"#686de0",icon:Th()}:t==="audio"?{color:"#068dbb",icon:Ih()}:t==="video"?{color:"#19af67",icon:Ph()}:t==="application"&&r==="pdf"?{color:"#e25149",icon:_h()}:t==="application"&&["zip","x-7z-compressed","x-zip-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(r)!==-1?{color:"#00C469",icon:Vh()}:e}function Ah(i){let{tagName:e}=i.target;if(e==="INPUT"||e==="TEXTAREA"){i.stopPropagation();return}i.preventDefault(),i.stopPropagation()}var Dt=Ah;function cr(i){let{file:e}=i;if(e.preview)return l("img",{draggable:!1,className:"uppy-Dashboard-Item-previewImg",alt:e.name,src:e.preview});let{color:t,icon:r}=li(e.type);return l("div",{className:"uppy-Dashboard-Item-previewIconWrap",children:[l("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:t},children:r}),l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76",children:l("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})})]})}function Ro(i){let{computedMetaFields:e,requiredMetaFields:t,updateMeta:r,form:s,formState:o}=i,a={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return e.map(n=>{let u=`uppy-Dashboard-FileCard-input-${n.id}`,f=t.includes(n.id);return l("fieldset",{className:"uppy-Dashboard-FileCard-fieldset",children:[l("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:u,children:n.name}),n.render!==void 0?n.render({value:o[n.id],onChange:m=>r(m,n.id),fieldCSSClasses:a,required:f,form:s.id},Wi):l("input",{className:a.text,id:u,form:s.id,type:n.type||"text",required:f,value:o[n.id],placeholder:n.placeholder,onInput:m=>r(m.target.value,n.id),"data-uppy-super-focusable":!0})]},n.id)})}function Lo(i){let{files:e,fileCardFor:t,toggleFileCard:r,saveFileCard:s,metaFields:o,requiredMetaFields:a,openFileEditor:n,i18n:u,i18nArray:f,className:m,canEditFile:c}=i,v=()=>typeof o=="function"?o(e[t]):o,w=e[t],D=v()??[],G=c(w),q={};D.forEach(U=>{q[U.id]=w.meta[U.id]??""});let[W,te]=nt(q),j=Qt(U=>{U.preventDefault(),s(W,t)},[s,W,t]),ue=(U,V)=>{te(J(B({},W),{[V]:U}))},$=()=>{r(!1)},[Q]=nt(()=>{let U=document.createElement("form");return U.setAttribute("tabindex","-1"),U.id=zt(),U}),x=wt(null);return yt(()=>{let U=x.current?.getRootNode()??document;return U instanceof Document?U.body.appendChild(Q):(U instanceof ShadowRoot,U.appendChild(Q)),Q.addEventListener("submit",j),()=>{Q.removeEventListener("submit",j),Q.parentNode&&Q.parentNode.removeChild(Q)}},[Q,j]),l("div",{className:(0,rp.default)("uppy-Dashboard-FileCard",m),"data-uppy-panelType":"FileCard",onDragOver:Dt,onDragLeave:Dt,onDrop:Dt,onPaste:Dt,ref:x,children:[l("div",{className:"uppy-DashboardContent-bar",children:[l("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":1,children:f("editing",{file:l("span",{className:"uppy-DashboardContent-titleFile",children:w.meta?w.meta.name:w.name})})}),l("button",{className:"uppy-DashboardContent-back",type:"button",form:Q.id,title:u("finishEditingFile"),onClick:$,children:u("cancel")})]}),l("div",{className:"uppy-Dashboard-FileCard-inner",children:[l("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:li(w.type).color},children:[l(cr,{file:w}),G&&l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:U=>{j(U),n(w)},children:u("editImage")})]}),l("div",{className:"uppy-Dashboard-FileCard-info",children:l(Ro,{computedMetaFields:D,requiredMetaFields:a,updateMeta:ue,form:Q,formState:W})}),l("div",{className:"uppy-Dashboard-FileCard-actions",children:[l("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"submit",form:Q.id,children:u("saveChanges")}),l("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:$,form:Q.id,children:u("cancel")})]})]})]})}var np=we($e(),1);function sp(i,e){if(i===e)return!0;if(!i||!e)return!1;let t=Object.keys(i),r=Object.keys(e),s=t.length;if(r.length!==s)return!1;for(let o=0;o<s;o++){let a=t[o];if(i[a]!==e[a]||!Object.prototype.hasOwnProperty.call(e,a))return!1}return!0}function No(i,e="Copy the URL below"){return new Promise(t=>{let r=document.createElement("textarea");r.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),r.value=i,document.body.appendChild(r),r.select();let s=()=>{document.body.removeChild(r),window.prompt(e,i),t()};try{return document.execCommand("copy")?(document.body.removeChild(r),t()):s()}catch{return document.body.removeChild(r),s()}})}function Oh({file:i,uploadInProgressOrComplete:e,metaFields:t,canEditFile:r,i18n:s,onClick:o}){return!e&&t&&t.length>0||!e&&r(i)?l("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":s("editFileWithFilename",{file:i.meta.name}),title:s("editFileWithFilename",{file:i.meta.name}),onClick:()=>o(),children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14",children:l("g",{fillRule:"evenodd",children:[l("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),l("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),l("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})]})})}):null}function Gh({i18n:i,onClick:e,file:t}){return l("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":i("removeFile",{file:t.meta.name}),title:i("removeFile",{file:t.meta.name}),onClick:()=>e(),children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18",children:[l("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),l("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})]})})}function Hh({file:i,uppy:e,i18n:t}){let r=s=>{No(i.uploadURL,t("copyLinkToClipboardFallback")).then(()=>{e.log("Link copied to clipboard."),e.info(t("copyLinkToClipboardSuccess"),"info",3e3)}).catch(e.log).then(()=>s.target.focus({preventScroll:!0}))};return l("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t("copyLink"),title:t("copyLink"),onClick:s=>r(s),children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12",children:l("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})})})}function ko(i){let{uppy:e,file:t,uploadInProgressOrComplete:r,canEditFile:s,metaFields:o,showLinkToFileUploadResult:a,showRemoveButton:n,i18n:u,toggleFileCard:f,openFileEditor:m}=i;return l("div",{className:"uppy-Dashboard-Item-actionWrapper",children:[l(Oh,{i18n:u,file:t,uploadInProgressOrComplete:r,canEditFile:s,metaFields:o,onClick:()=>{o&&o.length>0?f(!0,t.id):m(t)}}),a&&t.uploadURL?l(Hh,{file:t,uppy:e,i18n:u}):null,n?l(Gh,{i18n:u,file:t,onClick:()=>e.removeFile(t.id)}):null]})}var op=we(Xi(),1);var jh=(i,e)=>(typeof e=="function"?e():e).filter(s=>s.id===i)[0].name;function fr(i){let{file:e,toggleFileCard:t,i18n:r,metaFields:s}=i,{missingRequiredMetaFields:o}=e;if(!o?.length)return null;let a=o.map(n=>jh(n,s)).join(", ");return l("div",{className:"uppy-Dashboard-Item-errorMessage",children:[r("missingRequiredMetaFields",{smart_count:o.length,fields:a})," ",l("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>t(!0,e.id),children:r("editFile")})]})}var Jh=i=>{let{author:e,name:t}=i.file.meta;function r(){return i.isSingleFile&&i.containerHeight>=350?90:i.containerWidth<=352?35:i.containerWidth<=576?60:e?20:30}return l("div",{className:"uppy-Dashboard-Item-name",title:t,children:Hi(t,r())})},Zh=i=>{let{author:e}=i.file.meta,t="remote"in i.file?i.file.remote?.providerName:void 0,r="\xB7";return e?l("div",{className:"uppy-Dashboard-Item-author",children:[l("a",{href:`${e.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer",children:Hi(e.name,13)}),t?l(Je,{children:[` ${r} `,t,` ${r} `]}):null]}):null},Wh=i=>i.file.size&&l("div",{className:"uppy-Dashboard-Item-statusSize",children:(0,op.default)(i.file.size)}),Yh=i=>i.file.isGhost&&l("span",{children:[" \u2022 ",l("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:()=>i.toggleAddFilesPanel(!0),children:i.i18n("reSelect")})]}),qh=({file:i,onClick:e})=>i.error?l("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-errorDetails","aria-label":i.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:e,type:"button",children:"?"}):null;function Co(i){let{file:e,i18n:t,toggleFileCard:r,metaFields:s,toggleAddFilesPanel:o,isSingleFile:a,containerHeight:n,containerWidth:u}=i;return l("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":e.source,children:[l("div",{className:"uppy-Dashboard-Item-fileName",children:[Jh({file:e,isSingleFile:a,containerHeight:n,containerWidth:u}),l(qh,{file:e,onClick:()=>alert(e.error)})]}),l("div",{className:"uppy-Dashboard-Item-status",children:[Zh({file:e}),Wh({file:e}),Yh({file:e,toggleAddFilesPanel:o,i18n:t})]}),l(fr,{file:e,i18n:t,toggleFileCard:r,metaFields:s})]})}function To(i){let{file:e,i18n:t,toggleFileCard:r,metaFields:s,showLinkToFileUploadResult:o}=i,n=e.preview?"rgba(255, 255, 255, 0.5)":li(e.type).color;return l("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:n},children:[o&&e.uploadURL&&l("a",{className:"uppy-Dashboard-Item-previewLink",href:e.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.meta.name,children:l("span",{hidden:!0,children:e.meta.name})}),l(cr,{file:e}),l(fr,{file:e,i18n:t,toggleFileCard:r,metaFields:s})]})}function Xh(i){if(!i.isUploaded){if(i.error&&!i.hideRetryButton){i.uppy.retryUpload(i.file.id);return}i.resumableUploads&&!i.hidePauseResumeButton?i.uppy.pauseResume(i.file.id):i.individualCancellation&&!i.hideCancelButton&&i.uppy.removeFile(i.file.id)}}function ap(i){return i.isUploaded?i.i18n("uploadComplete"):i.error?i.i18n("retryUpload"):i.resumableUploads?i.file.isPaused?i.i18n("resumeUpload"):i.i18n("pauseUpload"):i.individualCancellation?i.i18n("cancelUpload"):""}function Io(i){return l("div",{className:"uppy-Dashboard-Item-progress",children:l("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":ap(i),title:ap(i),onClick:()=>Xh(i),children:i.children})})}function us({children:i}){return l("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle",children:i})}function Po({progress:i}){let e=2*Math.PI*15;return l("g",{children:[l("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),l("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":e,"stroke-dashoffset":e-e/100*i})]})}function _o(i){return!i.file.progress.uploadStarted||i.file.progress.percentage===void 0?null:i.isUploaded?l("div",{className:"uppy-Dashboard-Item-progress",children:l("div",{className:"uppy-Dashboard-Item-progressIndicator",children:l(us,{children:[l("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),l("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})]})})}):i.recoveredState?null:i.error&&!i.hideRetryButton?l(Io,J(B({},i),{children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19",children:[l("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),l("path",{d:"M7.9 3H10v2H7.9z"}),l("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),l("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"})]})})):i.resumableUploads&&!i.hidePauseResumeButton?l(Io,J(B({},i),{children:l(us,{children:[l(Po,{progress:i.file.progress.percentage}),i.file.isPaused?l("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):l("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)",children:[l("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),l("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})]})]})})):!i.resumableUploads&&i.individualCancellation&&!i.hideCancelButton?l(Io,J(B({},i),{children:l(us,{children:[l(Po,{progress:i.file.progress.percentage}),l("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"})]})})):l("div",{className:"uppy-Dashboard-Item-progress",children:l("div",{className:"uppy-Dashboard-Item-progressIndicator",children:l(us,{children:l(Po,{progress:i.file.progress.percentage})})})})}var hs=class extends je{componentDidMount(){let{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!sp(this.props,e)}componentDidUpdate(){let{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){let{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){let{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,r=!!e.progress.uploadComplete&&!t&&!e.error,s=!!e.progress.uploadStarted||!!t,o=e.progress.uploadStarted&&!e.progress.uploadComplete||t,a=e.error||!1,{isGhost:n}=e,u=(this.props.individualCancellation||!o)&&!r;r&&this.props.showRemoveButtonAfterComplete&&(u=!0);let f=(0,np.default)({"uppy-Dashboard-Item":!0,"is-inprogress":o&&!this.props.recoveredState,"is-processing":t,"is-complete":r,"is-error":!!a,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":n});return l("div",{className:f,id:`uppy_${e.id}`,role:this.props.role,children:[l("div",{className:"uppy-Dashboard-Item-preview",children:[l(To,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),l(_o,{uppy:this.props.uppy,file:e,error:a,isUploaded:r,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})]}),l("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons",children:[l(Co,{file:e,containerWidth:this.props.containerWidth,containerHeight:this.props.containerHeight,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields,isSingleFile:this.props.isSingleFile}),l(ko,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:u,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:s,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})]})]})}};function Kh(i,e){let t=[],r=[];return i.forEach(s=>{r.length<e?r.push(s):(t.push(r),r=[s])}),r.length&&t.push(r),t}function Vo({id:i,i18n:e,uppy:t,files:r,resumableUploads:s,hideRetryButton:o,hidePauseResumeButton:a,hideCancelButton:n,showLinkToFileUploadResult:u,showRemoveButtonAfterComplete:f,metaFields:m,isSingleFile:c,toggleFileCard:v,handleRequestThumbnail:w,handleCancelThumbnail:D,recoveredState:G,individualCancellation:q,itemsPerRow:W,openFileEditor:te,canEditFile:j,toggleAddFilesPanel:ue,containerWidth:$,containerHeight:Q}){let x=W===1?71:200,U=ti(()=>{let A=(me,Ee)=>Number(r[Ee].isGhost)-Number(r[me].isGhost),Y=Object.keys(r);return G&&Y.sort(A),Kh(Y,W)},[r,W,G]),V=A=>l("div",{class:"uppy-Dashboard-filesInner",role:"presentation",children:A.map(Y=>l(hs,{uppy:t,id:i,i18n:e,resumableUploads:s,individualCancellation:q,hideRetryButton:o,hidePauseResumeButton:a,hideCancelButton:n,showLinkToFileUploadResult:u,showRemoveButtonAfterComplete:f,metaFields:m,recoveredState:G,isSingleFile:c,containerWidth:$,containerHeight:Q,toggleFileCard:v,handleRequestThumbnail:w,handleCancelThumbnail:D,role:"listitem",openFileEditor:te,canEditFile:j,toggleAddFilesPanel:ue,file:r[Y]},Y))},A[0]);return c?l("div",{class:"uppy-Dashboard-files",children:V(U[0])}):l(Bi,{class:"uppy-Dashboard-files",role:"list",data:U,renderRow:V,rowHeight:x})}var lp=300,cs=class extends je{ref=Oa();componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,lp)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,lp)}render(){let{children:e}=this.props;return l("div",{className:"uppy-Informer-animated",ref:this.ref,children:e})}};function $h(i,e){return Object.assign(i,e)}function ec(i,e){return i?.key??e}function tc(i,e){let t=i._ptgLinkedRefs||(i._ptgLinkedRefs={});return t[e]||(t[e]=r=>{i.refs[e]=r})}function mr(i){let e={};for(let t=0;t<i.length;t++)if(i[t]!=null){let r=ec(i[t],t.toString(36));e[r]=i[t]}return e}function ic(i,e){i=i||{},e=e||{};let t=a=>Object.hasOwn(e,a)?e[a]:i[a],r={},s=[];for(let a in i)Object.hasOwn(e,a)?s.length&&(r[a]=s,s=[]):s.push(a);let o={};for(let a in e){if(Object.hasOwn(r,a))for(let n=0;n<r[a].length;n++){let u=r[a][n];o[r[a][n]]=t(u)}o[a]=t(a)}for(let a=0;a<s.length;a++)o[s[a]]=t(s[a]);return o}var rc=i=>i,sc=(()=>{class i extends je{constructor(t,r){super(t,r),this.refs={},this.state={children:mr(St(St(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){let t=this.state.children;for(let r in t)t[r]&&this.performAppear(r)}componentWillReceiveProps(t){let r=mr(St(t.children)||[]),s=this.state.children;this.setState(a=>({children:ic(a.children,r)}));let o;for(o in r)if(Object.hasOwn(r,o)){let a=s&&Object.hasOwn(s,o);r[o]&&a&&this.currentlyTransitioningKeys[o]?(this.keysToEnter.push(o),this.keysToAbortLeave.push(o)):r[o]&&!a&&!this.currentlyTransitioningKeys[o]&&this.keysToEnter.push(o)}for(o in s)if(Object.hasOwn(s,o)){let a=r&&Object.hasOwn(r,o);s[o]&&!a&&!this.currentlyTransitioningKeys[o]&&this.keysToLeave.push(o)}}componentDidUpdate(){let{keysToEnter:t}=this;this.keysToEnter=[],t.forEach(this.performEnter);let{keysToLeave:r}=this;this.keysToLeave=[],r.forEach(this.performLeave)}_finishAbort(t){let r=this.keysToAbortLeave.indexOf(t);r!==-1&&this.keysToAbortLeave.splice(r,1)}performAppear(t){this.currentlyTransitioningKeys[t]=!0;let r=this.refs[t];r?.componentWillAppear?r.componentWillAppear(this._handleDoneAppearing.bind(this,t)):this._handleDoneAppearing(t)}_handleDoneAppearing(t){let r=this.refs[t];r?.componentDidAppear&&r.componentDidAppear(),delete this.currentlyTransitioningKeys[t],this._finishAbort(t);let s=mr(St(this.props.children)||[]);(!s||!Object.hasOwn(s,t))&&this.performLeave(t)}performEnter(t){this.currentlyTransitioningKeys[t]=!0;let r=this.refs[t];r?.componentWillEnter?r.componentWillEnter(this._handleDoneEntering.bind(this,t)):this._handleDoneEntering(t)}_handleDoneEntering(t){let r=this.refs[t];r?.componentDidEnter&&r.componentDidEnter(),delete this.currentlyTransitioningKeys[t],this._finishAbort(t);let s=mr(St(this.props.children)||[]);(!s||!Object.hasOwn(s,t))&&this.performLeave(t)}performLeave(t){if(this.keysToAbortLeave.indexOf(t)!==-1)return;this.currentlyTransitioningKeys[t]=!0;let s=this.refs[t];s?.componentWillLeave?s.componentWillLeave(this._handleDoneLeaving.bind(this,t)):this._handleDoneLeaving(t)}_handleDoneLeaving(t){if(this.keysToAbortLeave.indexOf(t)!==-1)return;let s=this.refs[t];s?.componentDidLeave&&s.componentDidLeave(),delete this.currentlyTransitioningKeys[t];let o=mr(St(this.props.children)||[]);if(o&&Object.hasOwn(o,t))this.performEnter(t);else{let a=$h({},this.state.children);delete a[t],this.setState({children:a})}}render(w,{children:v}){var D=w,{childFactory:t,transitionLeave:r,transitionName:s,transitionAppear:o,transitionEnter:a,transitionLeaveTimeout:n,transitionEnterTimeout:u,transitionAppearTimeout:f,component:m}=D,c=Yt(D,["childFactory","transitionLeave","transitionName","transitionAppear","transitionEnter","transitionLeaveTimeout","transitionEnterTimeout","transitionAppearTimeout","component"]);let G=Object.entries(v).map(([q,W])=>{if(!W)return;let te=tc(this,q);return Gr(t(W),{ref:te,key:q})}).filter(Boolean);return Wi(m,c,G)}}return i.defaultProps={component:"span",childFactory:rc},i})(),pp=sc;var gr=class extends je{render(){let{info:e}=this.props.uppy.getState();return l("div",{className:"uppy uppy-Informer",children:l(pp,{children:e.map(t=>l(cs,{children:l("p",{role:"alert",children:[t.message," ",t.details&&l("span",{"aria-label":t.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${t.message}
|
|
18
|
+
|
|
19
|
+
${t.details}`),children:"?"})]})},t.message))})})}};var dp=we($e(),1);function oc({activePickerPanel:i,className:e,hideAllPanels:t,i18n:r,state:s,uppy:o}){let a=wt(null);return l("div",{className:(0,dp.default)("uppy-DashboardContent-panel",e),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${i.id}`,onDragOver:Dt,onDragLeave:Dt,onDrop:Dt,onPaste:Dt,children:[l("div",{className:"uppy-DashboardContent-bar",children:[l("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":1,children:r("importFrom",{name:i.name})}),l("button",{className:"uppy-DashboardContent-back",type:"button",onClick:t,children:r("cancel")})]}),l("div",{ref:a,className:"uppy-DashboardContent-panelBody",children:o.getPlugin(i.id).render(s,a.current)})]})}var up=oc;var Rt={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete",STATE_PAUSED:"paused"};function ac(i,e,t,r={}){if(i)return Rt.STATE_ERROR;if(e)return Rt.STATE_COMPLETE;if(t)return Rt.STATE_PAUSED;let s=Rt.STATE_WAITING,o=Object.keys(r);for(let a=0;a<o.length;a++){let{progress:n}=r[o[a]];if(n.uploadStarted&&!n.uploadComplete)return Rt.STATE_UPLOADING;n.preprocess&&s!==Rt.STATE_UPLOADING&&(s=Rt.STATE_PREPROCESSING),n.postprocess&&s!==Rt.STATE_UPLOADING&&s!==Rt.STATE_PREPROCESSING&&(s=Rt.STATE_POSTPROCESSING)}return s}function nc({files:i,i18n:e,isAllComplete:t,isAllErrored:r,isAllPaused:s,inProgressNotPausedFiles:o,newFiles:a,processingFiles:n}){switch(ac(r,t,s,i)){case"uploading":return e("uploadingXFiles",{smart_count:o.length});case"preprocessing":case"postprocessing":return e("processingXFiles",{smart_count:n.length});case"paused":return e("uploadPaused");case"waiting":return e("xFilesSelected",{smart_count:a.length});case"complete":return e("uploadComplete");case"error":return e("error");default:}}function lc(i){let{i18n:e,isAllComplete:t,hideCancelButton:r,maxNumberOfFiles:s,toggleAddFilesPanel:o,uppy:a}=i,{allowNewUpload:n}=i;return n&&s&&(n=i.totalFileCount<i.maxNumberOfFiles),l("div",{className:"uppy-DashboardContent-bar",children:[!t&&!r?l("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>a.cancelAll(),children:e("cancel")}):l("div",{}),l("div",{className:"uppy-DashboardContent-title",children:l(nc,B({},i))}),n?l("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":e("addMoreFiles"),title:e("addMoreFiles"),onClick:()=>o(!0),children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15",children:l("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})}),l("span",{className:"uppy-DashboardContent-addMoreCaption",children:e("addMore")})]}):l("div",{})]})}var hp=lc;var fp=we($e(),1);var Ri="uppy-transition-slideDownUp",cp=250;function pc({children:i}){let[e,t]=nt(null),[r,s]=nt(""),o=wt(),a=wt(),n=wt(),u=Qt(()=>{s(`${Ri}-enter`),cancelAnimationFrame(n.current),clearTimeout(a.current),a.current=void 0,n.current=requestAnimationFrame(()=>{s(`${Ri}-enter ${Ri}-enter-active`),o.current=setTimeout(()=>{s("")},cp)})},[]),f=Qt(()=>{s(`${Ri}-leave`),cancelAnimationFrame(n.current),clearTimeout(o.current),o.current=void 0,n.current=requestAnimationFrame(()=>{s(`${Ri}-leave ${Ri}-leave-active`),a.current=setTimeout(()=>{t(null),s("")},cp)})},[]);return yt(()=>{let m=St(i)[0];e!==m&&(m&&!e?u():e&&!m&&!a.current&&f(),t(m))},[i,e,u,f]),yt(()=>()=>{clearTimeout(o.current),clearTimeout(a.current),cancelAnimationFrame(n.current)},[]),e?Gr(e,{className:(0,fp.default)(r,e.props.className)}):null}var yr=pc;var pt={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"};var Go=we($e(),1);var Mo=we(Xi(),1);var zo=we($e(),1);var dc="\xB7",mp=()=>` ${dc} `;function gp(i){let{newFiles:e,isUploadStarted:t,recoveredState:r,i18n:s,uploadState:o,isSomeGhost:a,startUpload:n}=i,u=(0,zo.default)("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":o===pt.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":a}),f=e&&t&&!r?s("uploadXNewFiles",{smart_count:e}):s("uploadXFiles",{smart_count:e});return l("button",{type:"button",className:u,"aria-label":s("uploadXFiles",{smart_count:e}),onClick:n,disabled:a,"data-uppy-super-focusable":!0,children:f})}function yp(i){let{i18n:e,uppy:t}=i;return l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":e("retryUpload"),onClick:()=>t.retryAll().catch(()=>{}),"data-uppy-super-focusable":!0,"data-cy":"retry",children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10",children:l("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})}),e("retry")]})}function Qp(i){let{i18n:e,uppy:t}=i;return l("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:e("cancel"),"aria-label":e("cancel"),onClick:()=>t.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0,children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16",children:l("g",{fill:"none",fillRule:"evenodd",children:[l("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),l("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"})]})})})}function xp(i){let{isAllPaused:e,i18n:t,isAllComplete:r,resumableUploads:s,uppy:o}=i,a=t(e?"resume":"pause");function n(){if(!r){if(!s){o.cancelAll();return}if(e){o.resumeAll();return}o.pauseAll()}}return l("button",{title:a,"aria-label":a,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:n,"data-cy":"togglePauseResume","data-uppy-super-focusable":!0,children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16",children:l("g",{fill:"none",fillRule:"evenodd",children:[l("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),l("path",{fill:"#FFF",d:e?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"})]})})})}function bp(i){let{i18n:e,doneButtonHandler:t}=i;return l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:t,"data-uppy-super-focusable":!0,children:e("done")})}function Fp(){return l("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14",children:l("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"})})}function Bp(i){let{progress:e}=i,{value:t,mode:r,message:s}=e;return l("div",{className:"uppy-StatusBar-content",children:[l(Fp,{}),r==="determinate"?`${Math.round(t*100)}% \xB7 `:"",s]})}function uc(i){let{numUploads:e,complete:t,totalUploadedSize:r,totalSize:s,totalETA:o,i18n:a}=i,n=e>1,u=(0,Mo.default)(r);return l("div",{className:"uppy-StatusBar-statusSecondary",children:[n&&a("filesUploadedOfTotal",{complete:t,smart_count:e}),l("span",{className:"uppy-StatusBar-additionalInfo",children:[n&&mp(),s!=null?a("dataUploadedOfTotal",{complete:u,total:(0,Mo.default)(s)}):a("dataUploadedOfUnknown",{complete:u}),mp(),o!=null&&a("xTimeLeft",{time:Vr(o)})]})]})}function Up(i){let{i18n:e,complete:t,numUploads:r}=i;return l("div",{className:"uppy-StatusBar-statusSecondary",children:e("filesUploadedOfTotal",{complete:t,smart_count:r})})}function hc(i){let{i18n:e,newFiles:t,startUpload:r}=i,s=(0,zo.default)("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return l("div",{className:"uppy-StatusBar-statusSecondary",children:[l("div",{className:"uppy-StatusBar-statusSecondaryHint",children:e("xMoreFilesAdded",{smart_count:t})}),l("button",{type:"button",className:s,"aria-label":e("uploadXFiles",{smart_count:t}),onClick:r,children:e("upload")})]})}function Ep(i){let{i18n:e,supportsUploadProgress:t,totalProgress:r,hideProgressDetails:s,isUploadStarted:o,isAllComplete:a,isAllPaused:n,newFiles:u,numUploads:f,complete:m,totalUploadedSize:c,totalSize:v,totalETA:w,startUpload:D}=i,G=u&&o;if(!o||a)return null;let q=e(n?"paused":"uploading");function W(){return!n&&!G&&!s?t?l(uc,{numUploads:f,complete:m,totalUploadedSize:c,totalSize:v,totalETA:w,i18n:e}):l(Up,{i18n:e,complete:m,numUploads:f}):null}return l("div",{className:"uppy-StatusBar-content",title:q,children:[n?null:l(Fp,{}),l("div",{className:"uppy-StatusBar-status",children:[l("div",{className:"uppy-StatusBar-statusPrimary",children:t&&r!==0?`${q}: ${r}%`:q}),W(),G?l(hc,{i18n:e,newFiles:u,startUpload:D}):null]})]})}function vp(i){let{i18n:e}=i;return l("div",{className:"uppy-StatusBar-content",role:"status",title:e("complete"),children:l("div",{className:"uppy-StatusBar-status",children:l("div",{className:"uppy-StatusBar-statusPrimary",children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11",children:l("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})}),e("complete")]})})})}function Sp(i){let{error:e,i18n:t,complete:r,numUploads:s}=i;function o(){let a=`${t("uploadFailed")}
|
|
20
|
+
|
|
21
|
+
${e}`;alert(a)}return l("div",{className:"uppy-StatusBar-content",title:t("uploadFailed"),children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11",children:l("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})}),l("div",{className:"uppy-StatusBar-status",children:[l("div",{className:"uppy-StatusBar-statusPrimary",children:[t("uploadFailed"),l("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":t("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:o,type:"button",children:"?"})]}),l(Up,{i18n:t,complete:r,numUploads:s})]})]})}function Qr(i){let e=[],t="indeterminate",r;for(let{progress:o}of Object.values(i)){let{preprocess:a,postprocess:n}=o;r==null&&(a||n)&&({mode:t,message:r}=a||n),a?.mode==="determinate"&&e.push(a.value),n?.mode==="determinate"&&e.push(n.value)}let s=e.reduce((o,a)=>o+a/e.length,0);return{mode:t,message:r,value:s}}var{STATE_ERROR:wp,STATE_WAITING:cc,STATE_PREPROCESSING:Ao,STATE_UPLOADING:fs,STATE_POSTPROCESSING:Oo,STATE_COMPLETE:ms}=pt;function Ho({newFiles:i,allowNewUpload:e,isUploadInProgress:t,isAllPaused:r,resumableUploads:s,error:o,hideUploadButton:a=void 0,hidePauseResumeButton:n=!1,hideCancelButton:u=!1,hideRetryButton:f=!1,recoveredState:m,uploadState:c,totalProgress:v,files:w,supportsUploadProgress:D,hideAfterFinish:G=!1,isSomeGhost:q,doneButtonHandler:W=void 0,isUploadStarted:te,i18n:j,startUpload:ue,uppy:$,isAllComplete:Q,hideProgressDetails:x=void 0,numUploads:U,complete:V,totalSize:A,totalETA:Y,totalUploadedSize:me}){function Ee(){switch(c){case Oo:case Ao:{let re=Qr(w);return re.mode==="determinate"?re.value*100:v}case wp:return null;case fs:return D?v:null;default:return v}}function Te(){switch(c){case Oo:case Ao:{let{mode:re}=Qr(w);return re==="indeterminate"}case fs:return!D;default:return!1}}let le=Ee(),xe=le??100,ie=!o&&i&&(!t&&!r||m)&&e&&!a,pe=!u&&c!==cc&&c!==ms,ne=s&&!n&&c===fs,de=o&&!Q&&!f,K=W&&c===ms,T=(0,Go.default)("uppy-StatusBar-progress",{"is-indeterminate":Te()}),E=(0,Go.default)("uppy-StatusBar",`is-${c}`,{"has-ghosts":q}),N=(()=>{switch(c){case Ao:case Oo:return l(Bp,{progress:Qr(w)});case ms:return l(vp,{i18n:j});case wp:return l(Sp,{error:o,i18n:j,numUploads:U,complete:V});case fs:return l(Ep,{i18n:j,supportsUploadProgress:D,totalProgress:v,hideProgressDetails:x,isUploadStarted:te,isAllComplete:Q,isAllPaused:r,newFiles:i,numUploads:U,complete:V,totalUploadedSize:me,totalSize:A,totalETA:Y,startUpload:ue});default:return null}})();return!(ie||de||ne||pe||K)&&!N||c===ms&&G?null:l("div",{className:E,children:[l("div",{className:T,style:{width:`${xe}%`},role:"progressbar","aria-label":`${xe}%`,"aria-valuetext":`${xe}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":le}),N,l("div",{className:"uppy-StatusBar-actions",children:[ie?l(gp,{newFiles:i,isUploadStarted:te,recoveredState:m,i18n:j,isSomeGhost:q,startUpload:ue,uploadState:c}):null,de?l(yp,{i18n:j,uppy:$}):null,ne?l(xp,{isAllPaused:r,i18n:j,isAllComplete:Q,resumableUploads:s,uppy:$}):null,pe?l(Qp,{i18n:j,uppy:$}):null,K?l(bp,{i18n:j,doneButtonHandler:W}):null]})]})}var fc=2e3,mc=2e3;function gc(i,e,t,r){if(i)return pt.STATE_ERROR;if(e)return pt.STATE_COMPLETE;if(t)return pt.STATE_WAITING;let s=pt.STATE_WAITING,o=Object.keys(r);for(let a=0;a<o.length;a++){let{progress:n}=r[o[a]];if(n.uploadStarted&&!n.uploadComplete)return pt.STATE_UPLOADING;n.preprocess&&(s=pt.STATE_PREPROCESSING),n.postprocess&&s!==pt.STATE_PREPROCESSING&&(s=pt.STATE_POSTPROCESSING)}return s}var gs=class extends je{#e;#t;#i;#r;componentDidMount(){this.#e=performance.now(),this.#t=this.props.uppy.getFiles().reduce((e,t)=>e+(t.progress.bytesUploaded||0),0),this.props.uppy.on("upload",this.#s)}componentWillUnmount(){this.props.uppy.off("upload",this.#s)}#s=()=>{let{recoveredState:e}=this.props.uppy.getState();if(this.#i=null,this.#r=null,e){this.#t=Object.values(e.files).reduce((t,{progress:r})=>t+(r.bytesUploaded||0),0);return}this.#e=performance.now(),this.#t=0};#p(e){if(e.total==null||e.total===0)return null;let t=e.total-e.uploaded;if(t<=0)return null;this.#e??=performance.now();let r=performance.now()-this.#e;if(r===0)return Math.round((this.#r??0)/100)/10;if(this.#t==null)return this.#t=e.uploaded,null;let s=e.uploaded-this.#t;if(this.#t=e.uploaded,s<=0)return Math.round((this.#r??0)/100)/10;let o=s/r;if(!Number.isFinite(o)||o<=0)return null;let a=this.#i==null?o:_i(o,this.#i,fc,r);if(!Number.isFinite(a)||a<=0)return null;this.#i=a;let n=t/a;if(!Number.isFinite(n)||n<0)return null;let u=Math.max((this.#r??0)-r,0),f=this.#r==null?n:_i(n,u,mc,r);return!Number.isFinite(f)||f<0?null:(this.#r=f,this.#e=performance.now(),Math.round(f/100)/10)}startUpload=()=>{let{recoveredState:e}=this.props.uppy.getState();e?this.props.uppy.emit("restore-confirmed"):this.props.uppy.upload().catch(()=>{})};render(){let{capabilities:e,files:t,allowNewUpload:r,totalProgress:s,error:o,recoveredState:a}=this.props.uppy.getState(),{newFiles:n,startedFiles:u,completeFiles:f,isUploadStarted:m,isAllComplete:c,isAllPaused:v,isUploadInProgress:w,isSomeGhost:D}=this.props.uppy.getObjectOfFilesPerState(),G=a?Object.values(t):n,q=!!e.resumableUploads,W=e.uploadProgress!==!1,te=null,j=0;u.every($=>$.progress.bytesTotal!=null&&$.progress.bytesTotal!==0)?(te=0,u.forEach($=>{te+=$.progress.bytesTotal||0,j+=$.progress.bytesUploaded||0})):u.forEach($=>{j+=$.progress.bytesUploaded||0});let ue=this.#p({uploaded:j,total:te});return l(Ho,{error:o,uploadState:gc(o,c,a,t||{}),allowNewUpload:r,totalProgress:s,totalSize:te,totalUploadedSize:j,isAllComplete:c,isAllPaused:v,isUploadStarted:m,isUploadInProgress:w,isSomeGhost:D,recoveredState:a,complete:f.length,newFiles:G.length,numUploads:u.length,totalETA:ue,files:t,i18n:this.props.i18n,uppy:this.props.uppy,startUpload:this.startUpload,doneButtonHandler:this.props.doneButtonHandler,resumableUploads:q,supportsUploadProgress:W,hideProgressDetails:this.props.hideProgressDetails,hideUploadButton:this.props.hideUploadButton,hideRetryButton:this.props.hideRetryButton,hidePauseResumeButton:this.props.hidePauseResumeButton,hideCancelButton:this.props.hideCancelButton,hideAfterFinish:this.props.hideAfterFinish})}};var Dp=900,Rp=700,jo=576,Lp=330;function Jo(i){let e=i.totalFileCount===0,t=i.totalFileCount===1,r=i.containerWidth>jo,s=i.containerHeight>Lp,o=(0,Np.default)({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":i.disabled,"uppy-Dashboard--animateOpenClose":i.animateOpenClose,"uppy-Dashboard--isClosing":i.isClosing,"uppy-Dashboard--isDraggingOver":i.isDraggingOver,"uppy-Dashboard--modal":!i.inline,"uppy-size--md":i.containerWidth>jo,"uppy-size--lg":i.containerWidth>Rp,"uppy-size--xl":i.containerWidth>Dp,"uppy-size--height-md":i.containerHeight>Lp,"uppy-Dashboard--isAddFilesPanelVisible":i.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":i.areInsidesReadyToBeVisible,"uppy-Dashboard--singleFile":i.singleFileFullScreen&&t&&s}),a=1;i.containerWidth>Dp?a=5:i.containerWidth>Rp?a=4:i.containerWidth>jo&&(a=3);let n=i.showSelectedFiles&&!e,u=i.recoveredState?Object.keys(i.recoveredState.files).length:null,f=i.files?Object.keys(i.files).filter(v=>i.files[v].isGhost).length:0,m=()=>f>0?i.i18n("recoveredXFiles",{smart_count:f}):i.i18n("recoveredAllFiles");return l("div",{className:o,"data-uppy-theme":i.theme,"data-uppy-num-acquirers":i.acquirers.length,"data-uppy-drag-drop-supported":!i.disableLocalFiles&&_r(),"aria-hidden":i.inline?"false":i.isHidden,"aria-disabled":i.disabled,"aria-label":i.inline?i.i18n("dashboardTitle"):i.i18n("dashboardWindowTitle"),onPaste:i.handlePaste,onDragOver:i.handleDragOver,onDragLeave:i.handleDragLeave,onDrop:i.handleDrop,children:[l("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:i.handleClickOutside}),l("div",{className:"uppy-Dashboard-inner",role:i.inline?void 0:"dialog",style:{width:i.inline&&i.width?i.width:"",height:i.inline&&i.height?i.height:""},children:[i.inline?null:l("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":i.i18n("closeModal"),title:i.i18n("closeModal"),onClick:i.closeModal,children:l("span",{"aria-hidden":"true",children:"\xD7"})}),l("div",{className:"uppy-Dashboard-innerWrap",children:[l("div",{className:"uppy-Dashboard-dropFilesHereHint",children:i.i18n("dropHint")}),n&&l(hp,B({},i)),u!=null&&u>0&&l("div",{className:"uppy-Dashboard-serviceMsg",children:[l("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19",children:l("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd",children:[l("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),l("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),l("circle",{fill:"#000",cx:"12",cy:"17",r:"1"})]})}),l("strong",{className:"uppy-Dashboard-serviceMsg-title",children:i.i18n("sessionRestored")}),l("div",{className:"uppy-Dashboard-serviceMsg-text",children:m()})]}),n?l(Vo,{id:i.id,i18n:i.i18n,uppy:i.uppy,files:i.files,resumableUploads:i.resumableUploads,hideRetryButton:i.hideRetryButton,hidePauseResumeButton:i.hidePauseResumeButton,hideCancelButton:i.hideCancelButton,showLinkToFileUploadResult:i.showLinkToFileUploadResult,showRemoveButtonAfterComplete:i.showRemoveButtonAfterComplete,metaFields:i.metaFields,toggleFileCard:i.toggleFileCard,handleRequestThumbnail:i.handleRequestThumbnail,handleCancelThumbnail:i.handleCancelThumbnail,recoveredState:i.recoveredState,individualCancellation:i.individualCancellation,openFileEditor:i.openFileEditor,canEditFile:i.canEditFile,toggleAddFilesPanel:i.toggleAddFilesPanel,isSingleFile:t,itemsPerRow:a,containerWidth:i.containerWidth,containerHeight:i.containerHeight}):l(ds,{i18n:i.i18n,i18nArray:i.i18nArray,acquirers:i.acquirers,handleInputChange:i.handleInputChange,maxNumberOfFiles:i.maxNumberOfFiles,allowedFileTypes:i.allowedFileTypes,showNativePhotoCameraButton:i.showNativePhotoCameraButton,showNativeVideoCameraButton:i.showNativeVideoCameraButton,nativeCameraFacingMode:i.nativeCameraFacingMode,showPanel:i.showPanel,activePickerPanel:i.activePickerPanel,disableLocalFiles:i.disableLocalFiles,fileManagerSelectionType:i.fileManagerSelectionType,note:i.note,proudlyDisplayPoweredByUppy:i.proudlyDisplayPoweredByUppy}),l(yr,{children:i.showAddFilesPanel?l(ep,J(B({},i),{isSizeMD:r}),"AddFiles"):null}),l(yr,{children:i.fileCardFor?l(Lo,B({},i),"FileCard"):null}),l(yr,{children:i.activePickerPanel?l(up,B({},i),"Picker"):null}),l(yr,{children:i.showFileEditor?l(ip,B({},i),"Editor"):null}),l("div",{className:"uppy-Dashboard-progressindicators",children:[!i.disableInformer&&l(gr,{uppy:i.uppy}),!i.disableStatusBar&&l(gs,{uppy:i.uppy,i18n:i.i18n,hideProgressDetails:i.hideProgressDetails,hideUploadButton:i.hideUploadButton,hideRetryButton:i.hideRetryButton,hidePauseResumeButton:i.hidePauseResumeButton,hideCancelButton:i.hideCancelButton,hideAfterFinish:i.hideProgressAfterFinish,doneButtonHandler:i.doneButtonHandler}),!i.disableInformer&&l(gr,{uppy:i.uppy}),i.progressindicators.map(v=>i.uppy.getPlugin(v.id).render(i.state))]})]})]})]})}var kp={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editImage:"Edit image",editing:"Editing %{file}",error:"Error",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},takePictureBtn:"Take Picture",recordVideoBtn:"Record Video",uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",dataUploadedOfUnknown:"%{complete} of unknown",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};var Cp=we(Zr(),1);function xr(i,e){if(e){let t=i.querySelector(`[data-uppy-paneltype="${e}"]`);if(t)return t}return i}function Zo(){let i=!1;return(0,Cp.default)((t,r)=>{let s=xr(t,r),o=s.contains(document.activeElement);if(o&&i)return;let a=s.querySelector("[data-uppy-super-focusable]");o&&!a||(a?(a.focus({preventScroll:!0}),i=!0):(s.querySelector(Vi)?.focus({preventScroll:!0}),i=!1))},260)}function Tp(i,e){let t=e[0];t&&(t.focus(),i.preventDefault())}function yc(i,e){let t=e[e.length-1];t&&(t.focus(),i.preventDefault())}function Qc(i){return i.contains(document.activeElement)}function Wo(i,e,t){let r=xr(t,e),s=Ct(r.querySelectorAll(Vi)),o=s.indexOf(document.activeElement);Qc(r)?i.shiftKey&&o===0?yc(i,s):!i.shiftKey&&o===s.length-1&&Tp(i,s):Tp(i,s)}function Ip(i,e,t){e===null||Wo(i,e,t)}var Pp=9,bc=27;function _p(){let i={};return i.promise=new Promise((e,t)=>{i.resolve=e,i.reject=t}),i}var Fc={target:"body",metaFields:[],thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:rr,showLinkToFileUploadResult:!1,hideProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:"light",autoOpen:null,disabled:!1,disableLocalFiles:!1,nativeCameraFacingMode:"",onDragLeave:()=>{},onDragOver:()=>{},onDrop:()=>{},plugins:[],doneButtonHandler:void 0,onRequestCloseModal:null,inline:!1,animateOpenClose:!0,browserBackButtonClose:!1,closeAfterFinish:!1,closeModalOnClickOutside:!1,disablePageScrollWhenModalOpen:!0,trigger:null,width:750,height:550},Li=class extends ri{static VERSION=Kl.version;#e;modalName=`uppy-Dashboard-${zt()}`;superFocus=Zo();ifFocusedOnUppyRecently=!1;dashboardIsDisabled;savedScrollPosition;savedActiveElement;resizeObserver;darkModeMediaQuery;makeDashboardInsidesVisibleAnywayTimeout;constructor(e,t){let r=t?.autoOpen??null;super(e,J(B(B({},Fc),t),{autoOpen:r})),this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.defaultLocale=kp,this.opts.doneButtonHandler===void 0&&(this.opts.doneButtonHandler=()=>{this.uppy.clear(),this.requestCloseModal()}),this.opts.onRequestCloseModal??=()=>this.closeModal(),this.i18nInit()}removeTarget=e=>{let r=this.getPluginState().targets.filter(s=>s.id!==e.id);this.setPluginState({targets:r})};addTarget=e=>{let t=e.id||e.constructor.name,r=e.title||t,s=e.type;if(s!=="acquirer"&&s!=="progressindicator"&&s!=="editor")return this.uppy.log("Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor","error"),null;let o={id:t,name:r,type:s},n=this.getPluginState().targets.slice();return n.push(o),this.setPluginState({targets:n}),this.el};hideAllPanels=()=>{let e=this.getPluginState(),t={activePickerPanel:void 0,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||(this.setPluginState(t),this.uppy.emit("dashboard:close-panel",e.activePickerPanel?.id))};showPanel=e=>{let{targets:t}=this.getPluginState(),r=t.find(s=>s.type==="acquirer"&&s.id===e);this.setPluginState({activePickerPanel:r,activeOverlayType:"PickerPanel"}),this.uppy.emit("dashboard:show-panel",e)};canEditFile=e=>{let{targets:t}=this.getPluginState();return this.#n(t).some(s=>this.uppy.getPlugin(s.id).canEditFile(e))};openFileEditor=e=>{let{targets:t}=this.getPluginState(),r=this.#n(t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),r.forEach(s=>{this.uppy.getPlugin(s.id).selectFile(e)})};closeFileEditor=()=>{let{metaFields:e}=this.getPluginState();e&&e.length>0?this.setPluginState({showFileEditor:!1,activeOverlayType:"FileCard"}):this.setPluginState({showFileEditor:!1,fileCardFor:null,activeOverlayType:"AddFiles"})};saveFileEditor=()=>{let{targets:e}=this.getPluginState();this.#n(e).forEach(r=>{this.uppy.getPlugin(r.id).save()}),this.closeFileEditor()};openModal=()=>{let{promise:e,resolve:t}=_p();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){let r=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",r,!1),t()};this.el.addEventListener("animationend",r,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e};closeModal=e=>{let t=e?.manualClose??!0,{isHidden:r,isClosing:s}=this.getPluginState();if(r||s)return;let{promise:o,resolve:a}=_p();if(this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.opts.animateOpenClose){this.setPluginState({isClosing:!0});let n=()=>{this.setPluginState({isHidden:!0,isClosing:!1}),this.superFocus.cancel(),this.savedActiveElement.focus(),this.el.removeEventListener("animationend",n,!1),a()};this.el.addEventListener("animationend",n,!1)}else this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),a();return document.removeEventListener("keydown",this.handleKeyDownInModal),t&&this.opts.browserBackButtonClose&&history.state?.[this.modalName]&&history.back(),this.uppy.emit("dashboard:modal-closed"),o};isModalOpen=()=>!this.getPluginState().isHidden||!1;requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal();setDarkModeCapability=e=>{let{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:J(B({},t),{darkMode:e})})};handleSystemDarkModeChange=e=>{let t=e.matches;this.uppy.log(`[Dashboard] Dark mode is ${t?"on":"off"}`),this.setDarkModeCapability(t)};toggleFileCard=(e,t)=>{let r=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",r):this.uppy.emit("dashboard:file-edit-complete",r),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})};toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})};addFiles=e=>{let t=e.map(r=>({source:this.id,name:r.name,type:r.type,data:r,meta:{relativePath:r.relativePath||r.webkitRelativePath||null}}));try{this.uppy.addFiles(t)}catch(r){this.uppy.log(r)}};startListeningToResize=()=>{this.resizeObserver=new ResizeObserver(e=>{let t=e[0],{width:r,height:s}=t.contentRect;this.setPluginState({containerWidth:r,containerHeight:s,areInsidesReadyToBeVisible:!0})}),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout(()=>{let e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;!e.areInsidesReadyToBeVisible&&!t&&(this.uppy.log("[Dashboard] resize event didn\u2019t fire on time: defaulted to mobile layout","warning"),this.setPluginState({areInsidesReadyToBeVisible:!0}))},1e3)};stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)};recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())};disableInteractiveElements=e=>{let t=["a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[role="button"]:not([disabled])'],r=this.#e??Ct(this.el.querySelectorAll(t)).filter(s=>!s.classList.contains("uppy-Dashboard-close"));for(let s of r)s.tagName==="A"?s.setAttribute("aria-disabled",e):s.disabled=e;e?this.#e=r:this.#e=null,this.dashboardIsDisabled=e};updateBrowserHistory=()=>{history.state?.[this.modalName]||history.pushState(J(B({},history.state),{[this.modalName]:!0}),""),window.addEventListener("popstate",this.handlePopState,!1)};handlePopState=e=>{this.isModalOpen()&&(!e.state||!e.state[this.modalName])&&this.closeModal({manualClose:!1}),!this.isModalOpen()&&e.state?.[this.modalName]&&history.back()};handleKeyDownInModal=e=>{e.keyCode===bc&&this.requestCloseModal(),e.keyCode===Pp&&Wo(e,this.getPluginState().activeOverlayType,this.el)};handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()};handlePaste=e=>{this.uppy.iteratePlugins(r=>{r.type==="acquirer"&&r.handleRootPaste?.(e)});let t=Ct(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))};handleInputChange=e=>{e.preventDefault();let t=Ct(e.currentTarget.files||[]);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))};handleDragOver=e=>{e.preventDefault(),e.stopPropagation();let t=()=>{let a=!0;return this.uppy.iteratePlugins(n=>{n.canHandleRootDrop?.(e)&&(a=!0)}),a},r=()=>{let{types:a}=e.dataTransfer;return a.some(n=>n==="Files")},s=t(),o=r();if(!s&&!o||this.opts.disabled||this.opts.disableLocalFiles&&(o||!s)||!this.uppy.getState().allowNewUpload){e.dataTransfer.dropEffect="none";return}e.dataTransfer.dropEffect="copy",this.setPluginState({isDraggingOver:!0}),this.opts.onDragOver(e)};handleDragLeave=e=>{e.preventDefault(),e.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.opts.onDragLeave(e)};handleDrop=e=>H(this,null,function*(){e.preventDefault(),e.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(o=>{o.type==="acquirer"&&o.handleRootDrop?.(e)});let t=!1,r=o=>{this.uppy.log(o,"error"),t||(this.uppy.info(o.message,"error"),t=!0)};this.uppy.log("[Dashboard] Processing dropped files");let s=yield Pr(e.dataTransfer,{logDropError:r});s.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(s)),this.opts.onDrop(e)});handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)};handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)};handleKeyDownInInline=e=>{e.keyCode===Pp&&Ip(e,this.getPluginState().activeOverlayType,this.el)};handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)};handleComplete=({failed:e})=>{this.opts.closeAfterFinish&&!e?.length&&this.requestCloseModal()};#t=()=>{if(this.opts.disableThumbnailGenerator)return;let e=600,t=this.uppy.getFiles();if(t.length===1){let r=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);r?.setOptions({thumbnailWidth:e});let s=J(B({},t[0]),{preview:void 0});r?.requestThumbnail(s).then(()=>{r?.setOptions({thumbnailWidth:this.opts.thumbnailWidth})})}};#i=e=>{let t=e[0],{metaFields:r}=this.getPluginState(),s=r&&r.length>0,o=this.canEditFile(t);s&&this.opts.autoOpen==="metaEditor"?this.toggleFileCard(!0,t.id):o&&this.opts.autoOpen==="imageEditor"&&this.openFileEditor(t)};initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){let e=Tr(this.opts.trigger);e?e.forEach(t=>t.addEventListener("click",this.openModal)):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-added",this.#l),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),this.uppy.on("files-added",this.#t),this.uppy.on("file-removed",this.#t),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.on("files-added",this.#i)};removeEvents=()=>{let e=Tr(this.opts.trigger);!this.opts.inline&&e&&e.forEach(t=>t.removeEventListener("click",this.openModal)),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-added",this.#l),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),this.uppy.off("files-added",this.#t),this.uppy.off("file-removed",this.#t),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.off("files-added",this.#i)};superFocusOnEachUpdate=()=>{let e=this.el.contains(document.activeElement),t=document.activeElement===document.body||document.activeElement===null,r=this.uppy.getState().info.length===0,s=!this.opts.inline;r&&(s||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()};afterUpdate=()=>{if(this.opts.disabled&&!this.dashboardIsDisabled){this.disableInteractiveElements(!0);return}!this.opts.disabled&&this.dashboardIsDisabled&&this.disableInteractiveElements(!1),this.superFocusOnEachUpdate()};saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)};#r=e=>{let t=this.uppy.getPlugin(e.id);return J(B({},e),{icon:t.icon||this.opts.defaultPickerIcon,render:t.render})};#s=e=>{let t=this.uppy.getPlugin(e.id);return typeof t.isSupported!="function"?!0:t.isSupported()};#p=e=>e.filter(t=>t.type==="acquirer"&&this.#s(t)).map(this.#r);#a=e=>e.filter(t=>t.type==="progressindicator").map(this.#r);#n=e=>e.filter(t=>t.type==="editor").map(this.#r);render=e=>{let t=this.getPluginState(),{files:r,capabilities:s,allowNewUpload:o}=e,{newFiles:a,uploadStartedFiles:n,completeFiles:u,erroredFiles:f,inProgressFiles:m,inProgressNotPausedFiles:c,processingFiles:v,isUploadStarted:w,isAllComplete:D,isAllPaused:G}=this.uppy.getObjectOfFilesPerState(),q=this.#p(t.targets),W=this.#a(t.targets),te=this.#n(t.targets),j;return this.opts.theme==="auto"?j=s.darkMode?"dark":"light":j=this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),Jo({state:e,isHidden:t.isHidden,files:r,newFiles:a,uploadStartedFiles:n,completeFiles:u,erroredFiles:f,inProgressFiles:m,inProgressNotPausedFiles:c,processingFiles:v,isUploadStarted:w,isAllComplete:D,isAllPaused:G,totalFileCount:Object.keys(r).length,totalProgress:e.totalProgress,allowNewUpload:o,acquirers:q,theme:j,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,closeFileEditor:this.closeFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:W,editors:te,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:s.resumableUploads||!1,individualCancellation:s.individualCancellation,isMobileDevice:s.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,showNativePhotoCameraButton:this.opts.showNativePhotoCameraButton,showNativeVideoCameraButton:this.opts.showNativeVideoCameraButton,nativeCameraFacingMode:this.opts.nativeCameraFacingMode,singleFileFullScreen:this.opts.singleFileFullScreen,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop,disableInformer:this.opts.disableInformer,disableStatusBar:this.opts.disableStatusBar,hideProgressDetails:this.opts.hideProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideProgressAfterFinish:this.opts.hideProgressAfterFinish,doneButtonHandler:this.opts.doneButtonHandler})};#o=()=>{let{plugins:e}=this.opts;e.forEach(t=>{let r=this.uppy.getPlugin(t);r?r.mount(this,r):this.uppy.log(`[Uppy] Dashboard could not find plugin '${t}', make sure to uppy.use() the plugins you are specifying`,"warning")})};#c=()=>{this.uppy.iteratePlugins(this.#l)};#l=e=>{let t=["acquirer","editor"];e&&!e.opts?.target&&t.includes(e.type)&&(this.getPluginState().targets.some(s=>e.id===s.id)||e.mount(this,e))};#u(){let{thumbnailWidth:e,thumbnailHeight:t,thumbnailType:r,waitForThumbnailsBeforeUpload:s}=this.opts;return{thumbnailWidth:e,thumbnailHeight:t,thumbnailType:r,waitForThumbnailsBeforeUpload:s,lazy:!s}}setOptions(e){super.setOptions(e),this.uppy.getPlugin(this.#d())?.setOptions(this.#u())}#d(){return`${this.id}:ThumbnailGenerator`}install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:void 0,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});let{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");let{allowMultipleUploads:r,allowMultipleUploadBatches:s}=this.uppy.opts;(r||s)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");let{target:o}=this.opts;o&&this.mount(o,this),this.opts.disableThumbnailGenerator||this.uppy.use(ps,B({id:this.#d()},this.#u())),this.darkModeMediaQuery=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;let a=this.darkModeMediaQuery?this.darkModeMediaQuery.matches:!1;this.uppy.log(`[Dashboard] Dark mode is ${a?"on":"off"}`),this.setDarkModeCapability(a),this.opts.theme==="auto"&&this.darkModeMediaQuery?.addListener(this.handleSystemDarkModeChange),this.#o(),this.#c(),this.initEvents()};uninstall=()=>{if(!this.opts.disableThumbnailGenerator){let t=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);t&&this.uppy.removePlugin(t)}let{plugins:e}=this.opts;e.forEach(t=>{let r=this.uppy.getPlugin(t);r&&r.unmount()}),this.opts.theme==="auto"&&this.darkModeMediaQuery?.removeListener(this.handleSystemDarkModeChange),this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.unmount(),this.removeEvents()}};var Yo=class{onMount(e,t){this.options=B(B({},e),this.props),this.uppy.use(t,this.options),this.plugin=this.uppy.getPlugin(this.options.id)}handleChanges(e,t){e.uppy&&this.uppy!==e.uppy.previousValue&&e.uppy.previousValue!==void 0&&(this.uninstall(e.uppy.previousValue),this.uppy.use(t,this.options)),this.options=B(B({},this.options),this.props),this.plugin=this.uppy.getPlugin(this.options.id),e.props&&this.props!==e.props.previousValue&&e.props.previousValue!==void 0&&this.plugin.setOptions(B({},this.options))}uninstall(e=this.uppy){e.removePlugin(this.plugin)}},Vp=(()=>{let e=class e extends Yo{constructor(){super(),this.el=Ii(Qa),this.uppy=new Ui,this.props={}}ngOnInit(){this.onMount({id:"angular:Dashboard",inline:!0,target:this.el.nativeElement},Li)}ngOnChanges(r){this.handleChanges(r,Li)}ngOnDestroy(){this.uninstall()}};e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=Nr({type:e,selectors:[["uppy-dashboard"]],inputs:{uppy:"uppy",props:"props"},features:[ba,ya],decls:0,vars:0,template:function(s,o){},encapsulation:2,changeDetection:0});let i=e;return i})();var Ko=we(Xi(),1);var Ap=we(Mp(),1);var zp={strings:{compressingImages:"Compressing images...",compressedX:"Saved %{size} by compressing images"}};var Bc={quality:.6,limit:10},ys=class extends ii{#e;constructor(e,t){super(e,B(B({},Bc),t)),this.id=this.opts.id||"Compressor",this.type="modifier",this.defaultLocale=zp,this.#e=new Gi(this.opts.limit),this.i18nInit(),this.prepareUpload=this.prepareUpload.bind(this),this.compress=this.compress.bind(this)}compress(e){return new Promise((t,r)=>{new Ap.default(e,J(B({},this.opts),{success:t,error:r}))})}prepareUpload(e){return H(this,null,function*(){let t=0,r=[],s=this.#e.wrapPromiseFunction(a=>H(this,null,function*(){try{if(a.data==null)throw new Error("File data is empty");let n=yield this.compress(a.data),u=a.data.size-n.size;this.uppy.log(`[Image Compressor] Image ${a.id} compressed by ${(0,Ko.default)(u)}`),t+=u;let{name:f,type:m,size:c}=n,v=gt(f),D=`${gt(a.meta.name).name}.${v.extension}`;this.uppy.setFileState(a.id,J(B(B(B(B({},f&&{name:f}),v.extension&&{extension:v.extension}),m&&{type:m}),c&&{size:c}),{data:n,meta:J(B({},a.meta),{type:m,name:D})})),r.push(a)}catch(n){this.uppy.log(`[Image Compressor] Failed to compress ${a.id}:`,"warning"),this.uppy.log(n,"warning")}})),o=e.map(a=>{let n=this.uppy.getFile(a);return this.uppy.emit("preprocess-progress",n,{mode:"indeterminate",message:this.i18n("compressingImages")}),n.isRemote||(n.data.type||(n.data=n.data.slice(0,n.data.size,n.type)),!n.type?.startsWith("image/"))?Promise.resolve():s(n)});yield Promise.all(o),this.uppy.emit("compressor:complete",r),t>1024&&this.uppy.info(this.i18n("compressedX",{size:(0,Ko.default)(t)}),"info");for(let a of e){let n=this.uppy.getFile(a);this.uppy.emit("preprocess-complete",n)}})}install(){this.uppy.addPreProcessor(this.prepareUpload)}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}};var Op={name:"@uppy/image-editor",description:"Image editor and cropping UI",version:"4.1.0",license:"MIT",style:"dist/style.min.css",type:"module",sideEffects:["*.css"],scripts:{build:"tsc --build tsconfig.build.json","build:css":"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",typecheck:"tsc --build"},keywords:["file uploader","upload","uppy","uppy-plugin","image editor","cropper","crop","rotate","resize"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},files:["src","lib","dist","CHANGELOG.md"],exports:{".":"./lib/index.js","./css/style.css":"./dist/style.css","./css/style.min.css":"./dist/style.min.css","./css/style.scss":"./src/style.scss","./package.json":"./package.json"},dependencies:{"@uppy/utils":"^7.1.4",cropperjs:"^1.6.2",preact:"^10.5.13"},peerDependencies:{"@uppy/core":"^5.2.0"},publishConfig:{access:"public"},devDependencies:{cssnano:"^7.0.7",postcss:"^8.5.6","postcss-cli":"^11.0.1",sass:"^1.89.2",typescript:"^5.8.3"}};var Wp=we(Gp(),1);function Ec(i,e){let t=i.width/e.width,r=i.height/e.height,s=Math.min(t,r),o=e.width*s,a=e.height*s,n=(i.width-o)/2,u=(i.height-a)/2;return{width:o,height:a,left:n,top:u}}var Hp=Ec;function vc(i){return i*(Math.PI/180)}function Sc(i,e,t){let r=Math.abs(vc(t));return Math.max((Math.sin(r)*i+Math.cos(r)*e)/e,(Math.sin(r)*e+Math.cos(r)*i)/i)}var jp=Sc;function wc(i,e,t){return e.left<i.left?{left:i.left,width:t.width}:e.top<i.top?{top:i.top,height:t.height}:e.left+e.width>i.left+i.width?{left:i.left+i.width-t.width,width:t.width}:e.top+e.height>i.top+i.height?{top:i.top+i.height-t.height,height:t.height}:null}var Jp=wc;function Dc(i,e,t){return e.left<i.left?{left:i.left,width:t.left+t.width-i.left}:e.top<i.top?{top:i.top,height:t.top+t.height-i.top}:e.left+e.width>i.left+i.width?{left:t.left,width:i.left+i.width-t.left}:e.top+e.height>i.top+i.height?{top:t.top,height:i.top+i.height-t.top}:null}var Zp=Dc;var Qs=class extends je{imgElement;cropper;constructor(e){super(e),this.state={angle90Deg:0,angleGranular:0,prevCropboxData:null},this.storePrevCropboxData=this.storePrevCropboxData.bind(this),this.limitCropboxMovement=this.limitCropboxMovement.bind(this)}componentDidMount(){let{opts:e,storeCropperInstance:t}=this.props;this.cropper=new Wp.default(this.imgElement,e.cropperOptions),this.imgElement.addEventListener("cropstart",this.storePrevCropboxData),this.imgElement.addEventListener("cropend",this.limitCropboxMovement),t(this.cropper)}componentWillUnmount(){this.cropper.destroy(),this.imgElement.removeEventListener("cropstart",this.storePrevCropboxData),this.imgElement.removeEventListener("cropend",this.limitCropboxMovement)}storePrevCropboxData(){this.setState({prevCropboxData:this.cropper.getCropBoxData()})}limitCropboxMovement(e){let t=this.cropper.getCanvasData(),r=this.cropper.getCropBoxData(),{prevCropboxData:s}=this.state;if(e.detail.action==="all"){let o=Jp(t,r,s);o&&this.cropper.setCropBoxData(o)}else{let o=Zp(t,r,s);o&&this.cropper.setCropBoxData(o)}}onRotate90Deg=()=>{let{angle90Deg:e}=this.state,t=e-90;this.setState({angle90Deg:t,angleGranular:0}),this.cropper.scale(1),this.cropper.rotateTo(t);let r=this.cropper.getCanvasData(),s=this.cropper.getContainerData(),o=Hp(s,r);this.cropper.setCanvasData(o),this.cropper.setCropBoxData(o)};onRotateGranular=e=>{let t=Number(e.target.value);this.setState({angleGranular:t});let{angle90Deg:r}=this.state,s=r+t;this.cropper.rotateTo(s);let o=this.cropper.getImageData(),a=jp(o.naturalWidth,o.naturalHeight,t),n=this.cropper.getImageData().scaleX<0?-a:a;this.cropper.scale(n,a)};renderGranularRotate(){let{i18n:e}=this.props,{angleGranular:t}=this.state;return l("label",{role:"tooltip","aria-label":`${t}\xBA`,"data-microtip-position":"top",className:"uppy-ImageCropper-rangeWrapper",children:l("input",{className:"uppy-ImageCropper-range uppy-u-reset",type:"range",onInput:this.onRotateGranular,onChange:this.onRotateGranular,value:t,min:"-45",max:"45","aria-label":e("rotate")})})}renderRevert(){let{i18n:e,opts:t}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("revert"),onClick:()=>{this.cropper.reset(),this.cropper.setAspectRatio(t.cropperOptions.initialAspectRatio),this.setState({angle90Deg:0,angleGranular:0})},children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})]})})}renderRotate(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("rotate"),onClick:this.onRotate90Deg,children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M14 10a2 2 0 012 2v7a2 2 0 01-2 2H6a2 2 0 01-2-2v-7a2 2 0 012-2h8zm0 1.75H6a.25.25 0 00-.243.193L5.75 12v7a.25.25 0 00.193.243L6 19.25h8a.25.25 0 00.243-.193L14.25 19v-7a.25.25 0 00-.193-.243L14 11.75zM12 .76V4c2.3 0 4.61.88 6.36 2.64a8.95 8.95 0 012.634 6.025L21 13a1 1 0 01-1.993.117L19 13h-.003a6.979 6.979 0 00-2.047-4.95 6.97 6.97 0 00-4.652-2.044L12 6v3.24L7.76 5 12 .76z"})]})})}renderFlip(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("flipHorizontal"),onClick:()=>this.cropper.scaleX(-this.cropper.getData().scaleX||-1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})]})})}renderZoomIn(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomIn"),onClick:()=>this.cropper.zoom(.1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",height:"24",viewBox:"0 0 24 24",width:"24",children:[l("path",{d:"M0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),l("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})]})})}renderZoomOut(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomOut"),onClick:()=>this.cropper.zoom(-.1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})]})})}renderCropSquare(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioSquare"),onClick:()=>this.cropper.setAspectRatio(1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})]})})}renderCropWidescreen(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioLandscape"),onClick:()=>this.cropper.setAspectRatio(16/9),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M 19,4.9999992 V 17.000001 H 4.9999998 V 6.9999992 H 19 m 0,-2 H 4.9999998 c -1.0999999,0 -1.9999999,0.9000001 -1.9999999,2 V 17.000001 c 0,1.1 0.9,2 1.9999999,2 H 19 c 1.1,0 2,-0.9 2,-2 V 6.9999992 c 0,-1.0999999 -0.9,-2 -2,-2 z"}),l("path",{fill:"none",d:"M0 0h24v24H0z"})]})})}renderCropWidescreenVertical(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button","aria-label":e("aspectRatioPortrait"),className:"uppy-u-reset uppy-c-btn",onClick:()=>this.cropper.setAspectRatio(9/16),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M 19.000001,19 H 6.999999 V 5 h 10.000002 v 14 m 2,0 V 5 c 0,-1.0999999 -0.9,-1.9999999 -2,-1.9999999 H 6.999999 c -1.1,0 -2,0.9 -2,1.9999999 v 14 c 0,1.1 0.9,2 2,2 h 10.000002 c 1.1,0 2,-0.9 2,-2 z"}),l("path",{d:"M0 0h24v24H0z",fill:"none"})]})})}render(){let{currentImage:e,opts:t}=this.props,{actions:r}=t;if(e.data==null)throw new Error("File data is empty");let s=URL.createObjectURL(e.data);return l("div",{className:"uppy-ImageCropper",children:[l("div",{className:"uppy-ImageCropper-container",children:l("img",{className:"uppy-ImageCropper-image",alt:e.name,src:s,ref:o=>{this.imgElement=o}})}),l("div",{className:"uppy-ImageCropper-controls",children:[r.revert&&this.renderRevert(),r.rotate&&this.renderRotate(),r.granularRotate&&this.renderGranularRotate(),r.flip&&this.renderFlip(),r.zoomIn&&this.renderZoomIn(),r.zoomOut&&this.renderZoomOut(),r.cropSquare&&this.renderCropSquare(),r.cropWidescreen&&this.renderCropWidescreen(),r.cropWidescreenVertical&&this.renderCropWidescreenVertical()]})]})}};var Yp={strings:{revert:"Reset",rotate:"Rotate 90\xB0",zoomIn:"Zoom in",zoomOut:"Zoom out",flipHorizontal:"Flip horizontally",aspectRatioSquare:"Crop square",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)"}};var qp={viewMode:0,background:!1,autoCropArea:1,responsive:!0,minCropBoxWidth:70,minCropBoxHeight:70,croppedCanvasOptions:{},initialAspectRatio:0},Xp={revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!0},Rc={quality:.8,actions:Xp,cropperOptions:qp},br=class extends ri{static VERSION=Op.version;cropper;constructor(e,t){super(e,J(B(B({},Rc),t),{actions:B(B({},Xp),t?.actions),cropperOptions:B(B({},qp),t?.cropperOptions)})),this.id=this.opts.id||"ImageEditor",this.title="Image Editor",this.type="editor",this.defaultLocale=Yp,this.i18nInit()}canEditFile(e){if(!e.type||e.isRemote)return!1;let t=e.type.split("/")[1];return!!/^(jpe?g|gif|png|bmp|webp)$/.test(t)}save=()=>{let e=s=>{let{currentImage:o}=this.getPluginState();this.uppy.setFileState(o.id,{data:new File([s],o.name??this.i18n("unnamed"),{type:s.type}),size:s.size,preview:void 0});let a=this.uppy.getFile(o.id);this.uppy.emit("thumbnail:request",a),this.setPluginState({currentImage:a}),this.uppy.emit("file-editor:complete",a)},{currentImage:t}=this.getPluginState(),r=this.cropper.getCroppedCanvas({});r.width%2!==0&&this.cropper.setData({width:r.width-1}),r.height%2!==0&&this.cropper.setData({height:r.height-1}),this.cropper.getCroppedCanvas(this.opts.cropperOptions.croppedCanvasOptions).toBlob(e,t.type,this.opts.quality)};storeCropperInstance=e=>{this.cropper=e};selectFile=e=>{this.uppy.emit("file-editor:start",e),this.setPluginState({currentImage:e})};install(){this.setPluginState({currentImage:null});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){let{currentImage:e}=this.getPluginState();if(e){let t=this.uppy.getFile(e.id);this.uppy.emit("file-editor:cancel",t)}this.unmount()}render(){let{currentImage:e}=this.getPluginState();return e===null||e.isRemote?null:l(Qs,{currentImage:e,storeCropperInstance:this.storeCropperInstance,save:this.save,opts:this.opts,i18n:this.i18n})}};var $p=we(Kp(),1);var Lc=["*"];function Nc(i,e){if(i&1&&(qt(0,"small",4),xi(1),Xt()),i&2){let t=Qi(2);kt(),Ua(t.subtitle)}}function kc(i,e){if(i&1&&(qt(0,"a",5),kr(1,"i",6),xi(2," Download Template "),Xt()),i&2){let t=Qi(2);Es("href",t.sampleUrl,xa)}}function Cc(i,e){if(i&1&&(qt(0,"div",2),gi(1,Nc,2,1,"small",4),gi(2,kc,3,1,"a",5),Ba(3),Xt()),i&2){let t=Qi();kt(),yi(t.subtitle&&t.showSubtitle?1:-1),kt(),yi(t.sampleUrl&&t.showSample?2:-1)}}function Tc(i,e){if(i&1&&xi(0),i&2){let t=Qi(2);vs(" - ",t.rowSummary().rowEmpty," empty in the CSV you uploaded ")}}function Ic(i,e){if(i&1&&(qt(0,"div",3)(1,"h4",7),xi(2,"CSV File Content Summary"),Xt(),kr(3,"hr"),qt(4,"p",8),xi(5),gi(6,Tc,1,1),Xt()()),i&2){let t=Qi();kt(5),vs(" ",t.rowSummary().rowCount," rows found "),kt(),yi(t.rowSummary().rowEmpty>0?6:-1)}}var oF=(()=>{let e=class e{constructor(){this.folder="test",this.thumbnailSize="small",this.sampleUrl="",this.subtitle="",this.showSample=!0,this.clear=Pi(!1),this.resetUppy=Pi(!1),this.showSubtitle=!0,this.uppyCoreConfiguration=Pi(),this.dashboardPropsConfiguration=Pi(),this.fileUploaded=new mi,this.fileUploadComplete=new mi,this.fileRemoved=new mi,this.onParser=new mi,this.multipleFilesUploaded=new mi,this.http=Ii(Da),this.csvParser=Ii(wa),this.rowSummary=Lr({rowCount:0,rowEmpty:0}),this.file=Lr(null),this.multipleFiles=Lr([]),this.uppy=new Ui({debug:!0,autoProceed:!0,allowMultipleUploadBatches:!1,restrictions:{allowedFileTypes:[".csv"],maxTotalFileSize:1e6},onBeforeFileAdded:(r,s)=>J(B({},r),{name:r.name?.replace(/ /g,"_")})}).use(ys,{mimeType:"image/jpeg",convertSize:1/0,convertTypes:["image/png"]}).use(br),this.dashboardProps={hideUploadButton:!0,height:350},Cr(()=>this.uppy.setOptions(B({},this.uppyCoreConfiguration()))),Cr(()=>this.dashboardProps=B(B({},this.dashboardProps),this.dashboardPropsConfiguration())),Cr(()=>{this.resetUppy()&&this.uppy.cancelAll()}),this.uppy.on("upload",(r,s)=>{let o=s[0]?.data;this.showSample=!1,this.showSubtitle=!1,this.emitFileUpload(o),this.file.set(s[0].data),$p.default.parse(o,{skipEmptyLines:"greedy",header:!0,beforeFirstChunk:a=>{let n=a.split(/\r?\n/).slice(1);return n[n.length-1]===""&&n.pop(),this.rowSummary.update(u=>J(B({},u),{rowCount:n.length})),n.forEach(u=>{u.split(",").every(m=>m==="")&&this.rowSummary.update(m=>J(B({},m),{rowEmpty:m.rowEmpty+1}))}),a},error(a,n){console.log("ERROR",a,n)},complete:(a,n)=>{this.onParser.emit(a.data)}})}),this.uppy.on("complete",r=>{let s=r.successful?.map(a=>({file:a.data,id:a.id}))??[],o=r.successful[0]?.data;this.showSample=!1,this.showSubtitle=!1,this.emitFileUploadComplete(o),this.emitMultipleFilesUploaded(s),this.resetUppyOnComplete(),this.file.set(o),this.multipleFiles.set(s)}),this.uppy.on("file-removed",r=>{this.showSample=!0,this.showSubtitle=!0,this.file.set(null);let o=this.multipleFiles().filter(a=>a.id!=r.id);this.multipleFiles.set(o),this.fileRemoved.emit(r.id),this.rowSummary.set({rowCount:0,rowEmpty:0})}),this.onFileEdited()}onFileEdited(){this.clear()==!1&&(this.uppy.on("file-editor:start",r=>{}),this.uppy.on("file-editor:complete",r=>{this.handlingEditedImage(r)}),this.uppy.on("file-editor:cancel",r=>{}))}handlingEditedImage(r){this.multipleFiles.update(s=>s.map(o=>o.id===r.id?J(B({},o),{file:r.data}):o)),this.file.set(this.multipleFiles()[0].file),this.emitFileUploadComplete(this.file()),this.emitMultipleFilesUploaded(this.multipleFiles())}resetUppyOnComplete(){this.clear()&&this.uppy.clear()}formatFileSize(r,s=2){if(r===0)return"0 bytes";let o=Math.floor(Math.log(r)/Math.log(e.kilobyte));return`${(r/Math.pow(e.kilobyte,o)).toFixed(s)} ${e.sizes[o]}`}ngOnDestroy(){this.file.set(null),this.multipleFiles.set([])}emitFileUpload(r){let s=new File([r],r.name.replace(/ /g,"_"),{type:r.type});this.fileUploaded.emit(s)}emitFileUploadComplete(r){let s=new File([r],r.name.replace(/ /g,"_"),{type:r.type});this.fileUploadComplete.emit(s)}emitMultipleFilesUploaded(r){let s=r.map(o=>({file:new File([o.file],o.file.name.replace(/ /g,"_"),{type:o.file.type}),id:o.id}));this.multipleFilesUploaded.emit(s)}};e.sizes=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],e.kilobyte=1024,e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=Nr({type:e,selectors:[["POS-uppy"]],inputs:{folder:"folder",thumbnailSize:"thumbnailSize",sampleUrl:"sampleUrl",subtitle:"subtitle",showSample:"showSample",clear:[1,"clear"],resetUppy:[1,"resetUppy"],uppyCoreConfiguration:[1,"uppyCoreConfiguration"],dashboardPropsConfiguration:[1,"dashboardPropsConfiguration"]},outputs:{fileUploaded:"fileUploaded",fileUploadComplete:"fileUploadComplete",fileRemoved:"fileRemoved",onParser:"onParser",multipleFilesUploaded:"multipleFilesUploaded"},ngContentSelectors:Lc,decls:4,vars:4,consts:[[1,"position-relative"],[3,"uppy","props"],[1,"wrapper"],["role","alert",1,"alert","alert-warning","d-flex","flex-column","gap-2",2,"margin","1rem 0 0 0"],[1,"subtitle"],["role","button",1,"sample",3,"href"],[1,"fa-solid","fa-download","ms-3"],[1,"alert-heading"],[1,"fs-6","m-0"]],template:function(s,o){if(s&1&&(Fa(),qt(0,"div",0),kr(1,"uppy-dashboard",1),gi(2,Cc,4,2,"div",2),gi(3,Ic,7,2,"div",3),Xt()),s&2){let a;kt(),Es("uppy",o.uppy)("props",o.dashboardProps),kt(),yi(o.file()?-1:2),kt(),yi(o.file()&&((a=o.file())==null?null:a.type)==="text/csv"?3:-1)}},dependencies:[Vp],styles:[".uppy-Dashboard-AddFiles-info{display:none!important} .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:600px;margin-top:15px;padding-top:0;overflow-y:visible}.sample[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%]{top:56%;width:100%;text-align:center}.top-58[_ngcontent-%COMP%]{top:61%}.wrapper[_ngcontent-%COMP%]{position:absolute;left:0;bottom:30%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:.2rem;z-index:10}"]});let i=e;return i})();export{Kp as a,oF as b};
|