@tmf_ciclica/ciclicastorybook 1.2.87 → 1.2.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +8 -8
- package/dist/index.es.js +979 -983
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -36,21 +36,21 @@ const W2 = "_ambitSelector_mcunf_2", K2 = "_header_mcunf_13", U2 = "_nameDateCon
|
|
|
36
36
|
ambitButtons: s0
|
|
37
37
|
}, r0 = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Eliminar'%3e%3ccircle%20id='Ellipse%20220'%20cx='15.5106'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M20.8581%2010.5548H17.5491V10.4015C17.5491%209.17493%2016.6257%208.255%2015.4714%208.255C14.3171%208.255%2013.3167%209.17493%2013.3167%2010.4015V10.5548H10.0846C9.69985%2010.5548%209.46899%2010.7848%209.46899%2011.1681C9.46899%2011.5514%209.69985%2011.7814%2010.0846%2011.7814H10.2385V21.2106C10.2385%2022.3605%2011.162%2023.3571%2012.3932%2023.3571H18.5495C19.7038%2023.3571%2020.7042%2022.4372%2020.7042%2021.2106V11.7047H20.9351C21.2429%2011.7047%2021.5507%2011.4747%2021.5507%2011.0914C21.5507%2010.7081%2021.1659%2010.5548%2020.8581%2010.5548ZM14.471%2010.4015C14.471%209.86488%2014.9327%209.40491%2015.4714%209.40491C16.01%209.40491%2016.3948%209.86488%2016.3948%2010.4015V10.5548H14.471V10.4015ZM16.3948%2018.8342V15.0011C16.3948%2014.6178%2016.6257%2014.3878%2017.0104%2014.3878C17.3952%2014.3878%2017.6261%2014.6178%2017.6261%2015.0011V18.8342C17.6261%2019.1408%2017.3952%2019.4474%2017.0104%2019.4474C16.6257%2019.4474%2016.3948%2019.1408%2016.3948%2018.8342ZM13.3167%2018.8342V15.0011C13.3167%2014.6178%2013.5475%2014.3878%2013.9323%2014.3878C14.3171%2014.3878%2014.5479%2014.6178%2014.5479%2015.0011V18.8342C14.5479%2019.1408%2014.3171%2019.4474%2013.9323%2019.4474C13.5475%2019.4474%2013.3167%2019.1408%2013.3167%2018.8342Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e", o0 = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209259'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.3062'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cg%20id='Group%203973'%3e%3cg%20id='Rectangle%20495'%3e%3cmask%20id='path-2-inside-1_4451_10560'%20fill='white'%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'/%3e%3c/mask%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'%20stroke='%23605B56'%20stroke-width='3'%20mask='url(%23path-2-inside-1_4451_10560)'/%3e%3c/g%3e%3cg%20id='Group%203972'%3e%3crect%20id='Rectangle%20496'%20x='7.2041'%20y='10.9042'%20width='12.8'%20height='12.8'%20rx='1'%20fill='%23605B56'/%3e%3cpath%20id='+'%20d='M16.3785%2018.0509H14.3838V20.0776H12.9331V18.0509H10.9385V16.6749H12.9331V14.6376H14.3838V16.6749H16.3785V18.0509Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", a0 = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209260'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M8.20744%208.70422C7.34769%208.70422%206.88873%209.71735%207.45568%2010.3637L13.3518%2017.085C13.5118%2017.2675%2013.6%2017.5018%2013.6%2017.7445V23.2443C13.6%2023.6283%2013.8199%2023.9783%2014.1658%2024.1451L15.9658%2025.0128C16.6297%2025.3329%2017.4%2024.8491%2017.4%2024.112V17.7445C17.4%2017.5018%2017.4882%2017.2675%2017.6482%2017.085L23.5443%2010.3637C24.1113%209.71735%2023.6523%208.70422%2022.7926%208.70422H8.20744Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e", l0 = "data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%206725'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.7148'%20r='14.3521'%20stroke='%23605B56'%20stroke-opacity='0.5'%20stroke-width='1.5'/%3e%3cg%20id='Group%206724'%3e%3cpath%20id='Vector'%20d='M17.4114%2023.3302C17.4114%2024.5419%2016.4269%2027.4724%2015.2126%2027.4724C13.9982%2027.4724%2013.0137%2024.5419%2013.0137%2023.3302C13.0137%2022.7483%2013.2453%2022.1902%2013.6577%2021.7787C14.0701%2021.3673%2014.6294%2021.1361%2015.2126%2021.1361C15.7957%2021.1361%2016.355%2021.3673%2016.7674%2021.7787C17.1798%2022.1902%2017.4114%2022.7483%2017.4114%2023.3302Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union'%20d='M15.2919%2020.6088H11.2899L11.289%2020.6078C10.6273%2020.7718%209.36856%2021.3396%209.39931%2023.2845C9.39931%2023.2845%207.41254%2021.7976%208.17372%2019.0179L8.25575%2018.7445C8.59675%2017.7118%209.66004%2016.7306%2010.7714%2016.2435C10.7337%2012.8666%2011.5045%208.19644%2015.2919%204.724V20.6088ZM10.6835%2017.4164C10.5323%2017.5091%2010.3819%2017.6125%2010.2372%2017.7279C9.77215%2018.099%209.43634%2018.5195%209.26747%2018.8988L9.20595%2019.058C8.95666%2019.8145%208.9632%2020.4347%209.07607%2020.9291C9.34144%2020.5645%209.66233%2020.2832%209.9999%2020.0746C10.2365%2019.9284%2010.4715%2019.8251%2010.6835%2019.7494V17.4164Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union_2'%20d='M15.293%204.724C19.0931%208.20817%2019.8548%2012.8981%2019.8115%2016.2777C20.8629%2016.7859%2021.8411%2017.7218%2022.165%2018.7045C23.1398%2021.6599%2021.0225%2023.2445%2021.0225%2023.2445C21.051%2021.4361%2019.9648%2020.8184%2019.2803%2020.6088H15.293V4.724ZM19.7676%2017.3949C19.7586%2017.5313%2019.7493%2017.6646%2019.7383%2017.7943V19.7094C19.9502%2019.7851%2020.1854%2019.8884%2020.4219%2020.0345C20.7595%2020.2432%2021.0794%2020.5253%2021.3447%2020.89C21.4466%2020.444%2021.4627%2019.8956%2021.2812%2019.2367L21.2148%2019.0179C21.0772%2018.6004%2020.7157%2018.1118%2020.1846%2017.6879C20.0493%2017.58%2019.9088%2017.4829%2019.7676%2017.3949Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cg%20id='Vector_2'%3e%3cpath%20d='M12.541%208.28445C12.541%208.28445%2014.8218%209.81829%2018.0434%208.28445C18.0434%208.28445%2016.9978%206.03912%2015.2919%204.61267C15.2919%204.61267%2013.7894%205.92343%2012.541%208.28445Z'%20fill='%23FDFDFD'/%3e%3cpath%20d='M15.3057%205.29626C15.9532%205.9116%2016.4918%206.63792%2016.8867%207.2533C17.0801%207.55466%2017.2355%207.82605%2017.3516%208.03748C16.0573%208.54342%2014.966%208.52427%2014.1807%208.36951C13.781%208.29074%2013.4584%208.17533%2013.2266%208.07556C13.7607%207.14513%2014.32%206.40895%2014.7646%205.88806C14.9759%205.64056%2015.1621%205.44302%2015.3057%205.29626Z'%20stroke='%23605B56'%20stroke-opacity='0.5'/%3e%3c/g%3e%3cpath%20id='Vector_3'%20d='M17.6984%2012.9862C17.6985%2013.4539%2017.5596%2013.9111%2017.2993%2014.3001C17.039%2014.689%2016.669%2014.9922%2016.236%2015.1712C15.803%2015.3503%2015.3265%2015.3972%2014.8668%2015.3061C14.4071%2015.2149%2013.9848%2014.9898%2013.6533%2014.6591C13.3218%2014.3285%2013.0961%2013.9072%2013.0046%2013.4485C12.9131%2012.9898%2012.96%2012.5143%2013.1393%2012.0822C13.3186%2011.6501%2013.6224%2011.2808%2014.0121%2011.021C14.4018%2010.7611%2014.86%2010.6224%2015.3287%2010.6224C15.957%2010.6224%2016.5597%2010.8715%2017.004%2011.3147C17.4484%2011.758%2017.6982%2012.3593%2017.6984%2012.9862Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_4'%20d='M17.1358%2013.0038C17.1358%2013.36%2017.0299%2013.7083%2016.8316%2014.0045C16.6332%2014.3007%2016.3513%2014.5316%2016.0214%2014.6679C15.6916%2014.8042%2015.3286%2014.8399%2014.9784%2014.7704C14.6282%2014.7009%2014.3066%2014.5294%2014.0541%2014.2774C13.8017%2014.0255%2013.6297%2013.7046%2013.5601%2013.3552C13.4904%2013.0058%2013.5262%2012.6436%2013.6628%2012.3145C13.7994%2011.9853%2014.0308%2011.704%2014.3277%2011.5061C14.6245%2011.3082%2014.9736%2011.2025%2015.3306%2011.2025C15.8094%2011.2025%2016.2685%2011.3923%2016.6071%2011.7301C16.9456%2012.0679%2017.1358%2012.526%2017.1358%2013.0038Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_5'%20d='M16.7061%2013.2093C16.6508%2013.2093%2016.5978%2013.1874%2016.5588%2013.1485C16.5197%2013.1095%2016.4978%2013.0566%2016.4978%2013.0015C16.4974%2012.7236%2016.3866%2012.4572%2016.1897%2012.2607C15.9928%2012.0642%2015.7258%2011.9537%2015.4473%2011.9533C15.4175%2011.9582%2015.3869%2011.9566%2015.3578%2011.9485C15.3287%2011.9405%2015.3017%2011.9262%2015.2786%2011.9067C15.2556%2011.8872%2015.237%2011.8629%2015.2244%2011.8356C15.2117%2011.8082%2015.2051%2011.7784%2015.2051%2011.7482C15.2051%2011.7181%2015.2117%2011.6883%2015.2244%2011.6609C15.237%2011.6336%2015.2556%2011.6093%2015.2786%2011.5898C15.3017%2011.5703%2015.3287%2011.556%2015.3578%2011.5479C15.3869%2011.5399%2015.4175%2011.5383%2015.4473%2011.5432C15.8348%2011.5435%2016.2063%2011.6973%2016.4803%2011.9707C16.7543%2012.2441%2016.9084%2012.6148%2016.9088%2013.0015C16.9088%2013.0557%2016.8876%2013.1077%2016.8498%2013.1465C16.8119%2013.1854%2016.7603%2013.2079%2016.7061%2013.2093Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_6'%20d='M16.8082%2013.6607C16.8082%2013.7106%2016.7934%2013.7594%2016.7656%2013.8008C16.7378%2013.8423%2016.6984%2013.8746%2016.6522%2013.8937C16.606%2013.9128%2016.5552%2013.9178%2016.5062%2013.9081C16.4571%2013.8983%2016.4121%2013.8743%2016.3768%2013.8391C16.3414%2013.8038%2016.3173%2013.7589%2016.3076%2013.7099C16.2978%2013.661%2016.3028%2013.6103%2016.322%2013.5642C16.3411%2013.5182%2016.3735%2013.4788%2016.4151%2013.4511C16.4566%2013.4234%2016.5055%2013.4086%2016.5555%2013.4086C16.6225%2013.4086%2016.6868%2013.4351%2016.7342%2013.4824C16.7816%2013.5297%2016.8082%2013.5939%2016.8082%2013.6607Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_7'%20d='M15.6008%2016.0612C15.5633%2016.0097%2015.5141%2015.9677%2015.4573%2015.9388C15.4005%2015.9099%2015.3376%2015.8949%2015.2738%2015.8949H15.1898C15.126%2015.8948%2015.0631%2015.9099%2015.0062%2015.9388C14.9494%2015.9677%2014.9002%2016.0096%2014.8627%2016.0612C14.8627%2016.0612%2013.6074%2017.4973%2014.1816%2021.0915C14.4989%2023.0777%2015.2314%2023.6694%2015.2314%2023.6694C15.2314%2023.6694%2015.9639%2023.0777%2016.2819%2021.0915C16.8561%2017.4973%2015.6008%2016.0612%2015.6008%2016.0612Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_8'%20d='M15.1468%2015.8949C15.083%2015.8948%2015.0201%2015.9099%2014.9632%2015.9388C14.9064%2015.9677%2014.8572%2016.0096%2014.8198%2016.0612C14.8198%2016.0612%2013.5645%2017.4973%2014.1387%2021.0915C14.456%2023.0777%2015.1884%2023.6694%2015.1884%2023.6694V15.8949H15.1468Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", c0 = "data:image/svg+xml,%3csvg%20width='26'%20height='14'%20viewBox='0%200%2026%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205138'%3e%3cpath%20id='Vector'%20d='M12.95%200.408447C7.659%200.408447%202.84899%202.77185%200.0832465%206.72621C-0.0277488%206.88808%20-0.0277488%207.09621%200.0832465%207.25807C2.84439%2011.2125%207.65437%2013.5712%2012.95%2013.5712C18.2456%2013.5712%2023.0556%2011.2125%2025.8168%207.25807C25.9278%207.0962%2025.9278%206.88807%2025.8168%206.72621C23.051%202.77184%2018.241%200.408447%2012.95%200.408447ZM12.95%2011.2217C10.619%2011.2217%208.71812%209.32083%208.71812%206.98984C8.71812%204.65885%2010.619%202.75796%2012.95%202.75796C15.281%202.75796%2017.1819%204.65883%2017.1819%206.98984C17.1819%209.32085%2015.281%2011.2217%2012.95%2011.2217Z'%20fill='%23B32F5D'/%3e%3cpath%20id='Vector_2'%20d='M12.9514%2010.2966C14.7777%2010.2966%2016.2583%208.81607%2016.2583%206.98974C16.2583%205.1634%2014.7777%203.68286%2012.9514%203.68286C11.1251%203.68286%209.64453%205.1634%209.64453%206.98974C9.64453%208.81607%2011.1251%2010.2966%2012.9514%2010.2966Z'%20fill='%23B32F5D'/%3e%3c/g%3e%3c/svg%3e", d0 = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205207'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e", n2 = ({
|
|
38
38
|
ambit: n,
|
|
39
|
-
onClickCopy:
|
|
39
|
+
onClickCopy: c,
|
|
40
40
|
onClickDelete: s,
|
|
41
41
|
onClickFilters: r,
|
|
42
42
|
onClickAmbit: t,
|
|
43
43
|
isActive: o,
|
|
44
|
-
activeColor:
|
|
45
|
-
fontColor:
|
|
46
|
-
moreInfo:
|
|
44
|
+
activeColor: d,
|
|
45
|
+
fontColor: a,
|
|
46
|
+
moreInfo: l
|
|
47
47
|
}) => {
|
|
48
|
-
const { name: u, created_at:
|
|
48
|
+
const { name: u, created_at: C, id: m, isBeingProcessed: f } = n;
|
|
49
49
|
return /* @__PURE__ */ h(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
className: Ae.ambitItem,
|
|
53
|
-
style: { borderBottom: `1px solid ${
|
|
53
|
+
style: { borderBottom: `1px solid ${a}` },
|
|
54
54
|
children: [
|
|
55
55
|
/* @__PURE__ */ h("div", { className: Ae.ambitNameDate, onClick: () => t(m), children: [
|
|
56
56
|
/* @__PURE__ */ h("div", { className: Ae.ambitName, children: [
|
|
@@ -61,14 +61,14 @@ const W2 = "_ambitSelector_mcunf_2", K2 = "_header_mcunf_13", U2 = "_nameDateCon
|
|
|
61
61
|
src: o ? c0 : d0
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
|
-
/* @__PURE__ */ i("span", { style: { color: o ?
|
|
64
|
+
/* @__PURE__ */ i("span", { style: { color: o ? d : a }, children: u })
|
|
65
65
|
] }),
|
|
66
|
-
/* @__PURE__ */ i("div", { className: Ae.ambitDate, children:
|
|
66
|
+
/* @__PURE__ */ i("div", { className: Ae.ambitDate, children: C ? new Date(C).toLocaleDateString() : "" })
|
|
67
67
|
] }),
|
|
68
68
|
/* @__PURE__ */ h("div", { className: Ae.ambitButtons, children: [
|
|
69
|
-
|
|
69
|
+
f && /* @__PURE__ */ i("img", { src: l0 }),
|
|
70
70
|
/* @__PURE__ */ i("button", { onClick: () => r(m), disabled: n.is_default, children: /* @__PURE__ */ i("img", { src: a0 }) }),
|
|
71
|
-
/* @__PURE__ */ i("button", { onClick: () =>
|
|
71
|
+
/* @__PURE__ */ i("button", { onClick: () => c(m), children: /* @__PURE__ */ i("img", { src: o0 }) }),
|
|
72
72
|
/* @__PURE__ */ i("button", { onClick: () => s(m), disabled: n.is_default, children: /* @__PURE__ */ i("img", { src: r0 }) })
|
|
73
73
|
] })
|
|
74
74
|
]
|
|
@@ -97,13 +97,13 @@ const Dt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
97
97
|
generalButton: u0
|
|
98
98
|
}, it = ({
|
|
99
99
|
children: n,
|
|
100
|
-
onClick:
|
|
100
|
+
onClick: c,
|
|
101
101
|
fontColor: s = "#605B56",
|
|
102
102
|
borderColor: r = "#605B56",
|
|
103
103
|
backgroundColor: t = "#fff",
|
|
104
104
|
type: o = "button",
|
|
105
|
-
containerStyles:
|
|
106
|
-
disabled:
|
|
105
|
+
containerStyles: d = {},
|
|
106
|
+
disabled: a = !1
|
|
107
107
|
}) => /* @__PURE__ */ i(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
@@ -112,27 +112,27 @@ const Dt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
112
112
|
color: s,
|
|
113
113
|
border: `1.5px solid ${r}`,
|
|
114
114
|
background: t,
|
|
115
|
-
...
|
|
115
|
+
...d
|
|
116
116
|
},
|
|
117
|
-
onClick:
|
|
117
|
+
onClick: c,
|
|
118
118
|
type: o,
|
|
119
|
-
disabled:
|
|
119
|
+
disabled: a,
|
|
120
120
|
children: n
|
|
121
121
|
}
|
|
122
122
|
), h0 = ({
|
|
123
123
|
ambitList: n,
|
|
124
|
-
activeAmbitId:
|
|
124
|
+
activeAmbitId: c,
|
|
125
125
|
fontColor: s = "#605B56",
|
|
126
126
|
activeColor: r,
|
|
127
127
|
nameLabel: t,
|
|
128
128
|
dateLabel: o,
|
|
129
|
-
newAmbitLabel:
|
|
130
|
-
buttonContainerStyles:
|
|
131
|
-
containerStyles:
|
|
129
|
+
newAmbitLabel: d = "New field",
|
|
130
|
+
buttonContainerStyles: a = {},
|
|
131
|
+
containerStyles: l = {},
|
|
132
132
|
onCLickNewAmbit: u = () => console.log("New ambit clicked"),
|
|
133
|
-
onClickCopy:
|
|
133
|
+
onClickCopy: C = (y) => console.log(`Copy ambit: ${y}`),
|
|
134
134
|
onCLickDelete: m = (y) => console.log(`Delete ambit: ${y}`),
|
|
135
|
-
onClickFilters:
|
|
135
|
+
onClickFilters: f = (y) => console.log(`Filters clicked: ${y}`),
|
|
136
136
|
onClickAmbit: p = (y) => console.log(`OnCLickAmbit: ${y}`)
|
|
137
137
|
}) => {
|
|
138
138
|
const { t: y } = A(), [b, v] = I(n);
|
|
@@ -142,14 +142,14 @@ const Dt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
142
142
|
const _ = (w) => {
|
|
143
143
|
if (b && b.length > 0) {
|
|
144
144
|
let L = [...b];
|
|
145
|
-
L.sort((
|
|
145
|
+
L.sort((g, N) => g[w].localeCompare(N[w])), v(L);
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
return /* @__PURE__ */ h(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
151
151
|
className: ge.ambitSelector,
|
|
152
|
-
style: { color: s, ...
|
|
152
|
+
style: { color: s, ...l },
|
|
153
153
|
children: [
|
|
154
154
|
/* @__PURE__ */ h(
|
|
155
155
|
"div",
|
|
@@ -174,13 +174,13 @@ const Dt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
174
174
|
/* @__PURE__ */ i("div", { className: ge.ambitListContainer, children: b && b.length > 0 && b.map((w) => /* @__PURE__ */ i(
|
|
175
175
|
n2,
|
|
176
176
|
{
|
|
177
|
-
isActive:
|
|
177
|
+
isActive: c == w.id,
|
|
178
178
|
ambit: w,
|
|
179
179
|
fontColor: s,
|
|
180
180
|
activeColor: r,
|
|
181
|
-
onClickCopy:
|
|
181
|
+
onClickCopy: C,
|
|
182
182
|
onClickDelete: m,
|
|
183
|
-
onClickFilters:
|
|
183
|
+
onClickFilters: f,
|
|
184
184
|
onClickAmbit: p
|
|
185
185
|
},
|
|
186
186
|
`ambitKey${w.id}`
|
|
@@ -188,10 +188,10 @@ const Dt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
188
188
|
/* @__PURE__ */ i("div", { className: ge.newAmbitButtonContainer, children: /* @__PURE__ */ i(
|
|
189
189
|
it,
|
|
190
190
|
{
|
|
191
|
-
style: { ...
|
|
191
|
+
style: { ...a },
|
|
192
192
|
onClick: u,
|
|
193
193
|
borderColor: "grey",
|
|
194
|
-
children: y(
|
|
194
|
+
children: y(d)
|
|
195
195
|
}
|
|
196
196
|
) })
|
|
197
197
|
]
|
|
@@ -232,9 +232,9 @@ const m0 = "_buttonsContainer_1ks7x_2", g0 = "_vertical_1ks7x_6", C0 = "_horizon
|
|
|
232
232
|
top: v0,
|
|
233
233
|
bottom: x0,
|
|
234
234
|
right: w0
|
|
235
|
-
}, pe = ({ text: n, position:
|
|
235
|
+
}, pe = ({ text: n, position: c, styleCustom: s = null }) => {
|
|
236
236
|
const { t: r } = A();
|
|
237
|
-
return /* @__PURE__ */ i("div", { className: `tooltip ${N0[
|
|
237
|
+
return /* @__PURE__ */ i("div", { className: `tooltip ${N0[c]}`, style: s, children: r(n) });
|
|
238
238
|
};
|
|
239
239
|
pe.propTypes = {
|
|
240
240
|
text: e.string.isRequired,
|
|
@@ -243,30 +243,30 @@ pe.propTypes = {
|
|
|
243
243
|
};
|
|
244
244
|
const k0 = ({
|
|
245
245
|
buttons: n = [],
|
|
246
|
-
orientation:
|
|
246
|
+
orientation: c = "horizontal",
|
|
247
247
|
showName: s = !0,
|
|
248
248
|
namePosition: r = "right",
|
|
249
249
|
useTooltip: t = !1,
|
|
250
250
|
tooltipPosition: o = "top"
|
|
251
251
|
}) => {
|
|
252
|
-
const { t:
|
|
252
|
+
const { t: d } = A();
|
|
253
253
|
return /* @__PURE__ */ i(
|
|
254
254
|
"div",
|
|
255
255
|
{
|
|
256
|
-
className: `${be.buttonsContainer} ${
|
|
257
|
-
${
|
|
258
|
-
children: n.map((
|
|
256
|
+
className: `${be.buttonsContainer} ${c === "vertical" && be.vertical}
|
|
257
|
+
${c === "horizontal" && be.horizontal}`,
|
|
258
|
+
children: n.map((a, l) => {
|
|
259
259
|
const {
|
|
260
260
|
icon: u,
|
|
261
|
-
activeIcon:
|
|
261
|
+
activeIcon: C,
|
|
262
262
|
isActive: m,
|
|
263
|
-
name:
|
|
263
|
+
name: f,
|
|
264
264
|
onClick: p,
|
|
265
265
|
disabled: y
|
|
266
|
-
} =
|
|
267
|
-
s && r === "left" && /* @__PURE__ */ i("span", { className: be.buttonName, children:
|
|
268
|
-
/* @__PURE__ */ i("img", { src: m ?
|
|
269
|
-
s && r === "right" && /* @__PURE__ */ i("span", { className: be.buttonName, children:
|
|
266
|
+
} = a, b = /* @__PURE__ */ h(et, { children: [
|
|
267
|
+
s && r === "left" && /* @__PURE__ */ i("span", { className: be.buttonName, children: d(f) }),
|
|
268
|
+
/* @__PURE__ */ i("img", { src: m ? C : u, alt: d(f) }),
|
|
269
|
+
s && r === "right" && /* @__PURE__ */ i("span", { className: be.buttonName, children: d(f) })
|
|
270
270
|
] });
|
|
271
271
|
return /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
272
272
|
/* @__PURE__ */ i(
|
|
@@ -279,8 +279,8 @@ const k0 = ({
|
|
|
279
279
|
children: b
|
|
280
280
|
}
|
|
281
281
|
),
|
|
282
|
-
t && /* @__PURE__ */ i(pe, { text:
|
|
283
|
-
] },
|
|
282
|
+
t && /* @__PURE__ */ i(pe, { text: f, position: o })
|
|
283
|
+
] }, l);
|
|
284
284
|
})
|
|
285
285
|
}
|
|
286
286
|
);
|
|
@@ -309,49 +309,49 @@ const $0 = "_indicatorsCategory_11gdl_2", S0 = "_title_11gdl_6", L0 = "_mainTitl
|
|
|
309
309
|
mainTitle: L0
|
|
310
310
|
}, ke = ({
|
|
311
311
|
isOpen: n,
|
|
312
|
-
onClick:
|
|
312
|
+
onClick: c,
|
|
313
313
|
children: s,
|
|
314
314
|
color: r,
|
|
315
315
|
activeColor: t = "#F8A925",
|
|
316
316
|
title: o = "Title",
|
|
317
317
|
//Change the height only if the title is more than one line or you change title fontSize, otherwise should be 53px
|
|
318
|
-
height:
|
|
318
|
+
height: d = 53,
|
|
319
319
|
//Adjust height if you change fontSize
|
|
320
|
-
titleFontStyles:
|
|
321
|
-
showBottomBar:
|
|
320
|
+
titleFontStyles: a,
|
|
321
|
+
showBottomBar: l = !0,
|
|
322
322
|
titleMarginChildren: u = 15,
|
|
323
|
-
mainTitle:
|
|
323
|
+
mainTitle: C = !1
|
|
324
324
|
}) => {
|
|
325
325
|
const { t: m } = A();
|
|
326
326
|
return /* @__PURE__ */ h(
|
|
327
327
|
St.div,
|
|
328
328
|
{
|
|
329
329
|
className: We.indicatorsCategory,
|
|
330
|
-
initial: { height: `${
|
|
331
|
-
animate: { height: n ? "auto" : `${
|
|
330
|
+
initial: { height: `${d}px` },
|
|
331
|
+
animate: { height: n ? "auto" : `${d}px` },
|
|
332
332
|
transition: { duration: 0.4 },
|
|
333
333
|
style: {
|
|
334
334
|
backgroundColor: "white",
|
|
335
|
-
borderBottom: n &&
|
|
336
|
-
minHeight:
|
|
335
|
+
borderBottom: n && l ? `1px solid ${t}` : "0px",
|
|
336
|
+
minHeight: C ? "70px" : "50px"
|
|
337
337
|
},
|
|
338
338
|
children: [
|
|
339
339
|
/* @__PURE__ */ h(
|
|
340
340
|
"h2",
|
|
341
341
|
{
|
|
342
342
|
style: {
|
|
343
|
-
...
|
|
343
|
+
...a
|
|
344
344
|
//marginBottom: titleMarginChildren ? titleMarginChildren : "auto",
|
|
345
345
|
},
|
|
346
|
-
className: `${We.title} ${
|
|
347
|
-
onClick:
|
|
346
|
+
className: `${We.title} ${C && We.mainTitle}`,
|
|
347
|
+
onClick: c,
|
|
348
348
|
children: [
|
|
349
349
|
/* @__PURE__ */ i("span", { style: { color: n ? t : r }, children: n ? "-" : "+" }),
|
|
350
350
|
/* @__PURE__ */ i("span", { style: { color: n ? t : r }, children: m(o) })
|
|
351
351
|
]
|
|
352
352
|
}
|
|
353
353
|
),
|
|
354
|
-
/* @__PURE__ */ i("div", { className: We.content, style: { padding:
|
|
354
|
+
/* @__PURE__ */ i("div", { className: We.content, style: { padding: C ? "20px 0px" : "0px" }, children: s })
|
|
355
355
|
]
|
|
356
356
|
}
|
|
357
357
|
);
|
|
@@ -370,7 +370,7 @@ ke.propTypes = {
|
|
|
370
370
|
const G1 = () => /* @__PURE__ */ i("div", { children: "EditAmbit" }), M0 = "data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%201L13.9996%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M14%201L1.00044%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e", T0 = "_AppliedFiltersContainer_cokx9_2", D0 = "_AppliedFilterContent_cokx9_11", Bt = {
|
|
371
371
|
AppliedFiltersContainer: T0,
|
|
372
372
|
AppliedFilterContent: D0
|
|
373
|
-
},
|
|
373
|
+
}, P = Qt((n) => ({
|
|
374
374
|
activeCategory: "",
|
|
375
375
|
activeSubCategory: "",
|
|
376
376
|
selectedIndicator: "",
|
|
@@ -378,11 +378,11 @@ const G1 = () => /* @__PURE__ */ i("div", { children: "EditAmbit" }), M0 = "data
|
|
|
378
378
|
fontColor: "#605B56",
|
|
379
379
|
inputsColor: "#605B56",
|
|
380
380
|
activeFiltersType: null
|
|
381
|
-
})), i2 = ({ title: n, onClick:
|
|
382
|
-
const { t:
|
|
383
|
-
|
|
381
|
+
})), i2 = ({ title: n, onClick: c, isOpen: s = !0, textColor: r = "#ffffff", backgroundColor: t = "#605B5680", activeColor: o, fontColor: d = "#605B56" }) => {
|
|
382
|
+
const { t: a } = A(), { tematicalFiltersSelected: l, activeFiltersType: u } = P((f) => f), C = (f) => {
|
|
383
|
+
P.setState((p) => ({
|
|
384
384
|
tematicalFiltersSelected: p.tematicalFiltersSelected.filter(
|
|
385
|
-
(y) => y.code !==
|
|
385
|
+
(y) => y.code !== f
|
|
386
386
|
)
|
|
387
387
|
}));
|
|
388
388
|
};
|
|
@@ -391,15 +391,15 @@ const G1 = () => /* @__PURE__ */ i("div", { children: "EditAmbit" }), M0 = "data
|
|
|
391
391
|
{
|
|
392
392
|
isOpen: s,
|
|
393
393
|
onClick: () => {
|
|
394
|
-
u == "applied" ?
|
|
394
|
+
u == "applied" ? P.setState(() => ({ activeFiltersType: null })) : P.setState(() => ({ activeFiltersType: "applied" }));
|
|
395
395
|
},
|
|
396
|
-
title: n ?
|
|
396
|
+
title: n ? a(n) : "Applied Filters",
|
|
397
397
|
activeColor: o,
|
|
398
398
|
mainTitle: !0,
|
|
399
|
-
color:
|
|
400
|
-
children: /* @__PURE__ */ i("div", { className: Bt.AppliedFiltersContainer, children:
|
|
401
|
-
|
|
402
|
-
/* @__PURE__ */ i("img", { src: M0, alt: "CloseIcon", onClick: () => f
|
|
399
|
+
color: d,
|
|
400
|
+
children: /* @__PURE__ */ i("div", { className: Bt.AppliedFiltersContainer, children: l == null ? void 0 : l.map((f, p) => /* @__PURE__ */ h("div", { className: Bt.AppliedFilterContent, style: { color: r, background: t }, children: [
|
|
401
|
+
a(f.name),
|
|
402
|
+
/* @__PURE__ */ i("img", { src: M0, alt: "CloseIcon", onClick: () => C(f.code), style: { cursor: "pointer" } })
|
|
403
403
|
] }, p)) })
|
|
404
404
|
}
|
|
405
405
|
);
|
|
@@ -423,28 +423,28 @@ const B0 = "_layersList_cn837_25", V0 = "_layerName_cn837_34", Vt = {
|
|
|
423
423
|
layerName: V0
|
|
424
424
|
}, s2 = ({
|
|
425
425
|
title: n,
|
|
426
|
-
isOpen:
|
|
426
|
+
isOpen: c = !0,
|
|
427
427
|
fontColor: s = "#605B56",
|
|
428
428
|
backgroundColor: r = "#605B5680",
|
|
429
429
|
activeColor: t,
|
|
430
430
|
geoLayers: o = [],
|
|
431
|
-
onGeoLayersChange:
|
|
431
|
+
onGeoLayersChange: d
|
|
432
432
|
}) => {
|
|
433
|
-
const { t:
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
const
|
|
433
|
+
const { t: a } = A(), { activeFiltersType: l } = P((m) => m), u = () => {
|
|
434
|
+
l === "geographical" ? P.setState({ activeFiltersType: null }) : P.setState({ activeFiltersType: "geographical" });
|
|
435
|
+
}, C = (m) => {
|
|
436
|
+
const f = o.map((p) => ({
|
|
437
437
|
...p,
|
|
438
438
|
active: p.name === m.name
|
|
439
439
|
}));
|
|
440
|
-
|
|
440
|
+
d == null || d(f);
|
|
441
441
|
};
|
|
442
442
|
return /* @__PURE__ */ i(
|
|
443
443
|
ke,
|
|
444
444
|
{
|
|
445
|
-
isOpen:
|
|
445
|
+
isOpen: l === "geographical",
|
|
446
446
|
onClick: u,
|
|
447
|
-
title: n ?
|
|
447
|
+
title: n ? a(n) : "Geographical Filters",
|
|
448
448
|
activeColor: t,
|
|
449
449
|
color: s,
|
|
450
450
|
mainTitle: !0,
|
|
@@ -456,8 +456,8 @@ const B0 = "_layersList_cn837_25", V0 = "_layerName_cn837_34", Vt = {
|
|
|
456
456
|
color: m.active ? t : s,
|
|
457
457
|
fontWeight: m.active ? "bold" : "normal"
|
|
458
458
|
},
|
|
459
|
-
onClick: () =>
|
|
460
|
-
children:
|
|
459
|
+
onClick: () => C(m),
|
|
460
|
+
children: a(m.name)
|
|
461
461
|
},
|
|
462
462
|
m.name
|
|
463
463
|
)) })
|
|
@@ -476,16 +476,16 @@ const F0 = "_checkboxContainer_1nxra_2", A0 = {
|
|
|
476
476
|
checkboxContainer: F0
|
|
477
477
|
}, r2 = ({
|
|
478
478
|
onClick: n,
|
|
479
|
-
containerStyles:
|
|
479
|
+
containerStyles: c,
|
|
480
480
|
color: s = "#605B56",
|
|
481
481
|
indicator: r,
|
|
482
482
|
value: t
|
|
483
483
|
}) => {
|
|
484
|
-
const { t: o } = A(), { title:
|
|
484
|
+
const { t: o } = A(), { title: d } = r || {}, { fontColor: a, inputsColor: l } = P((u) => u);
|
|
485
485
|
return /* @__PURE__ */ h(
|
|
486
486
|
"div",
|
|
487
487
|
{
|
|
488
|
-
style: { ...
|
|
488
|
+
style: { ...c, color: s },
|
|
489
489
|
role: "checkbox",
|
|
490
490
|
className: A0.checkboxContainer,
|
|
491
491
|
onClick: n,
|
|
@@ -498,12 +498,12 @@ const F0 = "_checkboxContainer_1nxra_2", A0 = {
|
|
|
498
498
|
value: t,
|
|
499
499
|
readOnly: !0,
|
|
500
500
|
style: {
|
|
501
|
-
border: `1.5px solid ${t ?
|
|
502
|
-
backgroundColor: t ?
|
|
501
|
+
border: `1.5px solid ${t ? l : a}`,
|
|
502
|
+
backgroundColor: t ? l : "white"
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
),
|
|
506
|
-
/* @__PURE__ */ i("span", { className: "checkmark", children: o(
|
|
506
|
+
/* @__PURE__ */ i("span", { className: "checkmark", children: o(d) })
|
|
507
507
|
]
|
|
508
508
|
}
|
|
509
509
|
);
|
|
@@ -519,13 +519,13 @@ r2.propTypes = {
|
|
|
519
519
|
}),
|
|
520
520
|
checkedColor: e.string
|
|
521
521
|
};
|
|
522
|
-
function bt(n,
|
|
522
|
+
function bt(n, c) {
|
|
523
523
|
return bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, r) {
|
|
524
524
|
return s.__proto__ = r, s;
|
|
525
|
-
}, bt(n,
|
|
525
|
+
}, bt(n, c);
|
|
526
526
|
}
|
|
527
|
-
function O0(n,
|
|
528
|
-
n.prototype = Object.create(
|
|
527
|
+
function O0(n, c) {
|
|
528
|
+
n.prototype = Object.create(c.prototype), n.prototype.constructor = n, bt(n, c);
|
|
529
529
|
}
|
|
530
530
|
function pt(n) {
|
|
531
531
|
return n && n.stopPropagation && n.stopPropagation(), n && n.preventDefault && n.preventDefault(), !1;
|
|
@@ -537,129 +537,129 @@ function Ke(n) {
|
|
|
537
537
|
return n !== null && n.length === 1 ? n[0] : n.slice();
|
|
538
538
|
}
|
|
539
539
|
function Ue(n) {
|
|
540
|
-
Object.keys(n).forEach((
|
|
541
|
-
typeof document < "u" && document.addEventListener(
|
|
540
|
+
Object.keys(n).forEach((c) => {
|
|
541
|
+
typeof document < "u" && document.addEventListener(c, n[c], !1);
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
function _e(n,
|
|
544
|
+
function _e(n, c) {
|
|
545
545
|
return _t(function(s, r) {
|
|
546
546
|
let t = s;
|
|
547
547
|
return t <= r.min && (t = r.min), t >= r.max && (t = r.max), t;
|
|
548
|
-
}(n,
|
|
548
|
+
}(n, c), c);
|
|
549
549
|
}
|
|
550
|
-
function _t(n,
|
|
551
|
-
const s = (n -
|
|
550
|
+
function _t(n, c) {
|
|
551
|
+
const s = (n - c.min) % c.step;
|
|
552
552
|
let r = n - s;
|
|
553
|
-
return 2 * Math.abs(s) >=
|
|
553
|
+
return 2 * Math.abs(s) >= c.step && (r += s > 0 ? c.step : -c.step), parseFloat(r.toFixed(5));
|
|
554
554
|
}
|
|
555
555
|
let vt = function(n) {
|
|
556
|
-
function
|
|
556
|
+
function c(r) {
|
|
557
557
|
var t;
|
|
558
558
|
(t = n.call(this, r) || this).onKeyUp = () => {
|
|
559
559
|
t.onEnd();
|
|
560
560
|
}, t.onMouseUp = () => {
|
|
561
561
|
t.onEnd(t.getMouseEventMap());
|
|
562
|
-
}, t.onTouchEnd = (
|
|
563
|
-
|
|
562
|
+
}, t.onTouchEnd = (a) => {
|
|
563
|
+
a.preventDefault(), t.onEnd(t.getTouchEventMap());
|
|
564
564
|
}, t.onBlur = () => {
|
|
565
565
|
t.setState({ index: -1 }, t.onEnd(t.getKeyDownEventMap()));
|
|
566
|
-
}, t.onMouseMove = (
|
|
566
|
+
}, t.onMouseMove = (a) => {
|
|
567
567
|
t.setState({ pending: !0 });
|
|
568
|
-
const
|
|
569
|
-
t.move(
|
|
570
|
-
}, t.onTouchMove = (
|
|
571
|
-
if (
|
|
568
|
+
const l = t.getMousePosition(a), u = t.getDiffPosition(l[0]), C = t.getValueFromPosition(u);
|
|
569
|
+
t.move(C);
|
|
570
|
+
}, t.onTouchMove = (a) => {
|
|
571
|
+
if (a.touches.length > 1) return;
|
|
572
572
|
t.setState({ pending: !0 });
|
|
573
|
-
const
|
|
573
|
+
const l = t.getTouchPosition(a);
|
|
574
574
|
if (t.isScrolling === void 0) {
|
|
575
|
-
const m =
|
|
576
|
-
t.isScrolling = Math.abs(
|
|
575
|
+
const m = l[0] - t.startPosition[0], f = l[1] - t.startPosition[1];
|
|
576
|
+
t.isScrolling = Math.abs(f) > Math.abs(m);
|
|
577
577
|
}
|
|
578
578
|
if (t.isScrolling) return void t.setState({ index: -1 });
|
|
579
|
-
const u = t.getDiffPosition(
|
|
580
|
-
t.move(
|
|
581
|
-
}, t.onKeyDown = (
|
|
582
|
-
if (!(
|
|
579
|
+
const u = t.getDiffPosition(l[0]), C = t.getValueFromPosition(u);
|
|
580
|
+
t.move(C);
|
|
581
|
+
}, t.onKeyDown = (a) => {
|
|
582
|
+
if (!(a.ctrlKey || a.shiftKey || a.altKey || a.metaKey)) switch (t.setState({ pending: !0 }), a.key) {
|
|
583
583
|
case "ArrowLeft":
|
|
584
584
|
case "ArrowDown":
|
|
585
585
|
case "Left":
|
|
586
586
|
case "Down":
|
|
587
|
-
|
|
587
|
+
a.preventDefault(), t.moveDownByStep();
|
|
588
588
|
break;
|
|
589
589
|
case "ArrowRight":
|
|
590
590
|
case "ArrowUp":
|
|
591
591
|
case "Right":
|
|
592
592
|
case "Up":
|
|
593
|
-
|
|
593
|
+
a.preventDefault(), t.moveUpByStep();
|
|
594
594
|
break;
|
|
595
595
|
case "Home":
|
|
596
|
-
|
|
596
|
+
a.preventDefault(), t.move(t.props.min);
|
|
597
597
|
break;
|
|
598
598
|
case "End":
|
|
599
|
-
|
|
599
|
+
a.preventDefault(), t.move(t.props.max);
|
|
600
600
|
break;
|
|
601
601
|
case "PageDown":
|
|
602
|
-
|
|
602
|
+
a.preventDefault(), t.moveDownByStep(t.props.pageFn(t.props.step));
|
|
603
603
|
break;
|
|
604
604
|
case "PageUp":
|
|
605
|
-
|
|
605
|
+
a.preventDefault(), t.moveUpByStep(t.props.pageFn(t.props.step));
|
|
606
606
|
}
|
|
607
|
-
}, t.onSliderMouseDown = (
|
|
608
|
-
if (!t.props.disabled &&
|
|
607
|
+
}, t.onSliderMouseDown = (a) => {
|
|
608
|
+
if (!t.props.disabled && a.button !== 2) {
|
|
609
609
|
if (t.setState({ pending: !0 }), !t.props.snapDragDisabled) {
|
|
610
|
-
const
|
|
611
|
-
t.forceValueFromPosition(
|
|
612
|
-
t.start(u,
|
|
610
|
+
const l = t.getMousePosition(a);
|
|
611
|
+
t.forceValueFromPosition(l[0], (u) => {
|
|
612
|
+
t.start(u, l[0]), Ue(t.getMouseEventMap());
|
|
613
613
|
});
|
|
614
614
|
}
|
|
615
|
-
pt(
|
|
615
|
+
pt(a);
|
|
616
616
|
}
|
|
617
|
-
}, t.onSliderClick = (
|
|
617
|
+
}, t.onSliderClick = (a) => {
|
|
618
618
|
if (!t.props.disabled && t.props.onSliderClick && !t.hasMoved) {
|
|
619
|
-
const
|
|
619
|
+
const l = t.getMousePosition(a), u = _e(t.calcValue(t.calcOffsetFromPosition(l[0])), t.props);
|
|
620
620
|
t.props.onSliderClick(u);
|
|
621
621
|
}
|
|
622
|
-
}, t.createOnKeyDown = (
|
|
623
|
-
t.props.disabled || (t.start(
|
|
624
|
-
}, t.createOnMouseDown = (
|
|
625
|
-
if (t.props.disabled ||
|
|
622
|
+
}, t.createOnKeyDown = (a) => (l) => {
|
|
623
|
+
t.props.disabled || (t.start(a), Ue(t.getKeyDownEventMap()), pt(l));
|
|
624
|
+
}, t.createOnMouseDown = (a) => (l) => {
|
|
625
|
+
if (t.props.disabled || l.button === 2) return;
|
|
626
626
|
t.setState({ pending: !0 });
|
|
627
|
-
const u = t.getMousePosition(
|
|
628
|
-
t.start(
|
|
629
|
-
}, t.createOnTouchStart = (
|
|
630
|
-
if (t.props.disabled ||
|
|
627
|
+
const u = t.getMousePosition(l);
|
|
628
|
+
t.start(a, u[0]), Ue(t.getMouseEventMap()), pt(l);
|
|
629
|
+
}, t.createOnTouchStart = (a) => (l) => {
|
|
630
|
+
if (t.props.disabled || l.touches.length > 1) return;
|
|
631
631
|
t.setState({ pending: !0 });
|
|
632
|
-
const u = t.getTouchPosition(
|
|
633
|
-
t.startPosition = u, t.isScrolling = void 0, t.start(
|
|
634
|
-
|
|
635
|
-
}(
|
|
632
|
+
const u = t.getTouchPosition(l);
|
|
633
|
+
t.startPosition = u, t.isScrolling = void 0, t.start(a, u[0]), Ue(t.getTouchEventMap()), function(C) {
|
|
634
|
+
C.stopPropagation && C.stopPropagation();
|
|
635
|
+
}(l);
|
|
636
636
|
}, t.handleResize = () => {
|
|
637
|
-
const
|
|
637
|
+
const a = window.setTimeout(() => {
|
|
638
638
|
t.pendingResizeTimeouts.shift(), t.resize();
|
|
639
639
|
}, 0);
|
|
640
|
-
t.pendingResizeTimeouts.push(
|
|
641
|
-
}, t.renderThumb = (
|
|
642
|
-
const u = t.props.thumbClassName + " " + t.props.thumbClassName + "-" +
|
|
643
|
-
t["thumb" +
|
|
644
|
-
}, key: t.props.thumbClassName + "-" +
|
|
645
|
-
return t.props.ariaValuetext && (
|
|
646
|
-
}, t.renderTrack = (
|
|
647
|
-
const
|
|
648
|
-
return t.props.renderTrack(
|
|
640
|
+
t.pendingResizeTimeouts.push(a);
|
|
641
|
+
}, t.renderThumb = (a, l) => {
|
|
642
|
+
const u = t.props.thumbClassName + " " + t.props.thumbClassName + "-" + l + " " + (t.state.index === l ? t.props.thumbActiveClassName : ""), C = { ref: (f) => {
|
|
643
|
+
t["thumb" + l] = f;
|
|
644
|
+
}, key: t.props.thumbClassName + "-" + l, className: u, style: a, onMouseDown: t.createOnMouseDown(l), onTouchStart: t.createOnTouchStart(l), onFocus: t.createOnKeyDown(l), tabIndex: 0, role: "slider", "aria-orientation": t.props.orientation, "aria-valuenow": t.state.value[l], "aria-valuemin": t.props.min, "aria-valuemax": t.props.max, "aria-label": Array.isArray(t.props.ariaLabel) ? t.props.ariaLabel[l] : t.props.ariaLabel, "aria-labelledby": Array.isArray(t.props.ariaLabelledby) ? t.props.ariaLabelledby[l] : t.props.ariaLabelledby, "aria-disabled": t.props.disabled }, m = { index: l, value: Ke(t.state.value), valueNow: t.state.value[l] };
|
|
645
|
+
return t.props.ariaValuetext && (C["aria-valuetext"] = typeof t.props.ariaValuetext == "string" ? t.props.ariaValuetext : t.props.ariaValuetext(m)), t.props.renderThumb(C, m);
|
|
646
|
+
}, t.renderTrack = (a, l, u) => {
|
|
647
|
+
const C = { key: t.props.trackClassName + "-" + a, className: t.props.trackClassName + " " + t.props.trackClassName + "-" + a, style: t.buildTrackStyle(l, t.state.upperBound - u) }, m = { index: a, value: Ke(t.state.value) };
|
|
648
|
+
return t.props.renderTrack(C, m);
|
|
649
649
|
};
|
|
650
650
|
let o = ht(r.value);
|
|
651
651
|
o.length || (o = ht(r.defaultValue)), t.pendingResizeTimeouts = [];
|
|
652
|
-
const
|
|
653
|
-
for (let
|
|
654
|
-
return t.resizeObserver = null, t.resizeElementRef = E.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value: o, zIndices:
|
|
652
|
+
const d = [];
|
|
653
|
+
for (let a = 0; a < o.length; a += 1) o[a] = _e(o[a], r), d.push(a);
|
|
654
|
+
return t.resizeObserver = null, t.resizeElementRef = E.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value: o, zIndices: d }, t;
|
|
655
655
|
}
|
|
656
|
-
O0(
|
|
657
|
-
var s =
|
|
656
|
+
O0(c, n);
|
|
657
|
+
var s = c.prototype;
|
|
658
658
|
return s.componentDidMount = function() {
|
|
659
659
|
typeof window < "u" && (this.resizeObserver = new ResizeObserver(this.handleResize), this.resizeObserver.observe(this.resizeElementRef.current), this.resize());
|
|
660
|
-
},
|
|
660
|
+
}, c.getDerivedStateFromProps = function(r, t) {
|
|
661
661
|
const o = ht(r.value);
|
|
662
|
-
return o.length ? t.pending ? null : { value: o.map((
|
|
662
|
+
return o.length ? t.pending ? null : { value: o.map((d) => _e(d, r)) } : null;
|
|
663
663
|
}, s.componentDidUpdate = function() {
|
|
664
664
|
this.state.upperBound === 0 && this.resize();
|
|
665
665
|
}, s.componentWillUnmount = function() {
|
|
@@ -674,10 +674,10 @@ let vt = function(n) {
|
|
|
674
674
|
return Ke(this.state.value);
|
|
675
675
|
}, s.getClosestIndex = function(r) {
|
|
676
676
|
let t = Number.MAX_VALUE, o = -1;
|
|
677
|
-
const { value:
|
|
678
|
-
for (let
|
|
679
|
-
const u = this.calcOffset(
|
|
680
|
-
|
|
677
|
+
const { value: d } = this.state, a = d.length;
|
|
678
|
+
for (let l = 0; l < a; l += 1) {
|
|
679
|
+
const u = this.calcOffset(d[l]), C = Math.abs(r - u);
|
|
680
|
+
C < t && (t = C, o = l);
|
|
681
681
|
}
|
|
682
682
|
return o;
|
|
683
683
|
}, s.getMousePosition = function(r) {
|
|
@@ -700,23 +700,23 @@ let vt = function(n) {
|
|
|
700
700
|
}, s.resize = function() {
|
|
701
701
|
const { slider: r, thumb0: t } = this;
|
|
702
702
|
if (!r || !t) return;
|
|
703
|
-
const o = this.sizeKey(),
|
|
704
|
-
this.state.upperBound === m && this.state.sliderLength ===
|
|
703
|
+
const o = this.sizeKey(), d = r.getBoundingClientRect(), a = r[o], l = d[this.posMaxKey()], u = d[this.posMinKey()], C = t.getBoundingClientRect()[o.replace("client", "").toLowerCase()], m = a - C, f = Math.abs(l - u);
|
|
704
|
+
this.state.upperBound === m && this.state.sliderLength === f && this.state.thumbSize === C || this.setState({ upperBound: m, sliderLength: f, thumbSize: C });
|
|
705
705
|
}, s.calcOffset = function(r) {
|
|
706
706
|
const t = this.props.max - this.props.min;
|
|
707
707
|
return t === 0 ? 0 : (r - this.props.min) / t * this.state.upperBound;
|
|
708
708
|
}, s.calcValue = function(r) {
|
|
709
709
|
return r / this.state.upperBound * (this.props.max - this.props.min) + this.props.min;
|
|
710
710
|
}, s.calcOffsetFromPosition = function(r) {
|
|
711
|
-
const { slider: t } = this, o = t.getBoundingClientRect(),
|
|
712
|
-
let
|
|
713
|
-
return this.props.invert && (
|
|
711
|
+
const { slider: t } = this, o = t.getBoundingClientRect(), d = o[this.posMaxKey()], a = o[this.posMinKey()];
|
|
712
|
+
let l = r - (window["page" + this.axisKey() + "Offset"] + (this.props.invert ? d : a));
|
|
713
|
+
return this.props.invert && (l = this.state.sliderLength - l), l -= this.state.thumbSize / 2, l;
|
|
714
714
|
}, s.forceValueFromPosition = function(r, t) {
|
|
715
|
-
const o = this.calcOffsetFromPosition(r),
|
|
716
|
-
|
|
717
|
-
for (let u = 0; u <
|
|
718
|
-
this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0, this.setState({ value:
|
|
719
|
-
t(
|
|
715
|
+
const o = this.calcOffsetFromPosition(r), d = this.getClosestIndex(o), a = _e(this.calcValue(o), this.props), l = this.state.value.slice();
|
|
716
|
+
l[d] = a;
|
|
717
|
+
for (let u = 0; u < l.length - 1; u += 1) if (l[u + 1] - l[u] < this.props.minDistance) return;
|
|
718
|
+
this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0, this.setState({ value: l }, () => {
|
|
719
|
+
t(d), this.fireChangeEvent("onChange");
|
|
720
720
|
});
|
|
721
721
|
}, s.clearPendingResizeTimeouts = function() {
|
|
722
722
|
do {
|
|
@@ -726,8 +726,8 @@ let vt = function(n) {
|
|
|
726
726
|
}, s.start = function(r, t) {
|
|
727
727
|
const o = this["thumb" + r];
|
|
728
728
|
o && o.focus();
|
|
729
|
-
const { zIndices:
|
|
730
|
-
|
|
729
|
+
const { zIndices: d } = this.state;
|
|
730
|
+
d.splice(d.indexOf(r), 1), d.push(r), this.setState((a) => ({ startValue: a.value[r], startPosition: t !== void 0 ? t : a.startPosition, index: r, zIndices: d }));
|
|
731
731
|
}, s.moveUpByStep = function(r) {
|
|
732
732
|
r === void 0 && (r = this.props.step);
|
|
733
733
|
const t = this.state.value[this.state.index], o = _e(this.props.invert && this.props.orientation === "horizontal" ? t - r : t + r, this.props);
|
|
@@ -737,36 +737,36 @@ let vt = function(n) {
|
|
|
737
737
|
const t = this.state.value[this.state.index], o = _e(this.props.invert && this.props.orientation === "horizontal" ? t + r : t - r, this.props);
|
|
738
738
|
this.move(Math.max(o, this.props.min));
|
|
739
739
|
}, s.move = function(r) {
|
|
740
|
-
const t = this.state.value.slice(), { index: o } = this.state, { length:
|
|
741
|
-
if (r ===
|
|
740
|
+
const t = this.state.value.slice(), { index: o } = this.state, { length: d } = t, a = t[o];
|
|
741
|
+
if (r === a) return;
|
|
742
742
|
this.hasMoved || this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0;
|
|
743
|
-
const { pearling:
|
|
744
|
-
if (!
|
|
743
|
+
const { pearling: l, max: u, min: C, minDistance: m } = this.props;
|
|
744
|
+
if (!l) {
|
|
745
745
|
if (o > 0) {
|
|
746
|
-
const
|
|
747
|
-
r <
|
|
746
|
+
const f = t[o - 1];
|
|
747
|
+
r < f + m && (r = f + m);
|
|
748
748
|
}
|
|
749
|
-
if (o <
|
|
750
|
-
const
|
|
751
|
-
r >
|
|
749
|
+
if (o < d - 1) {
|
|
750
|
+
const f = t[o + 1];
|
|
751
|
+
r > f - m && (r = f - m);
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
t[o] = r,
|
|
755
|
-
for (let v = 0; v <
|
|
754
|
+
t[o] = r, l && d > 1 && (r > a ? (this.pushSucceeding(t, m, o), function(f, p, y, b) {
|
|
755
|
+
for (let v = 0; v < f; v += 1) {
|
|
756
756
|
const _ = b - v * y;
|
|
757
|
-
p[
|
|
757
|
+
p[f - 1 - v] > _ && (p[f - 1 - v] = _);
|
|
758
758
|
}
|
|
759
|
-
}(
|
|
760
|
-
for (let v = 0; v <
|
|
759
|
+
}(d, t, m, u)) : r < a && (this.pushPreceding(t, m, o), function(f, p, y, b) {
|
|
760
|
+
for (let v = 0; v < f; v += 1) {
|
|
761
761
|
const _ = b + v * y;
|
|
762
762
|
p[v] < _ && (p[v] = _);
|
|
763
763
|
}
|
|
764
|
-
}(
|
|
764
|
+
}(d, t, m, C))), this.setState({ value: t }, this.fireChangeEvent.bind(this, "onChange"));
|
|
765
765
|
}, s.pushSucceeding = function(r, t, o) {
|
|
766
|
-
let
|
|
767
|
-
for (
|
|
766
|
+
let d, a;
|
|
767
|
+
for (d = o, a = r[d] + t; r[d + 1] !== null && a > r[d + 1]; d += 1, a = r[d] + t) r[d + 1] = _t(a, this.props);
|
|
768
768
|
}, s.pushPreceding = function(r, t, o) {
|
|
769
|
-
for (let
|
|
769
|
+
for (let d = o, a = r[d] - t; r[d - 1] !== null && a < r[d - 1]; d -= 1, a = r[d] - t) r[d - 1] = _t(a, this.props);
|
|
770
770
|
}, s.axisKey = function() {
|
|
771
771
|
return this.props.orientation === "vertical" ? "Y" : "X";
|
|
772
772
|
}, s.orthogonalAxisKey = function() {
|
|
@@ -790,30 +790,30 @@ let vt = function(n) {
|
|
|
790
790
|
return (t = { position: "absolute" })[this.posMinKey()] = r, t;
|
|
791
791
|
}, s.renderThumbs = function(r) {
|
|
792
792
|
const { length: t } = r, o = [];
|
|
793
|
-
for (let
|
|
794
|
-
const
|
|
795
|
-
for (let
|
|
796
|
-
return
|
|
793
|
+
for (let a = 0; a < t; a += 1) o[a] = this.buildThumbStyle(r[a], a);
|
|
794
|
+
const d = [];
|
|
795
|
+
for (let a = 0; a < t; a += 1) d[a] = this.renderThumb(o[a], a);
|
|
796
|
+
return d;
|
|
797
797
|
}, s.renderTracks = function(r) {
|
|
798
798
|
const t = [], o = r.length - 1;
|
|
799
799
|
t.push(this.renderTrack(0, 0, r[0]));
|
|
800
|
-
for (let
|
|
800
|
+
for (let d = 0; d < o; d += 1) t.push(this.renderTrack(d + 1, r[d], r[d + 1]));
|
|
801
801
|
return t.push(this.renderTrack(o + 1, r[o], this.state.upperBound)), t;
|
|
802
802
|
}, s.renderMarks = function() {
|
|
803
803
|
let { marks: r } = this.props;
|
|
804
804
|
const t = this.props.max - this.props.min + 1;
|
|
805
|
-
return typeof r == "boolean" ? r = Array.from({ length: t }).map((o,
|
|
806
|
-
const
|
|
807
|
-
return this.props.renderMark(
|
|
805
|
+
return typeof r == "boolean" ? r = Array.from({ length: t }).map((o, d) => d) : typeof r == "number" && (r = Array.from({ length: t }).map((o, d) => d).filter((o) => o % r == 0)), r.map(parseFloat).sort((o, d) => o - d).map((o) => {
|
|
806
|
+
const d = this.calcOffset(o), a = { key: o, className: this.props.markClassName, style: this.buildMarkStyle(d) };
|
|
807
|
+
return this.props.renderMark(a);
|
|
808
808
|
});
|
|
809
809
|
}, s.render = function() {
|
|
810
810
|
const r = [], { value: t } = this.state, o = t.length;
|
|
811
811
|
for (let u = 0; u < o; u += 1) r[u] = this.calcOffset(t[u], u);
|
|
812
|
-
const
|
|
812
|
+
const d = this.props.withTracks ? this.renderTracks(r) : null, a = this.renderThumbs(r), l = this.props.marks ? this.renderMarks() : null;
|
|
813
813
|
return E.createElement("div", { ref: (u) => {
|
|
814
814
|
this.slider = u, this.resizeElementRef.current = u;
|
|
815
|
-
}, style: { position: "relative" }, className: this.props.className + (this.props.disabled ? " disabled" : ""), onMouseDown: this.onSliderMouseDown, onClick: this.onSliderClick },
|
|
816
|
-
},
|
|
815
|
+
}, style: { position: "relative" }, className: this.props.className + (this.props.disabled ? " disabled" : ""), onMouseDown: this.onSliderMouseDown, onClick: this.onSliderClick }, d, a, l);
|
|
816
|
+
}, c;
|
|
817
817
|
}(E.Component);
|
|
818
818
|
vt.displayName = "ReactSlider", vt.defaultProps = { min: 0, max: 100, step: 1, pageFn: (n) => 10 * n, minDistance: 0, defaultValue: 0, orientation: "horizontal", className: "slider", thumbClassName: "thumb", thumbActiveClassName: "active", trackClassName: "track", markClassName: "mark", withTracks: !0, pearling: !1, disabled: !1, snapDragDisabled: !1, invert: !1, marks: [], renderThumb: (n) => E.createElement("div", n), renderTrack: (n) => E.createElement("div", n), renderMark: (n) => E.createElement("span", n) };
|
|
819
819
|
var xt = vt;
|
|
@@ -826,25 +826,25 @@ const R0 = "_container_4u41i_2", I0 = "_unitLabel_4u41i_8", E0 = "_slider_4u41i_
|
|
|
826
826
|
labels: P0
|
|
827
827
|
}, o2 = ({
|
|
828
828
|
min: n = 0,
|
|
829
|
-
max:
|
|
829
|
+
max: c = 100,
|
|
830
830
|
step: s = 1,
|
|
831
831
|
onChange: r,
|
|
832
832
|
width: t = 300,
|
|
833
833
|
unit: o,
|
|
834
|
-
fontColor:
|
|
835
|
-
defaultValue:
|
|
836
|
-
isDate:
|
|
834
|
+
fontColor: d = "#605B56",
|
|
835
|
+
defaultValue: a,
|
|
836
|
+
isDate: l
|
|
837
837
|
}) => {
|
|
838
|
-
const { t: u } = A(),
|
|
838
|
+
const { t: u } = A(), C = l ? new Date(n).getTime() : null, m = l ? new Date(c).getTime() : null, [f, p] = I(l ? [C, m] : [n, c]), y = (b) => {
|
|
839
839
|
p(b), r == null || r({ min: b[0], max: b[1] });
|
|
840
840
|
};
|
|
841
841
|
return O(() => {
|
|
842
|
-
|
|
843
|
-
}, [
|
|
842
|
+
a || p(l ? [C, m] : [n, c]);
|
|
843
|
+
}, [a, l]), /* @__PURE__ */ h(
|
|
844
844
|
"div",
|
|
845
845
|
{
|
|
846
846
|
className: Le.container,
|
|
847
|
-
style: { width: `${t}px`, color: `${
|
|
847
|
+
style: { width: `${t}px`, color: `${d}` },
|
|
848
848
|
children: [
|
|
849
849
|
/* @__PURE__ */ i("div", { className: Le.unitLabel, children: /* @__PURE__ */ i("span", { children: u(o) }) }),
|
|
850
850
|
/* @__PURE__ */ i(
|
|
@@ -853,27 +853,27 @@ const R0 = "_container_4u41i_2", I0 = "_unitLabel_4u41i_8", E0 = "_slider_4u41i_
|
|
|
853
853
|
className: Le.slider,
|
|
854
854
|
thumbClassName: Le.thumb,
|
|
855
855
|
trackClassName: Le.track,
|
|
856
|
-
min:
|
|
857
|
-
max:
|
|
858
|
-
step:
|
|
859
|
-
value:
|
|
856
|
+
min: l ? C : n,
|
|
857
|
+
max: l ? m : c,
|
|
858
|
+
step: l ? (m - C) / 30 : s,
|
|
859
|
+
value: f,
|
|
860
860
|
onAfterChange: y,
|
|
861
861
|
withTracks: !0,
|
|
862
|
-
pearling: !
|
|
863
|
-
minDistance:
|
|
862
|
+
pearling: !l,
|
|
863
|
+
minDistance: l ? 0 : 0.1
|
|
864
864
|
}
|
|
865
865
|
),
|
|
866
866
|
/* @__PURE__ */ h("div", { className: Le.labels, children: [
|
|
867
|
-
/* @__PURE__ */ i("span", { children:
|
|
867
|
+
/* @__PURE__ */ i("span", { children: l ? new Date(f[0]).toLocaleDateString("en-EN", {
|
|
868
868
|
day: "2-digit",
|
|
869
869
|
month: "short",
|
|
870
870
|
year: "numeric"
|
|
871
|
-
}) :
|
|
872
|
-
/* @__PURE__ */ i("span", { children:
|
|
871
|
+
}) : f[0] }),
|
|
872
|
+
/* @__PURE__ */ i("span", { children: l ? new Date(f[1]).toLocaleDateString("en-EN", {
|
|
873
873
|
day: "2-digit",
|
|
874
874
|
month: "short",
|
|
875
875
|
year: "numeric"
|
|
876
|
-
}) :
|
|
876
|
+
}) : f[1] })
|
|
877
877
|
] })
|
|
878
878
|
]
|
|
879
879
|
}
|
|
@@ -899,18 +899,18 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
899
899
|
}, Lt = ({
|
|
900
900
|
indicator: n,
|
|
901
901
|
//onChangeBothType
|
|
902
|
-
activeColor:
|
|
902
|
+
activeColor: c
|
|
903
903
|
}) => {
|
|
904
904
|
const [s, r] = I(), {
|
|
905
905
|
type: t,
|
|
906
906
|
name: o,
|
|
907
|
-
values:
|
|
908
|
-
minValue:
|
|
909
|
-
maxValue:
|
|
907
|
+
values: d,
|
|
908
|
+
minValue: a,
|
|
909
|
+
maxValue: l,
|
|
910
910
|
unit: u,
|
|
911
|
-
step:
|
|
911
|
+
step: C,
|
|
912
912
|
disabled: m,
|
|
913
|
-
isDate:
|
|
913
|
+
isDate: f
|
|
914
914
|
} = n || {}, p = Fe(
|
|
915
915
|
() => t == "cat" || s == "cat",
|
|
916
916
|
[s, t]
|
|
@@ -922,44 +922,44 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
922
922
|
selectedIndicator: v,
|
|
923
923
|
fontColor: _,
|
|
924
924
|
inputsColor: w
|
|
925
|
-
} =
|
|
925
|
+
} = P((N) => N), L = (N) => {
|
|
926
926
|
if (N) {
|
|
927
927
|
const { min: x, max: S, valueClicked: $, allValues: k } = N || {}, { code: T, type: F, source: D } = n || {}, B = y ? "abs" : p ? "cat" : "both";
|
|
928
928
|
let R = T[0];
|
|
929
|
-
F == "both" && (R = B == "cat" ? T[1] : T[0]), B == "cat" ?
|
|
929
|
+
F == "both" && (R = B == "cat" ? T[1] : T[0]), B == "cat" ? P.setState((Z) => {
|
|
930
930
|
let ee = Z.tematicalFiltersSelected.find(
|
|
931
931
|
(H) => H.code === R
|
|
932
932
|
);
|
|
933
933
|
if (ee) {
|
|
934
934
|
let H = [ee.values];
|
|
935
935
|
return ee.values.includes($) ? H = ee.values.filter(
|
|
936
|
-
(
|
|
936
|
+
(q) => q !== $
|
|
937
937
|
) : H = [...ee.values, $], H.length == k.length ? {
|
|
938
938
|
tematicalFiltersSelected: Z.tematicalFiltersSelected.filter(
|
|
939
|
-
(
|
|
939
|
+
(q) => q.code !== R
|
|
940
940
|
)
|
|
941
941
|
} : {
|
|
942
942
|
tematicalFiltersSelected: Z.tematicalFiltersSelected.map(
|
|
943
|
-
(
|
|
943
|
+
(q) => q.code === R ? { ...q, values: H } : q
|
|
944
944
|
)
|
|
945
945
|
};
|
|
946
946
|
} else {
|
|
947
|
-
let H = (k || []).map((
|
|
947
|
+
let H = (k || []).map((q, ie) => ie);
|
|
948
948
|
return {
|
|
949
949
|
tematicalFiltersSelected: [
|
|
950
950
|
...b,
|
|
951
951
|
{
|
|
952
952
|
type: "cat",
|
|
953
953
|
code: R,
|
|
954
|
-
values: H.filter((
|
|
954
|
+
values: H.filter((q) => q !== $),
|
|
955
955
|
name: n.name,
|
|
956
956
|
source: D,
|
|
957
|
-
isDate:
|
|
957
|
+
isDate: f
|
|
958
958
|
}
|
|
959
959
|
]
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
}) : B == "abs" &&
|
|
962
|
+
}) : B == "abs" && P.setState((Z) => {
|
|
963
963
|
let ee = Z.tematicalFiltersSelected.find(
|
|
964
964
|
(H) => H.code === R
|
|
965
965
|
);
|
|
@@ -970,10 +970,10 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
970
970
|
)
|
|
971
971
|
};
|
|
972
972
|
if (ee) {
|
|
973
|
-
let H = { ...ee, min: x, max: S, type: B, isDate:
|
|
973
|
+
let H = { ...ee, min: x, max: S, type: B, isDate: f };
|
|
974
974
|
return {
|
|
975
975
|
tematicalFiltersSelected: Z.tematicalFiltersSelected.map(
|
|
976
|
-
(
|
|
976
|
+
(q) => q.code === R ? H : q
|
|
977
977
|
)
|
|
978
978
|
};
|
|
979
979
|
} else
|
|
@@ -992,7 +992,7 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
992
992
|
};
|
|
993
993
|
});
|
|
994
994
|
}
|
|
995
|
-
},
|
|
995
|
+
}, g = Fe(() => {
|
|
996
996
|
const N = {};
|
|
997
997
|
if ((b == null ? void 0 : b.length) > 0)
|
|
998
998
|
for (const x of b)
|
|
@@ -1010,7 +1010,7 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
1010
1010
|
title: o,
|
|
1011
1011
|
isOpen: v == `id${o}`,
|
|
1012
1012
|
onClick: () => {
|
|
1013
|
-
m ||
|
|
1013
|
+
m || P.setState(() => ({
|
|
1014
1014
|
selectedIndicator: v == `id${o}` ? "" : `id${o}`
|
|
1015
1015
|
}));
|
|
1016
1016
|
},
|
|
@@ -1019,7 +1019,7 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
1019
1019
|
titleMarginChildren: 14,
|
|
1020
1020
|
className: "tematicalFiltersInputContainer",
|
|
1021
1021
|
color: _,
|
|
1022
|
-
activeColor:
|
|
1022
|
+
activeColor: c,
|
|
1023
1023
|
children: [
|
|
1024
1024
|
t == "both" && /* @__PURE__ */ h(
|
|
1025
1025
|
"div",
|
|
@@ -1068,14 +1068,14 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
1068
1068
|
]
|
|
1069
1069
|
}
|
|
1070
1070
|
),
|
|
1071
|
-
p && /* @__PURE__ */ i("div", { className: Ge.checkboxContainer, children: (
|
|
1071
|
+
p && /* @__PURE__ */ i("div", { className: Ge.checkboxContainer, children: (d || []).map((N, x) => {
|
|
1072
1072
|
var S;
|
|
1073
1073
|
return /* @__PURE__ */ i(
|
|
1074
1074
|
r2,
|
|
1075
1075
|
{
|
|
1076
|
-
onClick: () => L({ valueClicked: x, allValues:
|
|
1076
|
+
onClick: () => L({ valueClicked: x, allValues: d }),
|
|
1077
1077
|
indicator: N,
|
|
1078
|
-
value: ((S =
|
|
1078
|
+
value: ((S = g[n.code[t == "both" ? 1 : 0]]) == null ? void 0 : S.has(x)) || !g[n.code[t == "both" ? 1 : 0]]
|
|
1079
1079
|
},
|
|
1080
1080
|
`checkbox-${x}`
|
|
1081
1081
|
);
|
|
@@ -1084,12 +1084,12 @@ const Z0 = "_tematicalFiltersInputContainer_1vm1r_2", j0 = "_inputTypeContainer_
|
|
|
1084
1084
|
o2,
|
|
1085
1085
|
{
|
|
1086
1086
|
onChange: L,
|
|
1087
|
-
min:
|
|
1088
|
-
max:
|
|
1087
|
+
min: a,
|
|
1088
|
+
max: l,
|
|
1089
1089
|
unit: u,
|
|
1090
|
-
defaultValue:
|
|
1091
|
-
isDate:
|
|
1092
|
-
step:
|
|
1090
|
+
defaultValue: g[n.code[0]] ? g[n.code[0]] : "",
|
|
1091
|
+
isDate: f,
|
|
1092
|
+
step: C
|
|
1093
1093
|
}
|
|
1094
1094
|
) })
|
|
1095
1095
|
]
|
|
@@ -1113,35 +1113,35 @@ Lt.propTypes = {
|
|
|
1113
1113
|
};
|
|
1114
1114
|
const a2 = ({
|
|
1115
1115
|
subcategory: n,
|
|
1116
|
-
fontColor:
|
|
1116
|
+
fontColor: c,
|
|
1117
1117
|
activeColor: s
|
|
1118
1118
|
//onChangeBothType,
|
|
1119
1119
|
}) => {
|
|
1120
|
-
const { activeSubcategory: r } =
|
|
1120
|
+
const { activeSubcategory: r } = P((d) => d), { name: t, indicators: o } = n || {};
|
|
1121
1121
|
return /* @__PURE__ */ i(
|
|
1122
1122
|
ke,
|
|
1123
1123
|
{
|
|
1124
1124
|
title: t,
|
|
1125
1125
|
isOpen: r == `id${t}`,
|
|
1126
1126
|
onClick: () => {
|
|
1127
|
-
|
|
1128
|
-
activeSubcategory:
|
|
1127
|
+
P.setState((d) => ({
|
|
1128
|
+
activeSubcategory: d.activeSubcategory === `id${t}` ? "" : `id${t}`
|
|
1129
1129
|
}));
|
|
1130
1130
|
},
|
|
1131
1131
|
titleFontStyles: { fontSize: 16, fontWeight: 400 },
|
|
1132
1132
|
showBottomBar: !1,
|
|
1133
1133
|
titleMarginChildren: 20,
|
|
1134
1134
|
height: 48,
|
|
1135
|
-
color:
|
|
1135
|
+
color: c,
|
|
1136
1136
|
activeColor: s,
|
|
1137
|
-
children: o == null ? void 0 : o.map((
|
|
1137
|
+
children: o == null ? void 0 : o.map((d, a) => /* @__PURE__ */ i(
|
|
1138
1138
|
Lt,
|
|
1139
1139
|
{
|
|
1140
|
-
indicator:
|
|
1141
|
-
fontColor:
|
|
1140
|
+
indicator: d,
|
|
1141
|
+
fontColor: c,
|
|
1142
1142
|
activeColor: s
|
|
1143
1143
|
},
|
|
1144
|
-
`indicatorSub-${
|
|
1144
|
+
`indicatorSub-${a}`
|
|
1145
1145
|
))
|
|
1146
1146
|
}
|
|
1147
1147
|
);
|
|
@@ -1162,14 +1162,14 @@ a2.propTypes = {
|
|
|
1162
1162
|
const l2 = ({
|
|
1163
1163
|
category: n,
|
|
1164
1164
|
// onChangeBothType,
|
|
1165
|
-
activeColor:
|
|
1165
|
+
activeColor: c
|
|
1166
1166
|
}) => {
|
|
1167
|
-
const { name: s, subcategories: r, indicators: t } = n || {}, { activeCategory: o, fontColor:
|
|
1167
|
+
const { name: s, subcategories: r, indicators: t } = n || {}, { activeCategory: o, fontColor: d } = P((a) => a);
|
|
1168
1168
|
return n && /* @__PURE__ */ i(
|
|
1169
1169
|
ke,
|
|
1170
1170
|
{
|
|
1171
1171
|
onClick: () => {
|
|
1172
|
-
|
|
1172
|
+
P.setState((a) => ({
|
|
1173
1173
|
activeCategory: o === `id${s}` ? "" : `id${s}`
|
|
1174
1174
|
}));
|
|
1175
1175
|
},
|
|
@@ -1177,24 +1177,24 @@ const l2 = ({
|
|
|
1177
1177
|
isOpen: o === `id${s}`,
|
|
1178
1178
|
titleFontStyles: { fontSize: 18, fontWeight: "bold" },
|
|
1179
1179
|
showBottomBar: !1,
|
|
1180
|
-
color:
|
|
1181
|
-
activeColor:
|
|
1182
|
-
children: r ? r.map((
|
|
1180
|
+
color: d,
|
|
1181
|
+
activeColor: c,
|
|
1182
|
+
children: r ? r.map((a, l) => /* @__PURE__ */ i(
|
|
1183
1183
|
a2,
|
|
1184
1184
|
{
|
|
1185
|
-
subcategory:
|
|
1186
|
-
fontColor:
|
|
1187
|
-
activeColor:
|
|
1185
|
+
subcategory: a,
|
|
1186
|
+
fontColor: d,
|
|
1187
|
+
activeColor: c
|
|
1188
1188
|
},
|
|
1189
|
-
`subcategory-${
|
|
1190
|
-
)) : t && t.map((
|
|
1189
|
+
`subcategory-${l}`
|
|
1190
|
+
)) : t && t.map((a, l) => /* @__PURE__ */ i(
|
|
1191
1191
|
Lt,
|
|
1192
1192
|
{
|
|
1193
|
-
indicator:
|
|
1194
|
-
fontColor:
|
|
1195
|
-
activeColor:
|
|
1193
|
+
indicator: a,
|
|
1194
|
+
fontColor: d,
|
|
1195
|
+
activeColor: c
|
|
1196
1196
|
},
|
|
1197
|
-
`indicator-${
|
|
1197
|
+
`indicator-${l}`
|
|
1198
1198
|
))
|
|
1199
1199
|
}
|
|
1200
1200
|
);
|
|
@@ -1210,42 +1210,40 @@ l2.propTypes = {
|
|
|
1210
1210
|
};
|
|
1211
1211
|
const wt = ({
|
|
1212
1212
|
indicators: n,
|
|
1213
|
-
isOpen:
|
|
1213
|
+
isOpen: c = !0,
|
|
1214
1214
|
title: s,
|
|
1215
1215
|
fontColor: r = "#605B56",
|
|
1216
1216
|
//The color of the slider and the checkbox when is checked
|
|
1217
1217
|
inputsColor: t = "#605B56",
|
|
1218
|
-
activeColor: o
|
|
1219
|
-
isExtra: c = !1
|
|
1218
|
+
activeColor: o
|
|
1220
1219
|
}) => {
|
|
1221
|
-
const { tematicalFiltersSelected:
|
|
1222
|
-
(m) => m
|
|
1223
|
-
), { t: u } = A();
|
|
1220
|
+
const { tematicalFiltersSelected: d, activeFiltersType: a } = P((C) => C), { t: l } = A();
|
|
1224
1221
|
O(() => {
|
|
1225
|
-
|
|
1222
|
+
}, [d]), O(() => {
|
|
1223
|
+
r && P.setState(() => ({ fontColor: r }));
|
|
1226
1224
|
}, [r]), O(() => {
|
|
1227
|
-
t &&
|
|
1225
|
+
t && P.setState(() => ({ inputsColor: t }));
|
|
1228
1226
|
}, [t]);
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1227
|
+
const u = () => {
|
|
1228
|
+
a == "tematical" ? P.setState(() => ({ activeFiltersType: null })) : P.setState(() => ({ activeFiltersType: "tematical" }));
|
|
1231
1229
|
};
|
|
1232
1230
|
return /* @__PURE__ */ i(
|
|
1233
1231
|
ke,
|
|
1234
1232
|
{
|
|
1235
|
-
isOpen:
|
|
1236
|
-
title: s ?
|
|
1233
|
+
isOpen: a == "tematical",
|
|
1234
|
+
title: s ? l(s) : "Tematical filters",
|
|
1237
1235
|
color: r,
|
|
1238
1236
|
activeColor: o,
|
|
1239
|
-
onClick:
|
|
1237
|
+
onClick: u,
|
|
1240
1238
|
mainTitle: !0,
|
|
1241
|
-
children: n == null ? void 0 : n.map((
|
|
1239
|
+
children: n == null ? void 0 : n.map((C, m) => /* @__PURE__ */ i(
|
|
1242
1240
|
l2,
|
|
1243
1241
|
{
|
|
1244
|
-
category:
|
|
1242
|
+
category: C,
|
|
1245
1243
|
fontColor: r,
|
|
1246
1244
|
activeColor: o
|
|
1247
1245
|
},
|
|
1248
|
-
`category-${
|
|
1246
|
+
`category-${m}`
|
|
1249
1247
|
))
|
|
1250
1248
|
}
|
|
1251
1249
|
);
|
|
@@ -1270,18 +1268,18 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1270
1268
|
buttonContainer: en
|
|
1271
1269
|
}, tn = ({
|
|
1272
1270
|
ambitName: n,
|
|
1273
|
-
ambitDescription:
|
|
1271
|
+
ambitDescription: c,
|
|
1274
1272
|
defaultFilters: s,
|
|
1275
1273
|
indicators: r,
|
|
1276
1274
|
activeColor: t,
|
|
1277
1275
|
textColor: o,
|
|
1278
|
-
backgroundColor:
|
|
1279
|
-
onChangeAppliedFilters:
|
|
1280
|
-
saveAmbit:
|
|
1276
|
+
backgroundColor: d,
|
|
1277
|
+
onChangeAppliedFilters: a,
|
|
1278
|
+
saveAmbit: l,
|
|
1281
1279
|
namePlaceholder: u,
|
|
1282
|
-
descPlaceholder:
|
|
1280
|
+
descPlaceholder: C,
|
|
1283
1281
|
filtersTypes: m = ["geographical", "tematical"],
|
|
1284
|
-
nameRequiredText:
|
|
1282
|
+
nameRequiredText: f,
|
|
1285
1283
|
geoLayers: p = [],
|
|
1286
1284
|
onGeoLayersChange: y,
|
|
1287
1285
|
onlyFilters: b = !1,
|
|
@@ -1290,28 +1288,28 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1290
1288
|
//campo descripción required
|
|
1291
1289
|
extraLists: _ = !1
|
|
1292
1290
|
}) => {
|
|
1293
|
-
const { t: w } = A(), { tematicalFiltersSelected: L, activeFiltersType:
|
|
1291
|
+
const { t: w } = A(), { tematicalFiltersSelected: L, activeFiltersType: g } = P(
|
|
1294
1292
|
(D) => D
|
|
1295
|
-
), [N, x] = I(n || null), [S, $] = I(
|
|
1293
|
+
), [N, x] = I(n || null), [S, $] = I(c || null), [k, T] = I(!1);
|
|
1296
1294
|
O(() => {
|
|
1297
|
-
|
|
1295
|
+
P.setState({
|
|
1298
1296
|
tematicalFiltersSelected: s || []
|
|
1299
1297
|
});
|
|
1300
1298
|
}, [s]), Y(!1), O(() => {
|
|
1301
|
-
|
|
1299
|
+
a(L);
|
|
1302
1300
|
}, [L]);
|
|
1303
1301
|
const F = () => {
|
|
1304
|
-
v ? N && S ?
|
|
1302
|
+
v ? N && S ? l({ name: N, description: S }) : T(!0) : N ? l({ name: N, description: S }) : T(!0);
|
|
1305
1303
|
};
|
|
1306
1304
|
return O(() => {
|
|
1307
|
-
if (m.includes("geographical") &&
|
|
1305
|
+
if (m.includes("geographical") && g != "geographical" && p.length > 0) {
|
|
1308
1306
|
const D = p.map((B) => ({
|
|
1309
1307
|
...B,
|
|
1310
1308
|
active: !1
|
|
1311
1309
|
}));
|
|
1312
1310
|
y == null || y(D);
|
|
1313
1311
|
}
|
|
1314
|
-
}, [
|
|
1312
|
+
}, [g]), /* @__PURE__ */ h("div", { className: Ce.FiltersAmbitContainer, children: [
|
|
1315
1313
|
/* @__PURE__ */ h("div", { className: Ce.FiltersContainer, children: [
|
|
1316
1314
|
!b && /* @__PURE__ */ h("div", { className: Ce.FiltersAmbitHeader, children: [
|
|
1317
1315
|
/* @__PURE__ */ i("div", { className: Ce.FiltersAmbitTitle, children: /* @__PURE__ */ i(
|
|
@@ -1332,7 +1330,7 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1332
1330
|
onChange: (D) => {
|
|
1333
1331
|
v && T(!1), $(D.target.value);
|
|
1334
1332
|
},
|
|
1335
|
-
placeholder: w(
|
|
1333
|
+
placeholder: w(C)
|
|
1336
1334
|
}
|
|
1337
1335
|
) }) })
|
|
1338
1336
|
] }),
|
|
@@ -1340,9 +1338,9 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1340
1338
|
i2,
|
|
1341
1339
|
{
|
|
1342
1340
|
title: w("applied_filters"),
|
|
1343
|
-
isOpen:
|
|
1341
|
+
isOpen: g == "applied",
|
|
1344
1342
|
textColor: o || "#fff",
|
|
1345
|
-
backgroundColor:
|
|
1343
|
+
backgroundColor: d || "#605B5680",
|
|
1346
1344
|
activeColor: t
|
|
1347
1345
|
}
|
|
1348
1346
|
),
|
|
@@ -1362,8 +1360,7 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1362
1360
|
inputsColor: t,
|
|
1363
1361
|
textColor: o,
|
|
1364
1362
|
title: D.title,
|
|
1365
|
-
activeColor: t
|
|
1366
|
-
isExtra: D.title
|
|
1363
|
+
activeColor: t
|
|
1367
1364
|
}
|
|
1368
1365
|
)),
|
|
1369
1366
|
m.includes("tematical") && /* @__PURE__ */ i(
|
|
@@ -1373,13 +1370,12 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1373
1370
|
inputsColor: t,
|
|
1374
1371
|
textColor: o,
|
|
1375
1372
|
title: "tematical_filters",
|
|
1376
|
-
activeColor: t
|
|
1377
|
-
isExtra: !1
|
|
1373
|
+
activeColor: t
|
|
1378
1374
|
}
|
|
1379
1375
|
)
|
|
1380
1376
|
] }),
|
|
1381
1377
|
!b && /* @__PURE__ */ h("div", { className: Ce.buttonContainer, children: [
|
|
1382
|
-
k && /* @__PURE__ */ i("div", { className: Ce.warning, children: w(
|
|
1378
|
+
k && /* @__PURE__ */ i("div", { className: Ce.warning, children: w(f) }),
|
|
1383
1379
|
/* @__PURE__ */ i(it, { onClick: () => F(), children: w("save_ambit") })
|
|
1384
1380
|
] })
|
|
1385
1381
|
] });
|
|
@@ -1405,7 +1401,7 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1405
1401
|
}, c2 = ({
|
|
1406
1402
|
data: n,
|
|
1407
1403
|
// Height of each bar in horizontal orientation or width in vertical orientation
|
|
1408
|
-
barHeight:
|
|
1404
|
+
barHeight: c = 25,
|
|
1409
1405
|
// Gap between bars
|
|
1410
1406
|
gap: s = 23,
|
|
1411
1407
|
fontColor: r = "#605B56",
|
|
@@ -1414,14 +1410,14 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1414
1410
|
// Number of divisions on the value axis
|
|
1415
1411
|
numberOfDivisions: o = 7,
|
|
1416
1412
|
// Maximum value for the scale
|
|
1417
|
-
maxValue:
|
|
1413
|
+
maxValue: d = null,
|
|
1418
1414
|
// Orientation of the chart ("horizontal" or "vertical")
|
|
1419
|
-
orientation:
|
|
1420
|
-
horizontalPadding:
|
|
1415
|
+
orientation: a = "horizontal",
|
|
1416
|
+
horizontalPadding: l = a == "vertical" ? 50 : 20,
|
|
1421
1417
|
verticalPadding: u = 10,
|
|
1422
|
-
xLabelPadding:
|
|
1418
|
+
xLabelPadding: C = a == "vertical" ? 50 : 40,
|
|
1423
1419
|
containerWidth: m = 700,
|
|
1424
|
-
containerHeight:
|
|
1420
|
+
containerHeight: f = 500,
|
|
1425
1421
|
mainColor: p = "#000"
|
|
1426
1422
|
}) => {
|
|
1427
1423
|
const {
|
|
@@ -1431,13 +1427,13 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1431
1427
|
height: _,
|
|
1432
1428
|
chartWidth: w,
|
|
1433
1429
|
svgWidth: L,
|
|
1434
|
-
svgHeight:
|
|
1430
|
+
svgHeight: g,
|
|
1435
1431
|
contentWidth: N
|
|
1436
1432
|
} = Fe(() => {
|
|
1437
1433
|
if (n && n.length > 0) {
|
|
1438
|
-
const x = dt.max(n, ($) => $.value) || 1, S =
|
|
1439
|
-
if (
|
|
1440
|
-
const $ = n.length * (
|
|
1434
|
+
const x = dt.max(n, ($) => $.value) || 1, S = d || x;
|
|
1435
|
+
if (a === "vertical") {
|
|
1436
|
+
const $ = n.length * (c + s) + l * 2, k = Math.max($, m || 0), T = f, D = dt.scaleLinear().domain([0, S]).range([T - 100, u]), B = Array.from(
|
|
1441
1437
|
{ length: o + 1 },
|
|
1442
1438
|
(R, Z) => S / o * Z
|
|
1443
1439
|
);
|
|
@@ -1451,9 +1447,9 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1451
1447
|
contentWidth: $
|
|
1452
1448
|
};
|
|
1453
1449
|
} else {
|
|
1454
|
-
const $ = n.length * (
|
|
1450
|
+
const $ = n.length * (c + s);
|
|
1455
1451
|
console.log("barsHeight: ", $);
|
|
1456
|
-
const k = $ + u * 2 +
|
|
1452
|
+
const k = $ + u * 2 + C + 30, T = m + t + l * 2, F = dt.scaleLinear().domain([0, S]).range([0, m - l * 2]), D = Array.from(
|
|
1457
1453
|
{ length: o + 1 },
|
|
1458
1454
|
(B, R) => S / o * R
|
|
1459
1455
|
);
|
|
@@ -1478,23 +1474,23 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1478
1474
|
}, [
|
|
1479
1475
|
n,
|
|
1480
1476
|
o,
|
|
1481
|
-
d,
|
|
1482
|
-
s,
|
|
1483
|
-
a,
|
|
1484
|
-
u,
|
|
1485
1477
|
c,
|
|
1478
|
+
s,
|
|
1486
1479
|
l,
|
|
1480
|
+
u,
|
|
1481
|
+
d,
|
|
1482
|
+
a,
|
|
1487
1483
|
t,
|
|
1488
1484
|
m,
|
|
1489
|
-
|
|
1485
|
+
f
|
|
1490
1486
|
]);
|
|
1491
|
-
return
|
|
1487
|
+
return a === "vertical" ? /* @__PURE__ */ i(
|
|
1492
1488
|
"div",
|
|
1493
1489
|
{
|
|
1494
1490
|
style: {
|
|
1495
1491
|
//width: containerWidth ? `${containerWidth}px` : "100%",
|
|
1496
1492
|
width: "100%",
|
|
1497
|
-
height:
|
|
1493
|
+
height: f ? `${f}px` : "100%",
|
|
1498
1494
|
"--main-color": p
|
|
1499
1495
|
},
|
|
1500
1496
|
className: Ft.barChartContainer,
|
|
@@ -1502,15 +1498,15 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1502
1498
|
"svg",
|
|
1503
1499
|
{
|
|
1504
1500
|
width: L,
|
|
1505
|
-
height:
|
|
1501
|
+
height: g,
|
|
1506
1502
|
style: {
|
|
1507
1503
|
display: "block",
|
|
1508
1504
|
width: L,
|
|
1509
|
-
height:
|
|
1505
|
+
height: g,
|
|
1510
1506
|
maxWidth: "none",
|
|
1511
1507
|
"--main-color": p
|
|
1512
1508
|
},
|
|
1513
|
-
children: /* @__PURE__ */ h("g", { transform: `translate(${
|
|
1509
|
+
children: /* @__PURE__ */ h("g", { transform: `translate(${l}, 0)`, children: [
|
|
1514
1510
|
/* @__PURE__ */ i("g", { children: v.map((x, S) => {
|
|
1515
1511
|
const $ = b(x);
|
|
1516
1512
|
return /* @__PURE__ */ h("g", { children: [
|
|
@@ -1518,7 +1514,7 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1518
1514
|
"line",
|
|
1519
1515
|
{
|
|
1520
1516
|
x1: 0,
|
|
1521
|
-
x2: w -
|
|
1517
|
+
x2: w - l * 2,
|
|
1522
1518
|
y1: $,
|
|
1523
1519
|
y2: $,
|
|
1524
1520
|
stroke: "#ccc"
|
|
@@ -1538,14 +1534,14 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1538
1534
|
] }, S);
|
|
1539
1535
|
}) }),
|
|
1540
1536
|
n && n.length > 0 && n.map((x, S) => {
|
|
1541
|
-
const $ = b(0) - b(x.value), k = S * (
|
|
1537
|
+
const $ = b(0) - b(x.value), k = S * (c + s), T = b(x.value);
|
|
1542
1538
|
return /* @__PURE__ */ h("g", { children: [
|
|
1543
1539
|
/* @__PURE__ */ i(
|
|
1544
1540
|
"rect",
|
|
1545
1541
|
{
|
|
1546
1542
|
x: k,
|
|
1547
1543
|
y: T,
|
|
1548
|
-
width:
|
|
1544
|
+
width: c,
|
|
1549
1545
|
height: $,
|
|
1550
1546
|
fill: x.color,
|
|
1551
1547
|
rx: 0
|
|
@@ -1554,12 +1550,12 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1554
1550
|
/* @__PURE__ */ i(
|
|
1555
1551
|
"text",
|
|
1556
1552
|
{
|
|
1557
|
-
x: k +
|
|
1558
|
-
y: _ -
|
|
1553
|
+
x: k + c / 2,
|
|
1554
|
+
y: _ - C,
|
|
1559
1555
|
textAnchor: "start",
|
|
1560
1556
|
fill: r,
|
|
1561
1557
|
fontSize: 12,
|
|
1562
|
-
transform: `rotate(-90, ${k +
|
|
1558
|
+
transform: `rotate(-90, ${k + c / 2}, ${_ - C})`,
|
|
1563
1559
|
children: x.title
|
|
1564
1560
|
}
|
|
1565
1561
|
)
|
|
@@ -1569,13 +1565,13 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1569
1565
|
}
|
|
1570
1566
|
)
|
|
1571
1567
|
}
|
|
1572
|
-
) : (console.log("svgHeight: ",
|
|
1568
|
+
) : (console.log("svgHeight: ", g), /* @__PURE__ */ i(
|
|
1573
1569
|
"div",
|
|
1574
1570
|
{
|
|
1575
1571
|
style: {
|
|
1576
1572
|
width: "100%",
|
|
1577
1573
|
//width: containerWidth ? `${containerWidth}px` : "100%",
|
|
1578
|
-
height:
|
|
1574
|
+
height: f ? `${f}px` : "100%",
|
|
1579
1575
|
"--main-color": p
|
|
1580
1576
|
},
|
|
1581
1577
|
className: Ft.barChartContainer,
|
|
@@ -1583,29 +1579,29 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1583
1579
|
"svg",
|
|
1584
1580
|
{
|
|
1585
1581
|
width: L,
|
|
1586
|
-
height:
|
|
1582
|
+
height: g,
|
|
1587
1583
|
style: {
|
|
1588
1584
|
minWidth: "100%",
|
|
1589
|
-
height:
|
|
1585
|
+
height: g,
|
|
1590
1586
|
width: N,
|
|
1591
1587
|
maxWidth: "none"
|
|
1592
1588
|
},
|
|
1593
1589
|
children: /* @__PURE__ */ h("g", { transform: `translate(0,${u})`, children: [
|
|
1594
|
-
/* @__PURE__ */ i("g", { transform: `translate(${t +
|
|
1590
|
+
/* @__PURE__ */ i("g", { transform: `translate(${t + l}, 0)`, children: v.map((x, S) => {
|
|
1595
1591
|
const $ = y(x);
|
|
1596
1592
|
return /* @__PURE__ */ h("g", { transform: `translate(${$}, 0)`, children: [
|
|
1597
1593
|
/* @__PURE__ */ i(
|
|
1598
1594
|
"line",
|
|
1599
1595
|
{
|
|
1600
1596
|
y1: 0,
|
|
1601
|
-
y2: n.length * (
|
|
1597
|
+
y2: n.length * (c + s),
|
|
1602
1598
|
stroke: "#ccc"
|
|
1603
1599
|
}
|
|
1604
1600
|
),
|
|
1605
1601
|
/* @__PURE__ */ i(
|
|
1606
1602
|
"text",
|
|
1607
1603
|
{
|
|
1608
|
-
y: n.length * (
|
|
1604
|
+
y: n.length * (c + s) + 30,
|
|
1609
1605
|
textAnchor: "middle",
|
|
1610
1606
|
fontSize: 10,
|
|
1611
1607
|
fill: r,
|
|
@@ -1615,17 +1611,17 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1615
1611
|
] }, S);
|
|
1616
1612
|
}) }),
|
|
1617
1613
|
n && n.length > 0 && n.map((x, S) => {
|
|
1618
|
-
const $ = y(x.value), k = S * (
|
|
1614
|
+
const $ = y(x.value), k = S * (c + s);
|
|
1619
1615
|
return console.log("y: ", k), /* @__PURE__ */ h(
|
|
1620
1616
|
"g",
|
|
1621
1617
|
{
|
|
1622
|
-
transform: `translate(${t +
|
|
1618
|
+
transform: `translate(${t + l}, ${k})`,
|
|
1623
1619
|
children: [
|
|
1624
1620
|
/* @__PURE__ */ i(
|
|
1625
1621
|
"text",
|
|
1626
1622
|
{
|
|
1627
1623
|
x: -24,
|
|
1628
|
-
y:
|
|
1624
|
+
y: c / 2 + 5,
|
|
1629
1625
|
textAnchor: "end",
|
|
1630
1626
|
fill: r,
|
|
1631
1627
|
fontSize: 12,
|
|
@@ -1636,7 +1632,7 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1636
1632
|
"rect",
|
|
1637
1633
|
{
|
|
1638
1634
|
width: $,
|
|
1639
|
-
height:
|
|
1635
|
+
height: c,
|
|
1640
1636
|
fill: x.color,
|
|
1641
1637
|
rx: 0
|
|
1642
1638
|
}
|
|
@@ -1680,19 +1676,19 @@ const sn = "_graphicContainer_1ozwp_2", rn = "_titleContainer_1ozwp_13", At = {
|
|
|
1680
1676
|
titleContainer: rn
|
|
1681
1677
|
}, on = ({
|
|
1682
1678
|
data: n,
|
|
1683
|
-
graphLength:
|
|
1679
|
+
graphLength: c = 700,
|
|
1684
1680
|
containerStyle: s,
|
|
1685
1681
|
borderColor: r = "#605B56",
|
|
1686
1682
|
title: t = "Graphic Title",
|
|
1687
1683
|
fontColor: o = "#605B56",
|
|
1688
|
-
maxValue:
|
|
1689
|
-
numberOfDivisions:
|
|
1690
|
-
leftPadding:
|
|
1684
|
+
maxValue: d = null,
|
|
1685
|
+
numberOfDivisions: a = 7,
|
|
1686
|
+
leftPadding: l = -200,
|
|
1691
1687
|
orientation: u = "horizontal",
|
|
1692
|
-
xLabelPadding:
|
|
1688
|
+
xLabelPadding: C = 0,
|
|
1693
1689
|
mainColor: m
|
|
1694
1690
|
}) => {
|
|
1695
|
-
const { t:
|
|
1691
|
+
const { t: f } = A();
|
|
1696
1692
|
return /* @__PURE__ */ h(
|
|
1697
1693
|
"div",
|
|
1698
1694
|
{
|
|
@@ -1702,18 +1698,18 @@ const sn = "_graphicContainer_1ozwp_2", rn = "_titleContainer_1ozwp_13", At = {
|
|
|
1702
1698
|
paddingBottom: 40
|
|
1703
1699
|
},
|
|
1704
1700
|
children: [
|
|
1705
|
-
/* @__PURE__ */ i("div", { className: At.titleContainer, children: /* @__PURE__ */ i("h2", { children:
|
|
1701
|
+
/* @__PURE__ */ i("div", { className: At.titleContainer, children: /* @__PURE__ */ i("h2", { children: f(t) }) }),
|
|
1706
1702
|
/* @__PURE__ */ i(
|
|
1707
1703
|
c2,
|
|
1708
1704
|
{
|
|
1709
1705
|
data: n,
|
|
1710
|
-
length:
|
|
1706
|
+
length: c,
|
|
1711
1707
|
fontColor: o,
|
|
1712
|
-
maxValue:
|
|
1713
|
-
numberOfDivisions:
|
|
1714
|
-
leftPadding:
|
|
1708
|
+
maxValue: d,
|
|
1709
|
+
numberOfDivisions: a,
|
|
1710
|
+
leftPadding: l,
|
|
1715
1711
|
orientation: u,
|
|
1716
|
-
xLabelPadding:
|
|
1712
|
+
xLabelPadding: C,
|
|
1717
1713
|
mainColor: m
|
|
1718
1714
|
}
|
|
1719
1715
|
)
|
|
@@ -1757,21 +1753,21 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1757
1753
|
optionText: vn
|
|
1758
1754
|
}, Mt = ({
|
|
1759
1755
|
indicator: n,
|
|
1760
|
-
values:
|
|
1756
|
+
values: c = [],
|
|
1761
1757
|
activeColor: s,
|
|
1762
1758
|
defaultColor: r = "#92898A",
|
|
1763
1759
|
activeIndicator: t,
|
|
1764
1760
|
activeIndicatorType: o,
|
|
1765
|
-
onClickIndicator:
|
|
1766
|
-
multiple:
|
|
1767
|
-
onChangeType:
|
|
1761
|
+
onClickIndicator: d,
|
|
1762
|
+
multiple: a = !1,
|
|
1763
|
+
onChangeType: l
|
|
1768
1764
|
}) => {
|
|
1769
|
-
const { t: u } = A(), { name:
|
|
1765
|
+
const { t: u } = A(), { name: C, type: m, disabled: f } = n, [p, y] = I(!1);
|
|
1770
1766
|
O(() => {
|
|
1771
1767
|
t && y(
|
|
1772
|
-
|
|
1773
|
-
(_) => _.name == String(
|
|
1774
|
-
) : t.name ==
|
|
1768
|
+
a ? t.some(
|
|
1769
|
+
(_) => _.name == String(C)
|
|
1770
|
+
) : t.name == C
|
|
1775
1771
|
);
|
|
1776
1772
|
}, [t]);
|
|
1777
1773
|
const b = () => /* @__PURE__ */ i("div", { className: U.switchExternalContainer, children: /* @__PURE__ */ i("div", { className: U.switchType, children: /* @__PURE__ */ h("div", { className: U.switchTypeOptions, children: [
|
|
@@ -1779,7 +1775,7 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1779
1775
|
"div",
|
|
1780
1776
|
{
|
|
1781
1777
|
className: U.optionContainer,
|
|
1782
|
-
onClick: () =>
|
|
1778
|
+
onClick: () => l("cat"),
|
|
1783
1779
|
children: [
|
|
1784
1780
|
/* @__PURE__ */ i(
|
|
1785
1781
|
"span",
|
|
@@ -1808,7 +1804,7 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1808
1804
|
"div",
|
|
1809
1805
|
{
|
|
1810
1806
|
className: U.optionContainer,
|
|
1811
|
-
onClick: () =>
|
|
1807
|
+
onClick: () => l("abs"),
|
|
1812
1808
|
children: [
|
|
1813
1809
|
/* @__PURE__ */ i(
|
|
1814
1810
|
"span",
|
|
@@ -1833,7 +1829,7 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1833
1829
|
]
|
|
1834
1830
|
}
|
|
1835
1831
|
)
|
|
1836
|
-
] }) }) }), v = () => /* @__PURE__ */ i("div", { className: U.switchExternalContainer, children: /* @__PURE__ */ i("div", { className: U.switchType, children: /* @__PURE__ */ i("div", { className: U.switchTypeOptions, children:
|
|
1832
|
+
] }) }) }), v = () => /* @__PURE__ */ i("div", { className: U.switchExternalContainer, children: /* @__PURE__ */ i("div", { className: U.switchType, children: /* @__PURE__ */ i("div", { className: U.switchTypeOptions, children: c.map((_, w) => /* @__PURE__ */ h(
|
|
1837
1833
|
"div",
|
|
1838
1834
|
{
|
|
1839
1835
|
className: U.optionContainer,
|
|
@@ -1854,18 +1850,18 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1854
1850
|
"div",
|
|
1855
1851
|
{
|
|
1856
1852
|
className: U.indicatorNameContainer,
|
|
1857
|
-
onClick: () => !
|
|
1853
|
+
onClick: () => !f && d({ indicator: n }),
|
|
1858
1854
|
children: [
|
|
1859
1855
|
/* @__PURE__ */ i(
|
|
1860
1856
|
"div",
|
|
1861
1857
|
{
|
|
1862
1858
|
style: {
|
|
1863
1859
|
border: p ? `1px solid ${s}` : `1px solid ${r}`,
|
|
1864
|
-
opacity:
|
|
1860
|
+
opacity: f ? 0.5 : 1,
|
|
1865
1861
|
backgroundColor: p ? s : "transparent"
|
|
1866
1862
|
},
|
|
1867
1863
|
className: U.dot,
|
|
1868
|
-
children:
|
|
1864
|
+
children: a && /* @__PURE__ */ i("img", { src: p ? un : dn, alt: "" })
|
|
1869
1865
|
}
|
|
1870
1866
|
),
|
|
1871
1867
|
/* @__PURE__ */ i(
|
|
@@ -1874,12 +1870,12 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1874
1870
|
className: U.indicatorName,
|
|
1875
1871
|
style: {
|
|
1876
1872
|
color: p ? s : r,
|
|
1877
|
-
opacity:
|
|
1873
|
+
opacity: f ? 0.5 : 1
|
|
1878
1874
|
},
|
|
1879
1875
|
children: /* @__PURE__ */ i(
|
|
1880
1876
|
$t,
|
|
1881
1877
|
{
|
|
1882
|
-
i18nKey:
|
|
1878
|
+
i18nKey: C,
|
|
1883
1879
|
components: { sup: /* @__PURE__ */ i("sup", {}) },
|
|
1884
1880
|
shouldUnescape: !0
|
|
1885
1881
|
}
|
|
@@ -1889,8 +1885,8 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1889
1885
|
]
|
|
1890
1886
|
}
|
|
1891
1887
|
),
|
|
1892
|
-
(t == null ? void 0 : t.name) ===
|
|
1893
|
-
(t == null ? void 0 : t.name) ===
|
|
1888
|
+
(t == null ? void 0 : t.name) === C && m === "both" && /* @__PURE__ */ i("div", { children: b() }),
|
|
1889
|
+
(t == null ? void 0 : t.name) === C && m === "twoUnits" && /* @__PURE__ */ i("div", { children: v() })
|
|
1894
1890
|
] });
|
|
1895
1891
|
};
|
|
1896
1892
|
Mt.propTypes = {
|
|
@@ -1910,22 +1906,22 @@ const xn = "_indicatorsSubCategory_1nuug_2", wn = "_list_1nuug_11", Ot = {
|
|
|
1910
1906
|
list: wn
|
|
1911
1907
|
}, d2 = ({
|
|
1912
1908
|
subcName: n,
|
|
1913
|
-
indicators:
|
|
1909
|
+
indicators: c,
|
|
1914
1910
|
defaultColor: s,
|
|
1915
1911
|
activeColor: r,
|
|
1916
1912
|
activeSubCategory: t,
|
|
1917
1913
|
onClickSubCategory: o,
|
|
1918
|
-
id:
|
|
1919
|
-
activeIndicator:
|
|
1920
|
-
onClickIndicator:
|
|
1914
|
+
id: d,
|
|
1915
|
+
activeIndicator: a,
|
|
1916
|
+
onClickIndicator: l,
|
|
1921
1917
|
multiple: u,
|
|
1922
|
-
activeIndicatorType:
|
|
1918
|
+
activeIndicatorType: C,
|
|
1923
1919
|
onChangeType: m
|
|
1924
1920
|
}) => {
|
|
1925
|
-
const { t:
|
|
1921
|
+
const { t: f } = A(), [p, y] = I(!1);
|
|
1926
1922
|
return O(() => {
|
|
1927
|
-
y(t ==
|
|
1928
|
-
}, [t,
|
|
1923
|
+
y(t == d);
|
|
1924
|
+
}, [t, d]), /* @__PURE__ */ h(
|
|
1929
1925
|
St.div,
|
|
1930
1926
|
{
|
|
1931
1927
|
className: Ot.indicatorsSubCategory,
|
|
@@ -1933,26 +1929,26 @@ const xn = "_indicatorsSubCategory_1nuug_2", wn = "_list_1nuug_11", Ot = {
|
|
|
1933
1929
|
animate: { height: p ? "auto" : "43px" },
|
|
1934
1930
|
transition: { duration: 0.4 },
|
|
1935
1931
|
children: [
|
|
1936
|
-
/* @__PURE__ */ i("button", { onClick: () => o(
|
|
1932
|
+
/* @__PURE__ */ i("button", { onClick: () => o(d), children: /* @__PURE__ */ h("h3", { style: { color: p ? r : s }, children: [
|
|
1937
1933
|
/* @__PURE__ */ i("span", { style: { color: p ? r : s }, children: p ? "-" : "+" }),
|
|
1938
1934
|
/* @__PURE__ */ i(
|
|
1939
1935
|
"span",
|
|
1940
1936
|
{
|
|
1941
1937
|
style: { color: p ? r : s },
|
|
1942
|
-
children:
|
|
1938
|
+
children: f(n)
|
|
1943
1939
|
}
|
|
1944
1940
|
)
|
|
1945
1941
|
] }) }),
|
|
1946
|
-
|
|
1942
|
+
c && /* @__PURE__ */ i("div", { className: Ot.list, children: c == null ? void 0 : c.map((b, v) => /* @__PURE__ */ i(
|
|
1947
1943
|
Mt,
|
|
1948
1944
|
{
|
|
1949
1945
|
indicator: b,
|
|
1950
1946
|
defaultColor: s,
|
|
1951
1947
|
activeColor: r,
|
|
1952
|
-
activeIndicator:
|
|
1953
|
-
onClickIndicator:
|
|
1948
|
+
activeIndicator: a,
|
|
1949
|
+
onClickIndicator: l,
|
|
1954
1950
|
multiple: u,
|
|
1955
|
-
activeIndicatorType:
|
|
1951
|
+
activeIndicatorType: C,
|
|
1956
1952
|
onChangeType: m
|
|
1957
1953
|
},
|
|
1958
1954
|
"indicator" + v
|
|
@@ -1975,24 +1971,24 @@ d2.propTypes = {
|
|
|
1975
1971
|
};
|
|
1976
1972
|
const u2 = ({
|
|
1977
1973
|
cat: n,
|
|
1978
|
-
id:
|
|
1974
|
+
id: c,
|
|
1979
1975
|
activeColor: s,
|
|
1980
1976
|
defaultColor: r,
|
|
1981
1977
|
onClickCategory: t,
|
|
1982
1978
|
activeCategory: o,
|
|
1983
|
-
activeSubCategory:
|
|
1984
|
-
onClickSubCategory:
|
|
1985
|
-
activeIndicator:
|
|
1979
|
+
activeSubCategory: d,
|
|
1980
|
+
onClickSubCategory: a,
|
|
1981
|
+
activeIndicator: l,
|
|
1986
1982
|
onClickIndicator: u,
|
|
1987
|
-
multiple:
|
|
1983
|
+
multiple: C,
|
|
1988
1984
|
activeIndicatorType: m,
|
|
1989
|
-
onChangeType:
|
|
1985
|
+
onChangeType: f
|
|
1990
1986
|
}) => {
|
|
1991
1987
|
var v;
|
|
1992
1988
|
const { t: p } = A(), [y, b] = I(!1);
|
|
1993
1989
|
return O(() => {
|
|
1994
|
-
b(o ===
|
|
1995
|
-
}, [o,
|
|
1990
|
+
b(o === c);
|
|
1991
|
+
}, [o, c]), /* @__PURE__ */ h(
|
|
1996
1992
|
St.div,
|
|
1997
1993
|
{
|
|
1998
1994
|
className: Xe.indicatorsCategory,
|
|
@@ -2005,7 +2001,7 @@ const u2 = ({
|
|
|
2005
2001
|
marginBottom: y ? "20px" : "0px"
|
|
2006
2002
|
},
|
|
2007
2003
|
children: [
|
|
2008
|
-
/* @__PURE__ */ h("h2", { className: `${Xe.title}`, onClick: () => t(
|
|
2004
|
+
/* @__PURE__ */ h("h2", { className: `${Xe.title}`, onClick: () => t(c), children: [
|
|
2009
2005
|
/* @__PURE__ */ i("span", { className: Xe.plus, style: { color: y ? s : r }, children: y ? "-" : "+" }),
|
|
2010
2006
|
/* @__PURE__ */ i(
|
|
2011
2007
|
"span",
|
|
@@ -2016,23 +2012,23 @@ const u2 = ({
|
|
|
2016
2012
|
)
|
|
2017
2013
|
] }),
|
|
2018
2014
|
n.subcategories ? n.subcategories.map(
|
|
2019
|
-
({ name: _, subcategory: w, indicators: L },
|
|
2015
|
+
({ name: _, subcategory: w, indicators: L }, g) => /* @__PURE__ */ i(
|
|
2020
2016
|
d2,
|
|
2021
2017
|
{
|
|
2022
2018
|
id: w,
|
|
2023
|
-
activeSubCategory:
|
|
2019
|
+
activeSubCategory: d,
|
|
2024
2020
|
subcName: _,
|
|
2025
|
-
onClickSubCategory:
|
|
2026
|
-
activeIndicator:
|
|
2021
|
+
onClickSubCategory: a,
|
|
2022
|
+
activeIndicator: l,
|
|
2027
2023
|
onClickIndicator: u,
|
|
2028
|
-
multiple:
|
|
2024
|
+
multiple: C,
|
|
2029
2025
|
activeColor: s,
|
|
2030
2026
|
defaultColor: r,
|
|
2031
2027
|
indicators: L,
|
|
2032
2028
|
activeIndicatorType: m,
|
|
2033
|
-
onChangeType:
|
|
2029
|
+
onChangeType: f
|
|
2034
2030
|
},
|
|
2035
|
-
`subcKey ${
|
|
2031
|
+
`subcKey ${g}`
|
|
2036
2032
|
)
|
|
2037
2033
|
) : /* @__PURE__ */ i("div", { className: Xe.list, children: (v = n.indicators) == null ? void 0 : v.map((_, w) => /* @__PURE__ */ i(
|
|
2038
2034
|
Mt,
|
|
@@ -2041,11 +2037,11 @@ const u2 = ({
|
|
|
2041
2037
|
values: _.type == "twoUnits" && _.values,
|
|
2042
2038
|
activeColor: s,
|
|
2043
2039
|
defaultColor: r,
|
|
2044
|
-
activeIndicator:
|
|
2040
|
+
activeIndicator: l,
|
|
2045
2041
|
onClickIndicator: u,
|
|
2046
|
-
multiple:
|
|
2042
|
+
multiple: C,
|
|
2047
2043
|
activeIndicatorType: m,
|
|
2048
|
-
onChangeType:
|
|
2044
|
+
onChangeType: f
|
|
2049
2045
|
},
|
|
2050
2046
|
`indicator${w}`
|
|
2051
2047
|
)) })
|
|
@@ -2072,7 +2068,7 @@ const Nn = "_indicatorsList_13b3m_2", kn = "_title_13b3m_6", Rt = {
|
|
|
2072
2068
|
title: kn
|
|
2073
2069
|
}, $n = ({
|
|
2074
2070
|
indicators: n,
|
|
2075
|
-
activeColor:
|
|
2071
|
+
activeColor: c,
|
|
2076
2072
|
defaultColor: s = "#92898A",
|
|
2077
2073
|
// Función que se ejecuta al seleccionar un indicador, recibe el o los ikeys como parametro
|
|
2078
2074
|
onChange: r,
|
|
@@ -2081,29 +2077,29 @@ const Nn = "_indicatorsList_13b3m_2", kn = "_title_13b3m_6", Rt = {
|
|
|
2081
2077
|
// Si multiple es true, debe ser un array de strings, sino un string
|
|
2082
2078
|
defaultValue: o = null,
|
|
2083
2079
|
//si el indicador es tipo "both" cuando se cambia el tipo
|
|
2084
|
-
changeIndType:
|
|
2085
|
-
activeIndicatorType:
|
|
2080
|
+
changeIndType: d,
|
|
2081
|
+
activeIndicatorType: a
|
|
2086
2082
|
}) => {
|
|
2087
|
-
const { t:
|
|
2088
|
-
|
|
2089
|
-
}, v = (
|
|
2090
|
-
|
|
2091
|
-
}, _ = ({ indicator:
|
|
2092
|
-
w(
|
|
2093
|
-
}, w = (
|
|
2083
|
+
const { t: l } = A(), [u, C] = I(), [m, f] = I(), [p, y] = I(), b = (g) => {
|
|
2084
|
+
C(u == g ? null : g);
|
|
2085
|
+
}, v = (g) => {
|
|
2086
|
+
f(m == g ? null : g);
|
|
2087
|
+
}, _ = ({ indicator: g }) => {
|
|
2088
|
+
w(g);
|
|
2089
|
+
}, w = (g) => {
|
|
2094
2090
|
if (!t)
|
|
2095
2091
|
y(
|
|
2096
|
-
(p == null ? void 0 : p.name) ==
|
|
2092
|
+
(p == null ? void 0 : p.name) == g.name ? null : g
|
|
2097
2093
|
);
|
|
2098
2094
|
else {
|
|
2099
2095
|
let N = p && p.length > 0 ? [...p] : [];
|
|
2100
2096
|
y(
|
|
2101
2097
|
N != null && N.some(
|
|
2102
|
-
(x) => x.name ==
|
|
2098
|
+
(x) => x.name == g.name
|
|
2103
2099
|
) ? N.filter(
|
|
2104
|
-
(x) => x.name != String(
|
|
2105
|
-
) : [...N,
|
|
2106
|
-
),
|
|
2100
|
+
(x) => x.name != String(g.name)
|
|
2101
|
+
) : [...N, g]
|
|
2102
|
+
), g.type == "both" && d("cat");
|
|
2107
2103
|
}
|
|
2108
2104
|
};
|
|
2109
2105
|
O(() => {
|
|
@@ -2111,50 +2107,50 @@ const Nn = "_indicatorsList_13b3m_2", kn = "_title_13b3m_6", Rt = {
|
|
|
2111
2107
|
}, [p]), k2(() => {
|
|
2112
2108
|
if (o && !p)
|
|
2113
2109
|
if (t && o && Array.isArray(o)) {
|
|
2114
|
-
let
|
|
2115
|
-
y([...
|
|
2110
|
+
let g = p && p.length > 0 ? [...p] : [];
|
|
2111
|
+
y([...g, ...o]), L(o[0].name);
|
|
2116
2112
|
} else
|
|
2117
2113
|
w(o), L(o.name);
|
|
2118
2114
|
}, []), O(() => {
|
|
2119
2115
|
if (o != p)
|
|
2120
2116
|
if (t && o && Array.isArray(o)) {
|
|
2121
|
-
let
|
|
2122
|
-
y([...
|
|
2117
|
+
let g = p && p.length > 0 ? [...p] : [];
|
|
2118
|
+
y([...g, ...o]), L(o[0].name);
|
|
2123
2119
|
} else
|
|
2124
2120
|
w(o), L(o.name);
|
|
2125
2121
|
}, [o]);
|
|
2126
|
-
const L = (
|
|
2122
|
+
const L = (g) => {
|
|
2127
2123
|
const N = n.find((x) => {
|
|
2128
2124
|
if (x.subcategories) {
|
|
2129
2125
|
let S = x.subcategories.find(
|
|
2130
|
-
($) => $.indicators.find((k) => k.name ==
|
|
2126
|
+
($) => $.indicators.find((k) => k.name == g)
|
|
2131
2127
|
);
|
|
2132
2128
|
if (S)
|
|
2133
|
-
return
|
|
2129
|
+
return f(S.subcategory), S;
|
|
2134
2130
|
} else
|
|
2135
|
-
return x.indicators.some((S) => S.name ==
|
|
2131
|
+
return x.indicators.some((S) => S.name == g);
|
|
2136
2132
|
});
|
|
2137
|
-
N &&
|
|
2133
|
+
N && C(N.category);
|
|
2138
2134
|
};
|
|
2139
2135
|
return /* @__PURE__ */ h("div", { className: Rt.indicatorsList, children: [
|
|
2140
|
-
/* @__PURE__ */ i("h2", { className: Rt.title, style: { color: s }, children:
|
|
2141
|
-
n.map((
|
|
2136
|
+
/* @__PURE__ */ i("h2", { className: Rt.title, style: { color: s }, children: l("indicators.indicators") }),
|
|
2137
|
+
n.map((g, N) => /* @__PURE__ */ i(
|
|
2142
2138
|
u2,
|
|
2143
2139
|
{
|
|
2144
|
-
id:
|
|
2145
|
-
cat:
|
|
2140
|
+
id: g.category,
|
|
2141
|
+
cat: g,
|
|
2146
2142
|
onClickCategory: b,
|
|
2147
2143
|
activeCategory: u,
|
|
2148
2144
|
onClickSubCategory: v,
|
|
2149
2145
|
activeSubCategory: m,
|
|
2150
2146
|
onClickIndicator: _,
|
|
2151
2147
|
activeIndicator: p,
|
|
2152
|
-
activeColor:
|
|
2148
|
+
activeColor: c,
|
|
2153
2149
|
defaultColor: s,
|
|
2154
2150
|
multiple: t,
|
|
2155
2151
|
onChange: r,
|
|
2156
|
-
onChangeType:
|
|
2157
|
-
activeIndicatorType:
|
|
2152
|
+
onChangeType: d,
|
|
2153
|
+
activeIndicatorType: a
|
|
2158
2154
|
},
|
|
2159
2155
|
`categoryKey${N}`
|
|
2160
2156
|
))
|
|
@@ -2177,9 +2173,9 @@ const Sn = "_langSelector_o9enq_2", Ln = "_currentLang_o9enq_14", Mn = "_arrow_o
|
|
|
2177
2173
|
arrow: Mn,
|
|
2178
2174
|
prevImg: Tn,
|
|
2179
2175
|
langMenu: Dn
|
|
2180
|
-
}, Bn = ({ langs: n, arrow:
|
|
2181
|
-
const [r, t] = I(!1), { i18n: o } = A(),
|
|
2182
|
-
o.changeLanguage(
|
|
2176
|
+
}, Bn = ({ langs: n, arrow: c, imgPrev: s }) => {
|
|
2177
|
+
const [r, t] = I(!1), { i18n: o } = A(), d = n.find((l) => l.code == o.language), a = (l) => {
|
|
2178
|
+
o.changeLanguage(l), t(!1);
|
|
2183
2179
|
};
|
|
2184
2180
|
return /* @__PURE__ */ h("div", { className: Me.langSelector, children: [
|
|
2185
2181
|
/* @__PURE__ */ h(
|
|
@@ -2191,19 +2187,19 @@ const Sn = "_langSelector_o9enq_2", Ln = "_currentLang_o9enq_14", Mn = "_arrow_o
|
|
|
2191
2187
|
},
|
|
2192
2188
|
children: [
|
|
2193
2189
|
s && /* @__PURE__ */ i("img", { className: Me.prevImg, src: s }),
|
|
2194
|
-
(
|
|
2195
|
-
/* @__PURE__ */ i("img", { src:
|
|
2190
|
+
(d == null ? void 0 : d.titleSelected) || (d == null ? void 0 : d.title),
|
|
2191
|
+
/* @__PURE__ */ i("img", { src: c, className: Me.arrow })
|
|
2196
2192
|
]
|
|
2197
2193
|
}
|
|
2198
2194
|
),
|
|
2199
|
-
r && /* @__PURE__ */ i("div", { className: Me.langMenu, children: n.map((
|
|
2195
|
+
r && /* @__PURE__ */ i("div", { className: Me.langMenu, children: n.map((l) => /* @__PURE__ */ i(
|
|
2200
2196
|
"button",
|
|
2201
2197
|
{
|
|
2202
|
-
className: (
|
|
2203
|
-
onClick: () => l
|
|
2204
|
-
children:
|
|
2198
|
+
className: (d == null ? void 0 : d.code) == l.code ? Me.active : "",
|
|
2199
|
+
onClick: () => a(l.code),
|
|
2200
|
+
children: l.title
|
|
2205
2201
|
},
|
|
2206
|
-
|
|
2202
|
+
l.code
|
|
2207
2203
|
)) })
|
|
2208
2204
|
] });
|
|
2209
2205
|
};
|
|
@@ -2241,7 +2237,7 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2241
2237
|
//JSON with the styles of the container (optional)
|
|
2242
2238
|
containerStyles: n,
|
|
2243
2239
|
//Title on top of the legend
|
|
2244
|
-
title:
|
|
2240
|
+
title: c,
|
|
2245
2241
|
//Array to display the info behind the title should have: [{title, value}, ...]
|
|
2246
2242
|
infoList: s,
|
|
2247
2243
|
//Array of legend items to display: [{title, categories, absolute}, ...]
|
|
@@ -2251,34 +2247,34 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2251
2247
|
onClickMoreInfo: t,
|
|
2252
2248
|
//If not passed it will read t("moreInformation")
|
|
2253
2249
|
buttonTitle: o,
|
|
2254
|
-
onClickClose:
|
|
2250
|
+
onClickClose: d
|
|
2255
2251
|
}) => {
|
|
2256
|
-
const { t:
|
|
2252
|
+
const { t: a } = A();
|
|
2257
2253
|
return /* @__PURE__ */ h(
|
|
2258
2254
|
"div",
|
|
2259
2255
|
{
|
|
2260
2256
|
style: n ? { ...n } : {},
|
|
2261
2257
|
className: `${K.legendContainer}`,
|
|
2262
2258
|
children: [
|
|
2263
|
-
/* @__PURE__ */ i("button", { className: K.closeButton, onClick:
|
|
2264
|
-
|
|
2259
|
+
/* @__PURE__ */ i("button", { className: K.closeButton, onClick: d }),
|
|
2260
|
+
c && /* @__PURE__ */ i(
|
|
2265
2261
|
"div",
|
|
2266
2262
|
{
|
|
2267
2263
|
className: K.titleContainer,
|
|
2268
2264
|
style: {
|
|
2269
2265
|
marginBottom: (!s || s.length == 0) && "15px"
|
|
2270
2266
|
},
|
|
2271
|
-
children: /* @__PURE__ */ i("h2", { children:
|
|
2267
|
+
children: /* @__PURE__ */ i("h2", { children: c })
|
|
2272
2268
|
}
|
|
2273
2269
|
),
|
|
2274
|
-
s && s.length > 0 && /* @__PURE__ */ i("div", { className: K.infoContainer, children: /* @__PURE__ */ i("ul", { children: s.map(({ title:
|
|
2275
|
-
/* @__PURE__ */ i("h3", { className: K.title, children: `${
|
|
2270
|
+
s && s.length > 0 && /* @__PURE__ */ i("div", { className: K.infoContainer, children: /* @__PURE__ */ i("ul", { children: s.map(({ title: l, value: u }) => /* @__PURE__ */ h("li", { children: [
|
|
2271
|
+
/* @__PURE__ */ i("h3", { className: K.title, children: `${l}:` }),
|
|
2276
2272
|
/* @__PURE__ */ h("span", { className: K.value, children: [
|
|
2277
2273
|
" ",
|
|
2278
2274
|
u
|
|
2279
2275
|
] })
|
|
2280
|
-
] },
|
|
2281
|
-
r && r.length > 0 && r.map((
|
|
2276
|
+
] }, c)) }) }),
|
|
2277
|
+
r && r.length > 0 && r.map((l, u) => /* @__PURE__ */ h("div", { children: [
|
|
2282
2278
|
/* @__PURE__ */ i(
|
|
2283
2279
|
"h3",
|
|
2284
2280
|
{
|
|
@@ -2286,10 +2282,10 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2286
2282
|
style: {
|
|
2287
2283
|
marginTop: s && s.length > 0 && u === 0 ? "30px" : u > 0 ? "20px" : "0px"
|
|
2288
2284
|
},
|
|
2289
|
-
children:
|
|
2285
|
+
children: l.title && /* @__PURE__ */ i(
|
|
2290
2286
|
$t,
|
|
2291
2287
|
{
|
|
2292
|
-
i18nKey:
|
|
2288
|
+
i18nKey: l.title,
|
|
2293
2289
|
components: { sup: /* @__PURE__ */ i("sup", {}) },
|
|
2294
2290
|
shouldUnescape: !0
|
|
2295
2291
|
}
|
|
@@ -2297,35 +2293,35 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2297
2293
|
}
|
|
2298
2294
|
),
|
|
2299
2295
|
/* @__PURE__ */ h("div", { className: K.legendListContainer, children: [
|
|
2300
|
-
|
|
2296
|
+
l.absolute ? /* @__PURE__ */ h("div", { className: K.absoluteValueContainer, children: [
|
|
2301
2297
|
/* @__PURE__ */ i(
|
|
2302
2298
|
"div",
|
|
2303
2299
|
{
|
|
2304
2300
|
className: K.absoluteValueColor,
|
|
2305
2301
|
style: {
|
|
2306
|
-
background: `linear-gradient(to bottom, ${
|
|
2302
|
+
background: `linear-gradient(to bottom, ${l.absolute.maxColor} 0%, ${l.absolute.midColor ? `${l.absolute.midColor} 50%,` : ""} ${l.absolute.minColor} 100%)`
|
|
2307
2303
|
}
|
|
2308
2304
|
}
|
|
2309
2305
|
),
|
|
2310
2306
|
/* @__PURE__ */ h("div", { className: K.absoluteValueText, children: [
|
|
2311
2307
|
/* @__PURE__ */ h("span", { children: [
|
|
2312
|
-
|
|
2308
|
+
l.absolute.maxValue,
|
|
2313
2309
|
" ",
|
|
2314
|
-
l
|
|
2310
|
+
a(l.absolute.unit)
|
|
2315
2311
|
] }),
|
|
2316
|
-
|
|
2317
|
-
|
|
2312
|
+
l.absolute.midValue && /* @__PURE__ */ h("span", { children: [
|
|
2313
|
+
l.absolute.midValue,
|
|
2318
2314
|
" ",
|
|
2319
|
-
l
|
|
2315
|
+
a(l.absolute.unit)
|
|
2320
2316
|
] }),
|
|
2321
2317
|
/* @__PURE__ */ h("span", { children: [
|
|
2322
|
-
|
|
2318
|
+
l.absolute.minValue,
|
|
2323
2319
|
" ",
|
|
2324
|
-
l
|
|
2320
|
+
a(l.absolute.unit)
|
|
2325
2321
|
] })
|
|
2326
2322
|
] })
|
|
2327
|
-
] }) :
|
|
2328
|
-
({ title:
|
|
2323
|
+
] }) : l.categories && l.categories.length > 0 && /* @__PURE__ */ i("div", { className: K.gridContainer, children: l.categories.map(
|
|
2324
|
+
({ title: C, color: m }, f) => /* @__PURE__ */ h(
|
|
2329
2325
|
"div",
|
|
2330
2326
|
{
|
|
2331
2327
|
className: K.elementLegendContainer,
|
|
@@ -2338,29 +2334,29 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2338
2334
|
}
|
|
2339
2335
|
),
|
|
2340
2336
|
/* @__PURE__ */ h("div", { className: K.titleLegendElement, children: [
|
|
2341
|
-
|
|
2337
|
+
a(C),
|
|
2342
2338
|
" "
|
|
2343
2339
|
] })
|
|
2344
2340
|
]
|
|
2345
2341
|
},
|
|
2346
|
-
|
|
2342
|
+
f
|
|
2347
2343
|
)
|
|
2348
2344
|
) }),
|
|
2349
|
-
|
|
2345
|
+
l.absolute && l.absolute.noDataColor && /* @__PURE__ */ h("div", { className: K.noDataContainer, children: [
|
|
2350
2346
|
/* @__PURE__ */ i(
|
|
2351
2347
|
"div",
|
|
2352
2348
|
{
|
|
2353
2349
|
className: K.noData,
|
|
2354
2350
|
style: {
|
|
2355
|
-
background:
|
|
2351
|
+
background: l.absolute.noDataColor
|
|
2356
2352
|
}
|
|
2357
2353
|
}
|
|
2358
2354
|
),
|
|
2359
|
-
/* @__PURE__ */ i("div", { className: K.absoluteValueText, children: /* @__PURE__ */ i("span", { children: l
|
|
2355
|
+
/* @__PURE__ */ i("div", { className: K.absoluteValueText, children: /* @__PURE__ */ i("span", { children: a(l.absolute.noDataText) }) })
|
|
2360
2356
|
] })
|
|
2361
2357
|
] })
|
|
2362
2358
|
] }, u)),
|
|
2363
|
-
t && /* @__PURE__ */ i("button", { className: K.moreInfoContainer, onClick: t, children: o ||
|
|
2359
|
+
t && /* @__PURE__ */ i("button", { className: K.moreInfoContainer, onClick: t, children: o || a("moreInformation") })
|
|
2364
2360
|
]
|
|
2365
2361
|
}
|
|
2366
2362
|
);
|
|
@@ -2402,8 +2398,8 @@ Un.propTypes = {
|
|
|
2402
2398
|
};
|
|
2403
2399
|
const Gn = "_logo_1ewa6_2", It = {
|
|
2404
2400
|
logo: Gn
|
|
2405
|
-
}, Xn = ({ src: n, alt:
|
|
2406
|
-
const { t: r } = A(), t = /* @__PURE__ */ i("img", { src: n, alt: r(
|
|
2401
|
+
}, Xn = ({ src: n, alt: c, href: s }) => {
|
|
2402
|
+
const { t: r } = A(), t = /* @__PURE__ */ i("img", { src: n, alt: r(c) });
|
|
2407
2403
|
return s ? /* @__PURE__ */ i("div", { className: It.logo, children: /* @__PURE__ */ i("a", { href: s, children: t }) }) : /* @__PURE__ */ i("div", { className: It.logo, children: t });
|
|
2408
2404
|
};
|
|
2409
2405
|
Xn.propTypes = {
|
|
@@ -2418,18 +2414,18 @@ const Qn = "_mapContainer_84pkf_2", Jn = {
|
|
|
2418
2414
|
L2.accessToken = "pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";
|
|
2419
2415
|
const Yn = ({
|
|
2420
2416
|
initialView: n = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
|
|
2421
|
-
maxZoom:
|
|
2417
|
+
maxZoom: c = 17,
|
|
2422
2418
|
minZoom: s = 8,
|
|
2423
2419
|
mapStyle: r,
|
|
2424
2420
|
firstSymbolLayer: t,
|
|
2425
2421
|
cssProps: o = "",
|
|
2426
|
-
onClick:
|
|
2427
|
-
interactiveLayers:
|
|
2428
|
-
popUp:
|
|
2422
|
+
onClick: d = "",
|
|
2423
|
+
interactiveLayers: a = [],
|
|
2424
|
+
popUp: l = !1,
|
|
2429
2425
|
sources: u = [],
|
|
2430
|
-
layers:
|
|
2426
|
+
layers: C = []
|
|
2431
2427
|
}) => {
|
|
2432
|
-
const m = Y(), [
|
|
2428
|
+
const m = Y(), [f, p] = I(null), y = M2((b) => b.mapState.showTexts);
|
|
2433
2429
|
return O(() => {
|
|
2434
2430
|
if (m.current) {
|
|
2435
2431
|
const b = m.current.getMap();
|
|
@@ -2443,17 +2439,17 @@ const Yn = ({
|
|
|
2443
2439
|
initialViewState: n,
|
|
2444
2440
|
ref: m,
|
|
2445
2441
|
hash: !1,
|
|
2446
|
-
maxZoom:
|
|
2442
|
+
maxZoom: c,
|
|
2447
2443
|
minZoom: s,
|
|
2448
2444
|
mapStyle: r,
|
|
2449
|
-
onClick:
|
|
2450
|
-
interactiveLayerIds:
|
|
2445
|
+
onClick: d,
|
|
2446
|
+
interactiveLayerIds: a,
|
|
2451
2447
|
children: [
|
|
2452
2448
|
u.length && u.map((b, v) => /* @__PURE__ */ i(
|
|
2453
2449
|
D2,
|
|
2454
2450
|
{
|
|
2455
2451
|
...b,
|
|
2456
|
-
children:
|
|
2452
|
+
children: C.length && C.map((_, w) => {
|
|
2457
2453
|
if (_.sourceId == b.id) return /* @__PURE__ */ i(
|
|
2458
2454
|
B2,
|
|
2459
2455
|
{
|
|
@@ -2467,14 +2463,14 @@ const Yn = ({
|
|
|
2467
2463
|
v
|
|
2468
2464
|
)),
|
|
2469
2465
|
/* @__PURE__ */ i(V2, { position: "bottom-right", visualizePitch: !0 }),
|
|
2470
|
-
|
|
2466
|
+
l && f && /* @__PURE__ */ i(
|
|
2471
2467
|
F2,
|
|
2472
2468
|
{
|
|
2473
|
-
longitude:
|
|
2474
|
-
latitude:
|
|
2475
|
-
anchor:
|
|
2469
|
+
longitude: l.longitude,
|
|
2470
|
+
latitude: l.latitude,
|
|
2471
|
+
anchor: l.anchor,
|
|
2476
2472
|
onClose: () => p(null),
|
|
2477
|
-
children:
|
|
2473
|
+
children: l.content
|
|
2478
2474
|
}
|
|
2479
2475
|
)
|
|
2480
2476
|
]
|
|
@@ -2532,32 +2528,32 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2532
2528
|
FeaturePopUp: ni,
|
|
2533
2529
|
title: ii
|
|
2534
2530
|
}, si = ({ props: n }) => {
|
|
2535
|
-
const { t:
|
|
2531
|
+
const { t: c } = A();
|
|
2536
2532
|
return /* @__PURE__ */ i("div", { className: Et.FeaturePopUp, children: n.map((s) => /* @__PURE__ */ h("p", { children: [
|
|
2537
2533
|
/* @__PURE__ */ h("span", { className: Et.title, children: [
|
|
2538
2534
|
/* @__PURE__ */ i($t, { i18nKey: s.name, components: { sup: /* @__PURE__ */ i("sup", {}) }, shouldUnescape: !0 }),
|
|
2539
2535
|
":"
|
|
2540
2536
|
] }),
|
|
2541
|
-
isNaN(s.value) ? /* @__PURE__ */ i(et, { children:
|
|
2537
|
+
isNaN(s.value) ? /* @__PURE__ */ i(et, { children: c(s.value) }) : /* @__PURE__ */ h(et, { children: [
|
|
2542
2538
|
s.value.toLocaleString("de", { maximumFractionDigits: 2 }),
|
|
2543
2539
|
" ",
|
|
2544
|
-
|
|
2540
|
+
c(s.unit)
|
|
2545
2541
|
] })
|
|
2546
2542
|
] })) });
|
|
2547
2543
|
}, ri = ({
|
|
2548
2544
|
initialView: n = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
|
|
2549
|
-
maxZoom:
|
|
2545
|
+
maxZoom: c = 17,
|
|
2550
2546
|
minZoom: s = 8,
|
|
2551
2547
|
mapStyle: r,
|
|
2552
2548
|
firstSymbolLayer: t,
|
|
2553
2549
|
cssProps: o = {},
|
|
2554
|
-
onClick:
|
|
2555
|
-
interactiveLayers:
|
|
2556
|
-
sources:
|
|
2550
|
+
onClick: d = "",
|
|
2551
|
+
interactiveLayers: a = [],
|
|
2552
|
+
sources: l = [],
|
|
2557
2553
|
layers: u = [],
|
|
2558
|
-
popUpParams:
|
|
2554
|
+
popUpParams: C,
|
|
2559
2555
|
onClosePopUp: m,
|
|
2560
|
-
showTexts:
|
|
2556
|
+
showTexts: f,
|
|
2561
2557
|
hash: p = !1
|
|
2562
2558
|
}) => {
|
|
2563
2559
|
const y = Y();
|
|
@@ -2565,10 +2561,10 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2565
2561
|
if (y.current) {
|
|
2566
2562
|
const b = y.current.getMap();
|
|
2567
2563
|
b.getStyle().layers.map((_) => {
|
|
2568
|
-
_.type == "symbol" && _.id != "professionals" && (
|
|
2564
|
+
_.type == "symbol" && _.id != "professionals" && (f ? b.setLayoutProperty(_.id, "visibility", "visible") : b.setLayoutProperty(_.id, "visibility", "none"));
|
|
2569
2565
|
});
|
|
2570
2566
|
}
|
|
2571
|
-
}, [
|
|
2567
|
+
}, [f]), O(() => {
|
|
2572
2568
|
let b = new A2();
|
|
2573
2569
|
return ut.addProtocol("pmtiles", b.tile), () => {
|
|
2574
2570
|
ut.removeProtocol("pmtiles");
|
|
@@ -2580,13 +2576,13 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2580
2576
|
initialViewState: n,
|
|
2581
2577
|
ref: y,
|
|
2582
2578
|
hash: p,
|
|
2583
|
-
maxZoom:
|
|
2579
|
+
maxZoom: c,
|
|
2584
2580
|
minZoom: s,
|
|
2585
2581
|
mapStyle: r,
|
|
2586
|
-
onClick:
|
|
2587
|
-
interactiveLayerIds:
|
|
2582
|
+
onClick: d,
|
|
2583
|
+
interactiveLayerIds: a,
|
|
2588
2584
|
children: [
|
|
2589
|
-
|
|
2585
|
+
l.length && l.map((b, v) => /* @__PURE__ */ i(
|
|
2590
2586
|
R2,
|
|
2591
2587
|
{
|
|
2592
2588
|
...b,
|
|
@@ -2608,13 +2604,13 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2608
2604
|
v
|
|
2609
2605
|
)),
|
|
2610
2606
|
/* @__PURE__ */ i(E2, { position: "bottom-right", visualizePitch: !0 }),
|
|
2611
|
-
|
|
2607
|
+
C && /* @__PURE__ */ i(
|
|
2612
2608
|
q2,
|
|
2613
2609
|
{
|
|
2614
|
-
longitude:
|
|
2615
|
-
latitude:
|
|
2610
|
+
longitude: C.lng,
|
|
2611
|
+
latitude: C.lat,
|
|
2616
2612
|
onClose: m,
|
|
2617
|
-
children: /* @__PURE__ */ i(si, { props:
|
|
2613
|
+
children: /* @__PURE__ */ i(si, { props: C.props })
|
|
2618
2614
|
}
|
|
2619
2615
|
)
|
|
2620
2616
|
]
|
|
@@ -2674,14 +2670,14 @@ const oi = "_sectionBar_yf2vy_2", ai = "_leftContent_yf2vy_14", li = "_textConta
|
|
|
2674
2670
|
rightContent: ui
|
|
2675
2671
|
}, pi = ({
|
|
2676
2672
|
leftIcon: n,
|
|
2677
|
-
title:
|
|
2673
|
+
title: c,
|
|
2678
2674
|
subtitle: s,
|
|
2679
2675
|
rightContent: r,
|
|
2680
2676
|
mainColor: t,
|
|
2681
2677
|
width: o,
|
|
2682
|
-
titleColor:
|
|
2683
|
-
subTitleColor:
|
|
2684
|
-
borderTop:
|
|
2678
|
+
titleColor: d = "#605b56",
|
|
2679
|
+
subTitleColor: a = "#605b56",
|
|
2680
|
+
borderTop: l = !1
|
|
2685
2681
|
}) => {
|
|
2686
2682
|
const { t: u } = A();
|
|
2687
2683
|
return /* @__PURE__ */ h(
|
|
@@ -2690,14 +2686,14 @@ const oi = "_sectionBar_yf2vy_2", ai = "_leftContent_yf2vy_14", li = "_textConta
|
|
|
2690
2686
|
className: ve.sectionBar,
|
|
2691
2687
|
style: {
|
|
2692
2688
|
width: o && o,
|
|
2693
|
-
borderTop:
|
|
2689
|
+
borderTop: l ? "1px solid #000" : "0px"
|
|
2694
2690
|
},
|
|
2695
2691
|
children: [
|
|
2696
2692
|
/* @__PURE__ */ h("div", { className: ve.leftContent, children: [
|
|
2697
2693
|
n && /* @__PURE__ */ i("img", { src: n, alt: "Icono", className: ve.icon }),
|
|
2698
2694
|
/* @__PURE__ */ h("div", { className: ve.textContainer, children: [
|
|
2699
|
-
/* @__PURE__ */ i("div", { className: ve.title, style: { color:
|
|
2700
|
-
s && /* @__PURE__ */ i("div", { className: ve.subtitle, style: { color:
|
|
2695
|
+
/* @__PURE__ */ i("div", { className: ve.title, style: { color: d }, children: u(c) }),
|
|
2696
|
+
s && /* @__PURE__ */ i("div", { className: ve.subtitle, style: { color: a }, children: s })
|
|
2701
2697
|
] })
|
|
2702
2698
|
] }),
|
|
2703
2699
|
/* @__PURE__ */ i("div", { className: ve.rightContent, children: r })
|
|
@@ -2730,20 +2726,20 @@ const hi = z2({
|
|
|
2730
2726
|
activeIndicatorUnit: null
|
|
2731
2727
|
},
|
|
2732
2728
|
reducers: {
|
|
2733
|
-
setShowTexts: (n,
|
|
2734
|
-
n.showTexts =
|
|
2729
|
+
setShowTexts: (n, c) => {
|
|
2730
|
+
n.showTexts = c.payload;
|
|
2735
2731
|
},
|
|
2736
|
-
setYear: (n,
|
|
2737
|
-
n.sliderSelectedYear =
|
|
2732
|
+
setYear: (n, c) => {
|
|
2733
|
+
n.sliderSelectedYear = c.payload;
|
|
2738
2734
|
},
|
|
2739
|
-
setActiveIndicatorKey: (n,
|
|
2740
|
-
n.activeIndicatorKey =
|
|
2735
|
+
setActiveIndicatorKey: (n, c) => {
|
|
2736
|
+
n.activeIndicatorKey = c.payload;
|
|
2741
2737
|
},
|
|
2742
|
-
setActiveIndicatorType: (n,
|
|
2743
|
-
n.activeIndicatorType =
|
|
2738
|
+
setActiveIndicatorType: (n, c) => {
|
|
2739
|
+
n.activeIndicatorType = c.payload;
|
|
2744
2740
|
},
|
|
2745
|
-
setActiveIndicatorUnit: (n,
|
|
2746
|
-
n.activeIndicatorUnit =
|
|
2741
|
+
setActiveIndicatorUnit: (n, c) => {
|
|
2742
|
+
n.activeIndicatorUnit = c.payload;
|
|
2747
2743
|
}
|
|
2748
2744
|
}
|
|
2749
2745
|
}), { setShowTexts: X1, setYear: Q1, setActiveIndicatorKey: J1, setActiveIndicatorType: Y1, setActiveIndicatorUnit: eo } = hi.actions, mi = "data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20d='M15.2722%2012.6627C15.2722%2011.8929%2016.1055%2011.4118%2016.7722%2011.7967L31.5641%2020.3368C32.2308%2020.7217%2032.2308%2021.684%2031.5641%2022.0689L16.7722%2030.609C16.1055%2030.9939%2015.2722%2030.5128%2015.2722%2029.743L15.2722%2012.6627Z'%20fill='%23605B56'/%3e%3c/svg%3e", gi = "data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3crect%20x='15'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3crect%20x='23'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3c/svg%3e", Ci = "_slider_1prh1_2", fi = "_playButton_1prh1_14", yi = "_sliderOpen_1prh1_25", bi = "_sliderResults_1prh1_29", Oe = {
|
|
@@ -2753,47 +2749,47 @@ const hi = z2({
|
|
|
2753
2749
|
sliderResults: bi
|
|
2754
2750
|
}, _i = ({
|
|
2755
2751
|
onResults: n = !1,
|
|
2756
|
-
defaultYear:
|
|
2752
|
+
defaultYear: c = 2025,
|
|
2757
2753
|
firstYear: s = 2025,
|
|
2758
2754
|
lastYear: r = 2050,
|
|
2759
2755
|
marcas: t = null,
|
|
2760
2756
|
zIndex: o = 10,
|
|
2761
|
-
rightBarOpen:
|
|
2757
|
+
rightBarOpen: d = !1,
|
|
2762
2758
|
//If this is false, the slider will stop
|
|
2763
|
-
conditionToBeRuning:
|
|
2764
|
-
onChange:
|
|
2759
|
+
conditionToBeRuning: a = null,
|
|
2760
|
+
onChange: l = (u) => {
|
|
2765
2761
|
console.log("year changed to ", u);
|
|
2766
2762
|
}
|
|
2767
2763
|
}) => {
|
|
2768
|
-
const
|
|
2764
|
+
const C = t || ((g, N) => {
|
|
2769
2765
|
const x = [];
|
|
2770
|
-
x.push({ label: "", value:
|
|
2771
|
-
const S = Math.ceil(
|
|
2766
|
+
x.push({ label: "", value: g });
|
|
2767
|
+
const S = Math.ceil(g / 10) * 10;
|
|
2772
2768
|
for (let $ = S; $ < N; $ += 10)
|
|
2773
2769
|
x.push({ label: "", value: $ });
|
|
2774
2770
|
return x[x.length - 1].value !== N && x.push({ label: "", value: N }), x;
|
|
2775
|
-
})(s, r), [m,
|
|
2771
|
+
})(s, r), [m, f] = I(c);
|
|
2776
2772
|
O(() => {
|
|
2777
|
-
|
|
2778
|
-
}, [
|
|
2779
|
-
const p = (
|
|
2780
|
-
|
|
2773
|
+
f(c);
|
|
2774
|
+
}, [c]);
|
|
2775
|
+
const p = (g, N) => {
|
|
2776
|
+
f(N), l(N);
|
|
2781
2777
|
}, [y, b] = I(!1);
|
|
2782
2778
|
O(() => {
|
|
2783
|
-
|
|
2784
|
-
}, [
|
|
2785
|
-
|
|
2786
|
-
}, [
|
|
2779
|
+
c && console.log("defaultYear changed:", c), c && f(c);
|
|
2780
|
+
}, [c]), O(() => {
|
|
2781
|
+
a === !1 && b(!1);
|
|
2782
|
+
}, [a]);
|
|
2787
2783
|
const v = () => {
|
|
2788
2784
|
b(!0);
|
|
2789
2785
|
}, _ = () => {
|
|
2790
2786
|
b(!1);
|
|
2791
2787
|
};
|
|
2792
|
-
((
|
|
2788
|
+
((g, N, x = []) => {
|
|
2793
2789
|
const S = Y();
|
|
2794
2790
|
O(() => {
|
|
2795
|
-
S.current =
|
|
2796
|
-
}, [
|
|
2791
|
+
S.current = g;
|
|
2792
|
+
}, [g]), O(() => {
|
|
2797
2793
|
function $() {
|
|
2798
2794
|
S.current();
|
|
2799
2795
|
}
|
|
@@ -2804,9 +2800,9 @@ const hi = z2({
|
|
|
2804
2800
|
}, [N, ...x]);
|
|
2805
2801
|
})(
|
|
2806
2802
|
() => {
|
|
2807
|
-
y &&
|
|
2808
|
-
const N =
|
|
2809
|
-
return N > r ? (
|
|
2803
|
+
y && f((g) => {
|
|
2804
|
+
const N = g + 1;
|
|
2805
|
+
return N > r ? (l(s), s) : (l(N), N);
|
|
2810
2806
|
});
|
|
2811
2807
|
},
|
|
2812
2808
|
1e3,
|
|
@@ -2839,7 +2835,7 @@ const hi = z2({
|
|
|
2839
2835
|
j2,
|
|
2840
2836
|
{
|
|
2841
2837
|
sx: { width: 400 },
|
|
2842
|
-
className: `${n ? Oe.sliderResults : Oe.slider} ${
|
|
2838
|
+
className: `${n ? Oe.sliderResults : Oe.slider} ${d ? Oe.sliderOpen : ""}`,
|
|
2843
2839
|
style: { zIndex: o },
|
|
2844
2840
|
children: [
|
|
2845
2841
|
s,
|
|
@@ -2850,7 +2846,7 @@ const hi = z2({
|
|
|
2850
2846
|
value: m,
|
|
2851
2847
|
valueLabelDisplay: "on",
|
|
2852
2848
|
step: 1,
|
|
2853
|
-
marks:
|
|
2849
|
+
marks: C,
|
|
2854
2850
|
min: s,
|
|
2855
2851
|
max: r,
|
|
2856
2852
|
onChange: p,
|
|
@@ -2886,7 +2882,7 @@ const vi = "_TopNavMenuContainer_12mp4_2", xi = "_topNavOptions_12mp4_13", wi =
|
|
|
2886
2882
|
active: wi
|
|
2887
2883
|
}, Ni = ({
|
|
2888
2884
|
options: n = [],
|
|
2889
|
-
containerStyles:
|
|
2885
|
+
containerStyles: c,
|
|
2890
2886
|
borderColor: s = "red",
|
|
2891
2887
|
textColor: r = "white",
|
|
2892
2888
|
onChangeNavLink: t = (o) => {
|
|
@@ -2894,19 +2890,19 @@ const vi = "_TopNavMenuContainer_12mp4_2", xi = "_topNavOptions_12mp4_13", wi =
|
|
|
2894
2890
|
}
|
|
2895
2891
|
}) => {
|
|
2896
2892
|
const { t: o } = A();
|
|
2897
|
-
return /* @__PURE__ */ i("div", { className: mt.TopNavMenuContainer, style: { ...
|
|
2893
|
+
return /* @__PURE__ */ i("div", { className: mt.TopNavMenuContainer, style: { ...c }, children: n.map((d, a) => /* @__PURE__ */ i(
|
|
2898
2894
|
t2,
|
|
2899
2895
|
{
|
|
2900
|
-
to:
|
|
2901
|
-
className: ({ isActive:
|
|
2902
|
-
onClick: () => t(
|
|
2903
|
-
style: ({ isActive:
|
|
2896
|
+
to: d.url,
|
|
2897
|
+
className: ({ isActive: l }) => `${mt.topNavOptions} ${l ? mt.active : ""} `,
|
|
2898
|
+
onClick: () => t(d.url),
|
|
2899
|
+
style: ({ isActive: l }) => ({
|
|
2904
2900
|
color: r,
|
|
2905
|
-
borderBottom:
|
|
2901
|
+
borderBottom: l ? `5px solid ${s}` : "5px solid transparent"
|
|
2906
2902
|
}),
|
|
2907
|
-
children: o(
|
|
2903
|
+
children: o(d.name)
|
|
2908
2904
|
},
|
|
2909
|
-
|
|
2905
|
+
a
|
|
2910
2906
|
)) });
|
|
2911
2907
|
};
|
|
2912
2908
|
Ni.propTypes = {
|
|
@@ -2923,26 +2919,26 @@ const ki = "_LogInButton_1vxj5_2", $i = {
|
|
|
2923
2919
|
LogInButton: ki
|
|
2924
2920
|
}, Si = ({
|
|
2925
2921
|
cssClass: n,
|
|
2926
|
-
notLoggedInLabel:
|
|
2922
|
+
notLoggedInLabel: c = "Log in",
|
|
2927
2923
|
loggedInLabel: s = "Log out",
|
|
2928
2924
|
containerStyles: r,
|
|
2929
2925
|
userName: t = "",
|
|
2930
2926
|
isLoggedIn: o = !1,
|
|
2931
|
-
onClickLogIn:
|
|
2927
|
+
onClickLogIn: d = () => {
|
|
2932
2928
|
console.log("Login clicked");
|
|
2933
2929
|
},
|
|
2934
|
-
onClickLogOut:
|
|
2930
|
+
onClickLogOut: a = () => {
|
|
2935
2931
|
console.log("Logout clicked");
|
|
2936
2932
|
}
|
|
2937
2933
|
}) => {
|
|
2938
|
-
const { t:
|
|
2934
|
+
const { t: l } = A();
|
|
2939
2935
|
return /* @__PURE__ */ i(
|
|
2940
2936
|
"div",
|
|
2941
2937
|
{
|
|
2942
2938
|
style: { ...r },
|
|
2943
2939
|
className: `${$i.LogInButton} link ${n}`,
|
|
2944
|
-
onClick: o ?
|
|
2945
|
-
children: o ? t ||
|
|
2940
|
+
onClick: o ? a : d,
|
|
2941
|
+
children: o ? t || l(s) : l(c)
|
|
2946
2942
|
}
|
|
2947
2943
|
);
|
|
2948
2944
|
};
|
|
@@ -2978,20 +2974,20 @@ const Li = "_elementSelector_1ox68_2", Mi = "_header_1ox68_14", Ti = "_nameDateC
|
|
|
2978
2974
|
var qt;
|
|
2979
2975
|
function Nt() {
|
|
2980
2976
|
return Nt = Object.assign ? Object.assign.bind() : function(n) {
|
|
2981
|
-
for (var
|
|
2982
|
-
var s = arguments[
|
|
2977
|
+
for (var c = 1; c < arguments.length; c++) {
|
|
2978
|
+
var s = arguments[c];
|
|
2983
2979
|
for (var r in s) ({}).hasOwnProperty.call(s, r) && (n[r] = s[r]);
|
|
2984
2980
|
}
|
|
2985
2981
|
return n;
|
|
2986
2982
|
}, Nt.apply(null, arguments);
|
|
2987
2983
|
}
|
|
2988
|
-
var Ji = function(
|
|
2984
|
+
var Ji = function(c) {
|
|
2989
2985
|
return /* @__PURE__ */ Ve.createElement("svg", Nt({
|
|
2990
2986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2991
2987
|
width: 26,
|
|
2992
2988
|
height: 14,
|
|
2993
2989
|
fill: "none"
|
|
2994
|
-
},
|
|
2990
|
+
}, c), qt || (qt = /* @__PURE__ */ Ve.createElement("g", {
|
|
2995
2991
|
fill: "currentColor"
|
|
2996
2992
|
}, /* @__PURE__ */ Ve.createElement("path", {
|
|
2997
2993
|
d: "M12.95.408C7.659.408 2.849 2.772.083 6.726a.47.47 0 0 0 0 .532c2.761 3.955 7.571 6.313 12.867 6.313s10.106-2.358 12.867-6.313a.47.47 0 0 0 0-.532C23.05 2.772 18.24.408 12.95.408m0 10.814A4.24 4.24 0 0 1 8.718 6.99a4.24 4.24 0 0 1 4.232-4.232 4.24 4.24 0 0 1 4.232 4.232 4.24 4.24 0 0 1-4.232 4.232"
|
|
@@ -3001,34 +2997,34 @@ var Ji = function(d) {
|
|
|
3001
2997
|
};
|
|
3002
2998
|
const Yi = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205207'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e", p2 = ({
|
|
3003
2999
|
listelement: n,
|
|
3004
|
-
onClickElement:
|
|
3000
|
+
onClickElement: c,
|
|
3005
3001
|
isActive: s,
|
|
3006
3002
|
activeColor: r,
|
|
3007
3003
|
fontColor: t,
|
|
3008
3004
|
moreInfo: o,
|
|
3009
|
-
columns:
|
|
3010
|
-
elementButtons:
|
|
3011
|
-
processTooltip:
|
|
3005
|
+
columns: d,
|
|
3006
|
+
elementButtons: a,
|
|
3007
|
+
processTooltip: l,
|
|
3012
3008
|
defaultTooltip: u,
|
|
3013
|
-
showEye:
|
|
3009
|
+
showEye: C = !0
|
|
3014
3010
|
}) => {
|
|
3015
|
-
const { name: m, created_at:
|
|
3011
|
+
const { name: m, created_at: f, id: p, isBeingProcessed: y } = n, [b, v] = I(!1), { t: _ } = A();
|
|
3016
3012
|
O(() => {
|
|
3017
|
-
console.log("elementButtons: ",
|
|
3018
|
-
}, [
|
|
3019
|
-
const w =
|
|
3013
|
+
console.log("elementButtons: ", a);
|
|
3014
|
+
}, [a]);
|
|
3015
|
+
const w = a && a.edit && !n.is_default && !n.is_baseline, L = a && a.trash && !n.is_default && !n.is_baseline;
|
|
3020
3016
|
return /* @__PURE__ */ h(
|
|
3021
3017
|
"div",
|
|
3022
3018
|
{
|
|
3023
3019
|
className: ne.listElement,
|
|
3024
3020
|
style: { borderBottom: `1px solid ${t}` },
|
|
3025
3021
|
children: [
|
|
3026
|
-
/* @__PURE__ */ i("div", { className: ne.elementNameDate, onClick: () =>
|
|
3022
|
+
/* @__PURE__ */ i("div", { className: ne.elementNameDate, onClick: () => c(p), children: Object.keys(d).map((g) => g === "name" ? /* @__PURE__ */ i("div", { className: ne.elementNameContainer, children: /* @__PURE__ */ h(
|
|
3027
3023
|
"div",
|
|
3028
3024
|
{
|
|
3029
|
-
className: `${ne.elementName} ${
|
|
3025
|
+
className: `${ne.elementName} ${C && ne.nameAndEye}`,
|
|
3030
3026
|
children: [
|
|
3031
|
-
|
|
3027
|
+
C && (s ? /* @__PURE__ */ i(
|
|
3032
3028
|
Ji,
|
|
3033
3029
|
{
|
|
3034
3030
|
style: { color: r, marginRight: 9 }
|
|
@@ -3044,75 +3040,75 @@ const Yi = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%20
|
|
|
3044
3040
|
/* @__PURE__ */ i("span", { style: { color: s ? r : t }, children: m })
|
|
3045
3041
|
]
|
|
3046
3042
|
}
|
|
3047
|
-
) }) :
|
|
3043
|
+
) }) : g == "data" ? /* @__PURE__ */ i("div", { className: ne.elementDate, children: f ? new Date(f).toLocaleDateString() : "" }) : /* @__PURE__ */ i("div", { className: ne.elementDate, children: n[g] })) }),
|
|
3048
3044
|
/* @__PURE__ */ h("div", { className: ne.elementButtons, children: [
|
|
3049
3045
|
n.processing && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3050
3046
|
/* @__PURE__ */ i("img", { src: Ui }),
|
|
3051
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3047
|
+
/* @__PURE__ */ i(pe, { text: l, position: "left" })
|
|
3052
3048
|
] }),
|
|
3053
|
-
|
|
3049
|
+
a.filter && !n.is_default && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3054
3050
|
/* @__PURE__ */ i(
|
|
3055
3051
|
"button",
|
|
3056
3052
|
{
|
|
3057
|
-
onClick: () =>
|
|
3058
|
-
disabled:
|
|
3053
|
+
onClick: () => a.filter.onclick(n),
|
|
3054
|
+
disabled: a.filter.disabled || !1,
|
|
3059
3055
|
children: /* @__PURE__ */ i("img", { src: Ki })
|
|
3060
3056
|
}
|
|
3061
3057
|
),
|
|
3062
3058
|
/* @__PURE__ */ i(
|
|
3063
3059
|
pe,
|
|
3064
3060
|
{
|
|
3065
|
-
text:
|
|
3061
|
+
text: a.filter.tooltiptext,
|
|
3066
3062
|
position: "left"
|
|
3067
3063
|
}
|
|
3068
3064
|
)
|
|
3069
3065
|
] }),
|
|
3070
|
-
|
|
3066
|
+
a.copy && !n.is_default && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3071
3067
|
/* @__PURE__ */ i(
|
|
3072
3068
|
"button",
|
|
3073
3069
|
{
|
|
3074
|
-
onClick: () =>
|
|
3075
|
-
disabled:
|
|
3070
|
+
onClick: () => a.copy.onclick(n),
|
|
3071
|
+
disabled: a.copy.disabled || !1,
|
|
3076
3072
|
children: /* @__PURE__ */ i("img", { src: Wi })
|
|
3077
3073
|
}
|
|
3078
3074
|
),
|
|
3079
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3075
|
+
/* @__PURE__ */ i(pe, { text: a.copy.tooltiptext, position: "left" })
|
|
3080
3076
|
] }),
|
|
3081
3077
|
w && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3082
3078
|
/* @__PURE__ */ i(
|
|
3083
3079
|
"button",
|
|
3084
3080
|
{
|
|
3085
|
-
onClick: () =>
|
|
3086
|
-
disabled:
|
|
3081
|
+
onClick: () => a.edit.onclick(n),
|
|
3082
|
+
disabled: a.edit.disabled || !1,
|
|
3087
3083
|
children: /* @__PURE__ */ i("img", { src: Xi })
|
|
3088
3084
|
}
|
|
3089
3085
|
),
|
|
3090
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3086
|
+
/* @__PURE__ */ i(pe, { text: a.edit.tooltiptext, position: "left" })
|
|
3091
3087
|
] }),
|
|
3092
|
-
|
|
3088
|
+
a.info && n.is_default && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3093
3089
|
/* @__PURE__ */ i(
|
|
3094
3090
|
"button",
|
|
3095
3091
|
{
|
|
3096
|
-
onClick: () =>
|
|
3097
|
-
disabled:
|
|
3092
|
+
onClick: () => a.info.onclick(n),
|
|
3093
|
+
disabled: a.info.disabled || !1,
|
|
3098
3094
|
children: /* @__PURE__ */ i("img", { src: Qi })
|
|
3099
3095
|
}
|
|
3100
3096
|
),
|
|
3101
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3097
|
+
/* @__PURE__ */ i(pe, { text: a.info.tooltiptext, position: "left" })
|
|
3102
3098
|
] }),
|
|
3103
3099
|
L && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3104
3100
|
/* @__PURE__ */ i(
|
|
3105
3101
|
"button",
|
|
3106
3102
|
{
|
|
3107
|
-
onClick: () =>
|
|
3108
|
-
disabled:
|
|
3103
|
+
onClick: () => a.trash.onclick(n),
|
|
3104
|
+
disabled: a.trash.disabled || !1,
|
|
3109
3105
|
children: /* @__PURE__ */ i("img", { src: Hi })
|
|
3110
3106
|
}
|
|
3111
3107
|
),
|
|
3112
3108
|
/* @__PURE__ */ i(
|
|
3113
3109
|
pe,
|
|
3114
3110
|
{
|
|
3115
|
-
text:
|
|
3111
|
+
text: a.trash.tooltiptext,
|
|
3116
3112
|
position: "left"
|
|
3117
3113
|
}
|
|
3118
3114
|
)
|
|
@@ -3179,23 +3175,23 @@ p2.propTypes = {
|
|
|
3179
3175
|
};
|
|
3180
3176
|
const zt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M7%2015L7%201M7%2015L1%209M7%2015L13%209'%20stroke='%23605B56'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", es = ({
|
|
3181
3177
|
elementsList: n,
|
|
3182
|
-
activeElementId:
|
|
3178
|
+
activeElementId: c,
|
|
3183
3179
|
fontColor: s = "#605B56",
|
|
3184
3180
|
activeColor: r,
|
|
3185
3181
|
buttonContainerStyles: t = {},
|
|
3186
3182
|
containerStyles: o = {},
|
|
3187
|
-
newElementButton:
|
|
3183
|
+
newElementButton: d,
|
|
3188
3184
|
//{label: 'text', onClick: function(), disabled}/null
|
|
3189
|
-
onClickElement:
|
|
3190
|
-
columns:
|
|
3185
|
+
onClickElement: a = (y) => console.log(`OnCLickElement: ${y}`),
|
|
3186
|
+
columns: l,
|
|
3191
3187
|
// {'name': nomLabel/null, 'data':dataLabel/null, 'ambit':ambitLabel/null, 'escenari':escenariLabel/null}
|
|
3192
3188
|
elementButtons: u,
|
|
3193
3189
|
//{'copy': {onClick:onClickCopy, tooltipText:'text'}/null, 'filter': {onClick:onClickFilter, tooltipText:'text'}/null, 'trash':{onClick:onClickTrash, tooltipText:'text'}/null}
|
|
3194
|
-
moreInfo:
|
|
3190
|
+
moreInfo: C = !1,
|
|
3195
3191
|
//{label: 'x'}
|
|
3196
3192
|
processTooltip: m,
|
|
3197
3193
|
//texto para el tooltip del simbolo "En proceso"
|
|
3198
|
-
defaultTooltip:
|
|
3194
|
+
defaultTooltip: f,
|
|
3199
3195
|
//texto para el tooltip del símbolo de candado para los elementos default
|
|
3200
3196
|
showEye: p = !0
|
|
3201
3197
|
}) => {
|
|
@@ -3203,21 +3199,21 @@ const zt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
3203
3199
|
O(() => {
|
|
3204
3200
|
n && v(n);
|
|
3205
3201
|
}, [n]);
|
|
3206
|
-
const _ = (
|
|
3207
|
-
if (typeof
|
|
3208
|
-
if (/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(
|
|
3209
|
-
return new Date(
|
|
3210
|
-
const N = /^(\d{2})[-/.]\s*(\d{2})[-/.]\s*(\d{4})$/.exec(
|
|
3202
|
+
const _ = (g) => {
|
|
3203
|
+
if (typeof g != "string") return null;
|
|
3204
|
+
if (/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(g))
|
|
3205
|
+
return new Date(g);
|
|
3206
|
+
const N = /^(\d{2})[-/.]\s*(\d{2})[-/.]\s*(\d{4})$/.exec(g);
|
|
3211
3207
|
if (N)
|
|
3212
3208
|
return /* @__PURE__ */ new Date(`${N[3]}-${N[2]}-${N[1]}`);
|
|
3213
|
-
const x = /^(\d{2})[-/]\s*(\d{2})[-/]\s*(\d{4})$/.exec(
|
|
3209
|
+
const x = /^(\d{2})[-/]\s*(\d{2})[-/]\s*(\d{4})$/.exec(g);
|
|
3214
3210
|
return x ? parseInt(x[1]) > 12 ? /* @__PURE__ */ new Date(`${x[3]}-${x[2]}-${x[1]}`) : /* @__PURE__ */ new Date(`${x[3]}-${x[1]}-${x[2]}`) : null;
|
|
3215
|
-
}, w = (
|
|
3211
|
+
}, w = (g) => _(g) !== null, L = (g) => {
|
|
3216
3212
|
if (!b || b.length === 0) return;
|
|
3217
3213
|
let N = [...b];
|
|
3218
|
-
const x = N.find(($) => $[
|
|
3214
|
+
const x = N.find(($) => $[g] !== null && $[g] !== void 0), S = x ? w(x[g]) : !1;
|
|
3219
3215
|
N.sort(($, k) => {
|
|
3220
|
-
const T = $[
|
|
3216
|
+
const T = $[g], F = k[g];
|
|
3221
3217
|
if (T == null && F == null) return 0;
|
|
3222
3218
|
if (T == null) return 1;
|
|
3223
3219
|
if (F == null) return -1;
|
|
@@ -3241,42 +3237,42 @@ const zt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
3241
3237
|
className: de.header,
|
|
3242
3238
|
style: { borderBottom: `1px solid ${s}` },
|
|
3243
3239
|
children: [
|
|
3244
|
-
/* @__PURE__ */ i("div", { className: de.nameDateContainer, children: Object.keys(
|
|
3245
|
-
/* @__PURE__ */ i("span", { children: y(
|
|
3240
|
+
/* @__PURE__ */ i("div", { className: de.nameDateContainer, children: Object.keys(l).map((g) => g === "name" ? /* @__PURE__ */ i("div", { className: de.elementName, children: /* @__PURE__ */ h("button", { onClick: () => L("name"), children: [
|
|
3241
|
+
/* @__PURE__ */ i("span", { children: y(l.name) }),
|
|
3246
3242
|
/* @__PURE__ */ i("img", { src: zt, alt: "order arrow" })
|
|
3247
|
-
] }) },
|
|
3248
|
-
/* @__PURE__ */ i("span", { children: y(
|
|
3243
|
+
] }) }, g) : g === "data" ? /* @__PURE__ */ i("div", { className: de.elementDate, children: /* @__PURE__ */ h("button", { onClick: () => L("created_at"), children: [
|
|
3244
|
+
/* @__PURE__ */ i("span", { children: y(l.data) }),
|
|
3249
3245
|
/* @__PURE__ */ i("img", { src: zt, alt: "order arrow" })
|
|
3250
|
-
] }) },
|
|
3246
|
+
] }) }, g) : /* @__PURE__ */ i("div", { className: de.elementDate, children: /* @__PURE__ */ i("span", { children: y(l[g]) }) }, g)) }),
|
|
3251
3247
|
/* @__PURE__ */ i("div", { className: de.buttonsContainer })
|
|
3252
3248
|
]
|
|
3253
3249
|
}
|
|
3254
3250
|
),
|
|
3255
|
-
/* @__PURE__ */ i("div", { className: de.elementListContainer, children: b && b.length > 0 && b.map((
|
|
3251
|
+
/* @__PURE__ */ i("div", { className: de.elementListContainer, children: b && b.length > 0 && b.map((g) => /* @__PURE__ */ i(
|
|
3256
3252
|
p2,
|
|
3257
3253
|
{
|
|
3258
|
-
isActive:
|
|
3259
|
-
listelement:
|
|
3254
|
+
isActive: c == g.id,
|
|
3255
|
+
listelement: g,
|
|
3260
3256
|
fontColor: s,
|
|
3261
3257
|
activeColor: r,
|
|
3262
|
-
onClickElement:
|
|
3263
|
-
columns:
|
|
3258
|
+
onClickElement: a,
|
|
3259
|
+
columns: l,
|
|
3264
3260
|
elementButtons: u,
|
|
3265
|
-
moreInfo:
|
|
3261
|
+
moreInfo: C,
|
|
3266
3262
|
processTooltip: m,
|
|
3267
|
-
defaultTooltip:
|
|
3263
|
+
defaultTooltip: f,
|
|
3268
3264
|
showEye: p
|
|
3269
3265
|
},
|
|
3270
|
-
`elementKey${
|
|
3266
|
+
`elementKey${g.id}`
|
|
3271
3267
|
)) }),
|
|
3272
|
-
|
|
3268
|
+
d && /* @__PURE__ */ i("div", { className: de.newElementButtonContainer, children: /* @__PURE__ */ i(
|
|
3273
3269
|
it,
|
|
3274
3270
|
{
|
|
3275
3271
|
style: { ...t },
|
|
3276
|
-
onClick:
|
|
3272
|
+
onClick: d.onClick,
|
|
3277
3273
|
borderColor: "grey",
|
|
3278
|
-
disabled:
|
|
3279
|
-
children: y(
|
|
3274
|
+
disabled: d.disabled || !1,
|
|
3275
|
+
children: y(d.label)
|
|
3280
3276
|
}
|
|
3281
3277
|
) })
|
|
3282
3278
|
]
|
|
@@ -3344,43 +3340,43 @@ const ts = "_formContainer_asv64_2", ns = "_categorySelectorContainer_asv64_11",
|
|
|
3344
3340
|
};
|
|
3345
3341
|
var rs = (n) => n.type === "checkbox", os = (n) => n instanceof Date, h2 = (n) => n == null;
|
|
3346
3342
|
const as = (n) => typeof n == "object";
|
|
3347
|
-
var ze = (n) => !h2(n) && !Array.isArray(n) && as(n) && !os(n), ls = (n) => ze(n) && n.target ? rs(n.target) ? n.target.checked : n.target.value : n, cs = (n) => n.substring(0, n.search(/\.\d+(\.|$)/)) || n, ds = (n,
|
|
3348
|
-
const
|
|
3349
|
-
return ze(
|
|
3343
|
+
var ze = (n) => !h2(n) && !Array.isArray(n) && as(n) && !os(n), ls = (n) => ze(n) && n.target ? rs(n.target) ? n.target.checked : n.target.value : n, cs = (n) => n.substring(0, n.search(/\.\d+(\.|$)/)) || n, ds = (n, c) => n.has(cs(c)), us = (n) => {
|
|
3344
|
+
const c = n.constructor && n.constructor.prototype;
|
|
3345
|
+
return ze(c) && c.hasOwnProperty("isPrototypeOf");
|
|
3350
3346
|
}, ps = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
3351
3347
|
function m2(n) {
|
|
3352
|
-
let
|
|
3348
|
+
let c;
|
|
3353
3349
|
const s = Array.isArray(n), r = typeof FileList < "u" ? n instanceof FileList : !1;
|
|
3354
3350
|
if (n instanceof Date)
|
|
3355
|
-
|
|
3351
|
+
c = new Date(n);
|
|
3356
3352
|
else if (!(ps && (n instanceof Blob || r)) && (s || ze(n)))
|
|
3357
|
-
if (
|
|
3358
|
-
|
|
3353
|
+
if (c = s ? [] : {}, !s && !us(n))
|
|
3354
|
+
c = n;
|
|
3359
3355
|
else
|
|
3360
3356
|
for (const t in n)
|
|
3361
|
-
n.hasOwnProperty(t) && (
|
|
3357
|
+
n.hasOwnProperty(t) && (c[t] = m2(n[t]));
|
|
3362
3358
|
else
|
|
3363
3359
|
return n;
|
|
3364
|
-
return
|
|
3360
|
+
return c;
|
|
3365
3361
|
}
|
|
3366
|
-
var g2 = (n) => /^\w*$/.test(n), kt = (n) => n === void 0, hs = (n) => Array.isArray(n) ? n.filter(Boolean) : [], C2 = (n) => hs(n.replace(/["|']|\]/g, "").split(/\.|\[/)), J = (n,
|
|
3367
|
-
if (!
|
|
3362
|
+
var g2 = (n) => /^\w*$/.test(n), kt = (n) => n === void 0, hs = (n) => Array.isArray(n) ? n.filter(Boolean) : [], C2 = (n) => hs(n.replace(/["|']|\]/g, "").split(/\.|\[/)), J = (n, c, s) => {
|
|
3363
|
+
if (!c || !ze(n))
|
|
3368
3364
|
return s;
|
|
3369
|
-
const r = (g2(
|
|
3370
|
-
return kt(r) || r === n ? kt(n[
|
|
3371
|
-
}, gt = (n) => typeof n == "boolean", Pt = (n,
|
|
3365
|
+
const r = (g2(c) ? [c] : C2(c)).reduce((t, o) => h2(t) ? t : t[o], n);
|
|
3366
|
+
return kt(r) || r === n ? kt(n[c]) ? s : n[c] : r;
|
|
3367
|
+
}, gt = (n) => typeof n == "boolean", Pt = (n, c, s) => {
|
|
3372
3368
|
let r = -1;
|
|
3373
|
-
const t = g2(
|
|
3369
|
+
const t = g2(c) ? [c] : C2(c), o = t.length, d = o - 1;
|
|
3374
3370
|
for (; ++r < o; ) {
|
|
3375
|
-
const
|
|
3376
|
-
let
|
|
3377
|
-
if (r !==
|
|
3378
|
-
const u = n[
|
|
3379
|
-
|
|
3371
|
+
const a = t[r];
|
|
3372
|
+
let l = s;
|
|
3373
|
+
if (r !== d) {
|
|
3374
|
+
const u = n[a];
|
|
3375
|
+
l = ze(u) || Array.isArray(u) ? u : isNaN(+t[r + 1]) ? {} : [];
|
|
3380
3376
|
}
|
|
3381
|
-
if (
|
|
3377
|
+
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
3382
3378
|
return;
|
|
3383
|
-
n[
|
|
3379
|
+
n[a] = l, n = n[a];
|
|
3384
3380
|
}
|
|
3385
3381
|
};
|
|
3386
3382
|
const Zt = {
|
|
@@ -3391,22 +3387,22 @@ const Zt = {
|
|
|
3391
3387
|
}, f2 = E.createContext(null);
|
|
3392
3388
|
f2.displayName = "HookFormContext";
|
|
3393
3389
|
const Tt = () => E.useContext(f2);
|
|
3394
|
-
var ms = (n,
|
|
3390
|
+
var ms = (n, c, s, r = !0) => {
|
|
3395
3391
|
const t = {
|
|
3396
|
-
defaultValues:
|
|
3392
|
+
defaultValues: c._defaultValues
|
|
3397
3393
|
};
|
|
3398
3394
|
for (const o in n)
|
|
3399
3395
|
Object.defineProperty(t, o, {
|
|
3400
3396
|
get: () => {
|
|
3401
|
-
const
|
|
3402
|
-
return
|
|
3397
|
+
const d = o;
|
|
3398
|
+
return c._proxyFormState[d] !== jt.all && (c._proxyFormState[d] = !r || jt.all), s && (s[d] = !0), n[d];
|
|
3403
3399
|
}
|
|
3404
3400
|
});
|
|
3405
3401
|
return t;
|
|
3406
3402
|
};
|
|
3407
3403
|
const y2 = typeof window < "u" ? Ve.useLayoutEffect : Ve.useEffect;
|
|
3408
3404
|
function gs(n) {
|
|
3409
|
-
const
|
|
3405
|
+
const c = Tt(), { control: s = c.control, disabled: r, name: t, exact: o } = n || {}, [d, a] = E.useState(s._formState), l = E.useRef({
|
|
3410
3406
|
isDirty: !1,
|
|
3411
3407
|
isLoading: !1,
|
|
3412
3408
|
dirtyFields: !1,
|
|
@@ -3418,72 +3414,72 @@ function gs(n) {
|
|
|
3418
3414
|
});
|
|
3419
3415
|
return y2(() => s._subscribe({
|
|
3420
3416
|
name: t,
|
|
3421
|
-
formState:
|
|
3417
|
+
formState: l.current,
|
|
3422
3418
|
exact: o,
|
|
3423
3419
|
callback: (u) => {
|
|
3424
|
-
!r &&
|
|
3420
|
+
!r && a({
|
|
3425
3421
|
...s._formState,
|
|
3426
3422
|
...u
|
|
3427
3423
|
});
|
|
3428
3424
|
}
|
|
3429
3425
|
}), [t, r, o]), E.useEffect(() => {
|
|
3430
|
-
|
|
3431
|
-
}, [s]), E.useMemo(() => ms(
|
|
3426
|
+
l.current.isValid && s._setValid(!0);
|
|
3427
|
+
}, [s]), E.useMemo(() => ms(d, s, l.current, !1), [d, s]);
|
|
3432
3428
|
}
|
|
3433
|
-
var Cs = (n) => typeof n == "string", fs = (n,
|
|
3429
|
+
var Cs = (n) => typeof n == "string", fs = (n, c, s, r, t) => Cs(n) ? J(s, n, t) : Array.isArray(n) ? n.map((o) => J(s, o)) : s;
|
|
3434
3430
|
function ys(n) {
|
|
3435
|
-
const
|
|
3431
|
+
const c = Tt(), { control: s = c.control, name: r, defaultValue: t, disabled: o, exact: d } = n || {}, a = E.useRef(t), [l, u] = E.useState(s._getWatch(r, a.current));
|
|
3436
3432
|
return y2(() => s._subscribe({
|
|
3437
3433
|
name: r,
|
|
3438
3434
|
formState: {
|
|
3439
3435
|
values: !0
|
|
3440
3436
|
},
|
|
3441
|
-
exact:
|
|
3442
|
-
callback: (
|
|
3443
|
-
}), [r, s, o,
|
|
3437
|
+
exact: d,
|
|
3438
|
+
callback: (C) => !o && u(fs(r, s._names, C.values || s._formValues, !1, a.current))
|
|
3439
|
+
}), [r, s, o, d]), E.useEffect(() => s._removeUnmounted()), l;
|
|
3444
3440
|
}
|
|
3445
3441
|
function bs(n) {
|
|
3446
|
-
const
|
|
3442
|
+
const c = Tt(), { name: s, disabled: r, control: t = c.control, shouldUnregister: o } = n, d = ds(t._names.array, s), a = ys({
|
|
3447
3443
|
control: t,
|
|
3448
3444
|
name: s,
|
|
3449
3445
|
defaultValue: J(t._formValues, s, J(t._defaultValues, s, n.defaultValue)),
|
|
3450
3446
|
exact: !0
|
|
3451
|
-
}),
|
|
3447
|
+
}), l = gs({
|
|
3452
3448
|
control: t,
|
|
3453
3449
|
name: s,
|
|
3454
3450
|
exact: !0
|
|
3455
|
-
}), u = E.useRef(n),
|
|
3451
|
+
}), u = E.useRef(n), C = E.useRef(t.register(s, {
|
|
3456
3452
|
...n.rules,
|
|
3457
|
-
value:
|
|
3453
|
+
value: a,
|
|
3458
3454
|
...gt(n.disabled) ? { disabled: n.disabled } : {}
|
|
3459
3455
|
})), m = E.useMemo(() => Object.defineProperties({}, {
|
|
3460
3456
|
invalid: {
|
|
3461
3457
|
enumerable: !0,
|
|
3462
|
-
get: () => !!J(
|
|
3458
|
+
get: () => !!J(l.errors, s)
|
|
3463
3459
|
},
|
|
3464
3460
|
isDirty: {
|
|
3465
3461
|
enumerable: !0,
|
|
3466
|
-
get: () => !!J(
|
|
3462
|
+
get: () => !!J(l.dirtyFields, s)
|
|
3467
3463
|
},
|
|
3468
3464
|
isTouched: {
|
|
3469
3465
|
enumerable: !0,
|
|
3470
|
-
get: () => !!J(
|
|
3466
|
+
get: () => !!J(l.touchedFields, s)
|
|
3471
3467
|
},
|
|
3472
3468
|
isValidating: {
|
|
3473
3469
|
enumerable: !0,
|
|
3474
|
-
get: () => !!J(
|
|
3470
|
+
get: () => !!J(l.validatingFields, s)
|
|
3475
3471
|
},
|
|
3476
3472
|
error: {
|
|
3477
3473
|
enumerable: !0,
|
|
3478
|
-
get: () => J(
|
|
3474
|
+
get: () => J(l.errors, s)
|
|
3479
3475
|
}
|
|
3480
|
-
}), [
|
|
3476
|
+
}), [l, s]), f = E.useCallback((v) => C.current.onChange({
|
|
3481
3477
|
target: {
|
|
3482
3478
|
value: ls(v),
|
|
3483
3479
|
name: s
|
|
3484
3480
|
},
|
|
3485
3481
|
type: Zt.CHANGE
|
|
3486
|
-
}), [s]), p = E.useCallback(() =>
|
|
3482
|
+
}), [s]), p = E.useCallback(() => C.current.onBlur({
|
|
3487
3483
|
target: {
|
|
3488
3484
|
value: J(t._formValues, s),
|
|
3489
3485
|
name: s
|
|
@@ -3499,12 +3495,12 @@ function bs(n) {
|
|
|
3499
3495
|
});
|
|
3500
3496
|
}, [t._fields, s]), b = E.useMemo(() => ({
|
|
3501
3497
|
name: s,
|
|
3502
|
-
value:
|
|
3503
|
-
...gt(r) ||
|
|
3504
|
-
onChange:
|
|
3498
|
+
value: a,
|
|
3499
|
+
...gt(r) || l.disabled ? { disabled: l.disabled || r } : {},
|
|
3500
|
+
onChange: f,
|
|
3505
3501
|
onBlur: p,
|
|
3506
3502
|
ref: y
|
|
3507
|
-
}), [s, r,
|
|
3503
|
+
}), [s, r, l.disabled, f, p, y, a]);
|
|
3508
3504
|
return E.useEffect(() => {
|
|
3509
3505
|
const v = t._options.shouldUnregister || o;
|
|
3510
3506
|
t.register(s, {
|
|
@@ -3512,26 +3508,26 @@ function bs(n) {
|
|
|
3512
3508
|
...gt(u.current.disabled) ? { disabled: u.current.disabled } : {}
|
|
3513
3509
|
});
|
|
3514
3510
|
const _ = (w, L) => {
|
|
3515
|
-
const
|
|
3516
|
-
|
|
3511
|
+
const g = J(t._fields, w);
|
|
3512
|
+
g && g._f && (g._f.mount = L);
|
|
3517
3513
|
};
|
|
3518
3514
|
if (_(s, !0), v) {
|
|
3519
3515
|
const w = m2(J(t._options.defaultValues, s));
|
|
3520
3516
|
Pt(t._defaultValues, s, w), kt(J(t._formValues, s)) && Pt(t._formValues, s, w);
|
|
3521
3517
|
}
|
|
3522
|
-
return !
|
|
3523
|
-
(
|
|
3518
|
+
return !d && t.register(s), () => {
|
|
3519
|
+
(d ? v && !t._state.action : v) ? t.unregister(s) : _(s, !1);
|
|
3524
3520
|
};
|
|
3525
|
-
}, [s, t,
|
|
3521
|
+
}, [s, t, d, o]), E.useEffect(() => {
|
|
3526
3522
|
t._setDisabledField({
|
|
3527
3523
|
disabled: r,
|
|
3528
3524
|
name: s
|
|
3529
3525
|
});
|
|
3530
3526
|
}, [r, s, t]), E.useMemo(() => ({
|
|
3531
3527
|
field: b,
|
|
3532
|
-
formState:
|
|
3528
|
+
formState: l,
|
|
3533
3529
|
fieldState: m
|
|
3534
|
-
}), [b,
|
|
3530
|
+
}), [b, l, m]);
|
|
3535
3531
|
}
|
|
3536
3532
|
const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_labelContainer_1o3iy_5", xs = "_inputContainer_1o3iy_8", ws = "_showPasswordButton_1o3iy_14", Ns = "_forgotPassButton_1o3iy_26", Ie = {
|
|
3537
3533
|
textInputContainer: _s,
|
|
@@ -3543,7 +3539,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3543
3539
|
errorMessage: ks
|
|
3544
3540
|
}, Ze = ({
|
|
3545
3541
|
errorMessage: n,
|
|
3546
|
-
errorColor:
|
|
3542
|
+
errorColor: c = "red",
|
|
3547
3543
|
containerStyles: s
|
|
3548
3544
|
}) => {
|
|
3549
3545
|
const { t: r } = A();
|
|
@@ -3551,32 +3547,32 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3551
3547
|
"div",
|
|
3552
3548
|
{
|
|
3553
3549
|
className: $s.errorMessage,
|
|
3554
|
-
style: { color:
|
|
3550
|
+
style: { color: c, ...s },
|
|
3555
3551
|
children: n ? r(n) : ""
|
|
3556
3552
|
}
|
|
3557
3553
|
);
|
|
3558
3554
|
}, Ss = "data:image/svg+xml,%3csvg%20width='26'%20height='14'%20viewBox='0%200%2026%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205763'%3e%3cpath%20id='Vector'%20d='M12.95%200C7.659%200%202.84899%202.3634%200.0832465%206.31776C-0.0277488%206.47963%20-0.0277488%206.68776%200.0832465%206.84962C2.84439%2010.804%207.65437%2013.1628%2012.95%2013.1628C18.2456%2013.1628%2023.0556%2010.804%2025.8168%206.84962C25.9278%206.68775%2025.9278%206.47963%2025.8168%206.31776C23.051%202.36339%2018.241%200%2012.95%200ZM12.95%2010.8132C10.619%2010.8132%208.71812%208.91238%208.71812%206.58139C8.71812%204.25041%2010.619%202.34951%2012.95%202.34951C15.281%202.34951%2017.1819%204.25038%2017.1819%206.58139C17.1819%208.91241%2015.281%2010.8132%2012.95%2010.8132Z'%20fill='white'/%3e%3cpath%20id='Vector_2'%20d='M12.9514%209.88816C14.7777%209.88816%2016.2583%208.40763%2016.2583%206.58129C16.2583%204.75495%2014.7777%203.27441%2012.9514%203.27441C11.1251%203.27441%209.64453%204.75495%209.64453%206.58129C9.64453%208.40763%2011.1251%209.88816%2012.9514%209.88816Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e", Ls = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205995'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='white'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e", je = Qt((n) => ({
|
|
3559
3555
|
errorColor: "red"
|
|
3560
|
-
})), Ht = ({ input: n, reactHookFormInstance:
|
|
3556
|
+
})), Ht = ({ input: n, reactHookFormInstance: c }) => {
|
|
3561
3557
|
const {
|
|
3562
3558
|
code: s,
|
|
3563
3559
|
type: r,
|
|
3564
3560
|
label: t,
|
|
3565
3561
|
maxLength: o,
|
|
3566
|
-
required:
|
|
3567
|
-
validateFunction:
|
|
3568
|
-
placeholder:
|
|
3562
|
+
required: d,
|
|
3563
|
+
validateFunction: a,
|
|
3564
|
+
placeholder: l,
|
|
3569
3565
|
errorColor: u = "red",
|
|
3570
|
-
width:
|
|
3566
|
+
width: C = 325,
|
|
3571
3567
|
onClickForgotPass: m = () => {
|
|
3572
3568
|
console.log("Click on forgot password");
|
|
3573
3569
|
},
|
|
3574
|
-
forgotPassLabel:
|
|
3570
|
+
forgotPassLabel: f = "forgot-password",
|
|
3575
3571
|
//Lógica extra al onChange además de actualizar el valor en RHF
|
|
3576
3572
|
onChangeExtraFunction: p = () => {
|
|
3577
3573
|
}
|
|
3578
|
-
} = n, { t: y } = A(), { control: b, trigger: v, clearErrors: _ } =
|
|
3579
|
-
Y(
|
|
3574
|
+
} = n, { t: y } = A(), { control: b, trigger: v, clearErrors: _ } = c, { errorColor: w } = je((x) => x), [L, g] = I(!1);
|
|
3575
|
+
Y(d);
|
|
3580
3576
|
const N = () => r ? r === "password" && L ? "text" : r : "text";
|
|
3581
3577
|
return /* @__PURE__ */ i(
|
|
3582
3578
|
Pe,
|
|
@@ -3584,9 +3580,9 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3584
3580
|
name: s,
|
|
3585
3581
|
control: b,
|
|
3586
3582
|
rules: {
|
|
3587
|
-
required:
|
|
3583
|
+
required: d ? `${y(t)} ${y("errorMessages.required")}` : !1,
|
|
3588
3584
|
maxLength: o || void 0,
|
|
3589
|
-
validate:
|
|
3585
|
+
validate: a || void 0
|
|
3590
3586
|
},
|
|
3591
3587
|
render: ({ field: x, fieldState: S }) => {
|
|
3592
3588
|
var F;
|
|
@@ -3597,12 +3593,12 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3597
3593
|
/* @__PURE__ */ h("h3", { className: Ie.labelContainer, children: [
|
|
3598
3594
|
y(t),
|
|
3599
3595
|
" ",
|
|
3600
|
-
|
|
3596
|
+
d && /* @__PURE__ */ i("label", { style: { color: S.error ? u : "" }, children: "*" })
|
|
3601
3597
|
] }),
|
|
3602
3598
|
/* @__PURE__ */ h(
|
|
3603
3599
|
"div",
|
|
3604
3600
|
{
|
|
3605
|
-
style: { position: "relative", width:
|
|
3601
|
+
style: { position: "relative", width: C },
|
|
3606
3602
|
className: Ie.inputContainer,
|
|
3607
3603
|
children: [
|
|
3608
3604
|
/* @__PURE__ */ i(
|
|
@@ -3611,14 +3607,14 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3611
3607
|
...k,
|
|
3612
3608
|
type: N(),
|
|
3613
3609
|
onChange: T,
|
|
3614
|
-
placeholder:
|
|
3610
|
+
placeholder: l ? y(l) : "",
|
|
3615
3611
|
maxLength: o || void 0
|
|
3616
3612
|
}
|
|
3617
3613
|
),
|
|
3618
3614
|
r == "password" && /* @__PURE__ */ i(
|
|
3619
3615
|
"button",
|
|
3620
3616
|
{
|
|
3621
|
-
onClick: () =>
|
|
3617
|
+
onClick: () => g(!L),
|
|
3622
3618
|
type: "button",
|
|
3623
3619
|
className: Ie.showPasswordButton,
|
|
3624
3620
|
children: /* @__PURE__ */ i(
|
|
@@ -3633,7 +3629,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3633
3629
|
]
|
|
3634
3630
|
}
|
|
3635
3631
|
),
|
|
3636
|
-
r == "password" && /* @__PURE__ */ i("div", { className: Ie.forgotPassButton, children: /* @__PURE__ */ i("button", { onClick: m, children: y(
|
|
3632
|
+
r == "password" && /* @__PURE__ */ i("div", { className: Ie.forgotPassButton, children: /* @__PURE__ */ i("button", { onClick: m, children: y(f) }) }),
|
|
3637
3633
|
/* @__PURE__ */ i(
|
|
3638
3634
|
Ze,
|
|
3639
3635
|
{
|
|
@@ -3655,62 +3651,62 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3655
3651
|
selectInput: Fs,
|
|
3656
3652
|
option: As,
|
|
3657
3653
|
dropdownArrow: Os
|
|
3658
|
-
}, Wt = "data:image/svg+xml,%3csvg%20width='19'%20height='10'%20viewBox='0%200%2019%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector%20311'%20d='M1%201.09961L8.79289%208.8925C9.18342%209.28303%209.81658%209.28303%2010.2071%208.8925L18%201.09961'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e", Rs = ({ input: n, reactHookFormInstance:
|
|
3654
|
+
}, Wt = "data:image/svg+xml,%3csvg%20width='19'%20height='10'%20viewBox='0%200%2019%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector%20311'%20d='M1%201.09961L8.79289%208.8925C9.18342%209.28303%209.81658%209.28303%2010.2071%208.8925L18%201.09961'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e", Rs = ({ input: n, reactHookFormInstance: c, onChange: s }) => {
|
|
3659
3655
|
const {
|
|
3660
3656
|
code: r,
|
|
3661
3657
|
type: t,
|
|
3662
3658
|
label: o,
|
|
3663
|
-
maxLength:
|
|
3664
|
-
required:
|
|
3665
|
-
validateFunction:
|
|
3659
|
+
maxLength: d,
|
|
3660
|
+
required: a,
|
|
3661
|
+
validateFunction: l,
|
|
3666
3662
|
placeholder: u,
|
|
3667
|
-
errorColor:
|
|
3663
|
+
errorColor: C = "red",
|
|
3668
3664
|
width: m = 325,
|
|
3669
|
-
options:
|
|
3665
|
+
options: f = []
|
|
3670
3666
|
//Used if we dont use react hook form
|
|
3671
|
-
} = n, { t: p } = A(), { control: y, trigger: b, clearErrors: v } =
|
|
3672
|
-
Y(
|
|
3667
|
+
} = n, { t: p } = A(), { control: y, trigger: b, clearErrors: v } = c || {}, { errorColor: _ } = je((g) => g);
|
|
3668
|
+
Y(a);
|
|
3673
3669
|
const [w, L] = I(null);
|
|
3674
3670
|
return O(() => {
|
|
3675
3671
|
w && s && s(w);
|
|
3676
|
-
}, [w, s]),
|
|
3672
|
+
}, [w, s]), c ? /* @__PURE__ */ i(
|
|
3677
3673
|
Pe,
|
|
3678
3674
|
{
|
|
3679
3675
|
name: r,
|
|
3680
3676
|
control: y,
|
|
3681
3677
|
rules: {
|
|
3682
|
-
required:
|
|
3683
|
-
validate:
|
|
3684
|
-
let N =
|
|
3685
|
-
return
|
|
3678
|
+
required: a ? `${p(o)} ${p("errorMessages.required")}` : !1,
|
|
3679
|
+
validate: l ? (g) => {
|
|
3680
|
+
let N = c.getValues();
|
|
3681
|
+
return l(g, N);
|
|
3686
3682
|
} : void 0
|
|
3687
3683
|
},
|
|
3688
|
-
render: ({ field:
|
|
3684
|
+
render: ({ field: g, fieldState: N }) => {
|
|
3689
3685
|
var S;
|
|
3690
|
-
const x =
|
|
3691
|
-
($) => $.value ===
|
|
3686
|
+
const x = f.find(
|
|
3687
|
+
($) => $.value === g.value
|
|
3692
3688
|
);
|
|
3693
3689
|
return /* @__PURE__ */ h("div", { className: X.selectInputContainer, children: [
|
|
3694
3690
|
o && /* @__PURE__ */ h("h3", { className: X.labelContainer, children: [
|
|
3695
3691
|
p(o),
|
|
3696
3692
|
" ",
|
|
3697
|
-
|
|
3693
|
+
a && /* @__PURE__ */ i("label", { style: { color: N.error ? C : "" }, children: "*" })
|
|
3698
3694
|
] }),
|
|
3699
3695
|
/* @__PURE__ */ h("div", { className: X.selectWrapper, children: [
|
|
3700
3696
|
/* @__PURE__ */ h("div", { className: X.inputContainer, style: { width: m }, children: [
|
|
3701
3697
|
/* @__PURE__ */ h(
|
|
3702
3698
|
"select",
|
|
3703
3699
|
{
|
|
3704
|
-
...
|
|
3705
|
-
value:
|
|
3700
|
+
...g,
|
|
3701
|
+
value: g.value ?? "",
|
|
3706
3702
|
onChange: ($) => {
|
|
3707
|
-
const k = $.target.value, T =
|
|
3708
|
-
|
|
3703
|
+
const k = $.target.value, T = f.every((F) => typeof F.value == "number") ? Number(k) : k;
|
|
3704
|
+
g.onChange(T);
|
|
3709
3705
|
},
|
|
3710
3706
|
className: X.selectInput,
|
|
3711
3707
|
children: [
|
|
3712
3708
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: p(u || "selectOption") }),
|
|
3713
|
-
|
|
3709
|
+
f.map(($, k) => /* @__PURE__ */ i(
|
|
3714
3710
|
"option",
|
|
3715
3711
|
{
|
|
3716
3712
|
value: $.value,
|
|
@@ -3737,7 +3733,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3737
3733
|
Ze,
|
|
3738
3734
|
{
|
|
3739
3735
|
errorMessage: (S = N.error) == null ? void 0 : S.message,
|
|
3740
|
-
errorColor: _ ||
|
|
3736
|
+
errorColor: _ || C
|
|
3741
3737
|
}
|
|
3742
3738
|
)
|
|
3743
3739
|
] });
|
|
@@ -3747,26 +3743,26 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3747
3743
|
o && /* @__PURE__ */ h("h3", { className: X.labelContainer, children: [
|
|
3748
3744
|
p(o),
|
|
3749
3745
|
" ",
|
|
3750
|
-
|
|
3746
|
+
a && /* @__PURE__ */ i("label", { children: "*" })
|
|
3751
3747
|
] }),
|
|
3752
3748
|
/* @__PURE__ */ h("div", { className: X.inputContainer, style: { width: m }, children: [
|
|
3753
3749
|
/* @__PURE__ */ h(
|
|
3754
3750
|
"select",
|
|
3755
3751
|
{
|
|
3756
3752
|
value: w ?? "",
|
|
3757
|
-
onChange: (
|
|
3758
|
-
const N =
|
|
3753
|
+
onChange: (g) => {
|
|
3754
|
+
const N = g.target.value, x = f.every((S) => typeof S.value == "number") ? Number(N) : N;
|
|
3759
3755
|
L(x);
|
|
3760
3756
|
},
|
|
3761
3757
|
className: X.selectInput,
|
|
3762
3758
|
children: [
|
|
3763
3759
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: p(u || "selectOption") }),
|
|
3764
|
-
|
|
3760
|
+
f.map((g, N) => /* @__PURE__ */ i(
|
|
3765
3761
|
"option",
|
|
3766
3762
|
{
|
|
3767
|
-
value:
|
|
3763
|
+
value: g.value,
|
|
3768
3764
|
className: X.option,
|
|
3769
|
-
children: p(
|
|
3765
|
+
children: p(g.label)
|
|
3770
3766
|
},
|
|
3771
3767
|
N
|
|
3772
3768
|
))
|
|
@@ -3776,10 +3772,10 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3776
3772
|
/* @__PURE__ */ i("img", { src: Wt, alt: "Open", className: X.dropdownArrow })
|
|
3777
3773
|
] }),
|
|
3778
3774
|
(() => {
|
|
3779
|
-
const
|
|
3775
|
+
const g = f.find(
|
|
3780
3776
|
(N) => N.value === w
|
|
3781
3777
|
);
|
|
3782
|
-
return
|
|
3778
|
+
return g && g.description ? /* @__PURE__ */ i("div", { className: X.optionDescription, children: p(g.description) }) : null;
|
|
3783
3779
|
})()
|
|
3784
3780
|
] });
|
|
3785
3781
|
}, Is = "_radioButtonContainer_1e994_2", Es = "_wholeInputContainer_1e994_5", qs = "_questionContainer_1e994_27", zs = "_radioQuestion_1e994_59", Ps = "_inputContainer_1e994_63", Zs = "_radioInput_1e994_93", xe = {
|
|
@@ -3789,34 +3785,34 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3789
3785
|
radioQuestion: zs,
|
|
3790
3786
|
inputContainer: Ps,
|
|
3791
3787
|
radioInput: Zs
|
|
3792
|
-
}, js = ({ input: n, reactHookFormInstance:
|
|
3788
|
+
}, js = ({ input: n, reactHookFormInstance: c }) => {
|
|
3793
3789
|
const {
|
|
3794
3790
|
code: s,
|
|
3795
3791
|
label: r,
|
|
3796
3792
|
required: t,
|
|
3797
3793
|
validateFunction: o,
|
|
3798
|
-
errorColor:
|
|
3799
|
-
options:
|
|
3800
|
-
multi:
|
|
3801
|
-
} = n, { t: u } = A(), { control:
|
|
3802
|
-
if (
|
|
3803
|
-
let L = w.filter((
|
|
3794
|
+
errorColor: d = "red",
|
|
3795
|
+
options: a = [],
|
|
3796
|
+
multi: l = !1
|
|
3797
|
+
} = n, { t: u } = A(), { control: C, trigger: m, clearErrors: f } = c, { errorColor: p } = je((v) => v), y = ({ options: v, onChange: _, actualValue: w }) => {
|
|
3798
|
+
if (l && w && w.length > 0) {
|
|
3799
|
+
let L = w.filter((g) => g !== v);
|
|
3804
3800
|
_(L);
|
|
3805
3801
|
}
|
|
3806
3802
|
}, b = ({ options: v, onChange: _, actualValue: w }) => {
|
|
3807
|
-
|
|
3803
|
+
l ? w && w.length > 0 ? _([...w, v]) : _([v]) : _(v);
|
|
3808
3804
|
};
|
|
3809
3805
|
return Y(t), /* @__PURE__ */ i(
|
|
3810
3806
|
Pe,
|
|
3811
3807
|
{
|
|
3812
|
-
control:
|
|
3808
|
+
control: C,
|
|
3813
3809
|
name: s,
|
|
3814
3810
|
rules: {
|
|
3815
3811
|
validate: (v) => t && (v == null || v === "") ? `${u(r)} ${u("errorMessages.required")}` : null
|
|
3816
3812
|
},
|
|
3817
3813
|
render: ({
|
|
3818
3814
|
formState: { errors: v },
|
|
3819
|
-
field: { onChange: _, onBlur: w, value: L, ref:
|
|
3815
|
+
field: { onChange: _, onBlur: w, value: L, ref: g },
|
|
3820
3816
|
fieldState: N
|
|
3821
3817
|
}) => {
|
|
3822
3818
|
var x;
|
|
@@ -3832,7 +3828,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3832
3828
|
t && /* @__PURE__ */ i(
|
|
3833
3829
|
"label",
|
|
3834
3830
|
{
|
|
3835
|
-
style: { color: N.error ?
|
|
3831
|
+
style: { color: N.error ? d : "" },
|
|
3836
3832
|
children: "*"
|
|
3837
3833
|
}
|
|
3838
3834
|
)
|
|
@@ -3840,14 +3836,14 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3840
3836
|
}
|
|
3841
3837
|
) }),
|
|
3842
3838
|
/* @__PURE__ */ h("div", { className: xe.inputContainer, children: [
|
|
3843
|
-
|
|
3839
|
+
a.map(
|
|
3844
3840
|
({
|
|
3845
3841
|
label: S,
|
|
3846
3842
|
value: $,
|
|
3847
3843
|
disabled: k = !1,
|
|
3848
3844
|
italicLabel: T
|
|
3849
3845
|
}, F) => {
|
|
3850
|
-
const D = L &&
|
|
3846
|
+
const D = L && l ? L.isArray && (L == null ? void 0 : L.length) > 0 && L.some((B) => B === $) : L === $;
|
|
3851
3847
|
return /* @__PURE__ */ h("label", { children: [
|
|
3852
3848
|
/* @__PURE__ */ i(
|
|
3853
3849
|
"input",
|
|
@@ -3855,13 +3851,13 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3855
3851
|
type: "radio",
|
|
3856
3852
|
checked: D,
|
|
3857
3853
|
onChange: () => {
|
|
3858
|
-
|
|
3854
|
+
l ? D ? y({
|
|
3859
3855
|
actualValue: L,
|
|
3860
|
-
options:
|
|
3856
|
+
options: a,
|
|
3861
3857
|
onChange: _
|
|
3862
3858
|
}) : b({
|
|
3863
3859
|
actualValue: L,
|
|
3864
|
-
options:
|
|
3860
|
+
options: a,
|
|
3865
3861
|
onChange: _
|
|
3866
3862
|
}) : _($);
|
|
3867
3863
|
},
|
|
@@ -3877,7 +3873,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3877
3873
|
Ze,
|
|
3878
3874
|
{
|
|
3879
3875
|
errorMessage: (x = N.error) == null ? void 0 : x.message,
|
|
3880
|
-
errorColor: p ||
|
|
3876
|
+
errorColor: p || d
|
|
3881
3877
|
}
|
|
3882
3878
|
)
|
|
3883
3879
|
] })
|
|
@@ -3894,36 +3890,36 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3894
3890
|
labels: Xs,
|
|
3895
3891
|
minLabel: Qs,
|
|
3896
3892
|
maxLabel: Js
|
|
3897
|
-
}, b2 = ({ input: n, reactHookFormInstance:
|
|
3893
|
+
}, b2 = ({ input: n, reactHookFormInstance: c, onChange: s }) => {
|
|
3898
3894
|
const {
|
|
3899
3895
|
code: r,
|
|
3900
3896
|
label: t,
|
|
3901
3897
|
minValue: o = 1,
|
|
3902
|
-
maxValue:
|
|
3903
|
-
defValue:
|
|
3904
|
-
thumbColor:
|
|
3898
|
+
maxValue: d = 5,
|
|
3899
|
+
defValue: a = 3,
|
|
3900
|
+
thumbColor: l = "#B32F5D",
|
|
3905
3901
|
//trackColors = ["#B32F5D", "#EFEFEF"],
|
|
3906
3902
|
required: u,
|
|
3907
|
-
errorColor:
|
|
3903
|
+
errorColor: C = "red",
|
|
3908
3904
|
labelWidth: m = "300px",
|
|
3909
|
-
sliderWidth:
|
|
3905
|
+
sliderWidth: f = "300px",
|
|
3910
3906
|
minText: p,
|
|
3911
3907
|
maxText: y,
|
|
3912
3908
|
disabled: b = !1,
|
|
3913
3909
|
marks: v = Array.from(
|
|
3914
|
-
{ length:
|
|
3910
|
+
{ length: d - o + 1 },
|
|
3915
3911
|
(k, T) => o + T
|
|
3916
3912
|
),
|
|
3917
3913
|
showMarksNumber: _ = !0
|
|
3918
|
-
} = n, { t: w } = A(), { control: L, trigger:
|
|
3914
|
+
} = n, { t: w } = A(), { control: L, trigger: g, clearErrors: N } = c || {};
|
|
3919
3915
|
Y(u);
|
|
3920
|
-
const { errorColorForm: x } = je((k) => k), [S, $] = I(
|
|
3921
|
-
return
|
|
3916
|
+
const { errorColorForm: x } = je((k) => k), [S, $] = I(a);
|
|
3917
|
+
return c ? /* @__PURE__ */ i(
|
|
3922
3918
|
Pe,
|
|
3923
3919
|
{
|
|
3924
3920
|
name: r,
|
|
3925
3921
|
control: L,
|
|
3926
|
-
defaultValue:
|
|
3922
|
+
defaultValue: a,
|
|
3927
3923
|
rules: {
|
|
3928
3924
|
required: u ? `${w(t)} ${w("errorMessages.required")}` : !1
|
|
3929
3925
|
},
|
|
@@ -3934,7 +3930,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3934
3930
|
{
|
|
3935
3931
|
className: W.rankingSliderContainer,
|
|
3936
3932
|
style: {
|
|
3937
|
-
gridTemplateColumns: `${t && m} ${
|
|
3933
|
+
gridTemplateColumns: `${t && m} ${f}`
|
|
3938
3934
|
},
|
|
3939
3935
|
children: [
|
|
3940
3936
|
t && /* @__PURE__ */ i("p", { className: W.labelContainer, children: w(t) }),
|
|
@@ -3945,9 +3941,9 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3945
3941
|
xt,
|
|
3946
3942
|
{
|
|
3947
3943
|
min: o,
|
|
3948
|
-
max:
|
|
3944
|
+
max: d,
|
|
3949
3945
|
step: 1,
|
|
3950
|
-
value: k.value ??
|
|
3946
|
+
value: k.value ?? a,
|
|
3951
3947
|
onChange: (D) => k.onChange(D),
|
|
3952
3948
|
marks: !0,
|
|
3953
3949
|
className: W.slider,
|
|
@@ -3956,7 +3952,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3956
3952
|
"div",
|
|
3957
3953
|
{
|
|
3958
3954
|
...D,
|
|
3959
|
-
style: { ...D.style, backgroundColor:
|
|
3955
|
+
style: { ...D.style, backgroundColor: l }
|
|
3960
3956
|
}
|
|
3961
3957
|
),
|
|
3962
3958
|
trackClassName: W.track,
|
|
@@ -3972,7 +3968,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3972
3968
|
Ze,
|
|
3973
3969
|
{
|
|
3974
3970
|
errorMessage: (F = T.error) == null ? void 0 : F.message,
|
|
3975
|
-
errorColor: x ||
|
|
3971
|
+
errorColor: x || C
|
|
3976
3972
|
}
|
|
3977
3973
|
)
|
|
3978
3974
|
]
|
|
@@ -3984,7 +3980,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3984
3980
|
"div",
|
|
3985
3981
|
{
|
|
3986
3982
|
className: W.rankingSliderContainer,
|
|
3987
|
-
style: { gridTemplateColumns: `${t && m} ${
|
|
3983
|
+
style: { gridTemplateColumns: `${t && m} ${f}` },
|
|
3988
3984
|
children: [
|
|
3989
3985
|
t && /* @__PURE__ */ i("p", { className: W.labelContainer, children: w(t) }),
|
|
3990
3986
|
/* @__PURE__ */ h("div", { className: W.inputContainer, children: [
|
|
@@ -3994,7 +3990,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3994
3990
|
xt,
|
|
3995
3991
|
{
|
|
3996
3992
|
min: o,
|
|
3997
|
-
max:
|
|
3993
|
+
max: d,
|
|
3998
3994
|
step: 1,
|
|
3999
3995
|
value: S,
|
|
4000
3996
|
onChange: (k) => {
|
|
@@ -4007,7 +4003,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
4007
4003
|
"div",
|
|
4008
4004
|
{
|
|
4009
4005
|
...k,
|
|
4010
|
-
style: { ...k.style, backgroundColor:
|
|
4006
|
+
style: { ...k.style, backgroundColor: l }
|
|
4011
4007
|
}
|
|
4012
4008
|
),
|
|
4013
4009
|
trackClassName: W.track,
|
|
@@ -4044,119 +4040,119 @@ b2.propTypes = {
|
|
|
4044
4040
|
const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc_6", Kt = {
|
|
4045
4041
|
textDescriptionContainer: Ys,
|
|
4046
4042
|
textDescriptionText: er
|
|
4047
|
-
}, tr = ({ input: n, inputContainerStyles:
|
|
4043
|
+
}, tr = ({ input: n, inputContainerStyles: c }) => /* @__PURE__ */ i(
|
|
4048
4044
|
"div",
|
|
4049
4045
|
{
|
|
4050
4046
|
className: Kt.textDescriptionContainer,
|
|
4051
|
-
style: { margin: "10px 0", ...
|
|
4047
|
+
style: { margin: "10px 0", ...c },
|
|
4052
4048
|
children: /* @__PURE__ */ i("p", { className: Kt.textDescriptionText, children: n.text })
|
|
4053
4049
|
}
|
|
4054
4050
|
), Ee = ({
|
|
4055
4051
|
inputs: n,
|
|
4056
|
-
inputContainerStyles:
|
|
4052
|
+
inputContainerStyles: c,
|
|
4057
4053
|
reactHookFormInstance: s
|
|
4058
4054
|
}) => {
|
|
4059
|
-
const { watch: r } = s, t = r(), o = Fe(() => n == null ? void 0 : n.map((
|
|
4060
|
-
const
|
|
4055
|
+
const { watch: r } = s, t = r(), o = Fe(() => n == null ? void 0 : n.map((d) => {
|
|
4056
|
+
const a = typeof d.required == "function" ? d.required(t) : d.required;
|
|
4061
4057
|
return {
|
|
4062
|
-
...
|
|
4063
|
-
required:
|
|
4058
|
+
...d,
|
|
4059
|
+
required: a
|
|
4064
4060
|
};
|
|
4065
4061
|
}), [n, t]);
|
|
4066
|
-
return /* @__PURE__ */ i("div", { className: De.inputsContainer, children: o == null ? void 0 : o.map((
|
|
4067
|
-
const { inputType:
|
|
4068
|
-
switch (
|
|
4062
|
+
return /* @__PURE__ */ i("div", { className: De.inputsContainer, children: o == null ? void 0 : o.map((d, a) => {
|
|
4063
|
+
const { inputType: l } = d;
|
|
4064
|
+
switch (l) {
|
|
4069
4065
|
case Te.text:
|
|
4070
4066
|
return /* @__PURE__ */ i(
|
|
4071
4067
|
"div",
|
|
4072
4068
|
{
|
|
4073
4069
|
className: De.inputContainer,
|
|
4074
|
-
style: { ...
|
|
4070
|
+
style: { ...c },
|
|
4075
4071
|
children: /* @__PURE__ */ i(
|
|
4076
4072
|
Ht,
|
|
4077
4073
|
{
|
|
4078
|
-
input:
|
|
4074
|
+
input: d,
|
|
4079
4075
|
reactHookFormInstance: s
|
|
4080
4076
|
}
|
|
4081
4077
|
)
|
|
4082
4078
|
},
|
|
4083
|
-
`${
|
|
4079
|
+
`${d.code}${a}`
|
|
4084
4080
|
);
|
|
4085
4081
|
case Te.password:
|
|
4086
4082
|
return /* @__PURE__ */ i(
|
|
4087
4083
|
"div",
|
|
4088
4084
|
{
|
|
4089
4085
|
className: De.inputContainer,
|
|
4090
|
-
style: { ...
|
|
4086
|
+
style: { ...c },
|
|
4091
4087
|
children: /* @__PURE__ */ i(
|
|
4092
4088
|
Ht,
|
|
4093
4089
|
{
|
|
4094
|
-
input:
|
|
4090
|
+
input: d,
|
|
4095
4091
|
reactHookFormInstance: s
|
|
4096
4092
|
}
|
|
4097
4093
|
)
|
|
4098
4094
|
},
|
|
4099
|
-
`${
|
|
4095
|
+
`${d.code}${a}`
|
|
4100
4096
|
);
|
|
4101
4097
|
case Te.select:
|
|
4102
4098
|
return /* @__PURE__ */ i(
|
|
4103
4099
|
"div",
|
|
4104
4100
|
{
|
|
4105
4101
|
className: De.inputContainer,
|
|
4106
|
-
style: { ...
|
|
4102
|
+
style: { ...c },
|
|
4107
4103
|
children: /* @__PURE__ */ i(
|
|
4108
4104
|
Rs,
|
|
4109
4105
|
{
|
|
4110
|
-
input:
|
|
4106
|
+
input: d,
|
|
4111
4107
|
reactHookFormInstance: s
|
|
4112
4108
|
}
|
|
4113
4109
|
)
|
|
4114
4110
|
},
|
|
4115
|
-
`${
|
|
4111
|
+
`${d.code}${a}`
|
|
4116
4112
|
);
|
|
4117
4113
|
case Te.radioList:
|
|
4118
4114
|
return /* @__PURE__ */ i(
|
|
4119
4115
|
"div",
|
|
4120
4116
|
{
|
|
4121
4117
|
className: De.inputContainer,
|
|
4122
|
-
style: { ...
|
|
4118
|
+
style: { ...c },
|
|
4123
4119
|
children: /* @__PURE__ */ i(
|
|
4124
4120
|
js,
|
|
4125
4121
|
{
|
|
4126
|
-
input:
|
|
4122
|
+
input: d,
|
|
4127
4123
|
reactHookFormInstance: s
|
|
4128
4124
|
}
|
|
4129
4125
|
)
|
|
4130
4126
|
},
|
|
4131
|
-
`${
|
|
4127
|
+
`${d.code}${a}`
|
|
4132
4128
|
);
|
|
4133
4129
|
case Te.rankingSlider:
|
|
4134
4130
|
return /* @__PURE__ */ i(
|
|
4135
4131
|
"div",
|
|
4136
4132
|
{
|
|
4137
4133
|
className: De.inputContainer,
|
|
4138
|
-
style: { ...
|
|
4134
|
+
style: { ...c },
|
|
4139
4135
|
children: /* @__PURE__ */ i(
|
|
4140
4136
|
b2,
|
|
4141
4137
|
{
|
|
4142
|
-
input:
|
|
4138
|
+
input: d,
|
|
4143
4139
|
reactHookFormInstance: s
|
|
4144
4140
|
}
|
|
4145
4141
|
)
|
|
4146
4142
|
},
|
|
4147
|
-
`${
|
|
4143
|
+
`${d.code}${a}`
|
|
4148
4144
|
);
|
|
4149
4145
|
case Te.textDescription:
|
|
4150
4146
|
return /* @__PURE__ */ i(
|
|
4151
4147
|
tr,
|
|
4152
4148
|
{
|
|
4153
|
-
input:
|
|
4154
|
-
inputContainerStyles:
|
|
4149
|
+
input: d,
|
|
4150
|
+
inputContainerStyles: c
|
|
4155
4151
|
},
|
|
4156
|
-
`${
|
|
4152
|
+
`${d.code}${a}`
|
|
4157
4153
|
);
|
|
4158
4154
|
default:
|
|
4159
|
-
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("h4", { children: "Default" }) }, `${
|
|
4155
|
+
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("h4", { children: "Default" }) }, `${d.code}${a}`);
|
|
4160
4156
|
}
|
|
4161
4157
|
}) });
|
|
4162
4158
|
}, nr = "_categorySelector_1guuv_2", ir = "_sectionItemActive_1guuv_16", sr = "_sectionItem_1guuv_16", rr = "_sectionItemError_1guuv_32", qe = {
|
|
@@ -4166,35 +4162,35 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4166
4162
|
sectionItemError: rr
|
|
4167
4163
|
}, Ut = ({
|
|
4168
4164
|
categories: n,
|
|
4169
|
-
onChange:
|
|
4165
|
+
onChange: c,
|
|
4170
4166
|
activeCategory: s,
|
|
4171
4167
|
activeColor: r,
|
|
4172
4168
|
containerStyles: t = {},
|
|
4173
4169
|
categoriesWithErrors: o = []
|
|
4174
4170
|
}) => {
|
|
4175
|
-
const { t:
|
|
4176
|
-
|
|
4171
|
+
const { t: d } = A(), a = (l) => {
|
|
4172
|
+
c(l);
|
|
4177
4173
|
};
|
|
4178
4174
|
return /* @__PURE__ */ i(
|
|
4179
4175
|
"div",
|
|
4180
4176
|
{
|
|
4181
4177
|
className: qe.categorySelector,
|
|
4182
4178
|
style: t ? { ...t } : {},
|
|
4183
|
-
children: n.map((
|
|
4184
|
-
const { id:
|
|
4179
|
+
children: n.map((l, u) => {
|
|
4180
|
+
const { id: C, label: m } = l, f = s == C, p = o.includes(C);
|
|
4185
4181
|
return /* @__PURE__ */ i(
|
|
4186
4182
|
"button",
|
|
4187
4183
|
{
|
|
4188
|
-
className: `${qe.sectionItem} ${
|
|
4184
|
+
className: `${qe.sectionItem} ${f ? qe.sectionItemActive : ""} ${p ? qe.sectionItemError : ""}`,
|
|
4189
4185
|
type: "button",
|
|
4190
|
-
style: { backgroundColor:
|
|
4191
|
-
onClick: () =>
|
|
4186
|
+
style: { backgroundColor: f ? r : "inherit" },
|
|
4187
|
+
onClick: () => a(C),
|
|
4192
4188
|
children: /* @__PURE__ */ i(
|
|
4193
4189
|
"span",
|
|
4194
4190
|
{
|
|
4195
|
-
style: { color:
|
|
4191
|
+
style: { color: f ? "white" : "inherit" },
|
|
4196
4192
|
className: qe.sectionLabel,
|
|
4197
|
-
children:
|
|
4193
|
+
children: d(m)
|
|
4198
4194
|
}
|
|
4199
4195
|
)
|
|
4200
4196
|
},
|
|
@@ -4205,18 +4201,18 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4205
4201
|
);
|
|
4206
4202
|
}, to = ({
|
|
4207
4203
|
reactHookFormInstance: n,
|
|
4208
|
-
formObject:
|
|
4204
|
+
formObject: c,
|
|
4209
4205
|
CategoryComponent: s,
|
|
4210
4206
|
inputContainerStyles: r,
|
|
4211
4207
|
generalError: t,
|
|
4212
4208
|
errorColor: o = "red",
|
|
4213
|
-
submitButtonLabel:
|
|
4214
|
-
submitButtonStyles:
|
|
4215
|
-
showCategorySelector:
|
|
4209
|
+
submitButtonLabel: d = "Submit",
|
|
4210
|
+
submitButtonStyles: a = { width: 325 },
|
|
4211
|
+
showCategorySelector: l = !0,
|
|
4216
4212
|
defaultCategory: u = null,
|
|
4217
|
-
categoryLabel:
|
|
4213
|
+
categoryLabel: C = "Select Category",
|
|
4218
4214
|
activeCategory: m = null,
|
|
4219
|
-
activeCategoryColor:
|
|
4215
|
+
activeCategoryColor: f = "#b32f5d",
|
|
4220
4216
|
categoriesWithErrors: p = [],
|
|
4221
4217
|
onSubmit: y = (b) => console.log("Form submitted with: ", b)
|
|
4222
4218
|
}) => {
|
|
@@ -4224,25 +4220,25 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4224
4220
|
O(() => {
|
|
4225
4221
|
o && je.setState(() => ({ errorColor: o }));
|
|
4226
4222
|
}, [o]);
|
|
4227
|
-
const w = Fe(() =>
|
|
4223
|
+
const w = Fe(() => c ? c.filter((k) => k.category).map((k) => {
|
|
4228
4224
|
var T;
|
|
4229
4225
|
return {
|
|
4230
4226
|
id: k.categoryId,
|
|
4231
4227
|
label: k.category,
|
|
4232
4228
|
hasSubcategories: ((T = k.subcategories) == null ? void 0 : T.length) > 0
|
|
4233
4229
|
};
|
|
4234
|
-
}) : [], [
|
|
4235
|
-
const T =
|
|
4230
|
+
}) : [], [c]), L = (k) => {
|
|
4231
|
+
const T = c == null ? void 0 : c.find((F) => F.categoryId === k);
|
|
4236
4232
|
return (T == null ? void 0 : T.subcategories) || [];
|
|
4237
|
-
}, [
|
|
4233
|
+
}, [g, N] = I(
|
|
4238
4234
|
m || u || null
|
|
4239
4235
|
), [x, S] = I(null);
|
|
4240
4236
|
O(() => {
|
|
4241
|
-
!
|
|
4242
|
-
}, [w,
|
|
4243
|
-
const k = L(
|
|
4237
|
+
!g && w.length > 0 && N(w[0].id);
|
|
4238
|
+
}, [w, g]), O(() => {
|
|
4239
|
+
const k = L(g);
|
|
4244
4240
|
!x && (k == null ? void 0 : k.length) > 0 && S(k[0].id);
|
|
4245
|
-
}, [
|
|
4241
|
+
}, [g, x, c]);
|
|
4246
4242
|
const $ = (k, T) => {
|
|
4247
4243
|
var F;
|
|
4248
4244
|
if (((F = k.subcategories) == null ? void 0 : F.length) > 0) {
|
|
@@ -4259,7 +4255,7 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4259
4255
|
categories: D,
|
|
4260
4256
|
categoriesWithErrors: p,
|
|
4261
4257
|
onChange: (B) => S(B),
|
|
4262
|
-
activeColor:
|
|
4258
|
+
activeColor: f
|
|
4263
4259
|
}
|
|
4264
4260
|
)
|
|
4265
4261
|
},
|
|
@@ -4336,20 +4332,20 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4336
4332
|
] }, k.categoryId);
|
|
4337
4333
|
};
|
|
4338
4334
|
return /* @__PURE__ */ h("form", { className: Re.formContainer, onSubmit: v(y), children: [
|
|
4339
|
-
|
|
4335
|
+
l && w.length > 0 && /* @__PURE__ */ i("div", { className: Re.categorySelectorContainer, children: /* @__PURE__ */ i(
|
|
4340
4336
|
Ut,
|
|
4341
4337
|
{
|
|
4342
|
-
activeCategory:
|
|
4338
|
+
activeCategory: g,
|
|
4343
4339
|
categories: w,
|
|
4344
4340
|
categoriesWithErrors: p,
|
|
4345
4341
|
onChange: (k) => {
|
|
4346
4342
|
N(k), S(null);
|
|
4347
4343
|
},
|
|
4348
|
-
activeColor:
|
|
4344
|
+
activeColor: f
|
|
4349
4345
|
}
|
|
4350
4346
|
) }),
|
|
4351
|
-
/* @__PURE__ */ i("div", { className: Re.formObjectContainer, children:
|
|
4352
|
-
const F = k.categoryId ===
|
|
4347
|
+
/* @__PURE__ */ i("div", { className: Re.formObjectContainer, children: c == null ? void 0 : c.map((k, T) => {
|
|
4348
|
+
const F = k.categoryId === g;
|
|
4353
4349
|
return k.category ? /* @__PURE__ */ i(
|
|
4354
4350
|
"div",
|
|
4355
4351
|
{
|
|
@@ -4373,7 +4369,7 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4373
4369
|
);
|
|
4374
4370
|
}) }),
|
|
4375
4371
|
/* @__PURE__ */ h("div", { className: Re.buttonContainer, children: [
|
|
4376
|
-
/* @__PURE__ */ i(it, { containerStyles:
|
|
4372
|
+
/* @__PURE__ */ i(it, { containerStyles: a, type: "submit", children: b(d) }),
|
|
4377
4373
|
/* @__PURE__ */ i(Ze, { errorMessage: t, errorColor: o })
|
|
4378
4374
|
] })
|
|
4379
4375
|
] });
|
|
@@ -4388,23 +4384,23 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4388
4384
|
buttonWrapper: hr
|
|
4389
4385
|
}, mr = ({
|
|
4390
4386
|
onClose: n,
|
|
4391
|
-
icon:
|
|
4387
|
+
icon: c,
|
|
4392
4388
|
message: s,
|
|
4393
4389
|
submessage: r,
|
|
4394
4390
|
buttons: t,
|
|
4395
4391
|
maxHeight: o = "450px",
|
|
4396
|
-
maxWidth:
|
|
4392
|
+
maxWidth: d = "450px"
|
|
4397
4393
|
}) => /* @__PURE__ */ i("div", { className: fe.overlay, children: /* @__PURE__ */ h(
|
|
4398
4394
|
"div",
|
|
4399
4395
|
{
|
|
4400
4396
|
className: fe.modal,
|
|
4401
|
-
style: { maxHeight: o, maxWidth:
|
|
4397
|
+
style: { maxHeight: o, maxWidth: d },
|
|
4402
4398
|
children: [
|
|
4403
4399
|
/* @__PURE__ */ i("button", { className: fe.closeButton, onClick: n, "aria-label": "Close modal", children: "✕" }),
|
|
4404
|
-
|
|
4400
|
+
c && /* @__PURE__ */ i("img", { src: c, alt: "icon", className: fe.icon }),
|
|
4405
4401
|
/* @__PURE__ */ i("p", { className: fe.message, children: s }),
|
|
4406
4402
|
r && /* @__PURE__ */ i("p", { className: fe.submessage, children: r }),
|
|
4407
|
-
t.length > 0 && /* @__PURE__ */ i("div", { className: fe.buttonsContainer, children: t.map((
|
|
4403
|
+
t.length > 0 && /* @__PURE__ */ i("div", { className: fe.buttonsContainer, children: t.map((a, l) => /* @__PURE__ */ i("div", { className: fe.buttonWrapper, children: a }, l)) })
|
|
4408
4404
|
]
|
|
4409
4405
|
}
|
|
4410
4406
|
) });
|
|
@@ -4434,7 +4430,7 @@ const gr = "_stepsContainer_1cyua_3", Cr = "_stepWrapper_1cyua_9", fr = "_circle
|
|
|
4434
4430
|
label: vr,
|
|
4435
4431
|
labelActive: xr,
|
|
4436
4432
|
connector: wr
|
|
4437
|
-
}, _2 = ({ steps: n, activeColor:
|
|
4433
|
+
}, _2 = ({ steps: n, activeColor: c }) => /* @__PURE__ */ i("div", { className: ue.stepsContainer, children: n.map((s, r) => {
|
|
4438
4434
|
const t = s.status === "active", o = s.status === "completed";
|
|
4439
4435
|
return /* @__PURE__ */ h("div", { className: ue.stepWrapper, children: [
|
|
4440
4436
|
/* @__PURE__ */ h("div", { className: ue.circleContainer, children: [
|
|
@@ -4444,7 +4440,7 @@ const gr = "_stepsContainer_1cyua_3", Cr = "_stepWrapper_1cyua_9", fr = "_circle
|
|
|
4444
4440
|
className: `${ue.circle}
|
|
4445
4441
|
${t ? ue.active : ""}
|
|
4446
4442
|
${o ? ue.completed : ""}`,
|
|
4447
|
-
style: t ? { backgroundColor:
|
|
4443
|
+
style: t ? { backgroundColor: c } : {},
|
|
4448
4444
|
onClick: s.onClick,
|
|
4449
4445
|
children: r + 1
|
|
4450
4446
|
}
|
|
@@ -4476,7 +4472,7 @@ _2.defaultProps = {
|
|
|
4476
4472
|
};
|
|
4477
4473
|
const Nr = "_statusTextContainer_ch14r_2", kr = {
|
|
4478
4474
|
statusTextContainer: Nr
|
|
4479
|
-
}, v2 = ({ text: n, color:
|
|
4475
|
+
}, v2 = ({ text: n, color: c }) => /* @__PURE__ */ i("div", { className: kr.statusTextContainer, style: { background: c }, children: /* @__PURE__ */ i("span", { children: n }) });
|
|
4480
4476
|
v2.propTypes = {
|
|
4481
4477
|
text: e.string,
|
|
4482
4478
|
color: e.string
|
|
@@ -4492,20 +4488,20 @@ const $r = "_buttonsContainer_1c7dw_2", Sr = "_button_1c7dw_2", Lr = "_active_1c
|
|
|
4492
4488
|
}, Mr = ({
|
|
4493
4489
|
buttons: n = []
|
|
4494
4490
|
}) => {
|
|
4495
|
-
const { t:
|
|
4491
|
+
const { t: c } = A();
|
|
4496
4492
|
return /* @__PURE__ */ i("div", { className: `${Qe.buttonsContainer}`, children: n.map((s, r) => {
|
|
4497
4493
|
const {
|
|
4498
4494
|
isActive: t,
|
|
4499
4495
|
name: o,
|
|
4500
|
-
onClick:
|
|
4496
|
+
onClick: d
|
|
4501
4497
|
} = s;
|
|
4502
4498
|
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
4503
4499
|
"button",
|
|
4504
4500
|
{
|
|
4505
|
-
onClick:
|
|
4501
|
+
onClick: d,
|
|
4506
4502
|
className: `${Qe.button}
|
|
4507
4503
|
${t && Qe.active}`,
|
|
4508
|
-
children: /* @__PURE__ */ i("span", { className: Qe.buttonName, children:
|
|
4504
|
+
children: /* @__PURE__ */ i("span", { className: Qe.buttonName, children: c(o) })
|
|
4509
4505
|
}
|
|
4510
4506
|
) }, r);
|
|
4511
4507
|
}) });
|
|
@@ -4527,23 +4523,23 @@ const Tr = "_switchContainer_194wl_2", Dr = "_labelRight_194wl_9", Br = "_labelL
|
|
|
4527
4523
|
switch: "_switch_194wl_2",
|
|
4528
4524
|
slider: Vr,
|
|
4529
4525
|
disabled: Fr
|
|
4530
|
-
}, Ar = ({ input: n, reactHookFormInstance:
|
|
4526
|
+
}, Ar = ({ input: n, reactHookFormInstance: c, onChange: s, onoff: r = !0 }) => {
|
|
4531
4527
|
const {
|
|
4532
4528
|
code: t,
|
|
4533
4529
|
labelLeft: o,
|
|
4534
|
-
labelRight:
|
|
4535
|
-
defValue:
|
|
4536
|
-
colorOn:
|
|
4530
|
+
labelRight: d,
|
|
4531
|
+
defValue: a = !1,
|
|
4532
|
+
colorOn: l = "#5A514D",
|
|
4537
4533
|
disabled: u = !1,
|
|
4538
|
-
width:
|
|
4539
|
-
} = n, { t: m } = A(), { control:
|
|
4534
|
+
width: C = 240
|
|
4535
|
+
} = n, { t: m } = A(), { control: f } = c || {}, [p, y] = I(a), b = (_) => {
|
|
4540
4536
|
y(_), s && s(_);
|
|
4541
|
-
}, v = (_, w) => /* @__PURE__ */ h("div", { className: Be.switchContainer, style: { width: `${
|
|
4537
|
+
}, v = (_, w) => /* @__PURE__ */ h("div", { className: Be.switchContainer, style: { width: `${C}px` }, children: [
|
|
4542
4538
|
o && /* @__PURE__ */ i(
|
|
4543
4539
|
"span",
|
|
4544
4540
|
{
|
|
4545
4541
|
className: Be.labelLeft,
|
|
4546
|
-
style: { width: `${(
|
|
4542
|
+
style: { width: `${(C - 74) / 2}px` },
|
|
4547
4543
|
children: m(o)
|
|
4548
4544
|
}
|
|
4549
4545
|
),
|
|
@@ -4562,19 +4558,19 @@ const Tr = "_switchContainer_194wl_2", Dr = "_labelRight_194wl_9", Br = "_labelL
|
|
|
4562
4558
|
{
|
|
4563
4559
|
className: Be.slider,
|
|
4564
4560
|
style: {
|
|
4565
|
-
"--switch-thumb-color": r ? _ ?
|
|
4561
|
+
"--switch-thumb-color": r ? _ ? l : "#ccc" : l
|
|
4566
4562
|
}
|
|
4567
4563
|
}
|
|
4568
4564
|
)
|
|
4569
4565
|
] }),
|
|
4570
|
-
|
|
4566
|
+
d && /* @__PURE__ */ i("span", { className: Be.labelRight, style: { width: `${(C - 74) / 2}px` }, children: m(d) })
|
|
4571
4567
|
] });
|
|
4572
|
-
return
|
|
4568
|
+
return c ? /* @__PURE__ */ i(
|
|
4573
4569
|
Pe,
|
|
4574
4570
|
{
|
|
4575
4571
|
name: t,
|
|
4576
|
-
control:
|
|
4577
|
-
defaultValue:
|
|
4572
|
+
control: f,
|
|
4573
|
+
defaultValue: a,
|
|
4578
4574
|
render: ({ field: _ }) => v(_.value, _.onChange)
|
|
4579
4575
|
}
|
|
4580
4576
|
) : v(p, b);
|
|
@@ -4596,7 +4592,7 @@ const Or = "_overlay_1xyw2_2", Rr = "_popup_1xyw2_15", Ir = "_gif_1xyw2_25", Er
|
|
|
4596
4592
|
popup: Rr,
|
|
4597
4593
|
gif: Ir,
|
|
4598
4594
|
message: Er
|
|
4599
|
-
}, qr = ({ gifSrc: n, message:
|
|
4595
|
+
}, qr = ({ gifSrc: n, message: c }) => /* @__PURE__ */ i("div", { className: Je.overlay, children: /* @__PURE__ */ h("div", { className: Je.popup, children: [
|
|
4600
4596
|
n && /* @__PURE__ */ i(
|
|
4601
4597
|
"img",
|
|
4602
4598
|
{
|
|
@@ -4605,7 +4601,7 @@ const Or = "_overlay_1xyw2_2", Rr = "_popup_1xyw2_15", Ir = "_gif_1xyw2_25", Er
|
|
|
4605
4601
|
className: Je.gif
|
|
4606
4602
|
}
|
|
4607
4603
|
),
|
|
4608
|
-
|
|
4604
|
+
c && /* @__PURE__ */ i("p", { className: Je.message, children: c })
|
|
4609
4605
|
] }) });
|
|
4610
4606
|
qr.propTypes = {
|
|
4611
4607
|
gifSrc: e.string,
|
|
@@ -4622,13 +4618,13 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4622
4618
|
button: Ur
|
|
4623
4619
|
}, x2 = ({
|
|
4624
4620
|
options: n,
|
|
4625
|
-
backgroundColor:
|
|
4621
|
+
backgroundColor: c,
|
|
4626
4622
|
textColor: s,
|
|
4627
4623
|
iconColor: r
|
|
4628
4624
|
}) => {
|
|
4629
|
-
const [t, o] = I(!1),
|
|
4625
|
+
const [t, o] = I(!1), d = () => o((y) => !y), a = () => o(!1), l = 7, u = t ? 11 : 0, C = t ? 13 : 0, m = t ? -11.51666 : 0, f = t ? -13 : 0, p = "0.35s";
|
|
4630
4626
|
return /* @__PURE__ */ h("div", { className: ae.container, children: [
|
|
4631
|
-
/* @__PURE__ */ i("button", { onClick:
|
|
4627
|
+
/* @__PURE__ */ i("button", { onClick: d, className: ae.burger, children: /* @__PURE__ */ h(
|
|
4632
4628
|
"svg",
|
|
4633
4629
|
{
|
|
4634
4630
|
width: "40",
|
|
@@ -4644,27 +4640,27 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4644
4640
|
transform: `translateY(${u}px)`,
|
|
4645
4641
|
transition: `transform ${p} cubic-bezier(0.42, 0, 0.58, 1)`
|
|
4646
4642
|
},
|
|
4647
|
-
children: /* @__PURE__ */ i("circle", { cx: "20", cy: "9", r:
|
|
4643
|
+
children: /* @__PURE__ */ i("circle", { cx: "20", cy: "9", r: l, fill: r })
|
|
4648
4644
|
}
|
|
4649
4645
|
),
|
|
4650
4646
|
/* @__PURE__ */ i(
|
|
4651
4647
|
"g",
|
|
4652
4648
|
{
|
|
4653
4649
|
style: {
|
|
4654
|
-
transform: `translate(${
|
|
4650
|
+
transform: `translate(${C}px, ${m}px)`,
|
|
4655
4651
|
transition: `transform ${p} cubic-bezier(0.42, 0, 0.58, 1)`
|
|
4656
4652
|
},
|
|
4657
|
-
children: /* @__PURE__ */ i("circle", { cx: "7", cy: "31.51666", r:
|
|
4653
|
+
children: /* @__PURE__ */ i("circle", { cx: "7", cy: "31.51666", r: l, fill: r })
|
|
4658
4654
|
}
|
|
4659
4655
|
),
|
|
4660
4656
|
/* @__PURE__ */ i(
|
|
4661
4657
|
"g",
|
|
4662
4658
|
{
|
|
4663
4659
|
style: {
|
|
4664
|
-
transform: `translate(${
|
|
4660
|
+
transform: `translate(${f}px, ${m}px)`,
|
|
4665
4661
|
transition: `transform ${p} cubic-bezier(0.42, 0, 0.58, 1)`
|
|
4666
4662
|
},
|
|
4667
|
-
children: /* @__PURE__ */ i("circle", { cx: "33", cy: "31.51666", r:
|
|
4663
|
+
children: /* @__PURE__ */ i("circle", { cx: "33", cy: "31.51666", r: l, fill: r })
|
|
4668
4664
|
}
|
|
4669
4665
|
),
|
|
4670
4666
|
/* @__PURE__ */ i(
|
|
@@ -4680,7 +4676,7 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4680
4676
|
/* @__PURE__ */ h(
|
|
4681
4677
|
"g",
|
|
4682
4678
|
{
|
|
4683
|
-
stroke:
|
|
4679
|
+
stroke: c,
|
|
4684
4680
|
strokeWidth: "2",
|
|
4685
4681
|
strokeLinecap: "round",
|
|
4686
4682
|
style: {
|
|
@@ -4700,14 +4696,14 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4700
4696
|
"div",
|
|
4701
4697
|
{
|
|
4702
4698
|
className: `${ae.menu} ${t ? ae.menuOpen : ae.menuClose}`,
|
|
4703
|
-
style: { backgroundColor:
|
|
4699
|
+
style: { backgroundColor: c, color: s },
|
|
4704
4700
|
children: /* @__PURE__ */ i("ul", { className: ae.list, children: n.map((y, b) => /* @__PURE__ */ h("li", { className: ae.item, children: [
|
|
4705
4701
|
y.url && /* @__PURE__ */ i(
|
|
4706
4702
|
t2,
|
|
4707
4703
|
{
|
|
4708
4704
|
to: y.url,
|
|
4709
4705
|
className: ({ isActive: v }) => `${ae.link} ${v ? ae.active : ""}`,
|
|
4710
|
-
onClick:
|
|
4706
|
+
onClick: a,
|
|
4711
4707
|
style: { color: s },
|
|
4712
4708
|
children: y.name
|
|
4713
4709
|
}
|
|
@@ -4717,7 +4713,7 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4717
4713
|
{
|
|
4718
4714
|
className: ae.button,
|
|
4719
4715
|
onClick: () => {
|
|
4720
|
-
y.onclick(),
|
|
4716
|
+
y.onclick(), a();
|
|
4721
4717
|
},
|
|
4722
4718
|
children: y.name
|
|
4723
4719
|
}
|
|
@@ -4744,18 +4740,18 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4744
4740
|
svg: Xr
|
|
4745
4741
|
}, Qr = ({
|
|
4746
4742
|
data: n,
|
|
4747
|
-
keys:
|
|
4743
|
+
keys: c,
|
|
4748
4744
|
colors: s,
|
|
4749
4745
|
width: r = "100%",
|
|
4750
4746
|
height: t = 300,
|
|
4751
4747
|
margin: o = { top: 20, right: 20, bottom: 60, left: 60 },
|
|
4752
|
-
className:
|
|
4753
|
-
showXAxisLabels:
|
|
4754
|
-
showYAxisLabels:
|
|
4748
|
+
className: d = "",
|
|
4749
|
+
showXAxisLabels: a = !0,
|
|
4750
|
+
showYAxisLabels: l = !0,
|
|
4755
4751
|
showGrid: u = !0,
|
|
4756
|
-
xAxisTickRotation:
|
|
4757
|
-
yAxisTickFormat: m = (
|
|
4758
|
-
barPadding:
|
|
4752
|
+
xAxisTickRotation: C = -90,
|
|
4753
|
+
yAxisTickFormat: m = (g) => g.toLocaleString("es-ES"),
|
|
4754
|
+
barPadding: f = 0.1,
|
|
4759
4755
|
groupPadding: p = 0.05,
|
|
4760
4756
|
animationDuration: y = 750,
|
|
4761
4757
|
onBarHover: b,
|
|
@@ -4764,7 +4760,7 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4764
4760
|
xAxisLabel: w,
|
|
4765
4761
|
yAxisLabel: L
|
|
4766
4762
|
}) => {
|
|
4767
|
-
const
|
|
4763
|
+
const g = Y(), N = Y(), [x, S] = I({ width: 0, height: 0 });
|
|
4768
4764
|
return O(() => {
|
|
4769
4765
|
const $ = () => {
|
|
4770
4766
|
if (N.current) {
|
|
@@ -4778,22 +4774,22 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4778
4774
|
return $(), window.addEventListener("resize", $), () => window.removeEventListener("resize", $);
|
|
4779
4775
|
}, [r, t]), O(() => {
|
|
4780
4776
|
if (!n || n.length === 0 || x.width === 0) return;
|
|
4781
|
-
const $ = Ne(
|
|
4777
|
+
const $ = Ne(g.current), k = x.width, T = x.height, F = k - o.left - o.right, D = T - o.top - o.bottom;
|
|
4782
4778
|
if (F <= 0 || D <= 0) return;
|
|
4783
|
-
const B = n.map((V) => V.anyo || V.year || V.x), R =
|
|
4779
|
+
const B = n.map((V) => V.anyo || V.year || V.x), R = c, Z = tt(n, (V) => tt(R, (te) => V[te])) || 0, ee = nt(n, (V) => nt(R, (te) => V[te])) || 0, H = ft().domain(B).rangeRound([0, F]).paddingInner(f), q = ft().domain(R).rangeRound([0, H.bandwidth()]).padding(p), ie = Jt().domain([Math.min(0, Z), ee]).nice().rangeRound([D, 0]), he = Yt().domain(R).range(Array.isArray(s) ? s : Object.values(s || {}));
|
|
4784
4780
|
$.selectAll("*").remove();
|
|
4785
4781
|
const me = $.append("g").attr("transform", `translate(${o.left},${o.top})`);
|
|
4786
|
-
_ && $.append("text").attr("x", k / 2).attr("y", o.top / 2).attr("text-anchor", "middle").style("font-size", "16px").style("font-weight", "bold").style("fill", "#333").text(_), u && me.append("g").attr("class", "grid").selectAll("line").data(ie.ticks()).enter().append("line").attr("x1", 0).attr("x2", F).attr("y1", (V) => ie(V)).attr("y2", (V) => ie(V)).style("stroke", "#e0e0e0").style("stroke-width", 0.5),
|
|
4782
|
+
_ && $.append("text").attr("x", k / 2).attr("y", o.top / 2).attr("text-anchor", "middle").style("font-size", "16px").style("font-weight", "bold").style("fill", "#333").text(_), u && me.append("g").attr("class", "grid").selectAll("line").data(ie.ticks()).enter().append("line").attr("x1", 0).attr("x2", F).attr("y1", (V) => ie(V)).attr("y2", (V) => ie(V)).style("stroke", "#e0e0e0").style("stroke-width", 0.5), a && (me.append("g").attr("transform", `translate(0,${D})`).call(e2(H).tickSizeOuter(0)).attr("class", "x-axis").selectAll("text").attr("transform", `translate(0,10)rotate(${C})`).style("text-anchor", C < 0 ? "end" : "middle").style("font-size", "12px").style("fill", "#605B56"), w && me.append("text").attr(
|
|
4787
4783
|
"transform",
|
|
4788
4784
|
`translate(${F / 2}, ${D + o.bottom - 5})`
|
|
4789
|
-
).style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(w)),
|
|
4785
|
+
).style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(w)), l && (me.append("g").call(yt(ie).ticks(6).tickFormat(m)).attr("class", "y-axis").call((V) => V.select(".domain").remove()), L && me.append("text").attr("transform", "rotate(-90)").attr("y", 0 - o.left).attr("x", 0 - D / 2).attr("dy", "1em").style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(L));
|
|
4790
4786
|
const Se = me.append("g").selectAll(".bar-group").data(n).enter().append("g").attr("class", "bar-group").attr("transform", (V) => `translate(${H(V.anyo || V.year || V.x)},0)`).selectAll(".bar").data(
|
|
4791
4787
|
(V) => R.map((te) => ({
|
|
4792
4788
|
key: te,
|
|
4793
4789
|
value: V[te],
|
|
4794
4790
|
data: V
|
|
4795
4791
|
}))
|
|
4796
|
-
).enter().append("rect").attr("class", "bar").attr("x", (V) =>
|
|
4792
|
+
).enter().append("rect").attr("class", "bar").attr("x", (V) => q(V.key)).attr("y", D).attr("width", q.bandwidth()).attr("height", 0).attr("fill", (V) => he(V.key)).style("cursor", b || v ? "pointer" : "default");
|
|
4797
4793
|
Se.transition().duration(y).attr("y", (V) => ie(Math.max(0, V.value))).attr("height", (V) => Math.abs(ie(V.value) - ie(0))), b && Se.on("mouseover", function(V, te) {
|
|
4798
4794
|
Ne(this).style("opacity", 0.8), b(V, te);
|
|
4799
4795
|
}).on("mouseout", function(V, te) {
|
|
@@ -4801,16 +4797,16 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4801
4797
|
}), v && Se.on("click", v);
|
|
4802
4798
|
}, [
|
|
4803
4799
|
n,
|
|
4804
|
-
|
|
4800
|
+
c,
|
|
4805
4801
|
s,
|
|
4806
4802
|
x,
|
|
4807
4803
|
o,
|
|
4808
|
-
|
|
4804
|
+
f,
|
|
4809
4805
|
p,
|
|
4810
|
-
l,
|
|
4811
4806
|
a,
|
|
4807
|
+
l,
|
|
4812
4808
|
u,
|
|
4813
|
-
|
|
4809
|
+
C,
|
|
4814
4810
|
m,
|
|
4815
4811
|
y,
|
|
4816
4812
|
b,
|
|
@@ -4822,12 +4818,12 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4822
4818
|
"div",
|
|
4823
4819
|
{
|
|
4824
4820
|
ref: N,
|
|
4825
|
-
className: `${Gt.svgContainer} ${
|
|
4821
|
+
className: `${Gt.svgContainer} ${d}`,
|
|
4826
4822
|
style: { width: r, height: t + o.top + o.bottom },
|
|
4827
4823
|
children: /* @__PURE__ */ i(
|
|
4828
4824
|
"svg",
|
|
4829
4825
|
{
|
|
4830
|
-
ref:
|
|
4826
|
+
ref: g,
|
|
4831
4827
|
className: Gt.svg,
|
|
4832
4828
|
width: x.width,
|
|
4833
4829
|
height: x.height
|
|
@@ -4871,19 +4867,19 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4871
4867
|
svg: Yr
|
|
4872
4868
|
}, e1 = ({
|
|
4873
4869
|
data: n,
|
|
4874
|
-
keys:
|
|
4870
|
+
keys: c,
|
|
4875
4871
|
colors: s,
|
|
4876
4872
|
// Array of values to display as a line over the bars
|
|
4877
4873
|
lineData: r = null,
|
|
4878
4874
|
width: t = "100%",
|
|
4879
4875
|
height: o = 300,
|
|
4880
|
-
margin:
|
|
4881
|
-
className:
|
|
4882
|
-
showXAxisLabels:
|
|
4876
|
+
margin: d = { top: 20, right: 20, bottom: 60, left: 60 },
|
|
4877
|
+
className: a = "",
|
|
4878
|
+
showXAxisLabels: l = !0,
|
|
4883
4879
|
showYAxisLabels: u = !0,
|
|
4884
|
-
showGrid:
|
|
4880
|
+
showGrid: C = !0,
|
|
4885
4881
|
xAxisTickRotation: m = -90,
|
|
4886
|
-
yAxisTickFormat:
|
|
4882
|
+
yAxisTickFormat: f = ($) => $.toLocaleString("es-ES"),
|
|
4887
4883
|
barPadding: p = 0.4,
|
|
4888
4884
|
animationDuration: y = 750,
|
|
4889
4885
|
onBarHover: b,
|
|
@@ -4891,7 +4887,7 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4891
4887
|
title: _,
|
|
4892
4888
|
xAxisLabel: w,
|
|
4893
4889
|
yAxisLabel: L,
|
|
4894
|
-
stackOrder:
|
|
4890
|
+
stackOrder: g = "reverse",
|
|
4895
4891
|
// "reverse", "ascending", "descending", "insideOut", "none"
|
|
4896
4892
|
showTooltip: N = !0,
|
|
4897
4893
|
reverseKeys: x = !0,
|
|
@@ -4916,12 +4912,12 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4916
4912
|
return B(), window.addEventListener("resize", B), () => window.removeEventListener("resize", B);
|
|
4917
4913
|
}, [t, o]), O(() => {
|
|
4918
4914
|
if (!n || n.length === 0 || T.containerWidth === 0) return;
|
|
4919
|
-
const B = Ne($.current), { containerWidth: R, height: Z } = T, ee = R -
|
|
4920
|
-
if (
|
|
4915
|
+
const B = Ne($.current), { containerWidth: R, height: Z } = T, ee = R - d.left - d.right, H = n.length * S, q = Math.max(ee, H), ie = q + d.left + d.right, he = Z - d.top - d.bottom;
|
|
4916
|
+
if (q <= 0 || he <= 0) return;
|
|
4921
4917
|
B.attr("width", ie).attr("height", Z);
|
|
4922
|
-
const me = x ? [...
|
|
4918
|
+
const me = x ? [...c].reverse() : c, $e = [];
|
|
4923
4919
|
n.forEach((M) => {
|
|
4924
|
-
const
|
|
4920
|
+
const z = M.any || M.year || M.x, j = me.map((G) => ({
|
|
4925
4921
|
key: G,
|
|
4926
4922
|
value: Number(M[G]) || 0,
|
|
4927
4923
|
data: M
|
|
@@ -4938,7 +4934,7 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4938
4934
|
// El punto más bajo
|
|
4939
4935
|
height: ct,
|
|
4940
4936
|
data: G.data,
|
|
4941
|
-
xKey:
|
|
4937
|
+
xKey: z
|
|
4942
4938
|
}), at = ce;
|
|
4943
4939
|
});
|
|
4944
4940
|
let lt = 0;
|
|
@@ -4951,7 +4947,7 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4951
4947
|
y1: Math.max(ye, ce),
|
|
4952
4948
|
height: ct,
|
|
4953
4949
|
data: G.data,
|
|
4954
|
-
xKey:
|
|
4950
|
+
xKey: z
|
|
4955
4951
|
}), lt = ce;
|
|
4956
4952
|
});
|
|
4957
4953
|
});
|
|
@@ -4964,13 +4960,13 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4964
4960
|
const te = [
|
|
4965
4961
|
Math.min(Se[0], V[0]),
|
|
4966
4962
|
Math.max(Se[1], V[1])
|
|
4967
|
-
], re = ft().domain(n.map((M) => M.any || M.year || M.x)).range([0,
|
|
4968
|
-
const j = re(M.any || M.year || M.x) + re.bandwidth() / 2, ot = se(r[
|
|
4963
|
+
], re = ft().domain(n.map((M) => M.any || M.year || M.x)).range([0, q]).padding(p), se = Jt().domain([te[0], te[1]]).nice(6).range([he, 0]), w2 = Yt().domain(c).range(Array.isArray(s) ? s : Object.values(s || {})), He = r && r.length > 0 ? n.map((M, z) => {
|
|
4964
|
+
const j = re(M.any || M.year || M.x) + re.bandwidth() / 2, ot = se(r[z] || 0);
|
|
4969
4965
|
return { x: j, y: ot };
|
|
4970
4966
|
}) : [];
|
|
4971
4967
|
B.selectAll("*").remove();
|
|
4972
|
-
const oe = B.append("g").attr("transform", `translate(${
|
|
4973
|
-
_ && B.append("text").attr("x", svgWidth / 2).attr("y",
|
|
4968
|
+
const oe = B.append("g").attr("transform", `translate(${d.left},${d.top})`);
|
|
4969
|
+
_ && B.append("text").attr("x", svgWidth / 2).attr("y", d.top / 2).attr("text-anchor", "middle").style("font-size", "16px").style("font-weight", "bold").style("fill", "#333").text(_), C && oe.append("g").attr("class", "grid").selectAll("line").data(se.ticks(6)).enter().append("line").attr("x1", 0).attr("x2", q).attr("y1", (M) => se(M)).attr("y2", (M) => se(M)).style("stroke", "#e0e0e0").style("stroke-width", 0.5), l && (oe.append("g").attr("class", "x-axis").attr("transform", `translate(0, ${he})`).call(e2(re).tickSizeOuter(0)).selectAll("text").remove(), oe.append("g").attr("class", "x-axis-labels").attr("transform", `translate(0, ${he})`).selectAll("text").data(n).enter().append("text").attr(
|
|
4974
4970
|
"x",
|
|
4975
4971
|
(j) => re(j.any || j.year || j.x) + re.bandwidth() / 2
|
|
4976
4972
|
).attr("y", 19).style(
|
|
@@ -4981,8 +4977,8 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4981
4977
|
(j) => `rotate(${m} ${re(j.any || j.year || j.x) + re.bandwidth() / 2} 15)`
|
|
4982
4978
|
).text((j) => j.any || j.year || j.x), w && oe.append("text").attr(
|
|
4983
4979
|
"transform",
|
|
4984
|
-
`translate(${
|
|
4985
|
-
).style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(w)), u && (oe.append("g").attr("class", "y-axis").call(yt(se).ticks(6).tickFormat(
|
|
4980
|
+
`translate(${q / 2}, ${he + d.bottom - 5})`
|
|
4981
|
+
).style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(w)), u && (oe.append("g").attr("class", "y-axis").call(yt(se).ticks(6).tickFormat(f)).call((M) => M.select(".domain").remove()), oe.append("g").attr("class", "y-ticks").attr("transform", `translate(${q}, 0)`).call(yt(se).ticks(6).tickSizeInner(q)).call((M) => M.select(".domain").remove()).call((M) => M.selectAll(".tick text").remove()), L && oe.append("text").attr("transform", "rotate(-90)").attr("y", 0 - d.left).attr("x", 0 - he / 2).attr("dy", "1em").style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(L));
|
|
4986
4982
|
let le;
|
|
4987
4983
|
N && (le = Ne("body").append("div").attr("class", "chart-tooltip").style("position", "absolute").style("visibility", "hidden").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("padding", "8px").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("z-index", "1000"));
|
|
4988
4984
|
const st = oe.selectAll(".segment").data($e, (M) => `${M.xKey}-${M.key}`);
|
|
@@ -4991,65 +4987,65 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4991
4987
|
"cursor",
|
|
4992
4988
|
b || v || N ? "pointer" : "default"
|
|
4993
4989
|
).merge(st);
|
|
4994
|
-
if (rt.transition().duration(y).attr("x", (M) => re(M.xKey)).attr("y", (M) => Math.min(se(M.y0), se(M.y1))).attr("height", (M) => Math.abs(se(M.y1) - se(M.y0))), (N || b) && rt.on("mouseover", function(M,
|
|
4995
|
-
const j =
|
|
4990
|
+
if (rt.transition().duration(y).attr("x", (M) => re(M.xKey)).attr("y", (M) => Math.min(se(M.y0), se(M.y1))).attr("height", (M) => Math.abs(se(M.y1) - se(M.y0))), (N || b) && rt.on("mouseover", function(M, z) {
|
|
4991
|
+
const j = z.value;
|
|
4996
4992
|
N && le && le.style("visibility", "visible").html(`
|
|
4997
|
-
<strong>${D(
|
|
4998
|
-
${
|
|
4999
|
-
${
|
|
4993
|
+
<strong>${D(z.key)}</strong><br/>
|
|
4994
|
+
${z.xKey}<br/>
|
|
4995
|
+
${f(j)}
|
|
5000
4996
|
`), Ne(this).style("opacity", 0.8), b && b(M, {
|
|
5001
|
-
key:
|
|
4997
|
+
key: z.key,
|
|
5002
4998
|
value: j,
|
|
5003
|
-
data:
|
|
4999
|
+
data: z.data
|
|
5004
5000
|
});
|
|
5005
5001
|
}).on("mousemove", function(M) {
|
|
5006
5002
|
N && le && le.style("top", M.pageY - 10 + "px").style("left", M.pageX + 10 + "px");
|
|
5007
5003
|
}).on("mouseout", function() {
|
|
5008
5004
|
N && le && le.style("visibility", "hidden"), Ne(this).style("opacity", 1);
|
|
5009
|
-
}), v && rt.on("click", function(M,
|
|
5010
|
-
const j =
|
|
5005
|
+
}), v && rt.on("click", function(M, z) {
|
|
5006
|
+
const j = z.value;
|
|
5011
5007
|
v(M, {
|
|
5012
|
-
key:
|
|
5008
|
+
key: z.key,
|
|
5013
5009
|
value: j,
|
|
5014
|
-
data:
|
|
5010
|
+
data: z.data
|
|
5015
5011
|
});
|
|
5016
5012
|
}), He && He.length > 1) {
|
|
5017
|
-
const M = $2().x((
|
|
5018
|
-
oe.append("path").datum(He).attr("class", "line").attr("d", M).attr("fill", "none").attr("stroke", "#ff6b6b").attr("stroke-width", 2).attr("stroke-linecap", "round").attr("stroke-linejoin", "round"), oe.selectAll(".line-point").data(He).enter().append("circle").attr("class", "line-point").attr("cx", (
|
|
5013
|
+
const M = $2().x((z) => z.x).y((z) => z.y).curve(S2);
|
|
5014
|
+
oe.append("path").datum(He).attr("class", "line").attr("d", M).attr("fill", "none").attr("stroke", "#ff6b6b").attr("stroke-width", 2).attr("stroke-linecap", "round").attr("stroke-linejoin", "round"), oe.selectAll(".line-point").data(He).enter().append("circle").attr("class", "line-point").attr("cx", (z) => z.x).attr("cy", (z) => z.y).attr("r", 4).attr("fill", "#ff6b6b").attr("stroke", "white").attr("stroke-width", 1);
|
|
5019
5015
|
}
|
|
5020
5016
|
return () => {
|
|
5021
5017
|
le && le.remove();
|
|
5022
5018
|
};
|
|
5023
5019
|
}, [
|
|
5024
5020
|
n,
|
|
5025
|
-
|
|
5021
|
+
c,
|
|
5026
5022
|
s,
|
|
5027
5023
|
r,
|
|
5028
5024
|
T,
|
|
5029
|
-
|
|
5025
|
+
d,
|
|
5030
5026
|
p,
|
|
5031
|
-
|
|
5027
|
+
l,
|
|
5032
5028
|
u,
|
|
5033
|
-
|
|
5029
|
+
C,
|
|
5034
5030
|
m,
|
|
5035
|
-
|
|
5031
|
+
f,
|
|
5036
5032
|
y,
|
|
5037
5033
|
b,
|
|
5038
5034
|
v,
|
|
5039
5035
|
_,
|
|
5040
5036
|
w,
|
|
5041
5037
|
L,
|
|
5042
|
-
|
|
5038
|
+
g,
|
|
5043
5039
|
N,
|
|
5044
5040
|
x
|
|
5045
5041
|
]), /* @__PURE__ */ i(
|
|
5046
5042
|
"div",
|
|
5047
5043
|
{
|
|
5048
5044
|
ref: k,
|
|
5049
|
-
className: `${Xt.svgContainer} ${
|
|
5045
|
+
className: `${Xt.svgContainer} ${a}`,
|
|
5050
5046
|
style: {
|
|
5051
5047
|
width: t,
|
|
5052
|
-
height: o +
|
|
5048
|
+
height: o + d.top + d.bottom,
|
|
5053
5049
|
overflowX: "auto"
|
|
5054
5050
|
},
|
|
5055
5051
|
children: /* @__PURE__ */ i("svg", { ref: $, className: Xt.svg })
|
|
@@ -5121,37 +5117,37 @@ const t1 = "_externalContainer_1er0i_2", n1 = "_externalSintetic_1er0i_9", i1 =
|
|
|
5121
5117
|
return parseFloat(n.toFixed(3));
|
|
5122
5118
|
if (n === 0)
|
|
5123
5119
|
return n;
|
|
5124
|
-
}, g1 = (n,
|
|
5120
|
+
}, g1 = (n, c) => {
|
|
5125
5121
|
let s = 0;
|
|
5126
|
-
return
|
|
5122
|
+
return c.forEach((r) => {
|
|
5127
5123
|
r[n] && (s += r[n]);
|
|
5128
5124
|
}), s;
|
|
5129
5125
|
}, C1 = ({
|
|
5130
5126
|
data: n,
|
|
5131
|
-
keys:
|
|
5127
|
+
keys: c,
|
|
5132
5128
|
colors: s,
|
|
5133
5129
|
locales: r,
|
|
5134
5130
|
total: t = !1,
|
|
5135
5131
|
years: o = !1,
|
|
5136
|
-
activeGraphics:
|
|
5137
|
-
units:
|
|
5138
|
-
translate:
|
|
5132
|
+
activeGraphics: d = "ind",
|
|
5133
|
+
units: a = {},
|
|
5134
|
+
translate: l,
|
|
5139
5135
|
getTotal: u = g1,
|
|
5140
|
-
columnWidth:
|
|
5136
|
+
columnWidth: C = 50
|
|
5141
5137
|
}) => {
|
|
5142
|
-
const m =
|
|
5138
|
+
const m = l || ((p) => p), f = (p) => p === "demanda_red" || p === "reduccio_demanda_red" ? (a.demanda || "").replace("(", "").replace(")", "") : a[p] || "";
|
|
5143
5139
|
return /* @__PURE__ */ h(
|
|
5144
5140
|
"div",
|
|
5145
5141
|
{
|
|
5146
|
-
className: `${Q.externalContainer} ${
|
|
5142
|
+
className: `${Q.externalContainer} ${d === "sin" ? Q.externalSintetic : ""}`,
|
|
5147
5143
|
children: [
|
|
5148
5144
|
o === !0 && /* @__PURE__ */ h(et, { children: [
|
|
5149
5145
|
/* @__PURE__ */ i("div", {}),
|
|
5150
|
-
/* @__PURE__ */ i("div", { className: Q.yearTitles, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearTitle, style: { width:
|
|
5146
|
+
/* @__PURE__ */ i("div", { className: Q.yearTitles, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearTitle, style: { width: C }, children: p.anyo }, y)) })
|
|
5151
5147
|
] }),
|
|
5152
|
-
/* @__PURE__ */ i("div", { className: Q.titles, children:
|
|
5148
|
+
/* @__PURE__ */ i("div", { className: Q.titles, children: c.map((p, y) => /* @__PURE__ */ h("div", { className: Q.titleContainer, children: [
|
|
5153
5149
|
m(r[p]),
|
|
5154
|
-
|
|
5150
|
+
d !== "sin" && /* @__PURE__ */ i(
|
|
5155
5151
|
"span",
|
|
5156
5152
|
{
|
|
5157
5153
|
className: Q.circle,
|
|
@@ -5159,7 +5155,7 @@ const t1 = "_externalContainer_1er0i_2", n1 = "_externalSintetic_1er0i_9", i1 =
|
|
|
5159
5155
|
}
|
|
5160
5156
|
)
|
|
5161
5157
|
] }, y)) }),
|
|
5162
|
-
t === !0 && /* @__PURE__ */ i("div", { className: Q.totalContainer, children:
|
|
5158
|
+
t === !0 && /* @__PURE__ */ i("div", { className: Q.totalContainer, children: c.map((p, y) => {
|
|
5163
5159
|
var b;
|
|
5164
5160
|
return /* @__PURE__ */ h(
|
|
5165
5161
|
"div",
|
|
@@ -5168,13 +5164,13 @@ const t1 = "_externalContainer_1er0i_2", n1 = "_externalSintetic_1er0i_9", i1 =
|
|
|
5168
5164
|
children: [
|
|
5169
5165
|
(b = u(p, n)) == null ? void 0 : b.toLocaleString("es-ES"),
|
|
5170
5166
|
" ",
|
|
5171
|
-
|
|
5167
|
+
f(p)
|
|
5172
5168
|
]
|
|
5173
5169
|
},
|
|
5174
5170
|
y
|
|
5175
5171
|
);
|
|
5176
5172
|
}) }),
|
|
5177
|
-
/* @__PURE__ */ i("div", { className: Q.yearDatas, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearDataContainer, style: { width:
|
|
5173
|
+
/* @__PURE__ */ i("div", { className: Q.yearDatas, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearDataContainer, style: { width: C }, children: c.map(
|
|
5178
5174
|
(b, v) => {
|
|
5179
5175
|
var _, w;
|
|
5180
5176
|
return isNaN(p[b]) ? null : /* @__PURE__ */ i(
|
|
@@ -5223,17 +5219,17 @@ const f1 = "_speedGraphic_d1k72_2", Ct = {
|
|
|
5223
5219
|
speedGraphic: f1
|
|
5224
5220
|
}, y1 = ({
|
|
5225
5221
|
minValue: n = 0,
|
|
5226
|
-
maxValue:
|
|
5222
|
+
maxValue: c = 100,
|
|
5227
5223
|
value: s = 50,
|
|
5228
5224
|
title: r = !1,
|
|
5229
5225
|
percent: t = !1,
|
|
5230
5226
|
unit: o = !1,
|
|
5231
|
-
greenColor:
|
|
5232
|
-
orangeColor:
|
|
5233
|
-
redColor:
|
|
5227
|
+
greenColor: d = "#00CF1E",
|
|
5228
|
+
orangeColor: a = "#FFAC00",
|
|
5229
|
+
redColor: l = "#FF1E37"
|
|
5234
5230
|
}) => {
|
|
5235
|
-
s < n && (s = n), s >
|
|
5236
|
-
const u = (s - n) / (
|
|
5231
|
+
s < n && (s = n), s > c && (s = c);
|
|
5232
|
+
const u = (s - n) / (c - n), C = 270 + u * 180, m = t ? Math.round(u * 100) : s;
|
|
5237
5233
|
return /* @__PURE__ */ h("div", { className: Ct.speedGraphic, children: [
|
|
5238
5234
|
/* @__PURE__ */ h(
|
|
5239
5235
|
"svg",
|
|
@@ -5248,87 +5244,87 @@ const f1 = "_speedGraphic_d1k72_2", Ct = {
|
|
|
5248
5244
|
"path",
|
|
5249
5245
|
{
|
|
5250
5246
|
d: "M0 122C0 111.944 1.2433 101.927 3.70162 92.1756L26.2619 97.8633C24.2724 105.755 23.2662 113.862 23.2662 122H0Z",
|
|
5251
|
-
fill:
|
|
5247
|
+
fill: d
|
|
5252
5248
|
}
|
|
5253
5249
|
),
|
|
5254
5250
|
/* @__PURE__ */ i(
|
|
5255
5251
|
"path",
|
|
5256
5252
|
{
|
|
5257
5253
|
d: "M16.3442 61.0012C21.3714 52.2936 27.4557 44.2409 34.4588 37.0263L51.1534 53.2313C45.4859 59.0701 40.5619 65.5871 36.4934 72.6341L16.3442 61.0012Z",
|
|
5258
|
-
fill:
|
|
5254
|
+
fill: d
|
|
5259
5255
|
}
|
|
5260
5256
|
),
|
|
5261
5257
|
/* @__PURE__ */ i(
|
|
5262
5258
|
"path",
|
|
5263
5259
|
{
|
|
5264
5260
|
d: "M60.9088 16.3976C69.6119 11.3628 78.9041 7.42322 88.5739 4.66843L94.9485 27.0443C87.1228 29.2737 79.6027 32.462 72.5592 36.5367L60.9088 16.3976Z",
|
|
5265
|
-
fill:
|
|
5261
|
+
fill: a
|
|
5266
5262
|
}
|
|
5267
5263
|
),
|
|
5268
5264
|
/* @__PURE__ */ i(
|
|
5269
5265
|
"path",
|
|
5270
5266
|
{
|
|
5271
5267
|
d: "M121.797 0.000169508C131.851 -0.0165912 141.869 1.20965 151.623 3.65101L145.974 26.2209C138.08 24.2451 129.972 23.2527 121.835 23.2663L121.797 0.000169508Z",
|
|
5272
|
-
fill:
|
|
5268
|
+
fill: a
|
|
5273
5269
|
}
|
|
5274
5270
|
),
|
|
5275
5271
|
/* @__PURE__ */ i(
|
|
5276
5272
|
"path",
|
|
5277
5273
|
{
|
|
5278
5274
|
d: "M182.623 16.1279C191.348 21.124 199.422 27.1797 206.662 34.157L190.516 50.9092C184.657 45.2625 178.123 40.3617 171.061 36.3183L182.623 16.1279Z",
|
|
5279
|
-
fill:
|
|
5275
|
+
fill: l
|
|
5280
5276
|
}
|
|
5281
5277
|
),
|
|
5282
5278
|
/* @__PURE__ */ i(
|
|
5283
5279
|
"path",
|
|
5284
5280
|
{
|
|
5285
5281
|
d: "M227.238 60.2836C232.325 68.9568 236.319 78.2255 239.131 87.8788L216.794 94.3859C214.518 86.5735 211.285 79.0725 207.169 72.0533L227.238 60.2836Z",
|
|
5286
|
-
fill:
|
|
5282
|
+
fill: l
|
|
5287
5283
|
}
|
|
5288
5284
|
),
|
|
5289
5285
|
/* @__PURE__ */ i(
|
|
5290
5286
|
"path",
|
|
5291
5287
|
{
|
|
5292
5288
|
d: "M4.15505 90.4316C6.75674 80.7194 10.5491 71.3662 15.4458 62.5846L35.7663 73.9155C31.8035 81.0224 28.7343 88.5919 26.6288 96.4519L4.15505 90.4316Z",
|
|
5293
|
-
fill:
|
|
5289
|
+
fill: d
|
|
5294
5290
|
}
|
|
5295
5291
|
),
|
|
5296
5292
|
/* @__PURE__ */ i(
|
|
5297
5293
|
"path",
|
|
5298
5294
|
{
|
|
5299
5295
|
d: "M35.733 35.733C42.8426 28.6233 50.8039 22.4198 59.4357 17.2636L71.3671 37.2375C64.3814 41.4104 57.9384 46.4308 52.1846 52.1846L35.733 35.733Z",
|
|
5300
|
-
fill:
|
|
5296
|
+
fill: d
|
|
5301
5297
|
}
|
|
5302
5298
|
),
|
|
5303
5299
|
/* @__PURE__ */ i(
|
|
5304
5300
|
"path",
|
|
5305
5301
|
{
|
|
5306
5302
|
d: "M90.3004 4.19027C100.01 1.57776 110.005 0.175523 120.058 0.0154601L120.428 23.2787C112.292 23.4082 104.203 24.543 96.3457 26.6573L90.3004 4.19027Z",
|
|
5307
|
-
fill:
|
|
5303
|
+
fill: a
|
|
5308
5304
|
}
|
|
5309
5305
|
),
|
|
5310
5306
|
/* @__PURE__ */ i(
|
|
5311
5307
|
"path",
|
|
5312
5308
|
{
|
|
5313
5309
|
d: "M153.423 4.11614C163.138 6.70584 172.496 10.4866 181.284 15.3725L169.978 35.707C162.866 31.7529 155.293 28.6932 147.43 26.5973L153.423 4.11614Z",
|
|
5314
|
-
fill:
|
|
5310
|
+
fill: a
|
|
5315
5311
|
}
|
|
5316
5312
|
),
|
|
5317
5313
|
/* @__PURE__ */ i(
|
|
5318
5314
|
"path",
|
|
5319
5315
|
{
|
|
5320
5316
|
d: "M239.602 89.538C242.532 100.152 244.011 111.114 244 122.125L220.734 122.101C220.743 113.19 219.546 104.319 217.175 95.7287L239.602 89.538Z",
|
|
5321
|
-
fill:
|
|
5317
|
+
fill: l
|
|
5322
5318
|
}
|
|
5323
5319
|
),
|
|
5324
5320
|
/* @__PURE__ */ i(
|
|
5325
5321
|
"path",
|
|
5326
5322
|
{
|
|
5327
5323
|
d: "M207.769 35.2376C214.919 42.3062 221.168 50.2316 226.374 58.8336L206.469 70.8798C202.256 63.9183 197.199 57.5043 191.412 51.7837L207.769 35.2376Z",
|
|
5328
|
-
fill:
|
|
5324
|
+
fill: l
|
|
5329
5325
|
}
|
|
5330
5326
|
),
|
|
5331
|
-
/* @__PURE__ */ i("g", { transform: `rotate(${
|
|
5327
|
+
/* @__PURE__ */ i("g", { transform: `rotate(${C} 122 122)`, children: /* @__PURE__ */ i(
|
|
5332
5328
|
"path",
|
|
5333
5329
|
{
|
|
5334
5330
|
id: "aguja",
|
|
@@ -5367,13 +5363,13 @@ const b1 = "_header_13kbt_2", _1 = "_leftComponents_13kbt_13", v1 = "_centerComp
|
|
|
5367
5363
|
componentsContainer: w1
|
|
5368
5364
|
}, N1 = ({
|
|
5369
5365
|
cssProps: n,
|
|
5370
|
-
leftComponents:
|
|
5366
|
+
leftComponents: c = [],
|
|
5371
5367
|
centerComponents: s = [],
|
|
5372
5368
|
rightComponents: r = [],
|
|
5373
5369
|
zIndex: t = 10,
|
|
5374
5370
|
height: o = 60,
|
|
5375
|
-
backgroundColor:
|
|
5376
|
-
isFooter:
|
|
5371
|
+
backgroundColor: d = "#605B56",
|
|
5372
|
+
isFooter: a = !1
|
|
5377
5373
|
// If true, it will apply footer styles
|
|
5378
5374
|
}) => /* @__PURE__ */ h(
|
|
5379
5375
|
"div",
|
|
@@ -5383,14 +5379,14 @@ const b1 = "_header_13kbt_2", _1 = "_leftComponents_13kbt_13", v1 = "_centerComp
|
|
|
5383
5379
|
...n,
|
|
5384
5380
|
zIndex: t,
|
|
5385
5381
|
height: o,
|
|
5386
|
-
backgroundColor:
|
|
5387
|
-
top:
|
|
5388
|
-
bottom:
|
|
5382
|
+
backgroundColor: d,
|
|
5383
|
+
top: a ? "auto" : 0,
|
|
5384
|
+
bottom: a ? 0 : "auto"
|
|
5389
5385
|
},
|
|
5390
5386
|
children: [
|
|
5391
|
-
/* @__PURE__ */ i("div", { className: we.leftComponents, children:
|
|
5392
|
-
/* @__PURE__ */ i("div", { className: we.centerComponents, children: s.map((
|
|
5393
|
-
/* @__PURE__ */ i("div", { className: we.rightComponents, children: r.map((
|
|
5387
|
+
/* @__PURE__ */ i("div", { className: we.leftComponents, children: c.map((l, u) => /* @__PURE__ */ i("div", { className: we.componentsContainer, children: l }, u)) }),
|
|
5388
|
+
/* @__PURE__ */ i("div", { className: we.centerComponents, children: s.map((l, u) => /* @__PURE__ */ i("div", { className: we.componentsContainer, children: l }, u)) }),
|
|
5389
|
+
/* @__PURE__ */ i("div", { className: we.rightComponents, children: r.map((l, u) => /* @__PURE__ */ i("div", { className: we.componentsContainer, children: l }, u)) })
|
|
5394
5390
|
]
|
|
5395
5391
|
}
|
|
5396
5392
|
);
|
|
@@ -5411,7 +5407,7 @@ const k1 = "_sidebar_1kaqu_2", $1 = "_open_1kaqu_16", S1 = "_content_1kaqu_20",
|
|
|
5411
5407
|
closeButton: L1
|
|
5412
5408
|
}, M1 = "data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%203699'%3e%3cpath%20id='Vector%20223'%20d='M1%201L18.1566%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20id='Vector%20224'%20d='M18.1575%201L1.00083%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e", T1 = ({
|
|
5413
5409
|
width: n = "300px",
|
|
5414
|
-
children:
|
|
5410
|
+
children: c,
|
|
5415
5411
|
showRightBar: s,
|
|
5416
5412
|
onCloseBar: r
|
|
5417
5413
|
}) => {
|
|
@@ -5425,7 +5421,7 @@ const k1 = "_sidebar_1kaqu_2", $1 = "_open_1kaqu_16", S1 = "_content_1kaqu_20",
|
|
|
5425
5421
|
style: { width: s ? n : 0 },
|
|
5426
5422
|
children: s && /* @__PURE__ */ h("div", { className: Ye.content, children: [
|
|
5427
5423
|
/* @__PURE__ */ i("button", { className: Ye.closeButton, onClick: t, children: /* @__PURE__ */ i("img", { src: M1, alt: "Close Sidebar" }) }),
|
|
5428
|
-
|
|
5424
|
+
c
|
|
5429
5425
|
] })
|
|
5430
5426
|
}
|
|
5431
5427
|
);
|