PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.0
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.0
1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 1.3.47 1.3.46 All 178 releases
disco / assets / build / plugin-analytics.js

plugin-analytics.js in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.0, at assets/build/plugin-analytics.js

1 lines 781.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{var e={606(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzdfMTE3NykiPgo8cGF0aCBkPSJNMC4yNSAwLjI1SDE1Ljc1VjE1Ljc1SDAuMjVWMC4yNVoiIGZpbGw9IiNGMUYyRjIiLz4KPHBhdGggZD0iTTAuMzc1IDEyLjM3NUgxNS4zNzVWMTIuNjI1SDAuMzc1VjEyLjM3NVoiIGZpbGw9IiNFNkU3RTgiLz4KPHBhdGggZD0iTTAuMzc1IDkuMjVIMTUuMzc1VjkuNUgwLjM3NVY5LjI1WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNMC4zNzUgNi4xMjVIMTUuMzc1VjYuMzc1SDAuMzc1VjYuMTI1WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNMC4zNzUgM0gxNS4zNzVWMy4yNUgwLjM3NVYzWiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNMTIuNzUgMC41SDEzVjE1LjUwMDRIMTIuNzVWMC41WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNOS42MjUgMC41SDkuODc1VjE1LjUwMDRIOS42MjVWMC41WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNNi41IDAuNUg2Ljc1VjE1LjUwMDRINi41VjAuNVoiIGZpbGw9IiNFNkU3RTgiLz4KPHBhdGggZD0iTTMuMzc1IDAuNUgzLjYyNVYxNS41MDA0SDMuMzc1VjAuNVoiIGZpbGw9IiNFNkU3RTgiLz4KPHBhdGggZD0iTTAuNzI0MzkxIDE1LjYxMDFMMC4yNzUzOTEgMTUuMzkwMUwzLjQzMjUyIDguOTQ0MzRMNi42NzU1MiAxMi4zMTdMOS42ODg3NyAxMC43NTAxSDEzLjQ5OTlWMTEuMjUwMUg5LjgxMTAyTDYuNTc0MjcgMTIuOTMzMkwzLjU2NzI3IDkuODA1ODRMMC43MjQzOTEgMTUuNjEwMVoiIGZpbGw9IiNCRTFFMkQiLz4KPHBhdGggZD0iTTAuNjc2NzQyIDE1LjY3NjlMMC4zMjMyNDIgMTUuMzIzNEwzLjMwNTEyIDEyLjM0MTRMNi40OTczNyA3LjQ4OTExTDkuNjIwNDkgNy43Mzg5OEwxMi42NjQ1IDIuOTkwMjNMMTMuMDg1NSAzLjI1OTk4TDkuODc5NDkgOC4yNjEyM0w2Ljc1MjYyIDguMDExMTFMMy42OTQ4NyAxMi42NTg5TDMuNjc2NzQgMTIuNjc2OUwwLjY3Njc0MiAxNS42NzY5WiIgZmlsbD0iIzAwQUVFRiIvPgo8cGF0aCBkPSJNMTUuNzUgMTUuNzVIMC4yNVYwLjI1SDAuNzVWMTUuMjVIMTUuNzVWMTUuNzVaIiBmaWxsPSIjNDM0QTU0Ii8+CjxwYXRoIGQ9Ik0wLjM3NSAxMi4zNzVIMS4zNzVWMTIuNjI1SDAuMzc1VjEyLjM3NVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTAuMzc1IDkuMjVIMS4zNzVWOS41SDAuMzc1VjkuMjVaIiBmaWxsPSIjNDM0QTU0Ii8+CjxwYXRoIGQ9Ik0wLjM3NSA2LjEyNUgxLjM3NVY2LjM3NUgwLjM3NVY2LjEyNVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTAuMzc1IDNIMS4zNzVWMy4yNUgwLjM3NVYzWiIgZmlsbD0iIzQzNEE1NCIvPgo8cGF0aCBkPSJNMTIuNzUgMTQuNjI1SDEzVjE1LjYyNUgxMi43NVYxNC42MjVaIiBmaWxsPSIjNDM0QTU0Ii8+CjxwYXRoIGQ9Ik05LjYyNSAxNC42MjVIOS44NzVWMTUuNjI1SDkuNjI1VjE0LjYyNVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTYuNSAxNC42MjVINi43NVYxNS42MjVINi41VjE0LjYyNVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTMuMzc1IDE0LjYyNUgzLjYyNVYxNS42MjVIMy4zNzVWMTQuNjI1WiIgZmlsbD0iIzQzNEE1NCIvPgo8cGF0aCBkPSJNMTUuMTI1IDExTDEzLjM3NSAxMFYxMkwxNS4xMjUgMTFaIiBmaWxsPSIjQkUxRTJEIi8+CjxwYXRoIGQ9Ik0xMy43NSAxLjc1TDEyIDIuNzEyMzdMMTMuNzA2NiAzLjc1TDEzLjc1IDEuNzVaIiBmaWxsPSIjMDBBRUVGIi8+CjxwYXRoIGQ9Ik05Ljc1IDguNTYyNUMxMC4wNjA3IDguNTYyNSAxMC4zMTI1IDguMzEwNjYgMTAuMzEyNSA4QzEwLjMxMjUgNy42ODkzNCAxMC4wNjA3IDcuNDM3NSA5Ljc1IDcuNDM3NUM5LjQzOTM0IDcuNDM3NSA5LjE4NzUgNy42ODkzNCA5LjE4NzUgOEM5LjE4NzUgOC4zMTA2NiA5LjQzOTM0IDguNTYyNSA5Ljc1IDguNTYyNVoiIGZpbGw9InVybCgjcGFpbnQwX3JhZGlhbF83NzM3XzExNzcpIi8+CjxwYXRoIGQ9Ik05Ljc1IDExLjU2MjVDMTAuMDYwNyAxMS41NjI1IDEwLjMxMjUgMTEuMzEwNyAxMC4zMTI1IDExQzEwLjMxMjUgMTAuNjg5MyAxMC4wNjA3IDEwLjQzNzUgOS43NSAxMC40Mzc1QzkuNDM5MzQgMTAuNDM3NSA5LjE4NzUgMTAuNjg5MyA5LjE4NzUgMTFDOS4xODc1IDExLjMxMDcgOS40MzkzNCAxMS41NjI1IDkuNzUgMTEuNTYyNVoiIGZpbGw9InVybCgjcGFpbnQxX3JhZGlhbF83NzM3XzExNzcpIi8+CjxwYXRoIGQ9Ik02LjYyNSA4LjMxMjVDNi45MzU2NiA4LjMxMjUgNy4xODc1IDguMDYwNjYgNy4xODc1IDcuNzVDNy4xODc1IDcuNDM5MzQgNi45MzU2NiA3LjE4NzUgNi42MjUgNy4xODc1QzYuMzE0MzQgNy4xODc1IDYuMDYyNSA3LjQzOTM0IDYuMDYyNSA3Ljc1QzYuMDYyNSA4LjA2MDY2IDYuMzE0MzQgOC4zMTI1IDYuNjI1IDguMzEyNVoiIGZpbGw9InVybCgjcGFpbnQyX3JhZGlhbF83NzM3XzExNzcpIi8+CjxwYXRoIGQ9Ik02LjYyNSAxMy4wNjI1QzYuOTM1NjYgMTMuMDYyNSA3LjE4NzUgMTIuODEwNyA3LjE4NzUgMTIuNUM3LjE4NzUgMTIuMTg5MyA2LjkzNTY2IDExLjkzNzUgNi42MjUgMTEuOTM3NUM2LjMxNDM0IDExLjkzNzUgNi4wNjI1IDEyLjE4OTMgNi4wNjI1IDEyLjVDNi4wNjI1IDEyLjgxMDcgNi4zMTQzNCAxMy4wNjI1IDYuNjI1IDEzLjA2MjVaIiBmaWxsPSJ1cmwoI3BhaW50M19yYWRpYWxfNzczN18xMTc3KSIvPgo8cGF0aCBkPSJNMy41IDEzLjA2MjVDMy44MTA2NiAxMy4wNjI1IDQuMDYyNSAxMi44MTA3IDQuMDYyNSAxMi41QzQuMDYyNSAxMi4xODkzIDMuODEwNjYgMTEuOTM3NSAzLjUgMTEuOTM3NUMzLjE4OTM0IDExLjkzNzUgMi45Mzc1IDEyLjE4OTMgMi45Mzc1IDEyLjVDMi45Mzc1IDEyLjgxMDcgMy4xODkzNCAxMy4wNjI1IDMuNSAxMy4wNjI1WiIgZmlsbD0idXJsKCNwYWludDRfcmFkaWFsXzc3MzdfMTE3NykiLz4KPHBhdGggZD0iTTMuNSA5LjkzNzVDMy44MTA2NiA5LjkzNzUgNC4wNjI1IDkuNjg1NjYgNC4wNjI1IDkuMzc1QzQuMDYyNSA5LjA2NDM0IDMuODEwNjYgOC44MTI1IDMuNSA4LjgxMjVDMy4xODkzNCA4LjgxMjUgMi45Mzc1IDkuMDY0MzQgMi45Mzc1IDkuMzc1QzIuOTM3NSA5LjY4NTY2IDMuMTg5MzQgOS45Mzc1IDMuNSA5LjkzNzVaIiBmaWxsPSJ1cmwoI3BhaW50NV9yYWRpYWxfNzczN18xMTc3KSIvPgo8L2c+CjxkZWZzPgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MF9yYWRpYWxfNzczN18xMTc3IiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDkuNzUgOCkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiM2MTlGRDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNEE5MUM5Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQxX3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoOS43NSAxMSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFNDU1NkQiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQ0Y0MzU3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQyX3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNi42MjUgNy43NSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiM2MTlGRDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNEE5MUM5Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQzX3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNi42MjUgMTIuNSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFNDU1NkQiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQ0Y0MzU3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ0X3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMy41IDEyLjUpIHNjYWxlKDAuNTYyNSkiPgo8c3RvcCBzdG9wLWNvbG9yPSIjNjE5RkQwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzRBOTFDOSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50NV9yYWRpYWxfNzczN18xMTc3IiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDMuNSA5LjM3NSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFNDU1NkQiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQ0Y0MzU3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfNzczN18xMTc3Ij4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="])},146(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzZfMTE0MikiPgo8cGF0aCBkPSJNMTYgMS44MzMzN0MxNiAwLjgyMjAyMSAxNS4xNzggMCAxNC4xNjY2IDBIMS44MzMzN0MwLjgyMjAyMSAwIDAgMC44MjIwMjEgMCAxLjgzMzM3VjE0LjE2NjZDMCAxNS4xNzggMC44MjIwMjEgMTYgMS44MzMzNyAxNkgxNC4xNjY2QzE1LjE3OCAxNiAxNiAxNS4xNzggMTYgMTQuMTY2NlYxLjgzMzM3WiIgZmlsbD0iIzRDQUY1MCIvPgo8cGF0aCBkPSJNMTIuMDU0NyA1LjM2MTU3QzEyLjMxNTMgNS42MjIxOSAxMi4zMTUzIDYuMDQzNDYgMTIuMDU0NyA2LjMwNDJMNy43MjEzMSAxMC42Mzc1QzcuNTkxMzEgMTAuNzY3NSA3LjQyMDY1IDEwLjgzMjkgNy4yNSAxMC44MzI5QzcuMDc5MzUgMTAuODMyOSA2LjkwODY5IDEwLjc2NzUgNi43Nzg2OSAxMC42Mzc1TDQuNjEyMDYgOC40NzA4M0M0LjM1MTMyIDguMjEwMjEgNC4zNTEzMiA3Ljc4ODgyIDQuNjEyMDYgNy41MjgyQzQuODcyNjggNy4yNjc0NiA1LjI5Mzk1IDcuMjY3NDYgNS41NTQ2OSA3LjUyODJMNy4yNSA5LjIyMzUxTDExLjExMjEgNS4zNjE1N0MxMS4zNzI3IDUuMTAwODMgMTEuNzkzOSA1LjEwMDgzIDEyLjA1NDcgNS4zNjE1N1oiIGZpbGw9IiNGQUZBRkEiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83NzM2XzExNDIiPgo8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="])},530(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjUgNi40Njg3NUMxNC40NDkyIDYuNDY4NzUgMTUuMjE4OCA1LjY5OTI0IDE1LjIxODggNC43NUMxNS4yMTg4IDMuODAwNzYgMTQuNDQ5MiAzLjAzMTI1IDEzLjUgMy4wMzEyNUMxMi41NTA4IDMuMDMxMjUgMTEuNzgxMiAzLjgwMDc2IDExLjc4MTIgNC43NUMxMS43ODEyIDUuNjk5MjQgMTIuNTUwOCA2LjQ2ODc1IDEzLjUgNi40Njg3NVoiIGZpbGw9IiMwMDM1N0IiLz4KPHBhdGggZD0iTTEzLjUgNi40Njg3NVYzLjAzMTI1QzE0LjQ0NzggMy4wMzEyNSAxNS4yMTg4IDMuODAyMTkgMTUuMjE4OCA0Ljc1QzE1LjIxODggNS42OTc4MSAxNC40NDc4IDYuNDY4NzUgMTMuNSA2LjQ2ODc1WiIgZmlsbD0iIzAwMTczNyIvPgo8cGF0aCBkPSJNMTYgOS42NDAzMVYxMy4wMjA2QzE2IDEzLjU0MzQgMTUuNTczMSAxMy45Njg4IDE1LjA0ODEgMTMuOTY4OEgxMS43NTE5QzExLjQ5MzEgMTMuOTY4OCAxMS4yODMxIDEzLjc1ODcgMTEuMjgzMSAxMy41QzExLjI4MzEgMTMuMDQ0MyAxMS4wMzEyIDEwLjczNTMgMTEuMDMxMiA5LjY0MDMxQzExLjAzMTIgOC40Nzc1IDExLjk4MzEgNy41MzEyNSAxMy4xNTMxIDcuNTMxMjVIMTMuODc4MUMxNS4wNDgxIDcuNTMxMjUgMTYgOC40Nzc1IDE2IDkuNjQwMzFaIiBmaWxsPSIjMDAzNTdCIi8+CjxwYXRoIGQ9Ik0xNiA5LjY0MDMxVjEzLjAyMDZDMTYgMTMuNTQzNCAxNS41NzMxIDEzLjk2ODggMTUuMDQ4MSAxMy45Njg4SDEzLjVWNy41MzEyNUgxMy44NzgxQzE1LjA0ODEgNy41MzEyNSAxNiA4LjQ3NzUgMTYgOS42NDAzMVoiIGZpbGw9IiMwMDE3MzciLz4KPHBhdGggZD0iTTIuNSA2LjQ2ODc1QzMuNDQ5MjQgNi40Njg3NSA0LjIxODc1IDUuNjk5MjQgNC4yMTg3NSA0Ljc1QzQuMjE4NzUgMy44MDA3NiAzLjQ0OTI0IDMuMDMxMjUgMi41IDMuMDMxMjVDMS41NTA3NiAzLjAzMTI1IDAuNzgxMjUgMy44MDA3NiAwLjc4MTI1IDQuNzVDMC43ODEyNSA1LjY5OTI0IDEuNTUwNzYgNi40Njg3NSAyLjUgNi40Njg3NVoiIGZpbGw9IiMwMDM1N0IiLz4KPHBhdGggZD0iTTIuNSA2LjQ2ODc1VjMuMDMxMjVDMy40NDc4MSAzLjAzMTI1IDQuMjE4NzUgMy44MDIxOSA0LjIxODc1IDQuNzVDNC4yMTg3NSA1LjY5NzgxIDMuNDQ3ODEgNi40Njg3NSAyLjUgNi40Njg3NVoiIGZpbGw9IiMwMDE3MzciLz4KPHBhdGggZD0iTTQuOTY4NzUgOS42NDAzMUM0Ljk2ODc1IDEwLjc3MDQgNC43MTY4OCAxMy4wMjM2IDQuNzE2ODggMTMuNUM0LjcxNjg4IDEzLjc1ODcgNC41MDY4OCAxMy45Njg4IDQuMjQ4MTMgMTMuOTY4OEgwLjkxOTA2MkMwLjQxMjE4OCAxMy45Njg4IDAgMTMuNTU4MSAwIDEzLjA1MzFWOS42NDAzMUMwIDguNDc3NSAwLjk1MTg3NSA3LjUzMTI1IDIuMTIxODggNy41MzEyNUgyLjg0Njg3QzQuMDE2ODcgNy41MzEyNSA0Ljk2ODc1IDguNDc3NSA0Ljk2ODc1IDkuNjQwMzFaIiBmaWxsPSIjMDAzNTdCIi8+CjxwYXRoIGQ9Ik00Ljk2ODc1IDkuNjQwMzFDNC45Njg3NSAxMC43NzA0IDQuNzE2ODggMTMuMDIzNiA0LjcxNjg4IDEzLjVDNC43MTY4OCAxMy43NTg3IDQuNTA2ODggMTMuOTY4OCA0LjI0ODEzIDEzLjk2ODhIMi41VjcuNTMxMjVIMi44NDY4N0M0LjAxNjg3IDcuNTMxMjUgNC45Njg3NSA4LjQ3NzUgNC45Njg3NSA5LjY0MDMxWiIgZmlsbD0iIzAwMTczNyIvPgo8cGF0aCBkPSJNOCA2LjQ2ODc1QzkuNTAxNTIgNi40Njg3NSAxMC43MTg4IDUuMjUxNTIgMTAuNzE4OCAzLjc1QzEwLjcxODggMi4yNDg0OCA5LjUwMTUyIDEuMDMxMjUgOCAxLjAzMTI1QzYuNDk4NDggMS4wMzEyNSA1LjI4MTI1IDIuMjQ4NDggNS4yODEyNSAzLjc1QzUuMjgxMjUgNS4yNTE1MiA2LjQ5ODQ4IDYuNDY4NzUgOCA2LjQ2ODc1WiIgZmlsbD0iIzU4QjM1NCIvPgo8cGF0aCBkPSJNOCA2LjQ2ODc1VjEuMDMxMjVDOS40OTkwNiAxLjAzMTI1IDEwLjcxODggMi4yNTA5NCAxMC43MTg4IDMuNzVDMTAuNzE4OCA1LjI0OTA2IDkuNDk5MDYgNi40Njg3NSA4IDYuNDY4NzVaIiBmaWxsPSIjMDBBOTYzIi8+CjxwYXRoIGQ9Ik0xMi4yMTg4IDExLjMxMzFWMTMuODc0NEMxMi4yMTg4IDE0LjQ3NzggMTEuNzI3OCAxNC45Njg4IDExLjEyNDQgMTQuOTY4OEg0Ljg3NTYzQzQuMjcyMTkgMTQuOTY4OCAzLjc4MTI1IDE0LjQ3NzggMy43ODEyNSAxMy44NzQ0VjExLjMxMzFDMy43ODEyNSA5LjIyNzgxIDUuNDc3ODEgNy41MzEyNSA3LjU2MzEzIDcuNTMxMjVIOC40MzY4OEMxMC41MjIyIDcuNTMxMjUgMTIuMjE4OCA5LjIyNzgxIDEyLjIxODggMTEuMzEzMVoiIGZpbGw9IiM1OEIzNTQiLz4KPHBhdGggZD0iTTEyLjIxODggMTEuMzEzMVYxMy44NzQ0QzEyLjIxODggMTQuNDc3OCAxMS43Mjc4IDE0Ljk2ODggMTEuMTI0NCAxNC45Njg4SDhWNy41MzEyNUg4LjQzNjg4QzEwLjUyMjIgNy41MzEyNSAxMi4yMTg4IDkuMjI3ODEgMTIuMjE4OCAxMS4zMTMxWiIgZmlsbD0iIzAwQTk2MyIvPgo8L3N2Zz4K"])},675(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzdfMTIyMykiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMzMzNDMgNS4zMzM2NkM0Ljg2Njc2IDUuMzMzNjYgNS4zMzM0MyA0Ljg2Njk5IDUuMzMzNDMgNC4zMzM2NkM1LjMzMzQzIDMuODAwMzMgNC44NjY3NiAzLjMzMzY2IDQuMzMzNDMgMy4zMzM2NkMzLjgwMDEgMy4zMzM2NiAzLjMzMzQzIDMuODAwMzMgMy4zMzM0MyA0LjMzMzY2QzMuMzMzNDMgNC44NjY5OSAzLjgwMDEgNS4zMzM2NiA0LjMzMzQzIDUuMzMzNjZaTTYuMzMzNDMgMC42NjY5OTJDNi45MzM0MyAwLjY2Njk5MiA3LjMzMzQzIDAuNjY2OTkyIDcuNjY2NzYgMC43MzM2NTlDOC4wMDAxIDAuODAwMzI2IDguMzMzNDMgMC45MzM2NTkgOC42MDAxIDEuMTMzNjZDOC45MzM0MyAxLjMzMzY2IDkuMjAwMSAxLjYwMDMzIDkuNjAwMSAyLjA2Njk5TDkuNjY2NzcgMi4xMzM2NkwxNC40MDAxIDYuODY2OTlDMTUuMDAwMSA3LjQ2Njk5IDE1LjMzMzQgOC4yMDAzMyAxNS4zMzM0IDkuMDY2OTlDMTUuMzMzNCA5Ljg2Njk5IDE1LjAwMDEgMTAuNjY3IDE0LjQwMDEgMTEuMjY3TDExLjEzMzQgMTQuNTMzN0MxMC41MzM0IDE1LjEzMzcgOS44MDAxIDE1LjQ2NyA4LjkzMzQzIDE1LjQ2N0M4LjA2Njc2IDE1LjQ2NyA3LjMzMzQzIDE1LjEzMzcgNi43MzM0MyAxNC41MzM3TDIuMDAwMSA5LjgwMDMzTDEuOTMzNDMgOS43MzM2NkMxLjUzMzQzIDkuMzMzNjYgMS4yNjY3NiA5LjA2Njk5IDEuMDAwMSA4LjczMzY2QzAuODAwMDk4IDguNDY2OTkgMC42NjY3NjQgOC4xMzM2NiAwLjYwMDA5OCA3LjgwMDMzQzAuNjY2NzY0IDcuMjY2OTkgMC42NjY3NjQgNi44NjY5OSAwLjY2Njc2NCA2LjMzMzY2VjYuMjY2OTlWNS42MDAzM0MwLjY2Njc2NCA0Ljg2Njk5IDAuNjY2NzY0IDQuMjY2OTkgMC43MzM0MzEgMy44MDAzM0MwLjgwMDA5OCAzLjMzMzY2IDAuODY2NzY0IDIuODY2OTkgMS4wNjY3NiAyLjQ2Njk5QzEuMzMzNDMgMS44NjY5OSAxLjg2Njc2IDEuMzMzNjYgMi40NjY3NiAxLjAwMDMzQzIuODY2NzYgMC44MDAzMjYgMy4yNjY3NiAwLjczMzY1OSAzLjgwMDEgMC42NjY5OTJINS42MDAxSDYuMjY2NzZINi4zMzM0M1oiIGZpbGw9IiMxMDg5RkYiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83NzM3XzEyMjMiPgo8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="])},149(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzdfMTIyNikiPgo8cGF0aCBkPSJNMSAwLjVIMTJDMTIuNTUyMiAwLjUgMTMgMC45NDc3NTQgMTMgMS41VjE1QzEzIDE1LjU1MjIgMTIuNTUyMiAxNiAxMiAxNkgxQzAuNDQ3NzU0IDE2IDAgMTUuNTUyMiAwIDE1VjEuNUMwIDAuOTQ3NzU0IDAuNDQ3NzU0IDAuNSAxIDAuNVoiIGZpbGw9IiNFQ0NFOTMiLz4KPHBhdGggZD0iTTEgMTEuNzA3VjEuNUgxMlYxNUg0LjI5Mjk3TDEgMTEuNzA3WiIgZmlsbD0iI0VGRUZFRiIvPgo8cGF0aCBkPSJNNC4yOTI5NyAxMS43MDdWMTVMMSAxMS43MDdINC4yOTI5N1oiIGZpbGw9IiNFNzZFNTQiLz4KPHBhdGggZD0iTTQgMlYwSDlWMkM5IDIuNTUyMjUgOC41NTIyNSAzIDggM0g1QzQuNDQ3NzUgMyA0IDIuNTUyMjUgNCAyWiIgZmlsbD0iI0U3NkU1NCIvPgo8cGF0aCBkPSJNMTYgMTEuNUMxNiAxMy45ODUyIDEzLjk4NTIgMTYgMTEuNSAxNkM5LjAxNDc3IDE2IDcgMTMuOTg1MiA3IDExLjVDNyA5LjAxNDc3IDkuMDE0NzcgNyAxMS41IDdDMTMuOTg1MiA3IDE2IDkuMDE0NzcgMTYgMTEuNVoiIGZpbGw9IiM0OEM4RUYiLz4KPHBhdGggZD0iTTEwLjQ2ODkgMTMuNDI2OUw5LjQ5OTkxIDEyLjQ1NzRDOS4zMDQ3MiAxMi4yNjIxIDkuMzA0NzIgMTEuOTQ1NSA5LjQ5OTkxIDExLjc1MDNDOS42OTUxIDExLjU1NTEgMTAuMDExNiAxMS41NTUxIDEwLjIwNjkgMTEuNzUwM0wxMC41MzA5IDEyLjA3MzhMMTIuNzk1NCAxMC4xODY0QzEzLjAwNzYgMTAuMDA5NCAxMy4zMjMyIDEwLjAzODEgMTMuNDk5OSAxMC4yNTAzQzEzLjY3NjkgMTAuNDYyNSAxMy42NDgyIDEwLjc3OCAxMy40MzU5IDEwLjk1NDhMMTAuNDY4OSAxMy40MjY5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTUuNSA0SDkuNUM5Ljc3NjEyIDQgMTAgNC4yMjM4OCAxMCA0LjVDMTAgNC43NzYxMiA5Ljc3NjEyIDUgOS41IDVINS41QzUuMjIzODggNSA1IDQuNzc2MTIgNSA0LjVDNSA0LjIyMzg4IDUuMjIzODggNCA1LjUgNFoiIGZpbGw9IiM3Nzk1OUUiLz4KPHBhdGggZD0iTTMgNEg0VjVIM1Y0WiIgZmlsbD0iIzc3OTU5RSIvPgo8cGF0aCBkPSJNMyA2SDRWN0gzVjZaIiBmaWxsPSIjNzc5NTlFIi8+CjxwYXRoIGQ9Ik0zIDhINFY5SDNWOFoiIGZpbGw9IiM3Nzk1OUUiLz4KPHBhdGggZD0iTTMgMTBINFYxMUgzVjEwWiIgZmlsbD0iIzc3OTU5RSIvPgo8cGF0aCBkPSJNNS41IDZIOC41QzguNzc2MTIgNiA5IDYuMjIzODggOSA2LjVDOSA2Ljc3NjEyIDguNzc2MTIgNyA4LjUgN0g1LjVDNS4yMjM4OCA3IDUgNi43NzYxMiA1IDYuNUM1IDYuMjIzODggNS4yMjM4OCA2IDUuNSA2WiIgZmlsbD0iIzc3OTU5RSIvPgo8cGF0aCBkPSJNNS41IDhINi41QzYuNzc2MTIgOCA3IDguMjIzODggNyA4LjVDNyA4Ljc3NjEyIDYuNzc2MTIgOSA2LjUgOUg1LjVDNS4yMjM4OCA5IDUgOC43NzYxMiA1IDguNUM1IDguMjIzODggNS4yMjM4OCA4IDUuNSA4WiIgZmlsbD0iIzc3OTU5RSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzc3MzdfMTIyNiI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"])},789(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzZfMTExMCkiPgo8cGF0aCBkPSJNMTEuMjcwNiAxNC4wNzEyQzkuMjQ3MDggMTYuMDk0NyA1LjUyOTQ0IDE1LjYyNDEgMi45NDEyIDEzLjA1OTRDMC4zNzY0OTYgMTAuNDcxMiAtMC4wNzA1NjMxIDYuNzMwMDIgMS45NTI5NyA0LjczMDAyTDIuNTg4MjYgNC4wOTQ3M0wxMS45Mjk0IDEzLjQxMjRMMTEuMjcwNiAxNC4wNzEyWiIgZmlsbD0iI0NDMTA0QSIvPgo8cGF0aCBkPSJNMTEuODgyMiAxMy40NTlDOS44NTg2OSAxNS40ODI1IDYuMTQxMDQgMTUuMDExOSAzLjU1MjgxIDEyLjQ0NzJDMC45NjQ1NzQgOS44NTg5NyAwLjUxNzUxNSA2LjE0MTMyIDIuNTQxMDQgNC4xMTc3OUM0LjU2NDU3IDIuMDk0MjYgOC4yODIyMiAyLjU2NDg1IDEwLjg0NjkgNS4xMjk1NkMxMS42MjM0IDUuOTA2MDMgMTIuMjExNiA2LjgwMDE1IDEyLjU4ODEgNy42OTQyNkMxMi43MDU4IDguMDAwMTUgMTIuODIzNCA4LjI4MjUgMTIuODk0IDguNTg4MzhDMTMuNDExNiAxMC40MjM3IDEzLjA4MjIgMTIuMjU5IDExLjg4MjIgMTMuNDU5WiIgZmlsbD0iI0YzNEI1OCIvPgo8cGF0aCBkPSJNMTAuMjM1MiA1Ljc2NDU4QzEyLjIzNTIgNy43NjQ1OCAxMi41ODgyIDEwLjY1ODcgMTEuMDM1MiAxMi4yMzUyQzkuNDgyMyAxMy44MTE2IDYuNTY0NjUgMTMuNDM1MiA0LjU2NDY1IDExLjQzNTJDMi41NjQ2NSA5LjQzNTE3IDIuMjExNzEgNi41NDEwNSAzLjc2NDY1IDQuOTY0NThDNS4zMTc2IDMuMzg4MTEgOC4yMzUyNCAzLjc2NDU4IDEwLjIzNTIgNS43NjQ1OFoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik05LjYyMzU3IDYuMzc2NTNDMTEuMDgyNCA3LjgzNTM1IDExLjM0MTIgOS45NTMgMTAuMjExOCAxMS4wODI0QzkuMDgyNCAxMi4yMTE4IDYuOTY0NzUgMTEuOTc2NSA1LjUwNTkzIDEwLjQ5NDJDNC4wNDcxIDkuMDM1MzUgMy43ODgyOCA2LjkxNzcxIDQuOTE3NjkgNS43ODgzQzYuMDQ3MSA0LjY1ODg4IDguMTY0NzUgNC45MTc3MSA5LjYyMzU3IDYuMzc2NTNaIiBmaWxsPSIjRjM0QjU4Ii8+CjxwYXRoIGQ9Ik04Ljk2NDkxIDcuMDM1MThDOS45MDYwOSA3Ljk3NjM2IDEwLjA3MDggOS4zMTc1MyA5LjM0MTM4IDEwLjA0NjlDOC42MTE5NyAxMC43NzY0IDcuMjcwNzkgMTAuNjExNyA2LjMyOTYxIDkuNjcwNDdDNS4zODg0NCA4LjcyOTMgNS4yMjM3MyA3LjM4ODEyIDUuOTUzMTQgNi42NTg3MUM2LjY4MjU2IDUuOTI5MyA4LjA0NzI2IDYuMDk0IDguOTY0OTEgNy4wMzUxOFoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik04LjM1Mjc5IDcuNjQ3NjFDOC43OTk4NSA4LjA5NDY3IDguODkzOTYgOC43NTM0OSA4LjU0MTAyIDkuMTI5OTZDOC4xNjQ1NSA5LjQ4MjkxIDcuNTA1NzMgOS40MTIzMiA3LjA1ODY3IDguOTQxNzNDNi42MTE2MSA4LjQ5NDY3IDYuNTE3NDkgNy44MzU4NSA2Ljg3MDQzIDcuNDgyOTFDNy4yMjMzOCA3LjEyOTk2IDcuODgyMiA3LjIwMDU1IDguMzUyNzkgNy42NDc2MVoiIGZpbGw9IiNGMzRCNTgiLz4KPGcgb3BhY2l0eT0iMC4yIj4KPHBhdGggZD0iTTEyLjkxNzcgOC42MTE4OUw3LjgxMTg2IDguNjM1NDJDNy4yMjM2MiA4LjYzNTQyIDcuMjAwMDkgNy43NDEzIDcuODExODYgNy43NDEzTDEyLjYxMTkgNy43MTc3N0MxMi43Mjk1IDguMDIzNjYgMTIuODIzNiA4LjMwNjAxIDEyLjkxNzcgOC42MTE4OVoiIGZpbGw9IiMxRDI5NDMiLz4KPC9nPgo8cGF0aCBkPSJNNC4wOTQwNiAxMS45MDU5QzMuNDgyMyAxMS40NTg4IDIuOTg4MTggMTAuODQ3MSAyLjYzNTI0IDEwLjE4ODJDMi4yODIzIDkuNTA1ODggMi4wNzA1MyA4Ljc1Mjk0IDIuMDk0MDYgOEMyLjMwNTgzIDguNzI5NDEgMi41NjQ2NSA5LjQxMTc2IDIuOTE3NTkgMTAuMDQ3MUMzLjI0NyAxMC42ODI0IDMuNjQ3IDExLjI5NDEgNC4wOTQwNiAxMS45MDU5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTE0LjE0MTIgMS44NTg5NUMxNC4zMjk1IDIuMDQ3MTkgMTQuMzI5NSAyLjMyOTU0IDE0LjE0MTIgMi40OTQyNEw4LjExNzcxIDguNDk0MjRDNy45NTMgOC42NTg5NSA3LjY3MDY1IDguNjU4OTUgNy40ODI0MiA4LjQ5NDI0QzcuMzE3NzEgOC4zMjk1NCA3LjMxNzcxIDguMDQ3MTkgNy40ODI0MiA3Ljg1ODk1TDEzLjUwNTkgMS44NTg5NUMxMy42OTQyIDEuNjcwNzEgMTMuOTc2NSAxLjY3MDcxIDE0LjE0MTIgMS44NTg5NVoiIGZpbGw9IiMxRDI5NDMiLz4KPHBhdGggZD0iTTE0LjA0NjkgMi41NjU0M0wxNS4xMDU4IDIuODcxMzFDMTUuMjk0IDIuOTE4MzcgMTUuMzY0NiAzLjE1MzY3IDE1LjIyMzQgMy4yOTQ4NEwxNC45NDExIDMuNTc3MTlDMTQuODIzNCAzLjY5NDg0IDE0LjYzNTIgMy43NDE5IDE0LjQ3MDUgMy42OTQ4NEwxNC4xMTc1IDMuNjAwNzJMMTQuMTg4MSAzLjY3MTMxQzE0LjM3NjQgMy44NTk1NSAxNC4zNzY0IDQuMTY1NDMgMTQuMTg4MSA0LjM1MzY3TDEzLjU5OTkgNC45NDE5QzEzLjQ4MjIgNS4wNTk1NSAxMy4yOTQgNS4xMDY2MSAxMy4xMjkzIDUuMDU5NTVMMTEuOTA1OCA0LjcwNjYxTDE0LjA0NjkgMi41NjU0M1oiIGZpbGw9IiNGRkQwNkMiLz4KPHBhdGggZD0iTTEzLjQzNTUgMS45Mjk3MUwxMy4xMjk2IDAuODcwODg5QzEzLjA4MjUgMC42ODI2NTQgMTIuODQ3MyAwLjYxMjA2NiAxMi43MDYxIDAuNzUzMjQyTDExLjg1OSAxLjYwMDNDMTEuNzQxNCAxLjcxNzk1IDExLjY5NDMgMS45MDYxOCAxMS43NDE0IDIuMDcwODlMMTEuODM1NSAyLjQyMzgzTDExLjYwMDIgMi4xODg1NEMxMS41MDYxIDIuMDk0NDIgMTEuMzQxNCAyLjA5NDQyIDExLjI0NzMgMi4xODg1NEwxMS4wNTkgMi40MDAzQzEwLjk0MTQgMi41MTc5NSAxMC44OTQzIDIuNzA2MTggMTAuOTQxNCAyLjg3MDg5TDExLjI5NDMgNC4wNzA4OUwxMy40MzU1IDEuOTI5NzFaIiBmaWxsPSIjRkZEMDZDIi8+CjxwYXRoIGQ9Ik0xMS44MTIgMy45NTMzM0MxMi4wMjM4IDMuNjcwOTggMTIuMjgyNiAzLjM4ODYzIDEyLjU0MTQgMy4xMjk4QzEyLjY4MjYgMy4wMTIxNiAxMy4xMDYxIDIuNTg4NjMgMTIuOTQxNCAyLjc1MzMzQzEzLjA4MjYgMi42MzU2OCAxMy4yMjM4IDIuNTE4MDQgMTMuMzY1IDIuNDAwMzlDMTMuMjQ3MyAyLjU0MTU3IDEzLjEyOTcgMi42ODI3NCAxMy4wMTIgMi44MjM5MkMxMi44OTQ0IDIuOTY1MSAxMi43NTMyIDMuMDgyNzQgMTIuNjM1NSAzLjIyMzkyQzEyLjM3NjcgMy40ODI3NCAxMi4xMTc5IDMuNzE4MDQgMTEuODEyIDMuOTUzMzNaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzc3MzZfMTExMCI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"])},351(e,t,n){var r;!function(){"use strict";var o,i=1e9,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,c="[DecimalError] ",l=c+"Invalid argument: ",u=c+"Exponent out of range: ",d=Math.floor,f=Math.pow,p=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,h=1e7,m=d(1286742750677284.5),g={};function y(e,t){var n,r,o,i,a,c,l,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),s?E(t,f):t;if(l=e.d,u=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o){for(i<0?(r=l,i=-i,c=u.length):(r=u,o=a,c=l.length),i>(c=(a=Math.ceil(f/7))>c?a+1:c+1)&&(i=c,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((c=l.length)-(i=u.length)<0&&(i=c,r=u,u=l,l=r),n=0;i;)n=(l[--i]=l[i]+u[i]+n)/h|0,l[i]%=h;for(n&&(l.unshift(n),++o),c=l.length;0==l[--c];)l.pop();return t.d=l,t.e=o,s?E(t,f):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(l+e)}function b(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(i+=O(n)),i+=r;(n=7-(r=(a=e[t])+"").length)&&(i+=O(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},g.comparedTo=g.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(o=e.d.length)?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return x(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this.constructor;return E(x(this,new t(e),0,1),t.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return M(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return 0===this.s},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(o))throw Error(c+"NaN");if(n.s<1)throw Error(c+(n.s?"NaN":"-Infinity"));return n.eq(o)?new r(0):(s=!1,t=x(N(n,a),N(e,a),a),s=!0,E(t,i))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?k(t,e):y(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(c+"NaN");return n.s?(s=!1,t=x(n,e,0,1).times(e),s=!0,n.minus(t)):E(new r(n),o)},g.naturalExponential=g.exp=function(){return w(this)},g.naturalLogarithm=g.ln=function(){return N(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y(t,e):k(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(l+e);if(t=M(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,i,a,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(c+"NaN")}for(e=M(l),s=!1,0==(o=Math.sqrt(+l))||o==1/0?(((t=b(l.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new u(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new u(o.toString()),o=a=(n=u.precision)+3;;)if(r=(i=r).plus(x(l,i,a+2)).times(.5),b(i.d).slice(0,a)===(t=b(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(E(i,n+1,0),i.times(i).eq(l)){r=i;break}}else if("9999"!=t)break;a+=4}return s=!0,E(r,n)},g.times=g.mul=function(e){var t,n,r,o,i,a,c,l,u,d=this,f=d.constructor,p=d.d,m=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,(l=p.length)<(u=m.length)&&(i=p,p=m,m=i,a=l,l=u,u=a),i=[],r=a=l+u;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,o=l+r;o>r;)c=i[o]+m[r]*p[o-r-1]+t,i[o--]=c%h|0,t=c/h|0;i[o]=(i[o]+t)%h|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,s?E(e,f.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(v(e,0,i),void 0===t?t=r.rounding:v(t,0,8),E(n,e+M(n)+1,t))},g.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=D(r,!0):(v(e,0,i),void 0===t?t=o.rounding:v(t,0,8),n=D(r=E(new o(r),e+1,t),!0,e+1)),n},g.toFixed=function(e,t){var n,r,o=this,a=o.constructor;return void 0===e?D(o):(v(e,0,i),void 0===t?t=a.rounding:v(t,0,8),n=D((r=E(new a(o),e+M(o)+1,t)).abs(),!1,e+M(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return E(new t(e),M(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,i,a,l,u=this,f=u.constructor,p=+(e=new f(e));if(!e.s)return new f(o);if(!(u=new f(u)).s){if(e.s<1)throw Error(c+"Infinity");return u}if(u.eq(o))return u;if(r=f.precision,e.eq(o))return E(u,r);if(l=(t=e.e)>=(n=e.d.length-1),a=u.s,l){if((n=p<0?-p:p)<=9007199254740991){for(i=new f(o),t=Math.ceil(r/7+4),s=!1;n%2&&I((i=i.times(u)).d,t),0!==(n=d(n/2));)I((u=u.times(u)).d,t);return s=!0,e.s<0?new f(o).div(i):E(i,r)}}else if(a<0)throw Error(c+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,s=!1,i=e.times(N(u,r+12)),s=!0,(i=w(i)).s=a,i},g.toPrecision=function(e,t){var n,r,o=this,a=o.constructor;return void 0===e?r=D(o,(n=M(o))<=a.toExpNeg||n>=a.toExpPos):(v(e,1,i),void 0===t?t=a.rounding:v(t,0,8),r=D(o=E(new a(o),e,t),e<=(n=M(o))||n<=a.toExpNeg,e)),r},g.toSignificantDigits=g.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(v(e,1,i),void 0===t?t=n.rounding:v(t,0,8)),E(new n(this),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=M(e),n=e.constructor;return D(e,t<=n.toExpNeg||t>=n.toExpPos)};var x=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%h|0,r=n/h|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*h+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a){var s,l,u,d,f,p,m,g,y,v,b,x,w,j,O,N,S,k,D=r.constructor,I=r.s==o.s?1:-1,A=r.d,T=o.d;if(!r.s)return new D(r);if(!o.s)throw Error(c+"Division by zero");for(l=r.e-o.e,S=T.length,O=A.length,g=(m=new D(I)).d=[],u=0;T[u]==(A[u]||0);)++u;if(T[u]>(A[u]||0)&&--l,(x=null==i?i=D.precision:a?i+(M(r)-M(o))+1:i)<0)return new D(0);if(x=x/7+2|0,u=0,1==S)for(d=0,T=T[0],x++;(u<O||d)&&x--;u++)w=d*h+(A[u]||0),g[u]=w/T|0,d=w%T|0;else{for((d=h/(T[0]+1)|0)>1&&(T=e(T,d),A=e(A,d),S=T.length,O=A.length),j=S,v=(y=A.slice(0,S)).length;v<S;)y[v++]=0;(k=T.slice()).unshift(0),N=T[0],T[1]>=h/2&&++N;do{d=0,(s=t(T,y,S,v))<0?(b=y[0],S!=v&&(b=b*h+(y[1]||0)),(d=b/N|0)>1?(d>=h&&(d=h-1),1==(s=t(f=e(T,d),y,p=f.length,v=y.length))&&(d--,n(f,S<p?k:T,p))):(0==d&&(s=d=1),f=T.slice()),(p=f.length)<v&&f.unshift(0),n(y,f,v),-1==s&&(s=t(T,y,S,v=y.length))<1&&(d++,n(y,S<v?k:T,v)),v=y.length):0===s&&(d++,y=[0]),g[u++]=d,s&&y[0]?y[v++]=A[j]||0:(y=[A[j]],v=1)}while((j++<O||void 0!==y[0])&&x--)}return g[0]||g.shift(),m.e=l,E(m,a?i+M(m)+1:i)}}();function w(e,t){var n,r,i,a,c,l=0,d=0,p=e.constructor,h=p.precision;if(M(e)>16)throw Error(u+M(e));if(!e.s)return new p(o);for(null==t?(s=!1,c=h):c=t,a=new p(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(c+=Math.log(f(2,d))/Math.LN10*2+5|0,n=r=i=new p(o),p.precision=c;;){if(r=E(r.times(e),c),n=n.times(++l),b((a=i.plus(x(r,n,c))).d).slice(0,c)===b(i.d).slice(0,c)){for(;d--;)i=E(i.times(i),c);return p.precision=h,null==t?(s=!0,E(i,h)):i}i=a}}function M(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function j(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(c+"LN10 precision limit exceeded");return E(new e(e.LN10),t)}function O(e){for(var t="";e--;)t+="0";return t}function N(e,t){var n,r,i,a,l,u,d,f,p,h=1,m=e,g=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(c+(m.s?"NaN":"-Infinity"));if(m.eq(o))return new y(0);if(null==t?(s=!1,f=v):f=t,m.eq(10))return null==t&&(s=!0),j(y,f);if(f+=10,y.precision=f,r=(n=b(g)).charAt(0),a=M(m),!(Math.abs(a)<15e14))return d=j(y,f+2,v).times(a+""),m=N(new y(r+"."+n.slice(1)),f-10).plus(d),y.precision=v,null==t?(s=!0,E(m,v)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((m=m.times(e)).d)).charAt(0),h++;for(a=M(m),r>1?(m=new y("0."+n),a++):m=new y(r+"."+n.slice(1)),u=l=m=x(m.minus(o),m.plus(o),f),p=E(m.times(m),f),i=3;;){if(l=E(l.times(p),f),b((d=u.plus(x(l,new y(i),f))).d).slice(0,f)===b(u.d).slice(0,f))return u=u.times(2),0!==a&&(u=u.plus(j(y,f+2,v).times(a+""))),u=x(u,new y(h),f),y.precision=v,null==t?(s=!0,E(u,v)):u;u=d,i+=2}}function S(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),s&&(e.e>m||e.e<-m))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function E(e,t,n){var r,o,i,a,c,l,p,g,y=e.d;for(a=1,i=y[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,p=y[g=0];else{if((g=Math.ceil((r+1)/7))>=(i=y.length))return e;for(p=i=y[g],a=1;i>=10;i/=10)a++;o=(r%=7)-7+a}if(void 0!==n&&(c=p/(i=f(10,a-o-1))%10|0,l=t<0||void 0!==y[g+1]||p%i,l=n<4?(c||l)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||l||6==n&&(r>0?o>0?p/f(10,a-o):0:y[g-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return l?(i=M(e),y.length=1,t=t-i-1,y[0]=f(10,(7-t%7)%7),e.e=d(-t/7)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==r?(y.length=g,i=1,g--):(y.length=g+1,i=f(10,7-r),y[g]=o>0?(p/f(10,a-o)%f(10,o)|0)*i:0),l)for(;;){if(0==g){(y[0]+=i)==h&&(y[0]=1,++e.e);break}if(y[g]+=i,y[g]!=h)break;y[g--]=0,i=1}for(r=y.length;0===y[--r];)y.pop();if(s&&(e.e>m||e.e<-m))throw Error(u+M(e));return e}function k(e,t){var n,r,o,i,a,c,l,u,d,f,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),s?E(t,m):t;if(l=e.d,f=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r){for((d=a<0)?(n=l,a=-a,c=f.length):(n=f,r=u,c=l.length),a>(o=Math.max(Math.ceil(m/7),c)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((d=(o=l.length)<(c=f.length))&&(c=o),o=0;o<c;o++)if(l[o]!=f[o]){d=l[o]<f[o];break}a=0}for(d&&(n=l,l=f,f=n,t.s=-t.s),c=l.length,o=f.length-c;o>0;--o)l[c++]=0;for(o=f.length;o>a;){if(l[--o]<f[o]){for(i=o;i&&0===l[--i];)l[i]=h-1;--l[i],l[o]+=h}l[o]-=f[o]}for(;0===l[--c];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,s?E(t,m):t):new p(0)}function D(e,t,n){var r,o=M(e),i=b(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+O(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+O(-o-1)+i,n&&(r=n-a)>0&&(i+=O(r))):o>=a?(i+=O(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+O(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=O(r))),e.s<0?"-"+i:i}function I(e,t){if(e.length>t)return e.length=t,!0}function A(e){if(!e||"object"!=typeof e)throw Error(c+"Object expected");var t,n,r,o=["precision",1,i,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(d(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(l+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(l+n+": "+r);this[n]=new this(r)}return this}(a=function e(t){var n,r,o;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(l+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):S(t,e.toString())}if("string"!=typeof e)throw Error(l+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!p.test(e))throw Error(l+e);S(t,e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=A,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}(a)).default=a.Decimal=a,o=new a(1),void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},228(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var c,l,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){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,o),!0;case 5:return u.fn.call(u.context,t,r,o,i),!0;case 6:return u.fn.call(u.context,t,r,o,i,a),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var f,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,o);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];u[l].fn.apply(u[l].context,c)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==t||o&&!s[c].once||r&&s[c].context!==r)&&l.push(s[c]);l.length?this._events[i]=1===l.length?l[0]:l:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},405(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition");Symbol.for("react.client.reference");t.zv=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case u:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case l:case p:case f:case s:return e;default:return t}}case r:return t}}}(e)===o}},493(e,t,n){"use strict";var r=n(609),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s(function(){o.value=n,o.getSnapshot=t,l(o)&&u({inst:o})},[e,n,t]),a(function(){return l(o)&&u({inst:o}),e(function(){l(o)&&u({inst:o})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},162(e,t,n){"use strict";var r=n(609),o=n(888),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=r.useRef,c=r.useEffect,l=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(a=e,t):(a=e,s=n)}var a,s,c=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,o]);var p=a(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}},160(e,t,n){"use strict";var r=n(609),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,c=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return a=t}return a=e}if(t=a,o(i,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,a=n)}var i,a,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,u]);var p=i(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}},888(e,t,n){"use strict";e.exports=n(493)},242(e,t,n){"use strict";e.exports=n(162)},418(e,t,n){"use strict";e.exports=n(160)},609(e){"use strict";e.exports=window.React}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}const i=Object.create(null);n.r(i);const a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&o&&r;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(i,a),i}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],i=t[r++];n.o(e,o)?0===i&&r++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.hasOwn(e,t),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{Button:()=>_m,CaptionLabel:()=>Rm,Chevron:()=>Lm,Day:()=>Um,DayButton:()=>Ym,Dropdown:()=>Fm,DropdownNav:()=>Wm,Footer:()=>Bm,Month:()=>Qm,MonthCaption:()=>qm,MonthGrid:()=>Gm,Months:()=>$m,MonthsDropdown:()=>Km,Nav:()=>Zm,NextMonthButton:()=>Xm,Option:()=>Jm,PreviousMonthButton:()=>eg,Root:()=>tg,Select:()=>ng,Week:()=>rg,WeekNumber:()=>ag,WeekNumberHeader:()=>sg,Weekday:()=>og,Weekdays:()=>ig,Weeks:()=>cg,YearsDropdown:()=>lg});var t={};n.r(t),n.d(t,{formatCaption:()=>dg,formatDay:()=>pg,formatMonthCaption:()=>fg,formatMonthDropdown:()=>hg,formatWeekNumber:()=>gg,formatWeekNumberHeader:()=>yg,formatWeekdayName:()=>mg,formatYearCaption:()=>bg,formatYearDropdown:()=>vg});var r={};n.r(r),n.d(r,{labelCaption:()=>jg,labelDay:()=>wg,labelDayButton:()=>xg,labelGrid:()=>Mg,labelGridcell:()=>Og,labelMonthDropdown:()=>Ng,labelNav:()=>Sg,labelNext:()=>kg,labelPrevious:()=>Dg,labelWeekNumber:()=>Ag,labelWeekNumberHeader:()=>Tg,labelWeekday:()=>Ig,labelYearDropdown:()=>Cg});var o={};n.r(o),n.d(o,{scaleBand:()=>qO,scaleDiverging:()=>WD,scaleDivergingLog:()=>BD,scaleDivergingPow:()=>qD,scaleDivergingSqrt:()=>GD,scaleDivergingSymlog:()=>QD,scaleIdentity:()=>FS,scaleImplicit:()=>BO,scaleLinear:()=>YS,scaleLog:()=>KS,scaleOrdinal:()=>QO,scalePoint:()=>$O,scalePow:()=>iE,scaleQuantile:()=>mE,scaleQuantize:()=>gE,scaleRadial:()=>cE,scaleSequential:()=>zD,scaleSequentialLog:()=>_D,scaleSequentialPow:()=>LD,scaleSequentialQuantile:()=>YD,scaleSequentialSqrt:()=>UD,scaleSequentialSymlog:()=>RD,scaleSqrt:()=>aE,scaleSymlog:()=>eE,scaleThreshold:()=>yE,scaleTime:()=>AD,scaleUtc:()=>TD,tickFormat:()=>LS});const i=window.ReactDOM;var a=n(609),s=n.t(a,2),c=n(418);function l(e){e()}var u={notify(){},get:()=>[]};var d=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),f=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),p=(()=>d||f?a.useLayoutEffect:a.useEffect)();function h(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function m(e,t){if(h(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!h(e[n[r]],t[n[r]]))return!1;return!0}Object.defineProperty,Object.getOwnPropertyNames,Object.getOwnPropertySymbols,Object.getOwnPropertyDescriptor,Object.getPrototypeOf,Object.prototype;var g=Symbol.for("react-redux-context"),y="undefined"!=typeof globalThis?globalThis:{};function v(){if(!a.createContext)return{};const e=y[g]??=new Map;let t=e.get(a.createContext);return t||(t=a.createContext(null),e.set(a.createContext,t)),t}var b=v(),x=function(e){const{children:t,context:n,serverState:r,store:o}=e,i=a.useMemo(()=>{const e=function(e,t){let n,r=u,o=0,i=!1;function a(){d.onStateChange&&d.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){l(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function c(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=u)}const d={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),c())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,c())},getListeners:()=>r};return d}(o);return{store:o,subscription:e,getServerState:r?()=>r:void 0}},[o,r]),s=a.useMemo(()=>o.getState(),[o]);p(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==o.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,s]);const c=n||b;return a.createElement(c.Provider,{value:i},t)};function w(e=b){return function(){return a.useContext(e)}}var M=w();function j(e=b){const t=e===b?M:w(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var O=j();function N(e=b){const t=e===b?O:j(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var S=N(),E=(e,t)=>e===t;function k(e=b){const t=e===b?M:w(e),n=(e,n={})=>{const{equalityFn:r=E}="function"==typeof n?{equalityFn:n}:n,o=t(),{store:i,subscription:s,getServerState:l}=o,u=(a.useRef(!0),a.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,c.useSyncExternalStoreWithSelector)(s.addNestedSub,i.getState,l||i.getState,u,r);return a.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var D=k(),I=l,A=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,T=/^[\\/]{2}/;var C="popstate";function P(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function z(e={}){return function(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",c=null,l=u();function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-l;l=e,c&&c({action:s,location:p.location,delta:t})}function f(e){return function(e,t,n=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),_(r,"No window.location.(origin|href) available to create URL");let o="string"==typeof t?t:Y(t);return o=o.replace(/ $/,"%20"),!n&&T.test(o)&&(o=r+o),new URL(o,r)}(o,e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let p={get action(){return s},get location(){return e(o,a)},listen(e){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(C,d),c=e,()=>{o.removeEventListener(C,d),c=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=P(e)?e:U(p.location,e,t);n&&n(r,e),l=u()+1;let d=L(r,l),f=p.createHref(r.mask||r);try{a.pushState(d,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(f)}i&&c&&c({action:s,location:p.location,delta:1})},replace:function(e,t){s="REPLACE";let r=P(e)?e:U(p.location,e,t);n&&n(r,e),l=u();let o=L(r,l),d=p.createHref(r.mask||r);a.replaceState(o,"",d),i&&c&&c({action:s,location:p.location,delta:0})},go:e=>a.go(e)};return p}(function(e,t){let{pathname:n="/",search:r="",hash:o=""}=F(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),U("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:Y(t))},function(e,t){R("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function _(e,t){if(!1===e||null==e)throw new Error(t)}function R(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function L(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function U(e,t,n=null,r,o){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?F(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:o}}function Y({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function F(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function W(e,t,n="/"){return B(e,t,n,!1)}function B(e,t,n,r,o){let i=oe(("string"==typeof t?F(t):t).pathname||"/",n);if(null==i)return null;let a=o??function(e){let t=Q(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,c=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return R(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(i);for(let e=0;null==s&&e<a.length;++e)s=ee(a[e],c,r);return s}function Q(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,s)=>{let c={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;_(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ue([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(_(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Q(e.children,t,u,l,a)),(null!=e.path||e.index)&&t.push({path:l,score:J(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=re(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of q(e.path))i(e,t,!0,n);else i(e,t)}),t}function q(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=q(r.join("/")),s=[];return s.push(...a.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}new WeakMap;var G=/^:[\w-]+$/,$=3,H=2,V=1,K=10,Z=-2,X=e=>"*"===e;function J(e,t){let n=e.split("/"),r=n.length;return n.some(X)&&(r+=Z),t&&(r+=H),n.filter(e=>!X(e)).reduce((e,t)=>e+(G.test(t)?$:""===t?V:K),r)}function ee(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l="/"===i?t:t.slice(i.length)||"/",u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ne(u,l,s.matcher,s.compiledParams):te(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=te({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(o,d.params),a.push({params:o,pathname:ue([i,d.pathname]),pathnameBase:fe(ue([i,d.pathnameBase])),route:f}),"/"!==d.pathnameBase&&(i=ue([i,d.pathnameBase]))}return a}function te(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=re(e.path,e.caseSensitive,e.end);return ne(e,t,n,r)}function ne(e,t,n,r){let o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),c=r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{});return{params:c,pathname:i,pathnameBase:a,pattern:e}}function re(e,t=!1,n=!0){R("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,o,i)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=i.charAt(o+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function oe(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function ie(e,t){let n=de(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function ae(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function se(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function ce(e,t,n,r=!1){let o;"string"==typeof e?o=F(e):(o={...e},_(!o.pathname||!o.pathname.includes("?"),ae("?","pathname","search",o)),_(!o.pathname||!o.pathname.includes("#"),ae("#","pathname","hash",o)),_(!o.search||!o.search.includes("#"),ae("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?F(e):e;return r?(r=le(r),n=r.startsWith("/")?ie(r.substring(1),"/"):ie(r,t)):n=t,{pathname:n,search:pe(o),hash:he(i)}}(o,i),l=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!l&&!u||(c.pathname+="/"),c}var le=e=>e.replace(/[\\/]{2,}/g,"/"),ue=e=>le(e.join("/")),de=e=>e.replace(/\/+$/,""),fe=e=>de(e).replace(/^\/*/,"/"),pe=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",he=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",me=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ge(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ye(e){let t=e.map(e=>e.route.path).filter(Boolean);return ue(t)||"/"}var ve="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function be(e,t){let n=e;if("string"!=typeof n||!A.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(ve)try{let e=new URL(window.location.href),r=T.test(n)?new URL((i=n,e.protocol+i.replace(/\\/g,"/"))):new URL(n),a=oe(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:o=!0}catch(e){R(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var i;return{absoluteURL:r,isExternal:o,to:n}}Symbol("Uninstrumented"),Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xe=["POST","PUT","PATCH","DELETE"],we=(new Set(xe),["GET",...xe]);new Set(we),Symbol("ResetLoaderData"),new WeakMap,new WeakMap,new WeakMap,new WeakMap;var Me=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];var je=a.createContext(null);je.displayName="DataRouter";var Oe=a.createContext(null);Oe.displayName="DataRouterState";var Ne=a.createContext(!1);function Se(){return a.useContext(Ne)}var Ee=a.createContext({isTransitioning:!1});Ee.displayName="ViewTransition",a.createContext(new Map).displayName="Fetchers",a.createContext(null).displayName="Await";var ke=a.createContext(null);ke.displayName="Navigation";var De=a.createContext(null);De.displayName="Location";var Ie=a.createContext({outlet:null,matches:[],isDataRoute:!1});Ie.displayName="Route";var Ae=a.createContext(null);Ae.displayName="RouteError";var Te="REACT_ROUTER_ERROR";function Ce(){return null!=a.useContext(De)}function Pe(){return _(Ce(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(De).location}var ze="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _e(e){a.useContext(ke).static||a.useLayoutEffect(e)}function Re(){let{isDataRoute:e}=a.useContext(Ie);return e?function(){let{router:e}=function(e){let t=a.useContext(je);return _(t,He(e)),t}("useNavigate"),t=Ve("useNavigate"),n=a.useRef(!1);return _e(()=>{n.current=!0}),a.useCallback(async(r,o={})=>{R(n.current,ze),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))},[e,t])}():function(){_(Ce(),"useNavigate() may be used only in the context of a <Router> component.");let e=a.useContext(je),{basename:t,navigator:n}=a.useContext(ke),{matches:r}=a.useContext(Ie),{pathname:o}=Pe(),i=JSON.stringify(se(r)),s=a.useRef(!1);return _e(()=>{s.current=!0}),a.useCallback((r,a={})=>{if(R(s.current,ze),!s.current)return;if("number"==typeof r)return void n.go(r);let c=ce(r,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:ue([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)},[t,n,i,o,e])}()}var Le=a.createContext(null);function Ue(){let{matches:e}=a.useContext(Ie),t=e[e.length-1];return t?.params??{}}function Ye(e,{relative:t}={}){let{matches:n}=a.useContext(Ie),{pathname:r}=Pe(),o=JSON.stringify(se(n));return a.useMemo(()=>ce(e,JSON.parse(o),r,"path"===t),[e,o,r,t])}function Fe(e,t,n){_(Ce(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=a.useContext(ke),{matches:o}=a.useContext(Ie),i=o[o.length-1],s=i?i.params:{},c=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let e=u&&u.path||"";Ze(c,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,f=Pe();if(t){let e="string"==typeof t?F(t):t;_("/"===l||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=f;let p=d.pathname||"/",h=p;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):W(e,{pathname:h});R(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),R(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,i=r?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);_(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:i}=r,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!i||void 0===i[t.route.id]);if(t.route.lazy||a){n.isStatic&&(s=!0),o=c>=0?o.slice(0,c+1):[o[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ye(r.matches),errorInfo:t})}:void 0;return o.reduceRight((e,n,l)=>{let d,f=!1,p=null,h=null;r&&(d=i&&n.route.id?i[n.route.id]:void 0,p=n.route.errorElement||Be,s&&(c<0&&0===l?(Ze("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,h=null):c===l&&(f=!0,h=n.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,l+1)),g=()=>{let t;return t=d?p:f?h:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement($e,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===l)?a.createElement(Qe,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:ue([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:ue([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,n);return t&&g?a.createElement(De.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}function We(){let e=function(){let e=a.useContext(Ae),t=function(e){let t=a.useContext(Oe);return _(t,He(e)),t}("useRouteError"),n=Ve("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=ge(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=a.createElement(a.Fragment,null,a.createElement("p",null,"💿 Hey developer 👋"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:i},"ErrorBoundary")," or"," ",a.createElement("code",{style:i},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),n?a.createElement("pre",{style:o},n):null,s)}var Be=a.createElement(We,null),Qe=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Te}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new me(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?a.createElement(Ie.Provider,{value:this.props.routeContext},a.createElement(Ae.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?a.createElement(Ge,{error:e},t):t}};Qe.contextType=Ne;var qe=new WeakMap;function Ge({children:e,error:t}){let{basename:n}=a.useContext(ke);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Te}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=qe.get(t);if(r)throw r;let o=be(e.location,n),i=o.absoluteURL||o.to;if(function(e){try{return Me.includes(new URL(e).protocol)}catch{return!1}}(i))throw new Error("Invalid redirect location");if(ve&&!qe.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw qe.set(t,n),n}window.location.href=i}return a.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function $e({routeContext:e,match:t,children:n}){let r=a.useContext(je);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(Ie.Provider,{value:e},n)}function He(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ve(e){let t=function(e){let t=a.useContext(Ie);return _(t,He(e)),t}(e),n=t.matches[t.matches.length-1];return _(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var Ke={};function Ze(e,t,n){t||Ke[e]||(Ke[e]=!0,R(!1,n))}function Xe(e){return function(e){let t=a.useContext(Ie).outlet;return a.useMemo(()=>t&&a.createElement(Le.Provider,{value:e},t),[t,e])}(e.context)}function Je(e){_(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function et({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,useTransitions:s}){_(!Ce(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),l=a.useMemo(()=>({basename:c,navigator:o,static:i,useTransitions:s,future:{}}),[c,o,i,s]);"string"==typeof n&&(n=F(n));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:h="default",mask:m}=n,g=a.useMemo(()=>{let e=oe(u,c);return null==e?null:{location:{pathname:e,search:d,hash:f,state:p,key:h,mask:m},navigationType:r}},[c,u,d,f,p,h,r,m]);return R(null!=g,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:a.createElement(ke.Provider,{value:l},a.createElement(De.Provider,{children:t,value:g}))}function tt({children:e,location:t}){return Fe(nt(e),t)}function nt(e,t=[]){let n=[];return a.Children.forEach(e,(e,r)=>{if(!a.isValidElement(e))return;let o=[...t,r];if(e.type===a.Fragment)return void n.push.apply(n,nt(e.props.children,o));_(e.type===Je,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_(!e.props.index||!e.props.children,"An index route cannot have child routes.");let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=nt(e.props.children,o)),n.push(i)}),n}s.useOptimistic,a.memo(function({routes:e,manifest:t,future:n,state:r,isStatic:o,onError:i}){return Fe(e,void 0,{manifest:t,state:r,isStatic:o,onError:i,future:n})}),a.Component;var rt="get",ot="application/x-www-form-urlencoded";function it(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var at=null,st=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ct(e){return null==e||st.has(e)?e:(R(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ot}"`),null)}function lt(e,t){if(!1===e||null==e)throw new Error(t)}function ut(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===oe(o.pathname,t)?o.pathname=`${de(t)}/_root.${r}`:o.pathname=`${de(o.pathname)}.${r}`,o}function dt(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function ft(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===i?t.filter((t,i)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function pt(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o}).flat(1),[...new Set(r)];var r}function ht(){let e=a.useContext(je);return lt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function mt(){let e=a.useContext(Oe);return lt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Symbol("SingleFetchRedirect");var gt=a.createContext(void 0);function yt(){let e=a.useContext(gt);return lt(e,"You must render this element inside a <HydratedRouter> element"),e}function vt(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function bt({page:e,...t}){let n=Se(),{nonce:r}=yt(),{router:o}=ht(),i=a.useMemo(()=>W(o.routes,e,o.basename),[o.routes,e,o.basename]);return i?(null==t.nonce&&r&&(t={...t,nonce:r}),n?a.createElement(wt,{page:e,matches:i,...t}):a.createElement(Mt,{page:e,matches:i,...t})):null}function xt(e){let{manifest:t,routeModules:n}=yt(),[r,o]=a.useState([]);return a.useEffect(()=>{let r=!1;return async function(e,t,n){let r=await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}));return function(e,t){let n=new Set,r=new Set(t);return e.reduce((e,o)=>{if(t&&!function(e){return null!=e&&"string"==typeof e.page}(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e},[])}(r.flat(1).filter(dt).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,n).then(e=>{r||o(e)}),()=>{r=!0}},[e,t,n]),r}function wt({page:e,matches:t,...n}){let r=Pe(),{future:o}=yt(),{basename:i}=ht(),s=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ut(e,i,o.v8_trailingSlashAwareDataRequests,"rsc"),a=!1,s=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?a=!0:s.push(e.route.id);return a&&s.length>0&&n.searchParams.set("_routes",s.join(",")),[n.pathname+n.search]},[i,o.v8_trailingSlashAwareDataRequests,e,r,t]);return a.createElement(a.Fragment,null,s.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})))}function Mt({page:e,matches:t,...n}){let r=Pe(),{future:o,manifest:i,routeModules:s}=yt(),{basename:c}=ht(),{loaderData:l,matches:u}=mt(),d=a.useMemo(()=>ft(e,t,u,i,r,"data"),[e,t,u,i,r]),f=a.useMemo(()=>ft(e,t,u,i,r,"assets"),[e,t,u,i,r]),p=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,a=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:n.add(e.route.id))}),0===n.size)return[];let u=ut(e,c,o.v8_trailingSlashAwareDataRequests,"data");return a&&n.size>0&&u.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[c,o.v8_trailingSlashAwareDataRequests,l,r,i,d,t,e,s]),h=a.useMemo(()=>pt(f,i),[f,i]),m=xt(f);return a.createElement(a.Fragment,null,p.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),h.map(e=>a.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),m.map(({key:e,link:t})=>a.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}gt.displayName="FrameworkContext";function jt(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}a.Component;var Ot="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ot&&(window.__reactRouterVersion="7.18.1")}catch(e){}function Nt({basename:e,children:t,useTransitions:n,window:r}){let o=a.useRef();null==o.current&&(o.current=z({window:r,v5Compat:!0}));let i=o.current,[s,c]=a.useState({action:i.action,location:i.location}),l=a.useCallback(e=>{!1===n?c(e):a.startTransition(()=>c(e))},[n]);return a.useLayoutEffect(()=>i.listen(l),[i,l]),a.createElement(et,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}var St=a.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:i,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},m){let{basename:g,navigator:y,useTransitions:v}=a.useContext(ke),b="string"==typeof u&&A.test(u),x=be(u,g),w=function(e,{relative:t}={}){_(Ce(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=a.useContext(ke),{hash:o,pathname:i,search:s}=Ye(e,{relative:t}),c=i;return"/"!==n&&(c="/"===i?n:ue([n,i])),r.createHref({pathname:c,search:s,hash:o})}(u=x.to,{relative:r}),M=Pe(),j=null;if(s){let e=ce(s,[],M.mask?M.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:ue([g,e.pathname])),j=y.createHref(e)}let[O,N,S]=function(e,t){let n=a.useContext(gt),[r,o]=a.useState(!1),[i,s]=a.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=a.useRef(null);a.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let h=()=>{o(!0)},m=()=>{o(!1),s(!1)};return n?"intent"!==e?[i,p,{}]:[i,p,{onFocus:vt(c,h),onBlur:vt(l,m),onMouseEnter:vt(u,h),onMouseLeave:vt(d,m),onTouchStart:vt(f,h)}]:[!1,p,{}]}(n,h),E=function(e,{target:t,replace:n,mask:r,state:o,preventScrollReset:i,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Re(),f=Pe(),p=Ye(e,{relative:s});return a.useCallback(h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,t)){h.preventDefault();let t=void 0!==n?n:Y(f)===Y(p),m=()=>d(e,{replace:t,mask:r,state:o,preventScrollReset:i,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?a.startTransition(()=>m()):m()}},[f,d,p,n,r,o,t,e,i,s,c,l,u])}(u,{replace:i,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v}),k=!(x.isExternal||o),D=a.createElement("a",{...h,...S,href:(k?j:void 0)||x.absoluteURL||w,onClick:k?function(t){e&&e(t),t.defaultPrevented||E(t)}:e,ref:jt(m,N),target:l,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?a.createElement(a.Fragment,null,D,a.createElement(bt,{page:w})):D});St.displayName="Link";var Et=a.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:i,viewTransition:s,children:c,...l},u){let d=Ye(i,{relative:l.relative}),f=Pe(),p=a.useContext(Oe),{navigator:h,basename:m}=a.useContext(ke),g=null!=p&&function(e,{relative:t}={}){let n=a.useContext(Ee);_(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Dt("useViewTransitionState"),o=Ye(e,{relative:t});if(!n.isTransitioning)return!1;let i=oe(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=oe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=te(o.pathname,s)||null!=te(o.pathname,i)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,v=f.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=oe(b,m)||b);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,M=v===y||!r&&v.startsWith(y)&&"/"===v.charAt(x),j=null!=b&&(b===y||!r&&b.startsWith(y)&&"/"===b.charAt(y.length)),O={isActive:M,isPending:j,isTransitioning:g},N=M?e:void 0;w="function"==typeof n?n(O):[n,M?"active":null,j?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let S="function"==typeof o?o(O):o;return a.createElement(St,{...l,"aria-current":N,className:w,ref:u,style:S,to:i,viewTransition:s},"function"==typeof c?c(O):c)});Et.displayName="NavLink";var kt=a.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:s=rt,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},m)=>{let{useTransitions:g}=a.useContext(ke),y=function(){let{router:e}=Dt("useSubmit"),{basename:t}=a.useContext(ke),n=Ve("useRouteId"),r=e.fetch,o=e.navigate;return a.useCallback(async(e,i={})=>{let{action:a,method:s,encType:c,formData:l,body:u}=function(e,t){let n,r,o,i,a;if(function(e){return it(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?oe(a,t):null,n=e.getAttribute("method")||rt,o=ct(e.getAttribute("enctype"))||ot,i=new FormData(e)}else if(function(e){return it(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return it(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?oe(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||rt,o=ct(e.getAttribute("formenctype"))||ct(a.getAttribute("enctype"))||ot,i=new FormData(a,e),!function(){if(null===at)try{new FormData(document.createElement("form"),0),at=!1}catch(e){at=!0}return at}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(it(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=rt,r=null,o=ot,a=e}return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}(e,t);if(!1===i.navigate){let e=i.fetcherKey||At();await r(e,n,i.action||a,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||c,flushSync:i.flushSync})}else await o(i.action||a,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,o,t,n])}(),v=function(e,{relative:t}={}){let{basename:n}=a.useContext(ke),r=a.useContext(Ie);_(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...Ye(e||".",{relative:t})},s=Pe();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();i.search=n?`?${n}`:""}}return e&&"."!==e||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:ue([n,i.pathname])),Y(i)}(c,{relative:u}),b="get"===s.toLowerCase()?"get":"post",x="string"==typeof c&&A.test(c);return a.createElement("form",{ref:m,method:b,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute("formmethod")||s,h=()=>y(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:o,state:i,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&!1!==n?a.startTransition(()=>h()):h()},...h,"data-discover":x||"render"!==e?void 0:"true"})});function Dt(e){let t=a.useContext(je);return _(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}kt.displayName="Form";var It=0,At=()=>`__${String(++It)}__`;const Tt=()=>{const{pathname:e}=Pe();return(0,a.useEffect)(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[e]),null};function Ct(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Pt=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),zt=()=>Math.random().toString(36).substring(7).split("").join("."),_t={INIT:`@@redux/INIT${zt()}`,REPLACE:`@@redux/REPLACE${zt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zt()}`};function Rt(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Lt(e,t,n){if("function"!=typeof e)throw new Error(Ct(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ct(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ct(1));return n(Lt)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,c=!1;function l(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(c)throw new Error(Ct(3));return o}function d(e){if("function"!=typeof e)throw new Error(Ct(4));if(c)throw new Error(Ct(5));let t=!0;l();const n=s++;return a.set(n,e),function(){if(t){if(c)throw new Error(Ct(6));t=!1,l(),a.delete(n),i=null}}}function f(e){if(!Rt(e))throw new Error(Ct(7));if(void 0===e.type)throw new Error(Ct(8));if("string"!=typeof e.type)throw new Error(Ct(17));if(c)throw new Error(Ct(9));try{c=!0,o=r(o,e)}finally{c=!1}return(i=a).forEach(e=>{e()}),e}return f({type:_t.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Ct(10));r=e,f({type:_t.REPLACE})},[Pt]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Ct(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[Pt](){return this}}}}}function Ut(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:_t.INIT}))throw new Error(Ct(12));if(void 0===n(void 0,{type:_t.PROBE_UNKNOWN_ACTION()}))throw new Error(Ct(13))})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],c=n[s],l=e[s],u=c(l,t);if(void 0===u)throw t&&t.type,new Error(Ct(14));a[s]=u,i=i||u!==l}return i=i||r.length!==Object.keys(e).length,i?a:e}}function Yt(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Ft(e){return Rt(e)&&"type"in e&&"string"==typeof e.type}const Wt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(...e){if(0!==e.length)return"object"==typeof e[0]?Yt:Yt(...e)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Bt=Symbol.for("immer-nothing"),Qt=Symbol.for("immer-draftable"),qt=Symbol.for("immer-state");function Gt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var $t=Object,Ht=$t.getPrototypeOf,Vt="constructor",Kt="prototype",Zt="configurable",Xt="enumerable",Jt="writable",en="value",tn=e=>!!e&&!!e[qt];function nn(e){return!!e&&(an(e)||fn(e)||!!e[Qt]||!!e[Vt]?.[Qt]||pn(e)||hn(e))}var rn=$t[Kt][Vt].toString(),on=new WeakMap;function an(e){if(!e||!mn(e))return!1;const t=Ht(e);if(null===t||t===$t[Kt])return!0;const n=$t.hasOwnProperty.call(t,Vt)&&t[Vt];if(n===Object)return!0;if(!gn(n))return!1;let r=on.get(n);return void 0===r&&(r=Function.toString.call(n),on.set(n,r)),r===rn}function sn(e,t,n=!0){0===cn(e)?(n?Reflect.ownKeys(e):$t.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function cn(e){const t=e[qt];return t?t.type_:fn(e)?1:pn(e)?2:hn(e)?3:0}var ln=(e,t,n=cn(e))=>2===n?e.has(t):$t[Kt].hasOwnProperty.call(e,t),un=(e,t,n=cn(e))=>2===n?e.get(t):e[t],dn=(e,t,n,r=cn(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},fn=Array.isArray,pn=e=>e instanceof Map,hn=e=>e instanceof Set,mn=e=>"object"==typeof e,gn=e=>"function"==typeof e,yn=e=>"boolean"==typeof e,vn=e=>e.copy_||e.base_,bn=e=>e.modified_?e.copy_:e.base_;function xn(e,t){if(pn(e))return new Map(e);if(hn(e))return new Set(e);if(fn(e))return Array[Kt].slice.call(e);const n=an(e);if(!0===t||"class_only"===t&&!n){const t=$t.getOwnPropertyDescriptors(e);delete t[qt];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i[Jt]&&(i[Jt]=!0,i[Zt]=!0),(i.get||i.set)&&(t[o]={[Zt]:!0,[Jt]:!0,[Xt]:i[Xt],[en]:e[o]})}return $t.create(Ht(e),t)}{const t=Ht(e);if(null!==t&&n)return{...e};const r=$t.create(t);return $t.assign(r,e)}}function wn(e,t=!1){return jn(e)||tn(e)||!nn(e)||(cn(e)>1&&$t.defineProperties(e,{set:Mn,add:Mn,clear:Mn,delete:Mn}),$t.freeze(e),t&&sn(e,(e,t)=>{wn(t,!0)},!1)),e}var Mn={[en]:function(){Gt(2)}};function jn(e){return null===e||!mn(e)||$t.isFrozen(e)}var On="MapSet",Nn="Patches",Sn="ArrayMethods",En={};function kn(e){const t=En[e];return t||Gt(0),t}var Dn,In=e=>!!En[e];var An=()=>Dn;function Tn(e,t){t&&(e.patchPlugin_=kn(Nn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Cn(e){Pn(e),e.drafts_.forEach(Rn),e.drafts_=null}function Pn(e){e===Dn&&(Dn=e.parent_)}var zn=e=>Dn={drafts_:[],parent_:Dn,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:In(On)?kn(On):void 0,arrayMethodsPlugin_:In(Sn)?kn(Sn):void 0};function Rn(e){const t=e[qt];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Ln(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[qt].modified_&&(Cn(t),Gt(4)),nn(e)&&(e=Un(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[qt].base_,e,t)}else e=Un(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&wn(t,n)}(t,e,!0),Cn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Bt?e:void 0}function Un(e,t){if(jn(t))return t;const n=t[qt];if(!n)return qn(t,e.handledSet_,e);if(!Fn(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Qn(n,e)}return n.copy_}function Yn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Fn=(e,t)=>e.scope_===t,Wn=[];function Bn(e,t,n,r){const o=vn(e),i=e.type_;if(void 0!==r&&un(o,r,i)===t)return void dn(o,r,n,i);if(!e.draftLocations_){const t=e.draftLocations_=new Map;sn(o,(e,n)=>{if(tn(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??Wn;for(const e of a)dn(o,e,n,i)}function Qn(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Yn(e)}}function qn(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||tn(e)||t.has(e)||!nn(e)||jn(e)||(t.add(e),sn(e,(r,o)=>{if(tn(o)){const t=o[qt];if(Fn(t,n)){const n=bn(t);dn(e,r,n,e.type_),Yn(t)}}else nn(o)&&qn(o,t,n)})),e}var Gn={get(e,t){if(t===qt)return e;if("constructor"===t||"__proto__"===t){const n=vn(e)[t];return new Proxy(n||{},{get:(e,t)=>"__proto__"===t||"prototype"===t?Object.freeze(Object.create(null)):Reflect.get(e,t),set:()=>!0,apply:(e,t,n)=>Reflect.apply(e,t,n)})}let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const o=vn(e);if(!ln(o,t,e.type_))return function(e,t,n){const r=Vn(t,n);return r?en in r?r[en]:r.get?.call(e.draft_):void 0}(e,o,t);const i=o[t];if(e.finalized_||!nn(i))return i;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return i;if(i===Hn(e.base_,t)){Zn(e);const n=1===e.type_?+t:t,r=Xn(e.scope_,i,e,n);return e.copy_[n]=r}return i},has:(e,t)=>"constructor"!==t&&"__proto__"!==t&&"prototype"!==t&&t in vn(e),ownKeys:e=>Reflect.ownKeys(vn(e)),set(e,t,n){if("constructor"===t||"__proto__"===t||"prototype"===t)return!0;const r=Vn(vn(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Hn(vn(e),t),a=r?.[qt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((o=n)===(i=r)?0!==o||1/o==1/i:o!=o&&i!=i)&&(void 0!==n||ln(e.base_,t,e.type_)))return!0;Zn(e),Kn(e)}var o,i;return e.copy_[t]===n&&(void 0!==n||ln(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(tn(n)){const o=n[qt];Fn(o,r)&&o.callbacks_.push(function(){Zn(e);const r=bn(o);Bn(e,n,r,t)})}else nn(n)&&e.callbacks_.push(function(){const o=vn(e);3===e.type_?o.has(n)&&qn(n,r.handledSet_,r):un(o,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&qn(un(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Zn(e),void 0!==Hn(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Kn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=vn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Jt]:!0,[Zt]:1!==e.type_||"length"!==t,[Xt]:r[Xt],[en]:n[t]}:r},defineProperty(){Gt(11)},getPrototypeOf:e=>Ht(e.base_),setPrototypeOf(){Gt(12)}},$n={};for(let e in Gn){let t=Gn[e];$n[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function Hn(e,t){const n=e[qt];return(n?vn(n):e)[t]}function Vn(e,t){if(!(t in e))return;let n=Ht(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ht(n)}}function Kn(e){e.modified_||(e.modified_=!0,e.parent_&&Kn(e.parent_))}function Zn(e){e.copy_||(e.assigned_=new Map,e.copy_=xn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Xn(e,t,n,r){const[o,i]=pn(t)?kn(On).proxyMap_(t,n):hn(t)?kn(On).proxySet_(t,n):function(e,t){const n=fn(e),r={type_:n?1:0,scope_:t?t.scope_:An(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=r,i=Gn;n&&(o=[r],i=$n);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??An()).drafts_.push(o),i.callbacks_=n?.callbacks_??[],i.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const o=t;if(!o||!Fn(o,r))return;r.mapSetPlugin_?.fixSetContents(o);const i=bn(o);Bn(e,o.draft_??o,i,n),Qn(o,r)})}(n,i,r):i.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:t}=e;i.modified_&&t&&t.generatePatches_(i,[],e)}),o}function Jn(e){return tn(e)||Gt(10),er(e)}function er(e){if(!nn(e)||jn(e))return e;const t=e[qt];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xn(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=xn(e,!0);return sn(n,(e,t)=>{dn(n,e,er(t))},r),t&&(t.finalized_=!1),n}function tr(){const e="replace",t="add",n="remove";function r(e){if(!nn(e))return e;if(fn(e))return e.map(r);if(pn(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,r(t)]));if(hn(e))return new Set(Array.from(e).map(r));const t=Object.create(Ht(e));for(const n in e)t[n]=r(e[n]);return ln(e,Qt)&&(t[Qt]=e[Qt]),t}function o(e){return tn(e)?r(e):e}var i,a;a={applyPatches_:function(o,i){return i.forEach(i=>{const{path:a,op:s}=i;let c=o;for(let e=0;e<a.length-1;e++){const t=cn(c);let n=a[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),0!==t&&1!==t||"__proto__"!==n&&n!==Vt||Gt(19),gn(c)&&n===Kt&&Gt(19),c=un(c,n),mn(c)||Gt(18,a.join("/"))}const l=cn(c),u=r(i.value),d=a[a.length-1];switch(s){case e:switch(l){case 2:return c.set(d,u);case 3:Gt(16);default:return c[d]=u}case t:switch(l){case 1:return"-"===d?c.push(u):c.splice(d,0,u);case 2:return c.set(d,u);case 3:return c.add(u);default:return c[d]=u}case n:switch(l){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(i.value);default:return delete c[d]}default:Gt(17)}}),o},generatePatches_:function(r,i,a){if(r.scope_.processedForPatches_.has(r))return;r.scope_.processedForPatches_.add(r);const{patches_:s,inversePatches_:c}=a;switch(r.type_){case 0:case 2:return function(r,i,a,s){const{base_:c,copy_:l,type_:u}=r;sn(r.assigned_,(r,d)=>{const f=un(c,r,u),p=un(l,r,u),h=d?ln(c,r)?e:t:n;if(f===p&&h===e)return;const m=i.concat(r);a.push(h===n?{op:h,path:m}:{op:h,path:m,value:o(p)}),s.push(h===t?{op:n,path:m}:h===n?{op:t,path:m,value:o(f)}:{op:e,path:m,value:o(f)})})}(r,i,s,c);case 1:return function(r,i,a,s){let{base_:c,assigned_:l}=r,u=r.copy_;u.length<c.length&&([c,u]=[u,c],[a,s]=[s,a]);const d=!0===r.allIndicesReassigned_;for(let t=0;t<c.length;t++){const n=u[t],r=c[t];if((d||l?.get(t.toString()))&&n!==r){const c=n?.[qt];if(c&&c.modified_)continue;const l=i.concat([t]);a.push({op:e,path:l,value:o(n)}),s.push({op:e,path:l,value:o(r)})}}for(let e=c.length;e<u.length;e++){const n=i.concat([e]);a.push({op:t,path:n,value:o(u[e])})}for(let e=u.length-1;c.length<=e;--e){const t=i.concat([e]);s.push({op:n,path:t})}}(r,i,s,c);case 3:return function(e,r,o,i){let{base_:a,copy_:s}=e,c=0;a.forEach(e=>{if(!s.has(e)){const a=r.concat([c]);o.push({op:n,path:a,value:e}),i.unshift({op:t,path:a,value:e})}c++}),c=0,s.forEach(e=>{if(!a.has(e)){const a=r.concat([c]);o.push({op:t,path:a,value:e}),i.unshift({op:n,path:a,value:e})}c++})}(r,i,s,c)}},generateReplacementPatches_:function(t,n,r){const{patches_:o,inversePatches_:i}=r;o.push({op:e,path:[],value:n===Bt?void 0:n}),i.push({op:e,path:[],value:t})},getPath:function e(t,n=[]){if(void 0!==t.key_){const e=t.parent_.copy_??t.parent_.base_,r=(e=>mn(e)?e?.[qt]:null)(un(e,t.key_)),o=un(e,t.key_);if(void 0===o)return null;if(o!==t.draft_&&o!==t.base_&&o!==t.copy_)return null;if(null!=r&&r.base_!==t.base_)return null;const i=3===t.parent_.type_;let a;if(i){const e=t.parent_;a=Array.from(e.drafts_.keys()).indexOf(t.key_)}else a=t.key_;if(!(i&&e.size>a||ln(e,a)))return null;n.push(a)}if(t.parent_)return e(t.parent_,n);n.reverse();try{!function(e,t){let n=e;for(let e=0;e<t.length-1;e++){const r=t[e];if(n=un(n,r),!mn(n)||null===n)throw new Error(`Cannot resolve path at '${t.join("/")}'`)}}(t.copy_,n)}catch(e){return null}return n}},En[i=Nn]||(En[i]=a)}$n.deleteProperty=function(e,t){return $n.set.call(this,e,t,void 0)},$n.set=function(e,t,n){return Gn.set.call(this,e[0],t,n,e[0])};var nr=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(gn(e)&&!gn(t)){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if(gn(t)||Gt(6),void 0===n||gn(n)||Gt(7),nn(e)){const o=zn(this),i=Xn(0,e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?Cn(o):Pn(o)}return Tn(o,n),Ln(r,o)}if(!e||!mn(e)){if(r=t(e),void 0===r&&(r=e),r===Bt&&(r=void 0),this.autoFreeze_&&wn(r,!0),n){const t=[],o=[];kn(Nn).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:o}),n(t,o)}return r}Gt(1)},this.produceWithPatches=(e,t)=>{if(gn(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},yn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),yn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),yn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){nn(e)||Gt(8),tn(e)&&(e=Jn(e));const t=zn(this),n=Xn(0,e,void 0);return n[qt].isManual_=!0,Pn(t),n}finishDraft(e,t){const n=e&&e[qt];n&&n.isManual_||Gt(9);const{scope_:r}=n;return Tn(r,t),Ln(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=kn(Nn).applyPatches_;return tn(e)?r(e,t):this.produce(e,e=>r(e,t))}},rr=nr.produce,or=nr.produceWithPatches.bind(nr),ir=nr.applyPatches.bind(nr);function ar(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var sr=ar(),cr=ar,lr="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Yt:Yt.apply(null,arguments)},ur=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function dr(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Mo(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Ft(t)&&t.type===e,n}var fr=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function pr(e){return nn(e)?rr(e,()=>{}):e}function hr(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var mr="RTK_autoBatch",gr=()=>e=>({payload:e,meta:{[mr]:!0}}),yr=e=>t=>{setTimeout(t,e)},vr=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?(l=window.requestAnimationFrame,e=>{let t=!1;const n=()=>{t||(t=!0,cancelAnimationFrame(r),clearTimeout(o),e())},r=l(n),o=setTimeout(n,100)}):yr(10):"callback"===e.type?e.queueNotification:yr(e.timeout);var l;const u=()=>{a=!1,i&&(i=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.[mr],i=!o,i&&(a||(a=!0,c(u))),r.dispatch(e)}finally{o=!0}}})};function br(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new fr;return t&&("boolean"==typeof t?i.push(sr):i.push(cr(t.extraArgument))),i},{reducer:n,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a,enhancers:s}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!Rt(n))throw new Error(Mo(1));c=Ut(n)}l="function"==typeof r?r(t):t();let u=Yt;o&&(u=lr({trace:!1,..."object"==typeof o&&o}));const d=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(Ct(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=Yt(...s)(o.dispatch),{...o,dispatch:i}}}(...l),f=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new fr(e);return n&&r.push(vr("object"==typeof n?n:void 0)),r})(d);return Lt(c,a,u(..."function"==typeof s?s(f):f()))}function xr(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Mo(28));if(r in t)throw new Error(Mo(29));return t[r]=n,o},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),o),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}var wr=(e,t)=>ur(e)?e.match(t):e(t);function Mr(...e){return t=>e.some(e=>wr(e,t))}function jr(...e){return t=>e.every(e=>wr(e,t))}function Or(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Nr(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Sr(...e){return 0===e.length?e=>Or(e,["pending"]):Nr(e)?Mr(...e.map(e=>e.pending)):Sr()(e[0])}function Er(...e){return 0===e.length?e=>Or(e,["rejected"]):Nr(e)?Mr(...e.map(e=>e.rejected)):Er()(e[0])}function kr(...e){return 0===e.length||Nr(e)?jr(Er(...e),e=>e&&e.meta&&e.meta.rejectedWithValue):kr()(e[0])}function Dr(...e){return 0===e.length?e=>Or(e,["fulfilled"]):Nr(e)?Mr(...e.map(e=>e.fulfilled)):Dr()(e[0])}function Ir(...e){return 0===e.length?e=>Or(e,["pending","fulfilled","rejected"]):Nr(e)?Mr(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):Ir()(e[0])}var Ar=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Tr=["name","message","stack","code"],Cr=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Pr=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},zr=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Tr)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},_r="External signal was aborted",Rr=(()=>{function e(e,t,n){const r=dr(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),o=dr(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),i=dr(e+"/rejected",(e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||zr)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(s,c,l)=>{const u=n?.idGenerator?n.idGenerator(e):Ar(),d=new AbortController;let f,p;function h(e){p=e,d.abort()}a&&(a.aborted?h(_r):a.addEventListener("abort",()=>h(_r),{once:!0}));const m=async function(){let a;try{let i=n?.condition?.(e,{getState:c,extra:l});if(function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}(i)&&(i=await i),!1===i||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const m=new Promise((e,t)=>{f=()=>{t({name:"AbortError",message:p||"Aborted"})},d.signal.addEventListener("abort",f,{once:!0})});s(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:c,extra:l}))),a=await Promise.race([m,Promise.resolve(t(e,{dispatch:s,getState:c,extra:l,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new Cr(e,t),fulfillWithValue:(e,t)=>new Pr(e,t)})).then(t=>{if(t instanceof Cr)throw t;return t instanceof Pr?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){a=t instanceof Cr?i(null,u,e,t.payload,t.meta):i(t,u,e)}finally{f&&d.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&i.match(a)&&a.meta.condition||s(a),a}();return Object.assign(m,{abort:h,requestId:u,arg:e,unwrap:()=>m.then(Lr)})}},{pending:o,rejected:i,fulfilled:r,settled:Mr(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Lr(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Ur=Symbol.for("rtk-slice-createasyncthunk");function Yr(e,t){return`${e}/${t}`}function Fr({creators:e}={}){const t=e?.asyncThunk?.[Ur];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(Mo(11));const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Mo(12));if(n in a.sliceCaseReducersByType)throw new Error(Mo(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function c(){const[t={},n=[],r]="function"==typeof e.extraReducers?xr(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return function(e){let t,[i,s,c]=xr(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)});if("function"==typeof e)t=()=>pr(e());else{const n=pr(e);t=()=>n}function l(e=t(),n){let r=[i[n.type],...s.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[c]),r.reduce((e,t)=>{if(t){if(tn(e)){const r=t(e,n);return void 0===r?e:r}if(nn(e))return rr(e,e=>t(e,n));{const r=t(e,n);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return l.getInitialState=t,l}(e.initialState)}i.forEach(r=>{const i=o[r],a={reducerName:r,type:Yr(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(Mo(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?dr(e,a):dr(e))}(a,i,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Mo(18));const{payloadCreator:i,fulfilled:a,pending:s,rejected:c,settled:l,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Qr,pending:s||Qr,rejected:c||Qr,settled:l||Qr})}(a,i,s,t)});const l=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=c()),f(e,t)}function h(){return f||(f=c()),f.getInitialState()}function m(t,n=!1){function r(e){let o=e[t];return void 0===o&&n&&(o=hr(d,r,h)),o}function o(t=l){const r=hr(u,n,()=>new WeakMap);return hr(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=Wr(i,t,()=>hr(d,t,h),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const g={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:p},n),{...g,...m(o,!0)}}};return g}}function Wr(e,t,n,r){function o(o,...i){let a=t(o);return void 0===a&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var Br=Fr();function Qr(){}var qr="listener",Gr="completed",$r="cancelled",Hr=`task-${$r}`,Vr=`task-${Gr}`,Kr=`${qr}-${$r}`,Zr=`${qr}-${Gr}`,Xr=class{constructor(e){this.code=e,this.message=`task ${$r} (reason: ${e})`}code;name="TaskAbortError";message},Jr=(e,t)=>{if("function"!=typeof e)throw new TypeError(Mo(32))},eo=()=>{},to=(e,t=eo)=>(e.catch(t),e),no=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ro=e=>{if(e.aborted)throw new Xr(e.reason)};function oo(e,t){let n=eo;return new Promise((r,o)=>{const i=()=>o(new Xr(e.reason));e.aborted?i():(n=no(e,i),t.finally(()=>n()).then(r,o))}).finally(()=>{n=eo})}var io=e=>t=>to(oo(e,t).then(t=>(ro(e),t))),ao=e=>{const t=io(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:so}=Object,co={},lo="listenerMiddleware",uo=(e,t)=>(n,r)=>{Jr(n);const o=new AbortController;var i;i=o,no(e,()=>i.abort(e.reason));const a=(async()=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{ro(e),ro(o.signal);const t=await n({pause:io(o.signal),delay:ao(o.signal),signal:o.signal});return ro(o.signal),t})()}}catch(e){return{status:e instanceof Xr?"cancelled":"rejected",error:e}}finally{o.abort(Vr)}})();return r?.autoJoin&&t.push(a.catch(eo)),{result:io(e)(a),cancel(){o.abort(Hr)}}},fo=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=dr(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Mo(21));return Jr(i),{predicate:o,type:t,effect:i}},po=so(e=>{const{type:t,predicate:n,effect:r}=fo(e);return{id:Ar(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Mo(22))}}},{withTypes:()=>po}),ho=(e,t)=>{const{type:n,effect:r,predicate:o}=fo(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===o)&&e.effect===r)},mo=e=>{e.pending.forEach(e=>{e.abort(Kr)})},go=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},yo=so(dr(`${lo}/add`),{withTypes:()=>yo}),vo=dr(`${lo}/removeAll`),bo=so(dr(`${lo}/remove`),{withTypes:()=>bo}),xo=(...e)=>{console.error(`${lo}/error`,...e)},wo=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:o=xo}=e;Jr(o);const i=e=>{return(n=ho(t,e)??po(e)).unsubscribe=()=>t.delete(n.id),t.set(n.id,n),e=>{n.unsubscribe(),e?.cancelActive&&mo(n)};var n};so(i,{withTypes:()=>i});const a=e=>{const n=ho(t,e);return n&&(n.unsubscribe(),e.cancelActive&&mo(n)),!!n};so(a,{withTypes:()=>a});const s=async(e,a,s,c)=>{const l=new AbortController,u=((e,t)=>(n,r)=>to((async(n,r)=>{ro(t);let o=()=>{};const i=[new Promise((t,r)=>{let i=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});o=()=>{i(),r()}})];null!=r&&i.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await oo(t,Promise.race(i));return ro(t),e}finally{o()}})(n,r)))(i,l.signal),d=[];try{e.pending.add(l),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(a,so({},s,{getOriginalState:c,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:ao(l.signal),pause:io(l.signal),extra:r,signal:l.signal,fork:uo(l.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==l&&(e.abort(Kr),n.delete(e))})},cancel:()=>{l.abort(Kr),e.pending.delete(l)},throwIfCancelled:()=>{ro(l.signal)}})))}catch(e){e instanceof Xr||go(o,e,{raisedBy:"effect"})}finally{await Promise.all(d),l.abort(Zr),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(l)}},c=((e,t)=>()=>{for(const e of t.keys())mo(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!Ft(r))return n(r);if(yo.match(r))return i(r.payload);if(vo.match(r))return void c();if(bo.match(r))return a(r.payload);let l=e.getState();const u=()=>{if(l===co)throw new Error(Mo(23));return l};let d;try{if(d=n(r),t.size>0){const n=e.getState(),i=Array.from(t.values());for(const t of i){let i=!1;try{i=t.predicate(r,n,l)}catch(e){i=!1,go(o,e,{raisedBy:"predicate"})}i&&s(t,r,e,u)}}}finally{l=co}return d},startListening:i,stopListening:a,clearListeners:c}};function Mo(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var jo=e=>Array.isArray(e)?e:[e];var Oo=class{constructor(e){this.value=e}deref(){return this.value}},No=(()=>"undefined"==typeof WeakRef?Oo:WeakRef)();function So(){return{s:0,v:void 0,o:null,p:null}}function Eo(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,i=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=So(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=So(),e.set(n,t)):t=r}}const s=t;let c;if(1===t.s)c=t.v;else if(c=e.apply(null,arguments),i++,r){const e=function(e){return e instanceof No?e.deref():e}(o);null!=e&&r(e,c)&&(c=e,0!==i&&i--),o="object"==typeof c&&null!==c||"function"==typeof c?new No(c):c}return s.s=1,s.v=c,c}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function ko(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},a=e.pop();"object"==typeof a&&(i=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...i},{memoize:c,memoizeOptions:l=[],argsMemoize:u=Eo,argsMemoizeOptions:d=[]}=s,f=jo(l),p=jo(d),h=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),m=c(function(){return r++,a.apply(null,arguments)},...f),g=u(function(){o++;const e=function(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(h,arguments);return t=m.apply(null,e),t},...p);return Object.assign(g,{resultFunc:a,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:c,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var Do=ko(Eo),Io=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},Ao=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Ao||{}),To="uninitialized",Co="pending",Po="fulfilled",zo="rejected";function _o(e){return{status:e,isUninitialized:e===To,isLoading:e===Co,isSuccess:e===Po,isError:e===zo}}var Ro=Rt;function Lo(e,t){if(e===t||!(Ro(e)&&Ro(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let o=n.length===r.length;const i=Array.isArray(t)?[]:{};for(const r of n)i[r]=Lo(e[r],t[r]),o&&(o=e[r]===i[r]);return o?e:i}function Uo(e,t,n){return e.reduce((e,r,o)=>(t(r,o)&&e.push(n(r,o)),e),[]).flat()}function Yo(e){return null!=e}function Fo(e){return[...e?.values()??[]].filter(Yo)}function Wo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Bo=()=>new Map,Qo=e=>{const t=new AbortController;return setTimeout(()=>{const e="signal timed out",n="TimeoutError";t.abort("undefined"!=typeof DOMException?new DOMException(e,n):Object.assign(new Error(e),{name:n}))},e),t.signal},qo=(...e)=>{for(const t of e)if(t.aborted)return AbortSignal.abort(t.reason);const t=new AbortController;for(const n of e)n.addEventListener("abort",()=>t.abort(n.reason),{signal:t.signal,once:!0});return t.signal},Go=(...e)=>fetch(...e),$o=e=>e.status>=200&&e.status<=299,Ho=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Vo(e){if(!Rt(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}var Ko=class{constructor(e,t=void 0){this.value=e,this.meta=t}value;meta},Zo="__rtkq/",Xo="focused",Jo=dr(`${Zo}${Xo}`),ei=dr(`${Zo}un${Xo}`),ti=dr(`${Zo}online`),ni=dr(`${Zo}offline`),ri="query",oi="mutation",ii="infinitequery";function ai(e){return e.type===ri}function si(e){return e.type===ii}function ci(e){return ai(e)||si(e)}function li(e,t,n,r,o,i){const a="function"==typeof e?e(t,n,r,o):e;return a?Uo(a,Yo,e=>i(ui(e))):[]}function ui(e){return"string"==typeof e?{type:e}:e}var di=(e,t)=>e.endpointDefinitions[t],fi=Symbol("forceQueryFn"),pi=e=>"function"==typeof e[fi],hi=class extends Io{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}value;schemaName;_bqMeta},mi=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function gi(e,t,n,r){const o=await e["~standard"].validate(t);if(o.issues)throw new hi(o.issues,t,n,r);return o.value}function yi(e){return e}var vi=(e={})=>({...e,[mr]:!0});function bi(e,{pages:t,pageParams:n},r){const o=t.length-1;return e.getNextPageParam(t[o],t,n[o],n,r)}function xi(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function wi(e,t,n,r){return li(n[e.meta.arg.endpointName][t],Dr(e)?e.payload:void 0,kr(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function Mi(e){return tn(e)?Jn(e):e}function ji(e,t,n){const r=e[t];r&&n(r)}function Oi(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Ni(e,t,n){const r=e[Oi(t)];r&&n(r)}var Si={};var Ei=Symbol.for("RTKQ/skipToken"),ki={status:To},Di=rr(ki,()=>{}),Ii=rr(ki,()=>{}),Ai=WeakMap?new WeakMap:void 0,Ti=({endpointName:e,queryArgs:t})=>{let n="";const r=Ai?.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,(e,t)=>t=Rt(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t);Rt(t)&&Ai?.set(t,e),n=e}return`${e}(${n})`};function Ci(...e){return function(t){const n=Eo(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=Ti;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:Ti({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},o={endpointDefinitions:{},batch(e){e()},apiUid:Ar(),extractRehydrationInfo:n,hasRehydrationInfo:Eo(e=>null!=n(e))},i={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:ri}),mutation:e=>({...e,type:oi}),infiniteQuery:e=>({...e,type:ii})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in o.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(Mo(39))}else{o.endpointDefinitions[n]=r;for(const e of a)e.injectEndpoint(n,r)}return i},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(di(o,e)):Object.assign(di(o,e)||{},n);return i}},a=e.map(e=>e.init(i,r,o));return i.injectEndpoints({endpoints:t.endpoints})}}function Pi(e,...t){return Object.assign(e,...t)}var zi=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a},getRunningQueryThunk:s,mwApi:c})=>{const{removeQueryResult:l,unsubscribeQueryResult:u,cacheEntriesUpserted:d}=t.internalActions,f=Mr(u.match,n.fulfilled,n.rejected,d.match);function p(e){const t=o.currentSubscriptions.get(e);return!!t&&t.size>0}const h={};function m(e){for(const t of e.values())t?.abort?.()}function g(e,t,n){const r=t.getState();for(const o of e){const e=i(r,o);e?.endpointName&&y(o,e.endpointName,t,n)}}function y(e,t,n,o){const a=di(r,t),c=a?.keepUnusedDataFor??o.keepUnusedDataFor;if(c===1/0)return;const u=Math.max(0,Math.min(c,2147482.647));if(!p(e)){const t=h[e];t&&clearTimeout(t),h[e]=setTimeout(()=>{if(!p(e)){const t=i(n.getState(),e);if(t?.endpointName){const e=n.dispatch(s(t.endpointName,t.originalArgs));e?.abort()}n.dispatch(l({queryCacheKey:e}))}delete h[e]},1e3*u)}}return(e,n)=>{const i=n.getState(),s=a(i);if(f(e)){let t;if(d.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{const{queryCacheKey:n}=u.match(e)?e.payload:e.meta.arg;t=[n]}g(t,n,s)}if(t.util.resetApiState.match(e)){for(const[e,t]of Object.entries(h))t&&clearTimeout(t),delete h[e];m(o.runningQueries),m(o.runningMutations)}if(r.hasRehydrationInfo(e)){const{queries:t}=r.extractRehydrationInfo(e);g(Object.keys(t),n,s)}}},_i=new Error("Promise never resolved before cacheEntryRemoved."),Ri=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:s}})=>{const c=Ir(r),l=Ir(o),u=Dr(r,o),d={},{removeQueryResult:f,removeMutationResult:p,cacheEntriesUpserted:h}=e.internalActions;function m(e,t,n){const r=d[e];r?.valueResolved&&(r.valueResolved({data:t,meta:n}),delete r.valueResolved)}function g(e){const t=d[e];t&&(delete d[e],t.cacheEntryRemoved())}function y(e){const{arg:t,requestId:n}=e.meta,{endpointName:r,originalArgs:o}=t;return[r,o,n]}function v(t,r,o,i,a){const s=di(n,t),c=s?.onCacheEntryAdded;if(!c)return;const l={},u=new Promise(e=>{l.cacheEntryRemoved=e}),f=Promise.race([new Promise(e=>{l.valueResolved=e}),u.then(()=>{throw _i})]);f.catch(()=>{}),d[o]=l;const p=e.endpoints[t].select(ci(s)?r:o),h=i.dispatch((e,__,t)=>t),m={...i,getCacheEntry:()=>p(i.getState()),requestId:a,extra:h,updateCachedData:ci(s)?n=>i.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:u},g=c(r,m);Promise.resolve(g).catch(e=>{if(e!==_i)throw e})}return(n,i,s)=>{const b=function(e){return c(e)?e.meta.arg.queryCacheKey:l(e)?e.meta.arg.fixedCacheKey??e.meta.requestId:f.match(e)?e.payload.queryCacheKey:p.match(e)?Oi(e.payload):""}(n);function x(e,t,n,r){const o=a(s,t),c=a(i.getState(),t);!o&&c&&v(e,r,t,i,n)}if(r.pending.match(n)){const[e,t,r]=y(n);x(e,b,r,t)}else if(h.match(n))for(const{queryDescription:e,value:t}of n.payload){const{endpointName:r,originalArgs:o,queryCacheKey:i}=e;x(r,i,n.meta.requestId,o),m(i,t,{})}else if(o.pending.match(n)){if(i.getState()[t].mutations[b]){const[e,t,r]=y(n);v(e,t,b,i,r)}}else if(u(n))m(b,n.payload,n.meta.baseQueryMeta);else if(f.match(n)||p.match(n))g(b);else if(e.util.resetApiState.match(n))for(const e of Object.keys(d))g(e)}},Li=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},Ui=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:o,api:i,assertTagType:a,refetchQuery:s,internalState:c})=>{const{removeQueryResult:l}=i.internalActions,u=Mr(Dr(r),kr(r)),d=Mr(Dr(o,r),Er(o,r));let f=[],p=0;function h(n,r){const o=r.getState(),a=o[e];if(f.push(...n),"delayed"===a.config.invalidationBehavior&&p>0)return;const u=f;if(f=[],0===u.length)return;const d=i.util.selectInvalidatedBy(o,u);t.batch(()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=a.queries[t],n=Wo(c.currentSubscriptions,t,Bo);e&&(0===n.size?r.dispatch(l({queryCacheKey:t})):e.status!==To&&r.dispatch(s(e)))}})}return(e,t)=>{(o.pending.match(e)||r.pending.match(e))&&p++,d(e)&&(p=Math.max(0,p-1)),u(e)?h(wi(e,"invalidatesTags",n,a),t):d(e)?h([],t):i.util.invalidateTags.match(e)&&h(li(e.payload,void 0,void 0,void 0,void 0,a),t)}},Yi=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:o})=>{const{currentPolls:i,currentSubscriptions:a}=o,s=new Set;let c=null;function l(e,t){s.add(e),c||(c=setTimeout(()=>{for(const e of s)d({queryCacheKey:e},t);s.clear(),c=null},0))}function u({queryCacheKey:t},n){const o=n.getState()[e],s=o.queries[t],c=a.get(t);if(!s||s.status===To)return;const{lowestPollingInterval:l,skipPollingIfUnfocused:d}=p(c);if(!Number.isFinite(l))return;const f=i.get(t);f?.timeout&&(clearTimeout(f.timeout),f.timeout=void 0);const h=Date.now()+l;i.set(t,{nextPollTimestamp:h,pollingInterval:l,timeout:setTimeout(()=>{!o.config.focused&&d||n.dispatch(r(s)),u({queryCacheKey:t},n)},l)})}function d({queryCacheKey:t},n){const r=n.getState()[e].queries[t],o=a.get(t);if(!r||r.status===To)return;const{lowestPollingInterval:s}=p(o);if(!Number.isFinite(s))return void f(t);const c=i.get(t),l=Date.now()+s;(!c||l<c.nextPollTimestamp)&&u({queryCacheKey:t},n)}function f(e){const t=i.get(e);t?.timeout&&clearTimeout(t.timeout),i.delete(e)}function p(e=new Map){let t=!1,n=Number.POSITIVE_INFINITY;for(const r of e.values())r.pollingInterval&&(n=Math.min(r.pollingInterval,n),t=r.skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&l(e.payload.queryCacheKey,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&l(e.meta.arg.queryCacheKey,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&u(e.meta.arg,r),n.util.resetApiState.match(e)&&(function(){for(const e of i.keys())f(e)}(),c&&(clearTimeout(c),c=null),s.clear())}},Fi=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const o=Sr(n,r),i=Er(n,r),a=Dr(n,r),s={};return(n,r)=>{if(o(n)){const{requestId:o,arg:{endpointName:i,originalArgs:a}}=n.meta,c=di(t,i),l=c?.onQueryStarted;if(l){const t={},n=new Promise((e,n)=>{t.resolve=e,t.reject=n});n.catch(()=>{}),s[o]=t;const u=e.endpoints[i].select(ci(c)?a:o),d=r.dispatch((e,__,t)=>t),f={...r,getCacheEntry:()=>u(r.getState()),requestId:o,extra:d,updateCachedData:ci(c)?t=>r.dispatch(e.util.updateQueryData(i,a,t)):void 0,queryFulfilled:n};l(a,f)}}else if(a(n)){const{requestId:e,baseQueryMeta:t}=n.meta;s[e]?.resolve({data:n.payload,meta:t}),delete s[e]}else if(i(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;s[e]?.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}};function Wi(e){const{reducerPath:t,queryThunk:n,api:r,context:o,getInternalState:i}=e,{apiUid:a}=o,s={invalidateTags:dr(`${t}/invalidateTags`)},c=e=>e.type.startsWith(`${t}/`),l=[Li,zi,Ui,Yi,Ri,Fi];return{middleware:n=>{let s=!1;const d=i(n.dispatch),f={...e,internalState:d,refetchQuery:u,isThisApiSliceAction:c,mwApi:n},p=l.map(e=>e(f)),h=(({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const o=`${e.reducerPath}/subscriptions`;let i=null,a=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:c}=e.internalActions,l=()=>n.currentSubscriptions,u={getSubscriptions:l,getSubscriptionCount:e=>{const t=l().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{const n=l();return!!n?.get(e)?.get(t)}};function d(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(r,l)=>{if(i||(i=d(n.currentSubscriptions)),e.util.resetApiState.match(r))return i={},n.currentSubscriptions.clear(),a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(r))return[!1,u];const f=((n,r)=>{if(s.match(r)){const{queryCacheKey:e,requestId:t,options:o}=r.payload,i=n.get(e);return i?.has(t)&&i.set(t,o),!0}if(c.match(r)){const{queryCacheKey:e,requestId:t}=r.payload,o=n.get(e);return o&&o.delete(t),!0}if(e.internalActions.removeQueryResult.match(r))return n.delete(r.payload.queryCacheKey),!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,o=Wo(n,e.queryCacheKey,Bo);return e.subscribe&&o.set(t,e.subscriptionOptions??o.get(t)??{}),!0}let o=!1;if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:i}}=r;if(e&&t.subscribe){const e=Wo(n,t.queryCacheKey,Bo);e.set(i,t.subscriptionOptions??e.get(i)??{}),o=!0}}return o})(n.currentSubscriptions,r);let p=!0;if(f){a||(a=setTimeout(()=>{const t=d(n.currentSubscriptions),[,r]=or(i,()=>t);l.next(e.internalActions.subscriptionsUpdated(r)),i=t,a=null},500));const s="string"==typeof r.type&&!!r.type.startsWith(o),c=t.rejected.match(r)&&r.meta.condition&&!!r.meta.arg.subscribe;p=!s&&!c}return[p,!1]}})(f),m=(({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:o})=>{const{removeQueryResult:i}=n.internalActions;function a(n,a){const s=n.getState()[e],c=s.queries,l=o.currentSubscriptions;t.batch(()=>{for(const e of l.keys()){const t=c[e],o=l.get(e);if(!o||!t)continue;const u=[...o.values()];(u.some(e=>!0===e[a])||u.every(e=>void 0===e[a])&&s.config[a])&&(0===o.size?n.dispatch(i({queryCacheKey:e})):t.status!==To&&n.dispatch(r(t)))}})}return(e,t)=>{Jo.match(e)&&a(t,"refetchOnFocus"),ti.match(e)&&a(t,"refetchOnReconnect")}})(f);return e=>i=>{if(!Ft(i))return e(i);s||(s=!0,n.dispatch(r.internalActions.middlewareRegistered(a)));const l={...n,next:e},u=n.getState(),[d,f]=h(i,l,u);let g;if(g=d?e(i):f,n.getState()[t]&&(m(i,l,u),c(i)||o.hasRehydrationInfo(i)))for(const e of p)e(i,l,u);return g}},actions:s};function u(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Bi=Symbol(),Qi=({createSelector:e=Do}={})=>({name:Bi,init(t,{baseQuery:n,tagTypes:r,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:s,refetchOnFocus:c,refetchOnReconnect:l,invalidationBehavior:u,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p},h){tr();const m=e=>e;Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:ti,onOffline:ni,onFocus:Jo,onFocusLost:ei},util:{}});const g=function({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>Di,o=e=>Ii;return{buildQuerySelector:function(e,t){return l(e,t,i)},buildInfiniteQuerySelector:function(e,t){const{infiniteQueryOptions:n}=t;return l(e,t,function(e){const t={...e,..._o(e.status)},{isLoading:r,isError:o,direction:i}=t,a="forward"===i,s="backward"===i;return{...t,hasNextPage:(c=n,l=t.data,d=t.originalArgs,!!l&&null!=bi(c,l,d)),hasPreviousPage:u(n,t.data,t.originalArgs),isFetchingNextPage:r&&a,isFetchingPreviousPage:r&&s,isFetchNextPageError:o&&a,isFetchPreviousPageError:o&&s};var c,l,d})},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Oi(e)??Ei:e,n(t===Ei?o:e=>a(e)?.mutations?.[t]??Ii,i)}},selectInvalidatedBy:function(e,n){const r=e[t],o=new Set,i=Uo(n,Yo,ui);for(const e of i){const t=r.provided.tags[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:Object.values(t).flat())??[];for(const e of n)o.add(e)}return Array.from(o.values()).flatMap(e=>{const t=r.queries[e];return t?{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}:[]})},selectCachedArgsForQuery:function(e,t){return Uo(Object.values(s(e)),e=>e?.endpointName===t&&e.status!==To,e=>e.originalArgs)},selectApiState:a,selectQueries:s,selectMutations:function(e){return a(e)?.mutations},selectQueryEntry:c,selectConfig:function(e){return a(e)?.config}};function i(e){return{...e,..._o(e.status)}}function a(e){return e[t]}function s(e){return a(e)?.queries}function c(e,t){return s(e)?.[t]}function l(t,o,i){return a=>{if(a===Ei)return n(r,i);const s=e({queryArgs:a,endpointDefinition:o,endpointName:t});return n(e=>c(e,s)??Di,i)}}function u(e,t,n){return!(!t||!e.getPreviousPageParam)&&null!=xi(e,t,n)}}({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:y,selectCachedArgsForQuery:v,buildQuerySelector:b,buildInfiniteQuerySelector:x,buildMutationSelector:w}=g;Pi(t.util,{selectInvalidatedBy:y,selectCachedArgsForQuery:v});const{queryThunk:M,infiniteQueryThunk:j,mutationThunk:O,patchQueryData:N,updateQueryData:S,upsertQueryData:E,prefetch:k,buildMatchThunkActions:D}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:o,assertTagType:i,selectors:a,onSchemaFailure:s,catchSchemaFailure:c,skipSchemaValidation:l}){function u(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}function d(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}const f=(e,t)=>e.query&&e[t]?e[t]:yi,p=async(e,{signal:r,abort:o,rejectWithValue:i,fulfillWithValue:p,dispatch:m,getState:g,extra:y})=>{const v=n[e.endpointName],{metaSchema:b,skipSchemaValidation:x=l}=v,w=e.type===ri;try{let M=yi;const j={signal:r,abort:o,dispatch:m,getState:g,extra:y,endpoint:e.endpointName,type:e.type,forced:w?h(e,g()):void 0,queryCacheKey:w?e.queryCacheKey:void 0},O=w?e[fi]:void 0;let N;const S=async(t,n,r,o)=>{if(null==n&&t.pages.length)return Promise.resolve({data:t});const i={queryArg:e.originalArgs,pageParam:n},a=await E(i),s=o?u:d;return{data:{pages:s(t.pages,a.data,r),pageParams:s(t.pageParams,n,r)},meta:a.meta}};async function E(e){let n;const{extraOptions:r,argSchema:o,rawResponseSchema:i,responseSchema:a}=v;if(o&&!mi(x,"arg")&&(e=await gi(o,e,"argSchema",{})),O?n=O():v.query?(M=f(v,"transformResponse"),n=await t(v.query(e),j,r)):n=await v.queryFn(e,j,r,e=>t(e,j,r)),n.error)throw new Ko(n.error,n.meta);let{data:s}=n;i&&!mi(x,"rawResponse")&&(s=await gi(i,n.data,"rawResponseSchema",n.meta));let c=await M(s,n.meta,e);return a&&!mi(x,"response")&&(c=await gi(a,c,"responseSchema",n.meta)),{...n,data:c}}if(w&&"infiniteQueryOptions"in v){const{infiniteQueryOptions:k}=v,{maxPages:D=1/0}=k,I=e.refetchCachedPages??k.refetchCachedPages??!0;let A;const T={pages:[],pageParams:[]},C=a.selectQueryEntry(g(),e.queryCacheKey)?.data,P=h(e,g())&&!e.direction||!C?T:C;if("direction"in e&&e.direction&&P.pages.length){const z="backward"===e.direction,_=(z?xi:bi)(k,P,e.originalArgs);A=await S(P,_,D,z)}else{const{initialPageParam:R=k.initialPageParam}=e,L=C?.pageParams??[],U=L[0]??R,Y=L.length;if(A=await S(P,U,D),O&&(A={data:A.data.pages[0]}),I)for(let F=1;F<Y;F++){const W=bi(k,A.data,e.originalArgs);A=await S(A.data,W,D)}}N=A}else N=await E(e.originalArgs);return b&&!mi(x,"meta")&&N.meta&&(N.meta=await gi(b,N.meta,"metaSchema",N.meta)),p(N.data,vi({fulfilledTimeStamp:Date.now(),baseQueryMeta:N.meta}))}catch(B){let Q=B;if(Q instanceof Ko){let q=f(v,"transformErrorResponse");const{rawErrorResponseSchema:G,errorResponseSchema:$}=v;let{value:H,meta:V}=Q;try{G&&!mi(x,"rawErrorResponse")&&(H=await gi(G,H,"rawErrorResponseSchema",V)),b&&!mi(x,"meta")&&(V=await gi(b,V,"metaSchema",V));let K=await q(H,V,e.originalArgs);return $&&!mi(x,"errorResponse")&&(K=await gi($,K,"errorResponseSchema",V)),i(K,vi({baseQueryMeta:V}))}catch(Z){Q=Z}}try{if(Q instanceof hi){const X={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:w?e.queryCacheKey:void 0};v.onSchemaFailure?.(Q,X),s?.(Q,X);const{catchSchemaFailure:J=c}=v;if(J)return i(J(Q,X),vi({baseQueryMeta:Q._bqMeta}))}}catch(ee){Q=ee}throw console.error(Q),Q}};function h(e,t){const n=a.selectQueryEntry(t,e.queryCacheKey),r=a.selectConfig(t).refetchOnMountOrArgChange,o=n?.fulfilledTimeStamp,i=e.forceRefetch??(e.subscribe&&r);return!!i&&(!0===i||(Number(new Date)-Number(o))/1e3>=i)}const m=()=>Rr(`${e}/executeQuery`,p,{getPendingMeta({arg:e}){const t=n[e.endpointName];return vi({startedTimeStamp:Date.now(),...si(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){const r=t(),o=a.selectQueryEntry(r,e.queryCacheKey),i=o?.fulfilledTimeStamp,s=e.originalArgs,c=o?.originalArgs,l=n[e.endpointName],u=e.direction;return!(!pi(e)&&("pending"===o?.status||!h(e,r)&&(!ai(l)||!l?.forceRefetch?.({currentArg:s,previousArg:c,endpointState:o,state:r}))&&i&&!u))},dispatchConditionRejection:!0}),g=m(),y=m();function v(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:g,mutationThunk:Rr(`${e}/executeMutation`,p,{getPendingMeta:()=>vi({startedTimeStamp:Date.now()})}),infiniteQueryThunk:y,prefetch:(e,t,n={})=>(r,i)=>{const a=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,c=(n=!0)=>{const r={forceRefetch:n,subscribe:!1};return o.endpoints[e].initiate(t,r)},l=o.endpoints[e].select(t)(i());if(a)r(c());else if(s){const e=l?.fulfilledTimeStamp;if(!e)return void r(c());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(c())}else r(c(!1))},updateQueryData:(e,t,n,r=!0)=>(i,a)=>{const s=o.endpoints[e].select(t)(a()),c={patches:[],inversePatches:[],undo:()=>i(o.util.patchQueryData(e,t,c.inversePatches,r))};if(s.status===To)return c;let l;if("data"in s)if(nn(s.data)){const[e,t,r]=or(s.data,n);c.patches.push(...t),c.inversePatches.push(...r),l=e}else l=n(s.data),c.patches.push({op:"replace",path:[],value:l}),c.inversePatches.push({op:"replace",path:[],value:s.data});return 0===c.patches.length||i(o.util.patchQueryData(e,t,c.patches,r)),c},upsertQueryData:(e,t,n)=>r=>r(o.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[fi]:()=>({data:n})})),patchQueryData:(e,t,a,s)=>(c,l)=>{const u=n[e],d=r({queryArgs:t,endpointDefinition:u,endpointName:e});if(c(o.internalActions.queryResultPatched({queryCacheKey:d,patches:a})),!s)return;const f=o.endpoints[e].select(t)(l()),p=li(u.providesTags,f.data,void 0,t,{},i);c(o.internalActions.updateProvidedBy([{queryCacheKey:d,providedTags:p}]))},buildMatchThunkActions:function(e,t){return{matchPending:jr(Sr(e),v(t)),matchFulfilled:jr(Dr(e),v(t)),matchRejected:jr(Er(e),v(t))}}}}({baseQuery:n,reducerPath:o,context:h,api:t,serializeQueryArgs:i,assertTagType:m,selectors:g,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p}),{reducer:I,actions:A}=function({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:s},assertTagType:c,config:l}){const u=dr(`${e}/resetApiState`);function d(e,t,n,r){e[t.queryCacheKey]??={status:To,endpointName:t.endpointName},ji(e,t.queryCacheKey,e=>{e.status=Co,e.requestId=n&&e.requestId?e.requestId:r.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=r.startedTimeStamp,si(o[r.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function f(e,t,n,r){ji(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!r)return;const{merge:i}=o[t.arg.endpointName];if(e.status=Po,i)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:o,baseQueryMeta:a,requestId:s}=t;let c=rr(e.data,e=>i(e,n,{arg:o.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:r,requestId:s}));e.data=c}else e.data=n;else e.data=o[t.arg.endpointName].structuralSharing??1?Lo(tn(e.data)?function(e){return tn(e)||Gt(15),e[qt].base_}(e.data):e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}const p=Br({name:`${e}/queries`,initialState:Si,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:gr()},cacheEntriesUpserted:{reducer(e,t){for(const n of t.payload){const{queryDescription:r,value:o}=n;d(e,r,!0,{arg:r,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),f(e,{arg:r,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},o,!0)}},prepare:e=>{const t=e.map(e=>{const{endpointName:t,arg:n,value:i}=e,a=o[t];return{queryDescription:{type:ri,endpointName:t,originalArgs:e.arg,queryCacheKey:r({queryArgs:n,endpointDefinition:a,endpointName:t})},value:i}});return{payload:t,meta:{[mr]:!0,requestId:Ar(),timestamp:Date.now()}}}},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){ji(e,t,e=>{e.data=ir(e.data,n.concat())})},prepare:gr()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:n}})=>{d(e,n,pi(n),t)}).addCase(t.fulfilled,(e,{meta:t,payload:n})=>{f(e,t,n,pi(t.arg))}).addCase(t.rejected,(e,{meta:{condition:t,arg:n,requestId:r},error:o,payload:i})=>{ji(e,n.queryCacheKey,e=>{if(t);else{if(e.requestId!==r)return;e.status=zo,e.error=i??o}})}).addMatcher(s,(e,t)=>{const{queries:n}=a(t);for(const[t,r]of Object.entries(n))r?.status!==Po&&r?.status!==zo||(e[t]=r)})}}),h=Br({name:`${e}/mutations`,initialState:Si,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=Oi(t);n in e&&delete e[n]},prepare:gr()}},extraReducers(e){e.addCase(n.pending,(e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:o}})=>{r.track&&(e[Oi(t)]={requestId:n,status:Co,endpointName:r.endpointName,startedTimeStamp:o})}).addCase(n.fulfilled,(e,{payload:t,meta:n})=>{n.arg.track&&Ni(e,n,e=>{e.requestId===n.requestId&&(e.status=Po,e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)})}).addCase(n.rejected,(e,{payload:t,error:n,meta:r})=>{r.arg.track&&Ni(e,r,e=>{e.requestId===r.requestId&&(e.status=zo,e.error=t??n)})}).addMatcher(s,(e,t)=>{const{mutations:n}=a(t);for(const[t,r]of Object.entries(n))r?.status!==Po&&r?.status!==zo||t===r?.requestId||(e[t]=r)})}}),m=Br({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(const{queryCacheKey:n,providedTags:r}of t.payload){g(e,n);for(const{type:t,id:o}of r){const r=(e.tags[t]??={})[o||"__internal_without_id"]??=[];r.includes(n)||r.push(n)}e.keys[n]=r}},prepare:gr()}},extraReducers(e){e.addCase(p.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{g(e,t)}).addMatcher(s,(e,t)=>{const{provided:n}=a(t);for(const[t,r]of Object.entries(n.tags??{}))for(const[o,i]of Object.entries(r)){const r=(e.tags[t]??={})[o||"__internal_without_id"]??=[];for(const t of i)r.includes(t)||r.push(t),e.keys[t]=n.keys[t]}}).addMatcher(Mr(Dr(t),kr(t)),(e,t)=>{y(e,[t])}).addMatcher(p.actions.cacheEntriesUpserted.match,(e,t)=>{const n=t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}}));y(e,n)})}});function g(e,t){const n=Mi(e.keys[t]??[]);for(const r of n){const n=r.type,o=r.id??"__internal_without_id",i=e.tags[n]?.[o];i&&(e.tags[n][o]=Mi(i).filter(e=>e!==t))}delete e.keys[t]}function y(e,t){const n=t.map(e=>{const t=wi(e,"providesTags",o,c),{queryCacheKey:n}=e.meta.arg;return{queryCacheKey:n,providedTags:t}});m.caseReducers.updateProvidedBy(e,m.actions.updateProvidedBy(n))}const v=Br({name:`${e}/subscriptions`,initialState:Si,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),b=Br({name:`${e}/internalSubscriptions`,initialState:Si,reducers:{subscriptionsUpdated:{reducer:(e,t)=>ir(e,t.payload),prepare:gr()}}}),x=Br({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...l},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&i===t||"conflict"}},extraReducers:e=>{e.addCase(ti,e=>{e.online=!0}).addCase(ni,e=>{e.online=!1}).addCase(Jo,e=>{e.focused=!0}).addCase(ei,e=>{e.focused=!1}).addMatcher(s,e=>({...e}))}}),w=Ut({queries:p.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:b.reducer,config:x.reducer});return{reducer:(e,t)=>w(u.match(t)?void 0:e,t),actions:{...x.actions,...p.actions,...v.actions,...b.actions,...h.actions,...m.actions,resetApiState:u}}}({context:h,queryThunk:M,infiniteQueryThunk:j,mutationThunk:O,serializeQueryArgs:i,reducerPath:o,assertTagType:m,config:{refetchOnFocus:c,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:u}});Pi(t.util,{patchQueryData:N,updateQueryData:S,upsertQueryData:E,prefetch:k,resetApiState:A.resetApiState,upsertQueryEntries:A.cacheEntriesUpserted}),Pi(t.internalActions,A);const T=new WeakMap,C=e=>Wo(T,e,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:P,buildInitiateInfiniteQuery:z,buildInitiateMutation:_,getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueriesThunk:U,getRunningQueryThunk:Y}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:o,context:i,getInternalState:a}){const s=e=>a(e)?.runningQueries,c=e=>a(e)?.runningMutations,{unsubscribeQueryResult:l,removeMutationResult:u,updateSubscriptionOptions:d}=o.internalActions;return{buildInitiateQuery:function(e,t){return f(e,t)},buildInitiateInfiniteQuery:function(e,t){return f(e,t)},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:o}={})=>(i,a)=>{const s=r({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:o}),l=i(s),{requestId:d,abort:f,unwrap:p}=l,h=(m=e=>({error:e}),l.unwrap().then(e=>({data:e})).catch(m));var m;const g=Object.assign(h,{arg:l.arg,requestId:d,abort:f,unwrap:p,reset:()=>{i(u({requestId:d,fixedCacheKey:o}))}}),y=c(i);return y.set(d,g),g.then(()=>{y.delete(d)}),o&&(y.set(o,g),g.then(()=>{y.get(o)===g&&y.delete(o)})),g}},getRunningQueryThunk:function(t,n){return r=>{const o=di(i,t),a=e({queryArgs:n,endpointDefinition:o,endpointName:t});return s(r)?.get(a)}},getRunningMutationThunk:function(e,t){return e=>c(e)?.get(t)},getRunningQueriesThunk:function(){return e=>Fo(s(e))},getRunningMutationsThunk:function(){return e=>Fo(c(e))}};function f(r,i){const a=(c,{subscribe:u=!0,forceRefetch:f,subscriptionOptions:p,[fi]:h,...m}={})=>(g,y)=>{const v=e({queryArgs:c,endpointDefinition:i,endpointName:r});let b;const x={...m,type:ri,subscribe:u,forceRefetch:f,subscriptionOptions:p,endpointName:r,originalArgs:c,queryCacheKey:v,[fi]:h};if(ai(i))b=t(x);else{const{direction:e,initialPageParam:t,refetchCachedPages:r}=m;b=n({...x,direction:e,initialPageParam:t,refetchCachedPages:r})}const w=o.endpoints[r].select(c),M=g(b),j=w(y()),{requestId:O,abort:N}=M,S=j.requestId!==O,E=s(g)?.get(v),k=()=>w(y()),D=Object.assign(h?M.then(k):S&&!E?Promise.resolve(j):Promise.all([E,M]).then(k),{arg:c,requestId:O,subscriptionOptions:p,queryCacheKey:v,abort:N,async unwrap(){const e=await D;if(e.isError)throw e.error;return e.data},refetch:e=>g(a(c,{subscribe:!1,forceRefetch:!0,...e})),unsubscribe(){u&&g(l({queryCacheKey:v,requestId:O}))},updateSubscriptionOptions(e){D.subscriptionOptions=e,g(d({endpointName:r,requestId:O,queryCacheKey:v,options:e}))}});if(!E&&!S&&!h){const e=s(g);e.set(v,D),D.then(()=>{e.delete(v)})}return D};return a}}({queryThunk:M,mutationThunk:O,infiniteQueryThunk:j,api:t,serializeQueryArgs:i,context:h,getInternalState:C});Pi(t.util,{getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueryThunk:Y,getRunningQueriesThunk:U});const{middleware:F,actions:W}=Wi({reducerPath:o,context:h,queryThunk:M,mutationThunk:O,infiniteQueryThunk:j,api:t,assertTagType:m,selectors:g,getRunningQueryThunk:Y,getInternalState:C});return Pi(t.util,W),Pi(t,{reducer:I,middleware:F}),{name:Bi,injectEndpoint(e,n){const r=t,o=r.endpoints[e]??={};ai(n)&&Pi(o,{name:e,select:b(e,n),initiate:P(e,n)},D(M,e)),n.type===oi&&Pi(o,{name:e,select:w(),initiate:_(e)},D(O,e)),si(n)&&Pi(o,{name:e,select:x(e,n),initiate:z(e,n)},D(M,e))}}}});function qi(e){return e.replace(e[0],e[0].toUpperCase())}function Gi(e){return"infinitequery"===e.type}function $i(e,...t){return Object.assign(e,...t)}Qi();var Hi=Symbol();function Vi(e){const t=(0,a.useRef)(e),n=(0,a.useMemo)(()=>Lo(t.current,e),[e]);return(0,a.useEffect)(()=>{t.current!==n&&(t.current=n)},[n]),n}function Ki(e){const t=(0,a.useRef)(e);return(0,a.useEffect)(()=>{m(t.current,e)||(t.current=e)},[e]),m(t.current,e)?t.current:e}var Zi=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),Xi=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),Ji=(()=>Zi||Xi?a.useLayoutEffect:a.useEffect)(),ea=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:Ao.pending}:e;function ta(e,...t){const n={};return t.forEach(t=>{n[t]=e[t]}),n}var na=["data","status","isLoading","isSuccess","isError","error"];var ra=Symbol(),oa=Ci(Qi(),(({batch:e=I,hooks:t={useDispatch:S,useSelector:D,useStore:O},createSelector:n=Do,unstable__sideEffectsInRender:r=!1,...o}={})=>({name:ra,init(o,{serializeQueryArgs:i},s){const c=o,{buildQueryHooks:l,buildInfiniteQueryHooks:u,buildMutationHook:d,usePrefetch:f}=function({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:o},unstable__sideEffectsInRender:i,createSelector:s},serializeQueryArgs:c,context:l}){const u=i?e=>e():a.useEffect,d=e=>e.current?.unsubscribe?.(),f=l.endpointDefinitions;return{buildQueryHooks:function(r){const o=(e,t={})=>{const[n]=g(r,e,t);return v(n),(0,a.useMemo)(()=>({refetch:()=>function(e){if(!e.current)throw new Error(Mo(38));return e.current.refetch()}(n)}),[n])},i=({refetchOnReconnect:o,refetchOnFocus:i,pollingInterval:s=0,skipPollingIfUnfocused:c=!1}={})=>{const{initiate:l}=e.endpoints[r],f=n(),[p,h]=(0,a.useState)(Hi),m=(0,a.useRef)(void 0),g=Ki({refetchOnReconnect:o,refetchOnFocus:i,pollingInterval:s,skipPollingIfUnfocused:c});u(()=>{const e=m.current?.subscriptionOptions;g!==e&&m.current?.updateSubscriptionOptions(g)},[g]);const y=(0,a.useRef)(g);u(()=>{y.current=g},[g]);const v=(0,a.useCallback)(function(e,n=!1){let r;return t(()=>{d(m),m.current=r=f(l(e,{subscriptionOptions:y.current,forceRefetch:!n})),h(e)}),r},[f,l]),b=(0,a.useCallback)(()=>{m.current?.queryCacheKey&&f(e.internalActions.removeQueryResult({queryCacheKey:m.current?.queryCacheKey}))},[f]);return(0,a.useEffect)(()=>()=>{d(m)},[]),(0,a.useEffect)(()=>{p===Hi||m.current||v(p,!0)},[p,v]),(0,a.useMemo)(()=>[v,p,{reset:b}],[v,p,b])},s=y(r,p);return{useQueryState:s,useQuerySubscription:o,useLazyQuerySubscription:i,useLazyQuery(e){const[t,n,{reset:r}]=i(e),o=s(n,{...e,skip:n===Hi}),c=(0,a.useMemo)(()=>({lastArg:n}),[n]);return(0,a.useMemo)(()=>[t,{...o,reset:r},c],[t,o,r,c])},useQuery(e,t){const n=o(e,t),r=s(e,{selectFromResult:e===Ei||t?.skip?void 0:ea,...t}),i=ta(r,...na);return(0,a.useDebugValue)(i),(0,a.useMemo)(()=>({...r,...n}),[r,n])}}},buildInfiniteQueryHooks:function(e){const n=(n,r={})=>{const[o,i,s,c]=g(e,n,r),l=(0,a.useRef)(c);u(()=>{l.current=c},[c]);const f=Ki(r.refetchCachedPages),p=(0,a.useCallback)(function(e,n){let r;return t(()=>{d(o),o.current=r=i(s(e,{subscriptionOptions:l.current,direction:n}))}),r},[o,i,s]);v(o);const h=Vi(r.skip?Ei:n),m=(0,a.useCallback)(e=>{if(!o.current)throw new Error(Mo(38));const t={refetchCachedPages:e?.refetchCachedPages??f};return o.current.refetch(t)},[o,f]);return(0,a.useMemo)(()=>({trigger:p,refetch:m,fetchNextPage:()=>p(h,"forward"),fetchPreviousPage:()=>p(h,"backward")}),[m,p,h])},r=y(e,h);return{useInfiniteQueryState:r,useInfiniteQuerySubscription:n,useInfiniteQuery(e,t){const{refetch:o,fetchNextPage:i,fetchPreviousPage:s}=n(e,t),c=r(e,{selectFromResult:e===Ei||t?.skip?void 0:ea,...t}),l=ta(c,...na,"hasNextPage","hasPreviousPage");return(0,a.useDebugValue)(l),(0,a.useMemo)(()=>({...c,fetchNextPage:i,fetchPreviousPage:s,refetch:o}),[c,i,s,o])}}},buildMutationHook:function(o){return({selectFromResult:i,fixedCacheKey:c}={})=>{const{select:l,initiate:u}=e.endpoints[o],d=n(),[f,p]=(0,a.useState)();(0,a.useEffect)(()=>()=>{f?.arg.fixedCacheKey||f?.reset()},[f]);const h=(0,a.useCallback)(function(e){const t=d(u(e,{fixedCacheKey:c}));return p(t),t},[d,u,c]),{requestId:g}=f||{},y=(0,a.useMemo)(()=>l({fixedCacheKey:c,requestId:f?.requestId}),[c,f,l]),v=(0,a.useMemo)(()=>i?s([y],i):y,[i,y]),b=r(v,m),x=null==c?f?.arg.originalArgs:void 0,w=(0,a.useCallback)(()=>{t(()=>{f&&p(void 0),c&&d(e.internalActions.removeMutationResult({requestId:g,fixedCacheKey:c}))})},[d,c,f,g]),M=ta(b,...na,"endpointName");(0,a.useDebugValue)(M);const j=(0,a.useMemo)(()=>({...b,originalArgs:x,reset:w}),[b,x,w]);return(0,a.useMemo)(()=>[h,j],[h,j])}},usePrefetch:function(t,r){const o=n(),i=Ki(r);return(0,a.useCallback)((n,r)=>o(e.util.prefetch(t,n,{...i,...r})),[t,o,i])}};function p(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Ei&&c({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===c({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const o=void 0!==r,i=e.isLoading,a=(!t||t.isLoading||t.isUninitialized)&&!o&&i,s=e.isSuccess||o&&(i&&!t?.isError||e.isUninitialized);return{...e,data:r,currentData:e.data,isFetching:i,isLoading:a,isSuccess:s}}function h(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Ei&&c({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===c({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const o=void 0!==r,i=e.isLoading,a=(!t||t.isLoading||t.isUninitialized)&&!o&&i,s=e.isSuccess||o&&(i&&!t?.isError||e.isUninitialized);return{...e,data:r,currentData:e.data,isFetching:i,isLoading:a,isSuccess:s}}function g(t,r,{refetchOnReconnect:o,refetchOnFocus:i,refetchOnMountOrArgChange:s,skip:c=!1,pollingInterval:l=0,skipPollingIfUnfocused:d=!1,...p}={}){const{initiate:h}=e.endpoints[t],m=n(),g=(0,a.useRef)(void 0);if(!g.current){const t=m(e.internalActions.internal_getRTKQSubscriptions());g.current=t}const y=Vi(c?Ei:r),v=Ki({refetchOnReconnect:o,refetchOnFocus:i,pollingInterval:l,skipPollingIfUnfocused:d}),b=Ki(p.initialPageParam),x=Ki(p.refetchCachedPages),w=(0,a.useRef)(void 0);let{queryCacheKey:M,requestId:j}=w.current||{},O=!1;M&&j&&(O=g.current.isRequestSubscribed(M,j));const N=!O&&void 0!==w.current;return u(()=>{N&&(w.current=void 0)},[N]),u(()=>{const e=w.current;if(y===Ei)return e?.unsubscribe(),void(w.current=void 0);const n=w.current?.subscriptionOptions;if(e&&e.arg===y)v!==n&&e.updateSubscriptionOptions(v);else{e?.unsubscribe();const n=m(h(y,{subscriptionOptions:v,forceRefetch:s,...Gi(f[t])?{initialPageParam:b,refetchCachedPages:x}:{}}));w.current=n}},[m,h,s,y,v,N,b,x,t]),[w,m,h,v]}function y(t,n){return(i,{skip:c=!1,selectFromResult:l}={})=>{const{select:u}=e.endpoints[t],d=Vi(c?Ei:i),f=(0,a.useRef)(void 0),p=(0,a.useMemo)(()=>s([u(d),(e,t)=>t,e=>d],n,{memoizeOptions:{resultEqualityCheck:m}}),[u,d]),h=(0,a.useMemo)(()=>l?s([p],l,{devModeChecks:{identityFunctionCheck:"never"}}):p,[p,l]),g=r(e=>h(e,f.current),m),y=o(),v=p(y.getState(),f.current);return Ji(()=>{f.current=v},[v]),g}}function v(e){(0,a.useEffect)(()=>()=>{d(e),e.current=void 0},[e])}}({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:i,context:s});return $i(c,{usePrefetch:f}),$i(s,{batch:e}),{injectEndpoint(e,t){if("query"===t.type){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:i,useQuerySubscription:a}=l(e);$i(c.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:i,useQuerySubscription:a}),o[`use${qi(e)}Query`]=t,o[`useLazy${qi(e)}Query`]=n}if("mutation"===t.type){const t=d(e);$i(c.endpoints[e],{useMutation:t}),o[`use${qi(e)}Mutation`]=t}else if(Gi(t)){const{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}=u(e);$i(c.endpoints[e],{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}),o[`use${qi(e)}InfiniteQuery`]=t}}}}}))());const ia=function({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=Go,paramsSerializer:r,isJsonContentType:o=Ho,jsonContentType:i="application/json",jsonReplacer:a,timeout:s,responseHandler:c,validateStatus:l,...u}={}){return"undefined"==typeof fetch&&n===Go&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,p,h)=>{const{getState:m,extra:g,endpoint:y,forced:v,type:b}=p;let x,{url:w,headers:M=new Headers(u.headers),params:j,responseHandler:O=c??"json",validateStatus:N=l??$o,timeout:S=s,...E}="string"==typeof f?{url:f}:f,k={...u,signal:S?qo(p.signal,Qo(S)):p.signal,...E};M=new Headers(Vo(M)),k.headers=await t(M,{getState:m,arg:f,extra:g,endpoint:y,forced:v,type:b,extraOptions:h})||M;const D="object"==typeof(I=k.body)&&(Rt(I)||Array.isArray(I)||"function"==typeof I.toJSON);var I;if(null==k.body||D||"string"==typeof k.body||k.headers.delete("content-type"),!k.headers.has("content-type")&&D&&k.headers.set("content-type",i),D&&o(k.headers)&&(k.body=JSON.stringify(k.body,a)),k.headers.has("accept")||("json"===O?k.headers.set("accept","application/json"):"text"===O&&k.headers.set("accept","text/plain, text/html, */*")),j){const e=~w.indexOf("?")?"&":"?";w+=e+(r?r(j):new URLSearchParams(Vo(j)))}w=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}(e,w);const A=new Request(w,k);let T;x={request:new Request(w,k)};try{T=await n(A)}catch(e){return{error:{status:(e instanceof Error||"undefined"!=typeof DOMException&&e instanceof DOMException)&&"TimeoutError"===e.name?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:x}}const C=T.clone();let P;x.response=C;let z="";try{let e;if(await Promise.all([d(T,O).then(e=>P=e,t=>e=t),C.text().then(e=>z=e,()=>{})]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:T.status,data:z,error:String(e)},meta:x}}return N(T,P)?{data:P,meta:x}:{error:{status:T.status,data:P},meta:x}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=o(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}({baseUrl:DISCO.json_url+"/analytics",prepareHeaders:e=>{e.set("X-WP-Nonce",DISCO.rest_nonce)}}),aa=oa({reducerPath:"analyticsApi",baseQuery:(e,t,n)=>{if(e&&"object"==typeof e&&e.params){const{params:t,url:n,...r}=e,o=Object.fromEntries(Object.entries(t).filter(([,e])=>void 0!==e)),i=new URLSearchParams(o).toString(),a=DISCO.is_pretty_url?"?":"&";e={...r,url:i?`${n}${a}${i}`:n}}return ia(e,t,n)},endpoints:()=>({})}),sa={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ca(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const la={date:ca({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ca({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ca({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ua={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function da(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const fa={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:da({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:da({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:da({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:da({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:da({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function pa(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let l;return l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l,{value:l,rest:t.slice(a.length)}}}const ha={ordinalNumber:(ma={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(ma.matchPattern);if(!n)return null;const r=n[0],o=e.match(ma.parsePattern);if(!o)return null;let i=ma.valueCallback?ma.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:pa({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:pa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:pa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:pa({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:pa({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var ma;const ga={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=sa[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:la,formatRelative:(e,t,n,r)=>ua[e],localize:fa,match:ha,options:{weekStartsOn:0,firstWeekContainsDate:1}};let ya={};function va(){return ya}Math.pow(10,8);const ba=6048e5,xa=Symbol.for("constructDateFrom");function wa(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&xa in e?e[xa](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ma(e,t){return wa(t||e,e)}function ja(e){const t=Ma(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Oa(e,...t){const n=wa.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Na(e,t){const n=Ma(e,t?.in);return n.setHours(0,0,0,0),n}function Sa(e,t,n){const[r,o]=Oa(n?.in,e,t),i=Na(r),a=Na(o),s=+i-ja(i),c=+a-ja(a);return Math.round((s-c)/864e5)}function Ea(e,t){const n=Ma(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ka(e,t){const n=va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ma(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Da(e,t){return ka(e,{...t,weekStartsOn:1})}function Ia(e,t){const n=Ma(e,t?.in),r=n.getFullYear(),o=wa(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Da(o),a=wa(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Da(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Aa(e,t){const n=Ma(e,t?.in),r=+Da(n)-+function(e,t){const n=Ia(e,t),r=wa(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Da(r)}(n);return Math.round(r/ba)+1}function Ta(e,t){const n=Ma(e,t?.in),r=n.getFullYear(),o=va(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=wa(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=ka(a,t),c=wa(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const l=ka(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function Ca(e,t){const n=Ma(e,t?.in),r=+ka(n,t)-+function(e,t){const n=va(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Ta(e,t),i=wa(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),ka(i,t)}(n,t);return Math.round(r/ba)+1}function Pa(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const za={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Pa("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Pa(n+1,2)},d:(e,t)=>Pa(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Pa(e.getHours()%12||12,t.length),H:(e,t)=>Pa(e.getHours(),t.length),m:(e,t)=>Pa(e.getMinutes(),t.length),s:(e,t)=>Pa(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Pa(Math.trunc(r*Math.pow(10,n-3)),t.length)}},_a={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return za.y(e,t)},Y:function(e,t,n,r){const o=Ta(e,r),i=o>0?o:1-o;return"YY"===t?Pa(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Pa(i,t.length)},R:function(e,t){return Pa(Ia(e),t.length)},u:function(e,t){return Pa(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Pa(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Pa(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return za.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Pa(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Ca(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Pa(o,t.length)},I:function(e,t,n){const r=Aa(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Pa(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):za.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Ma(e,t?.in);return Sa(n,Ea(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Pa(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Pa(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Pa(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Pa(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return za.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):za.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Pa(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Pa(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):za.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):za.s(e,t)},S:function(e,t){return za.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return La(r);case"XXXX":case"XX":return Ua(r);default:return Ua(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return La(r);case"xxxx":case"xx":return Ua(r);default:return Ua(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ra(r,":");default:return"GMT"+Ua(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ra(r,":");default:return"GMT"+Ua(r,":")}},t:function(e,t,n){return Pa(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Pa(+e,t.length)}};function Ra(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+Pa(i,2)}function La(e,t){return e%60==0?(e>0?"-":"+")+Pa(Math.abs(e)/60,2):Ua(e,t)}function Ua(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Pa(Math.trunc(r/60),2)+t+Pa(r%60,2)}const Ya=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Fa=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Wa={p:Fa,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ya(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Ya(r,t)).replace("{{time}}",Fa(o,t))}},Ba=/^D+$/,Qa=/^Y+$/,qa=["D","DD","YY","YYYY"];function Ga(e){return Ba.test(e)}function $a(e){return Qa.test(e)}function Ha(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),qa.includes(e))throw new RangeError(r)}function Va(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Ka(e){return!(!Va(e)&&"number"!=typeof e||isNaN(+Ma(e)))}const Za=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ja=/^'([^]*?)'?$/,es=/''/g,ts=/[a-zA-Z]/;function ns(e,t,n){const r=va(),o=n?.locale??r.locale??ga,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Ma(e,n?.in);if(!Ka(s))throw new RangeError("Invalid time value");let c=t.match(Xa).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,Wa[t])(e,o.formatLong):e}).join("").match(Za).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:rs(e)};if(_a[t])return{isToken:!0,value:e};if(t.match(ts))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const l={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return c.map(r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&$a(i)||!n?.useAdditionalDayOfYearTokens&&Ga(i))&&Ha(i,t,String(e)),(0,_a[i[0]])(s,i,o.localize,l)}).join("")}function rs(e){const t=e.match(Ja);return t?t[1].replace(es,"'"):e}function os(e,t,n){const r=Ma(e,n?.in);return isNaN(t)?wa(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function is(e){return ns(e,"yyyy-MM-dd")}const as=new Date,ss={startDate:is(function(e,t,n){return os(e,-t,n)}(as,27)),endDate:is(as)},cs=Br({name:"dateRange",initialState:ss,reducers:{setDateRange(e,t){e.startDate=t.payload.startDate,e.endDate=t.payload.endDate}}}),{setDateRange:ls}=cs.actions,us=e=>e.dateRange,ds=Do([us],e=>({date_from:e.startDate,date_to:e.endDate})),fs=cs.reducer,ps=br({reducer:{[aa.reducerPath]:aa.reducer,dateRange:fs},middleware:e=>e().concat(aa.middleware)},Wt());function hs(){return"undefined"!=typeof window}function ms(e){return vs(e)?(e.nodeName||"").toLowerCase():"#document"}function gs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ys(e){var t;return null==(t=(vs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function vs(e){return!!hs()&&(e instanceof Node||e instanceof gs(e).Node)}function bs(e){return!!hs()&&(e instanceof Element||e instanceof gs(e).Element)}function xs(e){return!!hs()&&(e instanceof HTMLElement||e instanceof gs(e).HTMLElement)}function ws(e){return!(!hs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof gs(e).ShadowRoot)}function Ms(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function js(e){return/^(table|td|th)$/.test(ms(e))}function Os(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Ns=/transform|translate|scale|rotate|perspective|filter/,Ss=/paint|layout|strict|content/,Es=e=>!!e&&"none"!==e;let ks;function Ds(e){const t=bs(e)?Ts(e):e;return Es(t.transform)||Es(t.translate)||Es(t.scale)||Es(t.rotate)||Es(t.perspective)||!Is()&&(Es(t.backdropFilter)||Es(t.filter))||Ns.test(t.willChange||"")||Ss.test(t.contain||"")}function Is(){return null==ks&&(ks="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ks}function As(e){return/^(html|body|#document)$/.test(ms(e))}function Ts(e){return gs(e).getComputedStyle(e)}function Cs(e){return bs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ps(e){if("html"===ms(e))return e;const t=e.assignedSlot||e.parentNode||ws(e)&&e.host||ys(e);return ws(t)?t.host:t}function zs(e){const t=Ps(e);return As(t)?e.ownerDocument?e.ownerDocument.body:e.body:xs(t)&&Ms(t)?t:zs(t)}function _s(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=zs(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=gs(o);if(i){const e=Rs(a);return t.concat(a,a.visualViewport||[],Ms(o)?o:[],e&&n?_s(e):[])}return t.concat(o,_s(o,[],n))}function Rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ls={...s},Us={};function Ys(e,t){const n=a.useRef(Us);return n.current===Us&&(n.current=e(t)),n}const Fs=Ls.useInsertionEffect,Ws=Fs&&Fs!==Ls.useLayoutEffect?Fs:e=>e();function Bs(e){const t=Ys(Qs).current;return t.next=e,Ws(t.effect),t.trampoline}function Qs(){const e={next:void 0,callback:qs,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function qs(){}const Gs="undefined"!=typeof document?a.useLayoutEffect:()=>{};function $s(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}const Hs={};function Vs(e,t,n,r,o){if(!(n||r||o||e))return Ks(t);let i=Ks(e);return t&&(i=Zs(i,t)),n&&(i=Zs(i,n)),r&&(i=Zs(i,r)),o&&(i=Zs(i,o)),i}function Ks(e){return Js(e)?{...ec(e,Hs)}:function(e){const t={...e};for(const e in t){const n=t[e];Xs(e,n)&&(t[e]=nc(n))}return t}(e)}function Zs(e,t){return Js(t)?ec(t,e):function(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":e[n]=$s(e.style,r);break;case"className":e[n]=oc(e.className,r);break;default:Xs(n,r)?e[n]=tc(e[n],r):e[n]=r}}return e}(e,t)}function Xs(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return 111===n&&110===r&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}function Js(e){return"function"==typeof e}function ec(e,t){return Js(e)?e(t):e??Hs}function tc(e,t){return t?e?(...n)=>{const r=n[0];if(ic(r)){const o=r;rc(o);const i=t(...n);return o.baseUIHandlerPrevented||e?.(...n),i}const o=t(...n);return e?.(...n),o}:nc(t):e}function nc(e){return e?(...t)=>{const n=t[0];return ic(n)&&rc(n),e(...t)}:e}function rc(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function oc(e,t){return t?e?t+" "+e:t:e}function ic(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}const ac=function(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`};const sc=ac,cc=a.createContext(void 0);function lc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:i}=e,s=a.useRef(null),c=function(e=!1){const t=a.useContext(cc);if(void 0===t&&!e)throw new Error(sc(16));return t}(!0),l=i??void 0!==c,{props:u}=function(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&!1!==t,c=r&&!1===t;return{props:a.useMemo(()=>{const e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=o,!i&&n&&(e.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(e["aria-disabled"]=n),!i||t&&!c||(e.disabled=n),e},[r,n,t,s,c,i,o])}}({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o}),d=a.useCallback(()=>{const e=s.current;uc(e)&&l&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return Gs(d,[d]),{getButtonProps:a.useCallback((e={})=>{const{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:a,onPointerDown:s,...c}=e;return Vs({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t)return;if(rc(e),a?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,i=e.currentTarget,s=uc(i),c=!o&&(u=i,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(o?s:!c),f="Enter"===e.key,p=" "===e.key,h=i.getAttribute("role"),m=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&l&&p){if(e.defaultPrevented&&m)return;return e.preventDefault(),void(c||o&&s?(i.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler()))}d&&(o||!p&&!f||e.preventDefault(),!o&&f&&n?.(e))},onKeyUp(e){t||(rc(e),i?.(e),e.target===e.currentTarget&&o&&l&&uc(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||o||l||" "!==e.key||n?.(e))},onPointerDown(e){t?e.preventDefault():s?.(e)}},o?{type:"button"}:{role:"button"},u,c)},[t,u,l,o]),buttonRef:Bs(e=>{s.current=e,d()})}}function uc(e){return xs(e)&&"BUTTON"===e.tagName}function dc(e,t,n,r){const o=Ys(fc).current;return function(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}(o,e,t,n,r)&&pc(o,[e,t,n,r]),o.callback}function fc(){return{callback:null,cleanup:null,refs:[]}}function pc(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const o=t[e];if(null!=o)switch(typeof o){case"function":{const t=o(n);"function"==typeof t&&(r[e]=t);break}case"object":o.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const hc=parseInt(a.version,10);function mc(e){return hc>=e}function gc(e){if(!a.isValidElement(e))return null;const t=e,n=t.props;return(mc(19)?n?.ref:t.ref)??null}function yc(){}Object.freeze([]);const vc=Object.freeze({});function bc(e,t,n={}){const r=t.render,o=function(e,t={}){const{className:n,style:r,render:o}=e,{state:i=vc,ref:a,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,d=l?function(e,t){return"function"==typeof e?e(t):e}(r,i):void 0,f=l?function(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const e=t[r](o);null!=e&&Object.assign(n,e);continue}!0===o?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}(i,c):vc,p=l&&s?function(e){return Array.isArray(e)?function(e){if(0===e.length)return Hs;if(1===e.length)return Ks(e[0]);let t=Ks(e[0]);for(let n=1;n<e.length;n+=1)t=Zs(t,e[n]);return t}(e):Vs(void 0,e)}(s):void 0,h=l?$s(f,p)??{}:vc;return"undefined"!=typeof document&&(l?Array.isArray(a)?h.ref=function(e){const t=Ys(fc).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&pc(t,e),t.callback}([h.ref,gc(o),...a]):h.ref=dc(h.ref,gc(o),a):dc(null,null)),l?(void 0!==u&&(h.className=oc(h.className,u)),void 0!==d&&(h.style=$s(h.style,d)),h):vc}(t,n);return!1===n.enabled?null:function(e,t,n,r){if(t){if("function"==typeof t)return t(n,r);const e=Vs(n,t.props);e.ref=n.ref;let o=t;return o?.$$typeof===xc&&(o=a.Children.toArray(t)[0]),a.cloneElement(o,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?(0,a.createElement)("button",{type:"button",...t,key:t.key}):"img"===e?(0,a.createElement)("img",{alt:"",...t,key:t.key}):a.createElement(e,t)}(e,n);throw new Error(sc(8))}(e,r,o,n.state??vc)}const xc=Symbol.for("react.lazy"),wc=a.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,focusableWhenDisabled:i=!1,nativeButton:a=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=lc({disabled:o,focusableWhenDisabled:i,native:a});return bc("button",e,{state:{disabled:o},ref:[t,u],props:[c,l]})});function Mc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Mc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Mc(e))&&(r&&(r+=" "),r+=t);return r}const Oc=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Nc=jc,Sc=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Nc(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=Oc(t)||Oc(r);return o[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),c=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n})?[...e,n,r]:e},[]);return Nc(e,a,c,null==n?void 0:n.class,null==n?void 0:n.className)},Ec=e=>{const t=Ac(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),kc(n,t)||Ic(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},kc=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?kc(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},Dc=/^\[(.+)\]$/,Ic=e=>{if(Dc.test(e)){const t=Dc.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ac=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return zc(Object.entries(e.classGroups),n).forEach(([e,n])=>{Tc(n,r,e,t)}),r},Tc=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?Pc(e)?void Tc(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{Tc(o,Cc(t,e),n,r)});(""===e?t:Cc(t,e)).classGroupId=n})},Cc=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Pc=e=>e.isThemeGetter,zc=(e,t)=>t?e.map(([e,n])=>{const r=n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e);return[e,r]}):e,_c=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Rc=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,c=0;for(let l=0;l<e.length;l++){let u=e[l];if(0===s){if(u===o&&(r||e.slice(l,l+i)===t)){n.push(e.slice(c,l)),c=l+i;continue}if("/"===u){a=l;continue}}"["===u?s++:"]"===u&&s--}const l=0===n.length?e:e.substring(c),u=l.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:a&&a>c?a-c:void 0}};return n?e=>n({className:e,parseClassName:a}):a},Lc=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Uc=/\s+/;function Yc(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Fc(e))&&(r&&(r+=" "),r+=t);return r}const Fc=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Fc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Wc(e,...t){let n,r,o,i=function(s){const c=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:_c(e.cacheSize),parseClassName:Rc(e),...Ec(e)}))(c),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(Uc);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const h=Lc(c).join(":"),m=l?h+"!":h,g=m+p;if(i.includes(g))continue;i.push(g);const y=o(p,f);for(let e=0;e<y.length;++e){const t=y[e];i.push(m+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(Yc.apply(null,arguments))}}const Bc=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Qc=/^\[(?:([a-z-]+):)?(.+)\]$/i,qc=/^\d+\/\d+$/,Gc=new Set(["px","full","screen"]),$c=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Vc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xc=e=>el(e)||Gc.has(e)||qc.test(e),Jc=e=>pl(e,"length",hl),el=e=>Boolean(e)&&!Number.isNaN(Number(e)),tl=e=>pl(e,"number",el),nl=e=>Boolean(e)&&Number.isInteger(Number(e)),rl=e=>e.endsWith("%")&&el(e.slice(0,-1)),ol=e=>Qc.test(e),il=e=>$c.test(e),al=new Set(["length","size","percentage"]),sl=e=>pl(e,al,ml),cl=e=>pl(e,"position",ml),ll=new Set(["image","url"]),ul=e=>pl(e,ll,yl),dl=e=>pl(e,"",gl),fl=()=>!0,pl=(e,t,n)=>{const r=Qc.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},hl=e=>Hc.test(e)&&!Vc.test(e),ml=()=>!1,gl=e=>Kc.test(e),yl=e=>Zc.test(e),vl=Wc((Symbol.toStringTag,()=>{const e=Bc("colors"),t=Bc("spacing"),n=Bc("blur"),r=Bc("brightness"),o=Bc("borderColor"),i=Bc("borderRadius"),a=Bc("borderSpacing"),s=Bc("borderWidth"),c=Bc("contrast"),l=Bc("grayscale"),u=Bc("hueRotate"),d=Bc("invert"),f=Bc("gap"),p=Bc("gradientColorStops"),h=Bc("gradientColorStopPositions"),m=Bc("inset"),g=Bc("margin"),y=Bc("opacity"),v=Bc("padding"),b=Bc("saturate"),x=Bc("scale"),w=Bc("sepia"),M=Bc("skew"),j=Bc("space"),O=Bc("translate"),N=()=>["auto",ol,t],S=()=>[ol,t],E=()=>["",Xc,Jc],k=()=>["auto",el,ol],D=()=>["","0",ol],I=()=>[el,ol];return{cacheSize:500,separator:":",theme:{colors:[fl],spacing:[Xc,Jc],blur:["none","",il,ol],brightness:I(),borderColor:[e],borderRadius:["none","","full",il,ol],borderSpacing:S(),borderWidth:E(),contrast:I(),grayscale:D(),hueRotate:I(),invert:D(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[rl,Jc],inset:N(),margin:N(),opacity:I(),padding:S(),saturate:I(),scale:I(),sepia:D(),skew:I(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",ol]}],container:["container"],columns:[{columns:[il]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",ol]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nl,ol]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ol]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",nl,ol]}],"grid-cols":[{"grid-cols":[fl]}],"col-start-end":[{col:["auto",{span:["full",nl,ol]},ol]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[fl]}],"row-start-end":[{row:["auto",{span:[nl,ol]},ol]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ol]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ol]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ol,t]}],"min-w":[{"min-w":[ol,t,"min","max","fit"]}],"max-w":[{"max-w":[ol,t,"none","full","min","max","fit","prose",{screen:[il]},il]}],h:[{h:[ol,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ol,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ol,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ol,t,"auto","min","max","fit"]}],"font-size":[{text:["base",il,Jc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tl]}],"font-family":[{font:[fl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ol]}],"line-clamp":[{"line-clamp":["none",el,tl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xc,ol]}],"list-image":[{"list-image":["none",ol]}],"list-style-type":[{list:["none","disc","decimal",ol]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xc,Jc]}],"underline-offset":[{"underline-offset":["auto",Xc,ol]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ol]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ol]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",cl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ul]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Xc,ol]}],"outline-w":[{outline:[Xc,Jc]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Xc,Jc]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",il,dl]}],"shadow-color":[{shadow:[fl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",il,ol]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ol]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",ol]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",ol]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[nl,ol]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ol]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ol]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ol]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xc,Jc,tl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function bl(...e){return vl(jc(e))}function xl(e){return DISCO.base_currency+Number(e).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function wl(e){return e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—"}function Ml(e,t){const n=new Date(e+"T00:00:00"),r={month:"short",day:"numeric",year:"numeric"};if("week"===t){const e=new Date(n);return e.setDate(e.getDate()+6),`${n.toLocaleDateString("en-US",r)} - ${e.toLocaleDateString("en-US",r)}`}if("month"===t){const e=new Date(n.getFullYear(),n.getMonth()+1,0);return`${n.toLocaleDateString("en-US",r)} - ${e.toLocaleDateString("en-US",r)}`}return n.toLocaleDateString("en-US",r)}function jl(e,t){return e.length>t?e.slice(0,t)+"...":e}function Ol(e){return e.sort((e,t)=>"Unknown"===e?.name?1:"Unknown"===t?.name?-1:0)}const Nl=window.ReactJSXRuntime,Sl=Sc("disco-group/button disco-inline-flex disco-shrink-0 disco-items-center disco-justify-center disco-rounded-lg disco-border disco-border-transparent disco-bg-clip-padding disco-text-sm disco-font-medium disco-whitespace-nowrap disco-transition-all disco-outline-none disco-select-none focus-visible:disco-border-ring focus-visible:disco-ring-3 focus-visible:disco-ring-ring/50 active:not-aria-[haspopup]:disco-translate-y-px disabled:disco-pointer-events-none disabled:disco-opacity-50 aria-invalid:disco-border-destructive aria-invalid:disco-ring-3 aria-invalid:disco-ring-destructive/20 dark:aria-invalid:disco-border-destructive/50 dark:aria-invalid:disco-ring-destructive/40 [&_svg]:disco-pointer-events-none [&_svg]:disco-shrink-0 [&_svg:not([class*=size-])]:disco-size-4",{variants:{variant:{default:"disco-bg-primary disco-text-primary-foreground [a]:hover:disco-bg-primary/80",outline:"disco-border-border disco-bg-background hover:disco-bg-muted hover:disco-text-foreground aria-expanded:disco-bg-muted aria-expanded:disco-text-foreground dark:disco-border-input dark:disco-bg-input/30 dark:hover:disco-bg-input/50",secondary:"disco-bg-secondary disco-text-secondary-foreground hover:disco-bg-secondary/80 aria-expanded:disco-bg-secondary aria-expanded:disco-text-secondary-foreground",ghost:"hover:disco-bg-muted hover:disco-text-foreground aria-expanded:disco-bg-muted aria-expanded:disco-text-foreground dark:hover:disco-bg-muted/50",destructive:"disco-bg-destructive/10 disco-text-destructive hover:disco-bg-destructive/20 focus-visible:disco-border-destructive/40 focus-visible:disco-ring-destructive/20 dark:disco-bg-destructive/20 dark:hover:disco-bg-destructive/30 dark:focus-visible:disco-ring-destructive/40",link:"disco-text-primary disco-underline-offset-4 hover:disco-underline"},size:{default:"disco-h-8 disco-gap-1.5 disco-px-2.5 has-data-[icon=inline-end]:disco-pr-2 has-data-[icon=inline-start]:disco-pl-2",xs:"disco-h-6 disco-gap-1 disco-rounded-[min(var(--radius-md),10px)] disco-px-2 disco-text-xs in-data-[slot=button-group]:disco-rounded-lg has-data-[icon=inline-end]:disco-pr-1.5 has-data-[icon=inline-start]:disco-pl-1.5 [&_svg:not([class*=size-])]:disco-size-3",sm:"disco-h-7 disco-gap-1 disco-rounded-[min(var(--radius-md),12px)] disco-px-2.5 disco-text-[0.8rem] in-data-[slot=button-group]:disco-rounded-lg has-data-[icon=inline-end]:disco-pr-1.5 has-data-[icon=inline-start]:disco-pl-1.5 [&_svg:not([class*=size-])]:disco-size-3.5",lg:"disco-h-9 disco-gap-1.5 disco-px-2.5 has-data-[icon=inline-end]:disco-pr-2 has-data-[icon=inline-start]:disco-pl-2",icon:"disco-size-8","icon-xs":"disco-size-6 disco-rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:disco-rounded-lg [&_svg:not([class*=size-])]:disco-size-3","icon-sm":"disco-size-7 disco-rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:disco-rounded-lg","icon-lg":"disco-size-9"}},defaultVariants:{variant:"default",size:"default"}});function El({className:e,variant:t="default",size:n="default",...r}){return(0,Nl.jsx)(wc,{"data-slot":"button",className:bl(Sl({variant:t,size:n,className:e})),...r})}function kl(e){return bc(e.defaultTagName??"div",e,e)}const Dl=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Il=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Al=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Tl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Cl=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Pl=(0,a.createContext)({}),zl=(0,a.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...c},l)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:h=""}=(0,a.useContext)(Pl)??{},m=r??f?24*Number(n??d)/Number(t??u):n??d;return(0,a.createElement)("svg",{ref:l,...Tl,width:t??u??Tl.width,height:t??u??Tl.height,stroke:e??p,strokeWidth:m,className:Dl("lucide",h,o),...!i&&!Cl(c)&&{"aria-hidden":"true"},...c},[...s.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(i)?i:[i]])}),_l=(e,t)=>{const n=(0,a.forwardRef)(({className:n,...r},o)=>(0,a.createElement)(zl,{ref:o,iconNode:t,className:Dl(`lucide-${Il(Al(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Al(e),n},Rl=_l("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);function Ll({className:e,...t}){return(0,Nl.jsx)("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:bl(e),...t})}function Ul({className:e,...t}){return(0,Nl.jsx)("ol",{"data-slot":"breadcrumb-list",className:bl("disco-flex disco-flex-wrap disco-items-center disco-gap-1.5 disco-text-sm disco-wrap-break-word disco-text-muted-foreground",e),...t})}function Yl({className:e,...t}){return(0,Nl.jsx)("li",{"data-slot":"breadcrumb-item",className:bl("disco-inline-flex disco-items-center disco-gap-1",e),...t})}function Fl({className:e,render:t,...n}){return kl({defaultTagName:"a",props:Vs({className:bl("transition-colors hover:text-foreground",e)},n),render:t,state:{slot:"breadcrumb-link"}})}function Wl({className:e,...t}){return(0,Nl.jsx)("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:bl("disco-font-normal disco-text-foreground",e),...t})}function Bl({children:e,className:t,...n}){return(0,Nl.jsx)("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:bl("[&>svg]:disco-size-3.5",t),...n,children:e??(0,Nl.jsx)(Rl,{})})}const Ql=aa.injectEndpoints({endpoints:e=>({getCampaigns:e.query({query:({date_from:e,date_to:t,search:n,customer_id:r,sort_by:o="revenue",order:i="desc",page:a=1,limit:s=10}={})=>({url:"/campaigns",params:{date_from:e,date_to:t,search:n,customer_id:r,sort_by:o,order:i,page:a,limit:s}})}),getCampaign:e.query({query:({id:e,date_from:t,date_to:n})=>({url:`/campaigns/${e}`,params:{date_from:t,date_to:n}})})})}),{useGetCampaignsQuery:ql,useGetCampaignQuery:Gl}=Ql,$l=aa.injectEndpoints({endpoints:e=>({getCustomers:e.query({query:({date_from:e,date_to:t,search:n,sort_by:r="total_spent",order:o="asc",campaign_id:i,order_id:a,page:s=1,limit:c=10}={})=>({url:"/customers",params:{date_from:e,date_to:t,search:n,sort_by:r,order:o,campaign_id:i,order_id:a,page:s,limit:c}})}),getCustomer:e.query({query:({id:e,date_from:t,date_to:n})=>({url:`/customers/${e}`,params:{date_from:t,date_to:n}})})})}),{useGetCustomersQuery:Hl,useGetCustomerQuery:Vl}=$l,Kl=[{match:"/campaigns-reports/",parent:{label:"Campaigns Report",path:"/campaigns-reports"},current:"Campaign Details",type:"campaign"},{match:"/customers/",parent:{label:"Customers",path:"/customers"},current:"Customer Details",type:"customer"}],Zl="disco-no-underline hover:disco-text-primary focus:disco-text-primary",Xl=({pathname:e,NAV_ITEMS:t})=>{const n=Kl.find(t=>e.startsWith(t.match)),{campaignId:r,customerId:o}=Ue(),{data:i}=Vl({id:o},{skip:"customer"!==n?.type||!o}),{data:a}=Gl({id:r},{skip:"campaign"!==n?.type||!r});if("/"===e)return null;const s=n?"customer"===n?.type?i?.data?.name:"campaign"===n?.type?a?.campaign_name:null:null;return(0,Nl.jsx)(Ll,{children:(0,Nl.jsxs)(Ul,{className:"disco-px-3 disco-py-2 disco-bg-[#f9fafb]",children:[(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Fl,{render:(0,Nl.jsx)(Et,{to:"/",end:!0,className:Zl}),children:"Dashboard"})}),n?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Bl,{}),(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Fl,{render:(0,Nl.jsx)(Et,{to:n.parent.path,className:Zl}),children:n.parent.label})}),(0,Nl.jsx)(Bl,{}),(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Wl,{children:s})})]}):(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Bl,{}),(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Wl,{children:t.find(t=>t.path===e)?.label})})]})]})})};let Jl=0;const eu=Ls.useId;function tu(e,t){if(void 0!==eu){const n=eu();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[n,r]=a.useState(e),o=e||n;return a.useEffect(()=>{null==n&&(Jl+=1,r(`${t}-${Jl}`))},[n,t]),o}(e,t)}function nu(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class ru{nodesRef={current:[]};events=nu();addNode(e){this.nodesRef.current.push(e)}removeNode(e){const t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}}const ou=a.createContext(null),iu=a.createContext(null),au=()=>a.useContext(ou)?.id||null,su=e=>{const t=a.useContext(iu);return e??t};function cu(e){const{children:t,id:n}=e,r=au();return(0,Nl.jsx)(ou.Provider,{value:a.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function lu(e){const{children:t,externalTree:n}=e,r=Ys(()=>n??new ru).current;return(0,Nl.jsx)(iu.Provider,{value:r,children:t})}function uu(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function du(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function fu(e){return e?.ownerDocument||document}const pu=[];function hu(e){a.useEffect(e,pu)}class mu{static create(){return new mu}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function gu(){const e=Ys(mu.create).current;return hu(e.disposeEffect),e}const{userAgent:yu,platform:vu,maxTouchPoints:bu}="undefined"==typeof navigator?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0},xu=yu.toLowerCase(),wu=vu.toLowerCase(),Mu="undefined"!=typeof CSS&&!!CSS.supports?.("-webkit-backdrop-filter:none");function ju(e,t,n,r){let o=!1,i=!1;const a=r??vc;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}!Mu&&xu.includes("firefox"),!Mu&&xu.includes("chrom");const Ou="trigger-press",Nu="trigger-hover",Su="outside-press",Eu="close-press",ku="focus-out",Du="escape-key",Iu="imperative-action";function Au(e){return`data-base-ui-${e}`}const Tu="data-base-ui-focusable",Cu="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pu(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function zu(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&ws(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function _u(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ru(e,t){if(!bs(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,e]of t.entries())if(zu(e,n))return!e.hasAttribute("data-trigger-disabled");return!1}function Lu(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Uu(e){return xs(e)&&e.matches(Cu)}function Yu(e){return!!e&&"combobox"===e.getAttribute("role")&&Uu(e)}function Fu(e){return e?e.hasAttribute(Tu)?e:e.querySelector(`[${Tu}]`)||e:null}const Wu=/^i(os$|p)/.test(wu)||"macintel"===wu&&bu>1,Bu="android",Qu=wu===Bu||xu.includes(Bu),qu=!Wu&&wu.startsWith("mac"),Gu=(wu.startsWith("win"),!Qu&&/^(linux|chrome os)/.test(wu),qu||Wu),$u=/jsdom|happydom/.test(xu);function Hu(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Vu(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Vu(e,t.id,n)])}function Ku(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){const t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Zu(){return!1}function Xu(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:i="sloppy",referencePress:s=Zu,bubbles:c,externalTree:l}=t,u="rootStore"in e?e.rootStore:e,d=u.useState("open"),f=u.useState("floatingElement"),{dataRef:p}=u.context,h=su(l),m=Bs("function"==typeof o?o:()=>!1),g="function"==typeof o?m:o,y=!1!==g,v=Bs(()=>i),{escapeKey:b,outsidePress:x}={escapeKey:"boolean"==typeof(w=c)?w:w?.escapeKey??!1,outsidePress:"boolean"==typeof w?w:w?.outsidePress??!0};var w;const M=a.useRef(!1),j=a.useRef(!1),O=a.useRef(!1),N=a.useRef(!1),S=a.useRef(""),E=a.useRef(null),k=gu(),D=gu(),I=Bs(()=>{D.clear(),p.current.insideReactTree=!1}),A=Bs(e=>{const t=p.current.floatingContext?.nodeId;return(h?Vu(h.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),T=Bs(e=>Lu(e,u.select("floatingElement"))||Lu(e,u.select("domReferenceElement"))),C=Bs(e=>{s()&&u.setOpen(!1,ju(Ou,e.nativeEvent))}),P=Bs(e=>{if(!d||!n||!r||"Escape"!==e.key)return;if(N.current)return;if(!b&&A("__escapeKeyBubbles"))return;const t=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,o=ju(Du,t);u.setOpen(!1,o),o.isCanceled||e.preventDefault(),b||o.isPropagationAllowed||e.stopPropagation()}),z=Bs(()=>{p.current.insideReactTree=!0,D.start(0,I)}),_=Bs(e=>{if(!d||!n||0!==e.button)return;const t=_u(e.nativeEvent);zu(u.select("floatingElement"),t)&&(M.current||(M.current=!0,j.current=!1))}),R=Bs(e=>{d&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&M.current&&(j.current=!0)});a.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=b,p.current.__outsidePressBubbles=x;const e=new mu,t=new mu;function o(){O.current=!0,t.start(0,()=>{O.current=!1})}function i(){M.current=!1,j.current=!1}function a(){const e=S.current,t="pen"!==e&&e?e:"mouse",n=v(),r="function"==typeof n?n():n;return"string"==typeof r?r:r[t]}function s(e){const t=p.current.floatingContext?.nodeId,n=h&&Vu(h.nodesRef.current,t).some(t=>Lu(e,t.context?.elements.floating));return T(e)||n}function c(e){if(function(e){const t=a();return"intentional"===t&&"click"!==e.type||"sloppy"===t&&"click"===e.type}(e))return"click"===e.type||T(e)||(t.clear(),O.current=!1),void I();if(p.current.insideReactTree)return void I();const n=_u(e),r=`[${Au("inert")}]`,o=bs(n)?n.getRootNode():null,i=Array.from((ws(o)?o:fu(u.select("floatingElement"))).querySelectorAll(r)),c=u.context.triggerElements;if(n&&(c.hasElement(n)||c.hasMatchingElement(e=>zu(e,n))))return;let l=bs(n)?n:null;for(;l&&!As(l);){const e=Ps(l);if(As(e)||!bs(e))break;l=e}if(!i.length||!bs(n)||n.matches("html,body")||zu(n,u.select("floatingElement"))||!i.every(e=>!zu(l,e))){if(xs(n)&&!("touches"in e)){const t=As(n),r=Ts(n),o=/auto|scroll/,i=t||o.test(r.overflowX),a=t||o.test(r.overflowY),s=i&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=a&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l="rtl"===r.direction,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!s(e))return"intentional"===a()&&O.current?(t.clear(),void(O.current=!1)):void(("function"!=typeof g||g(e))&&(A("__outsidePressBubbles")||(u.setOpen(!1,ju(Su,e)),I())))}}function l(e){if("sloppy"!==a()||!u.select("open")||!n||T(e))return;const t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function m(e,t){const n=_u(e);if(!n)return;const r=uu(n,e.type,()=>{t(e),r()})}function w(e){k.clear(),"pointerdown"===e.type&&(S.current=e.pointerType),"mousedown"===e.type&&E.current&&!E.current.dismissOnMouseDown||m(e,e=>{"pointerdown"===e.type?function(e){"sloppy"===a()&&"touch"!==e.pointerType&&u.select("open")&&n&&!T(e)&&c(e)}(e):c(e)})}function D(e){if(!M.current)return;const n=j.current;i(),"intentional"===a()&&("pointercancel"!==e.type?s(e)||(n?o():("function"!=typeof g||g(e))&&(t.clear(),O.current=!0,I())):n&&o())}function C(e){if("sloppy"!==a()||!E.current||T(e))return;const t=e.touches[0];if(!t)return;const n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),o=Math.sqrt(n*n+r*r);o>5&&(E.current.dismissOnTouchEnd=!0),o>10&&(c(e),k.clear(),E.current=null)}function z(e){"sloppy"===a()&&E.current&&!T(e)&&(E.current.dismissOnTouchEnd&&c(e),k.clear(),E.current=null)}const _=fu(f),R=du(r&&du(uu(_,"keydown",P),uu(_,"compositionstart",function(){e.clear(),N.current=!0}),uu(_,"compositionend",function(){e.start(Mu?5:0,()=>{N.current=!1})})),y&&du(uu(_,"click",w,!0),uu(_,"pointerdown",w,!0),uu(_,"pointerup",D,!0),uu(_,"pointercancel",D,!0),uu(_,"mousedown",w,!0),uu(_,"mouseup",D,!0),uu(_,"touchstart",function(e){S.current="touch",m(e,l)},!0),uu(_,"touchmove",function(e){m(e,C)},!0),uu(_,"touchend",function(e){m(e,z)},!0)));return()=>{R(),e.clear(),t.clear(),i(),O.current=!1}},[p,f,r,y,g,d,n,b,x,P,I,v,A,T,h,u,k]),a.useEffect(I,[g,I]);const L=a.useMemo(()=>({onKeyDown:P,onPointerDown:C,onClick:C}),[P,C]),U=a.useMemo(()=>({onKeyDown:P,onPointerDown:R,onMouseDown:R,onClickCapture:z,onMouseDownCapture(e){z(),_(e)},onPointerDownCapture(e){z(),_(e)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[P,z,_,R]);return a.useMemo(()=>n?{reference:L,floating:U,trigger:L}:{},[n,L,U])}const Ju=a.createContext(void 0);function ed(e){const t=a.useContext(Ju);if(void 0===t&&!e)throw new Error(sc(47));return t}const td=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error(sc(1));let s;if(e&&t&&n&&r&&o&&i)s=(a,s,c,l)=>{const u=e(a,s,c,l),d=t(a,s,c,l),f=n(a,s,c,l),p=r(a,s,c,l),h=o(a,s,c,l);return i(u,d,f,p,h,s,c,l)};else if(e&&t&&n&&r&&o)s=(i,a,s,c)=>{const l=e(i,a,s,c),u=t(i,a,s,c),d=n(i,a,s,c),f=r(i,a,s,c);return o(l,u,d,f,a,s,c)};else if(e&&t&&n&&r)s=(o,i,a,s)=>{const c=e(o,i,a,s),l=t(o,i,a,s),u=n(o,i,a,s);return r(c,l,u,i,a,s)};else if(e&&t&&n)s=(r,o,i,a)=>{const s=e(r,o,i,a),c=t(r,o,i,a);return n(s,c,o,i,a)};else if(e&&t)s=(n,r,o,i)=>{const a=e(n,r,o,i);return t(a,r,o,i)};else{if(!e)throw new Error("Missing arguments");s=e}return s};var nd=n(888),rd=n(242);const od=mc(19)?function(e,t,n,r,o){const i=void 0;if(!i)return function(e,t,n,r,o){const i=a.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return(0,nd.useSyncExternalStore)(e.subscribe,i,i)}(e,t,n,r,o);const s=i.syncIndex;let c;return i.syncIndex+=1,i.didInitialize?(c=i.syncHooks[s],c.store===e&&c.selector===t&&Object.is(c.a1,n)&&Object.is(c.a2,r)&&Object.is(c.a3,o)||(c.store!==e&&(i.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=o,c.value=t(e.getSnapshot(),n,r,o))):(c={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o)},i.syncHooks.push(c)),c.value}:function(e,t,n,r,o){return(0,rd.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};function id(e,t,n,r,o){return od(e,t,n,r,o)}var ad;ad={before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,o)||(t=!0,r.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const t of e.syncHooks)n.add(t.store);const r=[];for(const e of n)r.push(e.subscribe(t));return()=>{for(const e of r)e()}}),(0,nd.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}},[].push(ad);class sd{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const t=this.updateTick;for(const n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){const e={...this.state};this.setState(e)}use(e,t,n,r){return id(this,e,t,n,r)}}class cd extends sd{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){a.useDebugValue(e);const n=this;Gs(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){const n=this;Gs(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){const t=this,n=Object.values(e);Gs(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){a.useDebugValue(e);const n=this,r=void 0!==t;Gs(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return a.useDebugValue(e),id(this,this.selectors[e],t,n,r)}useContextCallback(e,t){a.useDebugValue(e);const n=Bs(t??yc);this.context[e]=n}useStateSetter(e){const t=a.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n="function"==typeof e?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{const o=n(e);if(!Object.is(r,o)){const e=r;r=o,t(o,e,this)}})}}const ld={open:td(e=>e.open),transitionStatus:td(e=>e.transitionStatus),domReferenceElement:td(e=>e.domReferenceElement),referenceElement:td(e=>e.positionReference??e.referenceElement),floatingElement:td(e=>e.floatingElement),floatingId:td(e=>e.floatingId)};class ud extends cd{constructor(e){const{syncOnly:t,nested:n,onOpenChange:r,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:nu(),nested:n,triggerElements:o},ld),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||null!=t&&function(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);const n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}class dd{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){const n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){const t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(const t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function fd(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new ud({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new dd,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0}),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:vc,inactiveTriggerProps:vc,popupProps:vc}}function pd(e,t,n=!1){return new ud({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const hd=td(e=>e.triggerIdProp??e.activeTriggerId),md=td(e=>e.openProp??e.open),gd=td(e=>(e.popupElement?.id??e.floatingId)||void 0);function yd(e,t){return void 0!==t&&md(e)&&hd(e)===t}const vd={open:md,mounted:td(e=>e.mounted),transitionStatus:td(e=>e.transitionStatus),floatingRootContext:td(e=>e.floatingRootContext),triggerCount:td(e=>e.triggerCount),preventUnmountingOnClose:td(e=>e.preventUnmountingOnClose),payload:td(e=>e.payload),activeTriggerId:hd,activeTriggerElement:td(e=>e.mounted?e.activeTriggerElement:null),popupId:gd,isTriggerActive:td((e,t)=>void 0!==t&&hd(e)===t),isOpenedByTrigger:td((e,t)=>yd(e,t)),isMountedByTrigger:td((e,t)=>void 0!==t&&hd(e)===t&&e.mounted),triggerProps:td((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:td((e,t)=>function(e,t){return!!yd(e,t)||void 0!==t&&md(e)&&null==hd(e)&&1===e.triggerCount}(e,t)?gd(e):void 0),popupProps:td(e=>e.popupProps),popupElement:td(e=>e.popupElement),positionerElement:td(e=>e.positionerElement)};function bd(e){const t=a.useRef(!0);t.current&&(t.current=!1,e())}const xd=null;globalThis.requestAnimationFrame;const wd=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){const t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Md{static create(){return new Md}static request(e){return wd.request(e)}static cancel(e){return wd.cancel(e)}currentId=xd;request(e){this.cancel(),this.currentId=wd.request(()=>{this.currentId=xd,e()})}cancel=()=>{this.currentId!==xd&&(wd.cancel(this.currentId),this.currentId=xd)};disposeEffect=()=>this.cancel}function jd(){const e=Ys(Md.create).current;return hu(e.disposeEffect),e}function Od(e,t=!1,n=!1){const[r,o]=a.useState(e&&t?"idle":void 0),[i,s]=a.useState(e);return e&&!i&&(s(!0),o("starting")),e||!i||"ending"===r||n||o("ending"),e||i||"ending"!==r||o(void 0),Gs(()=>{if(!e&&i&&"ending"!==r&&n){const e=Md.request(()=>{o("ending")});return()=>{Md.cancel(e)}}},[e,i,r,n]),Gs(()=>{if(!e||t)return;const n=Md.request(()=>{o(void 0)});return()=>{Md.cancel(n)}},[t,e]),Gs(()=>{if(!e||!t)return;e&&i&&"idle"!==r&&o("starting");const n=Md.request(()=>{o("idle")});return()=>{Md.cancel(n)}},[t,e,i,r]),{mounted:i,setMounted:s,transitionStatus:r}}function Nd(e){return null==e?e:"current"in e?e.current:e}let Sd=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const Ed={[Sd.startingStyle]:""},kd={[Sd.endingStyle]:""},Dd={transitionStatus:e=>"starting"===e?Ed:"ending"===e?kd:null};function Id(e,t=!1,n=!0){const r=jd();return Bs((o,a=null)=>{r.cancel();const s=Nd(e);if(null==s)return;const c=s,l=()=>{i.flushSync(o)};if("function"!=typeof c.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{if(t){const e=Sd.startingStyle;if(!c.hasAttribute(e))return void r.request(u);const t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),u())});return t.observe(c,{attributes:!0,attributeFilter:[e]}),void a?.addEventListener("abort",()=>t.disconnect(),{once:!0})}r.request(u)}function u(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||l()}).catch(()=>{if(n)return void(a?.aborted||l());const e=c.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&u()})}})}function Ad(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Bs(o),s=Id(r,n,!1);a.useEffect(()=>{if(!t)return;const e=new AbortController;return s(i,e.signal),()=>{e.abort()}},[t,n,i,s])}const Td={tabIndex:-1,[Tu]:""};function Cd(e){return t=>"touch"!==t||e.current}function Pd(e,t,n=!1){const r=tu(),o=null!=au(),i=a.useRef(null);void 0===e&&null===i.current&&(i.current=t(r,o));const s=e??i.current;return function(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:i,onOpenChange:s}=e,c=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),d=t.context.triggerElements,f=s,p=a.useRef(null);void 0===r&&null===p.current&&(p.current=new ud({open:c,transitionStatus:void 0,referenceElement:l,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:o,syncOnly:!0,nested:i}));const h=r??p.current;t.useSyncedValue("floatingId",o),Gs(()=>{const e={open:c,floatingId:o,referenceElement:l,floatingElement:u};bs(l)&&(e.domReferenceElement=l),h.state.positionReference===h.state.referenceElement&&(e.positionReference=l),h.update(e)},[c,o,l,u,h]),h.context.onOpenChange=f,h.context.nested=i}({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function zd(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const o=n?.id??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}function _d(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");Gs(()=>{if(!r)return void(0!==e.state.triggerCount&&e.set("triggerCount",0));const t=e.context.triggerElements.size,o={};e.state.triggerCount!==t&&(o.triggerCount=t);const i=e.select("activeTriggerId");let a=null;if(i){const t=e.context.triggerElements.getById(i);t?t!==e.state.activeTriggerElement&&(o.activeTriggerElement=t):a=i}if(!a&&!i&&1===t){const t=e.context.triggerElements.entries().next();if(!t.done){const[e,n]=t.value;o.activeTriggerId=e,o.activeTriggerElement=n}}void 0===o.triggerCount&&void 0===o.activeTriggerId&&void 0===o.activeTriggerElement||e.update(o),a&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===a&&!e.context.triggerElements.getById(a)){const t=ju("none");e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,o,n])}function Rd(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=Od(e),a=t.useState("preventUnmountingOnClose"),s=!e&&a;t.useSyncedValues({mounted:r,transitionStatus:i,preventUnmountingOnClose:s});const c=Bs(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ad({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:i}}function Ld(e,t){e.useSyncedValues(t),Gs(()=>()=>{e.update({activeTriggerProps:vc,inactiveTriggerProps:vc,popupProps:vc})},[e])}function Ud(e,t){Gs(()=>{t||null===e.state.openMethod||e.set("openMethod",null)},[t,e]),Gs(()=>()=>{null!==e.state.openMethod&&e.set("openMethod",null)},[e])}const Yd={...vd,disabled:td(e=>e.disabled),instantType:td(e=>e.instantType),openMethod:td(e=>e.openMethod),openChangeReason:td(e=>e.openChangeReason),modal:td(e=>e.modal),focusManagerModal:td(e=>e.focusManagerModal),stickIfOpen:td(e=>e.stickIfOpen),titleElementId:td(e=>e.titleElementId),descriptionElementId:td(e=>e.descriptionElementId),openOnHover:td(e=>e.openOnHover),closeDelay:td(e=>e.closeDelay),hasViewport:td(e=>e.hasViewport)};class Fd extends cd{constructor(e,t,n=!1){const r={...{...fd(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1},...e},o=new dd;r.open&&void 0===e?.mounted&&(r.mounted=!0),r.floatingRootContext=pd(o,t,n),super(r,{popupRef:a.createRef(),backdropRef:a.createRef(),internalBackdropRef:a.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:a.createRef(),beforeContentFocusGuardRef:a.createRef(),stickIfOpenTimeout:new mu,triggerElements:o},Yd)}setOpen=(e,t)=>{const n=t.reason===Nu,r=t.reason===Ou&&0===t.event.detail,o=!e&&(t.reason===Du||null==t.reason),a=function(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}(t),s=this.select("activeTriggerId");if(e||t.reason!==Eu||null!=t.trigger||null==s||(t.trigger=this.context.triggerElements.getById(s)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);const c=()=>{const n={open:e,openChangeReason:t.reason};zd(n,e,t.trigger,a()),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),i.flushSync(c)):c(),r||o?this.set("instantType",r?"click":"dismiss"):t.reason===ku?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){const{store:n,internalStore:r}=Pd(e,(e,n)=>new Fd(t,e,n));return a.useEffect(()=>r?.disposeEffect(),[r]),n}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function Wd({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:s=!1,handle:c,triggerId:l,defaultTriggerId:u=null}=e,d=Fd.useStore(c?.store,{modal:s,open:r,openProp:n,activeTriggerId:u,triggerIdProp:l});!function(e,t,n,r){bd(()=>{void 0===t&&!1===e.state.open&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}(d,n,r,u),d.useControlledProp("openProp",n),d.useControlledProp("triggerIdProp",l);const f=d.useState("open"),p=d.useState("mounted"),h=d.useState("payload"),m=null!=au();d.useContextCallback("onOpenChange",o),d.useContextCallback("onOpenChangeComplete",i),Ud(d,f),_d(d);const{forceUnmount:g}=Rd(f,d,()=>{d.update({stickIfOpen:!0,openChangeReason:null})});d.useSyncedValues({modal:s,nested:m}),a.useEffect(()=>{f||d.context.stickIfOpenTimeout.clear()},[d,f]);const y=a.useCallback(()=>{d.setOpen(!1,ju(Iu))},[d]);a.useImperativeHandle(e.actionsRef,()=>({unmount:g,close:y}),[g,y]);const v=f||p,b=a.useMemo(()=>({store:d}),[d]);return(0,Nl.jsxs)(Ju.Provider,{value:b,children:[v&&(0,Nl.jsx)(Qd,{store:d,modal:s}),"function"==typeof t?t({payload:h}):t]})}function Bd(e){return ed(!0)?(0,Nl.jsx)(Wd,{props:e}):(0,Nl.jsx)(lu,{children:(0,Nl.jsx)(Wd,{props:e})})}function Qd({store:e,modal:t}){const n=Xu(e.useState("floatingRootContext"),{outsidePressEvent:{mouse:"trap-focus"===t?"sloppy":"intentional",touch:"sloppy"}});return Ld(e,{activeTriggerProps:n.reference??vc,inactiveTriggerProps:n.trigger??vc,popupProps:a.useMemo(()=>Vs(Td,n.floating),[n.floating])}),null}let qd=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Sd.startingStyle]="startingStyle",e[e.endingStyle=Sd.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),Gd=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const $d={[Gd.popupOpen]:""},Hd={[Gd.popupOpen]:"",[Gd.pressed]:""},Vd={[qd.open]:""},Kd={[qd.closed]:""},Zd={[qd.anchorHidden]:""},Xd=e=>e?$d:null,Jd=e=>e?Hd:null,ef={open:e=>e?Vd:Kd,anchorHidden:e=>e?Zd:null},tf={style:{transition:"none"}},nf="data-base-ui-click-trigger",rf={fallbackAxisSide:"end"},of={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function af(e){const t=Ys(sf,e).current;return t.next=e,Gs(t.effect),t}function sf(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}class cf{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new mu,this.restTimeout=new mu,this.handleCloseOptions=void 0}static create(){return new cf}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const lf=new WeakMap;function uf(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&lf.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),lf.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function df(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t,i=lf.get(n);i&&i!==e&&uf(i),uf(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,lf.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function ff(e){const t=e.context.dataRef.current,n=Ys(()=>t.hoverInteractionState??cf.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),hu(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function pf(e,t,n){const r=function(e,t){return null==t||Hu(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function hf(e){return"function"==typeof e?e():e}function mf(e,t){return t||"click"===e||"mousedown"===e}const gf={current:null},yf=.1*.1,vf=.5;function bf(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function xf(e,t,n,r,o,i,a,s,c,l){let u=!1;return bf(e,t,n,r,o,i)&&(u=!u),bf(e,t,o,i,a,s)&&(u=!u),bf(e,t,a,s,c,l)&&(u=!u),bf(e,t,c,l,n,r)&&(u=!u),u}function wf(e,t,n,r,o,i){const a=Math.min(n,o),s=Math.max(n,o),c=Math.min(r,i),l=Math.max(r,i);return e>=a&&e<=s&&t>=c&&t<=l}function Mf(e={}){const{blockPointerEvents:t=!1}=e,n=new mu,r=({x:e,y:t,placement:r,elements:o,onClose:i,nodeId:a,tree:s})=>{const c=r?.split("-")[0];let l=!1,u=null,d=null,f="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const p=o.domReference,h=o.floating;if(!p||!h||null==c||null==e||null==t)return;const{clientX:m,clientY:g}=r,y=_u(r),v="mouseleave"===r.type,b=zu(h,y),x=zu(p,y);if(b&&(l=!0,!v))return;if(x&&(l=!1,!v))return void(l=!0);if(v&&bs(r.relatedTarget)&&zu(h,r.relatedTarget))return;function w(){return Boolean(s&&Vu(s.nodesRef.current,a).length>0)}function M(){w()||(n.clear(),i())}if(w())return;const j=p.getBoundingClientRect(),O=h.getBoundingClientRect(),N=e>O.right-O.width/2,S=t>O.bottom-O.height/2,E=O.width>j.width,k=O.height>j.height,D=(E?j:O).left,I=(E?j:O).right,A=(k?j:O).top,T=(k?j:O).bottom;if("top"===c&&t>=j.bottom-1||"bottom"===c&&t<=j.top+1||"left"===c&&e>=j.right-1||"right"===c&&e<=j.left+1)return void M();let C=!1;switch(c){case"top":C=wf(m,g,D,j.top+1,I,O.bottom-1);break;case"bottom":C=wf(m,g,D,O.top+1,I,j.bottom-1);break;case"left":C=wf(m,g,O.right-1,T,j.left+1,A);break;case"right":C=wf(m,g,j.right-1,T,O.left+1,A)}if(C)return;if(l&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(m,g,j))return void M();if(!v&&function(e,t){const n=performance.now(),r=n-f;if(null===u||null===d||0===r)return u=e,d=t,f=n,!1;const o=e-u,i=t-d;return u=e,d=t,f=n,o*o+i*i<r*r*yf}(m,g))return void M();let P=!1;switch(c){case"top":{const n=E?.25:2,r=E||N?e+n:e-n,o=E?e-n:N?e+n:e-n,i=t+vf+1,a=N||E?O.bottom-vf:O.top,s=N?E?O.bottom-vf:O.top:O.bottom-vf;P=xf(m,g,r,i,o,i,O.left,a,O.right,s);break}case"bottom":{const n=E?.25:2,r=E||N?e+n:e-n,o=E?e-n:N?e+n:e-n,i=t-vf,a=N||E?O.top+vf:O.bottom,s=N?E?O.top+vf:O.bottom:O.top+vf;P=xf(m,g,r,i,o,i,O.left,a,O.right,s);break}case"left":{const n=k?.25:2,r=k||S?t+n:t-n,o=k?t-n:S?t+n:t-n,i=e+vf+1,a=S||k?O.right-vf:O.left,s=S?k?O.right-vf:O.left:O.right-vf;P=xf(m,g,a,O.top,s,O.bottom,i,r,i,o);break}case"right":{const n=k?.25:2,r=k||S?t+n:t-n,o=k?t-n:S?t+n:t-n,i=e-vf,a=S||k?O.left+vf:O.right,s=S?k?O.left+vf:O.right:O.left+vf;P=xf(m,g,i,r,i,o,a,O.top,s,O.bottom);break}}P?l||n.start(40,M):M()}};return r.__options={...e,blockPointerEvents:t},r}function jf(e){return tu(e,"base-ui")}const Of=Gu,Nf={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1,position:"fixed",top:0,left:0},Sf=a.forwardRef(function(e,t){const[n,r]=a.useState();Gs(()=>{Of&&Mu&&r("button")},[]);const o={tabIndex:0,role:n};return(0,Nl.jsx)("span",{...e,ref:t,style:Nf,"aria-hidden":!n||void 0,...o,"data-base-ui-focus-guard":""})});function Ef(e,t=(e?Ts(e):null)){return!(!(e&&e.isConnected&&t)||function(e){return"hidden"===e.visibility||"collapse"===e.visibility}(t))&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}function kf(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return ws(n)?n.host:null}function Df(e){for(const t of Array.from(e.children))if("summary"===ms(t))return t;return null}function If(e,t){const n=Df(t);return!!n&&(e===n||zu(n,e))}function Af(e){const t=e?ms(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==t||null!=e.parentElement&&"details"===ms(e.parentElement)&&Df(e.parentElement)===e)&&("details"!==t||null==Df(e))&&("input"!==t||"hidden"!==e.type)}function Tf(e){if(!Af(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=kf(t)){const n=t!==e,r="slot"===ms(t);if(t.hasAttribute("inert"))return!1;if(n&&"details"===ms(t)&&!t.open&&!If(e,t)||t.hasAttribute("hidden")||!r&&!Cf(t,n))return!1}return!0}function Cf(e,t){const n=Ts(e);return t?"none"!==n.display:Ef(e,n)}function Pf(e){const t=e.tabIndex;if(t<0){const t=ms(e);if("details"===t||"audio"===t||"video"===t||xs(e)&&e.isContentEditable)return 0}return t}function zf(e){if("input"!==ms(e))return null;const t=e;return"radio"===t.type&&""!==t.name?t:null}function _f(e){if(xs(e)&&"slot"===ms(e)){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return xs(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Rf(e,t){_f(e).forEach(e=>{Af(e)&&t.push(e),Rf(e,t)})}function Lf(e,t,n){_f(e).forEach(e=>{xs(e)&&e.matches(t)&&n.push(e),Lf(e,t,n)})}function Uf(e){return Tf(e)&&Pf(e)>=0}function Yf(e){const t=[];return Rf(e,t),t.filter(Tf)}function Ff(e){const t=Yf(e);return t.filter(e=>Pf(e)>=0&&function(e,t){const n=zf(e);if(!n)return!0;const r=t.find(e=>{const t=zf(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{const t=zf(e);return t?.name===n.name&&t.form===n.form})===n}(e,t))}function Wf(e,t){const n=Ff(e),r=n.length;if(0===r)return;const o=Pu(fu(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function Bf(e){return Wf(fu(e).body,1)||e}function Qf(e){return Wf(fu(e).body,-1)||e}function qf(e,t){if(!e)return null;const n=Ff(fu(e).body),r=n.length;if(0===r)return null;const o=n.indexOf(e);return-1===o?null:n[(o+t+r)%r]}function Gf(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!zu(n,r)}function $f(e){const t=[];Lf(e,"[data-tabindex]",t),t.forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Hf=a.forwardRef(function(e,t){const{render:n,className:r,style:o,disabled:s=!1,nativeButton:c=!0,handle:l,payload:u,openOnHover:d=!1,delay:f=300,closeDelay:p=0,id:h,...m}=e,g=ed(!0),y=l?.store??g?.store;if(!y)throw new Error(sc(74));const v=jf(h),b=y.useState("isTriggerActive",v),x=y.useState("floatingRootContext"),w=y.useState("isOpenedByTrigger",v),M=y.useState("triggerPopupId",v),j=a.useRef(null),{registerTrigger:O,isMountedByThisTrigger:N}=function(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=function(e,t){const n=a.useRef(null),r=a.useRef(null);return a.useCallback(o=>{if(void 0===e)return;let i=!1;if(null!==n.current){const e=n.current,o=r.current,a=t.context.triggerElements.getById(e);o&&a===o&&(t.context.triggerElements.delete(e),i=!0),n.current=null,r.current=null}if(null!==o&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),i=!0),i){const e=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==e&&t.set("triggerCount",e)}},[t,e])}(e,n),s=Bs(t=>{if(i(t),!t)return;const o=n.select("open"),a=n.select("activeTriggerId");a!==e?null==a&&o&&n.update({activeTriggerId:e,activeTriggerElement:t,...r}):n.update({activeTriggerElement:t,...o?r:null})});return Gs(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:o}}(v,j,y,{payload:u,disabled:s,openOnHover:d,closeDelay:p}),S=y.useState("openChangeReason"),E=y.useState("stickIfOpen"),k=y.useState("openMethod"),D=y.useState("focusManagerModal"),I=function(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:s=!1,restMs:c=0,move:l=!0,triggerElementRef:u=gf,externalTree:d,isActiveTrigger:f=!0,getHandleCloseContext:p,isClosing:h,shouldOpen:m}=t,g="rootStore"in e?e.rootStore:e,{dataRef:y,events:v}=g.context,b=su(d),x=ff(g),w=a.useRef(!1),M=af(o),j=af(r),O=af(c),N=af(n),S=af(m),E=af(h),k=Bs(()=>mf(y.current.openEvent?.type,x.interactedInside)),D=Bs(()=>!1!==S.current?.()),I=Bs((e,t,n)=>{const r=g.context.triggerElements;if(r.hasElement(t))return!e||!zu(e,t);if(!bs(n))return!1;const o=n;return r.hasMatchingElement(e=>zu(e,o))&&(!e||!zu(e,o))}),A=Bs(()=>{x.handler&&(fu(g.select("domReferenceElement")).removeEventListener("mousemove",x.handler),x.handler=void 0)}),T=Bs(()=>{uf(x)});return f&&(x.handleCloseOptions=M.current?.__options),a.useEffect(()=>A,[A]),a.useEffect(()=>{if(n)return v.on("openchange",e),()=>{v.off("openchange",e)};function e(e){e.open?w.current=!1:(w.current=e.reason===Nu,A(),x.openChangeTimeout.clear(),x.restTimeout.clear(),x.blockMouseMove=!0,x.restTimeoutPending=!1)}},[n,v,x,A]),a.useEffect(()=>{if(!n)return;function e(e,t=!0){const n=pf(j.current,"close",x.pointerType);n?x.openChangeTimeout.start(n,()=>{g.setOpen(!1,ju(Nu,e)),b?.events.emit("floating.closed",e)}):t&&(x.openChangeTimeout.clear(),g.setOpen(!1,ju(Nu,e)),b?.events.emit("floating.closed",e))}const t=u.current??(f?g.select("domReferenceElement"):null);if(bs(t))return l?du(uu(t,"mousemove",r,{once:!0}),uu(t,"mouseenter",r),uu(t,"mouseleave",o)):du(uu(t,"mouseenter",r),uu(t,"mouseleave",o));function r(e){if(x.openChangeTimeout.clear(),x.blockMouseMove=!1,s&&!Hu(x.pointerType))return;const t=hf(O.current),n=pf(j.current,"open",x.pointerType),r=_u(e),o=e.currentTarget??null,i=g.select("domReferenceElement");let a=o;if(bs(r)&&!g.context.triggerElements.hasElement(r))for(const e of g.context.triggerElements.elements())if(zu(e,r)){a=e;break}bs(o)&&bs(i)&&!g.context.triggerElements.hasElement(o)&&zu(o,i)&&(a=i);const c=null!=a&&I(i,a,r),l=g.select("open"),u=E.current?.()??"ending"===g.select("transitionStatus"),d=!l&&u&&w.current,f=!c&&bs(a)&&bs(i)&&zu(i,a)&&d,p=t>0&&!n,h=!l||c;c&&(l||d)||f?D()&&g.setOpen(!0,ju(Nu,e,a)):p||(n?x.openChangeTimeout.start(n,()=>{h&&D()&&g.setOpen(!0,ju(Nu,e,a))}):h&&D()&&g.setOpen(!0,ju(Nu,e,a)))}function o(t){if(k())return void T();A();const n=fu(g.select("domReferenceElement"));x.restTimeout.clear(),x.restTimeoutPending=!1;const r=y.current.floatingContext??p?.();if(!Ru(t.relatedTarget,g.context.triggerElements)){if(M.current&&r){g.select("open")||x.openChangeTimeout.clear();const o=u.current;return x.handler=M.current({...r,tree:b,x:t.clientX,y:t.clientY,onClose(){T(),A(),N.current&&!k()&&o===g.select("domReferenceElement")&&e(t,!0)}}),n.addEventListener("mousemove",x.handler),void x.handler(t)}("touch"!==x.pointerType||!zu(g.select("floatingElement"),t.relatedTarget))&&e(t)}}},[A,T,y,j,g,n,M,x,f,I,k,s,l,O,u,b,N,p,E,D]),a.useMemo(()=>{if(n)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,n=e.currentTarget,r=g.select("domReferenceElement"),o=g.select("open"),a=I(r,n,e.target);if(s&&!Hu(x.pointerType))return;if(o&&a&&x.handleCloseOptions?.blockPointerEvents){const e=g.select("floatingElement");if(e){const t=x.handleCloseOptions?.getScope?.()??n.ownerDocument.body;df(x,{scopeElement:t,referenceElement:n,floatingElement:e})}}const c=hf(O.current);function l(){if(x.restTimeoutPending=!1,k())return;const e=g.select("open");x.blockMouseMove||e&&!a||!D()||g.setOpen(!0,ju(Nu,t,n))}o&&!a||0===c||!a&&x.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(x.restTimeout.clear(),"touch"===x.pointerType?i.flushSync(()=>{l()}):a&&o?l():(x.restTimeoutPending=!0,x.restTimeout.start(c,l)))}};function e(e){x.pointerType=e.pointerType}},[n,x,k,I,s,g,O,D])}(x,{enabled:!s&&null!=x&&d&&("touch"!==k||S!==Ou),mouseOnly:!0,move:!1,handleClose:Mf(),restMs:f,delay:{close:p},triggerElementRef:j,isActiveTrigger:b,isClosing:()=>"ending"===y.select("transitionStatus")}),A=function(e,t={}){const{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=Ou}=t,u="rootStore"in e?e.rootStore:e,d=u.context.dataRef,f=a.useRef(void 0),p=jd(),h=gu(),m=a.useMemo(()=>{function e(e,t,n,r){const o=ju(l,t,n);e&&"touch"===r&&c>0?h.start(c,()=>{u.setOpen(!0,o)}):u.setOpen(e,o)}function t(e,t,n){const r=d.current.openEvent,i=u.select("domReferenceElement")!==t;return!((!e||!i)&&e&&o&&(!r||!s||n(r.type)))}return{onPointerDown(e){f.current=e.pointerType},onMouseDown(n){const o=f.current,a=n.nativeEvent,s=u.select("open");if(0!==n.button||"click"===r||Hu(o,!0)&&i)return;const c=t(s,n.currentTarget,e=>"click"===e||"mousedown"===e),l=_u(a);if(Uu(l))return void e(c,a,l,o);const d=n.currentTarget;p.request(()=>{e(c,a,d,o)})},onClick(n){if("mousedown-only"===r)return;const o=f.current;"mousedown"===r&&o?f.current=void 0:Hu(o,!0)&&i||e(t(u.select("open"),n.currentTarget,e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e),n.nativeEvent,n.currentTarget,o)},onKeyDown(){f.current=void 0}}},[d,r,i,l,u,s,o,p,h,c]);return a.useMemo(()=>n?{reference:m}:vc,[n,m])}(x,{enabled:null!=x,stickIfOpen:E}),T=function(e,t){const n=Bs((n,r)=>{("function"==typeof e?e():e)||t(r||(Wu?"touch":""))}),{onClick:r,onPointerDown:o}=function(e){const t=a.useRef(""),n=a.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:a.useCallback(n=>{0!==n.detail?(e(n,"pointerType"in n?n.pointerType:t.current),t.current=""):e(n,"keyboard")},[e]),onPointerDown:n}}(n);return a.useMemo(()=>({onClick:r,onPointerDown:o}),[r,o])}(()=>y.select("open"),e=>{y.set("openMethod",e)}),C=y.useState("triggerProps",N),{getButtonProps:P,buttonRef:z}=lc({disabled:s,native:c}),_={open:e=>e&&S===Ou?Jd(e):Xd(e)},{preFocusGuardRef:R,handlePreFocusGuardFocus:L,handleFocusTargetFocus:U}=function(e,t){const n=a.useRef(null);return{preFocusGuardRef:n,handlePreFocusGuardFocus:function(t){i.flushSync(()=>{e.setOpen(!1,ju(ku,t.nativeEvent,t.currentTarget))});const r=qf(n.current,-1);r?.focus()},handleFocusTargetFocus:function(n){const r=e.select("positionerElement");if(r&&Gf(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{i.flushSync(()=>{e.setOpen(!1,ju(ku,n.nativeEvent,n.currentTarget))});let o=qf(e.context.triggerFocusTargetRef.current||t.current,1);for(;null!==o&&zu(r,o);){const e=o;if(o=Bf(o),o===e)break}o?.focus()}}}}(y,j),Y=bc("button",e,{state:{disabled:s,open:w},ref:[z,t,O,j],props:[A.reference,I,C,T,{[nf]:"",id:v,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":M},m,P],stateAttributesMapping:_});return N&&!D?(0,Nl.jsxs)(a.Fragment,{children:[(0,Nl.jsx)(Sf,{ref:R,onFocus:L}),(0,Nl.jsx)(a.Fragment,{children:Y},v),(0,Nl.jsx)(Sf,{ref:y.context.triggerFocusTargetRef,onFocus:U})]}):(0,Nl.jsx)(a.Fragment,{children:Y},v)}),Vf=a.createContext(null),Kf=()=>a.useContext(Vf),Zf=Au("portal"),Xf=a.forwardRef(function(e,t){const{render:n,className:r,style:o,children:s,container:c,renderGuards:l,...u}=e,{portalNode:d,portalSubtree:f}=function(e={}){const{ref:t,container:n,componentProps:r=vc,elementProps:o}=e,s=tu(),c=Kf(),l=c?.portalNode,[u,d]=a.useState(null),[f,p]=a.useState(null),h=Bs(e=>{null!==e&&p(e)}),m=a.useRef(null);Gs(()=>{if(null===n)return void(m.current&&(m.current=null,p(null),d(null)));if(null==s)return;const e=(n&&(vs(n)?n:n.current))??l??document.body;null!=e?m.current!==e&&(m.current=e,p(null),d(e)):m.current&&(m.current=null,p(null),d(null))},[n,l,s]);const g=bc("div",r,{ref:[t,h],props:[{id:s,[Zf]:""},o]});return{portalNode:f,portalSubtree:u&&g?i.createPortal(g,u):null}}({container:c,ref:t,componentProps:e,elementProps:u}),p=a.useRef(null),h=a.useRef(null),m=a.useRef(null),g=a.useRef(null),[y,v]=a.useState(null),b=a.useRef(!1),x=y?.modal,w=y?.open,M="boolean"==typeof l?l:!!y&&!y.modal&&y.open&&!!d;a.useEffect(()=>{if(d&&!x)return du(uu(d,"focusin",e,!0),uu(d,"focusout",e,!0));function e(e){d&&e.relatedTarget&&Gf(e)&&("focusin"===e.type?b.current&&($f(d),b.current=!1):(function(e){Ff(e).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}(d),b.current=!0))}},[d,x]),Gs(()=>{d&&!0===w&&b.current&&($f(d),b.current=!1)},[w,d]);const j=a.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:h,beforeInsideRef:m,afterInsideRef:g,portalNode:d,setFocusManagerState:v}),[d]);return(0,Nl.jsxs)(a.Fragment,{children:[f,(0,Nl.jsxs)(Vf.Provider,{value:j,children:[M&&d&&(0,Nl.jsx)(Sf,{"data-type":"outside",ref:p,onFocus:e=>{if(Gf(e,d))m.current?.focus();else{const e=Qf(y?y.domReference:null);e?.focus()}}}),M&&d&&(0,Nl.jsx)("span",{"aria-owns":d.id,style:of}),d&&i.createPortal(s,d),M&&d&&(0,Nl.jsx)(Sf,{"data-type":"outside",ref:h,onFocus:e=>{if(Gf(e,d))g.current?.focus();else{const t=Bf(y?y.domReference:null);t?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,ju(ku,e.nativeEvent))}}})]})]})}),Jf=a.createContext(void 0),ep=a.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=ed();return o.useState("mounted")||n?(0,Nl.jsx)(Jf.Provider,{value:n,children:(0,Nl.jsx)(Xf,{ref:t,...r})}):null});function tp(e){return mc(19)?e:e?"true":void 0}const np=a.createContext(void 0),rp=["top","right","bottom","left"],op=Math.min,ip=Math.max,ap=Math.round,sp=Math.floor,cp=e=>({x:e,y:e}),lp={left:"right",right:"left",bottom:"top",top:"bottom"};function up(e,t,n){return ip(e,op(t,n))}function dp(e,t){return"function"==typeof e?e(t):e}function fp(e){return e.split("-")[0]}function pp(e){return e.split("-")[1]}function hp(e){return"x"===e?"y":"x"}function mp(e){return"y"===e?"height":"width"}function gp(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function yp(e){return hp(gp(e))}function vp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const bp=["left","right"],xp=["right","left"],wp=["top","bottom"],Mp=["bottom","top"];function jp(e){const t=fp(e);return lp[t]+e.slice(t.length)}function Op(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Np(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Sp(e,t,n){let{reference:r,floating:o}=e;const i=gp(t),a=yp(t),s=mp(a),c=fp(t),l="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(pp(t)){case"start":p[a]-=f*(n&&l?-1:1);break;case"end":p[a]+=f*(n&&l?-1:1)}return p}async function Ep(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=dp(t,e),h=Op(p),m=s[f?"floating"===d?"reference":"floating":d],g=Np(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=Np(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:c}):y);return{top:(g.top-x.top+h.top)/b.y,bottom:(x.bottom-g.bottom+h.bottom)/b.y,left:(g.left-x.left+h.left)/b.x,right:(x.right-g.right+h.right)/b.x}}function kp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dp(e){return rp.some(t=>e[t]>=0)}const Ip=new Set(["left","top"]);function Ap(e){const t=Ts(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=xs(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ap(n)!==i||ap(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Tp(e){return bs(e)?e:e.contextElement}function Cp(e){const t=Tp(e);if(!xs(t))return cp(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ap(t);let a=(i?ap(n.width):n.width)/r,s=(i?ap(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Pp=cp(0);function zp(e){const t=gs(e);return Is()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Pp}function _p(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Tp(e);let a=cp(1);t&&(r?bs(r)&&(a=Cp(r)):a=Cp(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==gs(e))&&t}(i,n,r)?zp(i):cp(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=gs(i),t=r&&bs(r)?gs(r):r;let n=e,o=Rs(n);for(;o&&r&&t!==n;){const e=Cp(o),t=o.getBoundingClientRect(),r=Ts(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=i,l+=a,n=gs(o),o=Rs(n)}}return Np({width:u,height:d,x:c,y:l})}function Rp(e,t){const n=Cs(e).scrollLeft;return t?t.left+n:_p(ys(e)).left+n}function Lp(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Rp(e,n),y:n.top+t.scrollTop}}function Up(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=gs(e),r=ys(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const e=Is();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}const l=Rp(r);if(l<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else l<=25&&(i+=l);return{width:i,height:a,x:s,y:c}}(e,n);else if("document"===t)r=function(e){const t=ys(e),n=Cs(e),r=e.ownerDocument.body,o=ip(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ip(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Rp(e);const s=-n.scrollTop;return"rtl"===Ts(r).direction&&(a+=ip(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(ys(e));else if(bs(t))r=function(e,t){const n=_p(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=xs(e)?Cp(e):cp(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=zp(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Np(r)}function Yp(e,t){const n=Ps(e);return!(n===t||!bs(n)||As(n))&&("fixed"===Ts(n).position||Yp(n,t))}function Fp(e,t,n){const r=xs(t),o=ys(t),i="fixed"===n,a=_p(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=cp(0);function l(){c.x=Rp(o)}if(r||!r&&!i)if(("body"!==ms(t)||Ms(o))&&(s=Cs(t)),r){const e=_p(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&l();i&&!r&&o&&l();const u=!o||r||i?cp(0):Lp(o,s);return{x:a.left+s.scrollLeft-c.x-u.x,y:a.top+s.scrollTop-c.y-u.y,width:a.width,height:a.height}}function Wp(e){return"static"===Ts(e).position}function Bp(e,t){if(!xs(e)||"fixed"===Ts(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ys(e)===n&&(n=n.ownerDocument.body),n}function Qp(e,t){const n=gs(e);if(Os(e))return n;if(!xs(e)){let t=Ps(e);for(;t&&!As(t);){if(bs(t)&&!Wp(t))return t;t=Ps(t)}return n}let r=Bp(e,t);for(;r&&js(r)&&Wp(r);)r=Bp(r,t);return r&&As(r)&&Wp(r)&&!Ds(r)?n:r||function(e){let t=Ps(e);for(;xs(t)&&!As(t);){if(Ds(t))return t;if(Os(t))return null;t=Ps(t)}return null}(e)||n}const qp={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=ys(r),s=!!t&&Os(t.floating);if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=cp(1);const u=cp(0),d=xs(r);if((d||!d&&!i)&&(("body"!==ms(r)||Ms(a))&&(c=Cs(r)),d)){const e=_p(r);l=Cp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?cp(0):Lp(a,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}},getDocumentElement:ys,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Os(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=_s(e,[],!1).filter(e=>bs(e)&&"body"!==ms(e)),o=null;const i="fixed"===Ts(e).position;let a=i?Ps(e):e;for(;bs(a)&&!As(a);){const t=Ts(a),n=Ds(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ms(a)&&!n&&Yp(e,a))?r=r.filter(e=>e!==a):o=t,a=Ps(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=Up(t,a[0],o);let c=s.top,l=s.right,u=s.bottom,d=s.left;for(let e=1;e<a.length;e++){const n=Up(t,a[e],o);c=ip(n.top,c),l=op(n.right,l),u=op(n.bottom,u),d=ip(n.left,d)}return{width:l-d,height:u-c,x:d,y:c}},getOffsetParent:Qp,getElementRects:async function(e){const t=this.getOffsetParent||Qp,n=this.getDimensions,r=await n(e.floating);return{reference:Fp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ap(e);return{width:t,height:n}},getScale:Cp,isElement:bs,isRTL:function(e){return"rtl"===Ts(e).direction}};function Gp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $p(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,l=Tp(e),u=o||i?[...l?_s(l):[],...t?_s(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=l&&s?function(e,t){let n,r=null;const o=ys(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),i();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;const h={rootMargin:-sp(d)+"px "+-sp(o.clientWidth-(u+f))+"px "+-sp(o.clientHeight-(d+p))+"px "+-sp(u)+"px",threshold:ip(0,op(1,c))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==c){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Gp(l,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(l,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),l&&!c&&h.observe(l),t&&h.observe(t));let m=c?_p(e):null;return c&&function t(){const r=_p(e);m&&!Gp(m,r)&&n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const Hp=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=dp(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=fp(o),v=gp(s),b=fp(s)===s,x=await(null==c.isRTL?void 0:c.isRTL(l.floating)),w=f||(b||!m?[jp(s)]:function(e){const t=jp(e);return[vp(e),t,vp(t)]}(s)),M="none"!==h;!f&&M&&w.push(...function(e,t,n,r){const o=pp(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?xp:bp:t?bp:xp;case"left":case"right":return t?wp:Mp;default:return[]}}(fp(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(vp)))),i}(s,m,h,x));const j=[s,...w],O=await c.detectOverflow(t,g),N=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&N.push(O[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=pp(e),o=yp(e),i=mp(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=jp(a)),[a,jp(a)]}(o,a,x);N.push(O[e[0]],O[e[1]])}if(S=[...S,{placement:o,overflows:N}],!N.every(e=>e<=0)){var E,k;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=j[e];if(t&&("alignment"!==d||v===gp(t)||S.every(e=>gp(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(k=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=S.filter(e=>{if(M){const t=gp(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Vp=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=dp(e,t),u={x:n,y:r},d=gp(o),f=hp(d);let p=u[f],h=u[d];const m=dp(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var y,v;const e="y"===f?"width":"height",t=Ip.has(fp(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}};var Kp="undefined"!=typeof document?a.useLayoutEffect:function(){};function Zp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Zp(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Zp(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Xp(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jp(e,t){const n=Xp(e);return Math.round(t*n)/n}function eh(e){const t=a.useRef(e);return Kp(()=>{t.current=e}),t}function th(e={}){const{nodeId:t,externalTree:n}=e,r=function(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=tu(),i=null!=au(),a=Ys(()=>new ud({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new dd,floatingId:o,syncOnly:!1,nested:i})).current;return Gs(()=>{const e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=bs(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a}(e),o=e.rootContext||r,s=o.useState("referenceElement"),c=o.useState("floatingElement"),l=o.useState("domReferenceElement"),u=o.useState("open"),d=o.useState("floatingId"),[f,p]=a.useState(null),[h,m]=a.useState(void 0),[g,y]=a.useState(void 0),v=a.useRef(null),b=su(n),x=a.useMemo(()=>({reference:s,floating:c,domReference:l}),[s,c,l]),w=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=a.useState(r);Zp(h,r)||m(r);const[g,y]=a.useState(null),[v,b]=a.useState(null),x=a.useCallback(e=>{e!==O.current&&(O.current=e,y(e))},[]),w=a.useCallback(e=>{e!==N.current&&(N.current=e,b(e))},[]),M=s||g,j=c||v,O=a.useRef(null),N=a.useRef(null),S=a.useRef(f),E=null!=u,k=eh(u),D=eh(o),I=eh(d),A=a.useCallback(()=>{if(!O.current||!N.current)return;const e={placement:t,strategy:n,middleware:h};D.current&&(e.platform=D.current),((e,t,n)=>{const r=new Map,o={platform:qp,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Ep},c=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Sp(l,r,c),f=r,p=0;const h={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:g,fn:y}=m,{x:v,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=b?b:d,h[g]={...h[g],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(l=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=Sp(l,f,c))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})})(O.current,N.current,e).then(e=>{const t={...e,isPositioned:!1!==I.current};T.current&&!Zp(S.current,t)&&(S.current=t,i.flushSync(()=>{p(t)}))})},[h,t,n,D,I]);Kp(()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const T=a.useRef(!1);Kp(()=>(T.current=!0,()=>{T.current=!1}),[]),Kp(()=>{if(M&&(O.current=M),j&&(N.current=j),M&&j){if(k.current)return k.current(M,j,A);A()}},[M,j,A,k,E]);const C=a.useMemo(()=>({reference:O,floating:N,setReference:x,setFloating:w}),[x,w]),P=a.useMemo(()=>({reference:M,floating:j}),[M,j]),z=a.useMemo(()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Jp(P.floating,f.x),r=Jp(P.floating,f.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Xp(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,P.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:A,refs:C,elements:P,floatingStyles:z}),[f,A,C,P,z])}({...e,elements:{...x,...f&&{reference:f}}}),M=bs(h)?h:null,j=void 0===g?o.state.floatingElement:g;o.useSyncedValue("referenceElement",h??null),o.useSyncedValue("domReferenceElement",void 0===h?l:M),o.useSyncedValue("floatingElement",j);const O=a.useCallback(e=>{const t=bs(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;p(t),w.refs.setReference(t)},[w.refs]),N=a.useCallback(e=>{(bs(e)||null===e)&&(v.current=e,m(e)),(bs(w.refs.reference.current)||null===w.refs.reference.current||null!==e&&!bs(e))&&w.refs.setReference(e)},[w.refs,m]),S=a.useCallback(e=>{y(e),w.refs.setFloating(e)},[w.refs]),E=a.useMemo(()=>({...w.refs,setReference:N,setFloating:S,setPositionReference:O,domReference:v}),[w.refs,N,S,O]),k=a.useMemo(()=>({...w.elements,domReference:l}),[w.elements,l]),D=a.useMemo(()=>({...w,dataRef:o.context.dataRef,open:u,onOpenChange:o.setOpen,events:o.context.events,floatingId:d,refs:E,elements:k,nodeId:t,rootStore:o}),[w,E,k,t,o,u,d]);return Gs(()=>{l&&(v.current=l)},[l]),Gs(()=>{o.context.dataRef.current.floatingContext=D;const e=b?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),a.useMemo(()=>({...w,context:D,refs:E,elements:k,rootStore:o}),[w,E,k,D,o])}const nh=a.createContext(void 0),rh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d="real"}=dp(e,t)||{};if(null==l)return{};const f=Op(u),p={x:n,y:r},h=yp(o),m=mp(h),g=await a.getDimensions(l),y="y"===h,v=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[h]-p[h]-i.floating[m],M=p[h]-i.reference[h],j="real"===d?await(a.getOffsetParent?.(l)):s.floating;let O=s.floating[x]||i.floating[m];O&&await(a.isElement?.(j))||(O=s.floating[x]||i.floating[m]);const N=w/2-M/2,S=O/2-g[m]/2-1,E=Math.min(f[v],S),k=Math.min(f[b],S),D=E,I=O-g[m]-k,A=O/2-g[m]/2+N,T=up(D,A,I),C=!c.arrow&&null!=pp(o)&&A!==T&&i.reference[m]/2-(A<D?E:k)-g[m]/2<0,P=C?A<D?A-D:A-I:0;return{[h]:p[h]+P,data:{[h]:T,centerOffset:A-T-P,...C&&{alignmentOffset:P}},reset:C}}}),oh=(e=>{const t=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=dp(e,t);switch(o){case"referenceHidden":{const e=kp(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Dp(e)}}}case"escaped":{const e=kp(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Dp(e)}}}default:return{}}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})().fn,ih={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=0===t&&0===n&&0===r&&0===o,a=await oh(e);return{data:{referenceHidden:a.data?.referenceHidden||i}}}},ah={sideX:"left",sideY:"top"},sh={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:s}=e,c=gs(o),l=c.getComputedStyle(o);if("0s"===l.transitionDuration||""===l.transitionDuration)return{x:t,y:n,data:ah};const u=await(i.getOffsetParent?.(o));let d={width:0,height:0};if("fixed"===a&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){const e=fu(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(i.isElement?.(u))&&(d=await i.getDimensions(u));const f=fp(s);let p=t,h=n;return"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height)),{x:p,y:h,data:{sideX:"left"===f?"right":ah.sideX,sideY:"top"===f?"bottom":ah.sideY}}}};function ch(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function lh(e,t,n){const{rects:r,placement:o}=e;return{side:ch(t,fp(o),n),align:pp(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function uh(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:h=!1,floatingRootContext:m,mounted:g,collisionAvoidance:y,shiftCrossAxis:v=!1,nodeId:b,adaptiveOrigin:x,lazyFlip:w=!1,externalTree:M}=e,[j,O]=a.useState(null);g||null===j||O(null);const N=y.side||"flip",S=y.align||"flip",E=y.fallbackAxisSide||"end",k="function"==typeof t?t:void 0,D=Bs(k),I=k?D:t,A=af(t),T=af(g),C=function(){const e=a.useContext(nh);return e?.direction??"ltr"}(),P="rtl"===C,z=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":P?"left":"right","inline-start":P?"right":"left"}[r],_="center"===i?z:`${z}-${i}`;let R=l;const L="bottom"===r?1:0,U="top"===r?1:0,Y="right"===r?1:0,F="left"===r?1:0;"number"==typeof R?R={top:R+L,right:R+F,bottom:R+U,left:R+Y}:R&&(R={top:(R.top||0)+L,right:(R.right||0)+F,bottom:(R.bottom||0)+U,left:(R.left||0)+Y});const W={boundary:"clipping-ancestors"===c?"clippingAncestors":c,padding:R},B=a.useRef(null),Q=af(o),q=af(s),G="function"!=typeof o?o:0,$="function"!=typeof s?s:0,H=[];p&&H.push(p),H.push(((e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=fp(n),s=pp(n),c="y"===gp(n),l=Ip.has(a)?-1:1,u=i&&c?-1:1,d=dp(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=lh(e,r,P),n="function"==typeof Q.current?Q.current(t):Q.current,o="function"==typeof q.current?q.current(t):q.current;return{mainAxis:n,crossAxis:o,alignmentAxis:o}},[G,$,P,r]));const V="none"===S&&"shift"!==N,K=!V&&(u||v||"shift"===N),Z="none"===N?null:(e=>{const t=Hp(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...W,padding:{top:R.top+1,right:R.right+1,bottom:R.bottom+1,left:R.left+1},mainAxis:!v&&"flip"===N,crossAxis:"flip"===S&&"alignment",fallbackAxisSideDirection:E}),X=V?null:((e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=dp(e,t),u={x:n,y:r},d=await i.detectOverflow(t,l),f=gp(fp(o)),p=hp(f);let h=u[p],m=u[f];if(a){const e="y"===p?"bottom":"right";h=up(h+d["y"===p?"top":"left"],h,h-d[e])}if(s){const e="y"===f?"bottom":"right";m=up(m+d["y"===f?"top":"left"],m,m-d[e])}const g=c.fn({...t,[p]:h,[f]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[f]:s}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=fu(e.elements.floating).documentElement;return{...W,rootBoundary:v?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==S,crossAxis:K,limiter:u||v?void 0:(n=e=>{if(!B.current)return{};const{width:t,height:n}=B.current.getBoundingClientRect(),r=gp(fp(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?R.left+R.right:R.top+R.bottom)/2}},{fn:Vp(n).fn,options:[n,void 0]})};var n},[W,u,v,R,S]);var J,ee;"shift"===N||"shift"===S||"center"===i?H.push(X,Z):H.push(Z,X),H.push((e=>{const t=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...l}=dp(e,t),u=await a.detectOverflow(t,l),d=fp(o),f=pp(o),p="y"===gp(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,x=op(m-u[g],v),w=op(h-u[y],b),M=!t.middlewareData.shift;let j=x,O=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(O=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(j=v),M&&!f){const e=ip(u.left,0),t=ip(u.right,0),n=ip(u.top,0),r=ip(u.bottom,0);p?O=h-2*(0!==e||0!==t?e+t:ip(u.left,u.right)):j=m-2*(0!==n||0!==r?n+r:ip(u.top,u.bottom))}await c({...t,availableWidth:O,availableHeight:j});const N=await a.getDimensions(s.floating);return h!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...W,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!T.current)return;const o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);const i=gs(e).devicePixelRatio||1,{x:a,y:s,width:c,height:l}=r.reference,u=(Math.round((a+c)*i)-Math.round(a*i))/i,d=(Math.round((s+l)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${u}px`),o.setProperty("--anchor-height",`${d}px`)}}),(ee=[d],{...rh(J=e=>({element:B.current||fu(e.elements.floating).createElement("div"),padding:d,offsetParent:"floating"})),options:[J,ee]}),{name:"transformOrigin",fn(e){const{elements:t,middlewareData:n,placement:i,rects:a,y:s}=e,c=fp(i),l=gp(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=d+(u?.clientWidth||0)/2,h=f+(u?.clientHeight||0)/2,m=Math.abs(n.shift?.y||0),g=a.reference.height/2,y="function"==typeof o?o(lh(e,r,P)):o,v=m>y,b={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${h}px`,right:`${-y}px ${h}px`}[c],x=`${p}px ${a.reference.y+g-s}px`;return t.floating.style.setProperty("--transform-origin",K&&"y"===l&&v?x:b),{}}},ih,x),Gs(()=>{!g&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,m]);const te=a.useMemo(()=>({elementResize:!f&&"undefined"!=typeof ResizeObserver,layoutShift:!f&&"undefined"!=typeof IntersectionObserver}),[f]),{refs:ne,elements:re,x:oe,y:ie,middlewareData:ae,update:se,placement:ce,context:le,isPositioned:ue,floatingStyles:de}=th({rootContext:m,open:h?g:void 0,placement:_,middleware:H,strategy:n,whileElementsMounted:h?void 0:(...e)=>$p(...e,te),nodeId:b,externalTree:M}),{sideX:fe,sideY:pe}=ae.adaptiveOrigin||ah,he=ue?n:"fixed",me=a.useMemo(()=>{const e=x?{position:he,[fe]:oe,[pe]:ie}:{position:he,...de};return ue||(e.opacity=0),e},[x,he,fe,oe,pe,ie,de,ue]),ge=a.useRef(null);Gs(()=>{if(!g)return;const e=A.current,t="function"==typeof e?e():e,n=(dh(t)?t.current:t)||null;n!==ge.current&&(ne.setPositionReference(n),ge.current=n)},[g,ne,I,A]),a.useEffect(()=>{if(!g)return;const e=A.current;"function"!=typeof e&&dh(e)&&e.current!==ge.current&&(ne.setPositionReference(e.current),ge.current=e.current)},[g,ne,I,A]),a.useEffect(()=>{if(h&&g&&re.reference&&re.floating)return $p(re.reference,re.floating,se,te)},[h,g,re,se,te]);const ye=fp(ce),ve=ch(r,ye,P),be=pp(ce)||"center",xe=Boolean(ae.hide?.referenceHidden);Gs(()=>{w&&g&&ue&&O(ye)},[w,g,ue,ye]);const we=a.useMemo(()=>({position:"absolute",top:ae.arrow?.y,left:ae.arrow?.x}),[ae.arrow]),Me=0!==ae.arrow?.centerOffset;return a.useMemo(()=>({positionerStyles:me,arrowStyles:we,arrowRef:B,arrowUncentered:Me,side:ve,align:be,physicalSide:ye,anchorHidden:xe,refs:ne,context:le,isPositioned:ue,update:se}),[me,we,B,Me,ve,be,ye,xe,ne,le,ue,se])}function dh(e){return null!=e&&"current"in e}const fh=a.forwardRef(function(e,t){const{cutout:n,...r}=e;let o;if(n){const e=n.getBoundingClientRect();o=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Nl.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});function ph(e){return"starting"===e?tf:vc}let hh={},mh={},gh="";const yh=new class{lockCount=0;restore=null;timeoutLock=mu.create();timeoutUnlock=mu.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(0===this.lockCount||null!==this.restore)return;const t=fu(e).documentElement,n=gs(t).getComputedStyle(t).overflowY;if("hidden"===n||"clip"===n)return void(this.restore=yc);const r=Wu||!function(e){if("undefined"==typeof document)return!1;const t=fu(e);return gs(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=r?function(e){const t=fu(e),n=t.documentElement,r=t.body,o=Ms(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}(e):function(e){const t=fu(e),n=t.documentElement,r=t.body,o=gs(n);let i=0,a=0,s=!1;const c=Md.create();if(Mu&&1!==(o.visualViewport?.scale??1))return()=>{};function l(){const t=o.getComputedStyle(n),c=o.getComputedStyle(r),l=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,hh={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},gh=n.style.scrollBehavior,mh={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===c.overflowY,p="scroll"===t.overflowX||"scroll"===c.overflowX,h=Math.max(0,o.innerWidth-r.clientWidth),m=Math.max(0,o.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),y=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Ms(n)?n:r;if(s=function(e){if("undefined"==typeof CSS||!CSS.supports||!CSS.supports("scrollbar-gutter","stable")||"undefined"==typeof document)return!1;const t=fu(e),n=t.documentElement,r=t.body,o=Ms(n)?n:r,i=o.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const s=o.offsetWidth;o.style.overflowY="hidden";const c=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=a,s===c}(e),s)return n.style.scrollbarGutter=l,v.style.overflowY="hidden",void(v.style.overflowX="hidden");Object.assign(n.style,{scrollbarGutter:l,overflowY:"hidden",overflowX:"hidden"}),(u||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:g||m?`calc(100dvh - ${g+m}px)`:"100dvh",width:y||h?`calc(100vw - ${y+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,hh),Object.assign(r.style,mh),s||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=gh)}l();const d=uu(o,"resize",function(){u(),c.request(l)});return()=>{c.cancel(),u(),"function"==typeof o.removeEventListener&&d()}}(e)}};function vh(e=!0,t=null){Gs(()=>{if(e)return yh.acquire(t)},[e,t])}const bh=a.forwardRef(function(e,t){const{render:n,className:r,style:o,anchor:i,positionMethod:s="absolute",side:c="bottom",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:y=rf,...v}=e,{store:b}=ed(),x=function(){const e=a.useContext(Jf);if(void 0===e)throw new Error(sc(45));return e}(),w=function(){const e=tu(),t=su(void 0),n=au();return Gs(()=>{if(!e)return;const r={id:e,parentId:n};return t?.addNode(r),()=>{t?.removeNode(r)}},[t,e,n]),e}(),M=b.useState("floatingRootContext"),j=b.useState("mounted"),O=b.useState("open"),N=b.useState("openChangeReason"),S=b.useState("activeTriggerElement"),E=b.useState("modal"),k=b.useState("openMethod"),D=b.useState("positionerElement"),I=b.useState("instantType"),A=b.useState("transitionStatus"),T=b.useState("hasViewport"),C=a.useRef(null),P=Id(D,!1,!1),z=uh({anchor:i,floatingRootContext:M,positionMethod:s,mounted:j,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:m,disableAnchorTracking:g,keepMounted:x,nodeId:w,collisionAvoidance:y,adaptiveOrigin:T?sh:void 0}),_=M.useState("domReferenceElement");Gs(()=>{const e=_,t=C.current;if(e&&(C.current=e),t&&e&&e!==t){b.set("instantType",void 0);const e=new AbortController;return P(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[_,P,b]),function(e,t,n,r){const[o,i]=a.useState(!1);Gs(()=>{if(!e||!t||null==n)return void i(!1);const r=fu(n).documentElement.clientWidth,o=n.offsetWidth;i(r>0&&o>0&&o>=r-20)},[e,t,n]),vh(e&&(!t||o),r)}(O&&!0===E&&N!==Nu,"touch"===k,D,S);const R=a.useCallback(e=>{b.set("positionerElement",e)},[b]),L=function(e,t,{styles:n,transitionStatus:r,props:o,refs:i,hidden:a,inert:s=!1}){const c={...n};return s&&(c.pointerEvents="none"),bc("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:a,style:c},ph(r),o],stateAttributesMapping:ef})}(e,{open:O,side:z.side,align:z.align,anchorHidden:z.anchorHidden,instant:I},{styles:z.positionerStyles,transitionStatus:A,props:v,refs:[t,R],hidden:!j,inert:!O});return(0,Nl.jsxs)(np.Provider,{value:z,children:[j&&!0===E&&N!==Nu&&(0,Nl.jsx)(fh,{ref:b.context.internalBackdropRef,inert:tp(!O),cutout:S}),(0,Nl.jsx)(cu,{id:w,children:L})]})});let xh=0;function wh(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;function i(){o&&!o()||e?.focus({preventScroll:n})}if(cancelAnimationFrame(xh),r)return i(),yc;const a=requestAnimationFrame(i);return xh=a,()=>{xh===a&&(cancelAnimationFrame(a),xh=0)}}const Mh={inert:new WeakMap,"aria-hidden":new WeakMap},jh="data-base-ui-inert",Oh={inert:new WeakSet,"aria-hidden":new WeakSet};let Nh=new WeakMap,Sh=0;function Eh(e){return e?ws(e)?e.host:Eh(e.parentNode):null}const kh=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=Eh(t);return e.contains(n)?n:null}).filter(e=>null!=e),Dh=e=>{const t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Ih=(e,t,n)=>{const r=[],o=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{"script"!==ms(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function Ah(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t;return function(e,t,n,r,{mark:o=!0}){let i=null;r?i="inert":n&&(i="aria-hidden");let a=null,s=null;const c=kh(t,e),l=o?Ih(t,Dh(c),new Set(c)):[],u=[],d=[];if(i){const e=Mh[i],n=function(e){return Oh[e]}(i);s=n,a=e;const r=kh(t,Array.from(t.querySelectorAll("[aria-live]"))),o=c.concat(r);Ih(t,Dh(o),new Set(o)).forEach(t=>{const r=t.getAttribute(i),o=null!==r&&"false"!==r,a=(e.get(t)||0)+1;e.set(t,a),u.push(t),1===a&&o&&n.add(t),o||t.setAttribute(i,"inert"===i?"":"true")})}return o&&l.forEach(e=>{const t=(Nh.get(e)||0)+1;Nh.set(e,t),d.push(e),1===t&&e.setAttribute(jh,"")}),Sh+=1,()=>{a&&u.forEach(e=>{const t=(a.get(e)||0)-1;a.set(e,t),t||(!s?.has(e)&&i&&e.removeAttribute(i),s?.delete(e))}),o&&d.forEach(e=>{const t=(Nh.get(e)||0)-1;Nh.set(e,t),t||e.removeAttribute(jh)}),Sh-=1,Sh||(Mh.inert=new WeakMap,Mh["aria-hidden"]=new WeakMap,Oh.inert=new WeakSet,Oh["aria-hidden"]=new WeakSet,Nh=new WeakMap)}}(e,fu(e[0]).body,n,r,{mark:o})}let Th=[];function Ch(){Th=Th.filter(e=>e.deref()?.isConnected)}function Ph(e){Ch(),e&&"body"!==ms(e)&&(Th.push(new WeakRef(e)),Th.length>20&&(Th=Th.slice(-20)))}function zh(){return Ch(),Th[Th.length-1]?.deref()}function _h(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex"))return;if(!e.getAttribute("role")?.includes("dialog"))return;const t=Yf(e).filter(e=>{const t=e.getAttribute("data-tabindex")||"";return Uf(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),n=e.getAttribute("tabindex");0===t.length?"0"!==n&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):("-1"!==n||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Rh(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:h,getInsideElements:m}=e,g="rootStore"in t?t.rootStore:t,y=g.useState("open"),v=g.useState("domReferenceElement"),b=g.useState("floatingElement"),{events:x,dataRef:w}=g.context,M=Bs(()=>w.current.floatingContext?.nodeId),j=!1===o,O=Yu(v)&&j,N=af(o),S=af(i),E=af(u),k=af(y),D=su(h),I=Kf(),A=a.useRef(!1),T=a.useRef(!1),C=a.useRef(!1),P=a.useRef(null),z=a.useRef(""),_=a.useRef(""),R=a.useRef(null),L=a.useRef(null),U=dc(R,p,I?.beforeInsideRef),Y=dc(L,I?.afterInsideRef),F=gu(),W=gu(),B=jd(),Q=null!=I,q=Fu(b),G=Bs((e=q)=>e?Ff(e):[]),$=Bs(()=>m?.().filter(e=>null!=e)??[]);a.useEffect(()=>{if(!r&&c)return uu(fu(q),"keydown",function(e){"Tab"===e.key&&zu(q,Pu(fu(q)))&&0===G().length&&!O&&function(e){e.preventDefault(),e.stopPropagation()}(e)})},[r,q,c,O,G]),a.useEffect(()=>{if(r||!y)return;const e=fu(q);function t(){C.current=!1}return du(uu(e,"pointerdown",function(e){const t=_u(e),n=$(),r=zu(b,t)||zu(v,t)||zu(I?.portalNode,t)||n.some(e=>e===t||zu(e,t));C.current=!r,_.current=e.pointerType||"keyboard",t?.closest(`[${nf}]`)&&(T.current=!0,W.start(0,()=>{T.current=!1}))},!0),uu(e,"pointerup",t,!0),uu(e,"pointercancel",t,!0),uu(e,"keydown",function(){_.current="keyboard"},!0),t)},[r,b,v,q,y,I,W,$]),a.useEffect(()=>{if(r||!l)return;const e=fu(q);function t(t){const n=t.relatedTarget,r=t.currentTarget,o=_u(t);c&&null==n&&null!=o&&zu(b,o)&&Ph(o),queueMicrotask(()=>{const i=M(),a=g.context.triggerElements,l=$(),u=n?.hasAttribute(Au("focus-guard"))&&[R.current,L.current,I?.beforeInsideRef.current,I?.afterInsideRef.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,Nd(f),Nd(d)].includes(n),p=!(zu(v,n)||zu(b,n)||zu(n,b)||zu(I?.portalNode,n)||l.some(e=>e===n||zu(e,n))||null!=n&&a.hasElement(n)||a.hasMatchingElement(e=>zu(e,n))||u||D&&(Vu(D.nodesRef.current,i).find(e=>zu(e.context?.elements.floating,n)||zu(e.context?.elements.domReference,n))||Ku(D.nodesRef.current,i).find(e=>[e.context?.elements.floating,Fu(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===v&&q&&_h(q),s&&r!==v&&!Ef(o)&&Pu(e)===e.body){if(xs(q)&&(q.focus(),"popup"===s))return void B.request(()=>{q.focus()});const e=G(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||q;xs(n)&&n.focus()}w.current.insideReactTree?w.current.insideReactTree=!1:!O&&c||!n||!p||T.current||!O&&n===zh()||(A.current=!0,g.setOpen(!1,ju(ku,t)))})}const n=xs(v)?v:null;return b||n?du(n&&uu(n,"focusout",t),n&&uu(n,"pointerdown",function(){T.current=!0,W.start(0,()=>{T.current=!1})}),b&&uu(b,"focusin",function(e){const t=_u(e);Uf(t)&&(P.current=t)}),b&&uu(b,"focusout",t),b&&I&&uu(b,"focusout",function(){C.current||(w.current.insideReactTree=!0,F.start(0,()=>{w.current.insideReactTree=!1}))},!0)):void 0},[r,v,b,q,c,D,I,g,l,s,G,O,M,w,F,W,B,d,f,$]),a.useEffect(()=>{if(r||!b||!y)return;const e=Array.from(I?.portalNode?.querySelectorAll(`[${Au("portal")}]`)||[]),t=D?Ku(D.nodesRef.current,M()):[],n=t.find(e=>Yu(e.context?.elements.domReference||null))?.context?.elements.domReference,o=Ah([b,...e,R.current,L.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,...$(),n,Nd(f),Nd(d),O?v:null].filter(e=>null!=e),{ariaHidden:c||O,mark:!1}),i=Ah([b,...e].filter(e=>null!=e));return()=>{i(),o()}},[y,r,v,b,c,I,O,D,M,d,f,$]),Gs(()=>{if(!y||r||!xs(q))return;const e=fu(q),t=Pu(e);queueMicrotask(()=>{const n=N.current,r="function"==typeof n?n(E.current||""):n;if(void 0===r||!1===r)return;if(zu(q,t))return;let o=null;const i=()=>(null==o&&(o=G(q)),o[0]||q);let a;a=!0===r||null===r?i():Nd(r),a=a||i();const s=zu(q,Pu(e));wh(a,{preventScroll:a===q,shouldFocus(){if(!k.current)return!1;if(s)return!0;const t=Pu(e);return!(t!==a&&zu(q,t))}})})},[r,y,q,G,N,E,k]),Gs(()=>{if(r||!q)return;const e=fu(q),t=Pu(e),n=null==E.current;function o(e){var t;if(e.open||(z.current=function(e,t){const n=gs(_u(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,_.current)),e.reason===Nu&&"mouseleave"===e.nativeEvent.type&&(A.current=!0),e.reason===Su)if(e.nested)A.current=!1;else if(""===(t=e.nativeEvent).pointerType&&t.isTrusted||(Qu&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)||function(e){return!$u&&(!Qu&&0===e.width&&0===e.height||Qu&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}(e.nativeEvent))A.current=!1;else{let e=!1;fu(q).createElement("div").focus({get preventScroll(){return e=!0,!1}}),A.current=!e}}return Ph(t),x.on("openchange",o),()=>{x.off("openchange",o);const r=Pu(e),i=$(),a=zu(b,r)||i.some(e=>e===r||zu(e,r))||D&&Vu(D.nodesRef.current,M(),!1).some(e=>zu(e.context?.elements.floating,r)),s=S.current,c=function(){const e=S.current;let r="function"==typeof e?e(z.current):e;if(void 0===r||!1===r)return null;null===r&&(r=!0);const o=v?.isConnected?v:null,i=t?.isConnected&&"body"!==ms(t)?t:null;let a=n?i||o:o||i;return a||(a=zh()||null),"boolean"==typeof r?a:Nd(r)||a||null}();queueMicrotask(()=>{const t=(n=c)?Uf(n)?n:Ff(n)[0]||n:null;var n;const o="boolean"!=typeof s;s&&!A.current&&xs(t)&&(o||t===r||r===e.body||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,b,q,S,E,x,D,v,M,$]),Gs(()=>{if(!Mu||y||!b)return;const e=Pu(fu(b));xs(e)&&Uu(e)&&zu(b,e)&&e.blur()},[y,b]),Gs(()=>{if(!r&&I)return I.setFocusManagerState({modal:c,closeOnFocusOut:l,open:y,onOpenChange:g.setOpen,domReference:v}),()=>{I.setFocusManagerState(null)}},[r,I,c,y,g,l,v]),Gs(()=>{if(!r&&q)return _h(q),()=>{queueMicrotask(Ch)}},[r,q]);const H=!r&&(!c||!O)&&(Q||c);return(0,Nl.jsxs)(a.Fragment,{children:[H&&(0,Nl.jsx)(Sf,{"data-type":"inside",ref:U,onFocus:e=>{if(c){const e=G();wh(e[e.length-1])}else if(I?.portalNode)if(A.current=!1,Gf(e,I.portalNode)){const e=Bf(v);e?.focus()}else Nd(f??I.beforeOutsideRef)?.focus()}}),n,H&&(0,Nl.jsx)(Sf,{"data-type":"inside",ref:Y,onFocus:e=>{if(c)wh(G()[0]);else if(I?.portalNode)if(l&&(A.current=!0),Gf(e,I.portalNode)){const e=Qf(v);e?.focus()}else Nd(d??I.afterOutsideRef)?.focus()}})]})}const Lh="ArrowUp",Uh="ArrowDown",Yh="ArrowLeft",Fh="ArrowRight",Wh="Home",Bh="End",Qh=new Set([Yh,Fh]),qh=(new Set([Yh,Fh,Wh,Bh]),new Set([Lh,Uh])),Gh=(new Set([Lh,Uh,Wh,Bh]),new Set([...Qh,...qh])),$h=new Set([...Gh,Wh,Bh]);new Set(["Shift","Control","Alt","Meta"]);const Hh=a.createContext(void 0),Vh=a.createContext(void 0);function Kh(e){const{value:t,children:n}=e;return(0,Nl.jsx)(Vh.Provider,{value:t,children:n})}const Zh={...ef,...Dd},Xh=a.forwardRef(function(e,t){const{render:n,className:r,style:o,initialFocus:i,finalFocus:s,...c}=e,{store:l}=ed(),u=function(){const e=a.useContext(np);if(!e)throw new Error(sc(46));return e}(),d=null!=function(){const e=a.useContext(Hh);return e}(),{context:f,hasClosePart:p}=function(){const[e,t]=a.useState(0),n=Bs(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:a.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),h=l.useState("open"),m=l.useState("openMethod"),g=l.useState("instantType"),y=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("titleElementId"),x=l.useState("descriptionElementId"),w=l.useState("modal"),M=l.useState("mounted"),j=l.useState("openChangeReason"),O=l.useState("activeTriggerElement"),N=l.useState("floatingRootContext"),S=N.useState("floatingId"),E=l.useState("disabled"),k=l.useState("openOnHover"),D=l.useState("closeDelay"),I=c.id??S;Ad({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}}),function(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:o}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("open"),c=i.useState("floatingElement"),l=i.useState("domReferenceElement"),{dataRef:u}=i.context,d=su(),f=au(),p=ff(i),h=gu(),m=Bs(()=>mf(u.current.openEvent?.type,p.interactedInside)),g=Bs(()=>{return e=u.current.openEvent?.type,e?.includes("mouse")&&"mousedown"!==e;var e}),y=Bs(()=>{uf(p)});Gs(()=>{s||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,y())},[s,p,y]),a.useEffect(()=>y,[y]),Gs(()=>{if(n&&s&&p.handleCloseOptions?.blockPointerEvents&&g()&&bs(l)&&c){const e=l,t=c,n=fu(c),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;r&&(r.style.pointerEvents="");const o=p.pointerEventsScopeElement!==t?p.pointerEventsScopeElement:null,i=r!==t?r:null,a=p.handleCloseOptions?.getScope?.()??o??i??e.closest("[data-rootownerid]")??n.body;return df(p,{scopeElement:a,referenceElement:e,floatingElement:t}),()=>{y()}}},[n,s,l,c,p,g,d,f,y]),a.useEffect(()=>{if(!n)return;function e(){return!!(d&&f&&Vu(d.nodesRef.current,f).length>0)}function t(n){d&&f&&!e()&&h.start(0,()=>{d.events.off("floating.closed",t),i.setOpen(!1,ju(Nu,n)),d.events.emit("floating.closed",n)})}const a=c;return du(a&&uu(a,"mouseenter",function(){p.openChangeTimeout.clear(),h.clear(),d?.events.off("floating.closed",t),y()}),a&&uu(a,"mouseleave",function(n){if(e()&&d)return void d.events.on("floating.closed",t);if(Ru(n.relatedTarget,i.context.triggerElements))return;const a=u.current.floatingContext?.nodeId??o,s=n.relatedTarget;d&&a&&bs(s)&&Vu(d.nodesRef.current,a,!1).some(e=>zu(e.context?.elements.floating,s))||(p.handler?p.handler(n):(y(),g()&&!m()&&function(e){const t=pf(r,"close",p.pointerType),n=()=>{i.setOpen(!1,ju(Nu,e)),d?.events.emit("floating.closed",e)};t?p.openChangeTimeout.start(t,n):(p.openChangeTimeout.clear(),n())}(n)))}),a&&uu(a,"pointerdown",function(e){const t=_u(e);var n;n=t,null!=n?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Cu}`)?p.interactedInside=null!=t?.closest("[aria-haspopup]"):p.interactedInside=!1},!0),()=>{d?.events.off("floating.closed",t)})},[n,c,i,u,r,o,g,m,y,p,d,f,h])}(N,{enabled:k&&!E,closeDelay:D});const A=void 0===i?Cd(l.context.popupRef):i,T=!1!==w&&p;l.useSyncedValue("focusManagerModal",T);const C=a.useCallback(e=>{l.set("popupElement",e)},[l]),P=bc("div",e,{state:{open:h,side:u.side,align:u.align,instant:g,transitionStatus:y},ref:[t,l.context.popupRef,C],props:[v,{id:I,role:"dialog",...Td,"aria-labelledby":b,"aria-describedby":x,onKeyDown(e){d&&$h.has(e.key)&&e.stopPropagation()}},ph(y),c],stateAttributesMapping:Zh});return(0,Nl.jsx)(Rh,{context:N,openInteractionType:m,modal:T,disabled:!M||j===Nu,initialFocus:A,returnFocus:s,restoreFocus:"popup",previousFocusableElement:xs(O)?O:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,Nl.jsx)(Kh,{value:f,children:P})})}),Jh=_l("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),em=_l("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),tm={...ga,labels:{labelDayButton:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>ns(e,t,{locale:ga,...n});let i=o(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>ns(e,n,{locale:ga,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>ns(e,t,{locale:ga,...n});let i=o(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>ns(e,n,{locale:ga,...t}),r(e,"cccc")}}};Symbol.for("constructDateFrom");const nm={},rm={};function om(e,t){try{const n=(nm[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in rm?rm[n]:am(n,n.split(":"))}catch{if(e in rm)return rm[e];const t=e?.match(im);return t?am(e,t.slice(1)):NaN}}const im=/([+-]\d\d):?(\d\d)?/;function am(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return rm[e]=60*n+r>0?60*n+r+o:60*n-r-o}class sm extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(om(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),um(this,e)):this.setTime(Date.now())}static tz(e,...t){return t.length?new sm(...t,e):new sm(Date.now(),e)}withTimeZone(e){return new sm(+this,e)}getTimezoneOffset(){const e=-om(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),lm(this),+this}[Symbol.for("constructDateFrom")](e){return new sm(+new Date(e),this.timeZone)}}const cm=/^(get|set)(?!UTC)/;function lm(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-om(e.timeZone,e)))}function um(e,t){const n=Array.isArray(t)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(t):+e.internal,r=om(e.timeZone,e),o=r>0?Math.floor(r):Math.ceil(r),i=new Date(+e);i.setUTCHours(i.getUTCHours()-1);const a=-new Date(+e).getTimezoneOffset(),s=-new Date(+i).getTimezoneOffset();let c=a;if(a-s&&a!==o&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){const t=new Date(+e),n=a-o;n&&t.setUTCMinutes(t.getUTCMinutes()+n);const r=om(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===o&&(c=s)}const l=c-o;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const u=new Date(+e);u.setUTCSeconds(0);const d=a>0?u.getSeconds():(u.getSeconds()-60)%60,f=Math.round(-60*om(e.timeZone,e))%60;(f||d)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+d);const p=om(e.timeZone,e),h=p>0?Math.floor(p):Math.ceil(p),m=h!==o,g=-new Date(+e).getTimezoneOffset()-h-l,y=h-o,v=n-60*h*1e3,b=y>0&&dm(e)-n===60*y*1e3&&dm(e,v)!==n;if(m&&g&&!b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);const t=om(e.timeZone,e),n=h-(t>0?Math.floor(t):Math.ceil(t));n&&g<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}lm(e);const x=(t?n:n+1e3*f)-+e.internal;x&&Math.abs(x)<18e5&&(Date.prototype.setTime.call(e,+e+x),lm(e))}function dm(e,t){const n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(60*-om(e.timeZone,n))),+n}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!cm.test(e))return;const t=e.replace(cm,"$1UTC");sm.prototype[t]&&(e.startsWith("get")?sm.prototype[e]=function(){return this.internal[t]()}:(sm.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),um(e)}(this),+this},sm.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),lm(this),+this}))});class fm extends sm{static tz(e,...t){return t.length?new fm(...t,e):new fm(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new fm(+this,e)}[Symbol.for("constructDateFrom")](e){return new fm(+new Date(e),this.timeZone)}}function pm(e,t,n){const r=Ma(e,n?.in);if(isNaN(t))return wa(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=wa(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function hm(e,t,n){return pm(e,12*t,n)}function mm(e,t,n){const[r,o]=Oa(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function gm(e,t){const[n,r]=Oa(e,t.start,t.end);return{start:n,end:r}}function ym(e,t){const n=va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ma(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function vm(e,t){return+Ma(e)>+Ma(t)}function bm(e,t){return+Ma(e)<+Ma(t)}function xm(e,t,n){const r=Ma(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=wa(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e,t){const n=Ma(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=wa(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r}function wm(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class Mm{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?fm.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new fm(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):os(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):pm(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return os(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):hm(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Sa(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):mm(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e,t){const{start:n,end:r}=gm(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);const c=[];for(;+a<=i;)c.push(wa(n,a)),a.setMonth(a.getMonth()+s);return o?c.reverse():c}(e),this.eachYearOfInterval=e=>{const t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):function(e,t){const{start:n,end:r}=gm(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);const c=[];for(;+a<=i;)c.push(wa(n,a)),a.setFullYear(a.getFullYear()+s);return o?c.reverse():c}(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;const r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):function(e,t){const n=wm(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),i=t.addDays(o,34);return t.getMonth(e)===t.getMonth(i)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return ym(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=Ma(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):ym(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=Ma(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t,n)=>{const r=this.overrides?.format?this.overrides.format(e,t,this.options):ns(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):Aa(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return Ma(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return Ma(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):Ca(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):vm(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):bm(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Va(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t,n){const[r,o]=Oa(n?.in,e,t);return+Na(r)===+Na(o)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t,n){const[r,o]=Oa(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t,n){const[r,o]=Oa(n?.in,e,t);return r.getFullYear()===o.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=wa.bind(null,e));const t=Ma(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),wa(r,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=wa.bind(null,e));const t=Ma(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),wa(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):xm(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=Ma(e,n?.in);return isNaN(+r)?wa(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):wm(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Na(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):Da(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=Ma(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):ka(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Ea(e),this.options={locale:tm,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){const e=this.options.locale?.code;return e&&Mm.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,o=t?.code;if(o&&Mm.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:n,numberingSystem:r}).format(e)}catch{}const i="year-first"===this.getMonthYearOrder()?"y LLLL":"LLLL y";return this.format(e,i)}}Mm.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const jm=new Mm;var Om,Nm,Sm,Em;function km(e,t,n=!1,r=jm){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?s(i,t):!(n||!o)&&s(o,t)}function Dm(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Im(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Am(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Tm(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function Cm(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Pm(e,t){return Array.isArray(e)&&e.every(t.isDate)}function zm(e,t,n=jm){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(Pm(t,n))return t.some(t=>o(e,t));if(Im(t))return km(t,e,!1,n);if(Cm(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Dm(t)){const n=i(t.before,e)>0,r=i(t.after,e)<0;return a(t.before,t.after)?r&&n:n||r}return Am(t)?i(e,t.after)>0:Tm(t)?i(t.before,e)>0:"function"==typeof t&&t(e)})}function _m(e){return a.createElement("button",{...e})}function Rm(e){return a.createElement("span",{...e})}function Lm(e){const{size:t=24,orientation:n="left",className:r}=e;return a.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&a.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&a.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&a.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&a.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Um(e){const{day:t,modifiers:n,...r}=e;return a.createElement("td",{...r})}function Ym(e){const{day:t,modifiers:n,...r}=e,o=a.useRef(null);return a.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),a.createElement("button",{ref:o,...r})}function Fm(e){const{options:t,className:n,components:r,classNames:o,...i}=e,s=[o[Om.Dropdown],n].join(" "),c=t?.find(({value:e})=>e===i.value);return a.createElement("span",{"data-disabled":i.disabled,className:o[Om.DropdownRoot]},a.createElement(r.Select,{className:s,...i},t?.map(({value:e,label:t,disabled:n})=>a.createElement(r.Option,{key:e,value:e,disabled:n},t))),a.createElement("span",{className:o[Om.CaptionLabel],"aria-hidden":!0},c?.label,a.createElement(r.Chevron,{orientation:"down",size:18,className:o[Om.Chevron]})))}function Wm(e){return a.createElement("div",{...e})}function Bm(e){return a.createElement("div",{...e})}function Qm(e){const{calendarMonth:t,displayIndex:n,...r}=e;return a.createElement("div",{...r},e.children)}function qm(e){const{calendarMonth:t,displayIndex:n,...r}=e;return a.createElement("div",{...r})}function Gm(e){return a.createElement("table",{...e})}function $m(e){return a.createElement("div",{...e})}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(Om||(Om={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(Nm||(Nm={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(Sm||(Sm={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}(Em||(Em={}));const Hm=(0,a.createContext)(void 0);function Vm(){const e=(0,a.useContext)(Hm);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function Km(e){const{components:t}=Vm();return a.createElement(t.Dropdown,{...e})}function Zm(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:s,classNames:c,labels:{labelPrevious:l,labelNext:u}}=Vm(),d=(0,a.useCallback)(e=>{o&&n?.(e)},[o,n]),f=(0,a.useCallback)(e=>{r&&t?.(e)},[r,t]);return a.createElement("nav",{...i},a.createElement(s.PreviousMonthButton,{type:"button",className:c[Om.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":l(r),onClick:f},a.createElement(s.Chevron,{disabled:!r||void 0,className:c[Om.Chevron],orientation:"left"})),a.createElement(s.NextMonthButton,{type:"button",className:c[Om.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":u(o),onClick:d},a.createElement(s.Chevron,{disabled:!o||void 0,orientation:"right",className:c[Om.Chevron]})))}function Xm(e){const{components:t}=Vm();return a.createElement(t.Button,{...e})}function Jm(e){return a.createElement("option",{...e})}function eg(e){const{components:t}=Vm();return a.createElement(t.Button,{...e})}function tg(e){const{rootRef:t,...n}=e;return a.createElement("div",{...n,ref:t})}function ng(e){return a.createElement("select",{...e})}function rg(e){const{week:t,...n}=e;return a.createElement("tr",{...n})}function og(e){return a.createElement("th",{...e})}function ig(e){return a.createElement("thead",{"aria-hidden":!0},a.createElement("tr",{...e}))}function ag(e){const{week:t,...n}=e;return a.createElement("th",{...n})}function sg(e){return a.createElement("th",{...e})}function cg(e){return a.createElement("tbody",{...e})}function lg(e){const{components:t}=Vm();return a.createElement(t.Dropdown,{...e})}function ug(){const e={};for(const t in Om)e[Om[t]]=`rdp-${Om[t]}`;for(const t in Nm)e[Nm[t]]=`rdp-${Nm[t]}`;for(const t in Sm)e[Sm[t]]=`rdp-${Sm[t]}`;for(const t in Em)e[Em[t]]=`rdp-${Em[t]}`;return e}function dg(e,t,n){return(n??new Mm(t)).formatMonthYear(e)}const fg=dg;function pg(e,t,n){return(n??new Mm(t)).format(e,"d")}function hg(e,t=jm){return t.format(e,"LLLL")}function mg(e,t,n){return(n??new Mm(t)).format(e,"cccccc")}function gg(e,t=jm){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function yg(){return""}function vg(e,t=jm){return t.format(e,"yyyy")}const bg=vg;function xg(e,t,n,r){let o=(r??new Mm(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const wg=xg;function Mg(e,t,n){return(n??new Mm(t)).formatMonthYear(e)}const jg=Mg;function Og(e,t,n,r){let o=(r??new Mm(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Ng(e){return"Choose the Month"}function Sg(){return""}const Eg="Go to the Next Month";function kg(e,t){return Eg}function Dg(e){return"Go to the Previous Month"}function Ig(e,t,n){return(n??new Mm(t)).format(e,"cccc")}function Ag(e,t){return`Week ${e}`}function Tg(e){return"Week Number"}function Cg(e){return"Choose the Year"}const Pg=(e,t,n)=>t||(n?"function"==typeof n?n:(...e)=>n:e);function zg(e,t){const n=t.locale?.labels??{};return{...r,...e??{},labelDayButton:Pg(xg,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Pg(Ng,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Pg(kg,e?.labelNext,n.labelNext),labelPrevious:Pg(Dg,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Pg(Ag,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Pg(Cg,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Pg(Mg,e?.labelGrid,n.labelGrid),labelGridcell:Pg(Og,e?.labelGridcell,n.labelGridcell),labelNav:Pg(Sg,e?.labelNav,n.labelNav),labelWeekNumberHeader:Pg(Tg,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Pg(Ig,e?.labelWeekday,n.labelWeekday)}}function _g(e,t,n,r,o){const{startOfMonth:i,startOfYear:a,endOfYear:s,eachMonthOfInterval:c,getMonth:l}=o;return c({start:a(e),end:s(e)}).map(e=>{const a=r.formatMonthDropdown(e,o);return{value:l(e),label:a,disabled:t&&e<i(t)||n&&e>i(n)||!1}})}function Rg(e,t,n,r,o=!1){if(!e)return;if(!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:s,getYear:c}=r,l=s({start:i(e),end:a(t)});return o&&l.reverse(),l.map(e=>{const t=n.formatYearDropdown(e,r);return{value:c(e),label:t,disabled:!1}})}const Lg=e=>e instanceof HTMLElement?e:null,Ug=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Yg=e=>Lg(e.querySelector("[data-animated-caption]")),Fg=e=>Lg(e.querySelector("[data-animated-weeks]"));function Wg(e,t,n,r){const{month:o,defaultMonth:i,today:a=r.today(),numberOfMonths:s=1}=e;let c=o||i||a;const{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;return n&&l(n,c)<s-1&&(c=u(n,-1*(s-1))),t&&l(c,t)<0&&(c=t),d(c)}class Bg{constructor(e,t,n=jm){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,"yyyy-MM-dd"),this.displayMonthId=n.format(t,"yyyy-MM"),this.dateMonthId=n.format(e,"yyyy-MM")}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Qg{constructor(e,t){this.days=t,this.weekNumber=e}}class qg{constructor(e,t){this.date=e,this.weeks=t}}function Gg(e,t){const[n,r]=(0,a.useState)(e);return[void 0===t?n:t,r]}var $g;function Hg(e){return!e[Nm.disabled]&&!e[Nm.hidden]&&!e[Nm.outside]}function Vg(e,t,n,r,o,i,a,s=0){if(s>365)return;const c=function(e,t,n,r,o,i,a){const{ISOWeek:s,broadcastCalendar:c}=i,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfWeek:m,max:g,min:y,startOfBroadcastWeek:v,startOfISOWeek:b,startOfWeek:x}=a,w={day:l,week:d,month:u,year:f,startOfWeek:e=>c?v(e,a):s?b(e):x(e),endOfWeek:e=>c?p(e):s?h(e):m(e)};let M=w[e](n,"after"===t?1:-1);return"before"===t&&r?M=g([r,M]):"after"===t&&o&&(M=y([o,M])),M}(e,t,n.date,r,o,i,a),l=Boolean(i.disabled&&zm(c,i.disabled,a)),u=Boolean(i.hidden&&zm(c,i.hidden,a)),d=new Bg(c,c,a);return l||u?Vg(e,t,d,r,o,i,a,s+1):d}function Kg(e,t,n,r,o){const{autoFocus:i}=e,[s,c]=(0,a.useState)(),l=function(e,t,n,r){let o,i=-1;for(const a of e){const e=t(a);Hg(e)&&(e[Nm.focused]&&i<$g.FocusedModifier?(o=a,i=$g.FocusedModifier):r?.isEqualTo(a)&&i<$g.LastFocused?(o=a,i=$g.LastFocused):n(a.date)&&i<$g.Selected?(o=a,i=$g.Selected):e[Nm.today]&&i<$g.Today&&(o=a,i=$g.Today))}return o||(o=e.find(e=>Hg(t(e)))),o}(t.days,n,r||(()=>!1),s),[u,d]=(0,a.useState)(i?l:void 0);return{isFocusTarget:e=>Boolean(l?.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{c(u),d(void 0)},moveFocus:(n,r)=>{if(!u)return;const i=Vg(n,r,u,t.navStart,t.navEnd,e,o);if(i){if(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(i)))return;t.goToDay(i),d(i)}}}}function Zg(e,t,n=jm){return km(e,t.from,!1,n)||km(e,t.to,!1,n)||km(t,e.from,!1,n)||km(t,e.to,!1,n)}function Xg(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:i,required:a,onSelect:s}=e,[c,l]=Gg(i,s?i:void 0),u=s?i:c;return{selected:u,select:(i,c,d)=>{const{min:f,max:p}=e;let h;if(i){const e=u?.from,n=u?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(i,e);h=!o||!r&&u?.from?function(e,t,n=0,r=0,o=!1,i=jm){const{from:a,to:s}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=i;let d;if(a||s){if(a&&!s)d=c(a,e)?0===n?{from:a,to:e}:o?{from:a,to:void 0}:void 0:u(e,a)?{from:e,to:a}:{from:a,to:e};else if(a&&s)if(c(a,e)&&c(s,e))d=o?{from:a,to:s}:void 0;else if(c(a,e))d={from:a,to:n>0?void 0:e};else if(c(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(l(e,a))d={from:a,to:e};else{if(!l(e,s))throw new Error("Invalid range");d={from:a,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=i.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(i,u,f,p,a,t):!a&&s?void 0:{from:i,to:void 0}}return r&&n&&h?.from&&h.to&&function(e,t,n=jm){const r=Array.isArray(t)?t:[t],o=r.filter(e=>"function"!=typeof e).some(t=>"boolean"==typeof t?t:n.isDate(t)?km(e,t,!1,n):Pm(t,n)?t.some(t=>km(e,t,!1,n)):Im(t)?!(!t.from||!t.to)&&Zg(e,{from:t.from,to:t.to},n):Cm(t)?function(e,t,n=jm){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let e=0;e<=a;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}(e,t.dayOfWeek,n):Dm(t)?n.isAfter(t.before,t.after)?Zg(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):zm(e.from,t,n)||zm(e.to,t,n):!(!Am(t)&&!Tm(t))&&(zm(e.from,t,n)||zm(e.to,t,n)));if(o)return!0;const i=r.filter(e=>"function"==typeof e);if(i.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}({from:h.from,to:h.to},n,t)&&(h.from=i,h.to=void 0),s||l(h),s?.(h,i,c,d),h},isSelected:e=>u&&km(u,e,!1,t)}}function Jg(e,t){return e instanceof fm&&e.timeZone===t?e:new fm(e,t)}function ey(e,t,n){if(!n)return Jg(e,t);const r=Jg(e,t),o=new fm(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(o.getTime())}function ty(e,t,n){return"boolean"==typeof e||"function"==typeof e?e:e instanceof Date?ey(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?ey(e,t,n):e):Im(e)?{...e,from:e.from?Jg(e.from,t):e.from,to:e.to?Jg(e.to,t):e.to}:Dm(e)?{before:ey(e.before,t,n),after:ey(e.after,t,n)}:Am(e)?{after:ey(e.after,t,n)}:Tm(e)?{before:ey(e.before,t,n)}:e}function ny(e,t,n){return e?Array.isArray(e)?e.map(e=>ty(e,t,n)):ty(e,t,n):e}function ry(n){let r=n;const o=r.timeZone;if(o&&(r={...n,timeZone:o},r.today&&(r.today=Jg(r.today,o)),r.month&&(r.month=Jg(r.month,o)),r.defaultMonth&&(r.defaultMonth=Jg(r.defaultMonth,o)),r.startMonth&&(r.startMonth=Jg(r.startMonth,o)),r.endMonth&&(r.endMonth=Jg(r.endMonth,o)),"single"===r.mode&&r.selected?r.selected=Jg(r.selected,o):"multiple"===r.mode&&r.selected?r.selected=r.selected?.map(e=>Jg(e,o)):"range"===r.mode&&r.selected&&(r.selected={from:r.selected.from?Jg(r.selected.from,o):r.selected.from,to:r.selected.to?Jg(r.selected.to,o):r.selected.to}),void 0!==r.disabled&&(r.disabled=ny(r.disabled,o)),void 0!==r.hidden&&(r.hidden=ny(r.hidden,o)),r.modifiers)){const e={};Object.keys(r.modifiers).forEach(t=>{e[t]=ny(r.modifiers?.[t],o)}),r.modifiers=e}const{components:i,formatters:s,labels:c,dateLib:l,locale:u,classNames:d}=(0,a.useMemo)(()=>{const n={...tm,...r.locale},o=r.broadcastCalendar?1:r.weekStartsOn,i=r.noonSafe&&r.timeZone?function(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,i=t=>{const n="number"==typeof t||"string"==typeof t?new Date(t):t;return new fm(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},a=e=>{const t=i(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>i(fm.tz(e)),newDate:(t,n,r)=>new fm(t,n,r,12,0,0,e),startOfDay:e=>i(e),startOfWeek:(e,t)=>{const n=i(e),r=t?.weekStartsOn??o,a=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-a),n},startOfISOWeek:e=>{const t=i(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{const t=i(e);return t.setDate(1),t},startOfYear:e=>{const t=i(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{const n=i(e),r=(((t?.weekStartsOn??o)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{const t=i(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{const t=i(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{const t=i(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{const n=i(t.start),r=i(t.end),o=[],a=new fm(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=12*r.getFullYear()+r.getMonth();for(;12*a.getFullYear()+a.getMonth()<=s;)o.push(new fm(a,e)),a.setMonth(a.getMonth()+1,1);return o},addDays:(e,t)=>{const n=i(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{const n=i(e);return n.setDate(n.getDate()+7*t),n},addMonths:(e,t)=>{const n=i(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{const n=i(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{const n=i(t.start),r=i(t.end),o=[],a=new fm(n.getFullYear(),0,1,12,0,0,e);for(;a.getFullYear()<=r.getFullYear();)o.push(new fm(a,e)),a.setFullYear(a.getFullYear()+1,0,1);return o},getWeek:(e,t)=>Ca(a(e),{weekStartsOn:t?.weekStartsOn??o,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>Aa(a(e)),differenceInCalendarDays:(e,t)=>Sa(a(e),a(t)),differenceInCalendarMonths:(e,t)=>mm(a(e),a(t))}}(r.timeZone,{weekStartsOn:o,locale:n}):void 0,a=r.dateLib&&i?{...i,...r.dateLib}:r.dateLib??i,s=new Mm({locale:n,weekStartsOn:o,firstWeekContainsDate:r.firstWeekContainsDate,useAdditionalWeekYearTokens:r.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:r.useAdditionalDayOfYearTokens,timeZone:r.timeZone,numerals:r.numerals},a);return{dateLib:s,components:(l=r.components,{...e,...l}),formatters:(c=r.formatters,c?.formatMonthCaption&&!c.formatCaption&&(c.formatCaption=c.formatMonthCaption),c?.formatYearCaption&&!c.formatYearDropdown&&(c.formatYearDropdown=c.formatYearCaption),{...t,...c}),labels:zg(r.labels,s.options),locale:n,classNames:{...ug(),...r.classNames}};var c,l},[r.locale,r.broadcastCalendar,r.weekStartsOn,r.firstWeekContainsDate,r.useAdditionalWeekYearTokens,r.useAdditionalDayOfYearTokens,r.timeZone,r.numerals,r.dateLib,r.noonSafe,r.components,r.formatters,r.labels,r.classNames]);r.today||(r={...r,today:l.today()});const{captionLayout:f,mode:p,navLayout:h,numberOfMonths:m=1,onDayBlur:g,onDayClick:y,onDayFocus:v,onDayKeyDown:b,onDayMouseEnter:x,onDayMouseLeave:w,onNextClick:M,onPrevClick:j,showWeekNumber:O,styles:N}=r,{formatCaption:S,formatDay:E,formatMonthDropdown:k,formatWeekNumber:D,formatWeekNumberHeader:I,formatWeekdayName:A,formatYearDropdown:T}=s,C=function(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:s,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:f,toYear:p,fromMonth:h,toMonth:m}=e;!n&&h&&(n=h),!n&&f&&(n=t.newDate(f,0,1)),!r&&m&&(r=m),!r&&p&&(r=u(p,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=a(n):f?n=u(f,0,1):!n&&g&&(n=o(c(e.today??d(),-100))),r?r=s(r):p?r=u(p,11,31):!r&&g&&(r=l(e.today??d())),[n?i(n):n,r?i(r):r]}(e,t),{startOfMonth:o,endOfMonth:i}=t,s=Wg(e,n,r,t),[c,l]=Gg(s,e.month?s:void 0);(0,a.useEffect)(()=>{const o=Wg(e,n,r,t);l(o)},[e.timeZone]);const{months:u,weeks:d,days:f,previousMonth:p,nextMonth:h}=(0,a.useMemo)(()=>{const o=function(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;i.push(o)}return i}(c,r,{numberOfMonths:e.numberOfMonths},t),a=function(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:h,endOfWeek:m,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:v,startOfWeek:b}=r,x=c?y(o,r):a?v(o):b(o),w=c?f(i):a?p(h(i)):m(h(i)),M=t&&(c?f(t):a?p(t):m(t)),j=u(M&&g(w,M)?M:w,x),O=d(i,o)+1,N=[];for(let e=0;e<=j;e++){const t=l(x,e);N.push(t)}const S=(c?35:42)*O;if(s&&N.length<S){const e=S-N.length;for(let t=0;t<e;t++){const e=l(N[N.length-1],1);N.push(e)}}return N}(o,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),s=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:s,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,h=e.reduce((e,h)=>{const m=n.broadcastCalendar?d(h,r):n.ISOWeek?f(h):p(h),g=n.broadcastCalendar?i(h):n.ISOWeek?a(s(h)):c(s(h)),y=t.filter(e=>e>=m&&e<=g),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&y.length<v){const e=t.filter(e=>{const t=v-y.length;return e>g&&e<=o(g,t)});y.push(...e)}const b=y.reduce((e,t)=>{const o=n.ISOWeek?l(t):u(t),i=e.find(e=>e.weekNumber===o),a=new Bg(t,h,r);return i?i.days.push(a):e.push(new Qg(o,[a])),e},[]),x=new qg(h,b);return e.push(x),e},[]);return n.reverseMonths?h.reverse():h}(o,a,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),l=function(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}(s),u=function(e){const t=[];return e.reduce((e,n)=>{const r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}(s),d=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:c}=r,l=o?i??1:1,u=a(e);return t&&c(u,t)<=0?void 0:s(u,-l)}(c,n,e,t),f=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:c}=r,l=o?i:1,u=a(e);return t&&c(t,e)<i?void 0:s(u,l)}(c,r,e,t);return{months:s,weeks:l,days:u,previousMonth:d,nextMonth:f}},[t,c.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:g}=e,y=e=>{if(m)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),l(t),g?.(t)};return{months:u,weeks:d,days:f,navStart:n,navEnd:r,previousMonth:p,nextMonth:h,goToMonth:y,goToDay:e=>{(e=>d.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||y(e.date)}}}(r,l),{days:P,months:z,navStart:_,navEnd:R,previousMonth:L,nextMonth:U,goToMonth:Y}=C,F=function(e,t,n,r,o){const{disabled:i,hidden:a,modifiers:s,showOutsideDays:c,broadcastCalendar:l,today:u=o.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:h,endOfMonth:m,isAfter:g}=o,y=n&&p(n),v=r&&m(r),b={[Nm.focused]:[],[Nm.outside]:[],[Nm.disabled]:[],[Nm.hidden]:[],[Nm.today]:[]},x={};for(const t of e){const{date:e,displayMonth:n}=t,r=Boolean(n&&!f(e,n)),p=Boolean(y&&h(e,y)),m=Boolean(v&&g(e,v)),w=Boolean(i&&zm(e,i,o)),M=Boolean(a&&zm(e,a,o))||p||m||!l&&!c&&r||l&&!1===c&&r,j=d(e,u);r&&b.outside.push(t),w&&b.disabled.push(t),M&&b.hidden.push(t),j&&b.today.push(t),s&&Object.keys(s).forEach(n=>{const r=s?.[n];r&&zm(e,r,o)&&(x[n]?x[n].push(t):x[n]=[t])})}return e=>{const t={[Nm.focused]:!1,[Nm.disabled]:!1,[Nm.hidden]:!1,[Nm.outside]:!1,[Nm.today]:!1},n={};for(const n in b){const r=b[n];t[n]=r.some(t=>t===e)}for(const t in x)n[t]=x[t].some(t=>t===e);return{...t,...n}}}(P,r,_,R,l),{isSelected:W,select:B,selected:Q}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Gg(n,o?n:void 0),s=o?n:i,{isSameDay:c}=t;return{selected:s,select:(e,t,n)=>{let i=e;return!r&&s&&s&&c(e,s)&&(i=void 0),o||a(i),o?.(i,e,t,n),i},isSelected:e=>!!s&&c(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Gg(n,o?n:void 0),s=o?n:i,{isSameDay:c}=t,l=e=>s?.some(t=>c(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let i=[...s??[]];if(l(e)){if(s?.length===u)return;if(r&&1===s?.length)return;i=s?.filter(t=>!c(t,e))}else i=s?.length===d?[e]:[...i,e];return o||a(i),o?.(i,e,t,n),i},isSelected:l}}(e,t),o=Xg(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}(r,l)??{},{blur:q,focused:G,isFocusTarget:$,moveFocus:H,setFocused:V}=Kg(r,C,F,W??(()=>!1),l),{labelDayButton:K,labelGridcell:Z,labelGrid:X,labelMonthDropdown:J,labelNav:ee,labelPrevious:te,labelNext:ne,labelWeekday:re,labelWeekNumber:oe,labelWeekNumberHeader:ie,labelYearDropdown:ae}=c,se=(0,a.useMemo)(()=>function(e,t,n,r){const o=r??e.today(),i=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let t=0;t<7;t++){const n=e.addDays(i,t);a.push(n)}return a}(l,r.ISOWeek,r.broadcastCalendar,r.today),[l,r.ISOWeek,r.broadcastCalendar,r.today]),ce=void 0!==p||void 0!==y,le=(0,a.useCallback)(()=>{L&&(Y(L),j?.(L))},[L,Y,j]),ue=(0,a.useCallback)(()=>{U&&(Y(U),M?.(U))},[Y,U,M]),de=(0,a.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),V(e),t.disabled||(B?.(e.date,t,n),y?.(e.date,t,n))},[B,y,V]),fe=(0,a.useCallback)((e,t)=>n=>{V(e),v?.(e.date,t,n)},[v,V]),pe=(0,a.useCallback)((e,t)=>n=>{q(),g?.(e.date,t,n)},[q,g]),he=(0,a.useCallback)((e,t)=>n=>{const o={ArrowLeft:[n.shiftKey?"month":"day","rtl"===r.dir?"after":"before"],ArrowRight:[n.shiftKey?"month":"day","rtl"===r.dir?"before":"after"],ArrowDown:[n.shiftKey?"year":"week","after"],ArrowUp:[n.shiftKey?"year":"week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=o[n.key];H(e,t)}b?.(e.date,t,n)},[H,b,r.dir]),me=(0,a.useCallback)((e,t)=>n=>{x?.(e.date,t,n)},[x]),ge=(0,a.useCallback)((e,t)=>n=>{w?.(e.date,t,n)},[w]),ye=(0,a.useCallback)(e=>t=>{const n=Number(t.target.value),r=l.setMonth(l.startOfMonth(e),n);Y(r)},[l,Y]),ve=(0,a.useCallback)(e=>t=>{const n=Number(t.target.value),r=l.setYear(l.startOfMonth(e),n);Y(r)},[l,Y]),{className:be,style:xe}=(0,a.useMemo)(()=>({className:[d[Om.Root],r.className].filter(Boolean).join(" "),style:{...N?.[Om.Root],...r.style}}),[d,r.className,r.style,N]),we=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith("data-")&&(t[e]=n)}),t}(r),Me=(0,a.useRef)(null);!function(e,t,{classNames:n,months:r,focused:o,dateLib:i}){const s=(0,a.useRef)(null),c=(0,a.useRef)(r),l=(0,a.useRef)(!1);(0,a.useLayoutEffect)(()=>{const a=c.current;if(c.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==a.length&&r.length===a.length))return;const u=i.isSameMonth(r[0].date,a[0].date),d=i.isAfter(r[0].date,a[0].date),f=d?n[Em.caption_after_enter]:n[Em.caption_before_enter],p=d?n[Em.weeks_after_enter]:n[Em.weeks_before_enter],h=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(Ug(m).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=Lg(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=Yg(e);n&&n.classList.remove(f);const r=Fg(e);r&&r.classList.remove(p)}),s.current=m):s.current=null,l.current||u||o)return;const g=h instanceof HTMLElement?Ug(h):[],y=Ug(e.current);if(y?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){l.current=!0;const t=[];e.current.style.isolation="isolate";const r=(v=e.current,Lg(v.querySelector("[data-animated-nav]")));r&&(r.style.zIndex="1"),y.forEach((o,i)=>{const a=g[i];if(!a)return;o.style.position="relative",o.style.overflow="hidden";const s=Yg(o);s&&s.classList.add(f);const c=Fg(o);c&&c.classList.add(p);const u=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),r&&(r.style.zIndex=""),s&&s.classList.remove(f),c&&c.classList.remove(p),o.style.position="",o.style.overflow="",o.contains(a)&&o.removeChild(a)};t.push(u),a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const h=(e=>Lg(e.querySelector("[data-animated-weekdays]")))(a);h&&(h.style.opacity="0");const m=Yg(a);m&&(m.classList.add(d?n[Em.caption_before_exit]:n[Em.caption_after_exit]),m.addEventListener("animationend",u));const y=Fg(a);y&&y.classList.add(d?n[Em.weeks_before_exit]:n[Em.weeks_after_exit]),o.insertBefore(a,o.firstChild)})}var v})}(Me,Boolean(r.animate),{classNames:d,months:z,focused:G,dateLib:l});const je={dayPickerProps:r,selected:Q,select:B,isSelected:W,months:z,nextMonth:U,previousMonth:L,goToMonth:Y,getModifiers:F,components:i,classNames:d,styles:N,labels:c,formatters:s};return a.createElement(Hm.Provider,{value:je},a.createElement(i.Root,{rootRef:r.animate?Me:void 0,className:be,style:xe,dir:r.dir,id:r.id,lang:r.lang??u.code,nonce:r.nonce,title:r.title,role:r.role,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],...we},a.createElement(i.Months,{className:d[Om.Months],style:N?.[Om.Months]},!r.hideNavigation&&!h&&a.createElement(i.Nav,{"data-animated-nav":r.animate?"true":void 0,className:d[Om.Nav],style:N?.[Om.Nav],"aria-label":ee(),onPreviousClick:le,onNextClick:ue,previousMonth:L,nextMonth:U}),z.map((e,t)=>a.createElement(i.Month,{"data-animated-month":r.animate?"true":void 0,className:d[Om.Month],style:N?.[Om.Month],key:t,displayIndex:t,calendarMonth:e},"around"===h&&!r.hideNavigation&&0===t&&a.createElement(i.PreviousMonthButton,{type:"button",className:d[Om.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":!L||void 0,"aria-label":te(L),onClick:le,"data-animated-button":r.animate?"true":void 0},a.createElement(i.Chevron,{disabled:!L||void 0,className:d[Om.Chevron],orientation:"rtl"===r.dir?"right":"left"})),a.createElement(i.MonthCaption,{"data-animated-caption":r.animate?"true":void 0,className:d[Om.MonthCaption],style:N?.[Om.MonthCaption],calendarMonth:e,displayIndex:t},f?.startsWith("dropdown")?a.createElement(i.DropdownNav,{className:d[Om.Dropdowns],style:N?.[Om.Dropdowns]},(()=>{const t="dropdown"===f||"dropdown-months"===f?a.createElement(i.MonthsDropdown,{key:"month",className:d[Om.MonthsDropdown],"aria-label":J(),classNames:d,components:i,disabled:Boolean(r.disableNavigation),onChange:ye(e.date),options:_g(e.date,_,R,s,l),style:N?.[Om.Dropdown],value:l.getMonth(e.date)}):a.createElement("span",{key:"month"},k(e.date,l)),n="dropdown"===f||"dropdown-years"===f?a.createElement(i.YearsDropdown,{key:"year",className:d[Om.YearsDropdown],"aria-label":ae(l.options),classNames:d,components:i,disabled:Boolean(r.disableNavigation),onChange:ve(e.date),options:Rg(_,R,s,l,Boolean(r.reverseYears)),style:N?.[Om.Dropdown],value:l.getYear(e.date)}):a.createElement("span",{key:"year"},T(e.date,l));return"year-first"===l.getMonthYearOrder()?[n,t]:[t,n]})(),a.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},S(e.date,l.options,l))):a.createElement(i.CaptionLabel,{className:d[Om.CaptionLabel],role:"status","aria-live":"polite"},S(e.date,l.options,l))),"around"===h&&!r.hideNavigation&&t===m-1&&a.createElement(i.NextMonthButton,{type:"button",className:d[Om.NextMonthButton],tabIndex:U?void 0:-1,"aria-disabled":!U||void 0,"aria-label":ne(U),onClick:ue,"data-animated-button":r.animate?"true":void 0},a.createElement(i.Chevron,{disabled:!U||void 0,className:d[Om.Chevron],orientation:"rtl"===r.dir?"left":"right"})),t===m-1&&"after"===h&&!r.hideNavigation&&a.createElement(i.Nav,{"data-animated-nav":r.animate?"true":void 0,className:d[Om.Nav],style:N?.[Om.Nav],"aria-label":ee(),onPreviousClick:le,onNextClick:ue,previousMonth:L,nextMonth:U}),a.createElement(i.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===p||"range"===p,"aria-label":X(e.date,l.options,l)||void 0,className:d[Om.MonthGrid],style:N?.[Om.MonthGrid]},!r.hideWeekdays&&a.createElement(i.Weekdays,{"data-animated-weekdays":r.animate?"true":void 0,className:d[Om.Weekdays],style:N?.[Om.Weekdays]},O&&a.createElement(i.WeekNumberHeader,{"aria-label":ie(l.options),className:d[Om.WeekNumberHeader],style:N?.[Om.WeekNumberHeader],scope:"col"},I()),se.map(e=>a.createElement(i.Weekday,{"aria-label":re(e,l.options,l),className:d[Om.Weekday],key:String(e),style:N?.[Om.Weekday],scope:"col"},A(e,l.options,l)))),a.createElement(i.Weeks,{"data-animated-weeks":r.animate?"true":void 0,className:d[Om.Weeks],style:N?.[Om.Weeks]},e.weeks.map(e=>a.createElement(i.Week,{className:d[Om.Week],key:e.weekNumber,style:N?.[Om.Week],week:e},O&&a.createElement(i.WeekNumber,{week:e,style:N?.[Om.WeekNumber],"aria-label":oe(e.weekNumber,{locale:u}),className:d[Om.WeekNumber],scope:"row",role:"rowheader"},D(e.weekNumber,l)),e.days.map(e=>{const{date:t}=e,n=F(e);if(n[Nm.focused]=!n.hidden&&Boolean(G?.isEqualTo(e)),n[Sm.selected]=W?.(t)||n.selected,Im(Q)){const{from:e,to:r}=Q;n[Sm.range_start]=Boolean(e&&r&&l.isSameDay(t,e)),n[Sm.range_end]=Boolean(e&&r&&l.isSameDay(t,r)),n[Sm.range_middle]=km(Q,t,!0,l)}const o=function(e,t={},n={}){let r={...t?.[Om.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(n,N,r.modifiersStyles),s=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[Nm[r]]?e.push(t[Nm[r]]):t[Sm[r]]&&e.push(t[Sm[r]]),e),[t[Om.Day]])}(n,d,r.modifiersClassNames),c=ce||n.hidden?void 0:Z(t,n,l.options,l);return a.createElement(i.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:n,className:s.join(" "),style:o,role:"gridcell","aria-selected":n.selected||void 0,"aria-label":c,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":n.selected||void 0,"data-disabled":n.disabled||void 0,"data-hidden":n.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":n.focused||void 0,"data-today":n.today||void 0},!n.hidden&&ce?a.createElement(i.DayButton,{className:d[Om.DayButton],style:N?.[Om.DayButton],type:"button",day:e,modifiers:n,disabled:!n.focused&&n.disabled||void 0,"aria-disabled":n.focused&&n.disabled||void 0,tabIndex:$(e)?0:-1,"aria-label":K(t,n,l.options,l),onClick:de(e,n),onBlur:pe(e,n),onFocus:fe(e,n),onKeyDown:he(e,n),onMouseEnter:me(e,n),onMouseLeave:ge(e,n)},E(t,l.options,l)):!n.hidden&&E(e.date,l.options,l))})))))))),r.footer&&a.createElement(i.Footer,{className:d[Om.Footer],style:N?.[Om.Footer],role:"status","aria-live":"polite"},r.footer)))}function oy(e,t){const n=+Ma(e)-+Ma(t);return n<0?-1:n>0?1:n}function iy(e,t,n){const[r,o]=Oa(n?.in,e,t),i=oy(r,o),a=Math.abs(function(e,t,n){const[r,o]=Oa(n?.in,e,t);return r.getFullYear()-o.getFullYear()}(r,o));r.setFullYear(1584),o.setFullYear(1584);const s=i*(a-+(oy(r,o)===-i));return 0===s?0:s}function ay({modifiers:e,children:t,...n}){const r=e.range_start||e.range_end,o=e.range_middle,i=e.outside;return(0,Nl.jsx)("button",{...n,className:bl("disco-flex disco-h-[26px] disco-w-[26px] disco-items-center disco-justify-center disco-rounded-full disco-text-[11px] disco-transition-colors disco-select-none",r?"disco-bg-[#08c889] disco-font-semibold disco-text-white":o?"disco-text-[rgba(74,74,74,0.8)]":i?"disco-cursor-default disco-text-[rgba(74,74,74,0.25)]":"disco-cursor-pointer disco-text-[rgba(74,74,74,0.85)] hover:disco-bg-[rgba(8,200,137,0.12)]"),children:t})}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}($g||($g={}));class sy{subPriority=0;validate(e,t){return!0}}class cy extends sy{constructor(e,t,n,r,o){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class ly extends sy{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>wa(t,e))}set(e,t){return t.timestampIsSet?e:wa(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):wa(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}}class uy{run(e,t,n,r){const o=this.parse(e,t,n,r);return o?{setter:new cy(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}}const dy=/^(1[0-2]|0?\d)/,fy=/^(3[0-1]|[0-2]?\d)/,py=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,hy=/^(5[0-3]|[0-4]?\d)/,my=/^(2[0-3]|[0-1]?\d)/,gy=/^(2[0-4]|[0-1]?\d)/,yy=/^(1[0-1]|0?\d)/,vy=/^(1[0-2]|0?\d)/,by=/^[0-5]?\d/,xy=/^[0-5]?\d/,wy=/^\d/,My=/^\d{1,2}/,jy=/^\d{1,3}/,Oy=/^\d{1,4}/,Ny=/^-?\d+/,Sy=/^-?\d/,Ey=/^-?\d{1,2}/,ky=/^-?\d{1,3}/,Dy=/^-?\d{1,4}/,Iy=/^([+-])(\d{2})(\d{2})?|Z/,Ay=/^([+-])(\d{2})(\d{2})|Z/,Ty=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Cy=/^([+-])(\d{2}):(\d{2})|Z/,Py=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function zy(e,t){return e?{value:t(e.value),rest:e.rest}:e}function _y(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Ry(e,t){const n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function Ly(e){return _y(Ny,e)}function Uy(e,t){switch(e){case 1:return _y(wy,t);case 2:return _y(My,t);case 3:return _y(jy,t);case 4:return _y(Oy,t);default:return _y(new RegExp("^\\d{1,"+e+"}"),t)}}function Yy(e,t){switch(e){case 1:return _y(Sy,t);case 2:return _y(Ey,t);case 3:return _y(ky,t);case 4:return _y(Dy,t);default:return _y(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Fy(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Wy(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const t=r+50;o=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?o:1-o}function By(e){return e%400==0||e%4==0&&e%100!=0}const Qy=[31,28,31,30,31,30,31,31,30,31,30,31],qy=[31,29,31,30,31,30,31,31,30,31,30,31];function Gy(e,t,n){const r=va(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ma(e,n?.in),a=i.getDay(),s=7-o;return os(i,t<0||t>6?t-(a+s)%7:((t%7+7)%7+s)%7-(a+s)%7,n)}function $y(e,t,n){const r=Ma(e,n?.in);return os(r,t-function(e,t){const n=Ma(e,t?.in).getDay();return 0===n?7:n}(r,n),n)}const Hy={G:new class extends uy{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends uy{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return zy(Uy(4,e),r);case"yo":return zy(n.ordinalNumber(e,{unit:"year"}),r);default:return zy(Uy(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Wy(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}},Y:new class extends uy{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return zy(Uy(4,e),r);case"Yo":return zy(n.ordinalNumber(e,{unit:"year"}),r);default:return zy(Uy(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const o=Ta(e,r);if(n.isTwoDigitYear){const t=Wy(n.year,o);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),ka(e,r)}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),ka(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends uy{priority=130;parse(e,t){return Yy("R"===t?4:t.length,e)}set(e,t,n){const r=wa(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Da(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends uy{priority=130;parse(e,t){return Yy("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends uy{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Uy(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends uy{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Uy(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends uy{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return zy(_y(dy,e),r);case"MM":return zy(Uy(2,e),r);case"Mo":return zy(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends uy{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return zy(_y(dy,e),r);case"LL":return zy(Uy(2,e),r);case"Lo":return zy(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends uy{priority=100;parse(e,t,n){switch(t){case"w":return _y(hy,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Uy(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return ka(function(e,t,n){const r=Ma(e,n?.in),o=Ca(r,n)-t;return r.setDate(r.getDate()-7*o),Ma(r,n?.in)}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends uy{priority=100;parse(e,t,n){switch(t){case"I":return _y(hy,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Uy(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Da(function(e,t,n){const r=Ma(e,n?.in),o=Aa(r,n)-t;return r.setDate(r.getDate()-7*o),r}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends uy{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return _y(fy,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Uy(t.length,e)}}validate(e,t){const n=By(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=qy[r]:t>=1&&t<=Qy[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends uy{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return _y(py,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Uy(t.length,e)}}validate(e,t){return By(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends uy{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Gy(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends uy{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return zy(Uy(t.length,e),o);case"eo":return zy(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Gy(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends uy{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return zy(Uy(t.length,e),o);case"co":return zy(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Gy(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends uy{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return Uy(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return zy(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return zy(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return zy(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return zy(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=$y(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends uy{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Fy(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends uy{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Fy(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends uy{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Fy(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends uy{priority=70;parse(e,t,n){switch(t){case"h":return _y(vy,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Uy(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends uy{priority=70;parse(e,t,n){switch(t){case"H":return _y(my,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Uy(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends uy{priority=70;parse(e,t,n){switch(t){case"K":return _y(yy,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Uy(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends uy{priority=70;parse(e,t,n){switch(t){case"k":return _y(gy,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Uy(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends uy{priority=60;parse(e,t,n){switch(t){case"m":return _y(by,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Uy(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends uy{priority=50;parse(e,t,n){switch(t){case"s":return _y(xy,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Uy(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends uy{priority=30;parse(e,t){return zy(Uy(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends uy{priority=10;parse(e,t){switch(t){case"X":return Ry(Iy,e);case"XX":return Ry(Ay,e);case"XXXX":return Ry(Ty,e);case"XXXXX":return Ry(Py,e);default:return Ry(Cy,e)}}set(e,t,n){return t.timestampIsSet?e:wa(e,e.getTime()-ja(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends uy{priority=10;parse(e,t){switch(t){case"x":return Ry(Iy,e);case"xx":return Ry(Ay,e);case"xxxx":return Ry(Ty,e);case"xxxxx":return Ry(Py,e);default:return Ry(Cy,e)}}set(e,t,n){return t.timestampIsSet?e:wa(e,e.getTime()-ja(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends uy{priority=40;parse(e){return Ly(e)}set(e,t,n){return[wa(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends uy{priority=20;parse(e){return Ly(e)}set(e,t,n){return[wa(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Vy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ky=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zy=/^'([^]*?)'?$/,Xy=/''/g,Jy=/\S/,ev=/[a-zA-Z]/;function tv(e,t,n,r){const o=()=>wa(r?.in||n,NaN),i=Object.assign({},va()),a=r?.locale??i.locale??ga,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Ma(n,r?.in);const l={firstWeekContainsDate:s,weekStartsOn:c,locale:a},u=[new ly(r?.in,n)],d=t.match(Ky).map(e=>{const t=e[0];return t in Wa?(0,Wa[t])(e,a.formatLong):e}).join("").match(Vy),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&$a(n)&&Ha(n,t,e),!r?.useAdditionalDayOfYearTokens&&Ga(n)&&Ha(n,t,e);const i=n[0],s=Hy[i];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=f.find(e=>t.includes(e.token)||e.token===i);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&f.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:i,fullToken:n});const r=s.run(e,n,a.match,l);if(!r)return o();u.push(r.setter),e=r.rest}else{if(i.match(ev))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===n?n="'":"'"===i&&(n=nv(n)),0!==e.indexOf(n))return o();e=e.slice(n.length)}}if(e.length>0&&Jy.test(e))return o();const p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let h=Ma(n,r?.in);if(isNaN(+h))return o();const m={};for(const e of p){if(!e.validate(h,l))return o();const t=e.set(h,m,l);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return h}function nv(e){return e.match(Zy)[1].replace(Xy,"'")}const rv="dd-MM-yyyy";function ov({label:e,date:t,onDateChange:n}){const[r,o]=(0,a.useState)(!1),[i,s]=(0,a.useState)(""),[c,l]=(0,a.useState)(!1),u=(0,a.useRef)(null),d=t?ns(t,rv):"";(0,a.useEffect)(()=>{r||(s(d),l(!1))},[d,r]);const f=e=>{const t=e.trim();if(!t)return o(!1),void l(!1);const r=tv(t,rv,new Date);Ka(r)?(n(r),o(!1),l(!1)):l(!0)};return(0,Nl.jsxs)("div",{className:bl("disco-mb-2 disco-flex disco-items-center disco-gap-2 disco-rounded-[5px] disco-border disco-px-3 disco-py-1.5",c?"disco-border-red-400":"disco-border-[#e5e7eb]"),children:[(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-medium disco-text-[rgba(74,74,74,0.45)]",children:e}),r?(0,Nl.jsx)("input",{ref:u,type:"text",value:i,onChange:e=>{s(e.target.value),l(!1)},onBlur:()=>{f(i),Ka(tv(i.trim(),rv,new Date))||(s(d),l(!1),o(!1))},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),f(i)),"Escape"===e.key&&(s(d),l(!1),o(!1))},placeholder:"DD-MM-YYYY",className:"!disco-border-none disco-bg-transparent disco-p-0 disco-text-xs disco-font-semibold disco-text-gray-700 !disco-outline-none !disco-shadow-none focus:!disco-outline-none focus:!disco-shadow-none focus:!disco-border-none disco-h-[30px] !disco-min-h-0 disco-max-w-28"}):(0,Nl.jsx)("span",{onClick:()=>{n&&(o(!0),s(d),l(!1),setTimeout(()=>u.current?.focus(),0))},className:bl("disco-text-xs disco-font-semibold disco-text-gray-700 disco-h-[30px] disco-leading-8",n&&"disco-cursor-text"),children:d||"--"})]})}const iv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function av({month:e,onMonthChange:t}){const n=(0,a.useRef)(null),r=[];for(let t=e.getFullYear()-2;t<=e.getFullYear()+2;t++)for(let e=0;e<12;e++)r.push({year:t,month:e});const o=r.findIndex(t=>t.year===e.getFullYear()&&t.month===e.getMonth());return(0,a.useEffect)(()=>{n.current&&-1!==o&&(n.current.scrollTop=26*(o-Math.floor(2.5)))},[e.getFullYear(),e.getMonth()]),(0,Nl.jsx)("div",{ref:n,className:"disco-flex-shrink-0 disco-overflow-y-auto",style:{width:28,height:130,scrollbarWidth:"none",msOverflowStyle:"none"},children:r.map((n,r)=>{const o=n.year===e.getFullYear()&&n.month===e.getMonth();return(0,Nl.jsx)("div",{onClick:()=>t(new Date(n.year,n.month,1)),style:{height:26},className:bl("disco-flex disco-cursor-pointer disco-items-center disco-justify-center disco-rounded disco-text-[9px] disco-transition-colors",o?"disco-font-bold disco-text-[rgba(74,74,74,0.9)]":"disco-text-[rgba(74,74,74,0.3)] hover:disco-text-[rgba(74,74,74,0.7)]"),children:iv[n.month]},r)})})}const sv={root:"disco-p-0",months:"disco-flex disco-flex-col",month:"disco-flex disco-flex-col disco-gap-1",month_caption:"disco-relative disco-flex disco-h-7 disco-items-center disco-justify-center",caption_label:"disco-text-[11px] disco-font-semibold disco-text-[rgba(74,74,74,0.85)] disco-select-none",nav:"disco-absolute disco-inset-x-0 disco-top-0 disco-flex disco-items-center disco-justify-between",button_previous:"disco-flex disco-h-8 disco-w-8 disco-items-center disco-justify-center disco-rounded disco-text-[rgba(74,74,74,0.4)] disco-transition-colors hover:disco-text-[rgba(74,74,74,0.8)] disabled:disco-opacity-30 disco-z-10",button_next:"disco-flex disco-h-8 disco-w-8 disco-items-center disco-justify-center disco-rounded disco-text-[rgba(74,74,74,0.4)] disco-transition-colors hover:disco-text-[rgba(74,74,74,0.8)] disabled:disco-opacity-30 disco-z-10",weekdays:"disco-flex",weekday:"disco-flex disco-h-[26px] disco-w-[26px] disco-items-center disco-justify-center disco-select-none disco-text-[9px] disco-font-medium disco-text-[rgba(74,74,74,0.4)]",weeks:"disco-flex disco-flex-col",week:"disco-flex",day:"disco-flex disco-h-[26px] disco-w-[26px] disco-items-center disco-justify-center disco-p-0",range_start:"disco-rounded-l-full disco-bg-[rgba(8,200,137,0.12)]",range_end:"disco-rounded-r-full disco-bg-[rgba(8,200,137,0.12)]",range_middle:"disco-rounded-none disco-bg-[rgba(8,200,137,0.12)]",today:"",outside:"",disabled:"disco-opacity-30 disco-pointer-events-none",hidden:"disco-invisible",selected:""},cv=({onApply:e})=>{const t=new Date,n=new Date(t.getFullYear(),t.getMonth()-1,1),{startDate:r,endDate:o}=D(e=>e.dateRange),[i,s]=(0,a.useState)({from:ns(r,"yyyy-MM-dd"),to:ns(o,"yyyy-MM-dd")}),[c,l]=(0,a.useState)(n),[u,d]=(0,a.useState)(t),f=i.from&&i.to&&iy(i.to,i.from)>=2,p=i.from&&i.to&&!f,h=i.from?[{before:hm(i.from,-2)},{after:hm(i.from,2)}]:[],m={mode:"range",selected:i,onSelect:e=>s(e??{from:void 0,to:void 0}),showOutsideDays:!0,disabled:h,classNames:sv,components:{DayButton:ay,Chevron:({orientation:e})=>"left"===e?(0,Nl.jsx)(em,{className:"disco-h-4 disco-w-4"}):(0,Nl.jsx)(Rl,{className:"disco-h-4 disco-w-4"})}};return(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-col disco-gap-3",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-gap-4",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-1 disco-flex-col",children:[(0,Nl.jsx)(ov,{label:"From",date:i.from,onDateChange:e=>{i.to&&vm(e,i.to)?s({from:e,to:void 0}):s(t=>({...t,from:e})),l(e)}}),(0,Nl.jsxs)("div",{className:"disco-relative disco-flex disco-items-start disco-gap-1",children:[(0,Nl.jsx)(ry,{...m,month:c,onMonthChange:l}),(0,Nl.jsx)("div",{style:{paddingTop:62},children:(0,Nl.jsx)(av,{month:c,onMonthChange:l})})]})]}),(0,Nl.jsx)("div",{className:"disco-w-px disco-self-stretch disco-bg-[#e5e7eb]"}),(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-1 disco-flex-col",children:[(0,Nl.jsx)(ov,{label:"To",date:i.to,onDateChange:e=>{i.from&&bm(e,i.from)?s({from:void 0,to:e}):s(t=>({...t,to:e})),d(e)}}),(0,Nl.jsxs)("div",{className:"disco-relative disco-flex disco-items-start disco-gap-1",children:[(0,Nl.jsx)(ry,{...m,month:u,onMonthChange:d}),(0,Nl.jsx)("div",{style:{paddingTop:62},children:(0,Nl.jsx)(av,{month:u,onMonthChange:d})})]})]})]}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-end disco-gap-2",children:[(0,Nl.jsx)("button",{onClick:()=>{s({from:ns(t,"yyyy-MM-dd"),to:ns(t,"yyyy-MM-dd")})},className:"disco-h-6 disco-cursor-pointer disco-rounded-[5px] disco-bg-[#f8f8f8] disco-px-3 disco-text-[10px] disco-font-medium disco-text-[#8a8a8a] disco-transition-colors hover:disco-bg-[#efefef]",children:"Clear"}),(0,Nl.jsx)("button",{onClick:()=>{i.from&&i.to&&e({startDate:i.from,endDate:i.to})},disabled:!p,className:bl("disco-h-6 disco-cursor-pointer disco-rounded-[5px] disco-bg-[#08c889] disco-px-3 disco-text-[10px] disco-font-medium disco-text-white disco-transition-colors hover:disco-bg-[#07b87c]",!p&&"disco-cursor-not-allowed disco-opacity-50"),children:"Apply"})]})]})},lv=[{label:"Today",days:0},{label:"Yesterday",days:1},{label:"Last 7 days",days:7},{label:"Last 28 days",days:28},{label:"Last 90 days",days:90}];function uv(e){return new Intl.DateTimeFormat("en-US",{month:"short",day:"2-digit",year:"numeric"}).format(e)}function dv(e){const t=new Date;if(0===e)return{start:t,end:t};if(1===e){const e=new Date(t);return e.setDate(t.getDate()-1),{start:e,end:e}}const n=new Date(t);return n.setDate(t.getDate()-e+1),{start:n,end:t}}function fv(e){return ns(e,"yyyy-MM-dd")}const pv=()=>{const e=S(),{startDate:t,endDate:n}=D(us),[r,o]=(0,a.useState)(!1),[i,s]=(0,a.useState)("list"),[c,l]=(0,a.useState)("Last 28 days"),[u,d]=(0,a.useState)(!1),f=lv.find(e=>e.label===c)??lv[3],{start:p,end:h}=(0,a.useMemo)(()=>u?{start:new Date(t),end:new Date(n)}:dv(f.days),[u,t,n,f]),m=u?`${ns(new Date(t),"MMM dd, yyyy")} - ${ns(new Date(n),"MMM dd, yyyy")}`:f.days<=1?uv(p):`${uv(p)} - ${uv(h)}`,g=u?"Custom":c;return(0,Nl.jsxs)(Bd,{open:r,onOpenChange:e=>{o(e),e||s("list")},children:[(0,Nl.jsxs)(Hf,{className:bl("disco-inline-flex disco-h-7 disco-cursor-pointer disco-items-center disco-gap-1.5","disco-rounded-[6px] disco-border disco-border-[#d6d6d6] disco-bg-white","disco-px-2.5 disco-text-xs disco-text-[#7e7e7e]","disco-transition-colors hover:disco-bg-transparent hover:disco-text-[#7e7e7e]","focus:disco-outline-none"),children:[g,(0,Nl.jsx)(Jh,{className:bl("disco-size-3 disco-text-[#7e7e7e] disco-transition-transform disco-duration-200",r&&"disco-rotate-180")})]}),(0,Nl.jsx)(ep,{children:(0,Nl.jsx)(bh,{side:"bottom",align:"end",sideOffset:6,style:{zIndex:99999},children:(0,Nl.jsx)(Xh,{className:bl("disco-overflow-hidden disco-rounded-[8px] disco-border disco-border-[#e5e7eb] disco-bg-white","disco-shadow-[0px_6px_5px_0px_rgba(0,0,0,0.05)]","custom"===i?"disco-w-auto disco-p-4":"disco-w-[300px] disco-pb-[18px] disco-pr-px disco-pt-[14px]"),children:"list"===i?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsxs)("div",{className:"disco-px-6",children:[(0,Nl.jsx)("p",{className:"disco-text-[12px] disco-font-normal disco-not-italic disco-tracking-[-0.12px] disco-text-[rgba(74,74,74,0.8)]",children:g}),(0,Nl.jsx)("p",{className:"disco-mt-[6px] disco-text-[14px] disco-font-bold disco-not-italic disco-tracking-[-0.14px] disco-text-black",children:m})]}),(0,Nl.jsx)("div",{className:"disco-my-3 disco-h-px disco-bg-[#e5e7eb]"}),(0,Nl.jsx)("div",{className:"disco-flex disco-flex-col",children:lv.map(t=>{const n=!u&&c===t.label;return(0,Nl.jsx)("button",{onClick:()=>(t=>{const n=lv.find(e=>e.label===t),{start:r,end:i}=dv(n.days);e(ls({startDate:fv(r),endDate:fv(i)})),l(t),d(!1),o(!1),s("list")})(t.label),className:bl("disco-w-full disco-cursor-pointer disco-px-[23px] disco-py-[8px] disco-text-left","disco-text-[14px] disco-not-italic disco-tracking-[-0.14px] disco-transition-colors",n?"disco-font-bold disco-text-[#08c889]":"disco-font-semibold disco-text-[rgba(74,74,74,0.8)] hover:disco-text-[rgba(74,74,74,1)]"),children:t.label},t.label)})}),(0,Nl.jsx)("div",{className:"disco-my-1 disco-h-px disco-bg-[#e5e7eb]"}),(0,Nl.jsx)("button",{onClick:()=>s("custom"),className:bl("disco-w-full disco-cursor-pointer disco-px-[23px] disco-py-[8px] disco-text-left","disco-text-[14px] disco-font-semibold disco-not-italic disco-tracking-[-0.14px]",u?"disco-font-bold disco-text-[#08c889]":"disco-text-[rgba(74,74,74,0.8)] disco-transition-colors hover:disco-text-[rgba(74,74,74,1)]"),children:"Custom..."})]}):(0,Nl.jsx)(cv,{onApply:({startDate:t,endDate:n})=>{e(ls({startDate:fv(t),endDate:fv(n)})),d(!0),l("Custom"),o(!1),s("list")},onClear:()=>{s("list")}})})})})]})},hv=[{label:"Dashboard",path:"/",end:!0},{label:"Campaigns Report",path:"/campaigns-reports"},{label:"Products",path:"/products"},{label:"Orders",path:"/orders"},{label:"Customers",path:"/customers"}],mv={"/campaigns-reports":"/campaigns-reports/","/customers":"/customers/"},gv=()=>{const{pathname:e}=Pe();return(0,Nl.jsxs)("div",{className:"disco-min-h-[calc(100vh-42px)] disco-bg-white",children:[(0,Nl.jsxs)("div",{className:bl("disco-sticky disco-top-8 disco-z-50 disco-flex disco-items-center disco-justify-between disco-border-b disco-border-[#e5e7eb] disco-bg-white disco-px-3 disco-py-[13px]"),children:[(0,Nl.jsx)("nav",{className:"disco-flex disco-items-center disco-gap-1",children:hv.map(({label:t,path:n,end:r})=>(0,Nl.jsx)(Et,{to:n,end:r,className:({isActive:t})=>bl(Sl({variant:"ghost",size:"sm"}),"disco-h-7 !disco-rounded-md disco-px-3 disco-text-sm disco-font-medium disco-font-sans disco-no-underline ",t||mv[n]&&e.startsWith(mv[n])?"disco-bg-[#0dc98b] disco-text-white hover:disco-bg-[#0dc98b] hover:disco-text-white":"disco-text-gray-600 focus:!disco-text-gray-600 hover:disco-bg-transparent hover:disco-text-gray-600 focus:disco-outline-none visited:disco-outline-none"),children:t},n))}),(0,Nl.jsx)(pv,{})]}),(0,Nl.jsx)(Xl,{pathname:e,NAV_ITEMS:hv}),(0,Nl.jsx)(Xe,{})]})},yv=()=>!!DISCO.is_pro_active,vv=window.wp.i18n,bv=_l("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);function xv({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty",className:bl("disco-flex disco-w-full disco-min-w-0 disco-flex-1 disco-flex-col disco-items-center disco-justify-center disco-gap-4 disco-rounded-xl disco-border-dashed disco-p-6 disco-text-center disco-text-balance",e),...t})}function wv({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty-header",className:bl("disco-flex disco-max-w-sm disco-flex-col disco-items-center disco-gap-2",e),...t})}const Mv=Sc("disco-mb-2 disco-flex disco-shrink-0 disco-items-center disco-justify-center [&_svg]:disco-pointer-events-none [&_svg]:disco-shrink-0",{variants:{variant:{default:"disco-bg-transparent",icon:"disco-flex disco-size-8 disco-shrink-0 disco-items-center disco-justify-center disco-rounded-lg disco-bg-muted disco-text-foreground [&_svg:not([class*=size-])]:disco-size-4"}},defaultVariants:{variant:"default"}});function jv({className:e,variant:t="default",...n}){return(0,Nl.jsx)("div",{"data-slot":"empty-icon","data-variant":t,className:bl(Mv({variant:t,className:e})),...n})}function Ov({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty-title",className:bl("disco- disco-text-sm disco-font-medium disco-tracking-tight",e),...t})}function Nv({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty-description",className:bl("disco-text-sm/relaxed disco-text-muted-foreground [&>a]:disco-underline [&>a]:disco-underline-offset-4 [&>a:hover]:disco-text-primary",e),...t})}const Sv=_l("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Ev=({title:e,description:t})=>(0,Nl.jsx)(xv,{className:bl("disco-bg-white disco-rounded-xl disco-border disco-border-[#e5e7eb] disco-overflow-hidden disco-py-10"),children:(0,Nl.jsxs)(wv,{children:[(0,Nl.jsx)(jv,{variant:"icon",children:(0,Nl.jsx)(Sv,{className:"disco-size-8 disco-text-red-400"})}),(0,Nl.jsx)(Ov,{children:(0,vv.__)(`${e} Not Found!`,"disco")||"No Data Found!"}),(0,Nl.jsx)(Nv,{children:(0,vv.__)(t,"disco")})]})}),kv=_l("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Dv=({label:e,title:t,description:n,showIcon:r=!1,size:o="default",position:i="disco-inset-0",rounded:a="disco-rounded-[10px]",className:s,style:c,titleClassName:l})=>{const u="lg"===o;return(0,Nl.jsxs)("div",{style:c,className:bl("disco-absolute disco-z-10 disco-flex disco-flex-col disco-items-center disco-justify-center disco-gap-3 disco-bg-white/80 disco-px-6 disco-text-center disco-backdrop-blur-[2px]",i,a,s),children:[(r||t||n)&&(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-col disco-items-center disco-gap-1.5",children:[(r||t)&&(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2",children:[r&&(0,Nl.jsx)(kv,{className:"disco-size-[18px] disco-text-[#1f2937]",strokeWidth:2.5}),t&&(0,Nl.jsx)("p",{className:bl("disco-text-[#1f2937]",l??(u?"disco-text-2xl disco-font-bold disco-tracking-tight":"disco-text-base disco-font-medium")),children:t})]}),n&&(0,Nl.jsx)("p",{className:"disco-max-w-md disco-text-sm disco-text-[#6b7280]",children:n})]}),(0,Nl.jsx)(El,{onClick:()=>window.open("https://discoplugin.com/?utm_source=analytics&utm_medium=Analytics-Free&utm_id=free-to-pro","_blank"),className:bl("disco-rounded disco-bg-primary disco-font-semibold disco-text-white disco-shadow-[3px_4px_2px_rgba(0,0,0,0.07)] hover:disco-bg-primary-dark",u&&"disco-h-auto disco-px-6 disco-py-3 disco-text-base"),children:e})]})},Iv=_l("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function Av({className:e,...t}){return(0,Nl.jsx)("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:bl("disco-flex disco-w-fit disco-justify-center",e),...t})}function Tv({className:e,...t}){return(0,Nl.jsx)("ul",{"data-slot":"pagination-content",className:bl("disco-flex disco-flex-row disco-items-center disco-gap-1",e),...t})}function Cv({...e}){return(0,Nl.jsx)("li",{"data-slot":"pagination-item",...e})}function Pv({className:e,isActive:t,size:n="icon-sm",...r}){return(0,Nl.jsx)("button",{type:"button","aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:bl(Sl({variant:"ghost",size:n}),t?"disco-bg-[#47cd89] disco-text-white hover:disco-bg-[#47cd89]/90 hover:disco-text-white":"disco-text-[#6b7280]",e),...r})}function zv({className:e,...t}){return(0,Nl.jsx)(Pv,{"aria-label":"Go to previous page",className:e,...t,children:(0,Nl.jsx)(em,{})})}function _v({className:e,...t}){return(0,Nl.jsx)(Pv,{"aria-label":"Go to next page",className:e,...t,children:(0,Nl.jsx)(Rl,{})})}function Rv({className:e,...t}){return(0,Nl.jsxs)("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:bl("disco-flex disco-size-7 disco-items-center disco-justify-center disco-text-[#6b7280]",e),...t,children:[(0,Nl.jsx)(Iv,{className:"disco-size-4"}),(0,Nl.jsx)("span",{className:"disco-sr-only",children:"More pages"})]})}const Lv=(e,t)=>Array.from({length:t-e+1},(t,n)=>e+n),Uv=({totalPages:e,page:t,onPageChange:n,disabled:r=!1})=>{const o=function(e,t){return t<=7?Lv(1,t):e<=4?[1,2,3,4,5,"ellipsis",t]:e>=t-3?[1,"ellipsis",...Lv(t-4,t)]:[1,"ellipsis",e-1,e,e+1,"ellipsis",t]}(t,e);return(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-px-4 disco-py-2.5 disco-border-t disco-border-[#f3f4f6]",children:[(0,Nl.jsxs)("span",{className:"disco-text-xs disco-text-[#9ca3af]",children:["Showing ",t," of ",e]}),e>1&&(0,Nl.jsx)(Av,{"aria-disabled":r,className:bl("disco-border disco-border-primary disco-py-1 disco-px-2 disco-rounded-lg",r&&"disco-pointer-events-none disco-opacity-50"),children:(0,Nl.jsxs)(Tv,{children:[(0,Nl.jsx)(Cv,{children:(0,Nl.jsx)(zv,{onClick:()=>n(t-1),disabled:r||t<=1})}),o.map((e,o)=>"ellipsis"===e?(0,Nl.jsx)(Cv,{children:(0,Nl.jsx)(Rv,{})},`ellipsis-${o}`):(0,Nl.jsx)(Cv,{children:(0,Nl.jsx)(Pv,{isActive:e===t,onClick:()=>n(e),disabled:r,children:e})},e)),(0,Nl.jsx)(Cv,{children:(0,Nl.jsx)(_v,{onClick:()=>n(t+1),disabled:r||t>=e})})]})})]})},Yv=({active:e,dir:t})=>(0,Nl.jsx)("span",{className:"disco-ml-0.5 disco-text-[10px]",children:e?"asc"===t?"↑":"↓":"↕"}),Fv=({columns:e,data:t=[],renderRow:n,title:r,total:o=0,searchPlaceholder:i="Search...",search:s="",onSearchChange:c,sortKey:l,sortDir:u="desc",onSort:d,page:f=1,totalPages:p=1,onPageChange:h,isLoading:m=!1,rowKey:g="id",cellPadding:y="disco-px-4",className:v="",locked:b=!1,visibleRows:x=2,lockOverlay:w})=>{const M=w??{size:"lg",label:(0,vv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,vv.__)("Upgrade to Disco Pro","disco")})," ",(0,vv.__)("to see which products respond best to discounts — and which ones you're over-discounting.","disco")]})},j=(0,a.useRef)(null),[O,N]=(0,a.useState)(null),S=b&&!m&&t.length>x;return(0,a.useLayoutEffect)(()=>{if(!S||!j.current)return void N(null);const e=j.current.querySelectorAll("tbody > tr")[x];if(!e)return void N(null);const t=j.current.getBoundingClientRect().top;N(e.getBoundingClientRect().top-t)},[S,t,x]),(0,Nl.jsxs)("div",{className:bl(`disco-bg-white disco-rounded-xl disco-border disco-border-[#e5e7eb] disco-overflow-hidden ${v}`),children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-px-4 disco-py-3 disco-border-b disco-border-[#f3f4f6]",children:[(0,Nl.jsxs)("span",{className:"disco-text-sm disco-font-semibold disco-text-[#1f2937]",children:[(0,vv.__)(r),(0,Nl.jsxs)("span",{className:"disco-text-[#9ca3af] disco-font-normal disco-text-xs",children:["(",o,")"]})]}),(0,Nl.jsxs)("div",{className:"disco-relative",children:[(0,Nl.jsx)(bv,{className:"disco-absolute disco-left-2.5 disco-top-1/2 disco--translate-y-1/2 disco-size-3 disco-text-[#9ca3af]"}),(0,Nl.jsx)("input",{type:"text",placeholder:i,value:s,onChange:e=>c(e.target.value),className:"!disco-pl-7 disco-pr-3 disco-py-1.5 disco-text-xs disco-border !disco-border-gray-300 !disco-rounded-lg disco-bg-gray-100 disco-text-gray-500 placeholder:disco-text-gray-400 !disco-outline-none focus:!disco-border-primary disco-w-44 focus:!disco-shadow-none",disabled:b})]})]}),(0,Nl.jsxs)("div",{ref:j,className:"disco-relative disco-overflow-x-auto",style:S&&null!==O?{minHeight:O+200}:void 0,children:[S&&null!==O&&(0,Nl.jsx)(Dv,{...M,position:"disco-inset-x-0 disco-bottom-0",rounded:"disco-rounded-none",className:"disco-bg-white/[0.94]",style:{top:O}}),0!==t.length||m?(0,Nl.jsxs)("table",{className:"disco-w-full disco-text-xs",children:[(0,Nl.jsx)("thead",{children:(0,Nl.jsx)("tr",{className:"disco-bg-[#f9fafb] disco-border-b disco-border-[#f3f4f6]",children:e.map(e=>(0,Nl.jsxs)("th",{onClick:()=>!b&&e.sortable&&d(e.key),className:bl(y,"disco-py-2.5 disco-text-left disco-font-semibold disco-tracking-[0.06em] disco-uppercase disco-text-[10px] disco-whitespace-nowrap",e.sortable&&"disco-cursor-pointer disco-select-none",l===e.key?"disco-text-[#2fa86d]":"disco-text-[#9ca3af]"),children:[e.label,e.sortable&&(0,Nl.jsx)(Yv,{active:l===e.key,dir:u})]},e.key))})}),(0,Nl.jsx)("tbody",{children:m?Array.from({length:5}).map((t,n)=>(0,Nl.jsx)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0",children:(0,Nl.jsx)("td",{colSpan:e.length,className:bl(y,"disco-py-3"),children:(0,Nl.jsx)("div",{className:"disco-h-5 disco-animate-pulse disco-rounded disco-bg-[#f3f4f6]"})})},n)):t.map((e,t)=>n(e,t,((e,t)=>"function"==typeof g?g(e):e[g]??t)(e,t)))})]}):(0,Nl.jsx)(Ev,{title:r.split(" ").at(-1)})]}),(0,Nl.jsx)(Uv,{page:f,totalPages:p,onPageChange:h,disabled:b})]})},Wv=[{key:"name",label:"Customer"},{key:"email",label:"Email"},{key:"orders",label:"Order",sortable:!0},{key:"total_spent",label:"Total",sortable:!0}],Bv=(e,t)=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)("span",{className:"disco-font-medium disco-text-[#0dc98b]",children:e.name})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:e.email}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:xl(e.total_spent)})]},t),Qv=({campaignId:e})=>{const t=yv(),n=D(ds),[r,o]=(0,a.useState)(""),[i,s]=(0,a.useState)("total_spent"),[c,l]=(0,a.useState)("desc"),[u,d]=(0,a.useState)(1),{data:f,isLoading:p,isFetching:h}=Hl({...n,campaign_id:e,search:r||void 0,sort_by:i,order:c,page:u,limit:t?20:10}),m=f?.data,g=f?.collection?.total_pages??1;return(0,Nl.jsx)(Fv,{columns:Wv,data:m,renderRow:Bv,title:"Recent customers on this Campaign",total:f?.collection?.total??0,searchPlaceholder:"Search customers...",search:r,onSearchChange:o,sortKey:i,sortDir:c,onSort:e=>{i===e?l(e=>"asc"===e?"desc":"asc"):(s(e),l("desc")),d(1)},page:u,totalPages:g,onPageChange:d,isLoading:p||h,className:"disco-rounded-tl-none disco-rounded-tr-none",locked:!t})},qv={Product:{bg:"#f0fdf4",text:"#15803d"},Shipping:{bg:"#eff6ff",text:"#1d4ed8"},Bulk:{bg:"#f5f3ff",text:"#6d28d9"},BOGO:{bg:"#fff7ed",text:"#c2410c"},Bundle:{bg:"#fdf4ff",text:"#86198f"},Cart:{bg:"#fff1f2",text:"#be123c"}},Gv=({intent:e})=>{const t=qv[e]??{bg:"#f3f4f6",text:"#6b7280"};return(0,Nl.jsx)("span",{className:"disco-inline-flex disco-items-center disco-px-2 disco-py-0.5 disco-rounded disco-text-[10px] disco-font-semibold disco-tracking-wide disco-uppercase",style:{backgroundColor:t.bg,color:t.text},children:e})},$v={active:{dot:"#16a34a",text:"#374151"},expired:{dot:"#9ca3af",text:"#6b7280"},deleted:{dot:"#ef4444",text:"#374151"}},Hv=({status:e})=>{let t=$v[e]||{dot:"#d1d5db",text:"#6b7280"};return(0,Nl.jsxs)("span",{className:"disco-inline-flex disco-items-center disco-gap-1.5 disco-text-xs",style:{color:t.text},children:[(0,Nl.jsx)("span",{className:"disco-size-[6px] disco-rounded-full disco-shrink-0",style:{backgroundColor:t.dot}}),e]})},Vv=({campaign:e})=>{const{dotColor:t,name:n,intent:r,dateRange:o,status:i}=e;return(0,Nl.jsx)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-px-4 disco-py-4 disco-flex disco-items-center disco-justify-between",children:(0,Nl.jsxs)("div",{className:"disco-flex disco-items-start disco-gap-3",children:[(0,Nl.jsx)("span",{className:"disco-size-[9px] disco-rounded-[3px] disco-shrink-0 disco-mt-1.5",style:{backgroundColor:t}}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h2",{className:"disco-text-sm disco-font-bold disco-text-[#111827] disco-tracking-tight disco-leading-snug",children:n}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-1.5 disco-mt-1.5 disco-flex-wrap",children:[(0,Nl.jsx)(Gv,{intent:r}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-text-gray-500",children:o}),(0,Nl.jsx)(Hv,{status:i})]})]})]})})},Kv=_l("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]),Zv=_l("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]),Xv=_l("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),Jv=_l("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),eb=({icon:e,iconBg:t,label:n,value:r,locked:o=!1})=>(0,Nl.jsxs)("div",{className:"disco-relative disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-px-4 disco-py-3.5 disco-flex disco-items-center disco-gap-3 disco-flex-1 disco-overflow-hidden",children:[(0,Nl.jsx)("span",{className:"disco-size-8 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-text-base disco-shrink-0",style:{backgroundColor:t},children:(0,Nl.jsx)(e,{className:"disco-size-4"})}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-text-[10px] disco-font-semibold disco-text-[#9ca3af] disco-uppercase disco-tracking-wider disco-leading-none",children:n}),(0,Nl.jsx)("p",{className:"disco-text-base disco-font-bold disco-text-[#111827] disco-mt-1 disco-leading-tight",children:r})]}),o&&(0,Nl.jsx)("div",{className:"disco-absolute disco-inset-0 disco-flex disco-items-center disco-justify-center disco-bg-white/80 disco-backdrop-blur-[2px]",children:(0,Nl.jsxs)("span",{className:"disco-inline-flex disco-items-center disco-gap-1 disco-rounded-md disco-bg-primary disco-px-2 disco-py-1 disco-text-[11px] disco-font-semibold disco-text-white",children:[(0,Nl.jsx)(Jv,{className:"disco-size-3"}),(0,vv.__)("Pro feature","disco")]})})]}),tb=({revenue:e,averageOrderValue:t,totalOrders:n,customers:r})=>{const o=yv(),i=[{icon:Kv,iconBg:"#dcfce7",label:(0,vv.__)("Revenue","disco"),value:xl(e)},{icon:Zv,iconBg:"#FEF9C3",label:(0,vv.__)("Total Orders","disco"),value:n},{icon:Xv,iconBg:"#F8C3FE4A",label:(0,vv.__)("Customers","disco"),value:r},{icon:Zv,iconBg:"#DBEAFE",label:(0,vv.__)("Avg Order Value","disco"),value:xl(t)}];return(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:i.map((e,t)=>(0,Nl.jsx)(eb,{...e,locked:!o&&t>0},e.label))})},nb=_l("megaphone",[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]),rb=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-[60vh] disco-flex disco-flex-col disco-items-center disco-justify-center disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)(nb,{className:"disco-size-12 disco-text-[#d1d5db] disco-mb-4"}),(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:"Campaign not found"}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-1",children:"This campaign doesn't exist or has no order history."}),(0,Nl.jsx)(St,{to:"/campaigns-reports",className:"disco-mt-4 disco-inline-flex disco-items-center disco-px-3 disco-py-1.5 disco-text-xs disco-font-medium disco-text-white disco-bg-primary disco-rounded-lg disco-no-underline hover:disco-bg-primary-dark hover:disco-text-white disco-transition-colors",children:"Back to Campaigns"})]}),ob=aa.injectEndpoints({endpoints:e=>({getProducts:e.query({query:({date_from:e,date_to:t,search:n,sort_by:r="revenue",order:o="desc",campaign_id:i,customer_id:a,order_id:s,page:c=1,limit:l=10}={})=>({url:"/products",params:{date_from:e,date_to:t,search:n,sort_by:r,order:o,campaign_id:i,customer_id:a,order_id:s,page:c,limit:l}})}),getProduct:e.query({query:({id:e,date_from:t,date_to:n})=>({url:`/products/${e}`,params:{date_from:t,date_to:n}})})})}),{useGetProductsQuery:ib,useGetProductQuery:ab}=ob,sb=[{key:"name",label:"Product"},{key:"category",label:"Category"},{key:"quantity",label:"Quantity",sortable:!0},{key:"customers",label:"Customers",sortable:!0},{key:"revenue",label:"Net sale",sortable:!0}],cb={quantity:"quantity",customers:"customers",revenue:"revenue"},lb=({category:e})=>(0,Nl.jsx)("span",{className:"disco-inline-flex disco-items-center disco-px-2 disco-py-0.5 disco-rounded disco-text-[10px] disco-text-[#4b5563] disco-bg-[#f3f4f6]",children:e}),ub=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-2",children:[e.image?(0,Nl.jsx)("img",{src:e.image,alt:e.name,className:"disco-size-7 disco-rounded-lg disco-object-cover disco-shrink-0"}):(0,Nl.jsx)("span",{className:"disco-size-7 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-bg-[#f3f4f6] disco-text-sm disco-shrink-0",children:"🛍️"}),(0,Nl.jsx)("span",{className:"disco-font-medium disco-text-[#111827]",children:jl(e.name,40)})]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:e.categories?.[0]?(0,Nl.jsx)(lb,{category:e.categories[0].name}):(0,Nl.jsx)("span",{className:"disco-text-[#9ca3af]",children:"—"})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.total_quantity}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.total_customers}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:xl(e.total_revenue)})]},e.id),db=({campaignId:e})=>{const t=yv(),n=D(ds),[r,o]=(0,a.useState)("revenue"),[i,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),[u,d]=(0,a.useState)(1),{data:f,isLoading:p,isFetching:h}=ib({...n,campaign_id:e,sort_by:cb[r]??"revenue",order:i,page:u,search:c,limit:t?20:10}),m=f?.data??[],g=f?.collection?.total_pages??1;return(0,Nl.jsx)(Fv,{columns:sb,data:m,renderRow:ub,title:"Recent products on this Campaign",total:f?.collection?.total??0,searchPlaceholder:"Search products...",search:c,onSearchChange:l,sortKey:r,sortDir:i,onSort:e=>{e===r?s("asc"===i?"desc":"asc"):(o(e),s("desc"))},page:u,totalPages:g,onPageChange:d,isLoading:p||h,className:"disco-rounded-tl-none disco-rounded-tr-none",locked:!t})},fb=["#ef4444","#3b82f6","#8b5cf6","#f59e0b","#10b981"],pb=[{id:"products",label:(0,vv.__)("Products","disco")},{id:"customers",label:(0,vv.__)("Customers","disco")}],hb=()=>{const{campaignId:e}=Ue(),t=D(ds),{data:n,isLoading:r,isError:o}=Gl({id:e,...t}),[i,s]=(0,a.useState)("products");if(o)return(0,Nl.jsx)(rb,{});const c=n?{dotColor:fb[n.campaign_id%fb.length],name:n.campaign_name,intent:n.intent,dateRange:`${wl(n.valid_date?.from)} - ${wl(n.valid_date?.to)}`,status:n.status,totalOrders:n.total_orders,customers:n.total_customers,revenue:xl(n.revenue)}:null;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6 disco-space-y-3",children:[r?(0,Nl.jsxs)("div",{className:"disco-space-y-3",children:[(0,Nl.jsx)("div",{className:"disco-h-16 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"}),(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:Array.from({length:2}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-flex-1 disco-h-20 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"},t))})]}):c?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Vv,{campaign:c}),(0,Nl.jsx)(tb,{revenue:n.revenue,averageOrderValue:n.average_order_value,totalOrders:n.total_orders,customers:n.total_customers})]}):null,(0,Nl.jsxs)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-overflow-hidden",children:[(0,Nl.jsx)("div",{className:"disco-flex disco-gap-0 disco-border-b disco-border-[#e5e7eb] disco-px-4 disco-pt-3",children:pb.map(e=>(0,Nl.jsx)("button",{onClick:()=>s(e.id),className:bl("disco-px-3 disco-pb-2.5 disco-text-xs disco-font-medium disco-border-b-2 disco-transition-colors disco-mr-1",i===e.id?"disco-border-[#0dc98b] disco-text-[#0dc98b]":"disco-border-transparent disco-text-[#6b7280] hover:disco-text-[#111827]"),children:e.label},e.id))}),"products"===i?(0,Nl.jsx)(db,{embedded:!0,campaignId:e}):(0,Nl.jsx)(Qv,{embedded:!0,campaignId:e})]})]})},mb=[{key:"name",label:"Name"},{key:"intent",label:"Intent"},{key:"revenue",label:"Revenue",sortable:!0},{key:"dateRange",label:"Date Range"},{key:"orders",label:"Orders",sortable:!0},{key:"customers",label:"Customers",sortable:!0},{key:"status",label:"Status"}],gb=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-2",children:[(0,Nl.jsx)("span",{className:"disco-size-[7px] disco-rounded-[2px] disco-shrink-0",style:{backgroundColor:e.dotColor}}),(0,Nl.jsx)(St,{to:`/campaigns-reports/${e.id}`,className:"disco-font-medium disco-text-gray-900 hover:disco-text-primary focus:disco-text-primary",children:jl(e.name,30)})]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)(Gv,{intent:e.intent})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#374151]",children:e.revenue}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:e.dateRange}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.customers}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)(Hv,{status:e.status})})]},e.id),yb=({campaigns:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:o="spent",sortDir:i="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=yv();return(0,Nl.jsx)(Fv,{columns:mb,data:e,renderRow:gb,title:"Recent Campaigns",total:l,searchPlaceholder:"Search campaigns...",search:n,onSearchChange:r,sortKey:o,sortDir:i,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,locked:!d,lockOverlay:{size:"lg",label:(0,vv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,vv.__)("Upgrade to Disco Pro","disco")})," ",(0,vv.__)("to unlock your complete campaign data — including real revenue per campaign, discount ROI, and full trend history.","disco")]})}})},vb=["#ef4444","#3b82f6","#8b5cf6","#f59e0b","#10b981","#f97316","#06b6d4","#ec4899","#84cc16","#a78bfa"];function bb(e){if(!e||"Unknown"===e)return"—";const{from:t,to:n}=e;if(!t&&!n)return"—";const r=e=>e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"}):"—";return`${r(t)} – ${r(n)}`}const xb=()=>{const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)("revenue"),[o,i]=(0,a.useState)("desc"),s=D(ds),c=yv(),{data:l,isLoading:u,isFetching:d}=ql({...s,limit:c?20:10,sort_by:n,order:o,search:e||void 0,page:1}),f=(l?.data??[]).map((e,t)=>({id:e.campaign_id,name:e.campaign_name,dotColor:vb[t%vb.length],intent:e.intent,dateRange:bb(e.valid_date),orders:e.orders,customers:e.customers,revenue:xl(e.revenue),status:e.status}));return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,vv.__)("Campaigns","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,vv.__)("All discount campaigns","disco")})]}),(0,Nl.jsx)(yb,{campaigns:f,isLoading:u||d,search:e,sortKey:n,sortDir:o,onSearchChange:t,onSort:e=>{e===n?i("asc"===o?"desc":"asc"):(r(e),i("desc"))},count:l?.collection?.count,total:l?.collection?.total})]})},wb=_l("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),Mb=_l("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),jb=_l("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ob=a.createContext(void 0);function Nb(){const e=a.useContext(Ob);if(void 0===e)throw new Error(sc(13));return e}const Sb={imageLoadingStatus:()=>null},Eb=a.forwardRef(function(e,t){const{className:n,render:r,style:o,...i}=e,[s,c]=a.useState("idle"),l={imageLoadingStatus:s},u=a.useMemo(()=>({imageLoadingStatus:s,setImageLoadingStatus:c}),[s,c]),d=bc("span",e,{state:l,ref:t,props:i,stateAttributesMapping:Sb});return(0,Nl.jsx)(Ob.Provider,{value:u,children:d})}),kb={...Sb,...Dd},Db=a.forwardRef(function(e,t){const{className:n,render:r,onLoadingStatusChange:o,style:i,...s}=e,{setImageLoadingStatus:c}=Nb(),l=function(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:o}){const[i,s]=a.useState("idle");return Gs(()=>{if(!e&&!o)return s("error"),yc;let i=!0;const a=new window.Image,c=e=>()=>{i&&s(e)};return s("loading"),a.onload=c("loaded"),a.onerror=c("error"),t&&(a.referrerPolicy=t),a.crossOrigin=n??null,r&&(a.sizes=r),o&&(a.srcset=o),e&&(a.src=e),a.complete&&s(a.naturalWidth>0?"loaded":"error"),()=>{i=!1}},[e,o,r,n,t]),i}(s.src,s),u="loaded"===l,{mounted:d,transitionStatus:f,setMounted:p}=Od(u),h=a.useRef(null),m=Bs(e=>{o?.(e),c(e)});Gs(()=>{"idle"!==l&&m(l)},[l,m]),Gs(()=>()=>c("idle"),[c]),Ad({open:u,ref:h,onComplete(){u||p(!1)}});const g=bc("img",e,{state:{imageLoadingStatus:l,transitionStatus:f},ref:[t,h],props:s,stateAttributesMapping:kb,enabled:d});return d?g:null}),Ib=a.forwardRef(function(e,t){const{className:n,render:r,delay:o,style:i,...s}=e,{imageLoadingStatus:c}=Nb(),[l,u]=a.useState(void 0===o),d=gu();return a.useEffect(()=>(void 0!==o?d.start(o,()=>u(!0)):u(!0),d.clear),[d,o]),bc("span",e,{state:{imageLoadingStatus:c},ref:t,props:s,stateAttributesMapping:Sb,enabled:"loaded"!==c&&(void 0===o||l)})});function Ab({className:e,size:t="default",...n}){return(0,Nl.jsx)(Eb,{"data-slot":"avatar","data-size":t,className:bl("disco-group/avatar disco-relative disco-flex disco-size-8 disco-shrink-0 disco-rounded-full disco-select-none after:disco-absolute after:disco-inset-0 after:disco-rounded-full after:disco-border after:disco-border-border after:disco-mix-blend-darken data-[size=lg]:disco-size-10 data-[size=sm]:disco-size-6 dark:after:disco-mix-blend-lighten",e),...n})}function Tb({className:e,...t}){return(0,Nl.jsx)(Db,{"data-slot":"avatar-image",className:bl("disco-aspect-square disco-size-full disco-rounded-full disco-object-cover",e),...t})}function Cb({className:e,...t}){return(0,Nl.jsx)(Ib,{"data-slot":"avatar-fallback",className:bl("disco-flex disco-size-full disco-items-center disco-justify-center disco-rounded-full disco-bg-muted disco-text-sm disco-text-muted-foreground group-data-[size=sm]/avatar:disco-text-xs",e),...t})}const Pb={"#06b6d4":"#ecfeff","#ec4899":"#fdf2f8","#f59e0b":"#fffbeb","#f97316":"#fff7ed","#3b82f6":"#eff6ff","#84cc16":"#f7fee7","#ef4444":"#fef2f2","#a78bfa":"#f5f3ff","#8b5cf6":"#f5f3ff"},zb=({avatar:e,color:t,fallback:n})=>{const r=Pb[t]??"#f3f4f6";return(0,Nl.jsxs)(Ab,{children:[(0,Nl.jsx)(Tb,{src:e}),(0,Nl.jsx)(Cb,{style:{backgroundColor:r,color:t},children:n})]})},_b=["#06b6d4","#ec4899","#f59e0b","#f97316","#3b82f6","#84cc16","#8b5cf6","#ef4444","#a78bfa","#10b981"];function Rb(e){if(!e)return"?";const t=e.trim().split(/\s+/);return((t[0]?.[0]??"")+(t[1]?.[0]??"")).toUpperCase()}const Lb=({customer:e})=>{const{id:t,name:n,email:r,state:o,avatar:i}=e,a=_b[t%_b.length];return(0,Nl.jsxs)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-px-4 disco-py-4 disco-flex disco-items-center disco-gap-3",children:[(0,Nl.jsx)(zb,{avatar:i,fallback:Rb(n),color:a}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h2",{className:"disco-text-sm disco-font-bold disco-text-[#111827] disco-tracking-tight disco-leading-snug",children:n}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-3 disco-mt-1.5 disco-flex-wrap",children:[r&&(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1 disco-text-[10px] disco-text-[#6b7280]",children:[(0,Nl.jsx)(wb,{className:"disco-size-3 disco-text-[#9ca3af]"}),r]}),o&&(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1 disco-text-[10px] disco-text-[#6b7280]",children:[(0,Nl.jsx)(Mb,{className:"disco-size-3 disco-text-[#9ca3af]"}),o]}),(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1 disco-text-[10px] disco-text-[#9ca3af]",children:[(0,Nl.jsx)(jb,{className:"disco-size-3"}),"ID: ",t]})]})]})]})},Ub=_l("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]),Yb=({totalSpent:e,orders:t,campaignsCount:n})=>{const r=yv(),o=[{icon:Kv,iconBg:"#dcfce7",label:"Total Spent",value:xl(e)},{icon:Zv,iconBg:"#FEF9C3",label:"Orders",value:t},{icon:Ub,iconBg:"#DBEAFE",label:"Campaigns Used",value:n},{icon:Xv,iconBg:"#F8C3FE4A",label:"Avg Order Value",value:t>0?xl(e/t):"$0.00"}];return(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:o.map((e,t)=>(0,Nl.jsx)(eb,{...e,locked:!r&&t>0},e.label))})},Fb=_l("user-x",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),Wb=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-[60vh] disco-flex disco-flex-col disco-items-center disco-justify-center disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)(Fb,{className:"disco-size-12 disco-text-[#d1d5db] disco-mb-4"}),(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:"Customer not found"}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-1",children:"This customer doesn't exist or has no campaign order history."}),(0,Nl.jsx)(St,{to:"/customers",className:"disco-mt-4 disco-inline-flex disco-items-center disco-px-3 disco-py-1.5 disco-text-xs disco-font-medium disco-text-white disco-bg-primary disco-rounded-lg disco-no-underline hover:disco-bg-primary-dark hover:disco-text-white disco-transition-colors",children:"Back to Customers"})]}),Bb=aa.injectEndpoints({endpoints:e=>({getOrders:e.query({query:({date_from:e,date_to:t,search:n,sort_by:r="revenue",order:o="desc",campaign_id:i,customer_id:a,page:s=1,limit:c=10}={})=>({url:"/orders",params:{date_from:e,date_to:t,search:n,sort_by:r,order:o,campaign_id:i,customer_id:a,page:s,limit:c}})}),getOrder:e.query({query:({id:e})=>`/orders/${e}`})})}),{useGetOrdersQuery:Qb,useGetOrderQuery:qb}=Bb,Gb=a.createContext(!1),$b=a.createContext(void 0);function Hb(e){const t=a.useContext($b);if(!1===e&&void 0===t)throw new Error(sc(27));return t}function Vb({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),o=e.useState("disablePointerDismissal"),i=e.useState("modal"),s=e.useState("popupElement"),c=e.useState("floatingRootContext"),[l,u]=a.useState(0),[d,f]=a.useState(0),p=0===l,h=Xu(c,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===i?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current)return!1;if("button"in t&&0!==t.button)return!1;if("touches"in t&&1!==t.touches.length)return!1;const n=_u(t);return!(!p||o)&&(!i||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||zu(n,s)&&!n?.hasAttribute("data-base-ui-portal"))},escapeKey:p});vh(r&&!0===i,s),e.useContextCallback("onNestedDialogOpen",(e,t)=>{u(e),f(t)}),e.useContextCallback("onNestedDialogClose",()=>{u(0),f(0)}),a.useEffect(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+(n?1:0)),t?.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,l,d,t]);const m=h.reference??vc,g=h.trigger??vc,y=h.floating??vc;return Ld(e,{activeTriggerProps:m,inactiveTriggerProps:g,popupProps:y,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}const Kb={...vd,modal:td(e=>e.modal),nested:td(e=>e.nested),nestedOpenDialogCount:td(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:td(e=>e.nestedOpenDrawerCount),disablePointerDismissal:td(e=>e.disablePointerDismissal),openMethod:td(e=>e.openMethod),descriptionElementId:td(e=>e.descriptionElementId),titleElementId:td(e=>e.titleElementId),viewportElement:td(e=>e.viewportElement),role:td(e=>e.role)};class Zb extends cd{constructor(e,t,n=!1){const r=new dd,o=function(e={}){return{...fd(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);o.floatingRootContext=pd(r,t,n),super(o,{popupRef:a.createRef(),backdropRef:a.createRef(),internalBackdropRef:a.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Kb)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);const n={open:e};zd(n,e,t.trigger),this.update(n)};static useStore(e,t){return Pd(e,(e,n)=>new Zb(t,e,n),!0).store}}function Xb(e){return function(e,t="dialog"){const{children:n,open:r,defaultOpen:o=!1,onOpenChange:i,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:l=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p=null}=e,h="drawer"===t,m="alert-dialog"===t,g=!!m||l,y=m||c,v=m?"alertdialog":"dialog",b=Hb(!0),x={modal:g,disablePointerDismissal:y,nested:Boolean(b),role:v},w=Zb.useStore(d?.store,{open:o,openProp:r,activeTriggerId:p,triggerIdProp:f,...x});bd(()=>{const e=void 0===r&&!1===w.state.open&&!0===o?{open:!0,activeTriggerId:p}:null;m?w.update(e?{...x,...e}:x):e&&w.update(e)}),w.useControlledProp("openProp",r),w.useControlledProp("triggerIdProp",f),w.useSyncedValues(x),w.useContextCallback("onOpenChange",i),w.useContextCallback("onOpenChangeComplete",s);const M=w.useState("open"),j=w.useState("mounted"),O=w.useState("payload");!function(e){const{store:t,actionsRef:n}=e,r=t.useState("open");Ud(t,r),_d(t);const{forceUnmount:o}=Rd(r,t),i=a.useCallback(()=>{t.setOpen(!1,ju(Iu))},[t]);a.useImperativeHandle(n,()=>({unmount:o,close:i}),[o,i])}({store:w,actionsRef:u});const N=M||j,S=a.useMemo(()=>({store:w}),[w]);return(0,Nl.jsx)(Gb.Provider,{value:!1,children:(0,Nl.jsxs)($b.Provider,{value:S,children:[N&&(0,Nl.jsx)(Vb,{store:w,parentContext:b?.store.context,isDrawer:h}),"function"==typeof n?n({payload:O}):n]})})}(e,a.useContext(Gb)?"drawer":"dialog")}const Jb=a.forwardRef(function(e,t){const{render:n,className:r,style:o,disabled:i=!1,nativeButton:a=!0,...s}=e,{store:c}=Hb(),l=c.useState("open"),{getButtonProps:u,buttonRef:d}=lc({disabled:i,native:a});return bc("button",e,{state:{disabled:i},ref:[t,d],props:[{onClick:function(e){l&&c.setOpen(!1,ju(Eu,e.nativeEvent))}},s,u]})}),ex={...ef,...Dd},tx=a.forwardRef(function(e,t){const{render:n,className:r,style:o,forceRender:i=!1,...a}=e,{store:s}=Hb(),c=s.useState("open"),l=s.useState("nested"),u=s.useState("mounted");return bc("div",e,{state:{open:c,transitionStatus:s.useState("transitionStatus")},ref:[s.context.backdropRef,t],stateAttributesMapping:ex,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:i||!l})}),nx=a.createContext(void 0),rx=a.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=Hb(),i=o.useState("mounted"),a=o.useState("modal"),s=o.useState("open");return i||n?(0,Nl.jsx)(nx.Provider,{value:n,children:(0,Nl.jsxs)(Xf,{ref:t,...r,children:[i&&!0===a&&(0,Nl.jsx)(fh,{ref:o.context.internalBackdropRef,inert:tp(!s)}),e.children]})}):null});let ox=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),ix=function(e){return e[e.open=qd.open]="open",e[e.closed=qd.closed]="closed",e[e.startingStyle=qd.startingStyle]="startingStyle",e[e.endingStyle=qd.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const ax={...ef,...Dd,nestedDialogOpen:e=>e?{[ix.nestedDialogOpen]:""}:null},sx=a.forwardRef(function(e,t){const{render:n,className:r,style:o,finalFocus:i,initialFocus:s,...c}=e,{store:l}=Hb(),u=l.useState("descriptionElementId"),d=l.useState("disablePointerDismissal"),f=l.useState("floatingRootContext"),p=l.useState("popupProps"),h=l.useState("modal"),m=l.useState("mounted"),g=l.useState("nested"),y=l.useState("nestedOpenDialogCount"),v=l.useState("open"),b=l.useState("openMethod"),x=l.useState("titleElementId"),w=l.useState("transitionStatus"),M=l.useState("role"),j=f.useState("floatingId"),O=c.id??j;!function(){if(void 0===a.useContext(nx))throw new Error(sc(26))}(),Ad({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});const N=void 0===s?Cd(l.context.popupRef):s,S=y>0,E=l.useStateSetter("popupElement"),k=bc("div",e,{state:{open:v,nested:g,transitionStatus:w,nestedDialogOpen:S},props:[p,{id:O,"aria-labelledby":x??void 0,"aria-describedby":u??void 0,role:M,...Td,hidden:!m,onKeyDown(e){$h.has(e.key)&&e.stopPropagation()},style:{[ox.nestedDialogs]:y}},c],ref:[t,l.context.popupRef,E],stateAttributesMapping:ax});return(0,Nl.jsx)(Rh,{context:f,openInteractionType:b,disabled:!m,closeOnFocusOut:!d,initialFocus:N,returnFocus:i,modal:!1!==h,restoreFocus:"popup",children:k})}),cx=a.forwardRef(function(e,t){const{render:n,className:r,style:o,id:i,...a}=e,{store:s}=Hb(),c=jf(i);return s.useSyncedValueWithCleanup("titleElementId",c),bc("h2",e,{ref:t,props:[{id:c},a]})});function lx({...e}){return(0,Nl.jsx)(Xb,{...e})}function ux({...e}){return(0,Nl.jsx)(Jb,{...e})}function dx({className:e,...t}){return(0,Nl.jsx)(tx,{className:bl("disco-fixed disco-inset-0 disco-z-50 disco-bg-black/30 disco-backdrop-blur-[2px]","data-[starting-style]:disco-opacity-0 data-[ending-style]:disco-opacity-0 disco-transition-opacity",e),...t})}function fx({className:e,children:t,...n}){return(0,Nl.jsxs)(rx,{children:[(0,Nl.jsx)(dx,{}),(0,Nl.jsx)(sx,{className:bl("disco-fixed disco-left-1/2 disco-top-1/2 disco-z-50 disco--translate-x-1/2 disco--translate-y-1/2","disco-rounded-2xl disco-bg-white disco-shadow-xl","disco-overflow-hidden disco-outline-none","data-[starting-style]:disco-opacity-0 data-[starting-style]:disco-scale-95","data-[ending-style]:disco-opacity-0 data-[ending-style]:disco-scale-95","disco-transition-all",e),...n,children:t})]})}function px({className:e,...t}){return(0,Nl.jsx)(cx,{className:bl("disco-text-lg disco-font-semibold",e),...t})}const hx=({title:e,items:t})=>{const[n,r]=(0,a.useState)(!1);if(!t.length)return"—";if(1===t.length)return jl(t[0].name,40);const o=jl(t[0].name,30),i=t.length-1;return(0,Nl.jsxs)("span",{className:"disco-inline-flex disco-items-center disco-gap-1.5",children:[(0,Nl.jsx)("span",{children:o}),(0,Nl.jsxs)(lx,{open:n,onOpenChange:r,children:[(0,Nl.jsxs)("span",{onClick:()=>r(!0),className:"disco-inline-flex disco-items-center disco-px-1.5 disco-py-0.5 disco-text-xs disco-font-medium disco-text-primary disco-border disco-border-primary disco-rounded-md disco-cursor-pointer disco-whitespace-nowrap",children:["+",i," More"]}),(0,Nl.jsxs)(fx,{className:"disco-w-full disco-max-w-sm disco-p-0",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-px-4 disco-py-3 disco-border-b disco-border-gray-100",children:[(0,Nl.jsxs)(px,{className:"disco-text-sm disco-font-semibold",children:[e," (",t.length,")"]}),(0,Nl.jsx)(ux,{className:"disco-text-gray-400 hover:disco-text-gray-600 disco-text-lg disco-leading-none disco-cursor-pointer disco-outline-none",children:"✕"})]}),(0,Nl.jsx)("div",{className:"disco-max-h-60 disco-overflow-y-auto disco-py-1",children:t.map((e,n)=>(0,Nl.jsx)("div",{className:"disco-px-4 disco-py-2 disco-text-sm disco-text-gray-700"+(n<t.length-1?" disco-border-b disco-border-gray-100":""),children:jl(e.name,50)},e.id))})]})]})]})},mx=[{key:"id",label:"Order"},{key:"campaign",label:"Campaign"},{key:"intent",label:"Intent Type"},{key:"total_spent",label:"Spent",sortable:!0},{key:"products",label:"Products"},{key:"quantity",label:"Quantity",sortable:!0},{key:"date",label:"Date",sortable:!0}],gx={revenue:"revenue",date:"date"},yx=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-transition-colors",children:[(0,Nl.jsxs)("td",{className:"disco-px-4 disco-py-3 disco-font-mono disco-text-[#9ca3af]",children:["#",e.id]}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#2fa86d] disco-whitespace-nowrap",children:jl((e.campaigns??[]).map(e=>e.name).join(", "),30)||"—"}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-gray-500 disco-font-medium disco-whitespace-nowrap",children:e?.campaigns[0]?.intent}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:xl(e.total_spent)}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:(0,Nl.jsx)(hx,{title:"Products",items:e.products??[]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:e.quantity}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#9ca3af] disco-whitespace-nowrap",children:wl(e.date)})]},e.id),vx=({customerId:e})=>{const t=yv(),n=D(ds),[r,o]=(0,a.useState)("date"),[i,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),[u,d]=(0,a.useState)(1),{data:f,isLoading:p,isFetching:h}=Qb({...n,customer_id:e,sort_by:gx[r]??"revenue",order:i,page:u,search:c,limit:t?20:10}),m=f?.data??[],g=f?.collection?.total_pages??1,y=f?.collection?.total??0;return(0,Nl.jsx)(Fv,{columns:mx,data:m,renderRow:yx,title:"Recent orders from this Customer",total:y,searchPlaceholder:"Search by id...",search:c,onSearchChange:l,sortKey:r,sortDir:i,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(o(e),s("desc")),d(1)},page:u,totalPages:g,onPageChange:d,isLoading:p||h,locked:!t,lockOverlay:{size:"lg",label:(0,vv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,vv.__)("Upgrade to Disco Pro","disco")})," ",(0,vv.__)("to unlock your complete campaign data — including real revenue per campaign, discount ROI, and full trend history.","disco")]})}})},bx=()=>{const{customerId:e}=Ue(),t=D(ds),{data:n,isLoading:r}=Vl({id:e,...t}),o=n?.data??null;return r||o?(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6 disco-space-y-3",children:[r?(0,Nl.jsxs)("div",{className:"disco-space-y-3",children:[(0,Nl.jsx)("div",{className:"disco-h-16 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"}),(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:Array.from({length:4}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-flex-1 disco-h-20 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"},t))})]}):o?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Lb,{customer:o}),(0,Nl.jsx)(Yb,{totalSpent:o.total_spent,orders:o.orders,campaignsCount:(o.campaigns??[]).length})]}):null,(0,Nl.jsx)(vx,{customerId:e})]}):(0,Nl.jsx)(Wb,{})},xx=[{key:"name",label:"Customer"},{key:"state",label:"State"},{key:"campaigns",label:"Campaigns Used"},{key:"orders",label:"Orders",sortable:!0},{key:"spent",label:"Spent",sortable:!0}],wx=(e,t)=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5",children:"0"!=e.id?(0,Nl.jsxs)(St,{to:`/customers/${e.id}`,className:"disco-flex disco-items-center disco-gap-2.5 disco-group",children:[(0,Nl.jsx)(zb,{avatar:e.avatar,fallback:e.initials,color:e.color}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-font-medium disco-text-gray-900 disco-leading-tight group-hover:disco-text-primary disco-transition-colors",children:e.name}),(0,Nl.jsx)("p",{className:"disco-text-gray-400 disco-text-[10px] disco-mt-0.5 group-hover:disco-text-primary disco-transition-colors",children:e.email})]})]}):(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2.5",children:[(0,Nl.jsx)(zb,{avatar:e.avatar,fallback:e.initials,color:e.color}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsxs)("p",{className:"disco-font-medium disco-text-gray-900 disco-leading-tight",children:[e.name||"Guest",(0,Nl.jsx)("span",{className:"disco-text-gray-400 disco-text-[8px] disco-border disco-rounded-full disco-bg-orange-100 disco-border-orange-200 disco-px-2 disco-py-0.5 disco-ml-2",children:"Not Registered"})]}),(0,Nl.jsx)("p",{className:"disco-text-gray-400 disco-text-[10px] disco-mt-0.5",children:e.email})]})]})}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-text-gray-500 disco-whitespace-nowrap",children:e.state}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-text-gray-500",children:(0,Nl.jsx)(hx,{title:"Campaigns",items:e.campaigns})}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-text-gray-600",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-font-semibold disco-text-gray-700",children:e.spent})]},t),Mx=({customers:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:o="spent",sortDir:i="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=yv();return(0,Nl.jsx)(Fv,{columns:xx,data:e,renderRow:wx,title:"All Customers",total:l,searchPlaceholder:"Search Customers...",search:n,onSearchChange:r,sortKey:o,sortDir:i,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,cellPadding:"disco-px-3",locked:!d,lockOverlay:{size:"lg",label:(0,vv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,vv.__)("Upgrade to Disco Pro","disco")})," ",(0,vv.__)("to identify your highest-value customers — and find out which ones only buy when a discount is running.","disco")]})}})},jx=["#06b6d4","#ec4899","#f59e0b","#f97316","#3b82f6","#84cc16","#8b5cf6","#ef4444","#a78bfa","#10b981"];function Ox(e){if(!e)return"?";const t=e.trim().split(/\s+/);return(t[0]?.[0]??"")+(t[1]?.[0]??"")}const Nx={spent:"total_spent",orders:"orders"},Sx=()=>{const e=D(ds),[t,n]=(0,a.useState)(1),[r,o]=(0,a.useState)("spent"),[i,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),u=yv(),{data:d,isLoading:f,isFetching:p}=Hl({...e,limit:u?20:10,sort_by:Nx[r]??"total_spent",order:i,page:t,...c?{search:c}:{}}),h=(d?.data??[]).map((e,t)=>({id:e.id,initials:Ox(e.name).toUpperCase(),color:jx[t%jx.length],name:e.name||"—",email:e.email||"—",state:e.state||"—",campaigns:Ol([...e.campaigns]),orders:e.orders,spent:xl(e.total_spent),avatar:e.avatar})),m=d?.collection?.total??0,g=d?.collection?.total_pages??1,y=d?.collection?.count??0;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,vv.__)("Customers","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,vv.__)("Customers who used at least one Disco campaign","disco")})]}),(0,Nl.jsx)(Mx,{customers:h,isLoading:f||p,search:c,onSearchChange:e=>{l(e),n(1)},sortKey:r,sortDir:i,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(o(e),s("desc")),n(1)},page:t,totalPages:g,total:m,count:y,onPageChange:n})]})};function Ex({className:e,size:t="default",...n}){return(0,Nl.jsx)("div",{"data-slot":"card","data-size":t,className:bl("disco-group/card disco-flex disco-flex-col disco-gap-4 disco-overflow-hidden disco-rounded-xl disco-bg-card disco-py-4 disco-text-sm disco-text-card-foreground disco-ring-foreground/10 has-data-[slot=card-footer]:disco-pb-0 has-[>img:first-child]:disco-pt-0 data-[size=sm]:disco-gap-3 data-[size=sm]:disco-py-3 data-[size=sm]:has-data-[slot=card-footer]:disco-pb-0 *:[img:first-child]:disco-rounded-t-xl *:[img:last-child]:disco-rounded-b-xl",e),...n})}const kx=aa.injectEndpoints({endpoints:e=>({getSummary:e.query({query:({date_from:e,date_to:t}={})=>({url:"/summary",params:{date_from:e,date_to:t}})}),getRevenueChart:e.query({query:({date_from:e,date_to:t}={})=>({url:"/revenue-chart",params:{date_from:e,date_to:t}})}),getIntentsPerformance:e.query({query:({date_from:e,date_to:t}={})=>({url:"/intents-performance",params:{date_from:e,date_to:t}})})})}),{useGetSummaryQuery:Dx,useGetRevenueChartQuery:Ix,useGetIntentsPerformanceQuery:Ax}=kx;function Tx(e,t=0,n={}){const{leading:r=!0,trailing:o=!0}=n;return function(e,t=0,n={}){"object"!=typeof n&&(n={});const{leading:r=!1,trailing:o=!0,maxWait:i}=n,a=Array(2);let s;r&&(a[0]="leading"),o&&(a[1]="trailing");let c=null;const l=function(e,t,{signal:n,edges:r}={}){let o,i=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),c=()=>{null!==i&&(e.apply(o,i),o=void 0,i=null)};let l=null;const u=()=>{null!=l&&clearTimeout(l),l=setTimeout(()=>{l=null,s&&c(),d()},t)},d=()=>{null!==l&&(clearTimeout(l),l=null),o=void 0,i=null},f=function(...e){if(n?.aborted)return;o=this,i=e;const t=null==l;u(),a&&t&&c()};return f.schedule=u,f.cancel=d,f.flush=()=>{c()},n?.addEventListener("abort",d,{once:!0}),f}(function(...t){s=e.apply(this,t),c=null},t,{edges:a}),u=function(...t){return null!=i&&(null===c&&(c=Date.now()),Date.now()-c>=i)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}(e,t,{leading:r,maxWait:t,trailing:o})}function Cx(e){return"__proto__"===e}function Px(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function zx(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function Rx(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(Rx).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function Lx(e){if(Array.isArray(e))return e.map(zx);if("symbol"==typeof e)return[e];const t=[],n=(e=Rx(e)).length;if(0===n)return t;let r=0,o="",i="",a=!1;for(46===e.charCodeAt(0)&&t.push("");r<n;){const s=e[r];if(i)"\\"===s&&r+1<n?(r++,o+=e[r]):s===i?i="":o+=s;else if(a)'"'===s||"'"===s?i=s:"]"===s?(a=!1,t.push(o),o=""):o+=s;else if("["===s)a=!0,o&&(t.push(o),o="");else if("."===s){o&&(t.push(o),o="");const n=e[r+1];void 0!==n&&"."!==n||t.push("")}else o+=s;r++}return o&&t.push(o),t}function Ux(e,t,n){if(null==e)return n;switch(typeof t){case"string":{if(Cx(t))return n;const r=e[t];return void 0===r?Px(t)&&!Object.hasOwn(e,t)?Ux(e,Lx(t),n):n:r}case"number":case"symbol":{"number"==typeof t&&(t=zx(t));const r=e[t];return void 0===r?n:r}default:{if(Array.isArray(t))return function(e,t,n){if(0===t.length)return n;let r=e;for(let e=0;e<t.length;e++){if(null==r)return n;if(Cx(t[e]))return n;r=r[t[e]]}return void 0===r?n:r}(e,t,n);if(Cx(t=Object.is(t?.valueOf(),-0)?"-0":String(t)))return n;const r=e[t];return void 0===r?n:r}}}function Yx(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function Fx(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var o=n[r-1];return"string"==typeof o?e+o+t:void 0!==o?e+Yx(o)+t:e+t},"")}var Wx=e=>0===e?0:e>0?1:-1,Bx=e=>"number"==typeof e&&e!=+e,Qx=e=>"string"==typeof e&&e.length>1&&e.indexOf("%")===e.length-1,qx=e=>("number"==typeof e||e instanceof Number)&&!Bx(e),Gx=e=>qx(e)||"string"==typeof e,$x=0,Hx=e=>{var t=++$x;return"".concat(e||"").concat(t)},Vx=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!qx(e)&&"string"!=typeof e)return r;if(Qx(e)){if(null==t)return r;var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return Bx(n)&&(n=r),o&&null!=t&&n>t&&(n=t),n},Kx=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[String(e[r])])return!0;n[String(e[r])]=!0}return!1};function Zx(e,t,n){return qx(e)&&qx(t)?Yx(e+n*(t-e)):t}function Xx(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):Ux(e,t))===n)}var Jx=e=>null==e,ew=e=>Jx(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function tw(e){return null!=e}function nw(){}var rw=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if("undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;console.warn(t.replace(/%s/g,()=>r[i++]))}},ow={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},iw=(e,t,n)=>{var r=n.width,o=void 0===r?ow.width:r,i=n.height,a=void 0===i?ow.height:i,s=n.aspect,c=n.maxHeight,l=Qx(o)?e:Number(o),u=Qx(a)?t:Number(a);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&null!=u&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},aw={width:0,height:0,overflow:"visible"},sw={width:0,overflowX:"visible"},cw={height:0,overflowY:"visible"},lw={},uw=e=>{var t=e.width,n=e.height,r=Qx(t),o=Qx(n);return r&&o?aw:r?sw:o?cw:lw};function dw(e){return Number.isFinite(e)}function fw(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}var pw=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hw.apply(null,arguments)}function mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mw(Object(n),!0).forEach(function(t){yw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var bw=(0,a.createContext)(ow.initialDimension);function xw(e){var t=e.children,n=e.width,r=e.height,o=(0,a.useMemo)(()=>({width:n,height:r}),[n,r]);return function(e){return fw(e.width)&&fw(e.height)}(o)?a.createElement(bw.Provider,{value:o},t):null}var ww=()=>(0,a.useContext)(bw),Mw=(0,a.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,o=void 0===r?ow.initialDimension:r,i=e.width,s=e.height,c=e.minWidth,l=void 0===c?ow.minWidth:c,u=e.minHeight,d=e.maxHeight,f=e.children,p=e.debounce,h=void 0===p?ow.debounce:p,m=e.id,g=e.className,y=e.onResize,v=e.style,b=void 0===v?{}:v,x=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,pw),w=(0,a.useRef)(null),M=(0,a.useRef)();M.current=y,(0,a.useImperativeHandle)(t,()=>w.current);var j=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vw(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)({containerWidth:o.width,containerHeight:o.height}),2),O=j[0],N=j[1],S=(0,a.useCallback)((e,t)=>{N(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]);(0,a.useEffect)(()=>{if(null==w.current||"undefined"==typeof ResizeObserver)return nw;var e=e=>{var t,n=e[0];if(null!=n){var r=n.contentRect,o=r.width,i=r.height;S(o,i),null===(t=M.current)||void 0===t||t.call(M,o,i)}};h>0&&(e=Tx(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=w.current.getBoundingClientRect(),r=n.width,o=n.height;return S(r,o),t.observe(w.current),()=>{t.disconnect()}},[S,h]);var E=O.containerWidth,k=O.containerHeight;rw(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=iw(E,k,{width:i,height:s,aspect:n,maxHeight:d}),I=D.calculatedWidth,A=D.calculatedHeight;return rw(E<0||k<0||null!=I&&I>0||null!=A&&A>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",I,A,i,s,l,u,n),a.createElement("div",hw({id:m?"".concat(m):void 0,className:jc("recharts-responsive-container",g),style:gw(gw({},b),{},{width:i,height:s,minWidth:l,minHeight:u,maxHeight:d}),ref:w},x),a.createElement("div",{style:uw({width:i,height:s})},a.createElement(xw,{width:I,height:A},f)))}),jw=(0,a.forwardRef)((e,t)=>{var n=ww();if(fw(n.width)&&fw(n.height))return e.children;var r=function(e){var t=e.aspect,n=e.width,r=e.height;return void 0===n&&void 0===r?(n=ow.width,r=ow.height):void 0===n?n=t&&t>0?void 0:ow.width:void 0===r&&(r=t&&t>0?void 0:ow.height),{width:n,height:r}}({width:e.width,height:e.height,aspect:e.aspect}),o=r.width,i=r.height,s=iw(void 0,void 0,{width:o,height:i,aspect:e.aspect,maxHeight:e.maxHeight}),c=s.calculatedWidth,l=s.calculatedHeight;return qx(c)&&qx(l)?a.createElement(xw,{width:c,height:l},e.children):a.createElement(Mw,hw({},e,{width:o,height:i,ref:t}))}),Ow=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Bx(n))return e[n]}},Nw=Br({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Sw=Nw.reducer,Ew=Nw.actions.createEventEmitter,kw={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Dw=Br({name:"tooltip",initialState:{itemInteraction:{click:kw,hover:kw},axisInteraction:{click:kw,hover:kw},keyboardInteraction:kw,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:gr()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,o=n.next,i=Jn(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=o)},prepare:gr()},removeTooltipEntrySettings:{reducer(e,t){var n=Jn(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:gr()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),Iw=Dw.actions,Aw=Iw.addTooltipEntrySettings,Tw=Iw.replaceTooltipEntrySettings,Cw=Iw.removeTooltipEntrySettings,Pw=Iw.setTooltipSettingsState,zw=Iw.setActiveMouseOverItemIndex,_w=Iw.mouseLeaveItem,Rw=Iw.mouseLeaveChart,Lw=Iw.setActiveClickItemIndex,Uw=Iw.setMouseOverAxisIndex,Yw=Iw.setMouseClickAxisIndex,Fw=Iw.setSyncInteraction,Ww=Iw.setKeyboardInteraction,Bw=Dw.reducer,Qw=Br({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var n=t.payload,r=n.startIndex,o=n.endIndex;null!=r&&(e.dataStartIndex=r),null!=o&&(e.dataEndIndex=o)}}}),qw=Qw.actions,Gw=qw.setChartData,$w=qw.setDataStartEndIndexes,Hw=(qw.setComputedData,Qw.reducer),Vw=Br({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,o,i;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(o=t.payload.bottom)&&void 0!==o?o:0,e.margin.left=null!==(i=t.payload.left)&&void 0!==i?i:0},setScale(e,t){e.scale=t.payload}}}),Kw=Vw.actions,Zw=Kw.setMargin,Xw=Kw.setLayout,Jw=Kw.setChartSize,eM=Kw.setScale,tM=Vw.reducer,nM=(0,a.createContext)(null),rM=e=>e,oM=()=>{var e=(0,a.useContext)(nM);return e?e.store.dispatch:rM},iM=()=>{},aM=()=>iM,sM=(e,t)=>e===t;function cM(e){var t=(0,a.useContext)(nM),n=(0,a.useMemo)(()=>t?t=>{if(null!=t)return e(t)}:iM,[t,e]);return(0,rd.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:aM,t?t.store.getState:iM,t?t.store.getState:iM,n,sM)}function lM(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function uM(e){return null!=e&&"function"!=typeof e&&function(e){return Number.isSafeInteger(e)&&e>=0}(e.length)}function dM(e){return null!==e&&("object"==typeof e||"function"==typeof e)}const fM=/^(?:0|[1-9]\d*)$/;function pM(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return fM.test(e)}}function hM(e,t,n){return!!dM(n)&&!!("number"==typeof t&&uM(n)&&pM(t)&&t<n.length||"string"==typeof t&&t in n)&&lM(n[t],e)}function mM(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}const gM=(e,t,n)=>{if(e!==t){const r=mM(e),o=mM(t);if(r===o&&0===r){if(e<t)return"desc"===n?1:-1;if(e>t)return"desc"===n?-1:1}return"desc"===n?o-r:r-o}return 0};function yM(e){return"symbol"==typeof e||e instanceof Symbol}const vM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bM=/^\w*$/;function xM(e,...t){const n=t.length;return n>1&&hM(e,t[0],t[1])?t=[]:n>2&&hM(t[0],t[1],t[2])&&(t=[t[0]]),function(e,t,n,r){if(null==e)return[];n=r?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=null==t?[null]:[t]),0===t.length&&(t=[null]),Array.isArray(n)||(n=null==n?[]:[n]),n=n.map(e=>String(e));const o=(e,t)=>{let n=e;for(let e=0;e<t.length&&null!=n;++e)n=n[t[e]];return n},i=t.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||function(e){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!yM(e))||"string"==typeof e&&(bM.test(e)||!vM.test(e))||!1)}(e)?e:{key:e,path:Lx(e)}));return e.map(e=>({original:e,criteria:i.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:o(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?o(t,e):"object"==typeof t?t[e]:t)(t,e))})).slice().sort((e,t)=>{for(let r=0;r<i.length;r++){const o=gM(e.criteria[r],t.criteria[r],n[r]);if(0!==o)return o}return 0}).map(e=>e.original)}(e,function(e,t=1){const n=[],r=Math.floor(t),o=(e,t)=>{for(let i=0;i<e.length;i++){const a=e[i];Array.isArray(a)&&t<r?o(a,t+1):n.push(a)}};return o(e,0),n}(t),["asc"])}var wM=e=>e.legend.settings,MM=Do([e=>e.legend.payload,wM],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?xM(r,n):r});function jM(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function OM(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}jM(e,t)}}function NM(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}jM(e,t)}}function SM(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}c+=d,l+=f*d}n[a-1][1]+=n[a-1][0]=i,c&&(i-=l/c)}n[a-1][1]+=n[a-1][0]=i,jM(e,t)}}function EM(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function kM(e){return function(){return e}}function DM(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function IM(e,t){return e[t]}function AM(e){const t=[];return t.key=e,t}function TM(){var e=kM([]),t=DM,n=jM,r=IM;function o(o){var i,a,s=Array.from(e.apply(this,arguments),AM),c=s.length,l=-1;for(const e of o)for(i=0,++l;i<c;++i)(s[i][l]=[0,+r(e,s[i].key,l,o)]).data=e;for(i=0,a=EM(t(s));i<c;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:kM(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:kM(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?DM:"function"==typeof e?e:kM(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=e??jM,o):n},o}function CM(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function PM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PM(Object(n),!0).forEach(function(t){_M(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _M(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RM(e,t,n){return Jx(e)||Jx(t)?n:Gx(t)?Ux(e,t,n):"function"==typeof t?t(e):n}n.dn(jM),n.dn(OM),n.dn(NM),n.dn(SM),n.dn(EM),Array.prototype.slice,n.dn(kM),n.dn(DM),n.dn(TM);var LM=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,UM=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var o,i,a=e.map(e=>(e.coordinate===t&&(o=!0),e.coordinate===n&&(i=!0),e.coordinate));return o||a.push(t),i||a.push(n),a},YM=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,o=e.type,i=e.range,a=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!a)return null;var h="scaleBand"===s&&a.bandwidth?a.bandwidth()/2:2,m=(t||n)&&"category"===o&&a.bandwidth?a.bandwidth()/h:0;if(m="angleAxis"===p&&i&&i.length>=2?2*Wx(i[0]-i[1])*m:m,t&&(d||f)){var g=(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,o=a.map(n);return dw(o)?{coordinate:o+m,value:e,offset:m,index:t}:null}).filter(tw);return g}return c&&l?l.map((e,t)=>{var n=a.map(e);return dw(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(tw):a.ticks&&!n&&null!=u?a.ticks(u).map((e,t)=>{var n=a.map(e);return dw(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(tw):a.domain().map((e,t)=>{var n=a.map(e);return dw(n)?{coordinate:n+m,value:r?r[e]:e,index:t,offset:m}:null}).filter(tw)},FM={sign:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var o=0;o<r;++o)for(var i=0,a=0,s=0;s<n;++s){var c=e[s],l=null==c?void 0:c[o];if(null!=l){var u=l[1],d=l[0],f=Bx(u)?d:u;f>=0?(l[0]=i,i+=f,l[1]=i):(l[0]=a,a+=f,l[1]=a)}}}},expand:OM,none:jM,silhouette:NM,wiggle:SM,positive:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var o=0;o<r;++o)for(var i=0,a=0;a<n;++a){var s=e[a],c=null==s?void 0:s[o];if(null!=c){var l=Bx(c[1])?c[0]:c[1];l>=0?(c[0]=i,i+=l,c[1]=i):(c[0]=0,c[1]=0)}}}}},WM=(e,t,n)=>{var r,o=null!==(r=FM[n])&&void 0!==r?r:jM,i=TM().keys(t).value((e,t)=>Number(RM(e,t,0))).order(DM).offset(o)(e);return i.forEach((n,r)=>{n.forEach((n,o)=>{var i=RM(e[o],t[r],0);Array.isArray(i)&&2===i.length&&qx(i[0])&&qx(i[1])&&(n[0]=i[0],n[1]=i[1])})}),i};function BM(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Jx(o[t.dataKey])){var s=Xx(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return null!=n&&n[i]?n[i].coordinate+r/2:null}var c=RM(o,Jx(a)?t.dataKey:a),l=t.scale.map(c);return qx(l)?l:null}var QM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,GM=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=xM(t,e=>e.coordinate),i=1/0,a=1,s=o.length;a<s;a++){var c=o[a],l=o[a-1];i=Math.min(((null==c?void 0:c.coordinate)||0)-((null==l?void 0:l.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function $M(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,o=e.value,i=e.name;return zM(zM({},t),{},{dataKey:n,payload:r,value:o,name:i})}function HM(e,t){return null!=e?String(e):"string"==typeof t?t:void 0}var VM=e=>e.layout.width,KM=e=>e.layout.height,ZM=e=>e.layout.scale,XM=e=>e.layout.margin,JM=Do(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ej=Do(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),tj="data-recharts-item-index",nj="data-recharts-item-id";function rj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rj(Object(n),!0).forEach(function(t){ij(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ij(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var aj=Do([VM,KM,XM,e=>e.brush.height,function(e){return ej(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return ej(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return JM(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return JM(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},wM,e=>e.legend.size],(e,t,n,r,o,i,a,s,c,l)=>{var u={left:(n.left||0)+o,right:(n.right||0)+i},d=oj(oj({},{top:(n.top||0)+a,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var r=n.width,o=n.height,i=t.align,a=t.verticalAlign,s=t.layout;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==i&&qx(e[i]))return zM(zM({},e),{},{[i]:e[i]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===i)&&"middle"!==a&&qx(e[a]))return zM(zM({},e),{},{[a]:e[a]+(o||0)})}return e})(d,c,l);var p=e-d.left-d.right,h=t-d.top-d.bottom;return oj(oj({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(h,0)})}),sj=Do(aj,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),cj=Do(VM,KM,(e,t)=>({x:0,y:0,width:e,height:t})),lj=(0,a.createContext)(null),uj=()=>null!=(0,a.useContext)(lj),dj=e=>e.brush,fj=Do([dj,aj,XM],(e,t,n)=>({height:e.height,x:qx(e.x)?e.x:t.left,y:qx(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:qx(e.width)?e.width:t.width}));function pj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var hj=()=>{var e,t=uj(),n=cM(sj),r=cM(fj),o=null===(e=cM(dj))||void 0===e?void 0:e.padding;return t&&r&&o?{width:r.width-o.left-o.right,height:r.height-o.top-o.bottom,x:o.left,y:o.top}:n},mj={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},gj=()=>{var e;return null!==(e=cM(aj))&&void 0!==e?e:mj},yj=()=>cM(VM),vj=()=>cM(KM),bj=e=>e.layout.layoutType,xj=()=>cM(bj),wj=()=>{var e=xj();if("horizontal"===e||"vertical"===e)return e},Mj=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},jj=e=>{var t=oM(),n=uj(),r=e.width,o=e.height,i=ww(),s=r,c=o;return i&&(s=i.width>0?i.width:r,c=i.height>0?i.height:o),(0,a.useEffect)(()=>{!n&&fw(s)&&fw(c)&&t(Jw({width:s,height:c}))},[t,n,s,c]),null};function Oj(e){return e?(e=function(e){return yM(e)?NaN:Number(e)}(e))===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e==e?e:0:0===e?e:0}function Nj(e,t,n){n&&"number"!=typeof n&&hM(e,t,n)&&(t=n=void 0),e=Oj(e),void 0===t?(t=e,e=0):t=Oj(t),n=void 0===n?e<t?1:-1:Oj(n);const r=Math.max(Math.ceil((t-e)/(n||1)),0),o=new Array(r);for(let t=0;t<r;t++)o[t]=e,e+=n;return o}var Sj=e=>e.chartData,Ej=Do([Sj],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),kj=(e,t,n,r)=>r?Ej(e):Sj(e),Dj=Do([kj],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return null!=t?t.slice(n,r+1):[]}),Ij=Do([Ej],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return null!=t?t.slice(n,r+1):[]}),Aj=Do([Sj],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return null!=t?t.slice(n,r+1):[]});function Tj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Cj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cj(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Pj(e){if(Array.isArray(e)&&2===e.length){var t=Tj(e,2),n=t[0],r=t[1];if(dw(n)&&dw(r))return!0}return!1}function zj(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function _j(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,o=Tj(e,2),i=o[0],a=o[1];if(dw(i))n=i;else if("function"==typeof i)return;if(dw(a))r=a;else if("function"==typeof a)return;var s=[n,r];if(Pj(s))return s}}var Rj=n(351),Lj=n.n(Rj);function Uj(e){return 0===e?1:Math.floor(new(Lj())(e).abs().log(10).toNumber())+1}function Yj(e,t,n){for(var r=new(Lj())(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i}function Fj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wj(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bj=e=>{var t=Fj(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]},Qj=(e,t,n)=>{if(e.lte(0))return new(Lj())(0);var r=Uj(e.toNumber()),o=new(Lj())(10).pow(r),i=e.div(o),a=1!==r?.05:.1,s=new(Lj())(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return t?new(Lj())(s.toNumber()):new(Lj())(Math.ceil(s.toNumber()))},qj=(e,t,n)=>{var r;if(e.lte(0))return new(Lj())(0);var o=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new(Lj())(i).abs().log(10).toNumber()),s=new(Lj())(10).pow(a),c=e.div(s).toNumber(),l=o.findIndex(e=>e>=c-1e-10);if(-1===l&&(s=s.mul(10),l=0),(l+=n)>=o.length){var u=Math.floor(l/o.length);l%=o.length,s=s.mul(new(Lj())(10).pow(u))}var d=null!==(r=o[l])&&void 0!==r?r:1,f=new(Lj())(d).mul(s);return t?f:new(Lj())(Math.ceil(f.toNumber()))},Gj=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Qj;if(!Number.isFinite((t-e)/(n-1)))return{step:new(Lj())(0),tickMin:new(Lj())(0),tickMax:new(Lj())(0)};var a,s=i(new(Lj())(t).sub(e).div(n-1),r,o);a=e<=0&&t>=0?new(Lj())(0):(a=new(Lj())(e).add(t).div(2)).sub(new(Lj())(a).mod(s));var c=Math.ceil(a.sub(e).div(s).toNumber()),l=Math.ceil(new(Lj())(t).sub(a).div(s).toNumber()),u=c+l+1;return u>n?Gj(e,t,n,r,o+1,i):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:s,tickMin:a.sub(new(Lj())(c).mul(s)),tickMax:a.add(new(Lj())(l).mul(s))})},$j=function(e){var t=Fj(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",s=Math.max(o,2),c=Fj(Bj([n,r]),2),l=c[0],u=c[1];if(l===-1/0||u===1/0){var d=u===1/0?[l,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),u];return n>r?d.reverse():d}if(l===u)return((e,t,n)=>{var r=new(Lj())(1),o=new(Lj())(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new(Lj())(10).pow(Uj(e)-1),o=new(Lj())(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new(Lj())(Math.floor(e)))}else 0===e?o=new(Lj())(Math.floor((t-1)/2)):n||(o=new(Lj())(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(o.add(new(Lj())(c-a).mul(r)).toNumber());return s})(l,o,i);var f=Gj(l,u,s,i,0,"snap125"===a?qj:Qj),p=f.step,h=Yj(f.tickMin,f.tickMax.add(new(Lj())(.1).mul(p)),p);return n>r?h.reverse():h},Hj=function(e,t){var n=Fj(e,2),r=n[0],o=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",s=Fj(Bj([r,o]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0)return[r,o];if(c===l)return[c];var u="snap125"===a?qj:Qj,d=Math.max(t,2),f=u(new(Lj())(l).sub(c).div(d-1),i,0),p=[...Yj(new(Lj())(c),new(Lj())(l),f),l];if(!1===i){p=p.map(e=>Math.round(e));var h=p.length-1;h>0&&p[h]===p[h-1]&&(p=p.slice(0,h))}return r>o?p.reverse():p},Vj=e=>e.rootProps.stackOffset,Kj=e=>e.rootProps.reverseStackOrder,Zj=e=>e.options.chartName,Xj=e=>e.rootProps.syncId,Jj=e=>e.rootProps.syncMethod,eO=e=>e.options.eventEmitter;function tO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tO(Object(n),!0).forEach(function(t){rO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rO(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oO=Math.PI/180,iO=e=>180*e/Math.PI,aO=(e,t,n,r)=>({x:e+Math.cos(-oO*r)*n,y:t+Math.sin(-oO*r)*n}),sO=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},cO=(e,t)=>{var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},lO=(e,t)=>{var n=((e,t)=>{var n=e.x,r=e.y,o=t.cx,i=t.cy,a=((e,t)=>{var n=e.x,r=e.y,o=t.x,i=t.y;return Math.sqrt((n-o)**2+(r-i)**2)})({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a,angle:0};var s=(n-o)/a,c=Math.acos(s);return r>i&&(c=2*Math.PI-c),{radius:a,angle:iO(c),angleInRadian:c}})({x:e.relativeX,y:e.relativeY},t),r=n.radius,o=n.angle,i=t.innerRadius,a=t.outerRadius;if(r<i||r>a)return null;if(0===r)return null;var s,c=(e=>{var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-360*i,endAngle:n-360*i}})(t),l=c.startAngle,u=c.endAngle,d=o;if(l<=u){for(;d>u;)d-=360;for(;d<l;)d+=360;s=d>=l&&d<=u}else{for(;d>l;)d-=360;for(;d<u;)d+=360;s=d>=u&&d<=l}return s?nO(nO({},t),{},{radius:r,angle:cO(d,t)}):null},uO={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},dO=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function fO(e,t,n){return"auto"!==n?n:null!=e?LM(e,t)?"category":"number":void 0}function pO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pO(Object(n),!0).forEach(function(t){mO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mO(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gO={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},yO={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},vO=Do([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},Mj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=fO(t,"angleAxis",gO.type))&&void 0!==n?n:"category";return hO(hO({},gO),{},{type:r})}),bO=Do([(e,t)=>e.polarAxis.radiusAxis[t],Mj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=fO(t,"radiusAxis",yO.type))&&void 0!==n?n:"category";return hO(hO({},yO),{},{type:r})}),xO=e=>e.polarOptions,wO=Do([VM,KM,aj],sO),MO=Do([xO,wO],(e,t)=>{if(null!=e)return Vx(e.innerRadius,t,0)}),jO=Do([xO,wO],(e,t)=>{if(null!=e)return Vx(e.outerRadius,t,.8*t)}),OO=Do([xO],e=>null==e?[0,0]:[e.startAngle,e.endAngle]),NO=(Do([vO,OO],dO),Do([wO,MO,jO],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]})),SO=(Do([bO,NO],dO),Do([bj,xO,MO,jO,VM,KM],(e,t,n,r,o,i)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var a=t.cx,s=t.cy,c=t.startAngle,l=t.endAngle;return{cx:Vx(a,o,o/2),cy:Vx(s,i,i/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}})),EO=(e,t)=>t,kO=(e,t,n)=>n;function DO(e){return null==e?void 0:e.id}function IO(e,t,n){var r=t.chartData,o=void 0===r?[]:r,i=n.allowDuplicatedCategory,a=n.dataKey,s=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:o;if(null!=n&&0!==n.length){var r=DO(e);n.forEach((t,n)=>{var o,c=null==a||i?n:String(RM(t,a,null)),l=RM(t,e.dataKey,0);o=s.has(c)?s.get(c):{},Object.assign(o,{[r]:l}),s.set(c,o)})}}),Array.from(s.values())}function AO(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var TO=(e,t)=>e===t||null!=e&&null!=t&&e[0]===t[0]&&e[1]===t[1];function CO(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var PO=e=>{var t=bj(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},zO=e=>e.tooltip.settings.axisId;function _O(e){if(null!=e){var t=e.ticks,n=e.bandwidth,r=e.range(),o=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(e){var t=o[0],n=o[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(null!=r){if(e.bandwidth&&null!=n&&n.position){var o=e.bandwidth();switch(n.position){case"middle":r+=o/2;break;case"end":r+=o}}return r}}}}}var RO=(e,t)=>{if(null!=t){if("linear"===e){if(!Pj(t)){for(var n,r,o=0;o<t.length;o++){var i=t[o];dw(i)&&((void 0===n||i<n)&&(n=i),(void 0===r||i>r)&&(r=i))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}};function LO(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function UO(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}class YO extends Map{constructor(e,t=WO){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(FO(this,e))}has(e){return super.has(FO(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function FO({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function WO(e){return null!==e&&"object"==typeof e?e.valueOf():e}Set;const BO=Symbol("implicit");function QO(){var e=new YO,t=[],n=[],r=BO;function o(o){let i=e.get(o);if(void 0===i){if(r!==BO)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new YO;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return QO(t,n).unknown(r)},LO.apply(o,arguments),o}function qO(){var e,t,n=QO().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,c=0,l=0,u=.5;function d(){var n=r().length,d=a<i,f=d?a:i,p=d?i:a;e=(p-f)/Math.max(1,n-c+2*l),s&&(e=Math.floor(e)),f+=(p-f-e*(n-c))*u,t=e*(1-c),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map(function(t){return f+e*t});return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},n.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},n.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return qO(r(),[i,a]).round(s).paddingInner(c).paddingOuter(l).align(u)},LO.apply(d(),arguments)}function GO(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return GO(t())},e}function $O(){return GO(qO.apply(null,arguments).paddingInner(1))}const HO=Math.sqrt(50),VO=Math.sqrt(10),KO=Math.sqrt(2);function ZO(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=HO?10:i>=VO?5:i>=KO?2:1;let s,c,l;return o<0?(l=Math.pow(10,-o)/a,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,o)*a,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?ZO(e,t,2*n):[s,c,l]}function XO(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?ZO(t,e,n):ZO(e,t,n);if(!(i>=o))return[];const s=i-o+1,c=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)c[e]=(i-e)/-a;else for(let e=0;e<s;++e)c[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)c[e]=(o+e)/-a;else for(let e=0;e<s;++e)c[e]=(o+e)*a;return c}function JO(e,t,n){return ZO(e=+e,t=+t,n=+n)[2]}function eN(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?JO(t,e,n):JO(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function tN(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function nN(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rN(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=tN,n=(t,n)=>tN(e(t),n),r=(t,n)=>e(t)-n):(t=e===tN||e===nN?e:oN,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function oN(){return 0}function iN(e){return null===e?NaN:+e}const aN=rN(tN),sN=aN.right,cN=(aN.left,rN(iN).center,sN);function lN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function uN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function dN(){}n.dn(lN);var fN=.7,pN=1/fN,hN="\\s*([+-]?\\d+)\\s*",mN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yN=/^#([0-9a-f]{3,8})$/,vN=new RegExp(`^rgb\\(${hN},${hN},${hN}\\)$`),bN=new RegExp(`^rgb\\(${gN},${gN},${gN}\\)$`),xN=new RegExp(`^rgba\\(${hN},${hN},${hN},${mN}\\)$`),wN=new RegExp(`^rgba\\(${gN},${gN},${gN},${mN}\\)$`),MN=new RegExp(`^hsl\\(${mN},${gN},${gN}\\)$`),jN=new RegExp(`^hsla\\(${mN},${gN},${gN},${mN}\\)$`),ON={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function NN(){return this.rgb().formatHex()}function SN(){return this.rgb().formatRgb()}function EN(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?kN(t):3===n?new AN(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?DN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?DN(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=vN.exec(e))?new AN(t[1],t[2],t[3],1):(t=bN.exec(e))?new AN(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xN.exec(e))?DN(t[1],t[2],t[3],t[4]):(t=wN.exec(e))?DN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=MN.exec(e))?RN(t[1],t[2]/100,t[3]/100,1):(t=jN.exec(e))?RN(t[1],t[2]/100,t[3]/100,t[4]):ON.hasOwnProperty(e)?kN(ON[e]):"transparent"===e?new AN(NaN,NaN,NaN,0):null}function kN(e){return new AN(e>>16&255,e>>8&255,255&e,1)}function DN(e,t,n,r){return r<=0&&(e=t=n=NaN),new AN(e,t,n,r)}function IN(e,t,n,r){return 1===arguments.length?((o=e)instanceof dN||(o=EN(o)),o?new AN((o=o.rgb()).r,o.g,o.b,o.opacity):new AN):new AN(e,t,n,r??1);var o}function AN(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function TN(){return`#${_N(this.r)}${_N(this.g)}${_N(this.b)}`}function CN(){const e=PN(this.opacity);return`${1===e?"rgb(":"rgba("}${zN(this.r)}, ${zN(this.g)}, ${zN(this.b)}${1===e?")":`, ${e})`}`}function PN(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zN(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _N(e){return((e=zN(e))<16?"0":"")+e.toString(16)}function RN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new UN(e,t,n,r)}function LN(e){if(e instanceof UN)return new UN(e.h,e.s,e.l,e.opacity);if(e instanceof dN||(e=EN(e)),!e)return new UN;if(e instanceof UN)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,c=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=c<.5?i+o:2-i-o,a*=60):s=c>0&&c<1?0:a,new UN(a,s,c,e.opacity)}function UN(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function YN(e){return(e=(e||0)%360)<0?e+360:e}function FN(e){return Math.max(0,Math.min(1,e||0))}function WN(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function BN(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}function QN(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,s=r<t-1?e[r+2]:2*i-o;return BN((n-r/t)*t,a,o,i,s)}}function qN(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return BN((n-r/t)*t,o,i,a,s)}}lN(dN,EN,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:NN,formatHex:NN,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return LN(this).formatHsl()},formatRgb:SN,toString:SN}),lN(AN,IN,uN(dN,{brighter(e){return e=null==e?pN:Math.pow(pN,e),new AN(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?fN:Math.pow(fN,e),new AN(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new AN(zN(this.r),zN(this.g),zN(this.b),PN(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:TN,formatHex:TN,formatHex8:function(){return`#${_N(this.r)}${_N(this.g)}${_N(this.b)}${_N(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:CN,toString:CN})),lN(UN,function(e,t,n,r){return 1===arguments.length?LN(e):new UN(e,t,n,r??1)},uN(dN,{brighter(e){return e=null==e?pN:Math.pow(pN,e),new UN(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?fN:Math.pow(fN,e),new UN(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new AN(WN(e>=240?e-240:e+120,o,r),WN(e,o,r),WN(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new UN(YN(this.h),FN(this.s),FN(this.l),PN(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=PN(this.opacity);return`${1===e?"hsl(":"hsla("}${YN(this.h)}, ${100*FN(this.s)}%, ${100*FN(this.l)}%${1===e?")":`, ${e})`}`}})),n.dn(QN),n.dn(qN);const GN=e=>()=>e;function $N(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):GN(isNaN(e)?t:e)}n.dn(GN);const HN=function e(t){var n=function(e){return 1===(e=+e)?$N:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):GN(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=IN(e)).r,(t=IN(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=$N(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function VN(e){return function(t){var n,r,o=t.length,i=new Array(o),a=new Array(o),s=new Array(o);for(n=0;n<o;++n)r=IN(t[n]),i[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return i=e(i),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=i(e),r.g=a(e),r.b=s(e),r+""}}}function KN(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=oS(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function ZN(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function XN(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function JN(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=oS(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}VN(QN),VN(qN),n.dn(function(e,t){return((void 0)(t)?void 0:KN)(e,t)}),n.dn(ZN),n.dn(XN),n.dn(JN),n.dn(nS);var eS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tS=new RegExp(eS.source,"g");function nS(e,t){var n,r,o,i=eS.lastIndex=tS.lastIndex=0,a=-1,s=[],c=[];for(e+="",t+="";(n=eS.exec(e))&&(r=tS.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,c.push({i:a,x:XN(n,r)})),i=tS.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?function(e){return function(t){return e(t)+""}}(c[0].x):function(e){return function(){return e}}(t):(t=c.length,function(e){for(var n,r=0;r<t;++r)s[(n=c[r]).i]=n.x(e);return s.join("")})}function rS(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function oS(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?GN(t):("number"===o?XN:"string"===o?(n=EN(t))?(t=n,HN):nS:t instanceof EN?HN:t instanceof Date?ZN:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?KN:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?JN:XN:rS))(e,t)}function iS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function aS(e){return+e}n.dn(rS),n.dn(oS),n.dn(iS);var sS=[0,1];function cS(e){return e}function lS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function uS(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=lS(o,r),i=n(a,i)):(r=lS(r,o),i=n(i,a)),function(e){return i(r(e))}}function dS(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=lS(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=cN(e,t,1,r)-1;return i[n](o[n](t))}}function fS(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pS(){var e,t,n,r,o,i,a=sS,s=sS,c=oS,l=cS;function u(){var e=Math.min(a.length,s.length);return l!==cS&&(l=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?dS:uS,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,c)))(e(l(t)))}return d.invert=function(n){return l(t((i||(i=r(s,a.map(e),XN)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,aS),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),c=iS,u()},d.clamp=function(e){return arguments.length?(l=!!e||cS,u()):l!==cS},d.interpolate=function(e){return arguments.length?(c=e,u()):c},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function hS(){return pS()(cS,cS)}var mS,gS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yS(e){if(!(t=gS.exec(e)))throw new Error("invalid format: "+e);var t;return new vS({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function vS(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function bS(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xS(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function wS(e){return(e=xS(Math.abs(e)))?e[1]:NaN}function MS(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wS(t)/3)))-wS(Math.abs(e)))}function jS(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],c=0;o>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),i.push(n.substring(o-=s,o+s)),!((c+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function OS(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}function NS(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}function SS(e,t){var n=xS(e,t);if(!n)return mS=void 0,e.toPrecision(t);var r=n[0],o=n[1],i=o-(mS=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+xS(e,Math.max(0,t+i-1))[0]}function ES(e,t){var n=xS(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}yS.prototype=vS.prototype,vS.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},n.dn(bS),n.dn(wS),n.dn(MS),n.dn(jS),n.dn(OS),n.dn(NS),n.dn(SS),n.dn(ES);const kS={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:bS,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ES(100*e,t),r:ES,s:SS,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function DS(e){return e}n.dn(DS),n.dn(zS);var IS,AS,TS,CS=Array.prototype.map,PS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zS(e){var t=void 0===e.grouping||void 0===e.thousands?DS:jS(CS.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",i=void 0===e.numerals?DS:OS(CS.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function l(e,l){var u=(e=yS(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,g=e.comma,y=e.precision,v=e.trim,b=e.type;"n"===b?(g=!0,b="g"):kS[b]||(void 0===y&&(y=12),v=!0,b="g"),(h||"0"===u&&"="===d)&&(h=!0,u="0",d="=");var x=(l&&void 0!==l.prefix?l.prefix:"")+("$"===p?n:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?r:/[%p]/.test(b)?a:"")+(l&&void 0!==l.suffix?l.suffix:""),M=kS[b],j=/[defgprs%]/.test(b);function O(e){var n,r,a,l=x,p=w;if("c"===b)p=M(e)+p,e="";else{var O=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:M(Math.abs(e),y),v&&(e=NS(e)),O&&0===+e&&"+"!==f&&(O=!1),l=(O?"("===f?f:s:"-"===f||"("===f?"":f)+l,p=("s"!==b||isNaN(e)||void 0===mS?"":PS[8+mS/3])+p+(O&&"("===f?")":""),j)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){p=(46===a?o+e.slice(n+1):e.slice(n))+p,e=e.slice(0,n);break}}g&&!h&&(e=t(e,1/0));var N=l.length+e.length+p.length,S=N<m?new Array(m-N+1).join(u):"";switch(g&&h&&(e=t(S+e,S.length?m-p.length:1/0),S=""),d){case"<":e=l+e+p+S;break;case"=":e=l+S+e+p;break;case"^":e=S.slice(0,N=S.length>>1)+l+e+p+S.slice(N);break;default:e=S+l+e+p}return i(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),O.toString=function(){return e+""},O}return{format:l,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(wS(t)/3))),r=Math.pow(10,-n),o=l(((e=yS(e)).type="f",e),{suffix:PS[8+n/3]});return function(e){return o(r*e)}}}}function _S(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,wS(t)-wS(e))+1}function RS(e){return Math.max(0,-wS(Math.abs(e)))}function LS(e,t,n,r){var o,i=eN(e,t,n);switch((r=yS(r??",f")).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=MS(i,a))||(r.precision=o),TS(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=_S(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=RS(i))||(r.precision=o-2*("%"===r.type))}return AS(r)}function US(e){var t=e.domain;return e.ticks=function(e){var n=t();return XO(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return LS(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,c=i[a],l=i[s],u=10;for(l<c&&(o=c,c=l,l=o,o=a,a=s,s=o);u-- >0;){if((o=JO(c,l,n))===r)return i[a]=c,i[s]=l,t(i);if(o>0)c=Math.floor(c/o)*o,l=Math.ceil(l/o)*o;else{if(!(o<0))break;c=Math.ceil(c*o)/o,l=Math.floor(l*o)/o}r=o}return e},e}function YS(){var e=hS();return e.copy=function(){return fS(e,YS())},LO.apply(e,arguments),US(e)}function FS(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,aS),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return FS(e).unknown(t)},e=arguments.length?Array.from(e,aS):[0,1],US(n)}function WS(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function BS(e){return Math.log(e)}function QS(e){return Math.exp(e)}function qS(e){return-Math.log(-e)}function GS(e){return-Math.exp(-e)}function $S(e){return isFinite(e)?+("1e"+e):e<0?0:e}function HS(e){return(t,n)=>-e(-t,n)}function VS(e){const t=e(BS,QS),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?$S:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=HS(r),o=HS(o),e(qS,GS)):e(BS,QS),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const c=s<a;c&&([a,s]=[s,a]);let l,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(i%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(l=1;l<i;++l)if(u=d<0?l/o(-d):l*o(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(l=i-1;l>=1;--l)if(u=d>0?l/o(-d):l*o(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=XO(a,s,p))}else h=XO(d,f,Math.min(f-d,p)).map(o);return c?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=yS(n)).precision||(n.trim=!0),n=AS(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(WS(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function KS(){const e=VS(pS()).domain([1,10]);return e.copy=()=>fS(e,KS()).base(e.base()),LO.apply(e,arguments),e}function ZS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function XS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function JS(e){var t=1,n=e(ZS(t),XS(t));return n.constant=function(n){return arguments.length?e(ZS(t=+n),XS(t)):t},US(n)}function eE(){var e=JS(pS());return e.copy=function(){return fS(e,eE()).constant(e.constant())},LO.apply(e,arguments)}function tE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function nE(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function rE(e){return e<0?-e*e:e*e}function oE(e){var t=e(cS,cS),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(cS,cS):.5===n?e(nE,rE):e(tE(n),tE(1/n)):n},US(t)}function iE(){var e=oE(pS());return e.copy=function(){return fS(e,iE()).exponent(e.exponent())},LO.apply(e,arguments),e}function aE(){return iE.apply(null,arguments).exponent(.5)}function sE(e){return Math.sign(e)*e*e}function cE(){var e,t=hS(),n=[0,1],r=!1;function o(n){var o=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(o)?e:r?Math.round(o):o}return o.invert=function(e){return t.invert(sE(e))},o.domain=function(e){return arguments.length?(t.domain(e),o):t.domain()},o.range=function(e){return arguments.length?(t.range((n=Array.from(e,aS)).map(sE)),o):n.slice()},o.rangeRound=function(e){return o.range(e).round(!0)},o.round=function(e){return arguments.length?(r=!!e,o):r},o.clamp=function(e){return arguments.length?(t.clamp(e),o):t.clamp()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return cE(t.domain(),n).round(r).clamp(t.clamp()).unknown(e)},LO.apply(o,arguments),US(o)}function lE(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}function uE(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function dE(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function fE(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?dE:function(e=tN){if(e===tN)return dE;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const i=r-n+1,a=t-n+1,s=Math.log(i),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(i-c)/i)*(a-i/2<0?-1:1);fE(e,t,Math.max(n,Math.floor(t-a*c/i+l)),Math.min(r,Math.floor(t+(i-a)*c/i+l)),o)}const i=e[t];let a=n,s=r;for(pE(e,n,t),o(e[r],i)>0&&pE(e,n,r);a<s;){for(pE(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}0===o(e[n],i)?pE(e,n,s):(++s,pE(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function pE(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function hE(e,t,n=iN){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}function mE(){var e,t=[],n=[],r=[];function o(){var e=0,o=Math.max(1,n.length);for(r=new Array(o-1);++e<o;)r[e-1]=hE(t,e/o);return i}function i(t){return null==t||isNaN(t=+t)?e:n[cN(r,t)]}return i.invertExtent=function(e){var o=n.indexOf(e);return o<0?[NaN,NaN]:[o>0?r[o-1]:t[0],o<r.length?r[o]:t[t.length-1]]},i.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(tN),o()},i.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.quantiles=function(){return r.slice()},i.copy=function(){return mE().domain(t).range(n).unknown(e)},LO.apply(i,arguments)}function gE(){var e,t=0,n=1,r=1,o=[.5],i=[0,1];function a(t){return null!=t&&t<=t?i[cN(o,t,0,r)]:e}function s(){var e=-1;for(o=new Array(r);++e<r;)o[e]=((e+1)*n-(e-r)*t)/(r+1);return a}return a.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},a.range=function(e){return arguments.length?(r=(i=Array.from(e)).length-1,s()):i.slice()},a.invertExtent=function(e){var a=i.indexOf(e);return a<0?[NaN,NaN]:a<1?[t,o[0]]:a>=r?[o[r-1],n]:[o[a-1],o[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return o.slice()},a.copy=function(){return gE().domain([t,n]).range(i).unknown(e)},LO.apply(US(a),arguments)}function yE(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[cN(t,o,0,r)]:e}return o.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),o):t.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return yE().domain(t).range(n).unknown(e)},LO.apply(o,arguments)}IS=zS({thousands:",",grouping:[3],currency:["$",""]}),AS=IS.format,TS=IS.formatPrefix,n.dn(_S),n.dn(RS);const vE=36e5,bE=864e5,xE=6048e5,wE=31536e6,ME=new Date,jE=new Date;function OE(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>OE(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(o.count=(t,r)=>(ME.setTime(+t),jE.setTime(+r),e(ME),e(jE),Math.floor(n(ME,jE))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const NE=OE(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);NE.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?OE(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):NE:null),NE.range;const SE=OE(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),EE=(SE.range,OE(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes())),kE=(EE.range,OE(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())),DE=(kE.range,OE(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+t*vE)},(e,t)=>(t-e)/vE,e=>e.getHours())),IE=(DE.range,OE(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*vE)},(e,t)=>(t-e)/vE,e=>e.getUTCHours())),AE=(IE.range,OE(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/bE,e=>e.getDate()-1)),TE=(AE.range,OE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bE,e=>e.getUTCDate()-1)),CE=(TE.range,OE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bE,e=>Math.floor(e/bE)));function PE(e){return OE(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/xE)}CE.range;const zE=PE(0),_E=PE(1),RE=PE(2),LE=PE(3),UE=PE(4),YE=PE(5),FE=PE(6);function WE(e){return OE(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/xE)}zE.range,_E.range,RE.range,LE.range,UE.range,YE.range,FE.range;const BE=WE(0),QE=WE(1),qE=WE(2),GE=WE(3),$E=WE(4),HE=WE(5),VE=WE(6),KE=(BE.range,QE.range,qE.range,GE.range,$E.range,HE.range,VE.range,OE(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),ZE=(KE.range,OE(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),XE=(ZE.range,OE(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));XE.every=e=>isFinite(e=Math.floor(e))&&e>0?OE(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,XE.range;const JE=OE(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function ek(e,t,n,r,o,i){const a=[[SE,1,1e3],[SE,5,5e3],[SE,15,15e3],[SE,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,vE],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,bE],[r,2,1728e5],[n,1,xE],[t,1,2592e6],[t,3,7776e6],[e,1,wE]];function s(t,n,r){const o=Math.abs(n-t)/r,i=rN(([,,e])=>e).right(a,o);if(i===a.length)return e.every(eN(t/wE,n/wE,r));if(0===i)return NE.every(Math.max(eN(t,n,r),1));const[s,c]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(c)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}JE.every=e=>isFinite(e=Math.floor(e))&&e>0?OE(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,JE.range;const[tk,nk]=ek(JE,ZE,BE,CE,IE,kE),[rk,ok]=ek(XE,KE,zE,AE,DE,EE);function ik(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ak(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function sk(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var ck,lk,uk,dk={"-":"",_:" ",0:"0"},fk=/^\s*\d+/,pk=/^%/,hk=/[\\^$*+?|[\]().{}]/g;function mk(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function gk(e){return e.replace(hk,"\\$&")}function yk(e){return new RegExp("^(?:"+e.map(gk).join("|")+")","i")}function vk(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function bk(e,t,n){var r=fk.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function xk(e,t,n){var r=fk.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function wk(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Mk(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function jk(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Ok(e,t,n){var r=fk.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Nk(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Sk(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ek(e,t,n){var r=fk.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function kk(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Dk(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ik(e,t,n){var r=fk.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ak(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Tk(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ck(e,t,n){var r=fk.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Pk(e,t,n){var r=fk.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zk(e,t,n){var r=fk.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _k(e,t,n){var r=pk.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Rk(e,t,n){var r=fk.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Lk(e,t,n){var r=fk.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Uk(e,t){return mk(e.getDate(),t,2)}function Yk(e,t){return mk(e.getHours(),t,2)}function Fk(e,t){return mk(e.getHours()%12||12,t,2)}function Wk(e,t){return mk(1+AE.count(XE(e),e),t,3)}function Bk(e,t){return mk(e.getMilliseconds(),t,3)}function Qk(e,t){return Bk(e,t)+"000"}function qk(e,t){return mk(e.getMonth()+1,t,2)}function Gk(e,t){return mk(e.getMinutes(),t,2)}function $k(e,t){return mk(e.getSeconds(),t,2)}function Hk(e){var t=e.getDay();return 0===t?7:t}function Vk(e,t){return mk(zE.count(XE(e)-1,e),t,2)}function Kk(e){var t=e.getDay();return t>=4||0===t?UE(e):UE.ceil(e)}function Zk(e,t){return e=Kk(e),mk(UE.count(XE(e),e)+(4===XE(e).getDay()),t,2)}function Xk(e){return e.getDay()}function Jk(e,t){return mk(_E.count(XE(e)-1,e),t,2)}function eD(e,t){return mk(e.getFullYear()%100,t,2)}function tD(e,t){return mk((e=Kk(e)).getFullYear()%100,t,2)}function nD(e,t){return mk(e.getFullYear()%1e4,t,4)}function rD(e,t){var n=e.getDay();return mk((e=n>=4||0===n?UE(e):UE.ceil(e)).getFullYear()%1e4,t,4)}function oD(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+mk(t/60|0,"0",2)+mk(t%60,"0",2)}function iD(e,t){return mk(e.getUTCDate(),t,2)}function aD(e,t){return mk(e.getUTCHours(),t,2)}function sD(e,t){return mk(e.getUTCHours()%12||12,t,2)}function cD(e,t){return mk(1+TE.count(JE(e),e),t,3)}function lD(e,t){return mk(e.getUTCMilliseconds(),t,3)}function uD(e,t){return lD(e,t)+"000"}function dD(e,t){return mk(e.getUTCMonth()+1,t,2)}function fD(e,t){return mk(e.getUTCMinutes(),t,2)}function pD(e,t){return mk(e.getUTCSeconds(),t,2)}function hD(e){var t=e.getUTCDay();return 0===t?7:t}function mD(e,t){return mk(BE.count(JE(e)-1,e),t,2)}function gD(e){var t=e.getUTCDay();return t>=4||0===t?$E(e):$E.ceil(e)}function yD(e,t){return e=gD(e),mk($E.count(JE(e),e)+(4===JE(e).getUTCDay()),t,2)}function vD(e){return e.getUTCDay()}function bD(e,t){return mk(QE.count(JE(e)-1,e),t,2)}function xD(e,t){return mk(e.getUTCFullYear()%100,t,2)}function wD(e,t){return mk((e=gD(e)).getUTCFullYear()%100,t,2)}function MD(e,t){return mk(e.getUTCFullYear()%1e4,t,4)}function jD(e,t){var n=e.getUTCDay();return mk((e=n>=4||0===n?$E(e):$E.ceil(e)).getUTCFullYear()%1e4,t,4)}function OD(){return"+0000"}function ND(){return"%"}function SD(e){return+e}function ED(e){return Math.floor(+e/1e3)}function kD(e){return new Date(e)}function DD(e){return e instanceof Date?+e:+new Date(+e)}function ID(e,t,n,r,o,i,a,s,c,l){var u=hS(),d=u.invert,f=u.domain,p=l(".%L"),h=l(":%S"),m=l("%I:%M"),g=l("%I %p"),y=l("%a %d"),v=l("%b %d"),b=l("%B"),x=l("%Y");function w(e){return(c(e)<e?p:s(e)<e?h:a(e)<e?m:i(e)<e?g:r(e)<e?o(e)<e?y:v:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,DD)):f().map(kD)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?w:l(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],e??10)),e?f(WS(n,e)):u},u.copy=function(){return fS(u,ID(e,t,n,r,o,i,a,s,c,l))},u}function AD(){return LO.apply(ID(rk,ok,XE,KE,zE,AE,DE,EE,SE,lk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function TD(){return LO.apply(ID(tk,nk,JE,ZE,BE,TE,IE,kE,SE,uk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function CD(){var e,t,n,r,o,i=0,a=1,s=cS,c=!1;function l(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,c?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),l):[s(0),s(1)]}}return l.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),l):[i,a]},l.clamp=function(e){return arguments.length?(c=!!e,l):c},l.interpolator=function(e){return arguments.length?(s=e,l):s},l.range=u(oS),l.rangeRound=u(iS),l.unknown=function(e){return arguments.length?(o=e,l):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),l}}function PD(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zD(){var e=US(CD()(cS));return e.copy=function(){return PD(e,zD())},UO.apply(e,arguments)}function _D(){var e=VS(CD()).domain([1,10]);return e.copy=function(){return PD(e,_D()).base(e.base())},UO.apply(e,arguments)}function RD(){var e=JS(CD());return e.copy=function(){return PD(e,RD()).constant(e.constant())},UO.apply(e,arguments)}function LD(){var e=oE(CD());return e.copy=function(){return PD(e,LD()).exponent(e.exponent())},UO.apply(e,arguments)}function UD(){return LD.apply(null,arguments).exponent(.5)}function YD(){var e=[],t=cS;function n(n){if(null!=n&&!isNaN(n=+n))return t((cN(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(tN),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>function(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return uE(e);if(t>=1)return lE(e);var r,o=(r-1)*t,i=Math.floor(o),a=lE(fE(e,i).subarray(0,i+1));return a+(uE(e.subarray(i+1))-a)*(o-i)}}(e,r/t))},n.copy=function(){return YD(t).domain(e)},UO.apply(n,arguments)}function FD(){var e,t,n,r,o,i,a,s=0,c=.5,l=1,u=1,d=cS,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=function(e,t){void 0===t&&(t=e,e=oS);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,c,l]=a,e=i(s=+s),t=i(c=+c),n=i(l=+l),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,c,l]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(oS),p.rangeRound=h(iS),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(c),n=a(l),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function WD(){var e=US(FD()(cS));return e.copy=function(){return PD(e,WD())},UO.apply(e,arguments)}function BD(){var e=VS(FD()).domain([.1,1,10]);return e.copy=function(){return PD(e,BD()).base(e.base())},UO.apply(e,arguments)}function QD(){var e=JS(FD());return e.copy=function(){return PD(e,QD()).constant(e.constant())},UO.apply(e,arguments)}function qD(){var e=oE(FD());return e.copy=function(){return PD(e,qD()).exponent(e.exponent())},UO.apply(e,arguments)}function GD(){return qD.apply(null,arguments).exponent(.5)}function $D(e,t,n){if("function"==typeof e)return e.copy().domain(t).range(n);if(null!=e){var r=function(e){var t=o;if(e in t&&"function"==typeof t[e])return t[e]();var n="scale".concat(ew(e));return n in t&&"function"==typeof t[n]?t[n]():void 0}(e);if(null!=r)return r.domain(t).range(n),r}}function HD(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?$D(e.scale,n,r):$D(t,n,r)}ck=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,c=e.shortMonths,l=yk(o),u=vk(o),d=yk(i),f=vk(i),p=yk(a),h=vk(a),m=yk(s),g=vk(s),y=yk(c),v=vk(c),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Uk,e:Uk,f:Qk,g:tD,G:rD,H:Yk,I:Fk,j:Wk,L:Bk,m:qk,M:Gk,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:SD,s:ED,S:$k,u:Hk,U:Vk,V:Zk,w:Xk,W:Jk,x:null,X:null,y:eD,Y:nD,Z:oD,"%":ND},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return c[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:iD,e:iD,f:uD,g:wD,G:jD,H:aD,I:sD,j:cD,L:lD,m:dD,M:fD,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:SD,s:ED,S:pD,u:hD,U:mD,V:yD,w:vD,W:bD,x:null,X:null,y:xD,Y:MD,Z:OD,"%":ND},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return O(e,t,n,r)},d:Dk,e:Dk,f:zk,g:Nk,G:Ok,H:Ak,I:Ak,j:Ik,L:Pk,m:kk,M:Tk,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ek,Q:Rk,s:Lk,S:Ck,u:xk,U:wk,V:Mk,w:bk,W:jk,x:function(e,t,r){return O(e,n,t,r)},X:function(e,t,n){return O(e,r,t,n)},y:Nk,Y:Ok,Z:Sk,"%":_k};function M(e,t){return function(n){var r,o,i,a=[],s=-1,c=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(c,s)),null!=(o=dk[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),c=s+1);return a.push(e.slice(c,s)),a.join("")}}function j(e,t){return function(n){var r,o,i=sk(1900,void 0,1);if(O(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=ak(sk(i.y,0,1))).getUTCDay(),r=o>4||0===o?QE.ceil(r):QE(r),r=TE.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=ik(sk(i.y,0,1))).getDay(),r=o>4||0===o?_E.ceil(r):_E(r),r=AE.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?ak(sk(i.y,0,1)).getUTCDay():ik(sk(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,ak(i)):ik(i)}}function O(e,t,n,r){for(var o,i,a=0,s=t.length,c=n.length;a<s;){if(r>=c)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in dk?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),x.x=M(n,x),x.X=M(r,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=j(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=j(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),lk=ck.format,ck.parse,uk=ck.utcFormat,ck.utcParse;var VD=(e,t,n)=>{if(null!=e){var r=e.scale,i=e.type;return"auto"===r?"category"===i&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear":"string"==typeof r?function(e){return"scale".concat(ew(e))}(r)in o?r:"point":void 0}};function KD(e,t){if(e){var n=null!=t?t:e.domain(),r=n.map(t=>{var n;return null!==(n=e(t))&&void 0!==n?n:0}),o=e.range();if(!(0===n.length||o.length<2))return e=>{var t,o,i=function(e,t){for(var n=0,r=e.length,o=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(o?e[i]<t:e[i]>t)?n=i+1:r=i}return n}(r,e);if(i<=0)return n[0];if(i>=n.length)return n[n.length-1];var a=null!==(t=r[i-1])&&void 0!==t?t:0,s=null!==(o=r[i])&&void 0!==o?o:0;return Math.abs(e-a)<=Math.abs(e-s)?n[i-1]:n[i]}}}function ZD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZD(Object(n),!0).forEach(function(t){JD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JD(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tI(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nI=[0,"auto"],rI={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},oI=(e,t)=>e.cartesianAxis.xAxis[t],iI=(e,t)=>oI(e,t)??rI,aI={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:nI,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:60},sI=(e,t)=>e.cartesianAxis.yAxis[t],cI=(e,t)=>sI(e,t)??aI,lI={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},uI=(e,t)=>e.cartesianAxis.zAxis[t]??lI,dI=(e,t,n)=>{switch(t){case"xAxis":return iI(e,n);case"yAxis":return cI(e,n);case"zAxis":return uI(e,n);case"angleAxis":return vO(e,n);case"radiusAxis":return bO(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},fI=(e,t,n)=>{switch(t){case"xAxis":return iI(e,n);case"yAxis":return cI(e,n);case"angleAxis":return vO(e,n);case"radiusAxis":return bO(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},pI=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function hI(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var mI=e=>e.graphicalItems.cartesianItems,gI=Do([EO,kO],hI),yI=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),vI=Do([mI,dI,gI],yI,{memoizeOptions:{resultEqualityCheck:CO}}),bI=Do([vI],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(AO)),xI=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),wI=Do([vI],xI),MI=e=>e.map(e=>e.data).filter(Boolean).flat(1),jI=Do([vI],e=>e.some(e=>!e.data)),OI=Do([vI],MI,{memoizeOptions:{resultEqualityCheck:CO}}),NI=(e,t)=>{var n=t.chartData,r=void 0===n?[]:n,o=t.dataStartIndex,i=t.dataEndIndex;return e.length>0?e:r.slice(o,i+1)},SI=Do([OI,kj],NI),EI=(e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:RM(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:RM(e,t)}))):e.map(e=>({value:e})),kI=(e,t,n,r,o,i)=>{var a=r.chartData,s=void 0===a?[]:a,c=r.dataStartIndex,l=r.dataEndIndex,u=EI(e,t,n);return o&&null!=(null==t?void 0:t.dataKey)&&i.length>0?[...s.slice(c,l+1).map(e=>({value:RM(e,t.dataKey)})).filter(e=>null!=e.value),...u]:u},DI=Do([SI,dI,vI,kj,jI,OI],kI);function II(e){if(Gx(e)||e instanceof Date){var t=Number(e);if(dw(t))return t}}function AI(e){if(Array.isArray(e)){var t=[II(e[0]),II(e[1])];return Pj(t)?t:void 0}var n=II(e);if(null!=n)return[n,n]}function TI(e){return e.map(II).filter(tw)}function CI(e,t){var n=II(e),r=II(t);return null==n&&null==r?0:null==n?-1:null==r?1:n-r}var PI=Do([DI],e=>null==e?void 0:e.map(e=>e.value).sort(CI));function zI(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var _I=e=>{var t=PO(e),n=zO(e);return fI(e,t,n)},RI=Do([_I],e=>null==e?void 0:e.dataKey),LI=Do([bI,kj,_I],IO),UI=(e,t,n,r)=>{var o=t.reduce((e,t)=>{if(null==t.stackId)return e;var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(o).map(t=>{var o=eI(t,2),i=o[0],a=o[1],s=r?[...a].reverse():a,c=s.map(DO);return[i,{stackedData:WM(e,c,n),graphicalItems:s}]}))},YI=Do([LI,bI,Vj,Kj],UI),FI=(e,t,n,r)=>{var o=t.dataStartIndex,i=t.dataEndIndex;if(null==r&&"zAxis"!==n)return((e,t,n)=>{var r;if(null!=e&&0!==Object.keys(e).length)return r=Object.keys(e).reduce((r,o)=>{var i=e[o];if(!i)return r;var a=i.stackedData.reduce((e,r)=>{var o,i=(o=CM(r,t,n).flat(2).filter(qx),[Math.min(...o),Math.max(...o)]);return dw(i[0])&&dw(i[1])?[Math.min(e[0],i[0]),Math.max(e[1],i[1])]:e},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]})(e,o,i)},WI=Do([dI],e=>e.allowDataOverflow),BI=e=>{var t;if(null==e||!("domain"in e))return nI;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=TI(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:nI},QI=Do([dI],BI),qI=Do([QI,WI],_j),GI=Do([YI,Sj,EO,qI],FI,{memoizeOptions:{resultEqualityCheck:TO}}),$I=e=>e.errorBars,HI=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var o=r.flat();return[Math.min(...o),Math.max(...o)]}},VI=function(e,t,n,r,o){var i,a,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];if(n.length>0&&n.forEach(e=>{var n,c=null!=e.data?[...e.data]:s,l=null===(n=r[e.id])||void 0===n?void 0:n.filter(e=>zI(o,e));c.forEach(n=>{var r,o=RM(n,null!==(r=t.dataKey)&&void 0!==r?r:e.dataKey),s=function(e,t,n){if(!n)return[];if(!n.length)return[];var r;if("number"!=typeof t||Bx(t)){if(Array.isArray(t)){var o=TI(t);o.length>0&&(r=Math.max(...o))}}else r=t;return null==r?[]:TI(n.flatMap(t=>{var n,o,i=RM(e,t.dataKey);if(Array.isArray(i)){var a=eI(i,2);n=a[0],o=a[1]}else n=o=i;if(dw(n)&&dw(o))return[r-n,r+o]}))}(n,o,l);if(s.length>=2){var c=Math.min(...s),u=Math.max(...s);(null==i||c<i)&&(i=c),(null==a||u>a)&&(a=u)}var d=AI(o);null!=d&&(i=null==i?d[0]:Math.min(i,d[0]),a=null==a?d[1]:Math.max(a,d[1]))})}),null!=(null==t?void 0:t.dataKey)&&0===n.length&&e.forEach(e=>{var n=AI(RM(e,t.dataKey));null!=n&&(i=null==i?n[0]:Math.min(i,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),dw(i)&&dw(a))return[i,a]},KI=Do([SI,dI,wI,$I,EO,Dj],VI,{memoizeOptions:{resultEqualityCheck:TO}});function ZI(e){var t=e.value;if(Gx(t)||t instanceof Date)return t}var XI=e=>e.referenceElements.dots,JI=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),eA=Do([XI,EO,kO],JI),tA=e=>e.referenceElements.areas,nA=Do([tA,EO,kO],JI),rA=e=>e.referenceElements.lines,oA=Do([rA,EO,kO],JI),iA=(e,t)=>{if(null!=e){var n=TI(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},aA=Do(eA,EO,iA),sA=(e,t)=>{if(null!=e){var n=TI(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},cA=Do([nA,EO],sA),lA=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return TI([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:TI(n)}(e):function(e){var t;if(null!=e.y)return TI([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:TI(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},uA=Do([oA,EO],lA),dA=Do(aA,uA,cA,(e,t,n)=>HI(e,n,t)),fA=(e,t,n,r,o,i,a,s,c)=>{if(null!=n)return n;var l="vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?HI(r,i,o):HI(i,o),u=function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(Pj(r))return zj(r,t,n)}catch(e){}if(Array.isArray(e)&&2===e.length){var o,i,a=Tj(e,2),s=a[0],c=a[1];if("auto"===s)null!=t&&(o=Math.min(...t));else if(qx(s))o=s;else if("function"==typeof s)try{null!=t&&(o=s(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof s&&QM.test(s)){var l=QM.exec(s);if(null==l||null==l[1]||null==t)o=void 0;else{var u=+l[1];o=t[0]-u}}else o=null==t?void 0:t[0];if("auto"===c)null!=t&&(i=Math.max(...t));else if(qx(c))i=c;else if("function"==typeof c)try{null!=t&&(i=c(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof c&&qM.test(c)){var d=qM.exec(c);if(null==d||null==d[1]||null==t)i=void 0;else{var f=+d[1];i=t[1]+f}}else i=null==t?void 0:t[1];var p=[o,i];if(Pj(p))return null==t?p:zj(p,t,n)}}}(t,l,e.allowDataOverflow);return null!=u?u:e.allowDataOverflow&&null==l&&null!=c?c:u},pA=Do([dI],e=>{if(null!=e&&"number"===e.type&&"ticks"in e&&null!=e.ticks){var t=TI(e.ticks);if(0!==t.length)return[Math.min(...t),Math.max(...t)]}},{memoizeOptions:{resultEqualityCheck:TO}}),hA=Do([dI,QI,qI,GI,KI,dA,bj,EO,pA],fA,{memoizeOptions:{resultEqualityCheck:TO}}),mA=[0,1],gA=(e,t,n,r,o,i,a)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==a){var s,c=e.dataKey,l=e.type,u=LM(t,i);return u&&null==c?Nj(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===l?((e,t,n)=>{var r=e.map(ZI).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&Kx(r))?Nj(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,u):"expand"!==o||u?a:mA}},yA=Do([dI,bj,SI,DI,Vj,EO,hA],gA),vA=Do([dI,pI,Zj],VD),bA=(e,t,n)=>{var r=t.niceTicks;if("none"!==r){var o=BI(t),i=Array.isArray(o)&&("auto"===o[0]||"auto"===o[1]);if(("snap125"===r||"adaptive"===r)&&null!=t&&t.tickCount&&Pj(e)){if(i)return $j(e,t.tickCount,t.allowDecimals,r);if("number"===t.type)return Hj(e,t.tickCount,t.allowDecimals,r)}if("auto"===r&&"linear"===n&&null!=t&&t.tickCount){if(i&&Pj(e))return $j(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&Pj(e))return Hj(e,t.tickCount,t.allowDecimals,"adaptive")}}},xA=Do([yA,fI,vA],bA),wA=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&Pj(t)&&Array.isArray(n)&&n.length>0){var o,i,a=t[0],s=null!==(o=n[0])&&void 0!==o?o:0,c=t[1],l=null!==(i=n[n.length-1])&&void 0!==i?i:0;return[Math.min(a,s),Math.max(c,l)]}return t},MA=Do([dI,yA,xA,EO],wA),jA=Do(DI,dI,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(TI(e.map(e=>e.value))).sort((e,t)=>e-t),o=r[0],i=r[r.length-1];if(null==o||null==i)return 1/0;var a=i-o;if(0===a)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(null!=c&&null!=l){var u=l-c;n=Math.min(n,u)}}return n/a}}),OA=Do(jA,bj,e=>e.rootProps.barCategoryGap,aj,(e,t,n,r,o)=>o,(e,t,n,r,o)=>{if(!dw(e))return 0;var i="vertical"===t?r.height:r.width;if("gap"===o)return e*i/2;if("no-gap"===o){var a=Vx(n,e*i),s=e*i/2;return s-a-(s-a)/i*a}return 0}),NA=Do(iI,(e,t,n)=>{var r=iI(e,t);return null==r||"string"!=typeof r.padding?0:OA(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var o=e.padding;return"string"==typeof o?{left:t,right:t}:{left:(null!==(n=o.left)&&void 0!==n?n:0)+t,right:(null!==(r=o.right)&&void 0!==r?r:0)+t}}),SA=Do(cI,(e,t,n)=>{var r=cI(e,t);return null==r||"string"!=typeof r.padding?0:OA(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var o=e.padding;return"string"==typeof o?{top:t,bottom:t}:{top:(null!==(n=o.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=o.bottom)&&void 0!==r?r:0)+t}}),EA=Do([aj,NA,fj,dj,(e,t,n)=>n],(e,t,n,r,o)=>{var i=r.padding;return o?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),kA=Do([aj,bj,SA,fj,dj,(e,t,n)=>n],(e,t,n,r,o,i)=>{var a=o.padding;return i?[r.height-a.bottom,a.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),DA=(e,t,n,r)=>{var o;switch(t){case"xAxis":return EA(e,n,r);case"yAxis":return kA(e,n,r);case"zAxis":return null===(o=uI(e,n))||void 0===o?void 0:o.range;case"angleAxis":return OO(e);case"radiusAxis":return NO(e,n);default:return}},IA=Do([dI,DA],dO),AA=Do([vA,MA],RO),TA=Do([dI,vA,AA,IA],HD),CA=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var o=n.type,i=n.scale;return!LM(e,r)||"number"!==o&&"auto"===i?void 0:t.map(e=>e.value)}},PA=Do([bj,DI,fI,EO],CA),zA=Do([TA],_O);function _A(e,t){return e.id<t.id?-1:e.id>t.id?1:0}Do([TA],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):KD(e,void 0)}),Do([TA,PI],KD),Do([vI,$I,EO],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>zI(n,e)));var RA=(e,t)=>t,LA=(e,t,n)=>n,UA=Do(JM,RA,LA,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(_A)),YA=Do(ej,RA,LA,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(_A)),FA=(e,t)=>({width:e.width,height:t.height}),WA=Do(aj,iI,FA),BA=Do(KM,aj,UA,RA,LA,(e,t,n,r,o)=>{var i,a={};return n.forEach(n=>{var s=FA(t,n);null==i&&(i=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var c="top"===r&&!o||"bottom"===r&&o;a[n.id]=i-Number(c)*s.height,i+=(c?-1:1)*s.height}),a}),QA=Do(VM,aj,YA,RA,LA,(e,t,n,r,o)=>{var i,a={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==i&&(i=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var c="left"===r&&!o||"right"===r&&o;a[n.id]=i-Number(c)*s.width,i+=(c?-1:1)*s.width}),a}),qA=Do([aj,iI,(e,t)=>{var n=iI(e,t);if(null!=n)return BA(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:e.left,y:0}:{x:e.left,y:o}}}),GA=Do([aj,cI,(e,t)=>{var n=cI(e,t);if(null!=n)return QA(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:0,y:e.top}:{x:o,y:e.top}}}),$A=Do(aj,cI,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),HA=(e,t,n,r)=>{if(null!=n){var o=n.allowDuplicatedCategory,i=n.type,a=n.dataKey,s=LM(e,r),c=t.map(e=>e.value),l=c.filter(e=>null!=e);return a&&s&&"category"===i&&o&&Kx(l)?c:void 0}},VA=Do([bj,DI,dI,EO],HA),KA=Do([bj,(e,t,n)=>{switch(t){case"xAxis":return iI(e,n);case"yAxis":return cI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},vA,zA,VA,PA,DA,xA,EO],(e,t,n,r,o,i,a,s,c)=>{if(null!=t){var l=LM(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:i,duplicateDomain:o,isCategorical:l,niceTicks:s,range:a,realScaleType:n,scale:r}}}),ZA=Do([bj,fI,vA,zA,xA,DA,VA,PA,EO],(e,t,n,r,o,i,a,s,c)=>{if(null!=t&&null!=r){var l=LM(e,c),u=t.type,d=t.ticks,f=t.tickCount,p="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,h="category"===u&&r.bandwidth?r.bandwidth()/p:0;h="angleAxis"===c&&null!=i&&i.length>=2?2*Wx(i[0]-i[1])*h:h;var m=d||o;return m?m.map((e,t)=>{var n=a?a.indexOf(e):e,o=r.map(n);return dw(o)?{index:t,coordinate:o+h,value:e,offset:h}:null}).filter(tw):l&&s?s.map((e,t)=>{var n=r.map(e);return dw(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(tw):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return dw(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(tw):r.domain().map((e,t)=>{var n=r.map(e);return dw(n)?{coordinate:n+h,value:a?a[e]:e,index:t,offset:h}:null}).filter(tw)}}),XA=Do([bj,fI,zA,DA,VA,PA,EO],(e,t,n,r,o,i,a)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=LM(e,a),c=t.tickCount,l=0;return l="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*Wx(r[0]-r[1])*l:l,s&&i?i.map((e,t)=>{var r=n.map(e);return dw(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(tw):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return dw(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(tw):n.domain().map((e,t)=>{var r=n.map(e);return dw(r)?{coordinate:r+l,value:o?o[e]:e,index:t,offset:l}:null}).filter(tw)}}),JA=Do(dI,zA,(e,t)=>{if(null!=e&&null!=t)return XD(XD({},e),{},{scale:t})}),eT=Do([dI,vA,yA,IA],HD),tT=Do([eT],_O),nT=(Do((e,t,n)=>uI(e,n),tT,(e,t)=>{if(null!=e&&null!=t)return XD(XD({},e),{},{scale:t})}),Do([bj,JM,ej],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}})),rT=(Do([(e,t,n)=>{var r;return null===(r=e.renderedTicks[t])||void 0===r?void 0:r[n]}],e=>{if(e&&0!==e.length)return t=>{var n,r=1/0,o=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<r&&(r=a,o=i)}return null===(n=o)||void 0===n?void 0:n.value}}),e=>e.options.defaultTooltipEventType),oT=e=>e.options.validateTooltipEventTypes;function iT(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function aT(e,t){return iT(t,rT(e),oT(e))}var sT=(e,t)=>{var n,r=Number(t);if(!Bx(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0};function cT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cT(Object(n),!0).forEach(function(t){uT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dT=(e,t,n,r)=>{if(null==t)return kw;var o=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==o)return kw;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var i=!0===e.settings.active;if(null!=o.index){if(i)return lT(lT({},o),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return lT(lT({},kw),{},{coordinate:o.coordinate})};var fT=(e,t,n,r)=>{var o=null==e?void 0:e.index;if(null==o)return null;var i=Number(o);if(!dw(i))return o;var a=1/0;t.length>0&&(a=t.length-1);var s=Math.max(0,Math.min(i,a)),c=t[s];return null==c||function(e,t,n){if(null==n||null==t)return!0;var r=RM(e,t);return null==r||!Pj(n)||function(e,t){var n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}(e),r=t[0],o=t[1];if(void 0===n)return!1;var i=Math.min(r,o),a=Math.max(r,o);return n>=i&&n<=a}(r,n)}(c,n,r)?String(s):null},pT=(e,t,n,r,o,i,a)=>{if(null!=i){var s=a[0],c=null==s?void 0:s.getPosition(i);if(null!=c)return c;var l=null==o?void 0:o[Number(i)];if(l)return"horizontal"===n?{x:l.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:l.coordinate}}},hT=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var o;if(o="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==o)return e.tooltipItemPayloads;if(null==o&&(null!=r||e.keyboardInteraction.active)){var i=e.tooltipItemPayloads[0];return null!=i?[i]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===o})},mT=e=>e.options.tooltipPayloadSearcher,gT=e=>e.tooltip;function yT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yT(Object(n),!0).forEach(function(t){bT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xT(e){if("string"==typeof e)return e}var wT=(e,t,n,r,o,i,a)=>{if(null!=t&&null!=i){var s=n.chartData,c=n.computedData,l=n.dataStartIndex,u=n.dataEndIndex;return e.reduce((e,n)=>{var d,f,p,h=n.dataDefinedOnItem,m=n.settings,g=function(e,t){return null!=e?e:t}(h,s),y=Array.isArray(g)?CM(g,l,u):g,v=null!==(d=null==m?void 0:m.dataKey)&&void 0!==d?d:r,b=null==m?void 0:m.nameKey;return f=r&&Array.isArray(y)&&!Array.isArray(y[0])&&"axis"===a?Xx(y,r,o):i(y,t,c,b),Array.isArray(f)?f.forEach(t=>{var n,r,o=function(e){if(null!=e&&"object"==typeof e){var t="name"in e?function(e){if("string"==typeof e||"number"==typeof e)return e}(e.name):void 0,n="unit"in e?function(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e}(e.unit):void 0,r="dataKey"in e?function(e){return"string"==typeof e||"number"==typeof e?e:"function"==typeof e?t=>e(t):void 0}(e.dataKey):void 0;return{name:t,unit:n,dataKey:r,payload:"payload"in e?e.payload:void 0,color:"color"in e?xT(e.color):void 0,fill:"fill"in e?xT(e.fill):void 0}}}(t),i=null==o?void 0:o.name,a=null==o?void 0:o.dataKey,s=null==o?void 0:o.payload,c=vT(vT({},m),{},{name:i,unit:null==o?void 0:o.unit,color:null!==(n=null==o?void 0:o.color)&&void 0!==n?n:null==m?void 0:m.color,fill:null!==(r=null==o?void 0:o.fill)&&void 0!==r?r:null==m?void 0:m.fill});e.push($M({tooltipEntrySettings:c,dataKey:a,payload:s,value:RM(s,a),name:null==i?void 0:String(i)}))}):e.push($M({tooltipEntrySettings:m,dataKey:v,payload:f,value:RM(f,v),name:null!==(p=RM(f,b))&&void 0!==p?p:null==m?void 0:m.name})),e},[])}},MT=Do([_I,pI,Zj],VD),jT=Do([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),OT=Do([PO,zO],hI),NT=Do([jT,_I,OT],yI,{memoizeOptions:{resultEqualityCheck:CO}}),ST=Do([NT],e=>e.filter(AO)),ET=Do([NT],MI,{memoizeOptions:{resultEqualityCheck:CO}}),kT=Do([NT],e=>e.some(e=>!e.data)),DT=Do([ET,Sj],NI),IT=Do([ST,Sj,_I],IO),AT=Do([DT,_I,NT,Sj,kT,ET],kI),TT=Do([_I],BI),CT=Do([_I],e=>e.allowDataOverflow),PT=Do([TT,CT],_j),zT=Do([NT],e=>e.filter(AO)),_T=Do([IT,zT,Vj,Kj],UI),RT=Do([_T,Sj,PO,PT],FI),LT=Do([NT],xI),UT=Do([DT,_I,LT,$I,PO,Aj],VI,{memoizeOptions:{resultEqualityCheck:TO}}),YT=Do([XI,PO,zO],JI),FT=Do([YT,PO],iA),WT=Do([tA,PO,zO],JI),BT=Do([WT,PO],sA),QT=Do([rA,PO,zO],JI),qT=Do([QT,PO],lA),GT=Do([FT,qT,BT],HI),$T=Do([_I,TT,PT,RT,UT,GT,bj,PO],fA),HT=Do([_I,bj,DT,AT,Vj,PO,$T],gA),VT=Do([HT,_I,MT],bA),KT=Do([_I,HT,VT,PO],wA),ZT=e=>{var t=PO(e),n=zO(e);return DA(e,t,n,!1)},XT=Do([_I,ZT],dO),JT=Do([_I,MT,KT,XT],HD),eC=Do([JT],_O),tC=Do([bj,AT,_I,PO],HA),nC=Do([bj,AT,_I,PO],CA),rC=Do([bj,_I,MT,eC,ZT,tC,nC,PO],(e,t,n,r,o,i,a,s)=>{if(t){var c=t.type,l=LM(e,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===c&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===s&&null!=o&&(null==o?void 0:o.length)>=2?2*Wx(o[0]-o[1])*d:d,l&&a?a.map((e,t)=>{var n=r.map(e);return dw(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(tw):r.domain().map((e,t)=>{var n=r.map(e);return dw(n)?{coordinate:n+d,value:i?i[e]:e,index:t,offset:d}:null}).filter(tw)}}}),oC=Do([rT,oT,e=>e.tooltip.settings],(e,t,n)=>iT(n.shared,e,t)),iC=e=>e.tooltip.settings.trigger,aC=e=>e.tooltip.settings.defaultIndex,sC=Do([gT,oC,iC,aC],dT),cC=Do([sC,DT,RI,HT],fT),lC=Do([rC,cC],sT),uC=Do([sC],e=>{if(e)return e.dataKey}),dC=Do([sC],e=>{if(e)return e.graphicalItemId}),fC=Do([gT,oC,iC,aC],hT),pC=Do([VM,KM,bj,aj,rC,aC,fC],pT),hC=Do([sC,pC],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),mC=Do([sC],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),gC=Do([fC,cC,Sj,RI,lC,mT,oC],wT),yC=Do([gC],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function vC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vC(Object(n),!0).forEach(function(t){xC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wC=(e,t,n,r,o)=>{var i,a=null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0;if(a<=1||null==e)return 0;if("angleAxis"===r&&null!=o&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var s=0;s<a;s++){var c,l,u,d,f,p=s>0?null===(c=n[s-1])||void 0===c?void 0:c.coordinate:null===(l=n[a-1])||void 0===l?void 0:l.coordinate,h=null===(u=n[s])||void 0===u?void 0:u.coordinate,m=s>=a-1?null===(d=n[0])||void 0===d?void 0:d.coordinate:null===(f=n[s+1])||void 0===f?void 0:f.coordinate,g=void 0;if(null!=p&&null!=h&&null!=m)if(Wx(h-p)!==Wx(m-h)){var y=[];if(Wx(m-h)===Wx(o[1]-o[0])){g=m;var v=h+o[1]-o[0];y[0]=Math.min(v,(v+p)/2),y[1]=Math.max(v,(v+p)/2)}else{g=p;var b=m+o[1]-o[0];y[0]=Math.min(h,(b+h)/2),y[1]=Math.max(h,(b+h)/2)}var x,w=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(e>w[0]&&e<=w[1]||e>=y[0]&&e<=y[1])return null===(x=n[s])||void 0===x?void 0:x.index}else{var M,j=Math.min(p,m),O=Math.max(p,m);if(e>(j+h)/2&&e<=(O+h)/2)return null===(M=n[s])||void 0===M?void 0:M.index}}else if(t)for(var N=0;N<a;N++){var S=t[N];if(null!=S){var E=t[N+1],k=t[N-1];if(0===N&&null!=E&&e<=(S.coordinate+E.coordinate)/2)return S.index;if(N===a-1&&null!=k&&e>(S.coordinate+k.coordinate)/2)return S.index;if(N>0&&N<a-1&&null!=k&&null!=E&&e>(S.coordinate+k.coordinate)/2&&e<=(S.coordinate+E.coordinate)/2)return S.index}}return-1},MC=(e,t)=>t,jC=(e,t,n)=>n,OC=(e,t,n,r)=>r,NC=Do(rC,e=>xM(e,e=>e.coordinate)),SC=Do([gT,MC,jC,OC],dT),EC=Do([SC,DT,RI,HT],fT),kC=Do([gT,MC,jC,OC],hT),DC=Do([VM,KM,bj,aj,rC,OC,kC],pT),IC=Do([SC,DC],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),AC=Do([rC,EC],sT),TC=Do([kC,EC,Sj,RI,AC,mT,MC],wT),CC=Do([SC,EC],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),PC=Do([(e,t)=>t,bj,SO,PO,XT,rC,NC,aj],(e,t,n,r,o,i,a,s)=>{if(e&&t&&r&&o&&i)return"horizontal"===t||"vertical"===t?((e,t,n,r,o,i,a)=>{if(e&&n&&r&&o&&function(e,t){var n=e.relativeX,r=e.relativeY;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}(e,a)){var s=((e,t)=>"horizontal"===t?e.relativeX:"vertical"===t?e.relativeY:void 0)(e,t),c=wC(s,i,o,n,r),l=((e,t,n,r)=>{var o=t.find(e=>e&&e.index===n);if(o){if("horizontal"===e)return{x:o.coordinate,y:r.relativeY};if("vertical"===e)return{x:r.relativeX,y:o.coordinate}}return{x:0,y:0}})(t,o,c,e);return{activeIndex:String(c),activeCoordinate:l}}})(e,t,r,o,i,a,s):((e,t,n,r,o,i,a)=>{if(e&&r&&o&&i&&n){var s=lO(e,n);if(s){var c=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),l=wC(c,a,i,r,o),u=((e,t,n,r)=>{var o=t.find(e=>e&&e.index===n);if(o){if("centric"===e){var i=o.coordinate,a=r.radius;return bC(bC(bC({},r),aO(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,c=r.angle;return bC(bC(bC({},r),aO(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,i,l,s);return{activeIndex:String(l),activeCoordinate:u}}}})(e,t,n,r,o,i,a)});function zC(e){var t,n,r,o=e.currentTarget.getBoundingClientRect();if("getBBox"in(r=e).currentTarget&&"function"==typeof r.currentTarget.getBBox){var i=e.currentTarget.getBBox();t=i.width>0?o.width/i.width:1,n=i.height>0?o.height/i.height:1}else{var a=e.currentTarget;t=a.offsetWidth>0?o.width/a.offsetWidth:1,n=a.offsetHeight>0?o.height/a.offsetHeight:1}var s=(e,r)=>({relativeX:Math.round((e-o.left)/t),relativeY:Math.round((r-o.top)/n)});return"touches"in e?Array.from(e.touches).map(e=>s(e.clientX,e.clientY)):s(e.clientX,e.clientY)}var _C=dr("mouseClick"),RC=wo();RC.startListening({actionCreator:_C,effect:(e,t)=>{var n=e.payload,r=PC(t.getState(),zC(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(Yw({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var LC=dr("mouseMove"),UC=wo(),YC=null,FC=null,WC=null;function BC(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}function QC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QC(Object(n),!0).forEach(function(t){GC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}UC.startListening({actionCreator:LC,effect:(e,t)=>{var n=e.payload,r=t.getState().eventSettings,o=r.throttleDelay,i=r.throttledEvents,a="all"===i||(null==i?void 0:i.includes("mousemove"));null!==YC&&(cancelAnimationFrame(YC),YC=null),null===FC||"number"==typeof o&&a||(clearTimeout(FC),FC=null),WC=zC(n);var s=()=>{var e=t.getState(),n=aT(e,e.tooltip.settings.shared);if(!WC)return YC=null,void(FC=null);if("axis"===n){var r=PC(e,WC);null!=(null==r?void 0:r.activeIndex)?t.dispatch(Uw({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(Rw())}YC=null,FC=null};a?"raf"===o?YC=requestAnimationFrame(s):"number"==typeof o&&null===FC&&(FC=setTimeout(s,o)):s()}});var $C=Br({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:gr()},replaceXAxis:{reducer(e,t){var n=t.payload,r=n.prev,o=n.next;void 0!==e.xAxis[r.id]&&(r.id!==o.id&&delete e.xAxis[r.id],e.xAxis[o.id]=o)},prepare:gr()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:gr()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:gr()},replaceYAxis:{reducer(e,t){var n=t.payload,r=n.prev,o=n.next;void 0!==e.yAxis[r.id]&&(r.id!==o.id&&delete e.yAxis[r.id],e.yAxis[o.id]=o)},prepare:gr()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:gr()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:gr()},replaceZAxis:{reducer(e,t){var n=t.payload,r=n.prev,o=n.next;void 0!==e.zAxis[r.id]&&(r.id!==o.id&&delete e.zAxis[r.id],e.zAxis[o.id]=o)},prepare:gr()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:gr()},updateYAxisWidth(e,t){var n=t.payload,r=n.id,o=n.width,i=e.yAxis[r];if(i){var a,s=i.widthHistory||[];if(3===s.length&&s[0]===s[2]&&o===s[1]&&o!==i.width&&Math.abs(o-(null!==(a=s[0])&&void 0!==a?a:0))<=1)return;var c=[...s,o].slice(-3);e.yAxis[r]=qC(qC({},i),{},{width:o,widthHistory:c})}}}}),HC=$C.actions,VC=HC.addXAxis,KC=HC.replaceXAxis,ZC=HC.removeXAxis,XC=HC.addYAxis,JC=HC.replaceYAxis,eP=HC.removeYAxis,tP=(HC.addZAxis,HC.replaceZAxis,HC.removeZAxis,HC.updateYAxisWidth),nP=$C.reducer,rP=Br({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:gr()},replaceCartesianGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,o=n.next,i=Jn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=o)},prepare:gr()},removeCartesianGraphicalItem:{reducer(e,t){var n=Jn(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:gr()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:gr()},removePolarGraphicalItem:{reducer(e,t){var n=Jn(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:gr()},replacePolarGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,o=n.next,i=Jn(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=o)},prepare:gr()}}}),oP=rP.actions,iP=oP.addCartesianGraphicalItem,aP=oP.replaceCartesianGraphicalItem,sP=oP.removeCartesianGraphicalItem,cP=oP.addPolarGraphicalItem,lP=oP.removePolarGraphicalItem,uP=oP.replacePolarGraphicalItem,dP=rP.reducer,fP=Br({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Jn(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Jn(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Jn(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),pP=fP.actions,hP=(pP.addDot,pP.removeDot,pP.addArea,pP.removeArea,pP.addLine,pP.removeLine,fP.reducer),mP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},gP=Br({name:"brush",initialState:mP,reducers:{setBrushSettings:(e,t)=>null==t.payload?mP:t.payload}}),yP=(gP.actions.setBrushSettings,gP.reducer),vP=Br({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:gr()},replaceLegendPayload:{reducer(e,t){var n=t.payload,r=n.prev,o=n.next,i=Jn(e).payload.indexOf(r);i>-1&&(e.payload[i]=o)},prepare:gr()},removeLegendPayload:{reducer(e,t){var n=Jn(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:gr()}}}),bP=vP.actions,xP=bP.setLegendSize,wP=bP.setLegendSettings,MP=bP.addLegendPayload,jP=bP.replaceLegendPayload,OP=bP.removeLegendPayload,NP=vP.reducer,SP={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},EP=Br({name:"rootProps",initialState:SP,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:SP.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),kP=EP.reducer,DP=EP.actions.updateOptions,IP=Br({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),AP=IP.actions,TP=(AP.addRadiusAxis,AP.removeRadiusAxis,AP.addAngleAxis,AP.removeAngleAxis,IP.reducer),CP=Br({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>null===e?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),PP=CP.actions.updatePolarOptions,zP=CP.reducer,_P=dr("keyDown"),RP=dr("focus"),LP=dr("blur"),UP=wo(),YP=null,FP=null,WP=null;function BP(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(e,n)=>{if("currentTarget"===n)return t;var r=Reflect.get(e,n);return"function"==typeof r?r.bind(e):r}})}UP.startListening({actionCreator:_P,effect:(e,t)=>{WP=e.payload,null!==YP&&(cancelAnimationFrame(YP),YP=null);var n=t.getState().eventSettings,r=n.throttleDelay,o=n.throttledEvents,i="all"===o||o.includes("keydown");null===FP||"number"==typeof r&&i||(clearTimeout(FP),FP=null);var a=()=>{try{var e=t.getState();if(!1===e.rootProps.accessibilityLayer)return;var n=e.tooltip.keyboardInteraction,r=WP;if("ArrowRight"!==r&&"ArrowLeft"!==r&&"Enter"!==r)return;var o=fT(n,DT(e),RI(e),HT(e)),i=null==o?-1:Number(o),a=!Number.isFinite(i)||i<0,s=rC(e),c=DT(e),l=aT(e,e.tooltip.settings.shared);if("Enter"===r){if(a)return;var u=DC(e,l,"hover",String(n.index));return void t.dispatch(Ww({active:!n.active,activeIndex:n.index,activeCoordinate:u}))}var d,f="left-to-right"===nT(e)?1:-1,p="ArrowRight"===r?1:-1;if(a){var h=RI(e),m=HT(e),g=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(d=-1,p*f>0){for(var y=0;y<c.length;y++)if(null!=fT(g(y),c,h,m)){d=y;break}}else for(var v=c.length-1;v>=0;v--)if(null!=fT(g(v),c,h,m)){d=v;break}if(d<0)return}else{d=i+p*f;var b=(null==s?void 0:s.length)||c.length;if(0===b||d>=b||d<0)return}var x=DC(e,l,"hover",String(d));t.dispatch(Ww({active:!0,activeIndex:d.toString(),activeCoordinate:x}))}finally{YP=null,FP=null}};i?"raf"===r?YP=requestAnimationFrame(a):"number"==typeof r&&null===FP&&(a(),WP=null,FP=setTimeout(()=>{WP?a():(FP=null,YP=null)},r)):a()}}),UP.startListening({actionCreator:RP,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var r=n.tooltip.keyboardInteraction;if(!r.active&&null==r.index){var o=aT(n,n.tooltip.settings.shared),i=DC(n,o,"hover",String("0"));t.dispatch(Ww({active:!0,activeIndex:"0",activeCoordinate:i}))}}}}),UP.startListening({actionCreator:LP,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var r=n.tooltip.keyboardInteraction;r.active&&t.dispatch(Ww({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});var QP=dr("externalEvent"),qP=wo(),GP=new Map,$P=new Map,HP=new Map;qP.startListening({actionCreator:QP,effect:(e,t)=>{var n=e.payload,r=n.handler,o=n.reactEvent;if(null!=r){var i=o.type,a=BP(o);HP.set(i,{handler:r,reactEvent:a});var s=GP.get(i);void 0!==s&&(cancelAnimationFrame(s),GP.delete(i));var c=t.getState().eventSettings,l=c.throttleDelay,u=c.throttledEvents,d="all"===u||(null==u?void 0:u.includes(i)),f=$P.get(i);void 0===f||"number"==typeof l&&d||(clearTimeout(f),$P.delete(i));var p=()=>{var e=HP.get(i);try{if(!e)return;var n=e.handler,r=e.reactEvent,o=t.getState(),a={activeCoordinate:hC(o),activeDataKey:uC(o),activeIndex:cC(o),activeLabel:lC(o),activeTooltipIndex:cC(o),isTooltipActive:mC(o)};n&&n(a,r)}finally{GP.delete(i),$P.delete(i),HP.delete(i)}};if(d)if("raf"===l){var h=requestAnimationFrame(p);GP.set(i,h)}else if("number"==typeof l){if(!$P.has(i)){p();var m=setTimeout(p,l);$P.set(i,m)}}else p();else p()}}});var VP=Do([gT],e=>e.tooltipItemPayloads),KP=Do([VP,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(null!=t){var r=e.find(e=>e.settings.graphicalItemId===n);if(null!=r){var o=r.getPosition;if(null!=o)return o(t)}}}),ZP=dr("touchMove"),XP=wo(),JP=null,ez=null,tz=null,nz=null;XP.startListening({actionCreator:ZP,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){nz=BP(n);var r=t.getState().eventSettings,o=r.throttleDelay,i=r.throttledEvents,a="all"===i||i.includes("touchmove");null!==JP&&(cancelAnimationFrame(JP),JP=null),null===ez||"number"==typeof o&&a||(clearTimeout(ez),ez=null),tz=Array.from(n.touches).map(e=>zC({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(null!=nz){var e=t.getState(),n=aT(e,e.tooltip.settings.shared);if("axis"===n){var r,o=null===(r=tz)||void 0===r?void 0:r[0];if(null==o)return JP=null,void(ez=null);var i=PC(e,o);null!=(null==i?void 0:i.activeIndex)&&t.dispatch(Uw({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if("item"===n){var a,s=nz.touches[0];if(null==document.elementFromPoint||null==s)return;var c=document.elementFromPoint(s.clientX,s.clientY);if(!c||!c.getAttribute)return;var l=c.getAttribute(tj),u=null!==(a=c.getAttribute(nj))&&void 0!==a?a:void 0,d=NT(e).find(e=>e.id===u);if(null==l||null==d||null==u)return;var f=d.dataKey,p=KP(e,l,u);t.dispatch(zw({activeDataKey:f,activeIndex:l,activeCoordinate:p,activeGraphicalItemId:u}))}JP=null,ez=null}};a?"raf"===o?JP=requestAnimationFrame(s):"number"==typeof o&&null===ez&&(s(),nz=null,ez=setTimeout(()=>{nz?s():(ez=null,JP=null)},o)):s()}}});var rz=Br({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,o=n.errorBar;e[r]||(e[r]=[]),e[r].push(o)},replaceErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,o=n.prev,i=n.next;e[r]&&(e[r]=e[r].map(e=>e.dataKey===o.dataKey&&e.direction===o.direction?i:e))},removeErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,o=n.errorBar;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==o.dataKey||e.direction!==o.direction))}}}),oz=rz.actions,iz=(oz.addErrorBar,oz.replaceErrorBar,oz.removeErrorBar,rz.reducer),az=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function sz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sz(Object(n),!0).forEach(function(t){lz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lz(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uz={zIndexMap:Object.values(uO).reduce((e,t)=>cz(cz({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},dz=new Set(Object.values(uO)),fz=Br({name:"zIndex",initialState:uz,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:gr()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!function(e){return dz.has(e)}(n)&&delete e.zIndexMap[n])},prepare:gr()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,o=n.element,i=n.isPanorama;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=o:e.zIndexMap[r].element=o:e.zIndexMap[r]={consumers:0,element:i?void 0:o,panoramaElement:i?o:void 0}},prepare:gr()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:gr()}}}),pz=fz.actions,hz=pz.registerZIndexPortal,mz=pz.unregisterZIndexPortal,gz=pz.registerZIndexPortalElement,yz=pz.unregisterZIndexPortalElement,vz=fz.reducer,bz={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},xz=Br({name:"eventSettings",initialState:bz,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),wz=xz.actions.setEventSettings,Mz=xz.reducer,jz=Br({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,o=n.axisId,i=n.ticks;e[r][o]=i},removeRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,o=n.axisId;delete e[r][o]}}}),Oz=jz.actions,Nz=Oz.setRenderedTicks,Sz=Oz.removeRenderedTicks,Ez=Ut({brush:yP,cartesianAxis:nP,chartData:Hw,errorBars:iz,eventSettings:Mz,graphicalItems:dP,layout:tM,legend:NP,options:Sw,polarAxis:TP,polarOptions:zP,referenceElements:hP,renderedTicks:jz.reducer,rootProps:kP,tooltip:Bw,zIndex:vz});function kz(e){var t=e.preloadedState,n=e.children,r=e.reduxStoreName,o=uj(),i=(0,a.useRef)(null);if(o)return n;null==i.current&&(i.current=function(e){return br({reducer:Ez,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([RC.middleware,UC.middleware,UP.middleware,qP.middleware,XP.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(vr({type:"raf"}))},devTools:{serialize:{replacer:BC},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(t,r));var s=nM;return a.createElement(x,{context:s,store:i.current},n)}var Dz=e=>{var t=e.chartData,n=oM(),r=uj();return(0,a.useEffect)(()=>r?()=>{}:(n(Gw(t)),()=>{n(Gw(void 0))}),[t,n,r]),null},Iz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Az(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function Tz(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Iz.has(r)){if(null==e[r]&&null==t[r])continue;if(!m(e[r],t[r]))return!1}else if(!Az(e[r],t[r]))return!1;return!0}function Cz(e){var t=e.layout,n=e.margin,r=oM(),o=uj();return(0,a.useEffect)(()=>{o||(r(Xw(t)),r(Zw(n)))},[r,o,t,n]),null}var Pz=(0,a.memo)(Cz,Tz);function zz(e){var t=oM();return(0,a.useEffect)(()=>{t(DP(e))},[t,e]),null}var _z=e=>{var t=oM();return(0,a.useEffect)(()=>{t(wz(e))},[t,e]),null},Rz=(0,a.memo)(_z,Tz);function Lz(e){var t=oM();return(0,a.useEffect)(()=>{t(PP(e))},[t,e]),null}var Uz=()=>{var e;return null===(e=cM(e=>e.rootProps.accessibilityLayer))||void 0===e||e},Yz=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Fz(e){return"string"==typeof e&&Yz.includes(e)}var Wz=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function Bz(e){return"string"==typeof e&&Wz.has(e)}function Qz(e){return"string"==typeof e&&e.startsWith("data-")}function qz(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Bz(n)||Qz(n))&&(t[n]=e[n]);return t}function Gz(e){return null==e?null:(0,a.isValidElement)(e)&&"object"==typeof e.props&&null!==e.props?qz(e.props):"object"!=typeof e||Array.isArray(e)?null:qz(e)}function $z(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Bz(n)||Qz(n)||Fz(n))&&(t[n]=e[n]);return t}var Hz=["children","width","height","viewBox","className","style","title","desc"];function Vz(){return Vz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vz.apply(null,arguments)}var Kz=(0,a.forwardRef)((e,t)=>{var n=e.children,r=e.width,o=e.height,i=e.viewBox,s=e.className,c=e.style,l=e.title,u=e.desc,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Hz),f=i||{width:r,height:o,x:0,y:0},p=jc("recharts-surface",s);return a.createElement("svg",Vz({},$z(d),{className:p,width:r,height:o,style:c,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),a.createElement("title",null,l),a.createElement("desc",null,u),n)}),Zz=Do(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(null!=t){var r=e[t];if(null!=r)return n?r.panoramaElement:r.element}}),Xz=Do(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(uO));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}}});function Jz(e){var t=e.zIndex,n=e.isPanorama,r=(0,a.useRef)(null),o=oM();return(0,a.useLayoutEffect)(()=>(r.current&&o(gz({zIndex:t,element:r.current,isPanorama:n})),()=>{o(yz({zIndex:t,isPanorama:n}))}),[o,t,n]),a.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function e_(e){var t=e.children,n=e.isPanorama,r=cM(Xz);if(!r||0===r.length)return t;var o=r.filter(e=>e<0),i=r.filter(e=>e>0);return a.createElement(a.Fragment,null,o.map(e=>a.createElement(Jz,{key:e,zIndex:e,isPanorama:n})),t,i.map(e=>a.createElement(Jz,{key:e,zIndex:e,isPanorama:n})))}var t_=["children"];function n_(){return n_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n_.apply(null,arguments)}var r_={width:"100%",height:"100%",display:"block"},o_=(0,a.forwardRef)((e,t)=>{var n=yj(),r=vj(),o=Uz();if(!fw(n)||!fw(r))return null;var i,s,c=e.children,l=e.otherAttributes,u=e.title,d=e.desc;return null!=l&&(i="number"==typeof l.tabIndex?l.tabIndex:o?0:void 0,s="string"==typeof l.role?l.role:o?"application":void 0),a.createElement(Kz,n_({},l,{title:u,desc:d,role:s,tabIndex:i,width:n,height:r,style:r_,ref:t}),c)}),i_=e=>{var t=e.children,n=cM(fj);if(!n)return null;var r=n.width,o=n.height,i=n.y,s=n.x;return a.createElement(Kz,{width:r,height:o,x:s,y:i},t)},a_=(0,a.forwardRef)((e,t)=>{var n=e.children,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,t_);return uj()?a.createElement(i_,null,a.createElement(e_,{isPanorama:!0},n)):a.createElement(o_,n_({ref:t},r),a.createElement(e_,{isPanorama:!1},n))}),s_=new(n(228)),c_="recharts.syncEvent.tooltip",l_="recharts.syncEvent.brush";function u_(e){return e.tooltip.syncInteraction}var d_=["x","y"];function f_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f_(Object(n),!0).forEach(function(t){h_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m_(){var e=oM();(0,a.useEffect)(()=>{e(Ew())},[e]),function(){var e=cM(Xj),t=cM(eO),n=oM(),r=cM(Jj),o=cM(rC),i=xj(),s=hj(),c=cM(e=>e.rootProps.className);(0,a.useEffect)(()=>{if(null==e)return nw;var a=(a,c,l)=>{var u;if(t!==l&&e===a)if(!1!==c.payload.active)if("index"!==r){if(null!=o){var d;if("function"==typeof r){var f={activeTooltipIndex:null==c.payload.index?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:null==c.payload.index?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},p=r(o,f);d=o[p]}else"value"===r&&(d=o.find(e=>String(e.value)===c.payload.label));var h=c.payload.coordinate;if(null!=h&&null!=s)if(null!=d){var m=h.x,g=h.y,y=Math.min(m,s.x+s.width),v=Math.min(g,s.y+s.height),b={x:"horizontal"===i?d.coordinate:y,y:"horizontal"===i?v:d.coordinate},x=Fw({active:c.payload.active,coordinate:b,dataKey:c.payload.dataKey,index:String(d.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});n(x)}else n(Fw({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:void 0}));else n(Fw({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(s&&null!=c&&null!==(u=c.payload)&&void 0!==u&&u.coordinate&&c.payload.sourceViewBox){var w=c.payload.coordinate,_x=w.x,M=w.y,j=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(w,d_),O=c.payload.sourceViewBox,N=O.x,S=O.y,E=O.width,k=O.height,D=p_(p_({},j),{},{x:s.x+(E?(_x-N)/E:0)*s.width,y:s.y+(k?(M-S)/k:0)*s.height});n(p_(p_({},c),{},{payload:p_(p_({},c.payload),{},{coordinate:D})}))}else n(c);else n(Fw({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))};return s_.on(c_,a),()=>{s_.off(c_,a)}},[c,n,t,e,r,o,i,s])}(),function(){var e=cM(Xj),t=cM(eO),n=oM();(0,a.useEffect)(()=>{if(null==e)return nw;var r=(r,o,i)=>{t!==i&&e===r&&n($w(o))};return s_.on(l_,r),()=>{s_.off(l_,r)}},[n,t,e])}()}function g_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var y_=(0,a.createContext)(null),v_=(0,a.createContext)(null);function b_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b_(Object(n),!0).forEach(function(t){w_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M_.apply(null,arguments)}function j_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var N_=()=>(m_(),null);function S_(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var E_=(0,a.forwardRef)((e,t)=>{var n,r,o=(0,a.useRef)(null),i=j_((0,a.useState)({containerWidth:S_(null===(n=e.style)||void 0===n?void 0:n.width),containerHeight:S_(null===(r=e.style)||void 0===r?void 0:r.height)}),2),s=i[0],c=i[1],l=(0,a.useCallback)((e,t)=>{c(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]),u=(0,a.useCallback)(e=>{if("function"==typeof t&&t(e),null!=o.current&&(o.current.disconnect(),o.current=null),null!=e&&"undefined"!=typeof ResizeObserver){var n=e.getBoundingClientRect(),r=n.width,i=n.height;l(r,i);var a=new ResizeObserver(e=>{var t=e[0];if(null!=t){var n=t.contentRect,r=n.width,o=n.height;l(r,o)}});a.observe(e),o.current=a}},[t,l]);return(0,a.useEffect)(()=>()=>{var e=o.current;null!=e&&e.disconnect()},[l]),a.createElement(a.Fragment,null,a.createElement(jj,{width:s.containerWidth,height:s.containerHeight}),a.createElement("div",M_({ref:u},e)))}),k_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height,o=j_((0,a.useState)({containerWidth:S_(n),containerHeight:S_(r)}),2),i=o[0],s=o[1],c=(0,a.useCallback)((e,t)=>{s(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]),l=(0,a.useCallback)(e=>{if("function"==typeof t&&t(e),null!=e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;c(r,o)}},[t,c]);return a.createElement(a.Fragment,null,a.createElement(jj,{width:i.containerWidth,height:i.containerHeight}),a.createElement("div",M_({ref:l},e)))}),D_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height;return a.createElement(a.Fragment,null,a.createElement(jj,{width:n,height:r}),a.createElement("div",M_({ref:t},e)))}),I_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height;return"string"==typeof n||"string"==typeof r?a.createElement(k_,M_({},e,{ref:t})):"number"==typeof n&&"number"==typeof r?a.createElement(D_,M_({},e,{width:n,height:r,ref:t})):a.createElement(a.Fragment,null,a.createElement(jj,{width:n,height:r}),a.createElement("div",M_({ref:t},e)))}),A_=(0,a.forwardRef)((e,t)=>{var n=e.children,r=e.className,o=e.height,i=e.onClick,s=e.onContextMenu,c=e.onDoubleClick,l=e.onMouseDown,u=e.onMouseEnter,d=e.onMouseLeave,f=e.onMouseMove,p=e.onMouseUp,h=e.onTouchEnd,m=e.onTouchMove,g=e.onTouchStart,y=e.style,v=e.width,b=e.responsive,x=e.dispatchTouchEvents,w=void 0===x||x,M=(0,a.useRef)(null),j=oM(),O=j_((0,a.useState)(null),2),N=O[0],S=O[1],E=j_((0,a.useState)(null),2),k=E[0],D=E[1],I=function(){var e=oM(),t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(null),2),n=t[0],r=t[1],o=cM(ZM);return(0,a.useEffect)(()=>{if(null!=n){var t=n.getBoundingClientRect().width/n.offsetWidth;dw(t)&&t!==o&&e(eM(t))}},[n,e,o]),r}(),A=ww(),T=(null==A?void 0:A.width)>0?A.width:v,C=(null==A?void 0:A.height)>0?A.height:o,P=(0,a.useCallback)(e=>{I(e),"function"==typeof t&&t(e),S(e),D(e),null!=e&&(M.current=e)},[I,t,S,D]),z=(0,a.useCallback)(e=>{j(_C(e)),j(QP({handler:i,reactEvent:e}))},[j,i]),_=(0,a.useCallback)(e=>{j(LC(e)),j(QP({handler:u,reactEvent:e}))},[j,u]),R=(0,a.useCallback)(e=>{j(Rw()),j(QP({handler:d,reactEvent:e}))},[j,d]),L=(0,a.useCallback)(e=>{j(LC(e)),j(QP({handler:f,reactEvent:e}))},[j,f]),U=(0,a.useCallback)(()=>{j(RP())},[j]),Y=(0,a.useCallback)(()=>{j(LP())},[j]),F=(0,a.useCallback)(e=>{j(_P(e.key))},[j]),W=(0,a.useCallback)(e=>{j(QP({handler:s,reactEvent:e}))},[j,s]),B=(0,a.useCallback)(e=>{j(QP({handler:c,reactEvent:e}))},[j,c]),Q=(0,a.useCallback)(e=>{j(QP({handler:l,reactEvent:e}))},[j,l]),q=(0,a.useCallback)(e=>{j(QP({handler:p,reactEvent:e}))},[j,p]),G=(0,a.useCallback)(e=>{j(QP({handler:g,reactEvent:e}))},[j,g]),$=(0,a.useCallback)(e=>{w&&j(ZP(e)),j(QP({handler:m,reactEvent:e}))},[j,w,m]),H=(0,a.useCallback)(e=>{j(QP({handler:h,reactEvent:e}))},[j,h]),V=function(e){return e?E_:I_}(b);return a.createElement(y_.Provider,{value:N},a.createElement(v_.Provider,{value:k},a.createElement(V,{width:null!=T?T:null==y?void 0:y.width,height:null!=C?C:null==y?void 0:y.height,className:jc("recharts-wrapper",r),style:x_({position:"relative",cursor:"default",width:T,height:C},y),onClick:z,onContextMenu:W,onDoubleClick:B,onFocus:U,onBlur:Y,onKeyDown:F,onMouseDown:Q,onMouseEnter:_,onMouseLeave:R,onMouseMove:L,onMouseUp:q,onTouchEnd:H,onTouchMove:$,onTouchStart:G,ref:P},a.createElement(N_,null),n)))}),T_=Do([aj],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),C_=Do([T_,VM,KM],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),P_=()=>cM(C_);function z_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var R_=(0,a.createContext)(void 0),L_=e=>{var t=e.children,n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return z_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)("".concat(Hx("recharts"),"-clip")),1)[0],r=P_();if(null==r)return null;var o=r.x,i=r.y,s=r.width,c=r.height;return a.createElement(R_.Provider,{value:n},a.createElement("defs",null,a.createElement("clipPath",{id:n},a.createElement("rect",{x:o,y:i,height:c,width:s}))),t)},U_=["width","height","responsive","children","className","style","compact","title","desc"],Y_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height,o=e.responsive,i=e.children,s=e.className,c=e.style,l=e.compact,u=e.title,d=e.desc,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,U_),p=qz(f);return l?a.createElement(a.Fragment,null,a.createElement(jj,{width:n,height:r}),a.createElement(a_,{otherAttributes:p,title:u,desc:d},i)):a.createElement(A_,{className:s,style:c,width:n,height:r,responsive:null!=o&&o,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},a.createElement(a_,{otherAttributes:p,title:u,desc:d,ref:t},a.createElement(L_,null,i)))});function F_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B_(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F_(Object(n),!0).forEach(function(t){W_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}var Q_=["layout"];function q_(){return q_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q_.apply(null,arguments)}function G_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var H_=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G_(Object(n),!0).forEach(function(t){$_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},bz),V_=(0,a.forwardRef)(function(e,t){var n,r=B_(e.categoricalChartProps,H_),o=r.layout,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(r,Q_),s=e.chartName,c={chartName:s,defaultTooltipEventType:e.defaultTooltipEventType,validateTooltipEventTypes:e.validateTooltipEventTypes,tooltipPayloadSearcher:e.tooltipPayloadSearcher,eventEmitter:void 0};return a.createElement(kz,{preloadedState:{options:c},reduxStoreName:null!==(n=r.id)&&void 0!==n?n:s},a.createElement(Dz,{chartData:r.data}),a.createElement(Pz,{layout:o,margin:r.margin}),a.createElement(Rz,{throttleDelay:r.throttleDelay,throttledEvents:r.throttledEvents}),a.createElement(zz,{baseValue:void 0,accessibilityLayer:r.accessibilityLayer,barCategoryGap:r.barCategoryGap,maxBarSize:r.maxBarSize,stackOffset:r.stackOffset,barGap:r.barGap,barSize:r.barSize,syncId:r.syncId,syncMethod:r.syncMethod,className:r.className,reverseStackOrder:r.reverseStackOrder}),a.createElement(Lz,{cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius}),a.createElement(Y_,q_({},i,{ref:t})))});function K_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K_(Object(n),!0).forEach(function(t){X_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function X_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var J_=["item"],eR=Z_(Z_({},H_),{},{layout:"centric",startAngle:0,endAngle:360}),tR=(0,a.forwardRef)((e,t)=>{var n=B_(e,eR);return a.createElement(V_,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:J_,tooltipPayloadSearcher:Ow,categoricalChartProps:n,ref:t})}),nR=e=>e.graphicalItems.polarItems,rR=Do([EO,kO],hI),oR=Do([nR,dI,rR],yI),iR=Do([oR],MI),aR=Do([iR,Ej],NI),sR=Do([aR,dI,oR],EI),cR=(Do([aR,dI,oR],(e,t,n)=>n.length>0?e.flatMap(e=>n.flatMap(n=>{var r;return{value:RM(e,null!==(r=t.dataKey)&&void 0!==r?r:n.dataKey),errorDomain:[]}})).filter(Boolean):null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:RM(e,t.dataKey),errorDomain:[]})):e.map(e=>({value:e,errorDomain:[]}))),()=>{}),lR=Do([aR,dI,oR,$I,EO,Ij],VI),uR=Do([dI,QI,qI,cR,lR,cR,bj,EO],fA),dR=Do([dI,bj,aR,sR,Vj,EO,uR],gA),fR=Do([dR,fI,vA],bA),pR=Do([dI,dR,fR,EO],wA);function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hR(Object(n),!0).forEach(function(t){gR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gR(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Do([vA,pR],RO);var yR=Do([nR,(e,t)=>t],(e,t)=>e.filter(e=>"pie"===e.type).find(e=>e.id===t)),vR=[],bR=(e,t,n)=>0===(null==n?void 0:n.length)?vR:n,xR=Do([Ej,yR,bR],(e,t,n)=>{var r,o=e.chartData;if(null!=t&&((r=null!=(null==t?void 0:t.data)&&t.data.length>0?t.data:o)&&r.length||null==n||(r=n.map(e=>mR(mR({},t.presentationProps),e.props))),null!=r))return r}),wR=Do([xR,yR,bR],(e,t,n)=>{if(null!=e&&null!=t)return e.map((e,r)=>{var o,i,a=RM(e,t.nameKey,t.name);return i=null!=n&&null!==(o=n[r])&&void 0!==o&&null!==(o=o.props)&&void 0!==o&&o.fill?n[r].props.fill:"object"==typeof e&&null!=e&&"fill"in e?e.fill:t.fill,{value:HM(a,t.dataKey),dataKey:t.dataKey,color:i,payload:e,type:t.legendType}})}),MR=Do([xR,yR,bR,aj],(e,t,n,r)=>{if(null!=t&&null!=e)return function(e){var t,n,r,o=e.pieSettings,i=e.displayedData,a=e.cells,s=e.offset,c=o.cornerRadius,l=o.startAngle,u=o.endAngle,d=o.dataKey,f=o.nameKey,p=o.tooltipType,h=Math.abs(o.minAngle),m=lF(l,u),g=Math.abs(m),y=i.length<=1?0:null!==(t=o.paddingAngle)&&void 0!==t?t:0,v=i.filter(e=>0!==RM(e,d,0)).length,b=(g>=360?v:v-1)*y,x=i.reduce((e,t)=>{var n=RM(t,d,0);return e+(qx(n)?n:0)},0),w=h>0&&x>0&&i.some(e=>{var t=RM(e,d,0),n=(qx(t)?t:0)/x;return 0!==t&&n*g<h})?h:0,M=g-v*w-b;return x>0&&(n=i.map((e,t)=>{var n,i=RM(e,d,0),u=RM(e,f,t),h=cF(o,s,e),g=(qx(i)?i:0)/x,v=nF(nF({},e),a&&a[t]&&a[t].props),b=null!=v&&"fill"in v&&"string"==typeof v.fill?v.fill:o.fill,j=(n=t?r.endAngle+Wx(m)*y*(0!==i?1:0):l)+Wx(m)*((0!==i?w:0)+g*M),O=(n+j)/2,N=(h.innerRadius+h.outerRadius)/2,S=[{name:u,value:i,payload:v,dataKey:d,type:p,color:b,fill:b,graphicalItemId:o.id}],E=aO(h.cx,h.cy,N,O);return r=nF(nF(nF(nF({},o.presentationProps),{},{percent:g,cornerRadius:"string"==typeof c?parseFloat(c):c,name:u,tooltipPayload:S,midAngle:O,middleRadius:N,tooltipPosition:E},v),h),{},{value:i,dataKey:d,startAngle:n,endAngle:j,payload:v,paddingAngle:0!==i?Wx(m)*y:0})})),n}({offset:r,pieSettings:t,displayedData:e,cells:n})}),jR=["children","className"];function OR(){return OR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OR.apply(null,arguments)}var NR=a.forwardRef((e,t)=>{var n=e.children,r=e.className,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,jR),i=jc("recharts-layer",r);return a.createElement("g",OR({className:i},$z(o),{ref:t}),n)});function SR(){}function ER(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function kR(e){this._context=e}function DR(e){return new kR(e)}function IR(e){this._context=e}function AR(e){return new IR(e)}function TR(e){this._context=e}function CR(e){return new TR(e)}n.dn(SR),n.dn(DR),kR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ER(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ER(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},n.dn(AR),IR.prototype={areaStart:SR,areaEnd:SR,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ER(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},n.dn(CR),TR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ER(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class PR{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function zR(e){this._context=e}function _R(e){return new zR(e)}function RR(e){this._context=e}function LR(e){return new RR(e)}function UR(e){return e<0?-1:1}function YR(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(UR(i)+UR(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function FR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function WR(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function BR(e){this._context=e}function QR(e){this._context=new qR(e)}function qR(e){this._context=e}function GR(e){this._context=e}function $R(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function HR(e){return new GR(e)}function VR(e,t){this._context=e,this._t=t}function KR(e){return new VR(e,.5)}n.dn(_R),zR.prototype={areaStart:SR,areaEnd:SR,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},n.dn(LR),RR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},BR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:WR(this,this._t0,FR(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,WR(this,FR(this,n=YR(this,e,t)),n);break;default:WR(this,this._t0,n=YR(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(QR.prototype=Object.create(BR.prototype)).point=function(e,t){BR.prototype.point.call(this,t,e)},qR.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},n.dn(HR),GR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=$R(e),o=$R(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},n.dn(KR),VR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};const ZR=Math.PI,XR=2*ZR,JR=1e-6,eL=XR-JR;function tL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class nL{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?tL:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return tL;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,c=r-t,l=i-e,u=a-t,d=l*l+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>JR)if(Math.abs(u*s-c*l)>JR&&o){let f=n-i,p=r-a,h=s*s+c*c,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),v=o*Math.tan((ZR-Math.acos((h+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>JR&&this._append`L${e+b*l},${t+b*u}`,this._append`A${o},${o},0,0,${+(u*f>l*p)},${this._x1=e+x*s},${this._y1=t+x*c}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),c=e+a,l=t+s,u=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${c},${l}`:(Math.abs(this._x1-c)>JR||Math.abs(this._y1-l)>JR)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%XR+XR),d>eL?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>JR&&this._append`A${n},${n},0,${+(d>=ZR)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function rL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new nL(t)}function oL(e){return e[0]}function iL(e){return e[1]}function aL(e,t){var n=kM(!0),r=null,o=LR,i=null,a=rL(s);function s(s){var c,l,u,d=(s=EM(s)).length,f=!1;for(null==r&&(i=o(u=a())),c=0;c<=d;++c)!(c<d&&n(l=s[c],c,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(l,c,s),+t(l,c,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?oL:kM(e),t="function"==typeof t?t:void 0===t?iL:kM(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:kM(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:kM(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:kM(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}function sL(e,t,n){var r=null,o=kM(!0),i=null,a=LR,s=null,c=rL(l);function l(l){var u,d,f,p,h,m=(l=EM(l)).length,g=!1,y=new Array(m),v=new Array(m);for(null==i&&(s=a(h=c())),u=0;u<=m;++u){if(!(u<m&&o(p=l[u],u,l))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],v[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(p,u,l),v[u]=+t(p,u,l),s.point(r?+r(p,u,l):y[u],n?+n(p,u,l):v[u]))}if(h)return s=null,h+""||null}function u(){return aL().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?oL:kM(+e),t="function"==typeof t?t:kM(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?iL:kM(+n),l.x=function(t){return arguments.length?(e="function"==typeof t?t:kM(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:kM(+t),l):e},l.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:kM(+e),l):r},l.y=function(e){return arguments.length?(t="function"==typeof e?e:kM(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:kM(+e),l):t},l.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:kM(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(o="function"==typeof e?e:kM(!!e),l):o},l.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),l):a},l.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),l):i},l}n.dn(aL),n.dn(sL);var cL=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,lL=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,a.isValidElement)(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(e=>{Fz(e)&&"function"==typeof n[e]&&(r[e]=t||(t=>n[e](n,t)))}),r},uL=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(o=>{var i=e[o];Fz(o)&&"function"==typeof i&&(r||(r={}),r[o]=((e,t,n)=>r=>(e(t,n,r),null))(i,t,n))}),r};function dL(){return dL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dL.apply(null,arguments)}function fL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fL(Object(n),!0).forEach(function(t){hL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hL(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mL,gL,yL,vL,bL,xL,wL,ML={curveBasisClosed:AR,curveBasisOpen:CR,curveBasis:DR,curveBumpX:function(e){return new PR(e,!0)},curveBumpY:function(e){return new PR(e,!1)},curveLinearClosed:_R,curveLinear:LR,curveMonotoneX:function(e){return new BR(e)},curveMonotoneY:function(e){return new QR(e)},curveNatural:HR,curveStep:KR,curveStepAfter:function(e){return new VR(e,1)},curveStepBefore:function(e){return new VR(e,0)}},jL=e=>dw(e.x)&&dw(e.y),OL=e=>null!=e.base&&jL(e.base)&&jL(e),NL=e=>e.x,SL=e=>e.y,EL=e=>{var t=e.className,n=e.points,r=e.path,o=e.pathRef,i=xj();if(!(n&&n.length||r))return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},c=n&&n.length?(e=>{var t=e.type,n=void 0===t?"linear":t,r=e.points,o=void 0===r?[]:r,i=e.baseLine,a=e.layout,s=e.connectNulls,c=void 0!==s&&s,l=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(ew(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=ML["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return ML[n]||LR})(n,a),u=c?o.filter(jL):o;if(Array.isArray(i)){var d=o.map((e,t)=>pL(pL({},e),{},{base:i[t]}));return("vertical"===a?sL().y(SL).x1(NL).x0(e=>e.base.x):sL().x(NL).y1(SL).y0(e=>e.base.y)).defined(OL).curve(l)(c?d.filter(OL):d)}return("vertical"===a&&qx(i)?sL().y(SL).x1(NL).x0(i):qx(i)?sL().x(NL).y1(SL).y0(i):aL().x(NL).y(SL)).defined(jL).curve(l)(u)})(s):r;return a.createElement("path",dL({},qz(e),lL(e),{className:jc("recharts-curve",t),d:null===c?void 0:c,ref:o}))};function kL(){return kL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kL.apply(null,arguments)}function DL(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var IL=e=>{var t=e.cx,n=e.cy,r=e.radius,o=e.angle,i=e.sign,a=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(a?1:-1)+r,u=Math.asin(s/l)/oO,d=c?o:o+i*u,f=c?o-i*u:o;return{center:aO(t,n,l,d),circleTangency:aO(t,n,r,d),lineTangency:aO(t,n,l*Math.cos(u*oO),f),theta:u}},AL=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.startAngle,a=((e,t)=>Wx(t-e)*Math.min(Math.abs(t-e),359.999))(i,e.endAngle),s=i+a,c=aO(t,n,o,i),l=aO(t,n,o,s),u=Fx(mL||(mL=DL(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),c.x,c.y,o,o,+(Math.abs(a)>180),+(i>s),l.x,l.y);if(r>0){var d=aO(t,n,r,i),f=aO(t,n,r,s);u+=Fx(gL||(gL=DL(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),f.x,f.y,r,r,+(Math.abs(a)>180),+(i<=s),d.x,d.y)}else u+=Fx(yL||(yL=DL(["L ",","," Z"])),t,n);return u},TL={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},CL=e=>{var t=B_(e,TL),n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,s=t.cornerRadius,c=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=t.className;if(i<o||u===d)return null;var p,h=jc("recharts-sector",f),m=i-o,g=Vx(s,m,0,!0);return p=g>0&&Math.abs(u-d)<360?(e=>{var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=Wx(l-c),d=IL({cx:t,cy:n,radius:o,angle:c,sign:u,cornerRadius:i,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,h=d.theta,m=IL({cx:t,cy:n,radius:o,angle:l,sign:-u,cornerRadius:i,cornerIsExternal:s}),g=m.circleTangency,y=m.lineTangency,v=m.theta,b=s?Math.abs(c-l):Math.abs(c-l)-h-v;if(b<0)return a?Fx(vL||(vL=DL(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),p.x,p.y,i,i,2*i,i,i,2*-i):AL({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:c,endAngle:l});var x=Fx(bL||(bL=DL(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),p.x,p.y,i,i,+(u<0),f.x,f.y,o,o,+(b>180),+(u<0),g.x,g.y,i,i,+(u<0),y.x,y.y);if(r>0){var w=IL({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),M=w.circleTangency,j=w.lineTangency,O=w.theta,N=IL({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),S=N.circleTangency,E=N.lineTangency,k=N.theta,D=s?Math.abs(c-l):Math.abs(c-l)-O-k;if(D<0&&0===i)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+=Fx(xL||(xL=DL(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),E.x,E.y,i,i,+(u<0),S.x,S.y,r,r,+(D>180),+(u>0),M.x,M.y,i,i,+(u<0),j.x,j.y)}else x+=Fx(wL||(wL=DL(["L",",","Z"])),t,n);return x})({cx:n,cy:r,innerRadius:o,outerRadius:i,cornerRadius:Math.min(g,m/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:u,endAngle:d}):AL({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:u,endAngle:d}),a.createElement("path",kL({},$z(t),{className:h,d:p}))};function PL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zL(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _L=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PL(Object(n),!0).forEach(function(t){zL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),RL=new class{constructor(e){(function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;null!=n&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(_L.cacheSize),LL={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},UL="recharts_measurement_span",YL=(e,t)=>{try{var n=document.getElementById(UL);n||((n=document.createElement("span")).setAttribute("id",UL),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,LL,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(e){return{width:0,height:0}}},FL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||az)return{width:0,height:0};if(!_L.enableCache)return YL(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",o=t.fontWeight||"",i=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(o,"|").concat(i,"|").concat(a,"|").concat(s)}(e,t),r=RL.get(n);if(r)return r;var o=YL(e,t);return RL.set(n,o),o};function WL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return BL(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?BL(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function BL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var QL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,GL=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,$L=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,HL={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},VL=["cm","mm","pt","pc","in","Q","px"],KL="NaN";class ZL{static parse(e){var t,n=WL(null!==(t=$L.exec(e))&&void 0!==t?t:[],3),r=n[1],o=n[2];return null==r?ZL.NaN:new ZL(parseFloat(r),null!=o?o:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,Bx(e)&&(this.unit=""),""===t||GL.test(t)||(this.num=NaN,this.unit=""),function(e){return VL.includes(e)}(t)&&(this.num=function(e,t){return e*HL[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new ZL(NaN,""):new ZL(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new ZL(NaN,""):new ZL(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new ZL(NaN,""):new ZL(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new ZL(NaN,""):new ZL(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Bx(this.num)}}function XL(e){if(null==e||e.includes(KL))return KL;for(var t=e;t.includes("*")||t.includes("/");){var n,r=WL(null!==(n=QL.exec(t))&&void 0!==n?n:[],4),o=r[1],i=r[2],a=r[3],s=ZL.parse(null!=o?o:""),c=ZL.parse(null!=a?a:""),l="*"===i?s.multiply(c):s.divide(c);if(l.isNaN())return KL;t=t.replace(QL,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,d=WL(null!==(u=qL.exec(t))&&void 0!==u?u:[],4),f=d[1],p=d[2],h=d[3],m=ZL.parse(null!=f?f:""),g=ZL.parse(null!=h?h:""),y="+"===p?m.add(g):m.subtract(g);if(y.isNaN())return KL;t=t.replace(qL,y.toString())}return t}!function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(ZL,"NaN",new ZL(NaN,""));var JL=/\(([^()]*)\)/;function eU(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=JL.exec(n));){var r=WL(t,2)[1];n=n.replace(JL,XL(r))}return n}(t),XL(t)}(e)}catch(e){return KL}}(e.slice(5,-1));return t===KL?"":t}var tU=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],nU=["dx","dy","angle","className","breakAll"];function rU(){return rU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rU.apply(null,arguments)}function oU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function iU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return aU(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aU(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var sU=/[ \f\n\r\t\v\u2028\u2029]+/,cU=e=>{var t=e.children,n=e.breakAll,r=e.style;try{var o=[];return Jx(t)||(o=n?t.toString().split(""):t.toString().split(sU)),{wordsWithComputedWidth:o.map(e=>({word:e,width:FL(e,r).width})),spaceWidth:n?0:FL(" ",r).width}}catch(e){return null}};function lU(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var uU=(e,t,n,r)=>e.reduce((e,o)=>{var i=o.word,a=o.width,s=e[e.length-1];if(s&&null!=a&&(null==t||r||s.width+a+n<Number(t)))s.words.push(i),s.width+=a+n;else{var c={words:[i],width:a};e.push(c)}return e},[]),dU=e=>e.reduce((e,t)=>e.width>t.width?e:t),fU=(e,t,n,r,o,i,a,s)=>{var c=e.slice(0,t),l=cU({breakAll:n,style:r,children:c+"…"});if(!l)return[!1,[]];var u=uU(l.wordsWithComputedWidth,i,a,s);return[u.length>o||dU(u).width>Number(i),u]},pU=e=>[{words:Jx(e)?[]:e.toString().split(sU),width:void 0}],hU="#808080",mU={angle:0,breakAll:!1,capHeight:"0.71em",fill:hU,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},gU=(0,a.forwardRef)((e,t)=>{var n=B_(e,mU),r=n.x,o=n.y,i=n.lineHeight,s=n.capHeight,c=n.fill,l=n.scaleToFit,u=n.textAnchor,d=n.verticalAnchor,f=oU(n,tU),p=(0,a.useMemo)(()=>(e=>{var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,i=e.breakAll,a=e.maxLines;if((t||n)&&!az){var s=cU({breakAll:i,children:r,style:o});return s?((e,t,n,r,o)=>{var i=e.maxLines,a=e.children,s=e.style,c=e.breakAll,l=qx(i),u=String(a),d=uU(t,r,n,o);if(!l||o)return d;if(!(d.length>i||dU(d).width>Number(r)))return d;for(var f,p=0,h=u.length-1,m=0;p<=h&&m<=u.length-1;){var g=Math.floor((p+h)/2),y=iU(fU(u,g-1,c,s,i,r,n,o),2),v=y[0],b=y[1],x=iU(fU(u,g,c,s,i,r,n,o),1)[0];if(v||x||(p=g+1),v&&x&&(h=g-1),!v&&x){f=b;break}m++}return f||d})({breakAll:i,children:r,maxLines:a,style:o},s.wordsWithComputedWidth,s.spaceWidth,t,Boolean(n)):pU(r)}return pU(r)})({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:l,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,l,f.style,f.width]),h=f.dx,m=f.dy,g=f.angle,y=f.className,v=f.breakAll,b=oU(f,nU);if(!Gx(r)||!Gx(o)||0===p.length)return null;var x,w=Number(r)+(qx(h)?h:0),M=Number(o)+(qx(m)?m:0);if(!dw(w)||!dw(M))return null;switch(d){case"start":x=eU("calc(".concat(s,")"));break;case"middle":x=eU("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(s," / 2))"));break;default:x=eU("calc(".concat(p.length-1," * -").concat(i,")"))}var j=[],O=p[0];if(l&&null!=O){var N=O.width,S=f.width;j.push("scale(".concat(qx(S)&&qx(N)?S/N:1,")"))}return g&&j.push("rotate(".concat(g,", ").concat(w,", ").concat(M,")")),j.length&&(b.transform=j.join(" ")),a.createElement("text",rU({},$z(b),{ref:t,x:w,y:M,className:jc("recharts-text",y),textAnchor:u,fill:c.includes("url")?hU:c}),p.map((e,t)=>{var n=e.words.join(v?"":" ");return a.createElement("tspan",{x:w,dy:0===t?x:i,key:"".concat(n,"-").concat(t)},n)}))});gU.displayName="Text";var yU=e=>null;yU.displayName="Cell";var vU=n(405),bU=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",xU=null,wU=null,MU=e=>{if(e===xU&&Array.isArray(wU))return wU;var t=[];return a.Children.forEach(e,e=>{Jx(e)||((0,vU.zv)(e)?t=t.concat(MU(e.props.children)):t.push(e))}),wU=t,xU=e,t};function jU(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>bU(e)):[bU(t)],MU(e).forEach(e=>{var t=Ux(e,"type.displayName")||Ux(e,"type.name");t&&-1!==r.indexOf(t)&&n.push(e)}),n}var OU=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot);function NU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NU(Object(n),!0).forEach(function(t){EU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EU(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kU(e,t){return SU(SU({},t),e)}function DU(e){var t,n=e.option,r=e.DefaultShape,o=e.shapeProps,i=e.activeClassName,s=void 0===i?"recharts-active-shape":i,c=e.inActiveClassName,l=void 0===c?"recharts-shape":c,u=function(e){if("index"in e){var t=e.index;return"number"==typeof t||"string"==typeof t?t:void 0}}(o);return t=(0,a.isValidElement)(n)?function(e,t){return(0,a.cloneElement)(e,kU(function(e){return(0,a.isValidElement)(e)?e.props:e}(e),t))}(n,o):n===r?a.createElement(r,o):"function"==typeof n?n(o,u):"object"==typeof n?a.createElement(r,kU(n,o)):a.createElement(r,o),function(e){return"isActive"in e&&!0===e.isActive}(o)?a.createElement(NR,{className:s},t):a.createElement(NR,{className:l},t)}function IU(e){var t=e.tooltipEntrySettings,n=oM(),r=uj(),o=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{r||(null===o.current?n(Aw(t)):o.current!==t&&n(Tw({prev:o.current,next:t})),o.current=t)},[t,n,r]),(0,a.useLayoutEffect)(()=>()=>{o.current&&(n(Cw(o.current)),o.current=null)},[n]),null}function AU(e){var t=e.legendPayload,n=oM(),r=uj(),o=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{r||(null===o.current?n(MP(t)):o.current!==t&&n(jP({prev:o.current,next:t})),o.current=t)},[n,r,t]),(0,a.useLayoutEffect)(()=>()=>{o.current&&(n(OP(o.current)),o.current=null)},[n]),null}function TU(e){var t=e.legendPayload,n=oM(),r=cM(bj),o=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{"centric"!==r&&"radial"!==r||(null===o.current?n(MP(t)):o.current!==t&&n(jP({prev:o.current,next:t})),o.current=t)},[n,r,t]),(0,a.useLayoutEffect)(()=>()=>{o.current&&(n(OP(o.current)),o.current=null)},[n]),null}var CU=1e-4,PU=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],zU=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),_U=(e,t)=>n=>{var r=PU(e,t);return zU(r,n)},RU=function(){return((e,t,n,r)=>{var o,i,a=_U(e,n),s=_U(t,r),c=(o=e,i=n,e=>{var t=[...PU(o,i).map((e,t)=>e*t).slice(1),0];return zU(t,e)}),l=e=>e>1?1:e<0?0:e,u=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=a(n)-t,i=c(n);if(Math.abs(o-t)<CU||i<CU)return s(n);n=l(n-o/i)}return s(n)};return u.isStepper=!1,u})(...function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var r=(e=>{var t,n=e.split("(");if(2!==n.length||"cubic-bezier"!==n[0])return null;var r=null===(t=n[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==r||4!==r.length)return null;var o=r.map(e=>parseFloat(e));return[o[0],o[1],o[2],o[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]}(...arguments))},LU=(e,t,n)=>{var r,o=i=>{var a=t.tick(i);if("active"===t.getState())return n(t.getInterpolated()),1===t.getProgress()?(t.complete(),void(r=void 0)):void(r=e.setTimeout(o,a));r=e.setTimeout(o,a)};return r=e.setTimeout(o,0),()=>{var e;return null===(e=r)||void 0===e?void 0:e()}},UU=(0,a.createContext)(LU);function YU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function FU(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return YU(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?YU(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(()=>!az&&!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),2),t=e[0],n=e[1];return(0,a.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{n(e.matches)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[]),t}UU.Provider;var WU="init",BU="pending",QU="active";function qU(e){return Math.max(0,e)}class GU{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(e){var t;(function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(this,"state",WU),this.animationId=e.animationId,this.onAnimationEnd=e.onAnimationEnd,this.animationDuration=qU(e.animationDuration),this.animationBegin=qU(e.animationBegin),this.progress=0,this.from=e.from,this.to=e.to,this.easing=e.easing,null===(t=e.onAnimationStart)||void 0===t||t.call(e)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(e){if(this.getState()===WU)return this.state=BU,this.beginStartedTime=e,this.animationBegin;if(this.getState()===BU){if(null==this.beginStartedTime)throw new Error;var t=e-this.beginStartedTime;return t>=this.animationBegin?(this.state=QU,this.animationStartedTime=e,this.nextAnimationUpdate(0)):qU(this.animationBegin-t)}if(this.getState()===QU){if(null==this.animationStartedTime)throw new Error;var n=e-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(e){this.progress=Math.min(1,Math.max(0,e))}getProgress(){return this.progress}complete(){var e;this.progress=1,"active"===this.state&&(null===(e=this.onAnimationEnd)||void 0===e||e.call(this)),this.state="completed"}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class $U extends GU{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Zx(this.getFrom(),this.getTo(),this.getProgress()))}}class HU{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,o=i=>{i-n>=t?e(i):r=requestAnimationFrame(o)};return r=requestAnimationFrame(o),()=>{null!=r&&cancelAnimationFrame(r)}}}function VU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var KU={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}};function ZU(e){var t,n,r=B_(e,KU),o=r.animationId,i=r.isActive,s=r.canBegin,c=r.duration,l=r.easing,u=r.begin,d=r.onAnimationEnd,f=r.onAnimationStart,p=r.children,h=FU(),m="auto"===i?!az&&!h:i,g=(t=r.animationController,n=(0,a.useContext)(UU),(0,a.useMemo)(()=>null!=t?t:n,[t,n])),y=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return VU(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VU(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(m?0:1),2),v=y[0],b=y[1];return(0,a.useEffect)(()=>{m||b(1)},[m]),(0,a.useEffect)(()=>{var e=(e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return RU(e);case"spring":return function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?16.67:i,s=[0],c=0,l=0,u=0;u<1e4&&(c+=(l+=(-(c-1)*n-l*o)*a/1e3)*a/1e3,s.push(c),!(Math.abs(c-1)<CU&&Math.abs(l)<CU));)u++;s[s.length-1]=1;var d=s.length-1;return e=>{var t,n,r;if(e<=0)return 0;if(e>=1)return 1;var o=e*d,i=Math.floor(o),a=o-i;return(null!==(t=s[i])&&void 0!==t?t:0)+((null!==(n=s[i+1])&&void 0!==n?n:0)-(null!==(r=s[i])&&void 0!==r?r:0))*a}}();default:if("cubic-bezier"===e.split("(")[0])return RU(e)}return"function"==typeof e?e:null})(l);if(!m||!s||null==e)return nw;var t=new HU,n=new $U({animationId:o,easing:e,animationDuration:c,animationBegin:u,onAnimationStart:f,onAnimationEnd:d,from:0,to:1});return g(t,n,b)},[g,o,m,s,c,l,u,f,d]),p(Number(v))}function XU(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",n=(0,a.useRef)(Hx(t)),r=(0,a.useRef)(e);return r.current!==e&&(n.current=Hx(t),r.current=e),n.current}function JU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eY(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tY,nY="index",rY="append";function oY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=[];for(var o of n)r.push({status:"removed",prev:o});for(var i=0;i<t.length;i++){var a=e[i],s=t[i];null!=a?r.push({status:"matched",prev:a,next:s}):r.push({status:"added",next:s})}return r}function iY(e,t,n){return null==t?null:null==e?t.map(e=>({status:"added",next:e})):n===nY?function(e,t){var n=e.length/t.length;return oY(t.map((t,r)=>e[Math.floor(r*n)]),t)}(e,t):n===rY?function(e,t){return oY(t.map((t,n)=>e[n]),t)}(e,t):function(e,t,n){var r=function(e,t){for(var n=new Map,r=0;r<e.length;r++){var o=e[r];if(null!=o){var i=t(o,r);null==i||n.has(i)||n.set(i,o)}}return n}(e,n),o=new Set,i=t.map((e,t)=>{var i=n(e,t);if(null!=i){var a=r.get(i);if(void 0!==a)return o.add(i),a}}),a=[];for(var s of r){var c=JU(s,2),l=c[0],u=c[1];o.has(l)||a.push(u)}return oY(i,t,a)}(e,t,n)}function aY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sY(e,t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return aY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aY(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(!1),2),r=n[0],o=n[1];return{isAnimating:r,handleAnimationStart:(0,a.useCallback)(()=>{"function"==typeof e&&e(),o(!0)},[e]),handleAnimationEnd:(0,a.useCallback)(()=>{"function"==typeof t&&t(),o(!1)},[t])}}function cY(e){var t,n=e.animationInput,r=e.animationIdPrefix,o=e.items,i=e.previousItemsRef,s=e.isAnimationActive,c=e.animationBegin,l=e.animationDuration,u=e.animationEasing,d=e.onAnimationStart,f=e.onAnimationEnd,p=e.animationInterpolateFn,h=e.animationMatchBy,m=e.shouldUpdatePreviousRef,g=e.children,y=e.layout,v=XU(n,r),b=function(e,t){var n=(0,a.useRef)(e),r=(0,a.useRef)(t.current),o=(0,a.useRef)(!0);n.current!==e&&(n.current=e,r.current=t.current,o.current=!1);var i=(0,a.useCallback)(function(e,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];0!==n?(1===n&&(r.current=e),n>0&&o.current&&i&&(t.current=e)):o.current=!0},[t]);return{startValue:r.current,syncStepValue:i}}(v,i),x=null!==(t=b.startValue)&&void 0!==t?t:null,w=iY(x,o,null!=h?h:nY);return a.createElement(ZU,{animationId:v,begin:c,duration:l,isActive:s,easing:u,onAnimationEnd:f,onAnimationStart:d,key:v},e=>{var t=null==x,n=null==o?o:p(w,e,y),r=m?m(e):e>0;return b.syncStepValue(n,e,r),null==n?null:g(n,e,t)})}function lY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var uY=null!==(tY=a["useId".toString()])&&void 0!==tY?tY:()=>function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lY(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.useState(()=>Hx("uid-")),1)[0],dY=(0,a.createContext)(void 0),fY=e=>{var t=e.id,n=e.type,r=e.children,o=function(e,t){var n=uY();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(n),t);return a.createElement(dY.Provider,{value:o},r(o))},pY=e=>{var t=oM(),n=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{null===n.current?t(iP(e)):n.current!==e&&t(aP({prev:n.current,next:e})),n.current=e},[t,e]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(sP(n.current)),n.current=null)},[t]),null},hY=(0,a.memo)(pY),mY=e=>{var t=oM(),n=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{null===n.current?t(cP(e)):n.current!==e&&t(uP({prev:n.current,next:e})),n.current=e},[t,e]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(lP(n.current)),n.current=null)},[t]),null},gY=(0,a.memo)(mY);function yY(e){var t=e.zIndex,n=e.children,r=void 0!==xj()&&void 0!==t&&0!==t,o=uj(),s=(0,a.useRef)(void 0),c=(0,a.useRef)(new Set),l=oM(),u=cM(e=>Zz(e,t,o));if((0,a.useLayoutEffect)(()=>{if(!r){var e=c.current;return e.forEach(e=>{l(mz({zIndex:e}))}),e.clear(),void(s.current=void 0)}if(c.current.has(t)||(l(hz({zIndex:t})),c.current.add(t)),u){s.current=u;var n=c.current;n.forEach(e=>{e!==t&&(l(mz({zIndex:e})),n.delete(e))})}},[l,t,r,u]),(0,a.useLayoutEffect)(()=>{var e=c.current;return()=>{e.forEach(e=>{l(mz({zIndex:e}))}),e.clear()}},[l]),!r)return n;var d=null!=u?u:s.current;return d?(0,i.createPortal)(n,d):null}function vY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vY(Object(n),!0).forEach(function(t){xY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xY(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wY=["labelRef"],MY=["content"];function jY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function OY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OY(Object(n),!0).forEach(function(t){SY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SY(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EY(){return EY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EY.apply(null,arguments)}var kY=(0,a.createContext)(null),DY=e=>{var t=e.x,n=e.y,r=e.upperWidth,o=e.lowerWidth,i=e.width,s=e.height,c=e.children,l=(0,a.useMemo)(()=>({x:t,y:n,upperWidth:r,lowerWidth:o,width:i,height:s}),[t,n,r,o,i,s]);return a.createElement(kY.Provider,{value:l},c)},IY=()=>{var e=(0,a.useContext)(kY),t=hj();return e||(t?pj(t):void 0)},AY=(0,a.createContext)(null),TY=e=>null!=e&&"function"==typeof e,CY=e=>null!=e&&"cx"in e&&qx(e.cx),PY={angle:0,offset:5,zIndex:uO.label,position:"middle",textBreakAll:!1};function zY(e){var t,n,r,o,i,s=B_(e,PY),c=s.viewBox,l=s.parentViewBox,u=s.position,d=s.value,f=s.children,p=s.content,h=s.className,m=void 0===h?"":h,g=s.textBreakAll,y=s.labelRef,v=(o=(0,a.useContext)(AY),i=cM(SO),o||i),b=IY(),x=function(e){if(!CY(e))return e;var t=e.cx,n=e.cy,r=e.outerRadius,o=2*r;return{x:t-r,y:n-r,width:o,upperWidth:o,lowerWidth:o,height:o}}(t=null==c?"center"===u?b:null!=v?v:b:CY(c)?c:pj(c));if(!t||Jx(d)&&Jx(f)&&!(0,a.isValidElement)(p)&&"function"!=typeof p)return null;var w=NY(NY({},s),{},{viewBox:t});if((0,a.isValidElement)(p)){w.labelRef;var M=jY(w,wY);return(0,a.cloneElement)(p,M)}if("function"==typeof p){w.content;var j=jY(w,MY);if(n=(0,a.createElement)(p,j),(0,a.isValidElement)(n))return n}else n=(e=>{var t=e.value,n=e.formatter,r=Jx(e.children)?t:e.children;return"function"==typeof n?n(r):r})(s);var O=$z(s);if(CY(t)){if("insideStart"===u||"insideEnd"===u||"end"===u)return((e,t,n,r,o)=>{var i,s,c=e.offset,l=e.className,u=o.cx,d=o.cy,f=o.innerRadius,p=o.outerRadius,h=o.startAngle,m=o.endAngle,g=o.clockWise,y=(f+p)/2,v=((e,t)=>Wx(t-e)*Math.min(Math.abs(t-e),360))(h,m),b=v>=0?1:-1;switch(t){case"insideStart":i=h+b*c,s=g;break;case"insideEnd":i=m-b*c,s=!g;break;case"end":i=m+b*c,s=g;break;default:throw new Error("Unsupported position ".concat(t))}s=v<=0?s:!s;var x=aO(u,d,y,i),w=aO(u,d,y,i+359*(s?1:-1)),M="M".concat(x.x,",").concat(x.y,"\n A").concat(y,",").concat(y,",0,1,").concat(s?0:1,",\n ").concat(w.x,",").concat(w.y),j=Jx(e.id)?Hx("recharts-radial-line-"):e.id;return a.createElement("text",EY({},r,{dominantBaseline:"central",className:jc("recharts-radial-bar-label",l)}),a.createElement("defs",null,a.createElement("path",{id:j,d:M})),a.createElement("textPath",{xlinkHref:"#".concat(j)},n))})(s,u,n,O,t);r=((e,t,n)=>{var r=e.cx,o=e.cy,i=e.innerRadius,a=e.outerRadius,s=(e.startAngle+e.endAngle)/2;if("outside"===n){var c=aO(r,o,a+t,s),_x=c.x;return{x:_x,y:c.y,textAnchor:_x>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"end"};var l=aO(r,o,(i+a)/2,s);return{x:l.x,y:l.y,textAnchor:"middle",verticalAnchor:"middle"}})(t,s.offset,s.position)}else{if(!x)return null;var N=(e=>{var t=e.position,n=e.offset,r=void 0===n?0:n,o=e.parentViewBox,i=e.clamp,a=pj(e.viewBox),s=a.x,c=a.y,l=a.height,u=a.upperWidth,d=a.lowerWidth,f=s,p=s+(u-d)/2,h=(f+p)/2,m=(u+d)/2,g=f+u/2,y=l>=0?1:-1,v=y*r,b=y>0?"end":"start",x=y>0?"start":"end",w=u>=0?1:-1,M=w*r,j=w>0?"end":"start",O=w>0?"start":"end",N=o;if("top"===t){var S={x:f+u/2,y:c-v,horizontalAnchor:"middle",verticalAnchor:b};return i&&N&&(S.height=Math.max(c-N.y,0),S.width=u),S}if("bottom"===t){var E={x:p+d/2,y:c+l+v,horizontalAnchor:"middle",verticalAnchor:x};return i&&N&&(E.height=Math.max(N.y+N.height-(c+l),0),E.width=d),E}if("left"===t){var k={x:h-M,y:c+l/2,horizontalAnchor:j,verticalAnchor:"middle"};return i&&N&&(k.width=Math.max(k.x-N.x,0),k.height=l),k}if("right"===t){var D={x:h+m+M,y:c+l/2,horizontalAnchor:O,verticalAnchor:"middle"};return i&&N&&(D.width=Math.max(N.x+N.width-D.x,0),D.height=l),D}var I=i&&N?{width:m,height:l}:{};return"insideLeft"===t?bY({x:h+M,y:c+l/2,horizontalAnchor:O,verticalAnchor:"middle"},I):"insideRight"===t?bY({x:h+m-M,y:c+l/2,horizontalAnchor:j,verticalAnchor:"middle"},I):"insideTop"===t?bY({x:f+u/2,y:c+v,horizontalAnchor:"middle",verticalAnchor:x},I):"insideBottom"===t?bY({x:p+d/2,y:c+l-v,horizontalAnchor:"middle",verticalAnchor:b},I):"insideTopLeft"===t?bY({x:f+M,y:c+v,horizontalAnchor:O,verticalAnchor:x},I):"insideTopRight"===t?bY({x:f+u-M,y:c+v,horizontalAnchor:j,verticalAnchor:x},I):"insideBottomLeft"===t?bY({x:p+M,y:c+l-v,horizontalAnchor:O,verticalAnchor:b},I):"insideBottomRight"===t?bY({x:p+d-M,y:c+l-v,horizontalAnchor:j,verticalAnchor:b},I):t&&"object"==typeof t&&(qx(t.x)||Qx(t.x))&&(qx(t.y)||Qx(t.y))?bY({x:s+Vx(t.x,m),y:c+Vx(t.y,l),horizontalAnchor:"end",verticalAnchor:"end"},I):bY({x:g,y:c+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},I)})({viewBox:x,position:u,offset:s.offset,parentViewBox:CY(l)?void 0:l,clamp:!0});r=NY(NY({x:N.x,y:N.y,textAnchor:N.horizontalAnchor,verticalAnchor:N.verticalAnchor},void 0!==N.width?{width:N.width}:{}),void 0!==N.height?{height:N.height}:{})}return a.createElement(yY,{zIndex:s.zIndex},a.createElement(gU,EY({ref:y,className:jc("recharts-label",m)},O,r,{textAnchor:lU(O.textAnchor)?O.textAnchor:r.textAnchor,breakAll:g}),n))}zY.displayName="Label";function _Y(e){var t=e.label,n=e.labelRef;return((e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return!0===e?a.createElement(zY,EY({key:"label-implicit"},r)):Gx(e)?a.createElement(zY,EY({key:"label-implicit",value:e},r)):(0,a.isValidElement)(e)?e.type===zY?(0,a.cloneElement)(e,NY({key:"label-implicit"},r)):a.createElement(zY,EY({key:"label-implicit",content:e},r)):TY(e)?a.createElement(zY,EY({key:"label-implicit",content:e},r)):e&&"object"==typeof e?a.createElement(zY,EY({},e,{key:"label-implicit"},r)):null})(t,IY(),n)||null}var RY=["valueAccessor"],LY=["dataKey","clockWise","id","textBreakAll","zIndex"];function UY(){return UY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UY.apply(null,arguments)}function YY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var FY=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(function(e){return Jx(e)||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}(t))return t},WY=(0,a.createContext)(void 0),BY=WY.Provider,QY=(0,a.createContext)(void 0),qY=QY.Provider;function GY(e){var t=e.valueAccessor,n=void 0===t?FY:t,r=YY(e,RY),o=r.dataKey,i=(r.clockWise,r.id),s=r.textBreakAll,c=r.zIndex,l=YY(r,LY),u=(0,a.useContext)(WY),d=(0,a.useContext)(QY),f=u||d;return f&&f.length?a.createElement(yY,{zIndex:null!=c?c:uO.label},a.createElement(NR,{className:"recharts-label-list"},f.map((e,t)=>{var c,u=Jx(o)?n(e,t):RM(e.payload,o),d=Jx(i)?{}:{id:"".concat(i,"-").concat(t)};return a.createElement(zY,UY({key:"label-".concat(t)},$z(e),l,d,{fill:null!==(c=r.fill)&&void 0!==c?c:e.fill,parentViewBox:e.parentViewBox,value:u,textBreakAll:s,viewBox:e.viewBox,index:t,zIndex:0}))}))):null}function $Y(e){var t=e.label;return t?!0===t?a.createElement(GY,{key:"labelList-implicit"}):a.isValidElement(t)||TY(t)?a.createElement(GY,{key:"labelList-implicit",content:t}):"object"==typeof t?a.createElement(GY,UY({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function HY(e){return e&&"object"==typeof e&&"className"in e&&"string"==typeof e.className?e.className:""}GY.displayName="LabelList";var VY=["key"],KY=["onMouseEnter","onClick","onMouseLeave"],ZY=["id"],XY=["id"];function JY(){return JY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JY.apply(null,arguments)}function eF(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tF(Object(n),!0).forEach(function(t){rF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oF=CL;function iF(e){var t=(0,a.useMemo)(()=>jU(e.children,yU),[e.children]),n=cM(n=>wR(n,e.id,t));return null==n?null:a.createElement(TU,{legendPayload:n})}var aF=a.memo(e=>{var t=e.dataKey,n=e.nameKey,r=e.sectors,o=e.stroke,i=e.strokeWidth,s=e.fill,c=e.name,l=e.hide,u=e.tooltipType,d=e.formatter,f=e.id,p=function(e){if(null!=e&&"boolean"!=typeof e&&"function"!=typeof e){if(a.isValidElement(e)){var t,n=null===(t=e.props)||void 0===t?void 0:t.fill;return"string"==typeof n?n:void 0}var r=e.fill;return"string"==typeof r?r:void 0}}(e.activeShape),h={dataDefinedOnItem:r.map(e=>{var t=e.tooltipPayload;return null==p||null==t?t:t.map(e=>nF(nF({},e),{},{color:p,fill:p}))}),getPosition:e=>{var t;return null===(t=r[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:o,strokeWidth:i,fill:s,dataKey:t,nameKey:n,name:HM(c,t),hide:l,type:u,color:s,unit:"",formatter:d,graphicalItemId:f}};return a.createElement(IU,{tooltipEntrySettings:h})}),sF=(e,t)=>e>t?"start":e<t?"end":"middle",cF=(e,t,n)=>{var r=t.top,o=t.left,i=t.width,a=t.height,s=sO(i,a),c=o+Vx(e.cx,i,i/2),l=r+Vx(e.cy,a,a/2),u=Vx(e.innerRadius,s,0),d=((e,t,n)=>Vx("function"==typeof t?t(e):t,n,.8*n))(n,e.outerRadius,s);return{cx:c,cy:l,innerRadius:u,outerRadius:d,maxRadius:e.maxRadius||Math.sqrt(i*i+a*a)/2}},lF=(e,t)=>Wx(t-e)*Math.min(Math.abs(t-e),360);function uF(e){var t=e.sectors,n=e.props,r=e.showLabels,o=n.label,i=n.labelLine,s=n.dataKey;if(!r||!o||!t)return null;var c=qz(n),l=Gz(o),u=Gz(i),d="object"==typeof o&&"offsetRadius"in o&&"number"==typeof o.offsetRadius&&o.offsetRadius||20,f=t.map((e,t)=>{var n=(e.startAngle+e.endAngle)/2,r=aO(e.cx,e.cy,e.outerRadius+d,n),f=nF(nF(nF(nF({},c),e),{},{stroke:"none"},l),{},{index:t,textAnchor:sF(r.x,e.cx)},r),p=nF(nF(nF(nF({},c),e),{},{fill:"none",stroke:e.fill},u),{},{index:t,points:[aO(e.cx,e.cy,e.outerRadius,n),r],key:"line"});return a.createElement(yY,{zIndex:uO.label,key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},a.createElement(NR,null,i&&((e,t)=>{if(a.isValidElement(e))return a.cloneElement(e,t);if("function"==typeof e)return e(t);var n=jc("recharts-pie-label-line","boolean"!=typeof e?e.className:""),r=(t.key,eF(t,VY));return a.createElement(EL,JY({},r,{type:"linear",className:n}))})(i,p),((e,t,n)=>{if(a.isValidElement(e))return a.cloneElement(e,t);var r=n;if("function"==typeof e&&(r=e(t),a.isValidElement(r)))return r;var o=jc("recharts-pie-label-text",HY(e));return a.createElement(gU,JY({},t,{alignmentBaseline:"middle",className:o}),r)})(o,f,RM(e,s))))});return a.createElement(NR,{className:"recharts-pie-labels"},f)}function dF(e){var t=e.sectors,n=e.props,r=e.showLabels,o=n.label;return"object"==typeof o&&null!=o&&"position"in o?a.createElement($Y,{label:o}):a.createElement(uF,{sectors:t,props:n,showLabels:r})}function fF(e){var t,n,r,o,i=e.sectors,s=e.activeShape,c=e.inactiveShape,l=e.allOtherPieProps,u=e.shape,d=e.id,f=e.animationElapsedTime,p=e.isAnimating,h=e.isEntrance,m=cM(cC),g=cM(uC),y=cM(dC),v=l.onMouseEnter,b=l.onClick,x=l.onMouseLeave,w=eF(l,KY),M=((e,t,n)=>{var r=oM();return(o,i)=>a=>{null==e||e(o,i,a),r(zw({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}})(v,l.dataKey,d),j=(e=>{var t=oM();return(n,r)=>o=>{null==e||e(n,r,o),t(_w())}})(x),O=(t=b,n=l.dataKey,r=d,o=oM(),(e,i)=>a=>{null==t||t(e,i,a),o(Lw({activeIndex:String(i),activeDataKey:n,activeCoordinate:e.tooltipPosition,activeGraphicalItemId:r}))});return null==i||0===i.length?null:a.createElement(a.Fragment,null,i.map((e,t)=>{if(0===(null==e?void 0:e.startAngle)&&0===(null==e?void 0:e.endAngle)&&1!==i.length)return null;var n=null==y||y===d,r=String(t)===m&&(null==g||l.dataKey===g)&&n,o=s&&r?s:m?c:null,v=nF(nF({},e),{},{stroke:e.stroke,tabIndex:-1,index:t,isActive:r,animationElapsedTime:f,isAnimating:p,isEntrance:h,[tj]:t,[nj]:d});return a.createElement(NR,JY({key:"sector-".concat(null==e?void 0:e.startAngle,"-").concat(null==e?void 0:e.endAngle,"-").concat(e.midAngle,"-").concat(t),tabIndex:-1,className:"recharts-pie-sector"},uL(w,e,t),{onMouseEnter:M(e,t),onMouseLeave:j(e,t),onClick:O(e,t)}),a.createElement(DU,{option:null!=o?o:u,DefaultShape:oF,shapeProps:v}))}))}function pF(e){var t=e.showLabels,n=e.sectors,r=e.children,o=(0,a.useMemo)(()=>t&&n?n.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})):[],[n,t]);return a.createElement(qY,{value:t?o:void 0},r)}function hF(e){var t=e.props,n=e.previousSectorsRef,r=e.id,o=t.sectors,i=t.activeShape,s=t.inactiveShape,c=t.animationInterpolateFn,l=sY(t.onAnimationStart,t.onAnimationEnd),u=l.isAnimating,d=l.handleAnimationStart,f=l.handleAnimationEnd,p=cM(Mj);return null==p?null:a.createElement(pF,{showLabels:!u,sectors:o},a.createElement(cY,{animationInput:t,animationIdPrefix:"recharts-pie-",items:o,previousItemsRef:n,isAnimationActive:t.isAnimationActive,animationBegin:t.animationBegin,animationDuration:t.animationDuration,animationEasing:t.animationEasing,onAnimationStart:d,onAnimationEnd:f,animationInterpolateFn:c,animationMatchBy:t.animationMatchBy,layout:p},(e,n,o)=>a.createElement(NR,null,a.createElement(fF,{sectors:e,activeShape:i,inactiveShape:s,allOtherPieProps:t,shape:t.shape,id:r,animationElapsedTime:n,isAnimating:u||n<1,isEntrance:o}))),a.createElement(dF,{showLabels:!u,sectors:o,props:t}),t.children)}var mF={animationBegin:400,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:(e,t)=>{if(null==e)return[];var n=[],r=e.find(e=>"removed"!==e.status),o=r?r.next.startAngle:0;return e.forEach((e,r)=>{if("removed"!==e.status){var i=r>0?Ux(e.next,"paddingAngle",0):0;if("matched"===e.status){var a=Zx(e.prev.endAngle-e.prev.startAngle,e.next.endAngle-e.next.startAngle,t),s=nF(nF({},e.next),{},{startAngle:o+i,endAngle:o+a+i});n.push(s),o=s.endAngle}else{var c=Zx(0,e.next.endAngle-e.next.startAngle,t),l=nF(nF({},e.next),{},{startAngle:o+i,endAngle:o+c+i});n.push(l),o=l.endAngle}}}),n},animationMatchBy:rY,cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,shape:oF,startAngle:0,stroke:"#fff",zIndex:uO.area};function gF(e){var t=e.id,n=eF(e,ZY),r=e.hide,o=e.className,i=e.rootTabIndex,s=(0,a.useMemo)(()=>jU(e.children,yU),[e.children]),c=cM(e=>MR(e,t,s)),l=(0,a.useRef)(null),u=jc("recharts-pie",o);return r||null==c?(l.current=null,a.createElement(NR,{tabIndex:i,className:u})):a.createElement(yY,{zIndex:e.zIndex},a.createElement(aF,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:c,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,formatter:e.formatter,id:t,activeShape:e.activeShape}),a.createElement(NR,{tabIndex:i,className:u},a.createElement(hF,{props:nF(nF({},n),{},{sectors:c}),previousSectorsRef:l,id:t})))}var yF=function(e){var t=B_(e,mF),n=t.id,r=eF(t,XY),o=qz(r);return a.createElement(fY,{id:n,type:"pie"},e=>a.createElement(a.Fragment,null,a.createElement(gY,{type:"pie",id:e,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:o,maxRadius:t.maxRadius}),a.createElement(iF,JY({},r,{id:e})),a.createElement(gF,JY({},r,{id:e}))))};function vF(){return vF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vF.apply(null,arguments)}function bF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bF(Object(n),!0).forEach(function(t){wF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jF(e){return Array.isArray(e)&&Gx(e[0])&&Gx(e[1])?e.join(" ~ "):e}yF.displayName="Pie";var OF={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1},NF=e=>{var t=e.separator,n=void 0===t?OF.separator:t,r=e.contentStyle,o=e.itemStyle,i=e.labelStyle,s=void 0===i?OF.labelStyle:i,c=e.payload,l=e.formatter,u=e.itemSorter,d=e.wrapperClassName,f=e.labelClassName,p=e.label,h=e.labelFormatter,m=e.accessibilityLayer,g=void 0===m?OF.accessibilityLayer:m,y=xF(xF({},OF.contentStyle),r),v=xF({margin:0},s),b=!Jx(p),x=b?p:"",w=jc("recharts-default-tooltip",d),M=jc("recharts-tooltip-label",f);b&&h&&null!=c&&(x=h(p,c));var j=g?{role:"status","aria-live":"assertive"}:{};return a.createElement("div",vF({className:w,style:y},j),a.createElement("p",{className:M,style:v},a.isValidElement(x)?x:"".concat(x)),(()=>{if(c&&c.length){var e=function(e,t){return null==t?e:xM(e,t)}(c,u),t=e.map((e,t)=>{if(!e||"none"===e.type)return null;var r=e.formatter||l||jF,i=e.value,s=e.name,u=i,d=s;if(r){var f=r(i,s,e,t,c);if(Array.isArray(f)){var p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return MF(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?MF(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(f,2);u=p[0],d=p[1]}else{if(null==f)return null;u=f}}var h=xF(xF({},OF.itemStyle),{},{color:e.color||OF.itemStyle.color},o);return a.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:h},Gx(d)?a.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Gx(d)?a.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,a.createElement("span",{className:"recharts-tooltip-item-value"},u),a.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return a.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},t)}return null})())},SF="recharts-tooltip-wrapper",EF={visibility:"hidden"};function kF(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return jc(SF,{["".concat(SF,"-right")]:qx(n)&&t&&qx(t.x)&&n>=t.x,["".concat(SF,"-left")]:qx(n)&&t&&qx(t.x)&&n<t.x,["".concat(SF,"-bottom")]:qx(r)&&t&&qx(t.y)&&r>=t.y,["".concat(SF,"-top")]:qx(r)&&t&&qx(t.y)&&r<t.y})}function DF(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offset,i=e.position,a=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(i&&qx(i[r]))return i[r];var u=n[r]-s-(o>0?o:0),d=n[r]+o;if(t[r])return a[r]?u:d;var f=c[r];return null==f?0:a[r]?u<f?Math.max(d,f):Math.max(u,f):null==l?0:d+s>f+l?Math.max(u,f):Math.max(d,f)}function IF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IF(Object(n),!0).forEach(function(t){TF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PF(e){if((!e.prefersReducedMotion||"auto"!==e.isAnimationActive)&&e.isAnimationActive&&e.active){var t="string"==typeof e.animationEasing?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}function zF(e){var t,n,r,o,i,s,c=FU(),l=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return CF(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CF(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),u=l[0],d=l[1];a.useEffect(()=>{var t=t=>{var n,r,o,i;"Escape"===t.key&&d({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[null===(t=e.coordinate)||void 0===t?void 0:t.x,null===(n=e.coordinate)||void 0===n?void 0:n.y]),!u.dismissed||(null!==(r=null===(o=e.coordinate)||void 0===o?void 0:o.x)&&void 0!==r?r:0)===u.dismissedAtCoordinate.x&&(null!==(i=null===(s=e.coordinate)||void 0===s?void 0:s.y)&&void 0!==i?i:0)===u.dismissedAtCoordinate.y||d(AF(AF({},u),{},{dismissed:!1}));var f,p,h,m,g,y,v,b,x,w,M,j,O=(m=(f={allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:"number"==typeof e.offset?e.offset:e.offset.x,offsetTop:"number"==typeof e.offset?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}).allowEscapeViewBox,g=f.coordinate,y=f.offsetTop,v=f.offsetLeft,b=f.position,x=f.reverseDirection,M=f.useTranslate3d,j=f.viewBox,{cssProperties:(w=f.tooltipBox).height>0&&w.width>0&&g?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:p=DF({allowEscapeViewBox:m,coordinate:g,key:"x",offset:v,position:b,reverseDirection:x,tooltipDimension:w.width,viewBox:j,viewBoxDimension:j.width}),translateY:h=DF({allowEscapeViewBox:m,coordinate:g,key:"y",offset:y,position:b,reverseDirection:x,tooltipDimension:w.height,viewBox:j,viewBoxDimension:j.height}),useTranslate3d:M}):EF,cssClasses:kF({translateX:p,translateY:h,coordinate:g})}),N=O.cssClasses,S=O.cssProperties,E=e.hasPortalFromProps?{}:AF(AF({transition:PF({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},S),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),k=AF(AF({},E),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return a.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:N,style:k,ref:e.innerRef},e.children)}var _F=a.memo(zF);function RF(e){return e}function LF(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function UF(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function YF(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const FF="[object String]",WF="[object Number]",BF="[object Boolean]",QF="[object Arguments]",qF="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof globalThis&&globalThis||function(){return this}();function GF(e,t,n,r=new Map,o=void 0){const i=o?.(e,t,n,r);if(void 0!==i)return i;if(LF(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const t=new Array(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=GF(e[i],i,n,r,o);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;r.set(e,t);for(const[i,a]of e)t.set(i,GF(a,i,n,r,o));return t}if(e instanceof Set){const t=new Set;r.set(e,t);for(const i of e)t.add(GF(i,void 0,n,r,o));return t}if(a=e,void 0!==qF.Buffer&&qF.Buffer.isBuffer(a))return e.subarray();var a;if(function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=GF(e[i],i,n,r,o);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),$F(t,e,n,r,o),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return r.set(e,t),$F(t,e,n,r,o),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return r.set(e,t),$F(t,e,n,r,o),t}if(e instanceof Error){const t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,$F(t,e,n,r,o),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return r.set(e,t),$F(t,e,n,r,o),t}if(e instanceof Number){const t=new Number(e.valueOf());return r.set(e,t),$F(t,e,n,r,o),t}if(e instanceof String){const t=new String(e.valueOf());return r.set(e,t),$F(t,e,n,r,o),t}if("object"==typeof e&&function(e){switch(YF(e)){case QF:case"[object Array]":case"[object ArrayBuffer]":case"[object DataView]":case BF:case"[object Date]":case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Map]":case WF:case"[object Object]":case"[object RegExp]":case"[object Set]":case FF:case"[object Symbol]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),$F(t,e,n,r,o),t}return e}function $F(e,t,n=e,r,o){const i=[...Object.keys(t),...UF(t)];for(let a=0;a<i.length;a++){const s=i[a],c=Object.getOwnPropertyDescriptor(e,s);(null==c||c.writable)&&(e[s]=GF(t[s],s,n,r,o))}}function HF(e,t,n){return"function"!=typeof n?HF(e,t,()=>{}):VF(e,t,function e(t,r,o,i,a,s){const c=n(t,r,o,i,a,s);return void 0!==c?Boolean(c):VF(t,r,e,s,!1)},new Map,!0)}function VF(e,t,n,r,o=!1){if(t===e)return!0;switch(typeof t){case"object":return function(e,t,n,r){if(null==t)return!0;if(Array.isArray(t))return KF(e,t,n,r);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[o,i]of t.entries())if(!1===n(e.get(o),i,o,e,t,r))return!1;return!0}(e,t,n,r);if(t instanceof Set)return function(e,t,n,r){return 0===t.size||e instanceof Set&&KF([...e],[...t],n,r)}(e,t,n,r);const o=Object.keys(t);if(null==e||LF(e))return 0===o.length;if(0===o.length)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<o.length;i++){const a=o[i];if(!LF(e)&&!(a in e))return!1;if(void 0===t[a]&&void 0!==e[a])return!1;if(null===t[a]&&null!==e[a])return!1;if(!n(e[a],t[a],a,e,t,r))return!1}return!0}finally{r?.delete(t)}}(e,t,n,r);case"function":return Object.keys(t).length>0?VF(e,{...t},n,r,o):lM(e,t);default:return dM(e)&&o?"string"!=typeof t||""===t:lM(e,t)}}function KF(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const o=new Set;for(let i=0;i<t.length;i++){const a=t[i];let s=!1;for(let c=0;c<e.length;c++){if(o.has(c))continue;let l=!1;if(n(e[c],a,i,e,t,r)&&(l=!0),l){o.add(c),s=!0;break}}if(!s)return!1}return!0}function ZF(e,t){return HF(e,t,()=>{})}function XF(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===YF(e)}function JF(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=zx(e)}return t=function(e,t){return GF(e,void 0,e,new Map,t)}(n=t,(e,t,o,i)=>{const a=r?.(e,t,o,i);if(void 0!==a)return a;if("object"==typeof n){if("[object Object]"===YF(n)&&"function"!=typeof n.constructor){const e={};return i.set(n,e),$F(e,n,o,i),e}switch(Object.prototype.toString.call(n)){case WF:case FF:case BF:{const e=new n.constructor(n?.valueOf());return $F(e,n),e}case QF:{const e={};return $F(e,n),e.length=n.length,e[Symbol.iterator]=n[Symbol.iterator],e}default:return}}}),function(n){const r=Ux(n,e);return void 0===r?function(e,t){let n;if(n=Array.isArray(t)?t:"string"==typeof t&&Px(t)&&null==e?.[t]?Lx(t):[t],0===n.length)return!1;let r=e;for(let e=0;e<n.length;e++){const t=n[e];if(!(null!=r&&Object.hasOwn(r,t)||(Array.isArray(r)||XF(r))&&pM(t)&&t<r.length))return!1;r=r[t]}return!0}(n,e):void 0===t?void 0===r:ZF(r,t)};var n,r}function eW(e){if(null==e)return RF;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?JF(e[0],e[1]):(n=GF(r=n=e,void 0,r,new Map,void 0),e=>ZF(e,n));case"string":case"symbol":case"number":return t=e,function(e){return Ux(e,t)}}var t,n,r}function tW(e,t=RF){return function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&uM(e)}(e)?function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const o=e[r],i=t(o,r,e);n.has(i)||n.set(i,o)}return Array.from(n.values())}(Array.from(e),(n=eW(t),function(...e){return n.apply(this,e.slice(0,1))})):[];var n}function nW(e,t,n){return!0===t?tW(e,n):"function"==typeof t?tW(e,t):e}function rW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oW(e,t){return Math.abs(e.height-t.height)>1||Math.abs(e.left-t.left)>1||Math.abs(e.top-t.top)>1||Math.abs(e.width-t.width)>1}function iW(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function aW(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rW(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rW(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],o=(0,a.useRef)(null),i=(0,a.useRef)(n);i.current=n;var s=(0,a.useCallback)(e=>{if(null!=o.current&&(o.current.disconnect(),o.current=null),null!=e){var t=iW(e);if(oW(t,i.current)&&r(t),"undefined"!=typeof ResizeObserver){var n=new ResizeObserver(()=>{var t=iW(e);oW(t,i.current)&&r(t)});n.observe(e),o.current=n}}},[...e]);return(0,a.useEffect)(()=>()=>{var e;null===(e=o.current)||void 0===e||e.disconnect()},[]),[n,s]}var sW=["x","y","top","left","width","height","className"];function cW(){return cW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cW.apply(null,arguments)}function lW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dW,fW,pW,hW,mW,gW,yW,vW,bW,xW,wW=(e,t,n,r,o,i)=>"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),MW=e=>{var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,i=e.top,s=void 0===i?0:i,c=e.left,l=void 0===c?0:c,u=e.width,d=void 0===u?0:u,f=e.height,p=void 0===f?0:f,h=e.className,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,sW),g=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lW(Object(n),!0).forEach(function(t){uW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:o,top:s,left:l,width:d,height:p},m);return qx(n)&&qx(o)&&qx(d)&&qx(p)&&qx(s)&&qx(l)?a.createElement("path",cW({},$z(g),{className:jc("recharts-cross",h),d:wW(n,o,d,p,s,l)})):null},jW=["radius"],OW=["radius"];function NW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NW(Object(n),!0).forEach(function(t){EW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kW(){return kW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kW.apply(null,arguments)}function DW(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function IW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function AW(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var TW=(e,t,n,r,o)=>{var i,a=Yx(n),s=Yx(r),c=Math.min(Math.abs(a)/2,Math.abs(s)/2),l=s>=0?1:-1,u=a>=0?1:-1,d=s>=0&&a>=0||s<0&&a<0?1:0;if(c>0&&Array.isArray(o)){for(var f=[0,0,0,0],p=0;p<4;p++){var h,m=null!==(h=o[p])&&void 0!==h?h:0;f[p]=m>c?c:m}i=Fx(dW||(dW=AW(["M",",",""])),e,t+l*f[0]),f[0]>0&&(i+=Fx(fW||(fW=AW(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,e+u*f[0],t)),i+=Fx(pW||(pW=AW(["L ",",",""])),e+n-u*f[1],t),f[1]>0&&(i+=Fx(hW||(hW=AW(["A ",",",",0,0,",",\n ",",",""])),f[1],f[1],d,e+n,t+l*f[1])),i+=Fx(mW||(mW=AW(["L ",",",""])),e+n,t+r-l*f[2]),f[2]>0&&(i+=Fx(gW||(gW=AW(["A ",",",",0,0,",",\n ",",",""])),f[2],f[2],d,e+n-u*f[2],t+r)),i+=Fx(yW||(yW=AW(["L ",",",""])),e+u*f[3],t+r),f[3]>0&&(i+=Fx(vW||(vW=AW(["A ",",",",0,0,",",\n ",",",""])),f[3],f[3],d,e,t+r-l*f[3])),i+="Z"}else if(c>0&&o===+o&&o>0){var g=Math.min(c,o);i=Fx(bW||(bW=AW(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+l*g,g,g,d,e+u*g,t,e+n-u*g,t,g,g,d,e+n,t+l*g,e+n,t+r-l*g,g,g,d,e+n-u*g,t+r,e+u*g,t+r,g,g,d,e,t+r-l*g)}else i=Fx(xW||(xW=AW(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return i},CW={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},PW=e=>{var t=B_(e,CW),n=(0,a.useRef)(null),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return IW(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IW(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(-1),2),o=r[0],i=r[1];(0,a.useEffect)(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&i(e)}catch(e){}},[]);var s=t.x,c=t.y,l=t.width,u=t.height,d=t.radius,f=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,g=t.isAnimationActive,y=t.isUpdateAnimationActive,v=(0,a.useRef)(l),b=(0,a.useRef)(u),x=(0,a.useRef)(s),w=(0,a.useRef)(c),M=XU((0,a.useMemo)(()=>({x:s,y:c,width:l,height:u,radius:d}),[s,c,l,u,d]),"rectangle-");if(s!==+s||c!==+c||l!==+l||u!==+u||0===l||0===u)return null;var j=jc("recharts-rectangle",f);if(!y){var O=$z(t),N=(O.radius,DW(O,jW));return a.createElement("path",kW({},N,{x:Yx(s),y:Yx(c),width:Yx(l),height:Yx(u),radius:"number"==typeof d?d:void 0,className:j,d:TW(s,c,l,u,d)}))}var S=v.current,E=b.current,k=x.current,D=w.current,I="0px ".concat(-1===o?1:o,"px"),A="".concat(o,"px ").concat(o,"px"),T=((e,t,n)=>["strokeDasharray"].map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","))(0,h,"string"==typeof p?p:CW.animationEasing);return a.createElement(ZU,{animationId:M,key:M,canBegin:o>0,duration:h,easing:p,isActive:y,begin:m},e=>{var r,o=Zx(S,l,e),i=Zx(E,u,e),f=Zx(k,s,e),p=Zx(D,c,e);n.current&&(v.current=o,b.current=i,x.current=f,w.current=p),r=g?e>0?{transition:T,strokeDasharray:A}:{strokeDasharray:I}:{strokeDasharray:A};var h=$z(t),m=(h.radius,DW(h,OW));return a.createElement("path",kW({},m,{radius:"number"==typeof d?d:void 0,className:j,d:TW(f,p,o,i,d),ref:n,style:SW(SW({},r),t.style)}))})};function zW(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[aO(t,n,r,o),aO(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function _W(e,t,n){if("horizontal"===e)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if("vertical"===e)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(cL(t)){if("centric"===e){var r=t.cx,o=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.angle,c=aO(r,o,i,s),l=aO(r,o,a,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return zW(t)}}function RW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RW(Object(n),!0).forEach(function(t){UW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YW(){return YW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YW.apply(null,arguments)}function FW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FW(Object(n),!0).forEach(function(t){BW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QW(e){var t=e.cursor,n=e.cursorComp,r=e.cursorProps;return(0,a.isValidElement)(t)?(0,a.cloneElement)(t,r):(0,a.createElement)(n,r)}function qW(e){var t,n,r,o,i=e.coordinate,s=e.payload,c=e.index,l=e.offset,u=e.tooltipAxisBandSize,d=e.layout,f=e.cursor,p=e.tooltipEventType,h=e.chartName,m=i,g=s,y=c;if(!f||!m||"ScatterChart"!==h&&"axis"!==p)return null;if("ScatterChart"===h)n=m,r=MW,o=uO.cursorLine;else if("BarChart"===h)n=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,m,l,u),r=PW,o=uO.cursorRectangle;else if("radial"===d&&cL(m)){var v=zW(m),b=v.cx,x=v.cy,w=v.radius;n={cx:b,cy:x,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:w,outerRadius:w},r=CL,o=uO.cursorLine}else n={points:_W(d,m,l)},r=EL,o=uO.cursorLine;var M="object"==typeof f&&"className"in f?f.className:void 0,j=WW(WW(WW(WW({stroke:"#ccc",pointerEvents:"none"},l),n),Gz(f)),{},{payload:g,payloadIndex:y,className:jc("recharts-tooltip-cursor",M)});return a.createElement(yY,{zIndex:null!==(t=e.zIndex)&&void 0!==t?t:o},a.createElement(QW,{cursor:f,cursorComp:r,cursorProps:j}))}function GW(e){var t,n,r,o=(t=cM(_I),n=cM(rC),r=cM(eC),GM(t&&r?LW(LW({},t),{},{scale:r}):void 0,n)),i=gj(),s=xj(),c=cM(Zj);return null==o||null==i||null==s||null==c?null:a.createElement(qW,YW({},e,{offset:i,layout:s,tooltipAxisBandSize:o,chartName:c}))}function $W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$W(Object(n),!0).forEach(function(t){VW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$W(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZW(e){return e.dataKey}var XW=[],JW={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function eB(e){var t,n,r=B_(e,JW),o=r.active,s=r.allowEscapeViewBox,c=r.animationDuration,l=r.animationEasing,u=r.content,d=r.filterNull,f=r.isAnimationActive,p=r.offset,h=r.payloadUniqBy,m=r.position,g=r.reverseDirection,y=r.useTranslate3d,v=r.wrapperStyle,b=r.cursor,x=r.shared,w=r.trigger,M=r.defaultIndex,j=r.portal,O=r.axisId,N=oM(),S="number"==typeof M?String(M):M;(0,a.useEffect)(()=>{N(Pw({shared:x,trigger:w,axisId:O,active:o,defaultIndex:S}))},[N,x,w,O,o,S]);var E=hj(),k=Uz(),D=function(e){return cM(t=>aT(t,e))}(x),I=null!==(t=cM(e=>CC(e,D,w,S)))&&void 0!==t?t:{},A=I.activeIndex,T=I.isActive,C=cM(e=>TC(e,D,w,S)),P=cM(e=>AC(e,D,w,S)),z=cM(e=>IC(e,D,w,S)),_=C,R=(0,a.useContext)(y_),L=null!==(n=null!=o?o:T)&&void 0!==n&&n,U=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return KW(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KW(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(aW([_,L]),2),Y=U[0],F=U[1],W="axis"===D?P:void 0;!function(e,t,n,r,o,i){var s=cM(n=>((e,t,n)=>{if(null!=t){var r=gT(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(n,e,t)),c=cM(dC),l=cM(eO),u=cM(Xj),d=cM(Jj),f=cM(u_),p=null!=(null==f?void 0:f.sourceViewBox),h=hj();(0,a.useEffect)(()=>{if(!p&&null!=u&&null!=l){var e=Fw({active:i,coordinate:n,dataKey:s,index:o,label:"number"==typeof r?String(r):r,sourceViewBox:h,graphicalItemId:c});s_.emit(c_,u,e,l)}},[p,n,s,c,o,r,l,u,d,i,h])}(D,w,z,W,A,L);var B=null!=j?j:R;if(null==B||null==E||null==D)return null;var Q=null!=_?_:XW;L||(Q=XW),d&&Q.length&&(Q=nW(Q.filter(e=>null!=e.value&&(!0!==e.hide||r.includeHidden)),h,ZW));var q=Q.length>0,G=HW(HW({},r),{},{payload:Q,label:W,active:L,activeIndex:A,coordinate:z,accessibilityLayer:k}),$=a.createElement(_F,{allowEscapeViewBox:s,animationDuration:c,animationEasing:l,isAnimationActive:f,active:L,coordinate:z,hasPayload:q,offset:p,position:m,reverseDirection:g,useTranslate3d:y,viewBox:E,wrapperStyle:v,lastBoundingBox:Y,innerRef:F,hasPortalFromProps:Boolean(j)},function(e,t){return a.isValidElement(e)?a.cloneElement(e,t):"function"==typeof e?a.createElement(e,t):a.createElement(NF,t)}(u,G));return a.createElement(a.Fragment,null,(0,i.createPortal)($,B),L&&a.createElement(GW,{cursor:b,tooltipEventType:D,coordinate:z,payload:Q,index:A}))}const tB={product:"#f16060",shipping:"#5895f7",bulk:"#9c74f7",bogo:"#f6ad2f",bundle:"#f68839",cart:"#44c1da",others:"#06b6fe"},nB=[{intent:"Product",revenue:0,orders:0,percentage:0},{intent:"Cart",revenue:0,orders:0,percentage:0},{intent:"Shipping",revenue:0,orders:0,percentage:0},{intent:"Bulk",revenue:0,orders:0,percentage:0},{intent:"BOGO",revenue:0,orders:0,percentage:0},{intent:"Bundle",revenue:0,orders:0,percentage:0},{intent:"Others",revenue:0,orders:0,percentage:0}];function rB(e,t){const n=e?.toLowerCase();return tB[n]??Object.values(tB)[t%Object.values(tB).length]}const oB=({active:e,payload:t})=>{if(!e||!t?.length)return null;const{name:n,value:r,payload:{color:o}}=t[0];return(0,Nl.jsxs)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-lg disco-px-2 disco-py-1 disco-text-[10px] disco-shadow disco-z-50",children:[(0,Nl.jsxs)("span",{style:{color:o},children:[n,": "]}),(0,Nl.jsxs)("strong",{children:[r,"%"]})]})},iB=({className:e})=>{const t=yv(),n=D(ds),{data:r,isLoading:o}=Ax(n),i=r,a=nB.map(e=>{const t=(i?.data??[]).find(t=>t.intent.toLowerCase()===e.intent.toLowerCase());return{name:e.intent,value:t?t.percentage:0,color:rB(e.intent)}}),s=(i?.data??[]).map((e,t)=>({name:e.intent,value:e.percentage,color:rB(e.intent,t)})),c=i?.total_revenue??0,l=c?c>=1e3?`${xl((c/1e3).toFixed(2))}k`:`${xl(c.toFixed(2))}`:"--";return(0,Nl.jsxs)(Ex,{className:bl("disco-relative disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-2",e),children:[!t&&(0,Nl.jsx)(Dv,{showIcon:!0,title:(0,vv.__)("Intent breakdown","disco"),label:(0,vv.__)("Unlock","disco")}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,vv.__)("Revenue by intent","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af]",children:(0,vv.__)("Campaign type breakdown","disco")})]}),o?(0,Nl.jsx)("div",{className:"disco-h-[200px] disco-animate-pulse disco-rounded-lg disco-bg-[#f3f4f6]"}):(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-col disco-items-center disco-gap-4",children:[(0,Nl.jsxs)("div",{className:"disco-relative disco-shrink-0",style:{width:160,height:160},children:[(0,Nl.jsx)(jw,{width:"100%",height:"100%",children:(0,Nl.jsxs)(tR,{children:[(0,Nl.jsx)(yF,{data:s,cx:"50%",cy:"50%",innerRadius:52,outerRadius:78,dataKey:"value",strokeWidth:0,paddingAngle:1,children:s.map(({name:e,color:t})=>(0,Nl.jsx)(yU,{fill:t},e))}),(0,Nl.jsx)(eB,{wrapperStyle:{zIndex:999},content:(0,Nl.jsx)(oB,{})})]})}),(0,Nl.jsxs)("div",{className:"disco-absolute disco-inset-0 disco-flex disco-flex-col disco-items-center disco-justify-center disco-pointer-events-none",children:[(0,Nl.jsx)("span",{className:"disco-text-base disco-font-bold disco-text-[#111827]",children:l}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-text-[#9ca3af]",children:(0,vv.__)("revenue","disco")})]})]}),(0,Nl.jsx)("ul",{className:"disco-w-full disco-flex disco-flex-col disco-flex-1",children:a?.map(({name:e,value:t,color:n})=>(0,Nl.jsxs)("li",{className:"disco-flex disco-items-center disco-justify-between disco-text-xs",children:[(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1.5 disco-text-[#4b5563]",children:[(0,Nl.jsx)("span",{className:"disco-size-[6px] disco-rounded-sm disco-shrink-0",style:{background:n}}),e]}),(0,Nl.jsxs)("span",{className:"disco-font-semibold disco-text-[#1f2937]",children:[t,"%"]})]},e))})]})]})};function aB(){return aB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aB.apply(null,arguments)}function sB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lB=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sB(Object(n),!0).forEach(function(t){cB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},bz),uB=(0,a.forwardRef)(function(e,t){var n,r=B_(e.categoricalChartProps,lB),o=e.chartName,i=e.defaultTooltipEventType,s=e.validateTooltipEventTypes,c=e.tooltipPayloadSearcher,l=e.categoricalChartProps,u={chartName:o,defaultTooltipEventType:i,validateTooltipEventTypes:s,tooltipPayloadSearcher:c,eventEmitter:void 0};return a.createElement(kz,{preloadedState:{options:u},reduxStoreName:null!==(n=l.id)&&void 0!==n?n:o},a.createElement(Dz,{chartData:l.data}),a.createElement(Pz,{layout:r.layout,margin:r.margin}),a.createElement(Rz,{throttleDelay:r.throttleDelay,throttledEvents:r.throttledEvents}),a.createElement(zz,{baseValue:r.baseValue,accessibilityLayer:r.accessibilityLayer,barCategoryGap:r.barCategoryGap,maxBarSize:r.maxBarSize,stackOffset:r.stackOffset,barGap:r.barGap,barSize:r.barSize,syncId:r.syncId,syncMethod:r.syncMethod,className:r.className,reverseStackOrder:r.reverseStackOrder}),a.createElement(Y_,aB({},r,{ref:t})))}),dB=["axis"],fB=(0,a.forwardRef)((e,t)=>a.createElement(uB,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:dB,tooltipPayloadSearcher:Ow,categoricalChartProps:e,ref:t}));function pB(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var o=e[r];void 0!==o&&n.push(o)}return n}function hB(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function mB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mB(Object(n),!0).forEach(function(t){yB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vB(e,t,n){var r,o=e.tick,i=e.ticks,a=e.viewBox,s=e.minTickGap,c=e.orientation,l=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!i||!i.length||!o)return[];if(qx(l)||az)return null!==(r=function(e,t){return pB(e,t+1)}(i,qx(l)?l:0))&&void 0!==r?r:[];var p=[],h="top"===c||"bottom"===c?"width":"height",m=d&&"width"===h?FL(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=(e,r)=>{var o="function"==typeof u?u(e.value,r):e.value;return"width"===h?function(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,i=Math.atan(n/t),a=o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}(FL(o,{fontSize:t,letterSpacing:n}),m,f):FL(o,{fontSize:t,letterSpacing:n})[h]},y=i[0],v=i[1],b=i.length>=2&&null!=y&&null!=v?Wx(v.coordinate-y.coordinate):1,x=function(e,t,n){var r="width"===n,o=e.x,i=e.y,a=e.width,s=e.height;return 1===t?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}(a,b,h);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),s=t.start,c=t.end,l=0,u=1,d=s,f=function(){var t=null==r?void 0:r[l];if(void 0===t)return{v:pB(r,u)};var i,a=l,f=()=>(void 0===i&&(i=n(t,a)),i),p=t.coordinate,h=0===l||hB(e,p,f,d,c);h||(l=0,d=s,u+=1),h&&(d=p+e*(f()/2+o),l+=u)};u<=a.length;)if(i=f())return i.v;return[]}(b,x,g,i,s):"equidistantPreserveEnd"===l?function(e,t,n,r,o){var i=(r||[]).slice().length;if(0===i)return[];for(var a=t.start,s=t.end,c=1;c<=i;c++){for(var l,u=(i-1)%c,d=a,f=!0,p=function(){var t=r[h];if(null==t)return 0;var i,a=h,c=()=>(void 0===i&&(i=n(t,a)),i),l=t.coordinate,p=h===u||hB(e,l,c,d,s);if(!p)return f=!1,1;p&&(d=l+e*(c()/2+o))},h=u;h<i&&(0===(l=p())||1!==l);h+=c);if(f){for(var m=[],g=u;g<i;g+=c){var y=r[g];null!=y&&m.push(y)}return m}}return[]}(b,x,g,i,s):(p="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,c=t.start,l=t.end;if(i){var u=r[s-1];if(null!=u){var d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);a[s-1]=u=gB(gB({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),null!=u.tickCoord&&hB(e,u.tickCoord,()=>d,c,l)&&(l=u.tickCoord-e*(d/2+o),a[s-1]=gB(gB({},u),{},{isShow:!0}))}}for(var p=i?s-1:s,h=function(t){var r=a[t];if(null==r)return 1;var i,s=r,u=()=>(void 0===i&&(i=n(r,t)),i);if(0===t){var d=e*(s.coordinate-e*u()/2-c);a[t]=s=gB(gB({},s),{},{tickCoord:d<0?s.coordinate-d*e:s.coordinate})}else a[t]=s=gB(gB({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&hB(e,s.tickCoord,u,c,l)&&(c=s.tickCoord+e*(u()/2+o),a[t]=gB(gB({},s),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(b,x,g,i,s,"preserveStartEnd"===l):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,s=t.start,c=t.end,l=function(t){var r=i[t];if(null==r)return 1;var l,u=r,d=()=>(void 0===l&&(l=n(r,t)),l);if(t===a-1){var f=e*(u.coordinate+e*d()/2-c);i[t]=u=gB(gB({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate})}else i[t]=u=gB(gB({},u),{},{tickCoord:u.coordinate});null!=u.tickCoord&&hB(e,u.tickCoord,d,s,c)&&(c=u.tickCoord-e*(d()/2+o),i[t]=gB(gB({},u),{},{isShow:!0}))},u=a-1;u>=0;u--)l(u);return i}(b,x,g,i,s),p.filter(e=>e.isShow))}var bB=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function xB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wB(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wB(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MB(){return MB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MB.apply(null,arguments)}function jB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jB(Object(n),!0).forEach(function(t){NB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SB={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:uO.axis};function EB(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.orientation,s=e.mirror,c=e.axisLine,l=e.otherSvgProps;if(!c)return null;var u=OB(OB(OB({},l),qz(c)),{},{fill:"none"});if("top"===i||"bottom"===i){var d=+("top"===i&&!s||"bottom"===i&&s);u=OB(OB({},u),{},{x1:t,y1:n+d*o,x2:t+r,y2:n+d*o})}else{var f=+("left"===i&&!s||"right"===i&&s);u=OB(OB({},u),{},{x1:t+f*r,y1:n,x2:t+f*r,y2:n+o})}return a.createElement("line",MB({},u,{className:jc("recharts-cartesian-axis-line",Ux(c,"className"))}))}function kB(e){var t,n=e.option,r=e.tickProps,o=e.value,i=jc(r.className,"recharts-cartesian-axis-tick-value");if(a.isValidElement(n))t=a.cloneElement(n,OB(OB({},r),{},{className:i}));else if("function"==typeof n)t=n(OB(OB({},r),{},{className:i}));else{var s="recharts-cartesian-axis-tick-value";"boolean"!=typeof n&&(s=jc(s,HY(n))),t=a.createElement(gU,MB({},r,{className:s}),o)}return t}function DB(e){var t=e.ticks,n=e.axisType,r=e.axisId,o=oM();return(0,a.useEffect)(()=>{if(null==r||null==n)return nw;var e=t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index}));return o(Nz({ticks:e,axisId:r,axisType:n})),()=>{o(Sz({axisId:r,axisType:n}))}},[o,t,r,n]),null}var IB=(0,a.forwardRef)((e,t)=>{var n=e.ticks,r=void 0===n?[]:n,o=e.tick,i=e.tickLine,s=e.stroke,c=e.tickFormatter,l=e.unit,u=e.padding,d=e.tickTextProps,f=e.orientation,p=e.mirror,h=e.x,m=e.y,g=e.width,y=e.height,v=e.tickSize,b=e.tickMargin,x=e.fontSize,w=e.letterSpacing,M=e.getTicksConfig,j=e.events,O=e.axisType,N=e.axisId,S=vB(OB(OB({},M),{},{ticks:r}),x,w),E=qz(M),k=Gz(o),D=lU(E.textAnchor)?E.textAnchor:function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(f,p),I=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(f,p),A={};"object"==typeof i&&(A=i);var T=OB(OB({},E),{},{fill:"none"},A),C=S.map(e=>OB({entry:e},function(e,t,n,r,o,i,a,s,c){var l,u,d,f,p,h,m=s?-1:1,g=e.tickSize||a,y=qx(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":l=u=e.coordinate,h=(d=(f=n+ +!s*o)-m*g)-m*c,p=y;break;case"left":d=f=e.coordinate,p=(l=(u=t+ +!s*r)-m*g)-m*c,h=y;break;case"right":d=f=e.coordinate,p=(l=(u=t+ +s*r)+m*g)+m*c,h=y;break;default:l=u=e.coordinate,h=(d=(f=n+ +s*o)+m*g)+m*c,p=y}return{line:{x1:l,y1:d,x2:u,y2:f},tick:{x:p,y:h}}}(e,h,m,g,y,f,v,p,b))),P=C.map(e=>{var t=e.entry,n=e.line;return a.createElement(NR,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},i&&a.createElement("line",MB({},T,n,{className:jc("recharts-cartesian-axis-tick-line",Ux(i,"className"))})))}),z=C.map((e,t)=>{var n,r,i=e.entry,f=e.tick,p=OB(OB(OB(OB({verticalAnchor:I},E),{},{textAnchor:D,stroke:"none",fill:s},f),{},{index:t,payload:i,visibleTicksCount:S.length,tickFormatter:c,padding:u},d),{},{angle:null!==(n=null!==(r=null==d?void 0:d.angle)&&void 0!==r?r:E.angle)&&void 0!==n?n:0}),h=OB(OB({},p),k);return a.createElement(NR,MB({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(i.value,"-").concat(i.coordinate,"-").concat(i.tickCoord)},uL(j,i,t)),o&&a.createElement(kB,{option:o,tickProps:h,value:"".concat("function"==typeof c?c(i.value,t):i.value).concat(l||"")}))});return a.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(O,"-ticks")},a.createElement(DB,{ticks:S,axisId:N,axisType:O}),z.length>0&&a.createElement(yY,{zIndex:uO.label},a.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(O,"-tick-labels"),ref:t},z)),P.length>0&&a.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(O,"-tick-lines")},P))}),AB=(0,a.forwardRef)((e,t)=>{var n=e.axisLine,r=e.width,o=e.height,i=e.className,s=e.hide,c=e.ticks,l=e.axisType,u=e.axisId,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,bB),f=xB((0,a.useState)(""),2),p=f[0],h=f[1],m=xB((0,a.useState)(""),2),g=m[0],y=m[1],v=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>{var t;return(e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,o=void 0===r?5:r,i=e.tickSize,a=void 0===i?0:i,s=e.tickMargin,c=void 0===s?0:s,l=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>l&&(l=t.width)}});var u=n?n.getBoundingClientRect().width:0,d=l+(a+c)+u+(n?o:0);return Math.round(d)}return 0})({ticks:v.current,label:null===(t=e.labelRef)||void 0===t?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var b=(0,a.useCallback)(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),o=r.fontSize,i=r.letterSpacing;o===p&&i===g||(h(o),y(i))}}},[p,g]);return s||null!=r&&r<=0||null!=o&&o<=0?null:a.createElement(yY,{zIndex:e.zIndex},a.createElement(NR,{className:jc("recharts-cartesian-axis",i)},a.createElement(EB,{x:e.x,y:e.y,width:r,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:qz(e)}),a.createElement(IB,{ref:b,axisType:l,events:d,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:g,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),a.createElement(DY,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},a.createElement(_Y,{label:e.label,labelRef:e.labelRef}),e.children)))}),TB=a.forwardRef((e,t)=>{var n=B_(e,SB);return a.createElement(AB,MB({},n,{ref:t}))});TB.displayName="CartesianAxis";var CB=["x1","y1","x2","y2","key"],PB=["offset"],zB=["xAxisId","yAxisId"],_B=["xAxisId","yAxisId"];function RB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RB(Object(n),!0).forEach(function(t){UB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YB(){return YB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YB.apply(null,arguments)}function FB(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var WB=e=>{var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,r=e.x,o=e.y,i=e.width,s=e.height,c=e.ry;return a.createElement("rect",{x:r,y:o,ry:c,width:i,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function BB(e){var t,n=e.option,r=e.lineItemProps;if(a.isValidElement(n))t=a.cloneElement(n,r);else if("function"==typeof n)t=n(r);else{var o,i=r.x1,s=r.y1,c=r.x2,l=r.y2,u=r.key,d=null!==(o=qz(FB(r,CB)))&&void 0!==o?o:{},f=(d.offset,FB(d,PB));t=a.createElement("line",YB({},f,{x1:i,y1:s,x2:c,y2:l,fill:"none",key:u}))}return t}function QB(e){var t=e.x,n=e.width,r=e.horizontal,o=void 0===r||r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;e.xAxisId,e.yAxisId;var s=FB(e,zB),c=i.map((e,r)=>{var i=LB(LB({},s),{},{x1:t,y1:e,x2:t+n,y2:e,key:"line-".concat(r),index:r});return a.createElement(BB,{key:"line-".concat(r),option:o,lineItemProps:i})});return a.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function qB(e){var t=e.y,n=e.height,r=e.vertical,o=void 0===r||r,i=e.verticalPoints;if(!o||!i||!i.length)return null;e.xAxisId,e.yAxisId;var s=FB(e,_B),c=i.map((e,r)=>{var i=LB(LB({},s),{},{x1:e,y1:t,x2:e,y2:t+n,key:"line-".concat(r),index:r});return a.createElement(BB,{option:o,lineItemProps:i,key:"line-".concat(r)})});return a.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function GB(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,s=e.height,c=e.horizontalPoints,l=e.horizontal;if(void 0!==l&&!l||!t||!t.length||null==c)return null;var u=c.map(e=>Math.round(e+o-o)).sort((e,t)=>e-t);o!==u[0]&&u.unshift(0);var d=u.map((e,c)=>{var l=u[c+1],d=null==l?o+s-e:l-e;if(d<=0)return null;var f=c%t.length;return a.createElement("rect",{key:"react-".concat(c),y:e,x:r,height:d,width:i,stroke:"none",fill:t[f],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return a.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function $B(e){var t=e.vertical,n=void 0===t||t,r=e.verticalFill,o=e.fillOpacity,i=e.x,s=e.y,c=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==d[0]&&d.unshift(0);var f=d.map((e,t)=>{var n=d[t+1],u=null==n?i+c-e:n-e;if(u<=0)return null;var f=t%r.length;return a.createElement("rect",{key:"react-".concat(t),x:e,y:s,width:u,height:l,stroke:"none",fill:r[f],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return a.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var HB=(e,t)=>{var n=e.xAxis,r=e.width,o=e.height,i=e.offset;return UM(vB(LB(LB(LB({},SB),n),{},{ticks:YM(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},VB=(e,t)=>{var n=e.yAxis,r=e.width,o=e.height,i=e.offset;return UM(vB(LB(LB(LB({},SB),n),{},{ticks:YM(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},KB={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:uO.grid};function ZB(e){var t=yj(),n=vj(),r=gj(),o=LB(LB({},B_(e,KB)),{},{x:qx(e.x)?e.x:r.left,y:qx(e.y)?e.y:r.top,width:qx(e.width)?e.width:r.width,height:qx(e.height)?e.height:r.height}),i=o.xAxisId,s=o.yAxisId,c=o.x,l=o.y,u=o.width,d=o.height,f=o.syncWithTicks,p=o.horizontalValues,h=o.verticalValues,m=uj(),g=cM(e=>KA(e,"xAxis",i,m)),y=cM(e=>KA(e,"yAxis",s,m));if(!(fw(u)&&fw(d)&&qx(c)&&qx(l)))return null;var v=o.verticalCoordinatesGenerator||HB,b=o.horizontalCoordinatesGenerator||VB,x=o.horizontalPoints,w=o.verticalPoints;if(!(x&&x.length||"function"!=typeof b)){var M=p&&p.length,j=b({yAxis:y?LB(LB({},y),{},{ticks:M?p:y.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:r},!!M||f);rw(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof j,"]")),Array.isArray(j)&&(x=j)}if(!(w&&w.length||"function"!=typeof v)){var O=h&&h.length,N=v({xAxis:g?LB(LB({},g),{},{ticks:O?h:g.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:r},!!O||f);rw(Array.isArray(N),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(w=N)}return a.createElement(yY,{zIndex:o.zIndex},a.createElement("g",{className:"recharts-cartesian-grid"},a.createElement(WB,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),a.createElement(GB,YB({},o,{horizontalPoints:x})),a.createElement($B,YB({},o,{verticalPoints:w})),a.createElement(QB,YB({},o,{offset:r,horizontalPoints:x,xAxis:g,yAxis:y})),a.createElement(qB,YB({},o,{offset:r,verticalPoints:w,xAxis:g,yAxis:y}))))}ZB.displayName="CartesianGrid";var XB=["domain","range"],JB=["domain","range"];function eQ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tQ(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&e[0]===t[0]&&e[1]===t[1]}function nQ(e,t){if(e===t)return!0;var n=e.domain,r=e.range,o=eQ(e,XB),i=t.domain,a=t.range,s=eQ(t,JB);return!!tQ(n,i)&&!!tQ(r,a)&&Tz(o,s)}var rQ=["type"],oQ=["dangerouslySetInnerHTML","ticks","scale"],iQ=["id","scale"];function aQ(){return aQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aQ.apply(null,arguments)}function sQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sQ(Object(n),!0).forEach(function(t){lQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lQ(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uQ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function dQ(e){var t=oM(),n=(0,a.useRef)(null),r=wj(),o=e.type,i=uQ(e,rQ),s=fO(r,"xAxis",o),c=(0,a.useMemo)(()=>{if(null!=s)return cQ(cQ({},i),{},{type:s})},[i,s]);return(0,a.useLayoutEffect)(()=>{null!=c&&(null===n.current?t(VC(c)):n.current!==c&&t(KC({prev:n.current,next:c})),n.current=c)},[c,t]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(ZC(n.current)),n.current=null)},[t]),null}var fQ=e=>{var t=e.xAxisId,n=e.className,r=cM(cj),o=uj(),i="xAxis",s=cM(e=>ZA(e,i,t,o)),c=cM(e=>WA(e,t)),l=cM(e=>qA(e,t)),u=cM(e=>oI(e,t));if(null==c||null==l||null==u)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var d=uQ(e,oQ),f=(u.id,u.scale,uQ(u,iQ));return a.createElement(TB,aQ({},d,f,{x:l.x,y:l.y,width:c.width,height:c.height,className:jc("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:s,axisType:i,axisId:t}))},pQ={allowDataOverflow:rI.allowDataOverflow,allowDecimals:rI.allowDecimals,allowDuplicatedCategory:rI.allowDuplicatedCategory,angle:rI.angle,axisLine:SB.axisLine,height:rI.height,hide:!1,includeHidden:rI.includeHidden,interval:rI.interval,label:!1,minTickGap:rI.minTickGap,mirror:rI.mirror,orientation:rI.orientation,padding:rI.padding,reversed:rI.reversed,scale:rI.scale,tick:rI.tick,tickCount:rI.tickCount,tickLine:SB.tickLine,tickSize:SB.tickSize,type:rI.type,niceTicks:rI.niceTicks,xAxisId:0},hQ=e=>{var t=B_(e,pQ);return a.createElement(a.Fragment,null,a.createElement(dQ,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),a.createElement(fQ,t))},mQ=a.memo(hQ,nQ);mQ.displayName="XAxis";var gQ=["type"],yQ=["dangerouslySetInnerHTML","ticks","scale"],vQ=["id","scale"];function bQ(){return bQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bQ.apply(null,arguments)}function xQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xQ(Object(n),!0).forEach(function(t){MQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MQ(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jQ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function OQ(e){var t=oM(),n=(0,a.useRef)(null),r=wj(),o=e.type,i=jQ(e,gQ),s=fO(r,"yAxis",o),c=(0,a.useMemo)(()=>{if(null!=s)return wQ(wQ({},i),{},{type:s})},[s,i]);return(0,a.useLayoutEffect)(()=>{null!=c&&(null===n.current?t(XC(c)):n.current!==c&&t(JC({prev:n.current,next:c})),n.current=c)},[c,t]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(eP(n.current)),n.current=null)},[t]),null}function NQ(e){var t=e.yAxisId,n=e.className,r=e.width,o=e.label,i=(0,a.useRef)(null),s=(0,a.useRef)(null),c=cM(cj),l=uj(),u=oM(),d="yAxis",f=cM(e=>$A(e,t)),p=cM(e=>GA(e,t)),h=cM(e=>ZA(e,d,t,l)),m=cM(e=>sI(e,t));if((0,a.useLayoutEffect)(()=>{if("auto"===r&&f&&!TY(o)&&!(0,a.isValidElement)(o)&&null!=m){var e=i.current;if(e){var n=e.getCalculatedWidth();Math.round(f.width)!==Math.round(n)&&u(tP({id:t,width:n}))}}},[h,f,u,o,t,r,m]),null==f||null==p||null==m)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var g=jQ(e,yQ),y=(m.id,m.scale,jQ(m,vQ));return a.createElement(TB,bQ({},g,y,{ref:i,labelRef:s,x:p.x,y:p.y,tickTextProps:"auto"===r?{width:void 0}:{width:r},width:f.width,height:f.height,className:jc("recharts-".concat(d," ").concat(d),n),viewBox:c,ticks:h,axisType:d,axisId:t}))}var SQ={allowDataOverflow:aI.allowDataOverflow,allowDecimals:aI.allowDecimals,allowDuplicatedCategory:aI.allowDuplicatedCategory,angle:aI.angle,axisLine:SB.axisLine,hide:!1,includeHidden:aI.includeHidden,interval:aI.interval,label:!1,minTickGap:aI.minTickGap,mirror:aI.mirror,orientation:aI.orientation,padding:aI.padding,reversed:aI.reversed,scale:aI.scale,tick:aI.tick,tickCount:aI.tickCount,tickLine:SB.tickLine,tickSize:SB.tickSize,type:aI.type,niceTicks:aI.niceTicks,width:aI.width,yAxisId:0},EQ=e=>{var t=B_(e,SQ);return a.createElement(a.Fragment,null,a.createElement(OQ,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),a.createElement(NQ,t))},kQ=a.memo(EQ,nQ);kQ.displayName="YAxis",Math.abs,Math.atan2;const DQ=Math.cos,IQ=(Math.max,Math.min,Math.sin),AQ=Math.sqrt,TQ=Math.PI,CQ=2*TQ,PQ={draw(e,t){const n=AQ(t/TQ);e.moveTo(n,0),e.arc(0,0,n,0,CQ)}},zQ={draw(e,t){const n=AQ(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},_Q=AQ(1/3),RQ=2*_Q,LQ={draw(e,t){const n=AQ(t/RQ),r=n*_Q;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},UQ={draw(e,t){const n=AQ(t),r=-n/2;e.rect(r,r,n,n)}},YQ=IQ(TQ/10)/IQ(7*TQ/10),FQ=IQ(CQ/10)*YQ,WQ=-DQ(CQ/10)*YQ,BQ={draw(e,t){const n=AQ(.8908130915292852*t),r=FQ*n,o=WQ*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=CQ*t/5,a=DQ(i),s=IQ(i);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*o,s*r+a*o)}e.closePath()}},QQ=AQ(3),qQ={draw(e,t){const n=-AQ(t/(3*QQ));e.moveTo(0,2*n),e.lineTo(-QQ*n,-n),e.lineTo(QQ*n,-n),e.closePath()}},GQ=-.5,$Q=AQ(3)/2,HQ=1/AQ(12),VQ=3*(HQ/2+1),KQ={draw(e,t){const n=AQ(t/VQ),r=n/2,o=n*HQ,i=r,a=n*HQ+n,s=-i,c=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,c),e.lineTo(GQ*r-$Q*o,$Q*r+GQ*o),e.lineTo(GQ*i-$Q*a,$Q*i+GQ*a),e.lineTo(GQ*s-$Q*c,$Q*s+GQ*c),e.lineTo(GQ*r+$Q*o,GQ*o-$Q*r),e.lineTo(GQ*i+$Q*a,GQ*a-$Q*i),e.lineTo(GQ*s+$Q*c,GQ*c-$Q*s),e.closePath()}};var ZQ=["type","size","sizeType"];function XQ(){return XQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XQ.apply(null,arguments)}function JQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JQ(Object(n),!0).forEach(function(t){tq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nq={symbolCircle:PQ,symbolCross:zQ,symbolDiamond:LQ,symbolSquare:UQ,symbolStar:BQ,symbolTriangle:qQ,symbolWye:KQ},rq=Math.PI/180,oq=e=>{var t=e.type,n=void 0===t?"circle":t,r=e.size,o=void 0===r?64:r,i=e.sizeType,s=void 0===i?"area":i,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ZQ),l=eq(eq({},c),{},{type:n,size:o,sizeType:s}),u="circle";"string"==typeof n&&(u=n);var d=l.className,f=l.cx,p=l.cy,h=$z(l);return qx(f)&&qx(p)&&qx(o)?a.createElement("path",XQ({},h,{className:jc("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:(()=>{var e=(e=>{var t="symbol".concat(ew(e));return nq[t]||PQ})(u),t=function(e,t){let n=null,r=rL(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:kM(e||PQ),t="function"==typeof t?t:kM(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:kM(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:kM(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*rq;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(o,s,u)),n=t();if(null!==n)return n})()})):null};function iq(){return iq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iq.apply(null,arguments)}function aq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aq(Object(n),!0).forEach(function(t){cq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}oq.registerSymbol=(e,t)=>{nq["symbol".concat(ew(e))]=t};var lq=32,uq={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function dq(e){if("object"==typeof e&&null!==e&&"strokeDasharray"in e)return String(e.strokeDasharray)}function fq(e){var t=e.data,n=e.iconType,r=e.inactiveColor,o=16,i=lq/6,s=lq/3,c=t.inactive?r:t.color,l=null!=n?n:t.type;if("none"===l)return null;if("plainline"===l)return a.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:dq(t.payload),x1:0,y1:o,x2:lq,y2:o,className:"recharts-legend-icon"});if("line"===l)return a.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(o,"h").concat(s,"\n A").concat(i,",").concat(i,",0,1,1,").concat(2*s,",").concat(o,"\n H").concat(lq,"M").concat(2*s,",").concat(o,"\n A").concat(i,",").concat(i,",0,1,1,").concat(s,",").concat(o),className:"recharts-legend-icon"});if("rect"===l)return a.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(4,"h").concat(lq,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(a.isValidElement(t.legendIcon)){var u=sq({},t);return delete u.legendIcon,a.cloneElement(t.legendIcon,u)}return a.createElement(oq,{fill:c,cx:o,cy:o,size:lq,sizeType:"diameter",type:l})}function pq(e){var t=e.payload,n=e.iconSize,r=e.layout,o=e.formatter,i=e.inactiveColor,s=e.iconType,c=e.labelStyle,l={x:0,y:0,width:lq,height:lq},u={display:"horizontal"===r?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((t,r)=>{var f=t.formatter||o,p=jc({"recharts-legend-item":!0,["legend-item-".concat(r)]:!0,inactive:t.inactive});if("none"===t.type)return null;var h="object"==typeof c?sq({},c):{};h.color=t.inactive?i:h.color||t.color;var m=f?f(t.value,t,r):t.value;return a.createElement("li",iq({className:p,style:u,key:"legend-item-".concat(r)},uL(e,t,r)),a.createElement(Kz,{width:n,height:n,viewBox:l,style:d,"aria-label":null==t.value?"legend icon":"".concat(t.value," legend icon")},a.createElement(fq,{data:t,iconType:s,inactiveColor:i})),a.createElement("span",{className:"recharts-legend-item-text",style:h},m))})}var hq=e=>{var t=B_(e,uq),n=t.payload,r=t.layout,o=t.align;if(!n||!n.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?o:"left"};return a.createElement("ul",{className:"recharts-default-legend",style:i},a.createElement(pq,iq({},t,{payload:n})))},mq=["contextPayload"];function gq(){return gq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gq.apply(null,arguments)}function yq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vq(Object(n),!0).forEach(function(t){xq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wq(e){return e.value}function Mq(e){var t=e.contextPayload,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mq),r=nW(t,e.payloadUniqBy,wq),o=bq(bq({},n),{},{payload:r});return a.isValidElement(e.content)?a.cloneElement(e.content,o):"function"==typeof e.content?a.createElement(e.content,o):a.createElement(hq,o)}function jq(e){var t=e.align,n=e.layout,r=e.verticalAlign,o=e.itemSorter,i=oM();return(0,a.useLayoutEffect)(()=>{i(wP({align:t,layout:n,verticalAlign:r,itemSorter:o}))},[i,t,n,r,o]),null}function Oq(e){var t=e.width,n=e.height,r=oM();return(0,a.useLayoutEffect)(()=>{r(xP({width:t,height:n}))},[r,t,n]),(0,a.useLayoutEffect)(()=>()=>{r(xP({width:0,height:0}))},[r]),null}var Nq={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",labelStyle:{},layout:"horizontal",verticalAlign:"bottom"};function Sq(e){var t=B_(e,Nq),n=cM(MM),r=(0,a.useContext)(v_),o=cM(e=>e.layout.margin),s=t.width,c=t.height,l=t.wrapperStyle,u=t.portal,d=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yq(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yq(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(aW([n]),2),f=d[0],p=d[1],h=yj(),m=vj();if(null==h||null==m)return null;var g=h-((null==o?void 0:o.left)||0)-((null==o?void 0:o.right)||0),y=function(e,t,n,r){return"vertical"===e&&null!=t?{height:t}:"horizontal"===e?{width:n||r}:null}(t.layout,c,s,g),v=u?l:bq(bq({position:"absolute",width:(null==y?void 0:y.width)||s||"auto",height:(null==y?void 0:y.height)||c||"auto"},function(e,t,n,r,o,i){var a,s,c=t.layout,l=t.align,u=t.verticalAlign;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(a="center"===l&&"vertical"===c?{left:((r||0)-i.width)/2}:"right"===l?{right:n&&n.right||0}:{left:n&&n.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(s="middle"===u?{top:((o||0)-i.height)/2}:"bottom"===u?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),bq(bq({},a),s)}(l,t,o,h,m,f)),l),b=null!=u?u:r;if(null==b||null==n)return null;var x=a.createElement("div",{className:"recharts-legend-wrapper",style:v,ref:p},a.createElement(jq,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!u&&a.createElement(Oq,{width:f.width,height:f.height}),a.createElement(Mq,gq({},t,y,{margin:o,chartWidth:h,chartHeight:m,contextPayload:n})));return(0,i.createPortal)(x,b)}var Eq=a.memo(Sq,Tz);Eq.displayName="Legend";var kq=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function Dq(){return Dq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dq.apply(null,arguments)}function Iq(e,t){return"".concat(t,"px ").concat(e,"px")}function Aq(e,t){for(var n=[],r=0;r<t;++r)n.push(...e);return n}function Tq(){return Tq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tq.apply(null,arguments)}var Cq=e=>{var t=e.cx,n=e.cy,r=e.r,o=jc("recharts-dot",e.className);return qx(t)&&qx(n)&&qx(r)?a.createElement("circle",Tq({},qz(e),lL(e),{className:o,cx:t,cy:n,r})):null},Pq=["points"];function zq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zq(Object(n),!0).forEach(function(t){Rq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lq(){return Lq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lq.apply(null,arguments)}function Uq(e){var t=e.option,n=e.dotProps,r=e.className;if((0,a.isValidElement)(t))return(0,a.cloneElement)(t,n);if("function"==typeof t)return t(n);var o=jc(r,"boolean"!=typeof t?t.className:""),i=null!=n?n:{},s=(i.points,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,Pq));return a.createElement(Cq,Lq({},s,{className:o}))}function Yq(e){var t=e.points,n=e.dot,r=e.className,o=e.dotClassName,i=e.dataKey,s=e.baseProps,c=e.needClip,l=e.clipPathId,u=e.zIndex,d=void 0===u?uO.scatter:u;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(t,n))return null;var f,p=OU(n),h=null==(f=n)?null:(0,a.isValidElement)(f)?$z(f.props):"object"!=typeof f||Array.isArray(f)?null:$z(f),m=t.map((e,r)=>{var c,l,u=_q(_q(_q({r:3},s),h),{},{index:r,cx:null!==(c=e.x)&&void 0!==c?c:void 0,cy:null!==(l=e.y)&&void 0!==l?l:void 0,dataKey:i,value:e.value,payload:e.payload,points:t});return a.createElement(Uq,{key:"dot-".concat(r),option:n,dotProps:u,className:o})}),g={};return c&&null!=l&&(g.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(l,")")),a.createElement(yY,{zIndex:d},a.createElement(NR,Lq({className:r},g),m))}function Fq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fq(Object(n),!0).forEach(function(t){Bq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qq=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,o=e.activeDot,i=e.dataKey,s=e.clipPath;if(!1===o||null==t.x||null==t.y)return null;var c,l=Wq(Wq(Wq({},{index:n,dataKey:i,cx:t.x,cy:t.y,r:4,fill:null!=r?r:"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value}),Gz(o)),lL(o));return c=(0,a.isValidElement)(o)?(0,a.cloneElement)(o,l):"function"==typeof o?o(l):a.createElement(Cq,l),a.createElement(NR,{className:"recharts-active-dot",clipPath:s},c)};function qq(e){var t=e.points,n=e.mainColor,r=e.activeDot,o=e.itemDataKey,i=e.clipPath,s=e.zIndex,c=void 0===s?uO.activeDot:s,l=cM(cC),u=cM(yC);if(null==t||null==u)return null;var d=t.find(e=>u.includes(e.payload));return Jx(d)?null:a.createElement(yY,{zIndex:c},a.createElement(Qq,{point:d,childIndex:Number(l),mainColor:n,dataKey:o,activeDot:r,clipPath:i}))}var Gq=["children"],$q={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Hq=(0,a.createContext)($q);function Vq(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Gq);return a.createElement(Hq.Provider,{value:n},t)}function Kq(e,t){var n,r,o=cM(t=>iI(t,e)),i=cM(e=>cI(e,t)),a=null!==(n=null==o?void 0:o.allowDataOverflow)&&void 0!==n?n:rI.allowDataOverflow,s=null!==(r=null==i?void 0:i.allowDataOverflow)&&void 0!==r?r:aI.allowDataOverflow;return{needClip:a||s,needClipX:a,needClipY:s}}function Zq(e){var t=e.xAxisId,n=e.yAxisId,r=e.clipPathId,o=P_(),i=Kq(t,n),s=i.needClipX,c=i.needClipY,l=i.needClip,u=cM(e=>EA(e,t,!1)),d=cM(e=>kA(e,n,!1));if(!l||!o)return null;var f=o.x,p=o.y,h=o.width,m=o.height,g=s&&u?Math.min(u[0],u[1]):f-h/2,y=c&&d?Math.min(d[0],d[1]):p-m/2,v=s&&u?Math.abs(u[1]-u[0]):2*h,b=c&&d?Math.abs(d[1]-d[0]):2*m;return a.createElement("clipPath",{id:"clipPath-".concat(r)},a.createElement("rect",{x:g,y,width:v,height:b}))}var Xq=(e,t,n,r)=>JA(e,"xAxis",t,r),Jq=(e,t,n,r)=>XA(e,"xAxis",t,r),eG=(e,t,n,r)=>JA(e,"yAxis",n,r),tG=(e,t,n,r)=>XA(e,"yAxis",n,r),nG=Do([bj,Xq,eG,Jq,tG],(e,t,n,r,o)=>LM(e,"xAxis")?GM(t,r,!1):GM(n,o,!1));function rG(e){return"line"===e.type}var oG=Do([mI,(e,t,n,r,o)=>o],(e,t)=>e.filter(rG).find(e=>e.id===t)),iG=Do([bj,Xq,eG,Jq,tG,oG,nG,kj],(e,t,n,r,o,i,a,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(null!=i&&null!=t&&null!=n&&null!=r&&null!=o&&0!==r.length&&0!==o.length&&null!=a&&("horizontal"===e||"vertical"===e)){var d,f=i.dataKey,p=i.data;if(null!=(d=null!=p&&p.length>0?p:null==c?void 0:c.slice(l,u+1)))return function(e){var t=e.layout,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,s=e.bandSize;return e.displayedData.map((e,c)=>{var l=RM(e,a);if("horizontal"===t){var _x=BM({axis:n,ticks:o,bandSize:s,entry:e,index:c}),u=Jx(l)?null:r.scale.map(l);return{x:_x,y:null!=u?u:null,value:l,payload:e}}var d=Jx(l)?null:n.scale.map(l),f=BM({axis:r,ticks:i,bandSize:s,entry:e,index:c});return null==d||null==f?null:{x:d,y:f,value:l,payload:e}}).filter(Boolean)}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:o,dataKey:f,bandSize:a,displayedData:d})}}),aG=["id"],sG=["type","layout","connectNulls","needClip","shape","strokeDasharray"],cG=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function lG(){return lG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lG.apply(null,arguments)}function uG(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function dG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dG(Object(n),!0).forEach(function(t){pG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pG(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hG={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:(e,t)=>{if(null==e)return[];if(1===t)return e.flatMap(e=>"removed"===e.status?[]:[e.next]);var n=function(e){var t=0,n=0;for(var r of e)"matched"===r.status&&null!=r.prev.x&&null!=r.next.x&&(t+=r.next.x-r.prev.x,n++);return n>0?t/n:0}(e),r=[];for(var o of e)if("matched"===o.status)r.push(fG(fG({},o.next),{},{x:Zx(o.prev.x,o.next.x,t),y:Zx(o.prev.y,o.next.y,t)}));else if("added"===o.status)if(null!=o.next.x){var i=o.next.x-n;r.push(fG(fG({},o.next),{},{x:Zx(i,o.next.x,t),y:o.next.y}))}else r.push(o.next);else if("removed"===o.status&&null!=o.prev.x){var a=o.prev.x+n;r.push(fG(fG({},o.prev),{},{x:Zx(o.prev.x,a,t),y:o.prev.y}))}return r},animationMatchBy:nY,connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",shape:function(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t,n=e.visibleLength,r=e.strokeDasharray,o=e.connectNulls,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,kq),s=null!=o&&o;if(null!=n){var c,l=i.pathRef;t=function(e,t,n){return e?function(e,t,n){var r=function(e){return e.length%2!=0?[...e,...e]:e}(n),o=r.reduce((e,t)=>e+t,0);if(!o)return Iq(t,e);for(var i=Math.floor(e/o),a=e%o,s=[],c=0,l=0;c<r.length;l+=null!==(u=r[c])&&void 0!==u?u:0,++c){var u,d=r[c];if(null!=d&&l+d>a){s=[...r.slice(0,c),a-l];break}}var f=s.length%2==0?[0,t]:[t];return[...Aq(r,i),...s,...f].map(e=>"".concat(e,"px")).join(", ")}(n,t,"".concat(e).split(/[,\s]+/gim).map(e=>parseFloat(e))):Iq(t,n)}(r,function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(null!==(c=null==l?void 0:l.current)&&void 0!==c?c:null),n)}else null!=r&&(t=String(r));return a.createElement(EL,Dq({},i,{connectNulls:s,strokeDasharray:t}))},stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:uO.line,type:"linear"},mG=e=>{var t=e.dataKey,n=e.name,r=e.stroke,o=e.legendType;return[{inactive:e.hide,dataKey:t,type:o,color:r,value:HM(n,t),payload:e}]},gG=a.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,o=e.strokeWidth,i=e.fill,s=e.name,c=e.hide,l=e.unit,u=e.formatter,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:nw,settings:{stroke:r,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:HM(s,t),hide:c,type:d,color:r,unit:l,formatter:u,graphicalItemId:f}};return a.createElement(IU,{tooltipEntrySettings:p})});function yG(e){var t=e.clipPathId,n=e.points,r=e.props,o=r.dot,i=r.dataKey,s=r.needClip,c=(r.id,qz(uG(r,aG)));return a.createElement(Yq,{points:n,dot:o,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:c,needClip:s,clipPathId:t})}function vG(e){var t=e.showLabels,n=e.children,r=e.points,o=(0,a.useMemo)(()=>null==r?void 0:r.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return fG(fG({},r),{},{value:e.value,payload:e.payload,viewBox:r,parentViewBox:void 0,fill:void 0})}),[r]);return a.createElement(BY,{value:t?o:void 0},n)}function bG(e){var t=e.clipPathId,n=e.pathRef,r=e.points,o=e.props,i=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,l=e.visibleLength,u=o.type,d=o.layout,f=o.connectNulls,p=o.needClip,h=o.shape,m=o.strokeDasharray,g=fG(fG({},$z(uG(o,sG))),{},{fill:"none",className:"recharts-line-curve",clipPath:p?"url(#clipPath-".concat(t,")"):void 0,points:r,type:u,layout:d,connectNulls:f,strokeDasharray:null!=m?m:o.strokeDasharray,pathRef:n,animationElapsedTime:i,isAnimating:s,isEntrance:!!o.animateNewValues&&c,visibleLength:l});return a.createElement(a.Fragment,null,(null==r?void 0:r.length)>1&&a.createElement(DU,{option:h,DefaultShape:hG.shape,shapeProps:g}),a.createElement(yG,{points:r,clipPathId:t,props:o}))}function xG(e){var t=e.clipPathId,n=e.props,r=e.pathRef,o=e.previousPointsRef,i=n.points,s=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,u=n.animationEasing,d=n.animationMatchBy,f=n.animationInterpolateFn,p=n.layout,h=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(r.current),m=sY(n.onAnimationStart,n.onAnimationEnd),g=m.isAnimating,y=m.handleAnimationStart,v=m.handleAnimationEnd,b=!g,x=function(e){var t=(0,a.useRef)(0),n=(0,a.useRef)(0),r=(0,a.useRef)(!1),o=(0,a.useRef)(e);return o.current!==e&&(t.current=n.current,o.current=e),(0,a.useCallback)((e,o)=>{if(r.current)return null;var i=Math.min(Yx(t.current+e*o),o);return e>0&&o>0&&(n.current=Math.max(n.current,i),i>=o)?(r.current=!0,null):i},[])}(i),w=(0,a.useCallback)(e=>e>0&&h>0,[h]);return a.createElement(vG,{points:i,showLabels:b},n.children,a.createElement(cY,{animationInput:i,animationIdPrefix:"recharts-line-",items:i,previousItemsRef:o,isAnimationActive:s,animationBegin:c,animationDuration:l,animationEasing:u,onAnimationStart:y,onAnimationEnd:v,animationInterpolateFn:f,animationMatchBy:d,shouldUpdatePreviousRef:w,layout:p},(e,o,i)=>{var s=g||o<1,c=s?x(o,h):null;return a.createElement(bG,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:o,isAnimating:s,isEntrance:i,visibleLength:c})}),a.createElement($Y,{label:n.label}))}function wG(e){var t=e.clipPathId,n=e.props,r=(0,a.useRef)(null),o=(0,a.useRef)(null);return a.createElement(xG,{props:n,clipPathId:t,previousPointsRef:r,pathRef:o})}var MG=(e,t)=>{var n,r;return{x:null!==(n=e.x)&&void 0!==n?n:void 0,y:null!==(r=e.y)&&void 0!==r?r:void 0,value:e.value,errorVal:RM(e.payload,t)}};class jG extends a.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,o=e.className,i=e.xAxisId,s=e.yAxisId,c=e.top,l=e.left,u=e.width,d=e.height,f=e.id,p=e.needClip,h=e.zIndex;if(t)return null;var m=jc("recharts-line",o),g=f,y=function(e){var t=Gz(e);if(null!=t){var n=t.r,r=t.strokeWidth,o=Number(n),i=Number(r);return(Number.isNaN(o)||o<0)&&(o=3),(Number.isNaN(i)||i<0)&&(i=2),{r:o,strokeWidth:i}}return{r:3,strokeWidth:2}}(n),v=y.r,b=y.strokeWidth,x=OU(n),w=2*v+b,M=p?"url(#clipPath-".concat(x?"":"dots-").concat(g,")"):void 0;return a.createElement(yY,{zIndex:h},a.createElement(NR,{className:m},p&&a.createElement("defs",null,a.createElement(Zq,{clipPathId:g,xAxisId:i,yAxisId:s}),!x&&a.createElement("clipPath",{id:"clipPath-dots-".concat(g)},a.createElement("rect",{x:l-w/2,y:c-w/2,width:u+w,height:d+w}))),a.createElement(Vq,{xAxisId:i,yAxisId:s,data:r,dataPointFormatter:MG,errorBarOffset:0},a.createElement(wG,{props:this.props,clipPathId:g}))),a.createElement(qq,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:M}))}}function OG(e){var t=B_(e,hG),n=t.activeDot,r=t.animateNewValues,o=t.animationBegin,i=t.animationDuration,s=t.animationEasing,c=t.connectNulls,l=t.dot,u=t.hide,d=t.isAnimationActive,f=t.label,p=t.legendType,h=t.xAxisId,m=t.yAxisId,g=t.id,y=uG(t,cG),v=Kq(h,m).needClip,b=P_(),x=xj(),w=uj(),M=cM(e=>iG(e,h,m,w,g));if("horizontal"!==x&&"vertical"!==x||null==M||null==b)return null;var j=b.height,O=b.width,N=b.x,S=b.y;return a.createElement(jG,lG({},y,{id:g,connectNulls:c,dot:l,activeDot:n,animateNewValues:r,animationBegin:o,animationDuration:i,animationEasing:s,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:h,yAxisId:m,points:M,layout:x,height:j,width:O,left:N,top:S,needClip:v}))}function NG(e){var t=B_(e,hG),n=uj();return a.createElement(fY,{id:t.id,type:"line"},e=>a.createElement(a.Fragment,null,a.createElement(AU,{legendPayload:mG(t)}),a.createElement(gG,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),a.createElement(hY,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),a.createElement(OG,lG({},t,{id:e}))))}var SG=a.memo(NG,Tz);SG.displayName="Line";const EG=({active:e,payload:t,label:n,interval:r})=>e&&t?.length?(0,Nl.jsxs)("div",{className:"disco-bg-[#1e2327] disco-text-white disco-rounded-lg disco-p-2 disco-text-[10px] disco-shadow-lg",children:[(0,Nl.jsx)("p",{className:"disco-text-[#bbcfff] disco-mb-1",children:Ml(n,r)}),t.map(e=>(0,Nl.jsxs)("p",{style:{color:e.color},children:["net_sales"===e.name?"Net Sales":"Discount Sales",":"," ",(0,Nl.jsx)("strong",{className:"disco-text-white",children:xl(e.value)})]},e.name))]}):null,kG=({className:e})=>{const t=D(ds),{data:n,isLoading:r}=Ix(t),o=n?.data??[],i=n?.interval??"day",a=(new Date(t.date_to)-new Date(t.date_from))/864e5>90;return(0,Nl.jsxs)(Ex,{className:bl("disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-2",e),children:[(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,vv.__)("Revenue over time","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af]",children:(0,vv.__)("Net revenue vs disco","disco")})]}),r?(0,Nl.jsx)("div",{className:"disco-h-[280px] disco-animate-pulse disco-rounded-lg disco-bg-[#f3f4f6]"}):(0,Nl.jsx)(jw,{width:"100%",height:280,children:(0,Nl.jsxs)(fB,{data:o,margin:{top:8,right:8,left:-16,bottom:0},children:[(0,Nl.jsx)(ZB,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),(0,Nl.jsx)(mQ,{dataKey:"date",tick:{fontSize:9,fill:"#637381"},tickLine:!1,axisLine:!1,tickFormatter:e=>function(e,t){const n=new Date(e+"T00:00:00");return t?`${n.toLocaleDateString("en-US",{month:"short"})} ${String(n.getFullYear()).slice(-2)}`:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}(e,a)}),(0,Nl.jsx)(kQ,{tick:{fontSize:9,fill:"#637381"},tickLine:!1,axisLine:!1,tickFormatter:e=>`${xl(e)}`}),(0,Nl.jsx)(eB,{content:(0,Nl.jsx)(EG,{interval:i})}),(0,Nl.jsx)(Eq,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:"11px",color:"#6b7280"},formatter:e=>"net_sales"===e?"Net Sale":"Discount Sale"}),(0,Nl.jsx)(SG,{type:"monotone",dataKey:"net_sales",stroke:"#47cd89",strokeWidth:2,dot:!1,name:"net_sales"}),(0,Nl.jsx)(SG,{type:"monotone",dataKey:"discount_sales",stroke:"#f59e0b",strokeWidth:2,dot:!1,name:"discount_sales"})]})})]})},DG=Sc("disco-group/badge disco-inline-flex disco-h-5 disco-w-fit disco-shrink-0 disco-items-center disco-justify-center disco-gap-1 disco-overflow-hidden disco-rounded-4xl disco-border disco-border-transparent disco-px-2 disco-py-0.5 disco-text-xs disco-font-medium disco-whitespace-nowrap disco-transition-all focus-visible:disco-border-ring focus-visible:disco-ring-[3px] focus-visible:disco-ring-ring/50 has-data-[icon=inline-end]:disco-pr-1.5 has-data-[icon=inline-start]:disco-pl-1.5 aria-invalid:disco-border-destructive aria-invalid:disco-ring-destructive/20 dark:aria-invalid:disco-ring-destructive/40 [&>svg]:disco-pointer-events-none [&>svg]:disco-size-3!",{variants:{variant:{default:"disco-bg-primary disco-text-primary-foreground [a]:hover:disco-bg-primary/80",secondary:"disco-bg-secondary disco-text-secondary-foreground [a]:hover:disco-bg-secondary/80",destructive:"disco-bg-destructive/10 disco-text-destructive focus-visible:disco-ring-destructive/20 dark:disco-bg-destructive/20 dark:focus-visible:disco-ring-destructive/40 [a]:hover:disco-bg-destructive/20",outline:"disco-border-border disco-text-foreground [a]:hover:disco-bg-muted [a]:hover:disco-text-muted-foreground",ghost:"hover:disco-bg-muted hover:disco-text-muted-foreground dark:hover:disco-bg-muted/50",link:"disco-text-primary disco-underline-offset-4 hover:disco-underline"}},defaultVariants:{variant:"default"}});function IG({className:e,variant:t="default",render:n,...r}){return kl({defaultTagName:"span",props:Vs({className:bl(DG({variant:t}),e)},r),render:n,state:{slot:"badge",variant:t}})}const AG={campaigns:"disco-bg-[#f3efff]",net:"disco-bg-[#f6fff9]",discount:"disco-bg-[#fff8ec]",orders:"disco-bg-[#e5eeff]",discountOrders:"disco-bg-[#e9ffff]",customers:"disco-bg-[#eeffe6]"},TG=({title:e,subtitle:t,value:n,trend:r,icon:o,variant:i="net",isLoading:a,isTrendUp:s})=>(0,Nl.jsxs)("div",{className:bl("disco-relative disco-overflow-hidden disco-rounded-[10px] disco-border-2 disco-border-[#e5e7eb] disco-p-4 disco-flex-1 disco-min-w-[240px]",AG[i]),children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-start disco-justify-between disco-mb-2",children:[(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-text-xs disco-font-semibold disco-uppercase disco-tracking-[0.5px] disco-text-black",children:e}),t&&(0,Nl.jsx)("p",{className:"disco-text-[8px] disco-text-[#575757]",children:t})]}),(0,Nl.jsx)("img",{src:o,alt:e,className:"disco-w-6 disco-h-6"})]}),a?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("div",{className:"disco-h-8 disco-w-24 disco-bg-gray-300/50 disco-rounded disco-mb-2 disco-animate-pulse"}),(0,Nl.jsx)("div",{className:"disco-h-5 disco-w-32 disco-bg-gray-300/50 disco-rounded-full disco-animate-pulse"})]}):(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("p",{className:"disco-text-2xl disco-font-bold disco-text-[#111827] disco-tracking-tight disco-mb-2",children:n}),r&&(0,Nl.jsx)(IG,{className:(s?"!disco-bg-[#dcfce7] disco-text-[#15803d]":"!disco-bg-[#FFE0DE] disco-text-[#DC5243]")+" disco-text-[8px] disco-font-medium disco-rounded-full disco-px-2 disco-py-0.5 disco-border-0",children:r})]})]});function CG(e){if(!e)return"-- vs last period";const{change_percent:t,trend:n,previous:r,current:o}=e;if(null===t&&0===r&&0===o)return"↓ 0% vs last period";if(null===t&&0===r&&o>0)return"↑ 100%+ vs last period";const i=Math.abs(t).toFixed(1);return"up"===n?`↑ +${i}% vs last period`:`↓ -${i}% vs last period`}const PG=[{title:(0,vv.__)("Active Campaigns","disco"),icon:n(789).A,variant:"campaigns",getValue:e=>e?.active_campaigns?.current??"--",isTrendUp:e=>"up"===e?.active_campaigns?.trend},{title:(0,vv.__)("Net Sale","disco"),subtitle:"(Woo + Disco)",icon:n(606).A,variant:"net",getValue:e=>xl(e?.net_sales?.current),getTrend:e=>CG(e?.net_sales),isTrendUp:e=>"up"===e?.net_sales?.trend},{title:(0,vv.__)("Discount Sale","disco"),subtitle:"(By Disco)",icon:n(675).A,variant:"discount",getValue:e=>xl(e?.discount_sales?.current),getTrend:e=>CG(e?.discount_sales),isTrendUp:e=>"up"===e?.discount_sales?.trend},{title:(0,vv.__)("Total Orders","disco"),subtitle:"(Woo + Disco)",icon:n(149).A,variant:"orders",getValue:e=>e?.total_orders?.current??"--",getTrend:e=>CG(e?.total_orders),isTrendUp:e=>"up"===e?.total_orders?.trend},{title:(0,vv.__)("Orders with Discount","disco"),subtitle:"(Disco)",icon:n(146).A,variant:"discountOrders",getValue:e=>e?.disco_orders?.current??"--",getTrend:e=>CG(e?.disco_orders),isTrendUp:e=>"up"===e?.disco_orders?.trend},{title:(0,vv.__)("Customers","disco"),subtitle:"(Disco)",icon:n(530).A,variant:"customers",getValue:e=>e?.customers?.current??"--",getTrend:e=>CG(e?.customers),isTrendUp:e=>"up"===e?.customers?.trend}],zG=()=>{const e=D(ds),{data:t,isLoading:n,isFetching:r}=Dx(e),o=t?.data;return(0,Nl.jsx)("div",{className:"disco-grid disco-grid-cols-4 disco-gap-2.5 disco-mb-3",children:PG.map(({title:e,subtitle:t,icon:i,variant:a,getValue:s,getTrend:c,isTrendUp:l})=>(0,Nl.jsx)(TG,{title:e,subtitle:t,value:s(o),trend:c?c(o):null,icon:i,variant:a,isLoading:n||r,isTrendUp:l(o)},e))})},_G=["#ef4444","#3b82f6","#8b5cf6","#f59e0b","#10b981"],RG=({className:e})=>{const t=yv(),n=D(ds),{data:r,isLoading:o}=ql({...n,limit:5,sort_by:"revenue",order:"desc"}),i=r?.data??[];return o||0!==i.length?(0,Nl.jsxs)(Ex,{className:bl("disco-relative disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-0",e),children:[!t&&!o&&(0,Nl.jsx)(Dv,{label:(0,vv.__)("Upgrade to See All","disco"),position:"disco-inset-x-0 disco-bottom-0 disco-h-[55%]",rounded:"disco-rounded-b-[10px]"}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between",children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,vv.__)("Top campaigns","disco")}),(0,Nl.jsxs)(St,{to:"/campaigns-reports",className:"disco-text-xs disco-font-medium disco-text-primary hover:disco-underline hover:disco-text-primary",children:[(0,vv.__)("View all","disco")," →"]})]}),o?(0,Nl.jsx)("div",{className:"disco-space-y-2",children:Array.from({length:5}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-h-8 disco-animate-pulse disco-rounded disco-bg-[#f3f4f6]"},t))}):(0,Nl.jsx)("ul",{children:i.map(({campaign_id:e,campaign_name:t,revenue:n},r)=>(0,Nl.jsxs)("li",{className:"disco-flex disco-items-center disco-justify-between disco-py-2 disco-border-b disco-border-[#f3f4f6] last:disco-border-0",children:[(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-2 disco-text-xs disco-font-medium disco-text-[#1f2937]",children:[(0,Nl.jsx)("span",{className:"disco-size-[6px] disco-rounded-[3px] disco-shrink-0",style:{background:_G[r%_G.length]}}),jl(t,30)]}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-semibold disco-text-[#111827]",children:xl(n)})]},e))})]}):(0,Nl.jsx)(Ev,{})},LG=({className:e})=>{const t=yv(),n=D(ds),{data:r,isLoading:o}=ib({...n,limit:5,sort_by:"revenue",order:"desc"}),i=r?.data??[];return o||0!==i.length?(0,Nl.jsxs)(Ex,{className:bl("disco-relative disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-0",e),children:[!t&&!o&&(0,Nl.jsx)(Dv,{label:(0,vv.__)("Upgrade to See All","disco"),position:"disco-inset-x-0 disco-bottom-0 disco-h-[50%]",rounded:"disco-rounded-b-[10px]"}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between",children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,vv.__)("Top products by revenue","disco")}),(0,Nl.jsxs)(St,{to:"/products",className:"disco-text-xs disco-font-medium disco-text-primary hover:disco-underline hover:disco-text-primary",children:[(0,vv.__)("View all","disco")," →"]})]}),o?(0,Nl.jsx)("div",{className:"disco-space-y-3",children:Array.from({length:5}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-h-8 disco-animate-pulse disco-rounded disco-bg-[#f3f4f6]"},t))}):(0,Nl.jsx)("ul",{children:i.map(({id:e,name:t,total_revenue:n,image:r})=>(0,Nl.jsx)("li",{className:"disco-py-2 disco-border-b disco-border-[#f3f4f6] last:disco-border-0",children:(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-mb-1",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2",children:[r?(0,Nl.jsx)("img",{src:r,alt:t,className:"disco-size-5 disco-rounded-lg "}):(0,Nl.jsx)("span",{className:"disco-size-7 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-bg-[#f3f4f6] disco-text-sm disco-shrink-0",children:t?.charAt(0)??"?"}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-medium disco-text-[#1f2937]",children:jl(t,40)})]}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-semibold disco-text-[#111827]",children:xl(n)})]})},e))})]}):(0,Nl.jsx)(Ev,{title:"Top products not found!"})},UG=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)("div",{className:"disco-mb-5",children:(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,vv.__)("Analytics Dashboard","disco")})}),(0,Nl.jsx)(zG,{}),(0,Nl.jsxs)("div",{className:"disco-flex disco-gap-2.5 disco-mb-3",children:[(0,Nl.jsx)(kG,{className:"disco-flex-[2]"}),(0,Nl.jsx)(iB,{className:"disco-flex-1"})]}),(0,Nl.jsxs)("div",{className:"disco-flex disco-gap-2.5",children:[(0,Nl.jsx)(RG,{className:"disco-flex-1"}),(0,Nl.jsx)(LG,{className:"disco-flex-1"})]})]}),YG=_l("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]),FG=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-[60vh] disco-flex disco-flex-col disco-items-center disco-justify-center disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)(YG,{className:"disco-size-12 disco-text-[#d1d5db] disco-mb-4"}),(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,vv.__)("Page not found","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-1",children:(0,vv.__)("The page you're looking for doesn't exist or has been moved.","disco")}),(0,Nl.jsx)(St,{to:"/",className:"disco-mt-4 disco-inline-flex disco-items-center disco-px-3 disco-py-1.5 disco-text-xs disco-font-medium disco-text-white disco-bg-primary disco-rounded-lg disco-no-underline hover:disco-bg-primary-dark hover:disco-text-white disco-transition-colors",children:(0,vv.__)("Back to Dashboard","disco")})]}),WG=[{key:"id",label:"Order"},{key:"customer",label:"Customer"},{key:"total_spent",label:"Total Spent",sortable:!0},{key:"campaign",label:"Campaign"},{key:"products",label:"Products"},{key:"date",label:"Date",sortable:!0}],BG=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-mono disco-text-[#9ca3af]",children:e.id}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#111827] disco-whitespace-nowrap",children:e.customer}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:e.total_spent}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#2fa86d] disco-whitespace-nowrap",children:jl(e.campaign,30)}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:(0,Nl.jsx)(hx,{title:"Products",items:e.products})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#9ca3af] disco-whitespace-nowrap",children:e.date})]},e.id),QG=({orders:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:o="date",sortDir:i="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=yv();return(0,Nl.jsx)(Fv,{columns:WG,data:e,renderRow:BG,title:"Recent Orders",total:l,searchPlaceholder:"Search orders...",search:n,onSearchChange:r,sortKey:o,sortDir:i,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,locked:!d,lockOverlay:{size:"lg",label:(0,vv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,vv.__)("Upgrade to Disco Pro","disco")})," ",(0,vv.__)("to access your complete order history — every order that used a discount campaign, with full revenue and attribution data.","disco")]})}})},qG={revenue:"revenue",date:"date"},GG=()=>{const e=D(ds),[t,n]=(0,a.useState)(1),[r,o]=(0,a.useState)("date"),[i,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),u=yv(),{data:d,isLoading:f,isFetching:p}=Qb({...e,limit:u?20:10,sort_by:qG[r]??"revenue",order:i,page:t,...c?{search:c}:{}}),h=(d?.data??[]).map(e=>{return{id:`#${e.id}`,customer:e.customer_name||"—",campaign:(e.campaigns??[]).map(e=>e.name).join(", ")||"—",products:e.products??[],total_spent:xl(e.total_spent),quantity:e.quantity,date:(t=e.date,t?new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—")};var t}),m=d?.collection?.total??0,g=d?.collection?.total_pages??1,y=d?.collection?.count??0;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,vv.__)("Orders","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,vv.__)("Orders influenced by Disco campaigns","disco")})]}),(0,Nl.jsx)(QG,{orders:h,isLoading:f||p,search:c,onSearchChange:e=>{l(e),n(1)},sortKey:r,sortDir:i,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(o(e),s("desc")),n(1)},page:t,totalPages:g,total:m,count:y,onPageChange:n})]})},$G=[{key:"name",label:"Product"},{key:"revenue",label:"Net Sale",sortable:!0},{key:"category",label:"Category"},{key:"campaigns",label:"Campaigns"},{key:"orders",label:"Orders",sortable:!0},{key:"customers",label:"Customers",sortable:!0}],HG=({category:e})=>(0,Nl.jsx)("span",{className:"disco-inline-flex disco-items-center disco-px-2 disco-py-0.5 disco-rounded disco-text-[10px] disco-text-[#4b5563] disco-bg-[#f3f4f6] disco-whitespace-nowrap",children:e}),VG=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2.5",children:[e.image?(0,Nl.jsx)("img",{src:e.image,alt:e.name,className:"disco-size-7 disco-rounded-lg disco-object-cover disco-shrink-0"}):(0,Nl.jsx)("span",{className:"disco-size-7 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-bg-[#f3f4f6] disco-text-sm disco-shrink-0",children:e.name?.charAt(0)??"?"}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-font-medium disco-text-[#111827] disco-leading-tight",children:jl(e.name,40)}),(0,Nl.jsx)("p",{className:"disco-text-[#9ca3af] disco-text-[10px] disco-mt-0.5",children:e.unitPrice})]})]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:e.revenue}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)(HG,{category:e.category})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:(0,Nl.jsx)(hx,{title:"Campaigns",items:e.campaigns})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.customers})]},e.id),KG=({products:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:o="revenue",sortDir:i="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=yv();return(0,Nl.jsx)(Fv,{columns:$G,data:e,renderRow:VG,title:"All Products",total:l,searchPlaceholder:"Search products...",search:n,onSearchChange:r,sortKey:o,sortDir:i,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,locked:!d,lockOverlay:{size:"lg",label:(0,vv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,vv.__)("Upgrade to Disco Pro","disco")})," ",(0,vv.__)("to see which products respond best to discounts — and which ones you're over-discounting.","disco")]})}})},ZG={orders:"orders",customers:"customers",revenue:"revenue"},XG=()=>{const e=D(ds),[t,n]=(0,a.useState)(1),[r,o]=(0,a.useState)("revenue"),[i,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),u=yv(),{data:d,isLoading:f,isFetching:p}=ib({...e,limit:u?20:10,sort_by:ZG[r]??"revenue",order:i,page:t,...c?{search:c}:{}}),h=(d?.data??[]).map(e=>({id:e.id,image:e.image,name:e.name,unitPrice:`${xl(e.unit_price)} unit price`,category:(e.categories??[]).map(e=>e.name).join(", ")||"—",campaigns:Ol([...e.campaigns]),orders:e.total_orders,customers:e.total_customers,revenue:xl(e.total_revenue)})),m=d?.collection?.total??0,g=d?.collection?.total_pages??1,y=d?.collection?.count??0;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,vv.__)("Products","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,vv.__)("Revenue and discount performance by product","disco")})]}),(0,Nl.jsx)(KG,{products:h,isLoading:f||p,search:c,onSearchChange:e=>{l(e),n(1)},sortKey:r,sortDir:i,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(o(e),s("desc")),n(1)},page:t,totalPages:g,total:m,count:y,onPageChange:n})]})};function JG(){return(0,Nl.jsx)(x,{store:ps,children:(0,Nl.jsxs)(Nt,{basename:"/",children:[(0,Nl.jsx)(Tt,{}),(0,Nl.jsx)(tt,{children:(0,Nl.jsxs)(Je,{path:"/",element:(0,Nl.jsx)(gv,{}),children:[(0,Nl.jsx)(Je,{index:!0,element:(0,Nl.jsx)(UG,{})}),(0,Nl.jsx)(Je,{path:"/campaigns-reports",element:(0,Nl.jsx)(xb,{})}),(0,Nl.jsx)(Je,{path:"/campaigns-reports/:campaignId",element:(0,Nl.jsx)(hb,{})}),(0,Nl.jsx)(Je,{path:"/products",element:(0,Nl.jsx)(XG,{})}),(0,Nl.jsx)(Je,{path:"/products/:productId",element:(0,Nl.jsx)(XG,{})}),(0,Nl.jsx)(Je,{path:"/orders",element:(0,Nl.jsx)(GG,{})}),(0,Nl.jsx)(Je,{path:"/customers",element:(0,Nl.jsx)(Sx,{})}),(0,Nl.jsx)(Je,{path:"/customers/:customerId",element:(0,Nl.jsx)(bx,{})}),(0,Nl.jsx)(Je,{path:"*",element:(0,Nl.jsx)(FG,{})})]})})]})})}const e$=document.getElementById("disco-analytics");(0,i.createRoot)(e$).render((0,Nl.jsx)(JG,{}))})()})();