@tmf_ciclica/ciclicastorybook 1.2.86 → 1.2.87
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 +983 -979
- package/package.json +1 -1
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: d,
|
|
40
40
|
onClickDelete: s,
|
|
41
41
|
onClickFilters: r,
|
|
42
42
|
onClickAmbit: t,
|
|
43
43
|
isActive: o,
|
|
44
|
-
activeColor:
|
|
45
|
-
fontColor:
|
|
46
|
-
moreInfo:
|
|
44
|
+
activeColor: c,
|
|
45
|
+
fontColor: l,
|
|
46
|
+
moreInfo: a
|
|
47
47
|
}) => {
|
|
48
|
-
const { name: u, created_at:
|
|
48
|
+
const { name: u, created_at: f, id: m, isBeingProcessed: g } = 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 ${l}` },
|
|
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 ? c : l }, children: u })
|
|
65
65
|
] }),
|
|
66
|
-
/* @__PURE__ */ i("div", { className: Ae.ambitDate, children:
|
|
66
|
+
/* @__PURE__ */ i("div", { className: Ae.ambitDate, children: f ? new Date(f).toLocaleDateString() : "" })
|
|
67
67
|
] }),
|
|
68
68
|
/* @__PURE__ */ h("div", { className: Ae.ambitButtons, children: [
|
|
69
|
-
|
|
69
|
+
g && /* @__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: () => d(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: d,
|
|
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: c = {},
|
|
106
|
+
disabled: l = !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
|
+
...c
|
|
116
116
|
},
|
|
117
|
-
onClick:
|
|
117
|
+
onClick: d,
|
|
118
118
|
type: o,
|
|
119
|
-
disabled:
|
|
119
|
+
disabled: l,
|
|
120
120
|
children: n
|
|
121
121
|
}
|
|
122
122
|
), h0 = ({
|
|
123
123
|
ambitList: n,
|
|
124
|
-
activeAmbitId:
|
|
124
|
+
activeAmbitId: d,
|
|
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: c = "New field",
|
|
130
|
+
buttonContainerStyles: l = {},
|
|
131
|
+
containerStyles: a = {},
|
|
132
132
|
onCLickNewAmbit: u = () => console.log("New ambit clicked"),
|
|
133
|
-
onClickCopy:
|
|
133
|
+
onClickCopy: f = (y) => console.log(`Copy ambit: ${y}`),
|
|
134
134
|
onCLickDelete: m = (y) => console.log(`Delete ambit: ${y}`),
|
|
135
|
-
onClickFilters:
|
|
135
|
+
onClickFilters: g = (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((C, N) => C[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, ...a },
|
|
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: d == w.id,
|
|
178
178
|
ambit: w,
|
|
179
179
|
fontColor: s,
|
|
180
180
|
activeColor: r,
|
|
181
|
-
onClickCopy:
|
|
181
|
+
onClickCopy: f,
|
|
182
182
|
onClickDelete: m,
|
|
183
|
-
onClickFilters:
|
|
183
|
+
onClickFilters: g,
|
|
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: { ...l },
|
|
192
192
|
onClick: u,
|
|
193
193
|
borderColor: "grey",
|
|
194
|
-
children: y(
|
|
194
|
+
children: y(c)
|
|
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: d, 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[d]}`, 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: d = "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: c } = A();
|
|
253
253
|
return /* @__PURE__ */ i(
|
|
254
254
|
"div",
|
|
255
255
|
{
|
|
256
|
-
className: `${be.buttonsContainer} ${
|
|
257
|
-
${
|
|
258
|
-
children: n.map((
|
|
256
|
+
className: `${be.buttonsContainer} ${d === "vertical" && be.vertical}
|
|
257
|
+
${d === "horizontal" && be.horizontal}`,
|
|
258
|
+
children: n.map((l, a) => {
|
|
259
259
|
const {
|
|
260
260
|
icon: u,
|
|
261
|
-
activeIcon:
|
|
261
|
+
activeIcon: f,
|
|
262
262
|
isActive: m,
|
|
263
|
-
name:
|
|
263
|
+
name: g,
|
|
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
|
+
} = l, b = /* @__PURE__ */ h(et, { children: [
|
|
267
|
+
s && r === "left" && /* @__PURE__ */ i("span", { className: be.buttonName, children: c(g) }),
|
|
268
|
+
/* @__PURE__ */ i("img", { src: m ? f : u, alt: c(g) }),
|
|
269
|
+
s && r === "right" && /* @__PURE__ */ i("span", { className: be.buttonName, children: c(g) })
|
|
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: g, position: o })
|
|
283
|
+
] }, a);
|
|
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: d,
|
|
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: c = 53,
|
|
319
319
|
//Adjust height if you change fontSize
|
|
320
|
-
titleFontStyles:
|
|
321
|
-
showBottomBar:
|
|
320
|
+
titleFontStyles: l,
|
|
321
|
+
showBottomBar: a = !0,
|
|
322
322
|
titleMarginChildren: u = 15,
|
|
323
|
-
mainTitle:
|
|
323
|
+
mainTitle: f = !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: `${c}px` },
|
|
331
|
+
animate: { height: n ? "auto" : `${c}px` },
|
|
332
332
|
transition: { duration: 0.4 },
|
|
333
333
|
style: {
|
|
334
334
|
backgroundColor: "white",
|
|
335
|
-
borderBottom: n &&
|
|
336
|
-
minHeight:
|
|
335
|
+
borderBottom: n && a ? `1px solid ${t}` : "0px",
|
|
336
|
+
minHeight: f ? "70px" : "50px"
|
|
337
337
|
},
|
|
338
338
|
children: [
|
|
339
339
|
/* @__PURE__ */ h(
|
|
340
340
|
"h2",
|
|
341
341
|
{
|
|
342
342
|
style: {
|
|
343
|
-
...
|
|
343
|
+
...l
|
|
344
344
|
//marginBottom: titleMarginChildren ? titleMarginChildren : "auto",
|
|
345
345
|
},
|
|
346
|
-
className: `${We.title} ${
|
|
347
|
-
onClick:
|
|
346
|
+
className: `${We.title} ${f && We.mainTitle}`,
|
|
347
|
+
onClick: d,
|
|
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: f ? "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
|
+
}, q = 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: d, isOpen: s = !0, textColor: r = "#ffffff", backgroundColor: t = "#605B5680", activeColor: o, fontColor: c = "#605B56" }) => {
|
|
382
|
+
const { t: l } = A(), { tematicalFiltersSelected: a, activeFiltersType: u } = q((g) => g), f = (g) => {
|
|
383
|
+
q.setState((p) => ({
|
|
384
384
|
tematicalFiltersSelected: p.tematicalFiltersSelected.filter(
|
|
385
|
-
(y) => y.code !==
|
|
385
|
+
(y) => y.code !== g
|
|
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" ? q.setState(() => ({ activeFiltersType: null })) : q.setState(() => ({ activeFiltersType: "applied" }));
|
|
395
395
|
},
|
|
396
|
-
title: n ?
|
|
396
|
+
title: n ? l(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: () =>
|
|
399
|
+
color: c,
|
|
400
|
+
children: /* @__PURE__ */ i("div", { className: Bt.AppliedFiltersContainer, children: a == null ? void 0 : a.map((g, p) => /* @__PURE__ */ h("div", { className: Bt.AppliedFilterContent, style: { color: r, background: t }, children: [
|
|
401
|
+
l(g.name),
|
|
402
|
+
/* @__PURE__ */ i("img", { src: M0, alt: "CloseIcon", onClick: () => f(g.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: d = !0,
|
|
427
427
|
fontColor: s = "#605B56",
|
|
428
428
|
backgroundColor: r = "#605B5680",
|
|
429
429
|
activeColor: t,
|
|
430
430
|
geoLayers: o = [],
|
|
431
|
-
onGeoLayersChange:
|
|
431
|
+
onGeoLayersChange: c
|
|
432
432
|
}) => {
|
|
433
|
-
const { t:
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
const
|
|
433
|
+
const { t: l } = A(), { activeFiltersType: a } = q((m) => m), u = () => {
|
|
434
|
+
a === "geographical" ? q.setState({ activeFiltersType: null }) : q.setState({ activeFiltersType: "geographical" });
|
|
435
|
+
}, f = (m) => {
|
|
436
|
+
const g = o.map((p) => ({
|
|
437
437
|
...p,
|
|
438
438
|
active: p.name === m.name
|
|
439
439
|
}));
|
|
440
|
-
|
|
440
|
+
c == null || c(g);
|
|
441
441
|
};
|
|
442
442
|
return /* @__PURE__ */ i(
|
|
443
443
|
ke,
|
|
444
444
|
{
|
|
445
|
-
isOpen:
|
|
445
|
+
isOpen: a === "geographical",
|
|
446
446
|
onClick: u,
|
|
447
|
-
title: n ?
|
|
447
|
+
title: n ? l(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: () => f(m),
|
|
460
|
+
children: l(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: d,
|
|
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: c } = r || {}, { fontColor: l, inputsColor: a } = q((u) => u);
|
|
485
485
|
return /* @__PURE__ */ h(
|
|
486
486
|
"div",
|
|
487
487
|
{
|
|
488
|
-
style: { ...
|
|
488
|
+
style: { ...d, 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 ? a : l}`,
|
|
502
|
+
backgroundColor: t ? a : "white"
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
),
|
|
506
|
-
/* @__PURE__ */ i("span", { className: "checkmark", children: o(
|
|
506
|
+
/* @__PURE__ */ i("span", { className: "checkmark", children: o(c) })
|
|
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, d) {
|
|
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, d);
|
|
526
526
|
}
|
|
527
|
-
function O0(n,
|
|
528
|
-
n.prototype = Object.create(
|
|
527
|
+
function O0(n, d) {
|
|
528
|
+
n.prototype = Object.create(d.prototype), n.prototype.constructor = n, bt(n, d);
|
|
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((d) => {
|
|
541
|
+
typeof document < "u" && document.addEventListener(d, n[d], !1);
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
function _e(n,
|
|
544
|
+
function _e(n, d) {
|
|
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, d), d);
|
|
549
549
|
}
|
|
550
|
-
function _t(n,
|
|
551
|
-
const s = (n -
|
|
550
|
+
function _t(n, d) {
|
|
551
|
+
const s = (n - d.min) % d.step;
|
|
552
552
|
let r = n - s;
|
|
553
|
-
return 2 * Math.abs(s) >=
|
|
553
|
+
return 2 * Math.abs(s) >= d.step && (r += s > 0 ? d.step : -d.step), parseFloat(r.toFixed(5));
|
|
554
554
|
}
|
|
555
555
|
let vt = function(n) {
|
|
556
|
-
function
|
|
556
|
+
function d(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 = (l) => {
|
|
563
|
+
l.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 = (l) => {
|
|
567
567
|
t.setState({ pending: !0 });
|
|
568
|
-
const
|
|
569
|
-
t.move(
|
|
570
|
-
}, t.onTouchMove = (
|
|
571
|
-
if (
|
|
568
|
+
const a = t.getMousePosition(l), u = t.getDiffPosition(a[0]), f = t.getValueFromPosition(u);
|
|
569
|
+
t.move(f);
|
|
570
|
+
}, t.onTouchMove = (l) => {
|
|
571
|
+
if (l.touches.length > 1) return;
|
|
572
572
|
t.setState({ pending: !0 });
|
|
573
|
-
const
|
|
573
|
+
const a = t.getTouchPosition(l);
|
|
574
574
|
if (t.isScrolling === void 0) {
|
|
575
|
-
const m =
|
|
576
|
-
t.isScrolling = Math.abs(
|
|
575
|
+
const m = a[0] - t.startPosition[0], g = a[1] - t.startPosition[1];
|
|
576
|
+
t.isScrolling = Math.abs(g) > 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(a[0]), f = t.getValueFromPosition(u);
|
|
580
|
+
t.move(f);
|
|
581
|
+
}, t.onKeyDown = (l) => {
|
|
582
|
+
if (!(l.ctrlKey || l.shiftKey || l.altKey || l.metaKey)) switch (t.setState({ pending: !0 }), l.key) {
|
|
583
583
|
case "ArrowLeft":
|
|
584
584
|
case "ArrowDown":
|
|
585
585
|
case "Left":
|
|
586
586
|
case "Down":
|
|
587
|
-
|
|
587
|
+
l.preventDefault(), t.moveDownByStep();
|
|
588
588
|
break;
|
|
589
589
|
case "ArrowRight":
|
|
590
590
|
case "ArrowUp":
|
|
591
591
|
case "Right":
|
|
592
592
|
case "Up":
|
|
593
|
-
|
|
593
|
+
l.preventDefault(), t.moveUpByStep();
|
|
594
594
|
break;
|
|
595
595
|
case "Home":
|
|
596
|
-
|
|
596
|
+
l.preventDefault(), t.move(t.props.min);
|
|
597
597
|
break;
|
|
598
598
|
case "End":
|
|
599
|
-
|
|
599
|
+
l.preventDefault(), t.move(t.props.max);
|
|
600
600
|
break;
|
|
601
601
|
case "PageDown":
|
|
602
|
-
|
|
602
|
+
l.preventDefault(), t.moveDownByStep(t.props.pageFn(t.props.step));
|
|
603
603
|
break;
|
|
604
604
|
case "PageUp":
|
|
605
|
-
|
|
605
|
+
l.preventDefault(), t.moveUpByStep(t.props.pageFn(t.props.step));
|
|
606
606
|
}
|
|
607
|
-
}, t.onSliderMouseDown = (
|
|
608
|
-
if (!t.props.disabled &&
|
|
607
|
+
}, t.onSliderMouseDown = (l) => {
|
|
608
|
+
if (!t.props.disabled && l.button !== 2) {
|
|
609
609
|
if (t.setState({ pending: !0 }), !t.props.snapDragDisabled) {
|
|
610
|
-
const
|
|
611
|
-
t.forceValueFromPosition(
|
|
612
|
-
t.start(u,
|
|
610
|
+
const a = t.getMousePosition(l);
|
|
611
|
+
t.forceValueFromPosition(a[0], (u) => {
|
|
612
|
+
t.start(u, a[0]), Ue(t.getMouseEventMap());
|
|
613
613
|
});
|
|
614
614
|
}
|
|
615
|
-
pt(
|
|
615
|
+
pt(l);
|
|
616
616
|
}
|
|
617
|
-
}, t.onSliderClick = (
|
|
617
|
+
}, t.onSliderClick = (l) => {
|
|
618
618
|
if (!t.props.disabled && t.props.onSliderClick && !t.hasMoved) {
|
|
619
|
-
const
|
|
619
|
+
const a = t.getMousePosition(l), u = _e(t.calcValue(t.calcOffsetFromPosition(a[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 = (l) => (a) => {
|
|
623
|
+
t.props.disabled || (t.start(l), Ue(t.getKeyDownEventMap()), pt(a));
|
|
624
|
+
}, t.createOnMouseDown = (l) => (a) => {
|
|
625
|
+
if (t.props.disabled || a.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(a);
|
|
628
|
+
t.start(l, u[0]), Ue(t.getMouseEventMap()), pt(a);
|
|
629
|
+
}, t.createOnTouchStart = (l) => (a) => {
|
|
630
|
+
if (t.props.disabled || a.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(a);
|
|
633
|
+
t.startPosition = u, t.isScrolling = void 0, t.start(l, u[0]), Ue(t.getTouchEventMap()), function(f) {
|
|
634
|
+
f.stopPropagation && f.stopPropagation();
|
|
635
|
+
}(a);
|
|
636
636
|
}, t.handleResize = () => {
|
|
637
|
-
const
|
|
637
|
+
const l = 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(l);
|
|
641
|
+
}, t.renderThumb = (l, a) => {
|
|
642
|
+
const u = t.props.thumbClassName + " " + t.props.thumbClassName + "-" + a + " " + (t.state.index === a ? t.props.thumbActiveClassName : ""), f = { ref: (g) => {
|
|
643
|
+
t["thumb" + a] = g;
|
|
644
|
+
}, key: t.props.thumbClassName + "-" + a, className: u, style: l, onMouseDown: t.createOnMouseDown(a), onTouchStart: t.createOnTouchStart(a), onFocus: t.createOnKeyDown(a), tabIndex: 0, role: "slider", "aria-orientation": t.props.orientation, "aria-valuenow": t.state.value[a], "aria-valuemin": t.props.min, "aria-valuemax": t.props.max, "aria-label": Array.isArray(t.props.ariaLabel) ? t.props.ariaLabel[a] : t.props.ariaLabel, "aria-labelledby": Array.isArray(t.props.ariaLabelledby) ? t.props.ariaLabelledby[a] : t.props.ariaLabelledby, "aria-disabled": t.props.disabled }, m = { index: a, value: Ke(t.state.value), valueNow: t.state.value[a] };
|
|
645
|
+
return t.props.ariaValuetext && (f["aria-valuetext"] = typeof t.props.ariaValuetext == "string" ? t.props.ariaValuetext : t.props.ariaValuetext(m)), t.props.renderThumb(f, m);
|
|
646
|
+
}, t.renderTrack = (l, a, u) => {
|
|
647
|
+
const f = { key: t.props.trackClassName + "-" + l, className: t.props.trackClassName + " " + t.props.trackClassName + "-" + l, style: t.buildTrackStyle(a, t.state.upperBound - u) }, m = { index: l, value: Ke(t.state.value) };
|
|
648
|
+
return t.props.renderTrack(f, 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 c = [];
|
|
653
|
+
for (let l = 0; l < o.length; l += 1) o[l] = _e(o[l], r), c.push(l);
|
|
654
|
+
return t.resizeObserver = null, t.resizeElementRef = E.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value: o, zIndices: c }, t;
|
|
655
655
|
}
|
|
656
|
-
O0(
|
|
657
|
-
var s =
|
|
656
|
+
O0(d, n);
|
|
657
|
+
var s = d.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
|
+
}, d.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((c) => _e(c, 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: c } = this.state, l = c.length;
|
|
678
|
+
for (let a = 0; a < l; a += 1) {
|
|
679
|
+
const u = this.calcOffset(c[a]), f = Math.abs(r - u);
|
|
680
|
+
f < t && (t = f, o = a);
|
|
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(), c = r.getBoundingClientRect(), l = r[o], a = c[this.posMaxKey()], u = c[this.posMinKey()], f = t.getBoundingClientRect()[o.replace("client", "").toLowerCase()], m = l - f, g = Math.abs(a - u);
|
|
704
|
+
this.state.upperBound === m && this.state.sliderLength === g && this.state.thumbSize === f || this.setState({ upperBound: m, sliderLength: g, thumbSize: f });
|
|
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(), c = o[this.posMaxKey()], l = o[this.posMinKey()];
|
|
712
|
+
let a = r - (window["page" + this.axisKey() + "Offset"] + (this.props.invert ? c : l));
|
|
713
|
+
return this.props.invert && (a = this.state.sliderLength - a), a -= this.state.thumbSize / 2, a;
|
|
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), c = this.getClosestIndex(o), l = _e(this.calcValue(o), this.props), a = this.state.value.slice();
|
|
716
|
+
a[c] = l;
|
|
717
|
+
for (let u = 0; u < a.length - 1; u += 1) if (a[u + 1] - a[u] < this.props.minDistance) return;
|
|
718
|
+
this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0, this.setState({ value: a }, () => {
|
|
719
|
+
t(c), 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: c } = this.state;
|
|
730
|
+
c.splice(c.indexOf(r), 1), c.push(r), this.setState((l) => ({ startValue: l.value[r], startPosition: t !== void 0 ? t : l.startPosition, index: r, zIndices: c }));
|
|
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: c } = t, l = t[o];
|
|
741
|
+
if (r === l) return;
|
|
742
742
|
this.hasMoved || this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0;
|
|
743
|
-
const { pearling:
|
|
744
|
-
if (!
|
|
743
|
+
const { pearling: a, max: u, min: f, minDistance: m } = this.props;
|
|
744
|
+
if (!a) {
|
|
745
745
|
if (o > 0) {
|
|
746
|
-
const
|
|
747
|
-
r <
|
|
746
|
+
const g = t[o - 1];
|
|
747
|
+
r < g + m && (r = g + m);
|
|
748
748
|
}
|
|
749
|
-
if (o <
|
|
750
|
-
const
|
|
751
|
-
r >
|
|
749
|
+
if (o < c - 1) {
|
|
750
|
+
const g = t[o + 1];
|
|
751
|
+
r > g - m && (r = g - m);
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
t[o] = r,
|
|
755
|
-
for (let v = 0; v <
|
|
754
|
+
t[o] = r, a && c > 1 && (r > l ? (this.pushSucceeding(t, m, o), function(g, p, y, b) {
|
|
755
|
+
for (let v = 0; v < g; v += 1) {
|
|
756
756
|
const _ = b - v * y;
|
|
757
|
-
p[
|
|
757
|
+
p[g - 1 - v] > _ && (p[g - 1 - v] = _);
|
|
758
758
|
}
|
|
759
|
-
}(
|
|
760
|
-
for (let v = 0; v <
|
|
759
|
+
}(c, t, m, u)) : r < l && (this.pushPreceding(t, m, o), function(g, p, y, b) {
|
|
760
|
+
for (let v = 0; v < g; v += 1) {
|
|
761
761
|
const _ = b + v * y;
|
|
762
762
|
p[v] < _ && (p[v] = _);
|
|
763
763
|
}
|
|
764
|
-
}(
|
|
764
|
+
}(c, t, m, f))), this.setState({ value: t }, this.fireChangeEvent.bind(this, "onChange"));
|
|
765
765
|
}, s.pushSucceeding = function(r, t, o) {
|
|
766
|
-
let
|
|
767
|
-
for (
|
|
766
|
+
let c, l;
|
|
767
|
+
for (c = o, l = r[c] + t; r[c + 1] !== null && l > r[c + 1]; c += 1, l = r[c] + t) r[c + 1] = _t(l, this.props);
|
|
768
768
|
}, s.pushPreceding = function(r, t, o) {
|
|
769
|
-
for (let
|
|
769
|
+
for (let c = o, l = r[c] - t; r[c - 1] !== null && l < r[c - 1]; c -= 1, l = r[c] - t) r[c - 1] = _t(l, 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 l = 0; l < t; l += 1) o[l] = this.buildThumbStyle(r[l], l);
|
|
794
|
+
const c = [];
|
|
795
|
+
for (let l = 0; l < t; l += 1) c[l] = this.renderThumb(o[l], l);
|
|
796
|
+
return c;
|
|
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 c = 0; c < o; c += 1) t.push(this.renderTrack(c + 1, r[c], r[c + 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, c) => c) : typeof r == "number" && (r = Array.from({ length: t }).map((o, c) => c).filter((o) => o % r == 0)), r.map(parseFloat).sort((o, c) => o - c).map((o) => {
|
|
806
|
+
const c = this.calcOffset(o), l = { key: o, className: this.props.markClassName, style: this.buildMarkStyle(c) };
|
|
807
|
+
return this.props.renderMark(l);
|
|
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 c = this.props.withTracks ? this.renderTracks(r) : null, l = this.renderThumbs(r), a = 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 }, c, l, a);
|
|
816
|
+
}, d;
|
|
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: d = 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: c = "#605B56",
|
|
835
|
+
defaultValue: l,
|
|
836
|
+
isDate: a
|
|
837
837
|
}) => {
|
|
838
|
-
const { t: u } = A(),
|
|
838
|
+
const { t: u } = A(), f = a ? new Date(n).getTime() : null, m = a ? new Date(d).getTime() : null, [g, p] = I(a ? [f, m] : [n, d]), y = (b) => {
|
|
839
839
|
p(b), r == null || r({ min: b[0], max: b[1] });
|
|
840
840
|
};
|
|
841
841
|
return O(() => {
|
|
842
|
-
|
|
843
|
-
}, [
|
|
842
|
+
l || p(a ? [f, m] : [n, d]);
|
|
843
|
+
}, [l, a]), /* @__PURE__ */ h(
|
|
844
844
|
"div",
|
|
845
845
|
{
|
|
846
846
|
className: Le.container,
|
|
847
|
-
style: { width: `${t}px`, color: `${
|
|
847
|
+
style: { width: `${t}px`, color: `${c}` },
|
|
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: a ? f : n,
|
|
857
|
+
max: a ? m : d,
|
|
858
|
+
step: a ? (m - f) / 30 : s,
|
|
859
|
+
value: g,
|
|
860
860
|
onAfterChange: y,
|
|
861
861
|
withTracks: !0,
|
|
862
|
-
pearling: !
|
|
863
|
-
minDistance:
|
|
862
|
+
pearling: !a,
|
|
863
|
+
minDistance: a ? 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: a ? new Date(g[0]).toLocaleDateString("en-EN", {
|
|
868
868
|
day: "2-digit",
|
|
869
869
|
month: "short",
|
|
870
870
|
year: "numeric"
|
|
871
|
-
}) :
|
|
872
|
-
/* @__PURE__ */ i("span", { children:
|
|
871
|
+
}) : g[0] }),
|
|
872
|
+
/* @__PURE__ */ i("span", { children: a ? new Date(g[1]).toLocaleDateString("en-EN", {
|
|
873
873
|
day: "2-digit",
|
|
874
874
|
month: "short",
|
|
875
875
|
year: "numeric"
|
|
876
|
-
}) :
|
|
876
|
+
}) : g[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: d
|
|
903
903
|
}) => {
|
|
904
904
|
const [s, r] = I(), {
|
|
905
905
|
type: t,
|
|
906
906
|
name: o,
|
|
907
|
-
values:
|
|
908
|
-
minValue:
|
|
909
|
-
maxValue:
|
|
907
|
+
values: c,
|
|
908
|
+
minValue: l,
|
|
909
|
+
maxValue: a,
|
|
910
910
|
unit: u,
|
|
911
|
-
step:
|
|
911
|
+
step: f,
|
|
912
912
|
disabled: m,
|
|
913
|
-
isDate:
|
|
913
|
+
isDate: g
|
|
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
|
+
} = q((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" ? q.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
|
+
(z) => z !== $
|
|
937
937
|
) : H = [...ee.values, $], H.length == k.length ? {
|
|
938
938
|
tematicalFiltersSelected: Z.tematicalFiltersSelected.filter(
|
|
939
|
-
(
|
|
939
|
+
(z) => z.code !== R
|
|
940
940
|
)
|
|
941
941
|
} : {
|
|
942
942
|
tematicalFiltersSelected: Z.tematicalFiltersSelected.map(
|
|
943
|
-
(
|
|
943
|
+
(z) => z.code === R ? { ...z, values: H } : z
|
|
944
944
|
)
|
|
945
945
|
};
|
|
946
946
|
} else {
|
|
947
|
-
let H = (k || []).map((
|
|
947
|
+
let H = (k || []).map((z, 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((z) => z !== $),
|
|
955
955
|
name: n.name,
|
|
956
956
|
source: D,
|
|
957
|
-
isDate:
|
|
957
|
+
isDate: g
|
|
958
958
|
}
|
|
959
959
|
]
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
}) : B == "abs" &&
|
|
962
|
+
}) : B == "abs" && q.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: g };
|
|
974
974
|
return {
|
|
975
975
|
tematicalFiltersSelected: Z.tematicalFiltersSelected.map(
|
|
976
|
-
(
|
|
976
|
+
(z) => z.code === R ? H : z
|
|
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
|
+
}, C = 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 || q.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: d,
|
|
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: (c || []).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: c }),
|
|
1077
1077
|
indicator: N,
|
|
1078
|
-
value: ((S =
|
|
1078
|
+
value: ((S = C[n.code[t == "both" ? 1 : 0]]) == null ? void 0 : S.has(x)) || !C[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: l,
|
|
1088
|
+
max: a,
|
|
1089
1089
|
unit: u,
|
|
1090
|
-
defaultValue:
|
|
1091
|
-
isDate:
|
|
1092
|
-
step:
|
|
1090
|
+
defaultValue: C[n.code[0]] ? C[n.code[0]] : "",
|
|
1091
|
+
isDate: g,
|
|
1092
|
+
step: f
|
|
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: d,
|
|
1117
1117
|
activeColor: s
|
|
1118
1118
|
//onChangeBothType,
|
|
1119
1119
|
}) => {
|
|
1120
|
-
const { activeSubcategory: r } =
|
|
1120
|
+
const { activeSubcategory: r } = q((c) => c), { 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
|
+
q.setState((c) => ({
|
|
1128
|
+
activeSubcategory: c.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: d,
|
|
1136
1136
|
activeColor: s,
|
|
1137
|
-
children: o == null ? void 0 : o.map((
|
|
1137
|
+
children: o == null ? void 0 : o.map((c, l) => /* @__PURE__ */ i(
|
|
1138
1138
|
Lt,
|
|
1139
1139
|
{
|
|
1140
|
-
indicator:
|
|
1141
|
-
fontColor:
|
|
1140
|
+
indicator: c,
|
|
1141
|
+
fontColor: d,
|
|
1142
1142
|
activeColor: s
|
|
1143
1143
|
},
|
|
1144
|
-
`indicatorSub-${
|
|
1144
|
+
`indicatorSub-${l}`
|
|
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: d
|
|
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: c } = q((l) => l);
|
|
1168
1168
|
return n && /* @__PURE__ */ i(
|
|
1169
1169
|
ke,
|
|
1170
1170
|
{
|
|
1171
1171
|
onClick: () => {
|
|
1172
|
-
|
|
1172
|
+
q.setState((l) => ({
|
|
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: c,
|
|
1181
|
+
activeColor: d,
|
|
1182
|
+
children: r ? r.map((l, a) => /* @__PURE__ */ i(
|
|
1183
1183
|
a2,
|
|
1184
1184
|
{
|
|
1185
|
-
subcategory:
|
|
1186
|
-
fontColor:
|
|
1187
|
-
activeColor:
|
|
1185
|
+
subcategory: l,
|
|
1186
|
+
fontColor: c,
|
|
1187
|
+
activeColor: d
|
|
1188
1188
|
},
|
|
1189
|
-
`subcategory-${
|
|
1190
|
-
)) : t && t.map((
|
|
1189
|
+
`subcategory-${a}`
|
|
1190
|
+
)) : t && t.map((l, a) => /* @__PURE__ */ i(
|
|
1191
1191
|
Lt,
|
|
1192
1192
|
{
|
|
1193
|
-
indicator:
|
|
1194
|
-
fontColor:
|
|
1195
|
-
activeColor:
|
|
1193
|
+
indicator: l,
|
|
1194
|
+
fontColor: c,
|
|
1195
|
+
activeColor: d
|
|
1196
1196
|
},
|
|
1197
|
-
`indicator-${
|
|
1197
|
+
`indicator-${a}`
|
|
1198
1198
|
))
|
|
1199
1199
|
}
|
|
1200
1200
|
);
|
|
@@ -1210,40 +1210,42 @@ l2.propTypes = {
|
|
|
1210
1210
|
};
|
|
1211
1211
|
const wt = ({
|
|
1212
1212
|
indicators: n,
|
|
1213
|
-
isOpen:
|
|
1213
|
+
isOpen: d = !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
|
|
1218
|
+
activeColor: o,
|
|
1219
|
+
isExtra: c = !1
|
|
1219
1220
|
}) => {
|
|
1220
|
-
const { tematicalFiltersSelected:
|
|
1221
|
+
const { tematicalFiltersSelected: l, activeFiltersType: a } = q(
|
|
1222
|
+
(m) => m
|
|
1223
|
+
), { t: u } = A();
|
|
1221
1224
|
O(() => {
|
|
1222
|
-
|
|
1223
|
-
r && P.setState(() => ({ fontColor: r }));
|
|
1225
|
+
r && q.setState(() => ({ fontColor: r }));
|
|
1224
1226
|
}, [r]), O(() => {
|
|
1225
|
-
t &&
|
|
1227
|
+
t && q.setState(() => ({ inputsColor: t }));
|
|
1226
1228
|
}, [t]);
|
|
1227
|
-
const
|
|
1228
|
-
a == "tematical" ?
|
|
1229
|
+
const f = () => {
|
|
1230
|
+
c ? a == c ? q.setState(() => ({ activeFiltersType: null })) : q.setState(() => ({ activeFiltersType: c })) : a == "tematical" ? q.setState(() => ({ activeFiltersType: null })) : q.setState(() => ({ activeFiltersType: "tematical" }));
|
|
1229
1231
|
};
|
|
1230
1232
|
return /* @__PURE__ */ i(
|
|
1231
1233
|
ke,
|
|
1232
1234
|
{
|
|
1233
|
-
isOpen: a == "tematical",
|
|
1234
|
-
title: s ?
|
|
1235
|
+
isOpen: c ? a == c : a == "tematical",
|
|
1236
|
+
title: s ? u(s) : "Tematical filters",
|
|
1235
1237
|
color: r,
|
|
1236
1238
|
activeColor: o,
|
|
1237
|
-
onClick:
|
|
1239
|
+
onClick: f,
|
|
1238
1240
|
mainTitle: !0,
|
|
1239
|
-
children: n == null ? void 0 : n.map((
|
|
1241
|
+
children: n == null ? void 0 : n.map((m, g) => /* @__PURE__ */ i(
|
|
1240
1242
|
l2,
|
|
1241
1243
|
{
|
|
1242
|
-
category:
|
|
1244
|
+
category: m,
|
|
1243
1245
|
fontColor: r,
|
|
1244
1246
|
activeColor: o
|
|
1245
1247
|
},
|
|
1246
|
-
`category-${
|
|
1248
|
+
`category-${g}`
|
|
1247
1249
|
))
|
|
1248
1250
|
}
|
|
1249
1251
|
);
|
|
@@ -1268,18 +1270,18 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1268
1270
|
buttonContainer: en
|
|
1269
1271
|
}, tn = ({
|
|
1270
1272
|
ambitName: n,
|
|
1271
|
-
ambitDescription:
|
|
1273
|
+
ambitDescription: d,
|
|
1272
1274
|
defaultFilters: s,
|
|
1273
1275
|
indicators: r,
|
|
1274
1276
|
activeColor: t,
|
|
1275
1277
|
textColor: o,
|
|
1276
|
-
backgroundColor:
|
|
1277
|
-
onChangeAppliedFilters:
|
|
1278
|
-
saveAmbit:
|
|
1278
|
+
backgroundColor: c,
|
|
1279
|
+
onChangeAppliedFilters: l,
|
|
1280
|
+
saveAmbit: a,
|
|
1279
1281
|
namePlaceholder: u,
|
|
1280
|
-
descPlaceholder:
|
|
1282
|
+
descPlaceholder: f,
|
|
1281
1283
|
filtersTypes: m = ["geographical", "tematical"],
|
|
1282
|
-
nameRequiredText:
|
|
1284
|
+
nameRequiredText: g,
|
|
1283
1285
|
geoLayers: p = [],
|
|
1284
1286
|
onGeoLayersChange: y,
|
|
1285
1287
|
onlyFilters: b = !1,
|
|
@@ -1288,28 +1290,28 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1288
1290
|
//campo descripción required
|
|
1289
1291
|
extraLists: _ = !1
|
|
1290
1292
|
}) => {
|
|
1291
|
-
const { t: w } = A(), { tematicalFiltersSelected: L, activeFiltersType:
|
|
1293
|
+
const { t: w } = A(), { tematicalFiltersSelected: L, activeFiltersType: C } = q(
|
|
1292
1294
|
(D) => D
|
|
1293
|
-
), [N, x] = I(n || null), [S, $] = I(
|
|
1295
|
+
), [N, x] = I(n || null), [S, $] = I(d || null), [k, T] = I(!1);
|
|
1294
1296
|
O(() => {
|
|
1295
|
-
|
|
1297
|
+
q.setState({
|
|
1296
1298
|
tematicalFiltersSelected: s || []
|
|
1297
1299
|
});
|
|
1298
1300
|
}, [s]), Y(!1), O(() => {
|
|
1299
|
-
|
|
1301
|
+
l(L);
|
|
1300
1302
|
}, [L]);
|
|
1301
1303
|
const F = () => {
|
|
1302
|
-
v ? N && S ?
|
|
1304
|
+
v ? N && S ? a({ name: N, description: S }) : T(!0) : N ? a({ name: N, description: S }) : T(!0);
|
|
1303
1305
|
};
|
|
1304
1306
|
return O(() => {
|
|
1305
|
-
if (m.includes("geographical") &&
|
|
1307
|
+
if (m.includes("geographical") && C != "geographical" && p.length > 0) {
|
|
1306
1308
|
const D = p.map((B) => ({
|
|
1307
1309
|
...B,
|
|
1308
1310
|
active: !1
|
|
1309
1311
|
}));
|
|
1310
1312
|
y == null || y(D);
|
|
1311
1313
|
}
|
|
1312
|
-
}, [
|
|
1314
|
+
}, [C]), /* @__PURE__ */ h("div", { className: Ce.FiltersAmbitContainer, children: [
|
|
1313
1315
|
/* @__PURE__ */ h("div", { className: Ce.FiltersContainer, children: [
|
|
1314
1316
|
!b && /* @__PURE__ */ h("div", { className: Ce.FiltersAmbitHeader, children: [
|
|
1315
1317
|
/* @__PURE__ */ i("div", { className: Ce.FiltersAmbitTitle, children: /* @__PURE__ */ i(
|
|
@@ -1330,7 +1332,7 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1330
1332
|
onChange: (D) => {
|
|
1331
1333
|
v && T(!1), $(D.target.value);
|
|
1332
1334
|
},
|
|
1333
|
-
placeholder: w(
|
|
1335
|
+
placeholder: w(f)
|
|
1334
1336
|
}
|
|
1335
1337
|
) }) })
|
|
1336
1338
|
] }),
|
|
@@ -1338,9 +1340,9 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1338
1340
|
i2,
|
|
1339
1341
|
{
|
|
1340
1342
|
title: w("applied_filters"),
|
|
1341
|
-
isOpen:
|
|
1343
|
+
isOpen: C == "applied",
|
|
1342
1344
|
textColor: o || "#fff",
|
|
1343
|
-
backgroundColor:
|
|
1345
|
+
backgroundColor: c || "#605B5680",
|
|
1344
1346
|
activeColor: t
|
|
1345
1347
|
}
|
|
1346
1348
|
),
|
|
@@ -1360,7 +1362,8 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1360
1362
|
inputsColor: t,
|
|
1361
1363
|
textColor: o,
|
|
1362
1364
|
title: D.title,
|
|
1363
|
-
activeColor: t
|
|
1365
|
+
activeColor: t,
|
|
1366
|
+
isExtra: D.title
|
|
1364
1367
|
}
|
|
1365
1368
|
)),
|
|
1366
1369
|
m.includes("tematical") && /* @__PURE__ */ i(
|
|
@@ -1370,12 +1373,13 @@ const K0 = "_FiltersAmbitContainer_1hv16_2", U0 = "_FiltersContainer_1hv16_15",
|
|
|
1370
1373
|
inputsColor: t,
|
|
1371
1374
|
textColor: o,
|
|
1372
1375
|
title: "tematical_filters",
|
|
1373
|
-
activeColor: t
|
|
1376
|
+
activeColor: t,
|
|
1377
|
+
isExtra: !1
|
|
1374
1378
|
}
|
|
1375
1379
|
)
|
|
1376
1380
|
] }),
|
|
1377
1381
|
!b && /* @__PURE__ */ h("div", { className: Ce.buttonContainer, children: [
|
|
1378
|
-
k && /* @__PURE__ */ i("div", { className: Ce.warning, children: w(
|
|
1382
|
+
k && /* @__PURE__ */ i("div", { className: Ce.warning, children: w(g) }),
|
|
1379
1383
|
/* @__PURE__ */ i(it, { onClick: () => F(), children: w("save_ambit") })
|
|
1380
1384
|
] })
|
|
1381
1385
|
] });
|
|
@@ -1401,7 +1405,7 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1401
1405
|
}, c2 = ({
|
|
1402
1406
|
data: n,
|
|
1403
1407
|
// Height of each bar in horizontal orientation or width in vertical orientation
|
|
1404
|
-
barHeight:
|
|
1408
|
+
barHeight: d = 25,
|
|
1405
1409
|
// Gap between bars
|
|
1406
1410
|
gap: s = 23,
|
|
1407
1411
|
fontColor: r = "#605B56",
|
|
@@ -1410,14 +1414,14 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1410
1414
|
// Number of divisions on the value axis
|
|
1411
1415
|
numberOfDivisions: o = 7,
|
|
1412
1416
|
// Maximum value for the scale
|
|
1413
|
-
maxValue:
|
|
1417
|
+
maxValue: c = null,
|
|
1414
1418
|
// Orientation of the chart ("horizontal" or "vertical")
|
|
1415
|
-
orientation:
|
|
1416
|
-
horizontalPadding:
|
|
1419
|
+
orientation: l = "horizontal",
|
|
1420
|
+
horizontalPadding: a = l == "vertical" ? 50 : 20,
|
|
1417
1421
|
verticalPadding: u = 10,
|
|
1418
|
-
xLabelPadding:
|
|
1422
|
+
xLabelPadding: f = l == "vertical" ? 50 : 40,
|
|
1419
1423
|
containerWidth: m = 700,
|
|
1420
|
-
containerHeight:
|
|
1424
|
+
containerHeight: g = 500,
|
|
1421
1425
|
mainColor: p = "#000"
|
|
1422
1426
|
}) => {
|
|
1423
1427
|
const {
|
|
@@ -1427,13 +1431,13 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1427
1431
|
height: _,
|
|
1428
1432
|
chartWidth: w,
|
|
1429
1433
|
svgWidth: L,
|
|
1430
|
-
svgHeight:
|
|
1434
|
+
svgHeight: C,
|
|
1431
1435
|
contentWidth: N
|
|
1432
1436
|
} = Fe(() => {
|
|
1433
1437
|
if (n && n.length > 0) {
|
|
1434
|
-
const x = dt.max(n, ($) => $.value) || 1, S =
|
|
1435
|
-
if (
|
|
1436
|
-
const $ = n.length * (
|
|
1438
|
+
const x = dt.max(n, ($) => $.value) || 1, S = c || x;
|
|
1439
|
+
if (l === "vertical") {
|
|
1440
|
+
const $ = n.length * (d + s) + a * 2, k = Math.max($, m || 0), T = g, D = dt.scaleLinear().domain([0, S]).range([T - 100, u]), B = Array.from(
|
|
1437
1441
|
{ length: o + 1 },
|
|
1438
1442
|
(R, Z) => S / o * Z
|
|
1439
1443
|
);
|
|
@@ -1447,9 +1451,9 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1447
1451
|
contentWidth: $
|
|
1448
1452
|
};
|
|
1449
1453
|
} else {
|
|
1450
|
-
const $ = n.length * (
|
|
1454
|
+
const $ = n.length * (d + s);
|
|
1451
1455
|
console.log("barsHeight: ", $);
|
|
1452
|
-
const k = $ + u * 2 +
|
|
1456
|
+
const k = $ + u * 2 + f + 30, T = m + t + a * 2, F = dt.scaleLinear().domain([0, S]).range([0, m - a * 2]), D = Array.from(
|
|
1453
1457
|
{ length: o + 1 },
|
|
1454
1458
|
(B, R) => S / o * R
|
|
1455
1459
|
);
|
|
@@ -1474,23 +1478,23 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1474
1478
|
}, [
|
|
1475
1479
|
n,
|
|
1476
1480
|
o,
|
|
1477
|
-
c,
|
|
1478
|
-
s,
|
|
1479
|
-
l,
|
|
1480
|
-
u,
|
|
1481
1481
|
d,
|
|
1482
|
+
s,
|
|
1482
1483
|
a,
|
|
1484
|
+
u,
|
|
1485
|
+
c,
|
|
1486
|
+
l,
|
|
1483
1487
|
t,
|
|
1484
1488
|
m,
|
|
1485
|
-
|
|
1489
|
+
g
|
|
1486
1490
|
]);
|
|
1487
|
-
return
|
|
1491
|
+
return l === "vertical" ? /* @__PURE__ */ i(
|
|
1488
1492
|
"div",
|
|
1489
1493
|
{
|
|
1490
1494
|
style: {
|
|
1491
1495
|
//width: containerWidth ? `${containerWidth}px` : "100%",
|
|
1492
1496
|
width: "100%",
|
|
1493
|
-
height:
|
|
1497
|
+
height: g ? `${g}px` : "100%",
|
|
1494
1498
|
"--main-color": p
|
|
1495
1499
|
},
|
|
1496
1500
|
className: Ft.barChartContainer,
|
|
@@ -1498,15 +1502,15 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1498
1502
|
"svg",
|
|
1499
1503
|
{
|
|
1500
1504
|
width: L,
|
|
1501
|
-
height:
|
|
1505
|
+
height: C,
|
|
1502
1506
|
style: {
|
|
1503
1507
|
display: "block",
|
|
1504
1508
|
width: L,
|
|
1505
|
-
height:
|
|
1509
|
+
height: C,
|
|
1506
1510
|
maxWidth: "none",
|
|
1507
1511
|
"--main-color": p
|
|
1508
1512
|
},
|
|
1509
|
-
children: /* @__PURE__ */ h("g", { transform: `translate(${
|
|
1513
|
+
children: /* @__PURE__ */ h("g", { transform: `translate(${a}, 0)`, children: [
|
|
1510
1514
|
/* @__PURE__ */ i("g", { children: v.map((x, S) => {
|
|
1511
1515
|
const $ = b(x);
|
|
1512
1516
|
return /* @__PURE__ */ h("g", { children: [
|
|
@@ -1514,7 +1518,7 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1514
1518
|
"line",
|
|
1515
1519
|
{
|
|
1516
1520
|
x1: 0,
|
|
1517
|
-
x2: w -
|
|
1521
|
+
x2: w - a * 2,
|
|
1518
1522
|
y1: $,
|
|
1519
1523
|
y2: $,
|
|
1520
1524
|
stroke: "#ccc"
|
|
@@ -1534,14 +1538,14 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1534
1538
|
] }, S);
|
|
1535
1539
|
}) }),
|
|
1536
1540
|
n && n.length > 0 && n.map((x, S) => {
|
|
1537
|
-
const $ = b(0) - b(x.value), k = S * (
|
|
1541
|
+
const $ = b(0) - b(x.value), k = S * (d + s), T = b(x.value);
|
|
1538
1542
|
return /* @__PURE__ */ h("g", { children: [
|
|
1539
1543
|
/* @__PURE__ */ i(
|
|
1540
1544
|
"rect",
|
|
1541
1545
|
{
|
|
1542
1546
|
x: k,
|
|
1543
1547
|
y: T,
|
|
1544
|
-
width:
|
|
1548
|
+
width: d,
|
|
1545
1549
|
height: $,
|
|
1546
1550
|
fill: x.color,
|
|
1547
1551
|
rx: 0
|
|
@@ -1550,12 +1554,12 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1550
1554
|
/* @__PURE__ */ i(
|
|
1551
1555
|
"text",
|
|
1552
1556
|
{
|
|
1553
|
-
x: k +
|
|
1554
|
-
y: _ -
|
|
1557
|
+
x: k + d / 2,
|
|
1558
|
+
y: _ - f,
|
|
1555
1559
|
textAnchor: "start",
|
|
1556
1560
|
fill: r,
|
|
1557
1561
|
fontSize: 12,
|
|
1558
|
-
transform: `rotate(-90, ${k +
|
|
1562
|
+
transform: `rotate(-90, ${k + d / 2}, ${_ - f})`,
|
|
1559
1563
|
children: x.title
|
|
1560
1564
|
}
|
|
1561
1565
|
)
|
|
@@ -1565,13 +1569,13 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1565
1569
|
}
|
|
1566
1570
|
)
|
|
1567
1571
|
}
|
|
1568
|
-
) : (console.log("svgHeight: ",
|
|
1572
|
+
) : (console.log("svgHeight: ", C), /* @__PURE__ */ i(
|
|
1569
1573
|
"div",
|
|
1570
1574
|
{
|
|
1571
1575
|
style: {
|
|
1572
1576
|
width: "100%",
|
|
1573
1577
|
//width: containerWidth ? `${containerWidth}px` : "100%",
|
|
1574
|
-
height:
|
|
1578
|
+
height: g ? `${g}px` : "100%",
|
|
1575
1579
|
"--main-color": p
|
|
1576
1580
|
},
|
|
1577
1581
|
className: Ft.barChartContainer,
|
|
@@ -1579,29 +1583,29 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1579
1583
|
"svg",
|
|
1580
1584
|
{
|
|
1581
1585
|
width: L,
|
|
1582
|
-
height:
|
|
1586
|
+
height: C,
|
|
1583
1587
|
style: {
|
|
1584
1588
|
minWidth: "100%",
|
|
1585
|
-
height:
|
|
1589
|
+
height: C,
|
|
1586
1590
|
width: N,
|
|
1587
1591
|
maxWidth: "none"
|
|
1588
1592
|
},
|
|
1589
1593
|
children: /* @__PURE__ */ h("g", { transform: `translate(0,${u})`, children: [
|
|
1590
|
-
/* @__PURE__ */ i("g", { transform: `translate(${t +
|
|
1594
|
+
/* @__PURE__ */ i("g", { transform: `translate(${t + a}, 0)`, children: v.map((x, S) => {
|
|
1591
1595
|
const $ = y(x);
|
|
1592
1596
|
return /* @__PURE__ */ h("g", { transform: `translate(${$}, 0)`, children: [
|
|
1593
1597
|
/* @__PURE__ */ i(
|
|
1594
1598
|
"line",
|
|
1595
1599
|
{
|
|
1596
1600
|
y1: 0,
|
|
1597
|
-
y2: n.length * (
|
|
1601
|
+
y2: n.length * (d + s),
|
|
1598
1602
|
stroke: "#ccc"
|
|
1599
1603
|
}
|
|
1600
1604
|
),
|
|
1601
1605
|
/* @__PURE__ */ i(
|
|
1602
1606
|
"text",
|
|
1603
1607
|
{
|
|
1604
|
-
y: n.length * (
|
|
1608
|
+
y: n.length * (d + s) + 30,
|
|
1605
1609
|
textAnchor: "middle",
|
|
1606
1610
|
fontSize: 10,
|
|
1607
1611
|
fill: r,
|
|
@@ -1611,17 +1615,17 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1611
1615
|
] }, S);
|
|
1612
1616
|
}) }),
|
|
1613
1617
|
n && n.length > 0 && n.map((x, S) => {
|
|
1614
|
-
const $ = y(x.value), k = S * (
|
|
1618
|
+
const $ = y(x.value), k = S * (d + s);
|
|
1615
1619
|
return console.log("y: ", k), /* @__PURE__ */ h(
|
|
1616
1620
|
"g",
|
|
1617
1621
|
{
|
|
1618
|
-
transform: `translate(${t +
|
|
1622
|
+
transform: `translate(${t + a}, ${k})`,
|
|
1619
1623
|
children: [
|
|
1620
1624
|
/* @__PURE__ */ i(
|
|
1621
1625
|
"text",
|
|
1622
1626
|
{
|
|
1623
1627
|
x: -24,
|
|
1624
|
-
y:
|
|
1628
|
+
y: d / 2 + 5,
|
|
1625
1629
|
textAnchor: "end",
|
|
1626
1630
|
fill: r,
|
|
1627
1631
|
fontSize: 12,
|
|
@@ -1632,7 +1636,7 @@ const nn = "_barChartContainer_1ly7h_2", Ft = {
|
|
|
1632
1636
|
"rect",
|
|
1633
1637
|
{
|
|
1634
1638
|
width: $,
|
|
1635
|
-
height:
|
|
1639
|
+
height: d,
|
|
1636
1640
|
fill: x.color,
|
|
1637
1641
|
rx: 0
|
|
1638
1642
|
}
|
|
@@ -1676,19 +1680,19 @@ const sn = "_graphicContainer_1ozwp_2", rn = "_titleContainer_1ozwp_13", At = {
|
|
|
1676
1680
|
titleContainer: rn
|
|
1677
1681
|
}, on = ({
|
|
1678
1682
|
data: n,
|
|
1679
|
-
graphLength:
|
|
1683
|
+
graphLength: d = 700,
|
|
1680
1684
|
containerStyle: s,
|
|
1681
1685
|
borderColor: r = "#605B56",
|
|
1682
1686
|
title: t = "Graphic Title",
|
|
1683
1687
|
fontColor: o = "#605B56",
|
|
1684
|
-
maxValue:
|
|
1685
|
-
numberOfDivisions:
|
|
1686
|
-
leftPadding:
|
|
1688
|
+
maxValue: c = null,
|
|
1689
|
+
numberOfDivisions: l = 7,
|
|
1690
|
+
leftPadding: a = -200,
|
|
1687
1691
|
orientation: u = "horizontal",
|
|
1688
|
-
xLabelPadding:
|
|
1692
|
+
xLabelPadding: f = 0,
|
|
1689
1693
|
mainColor: m
|
|
1690
1694
|
}) => {
|
|
1691
|
-
const { t:
|
|
1695
|
+
const { t: g } = A();
|
|
1692
1696
|
return /* @__PURE__ */ h(
|
|
1693
1697
|
"div",
|
|
1694
1698
|
{
|
|
@@ -1698,18 +1702,18 @@ const sn = "_graphicContainer_1ozwp_2", rn = "_titleContainer_1ozwp_13", At = {
|
|
|
1698
1702
|
paddingBottom: 40
|
|
1699
1703
|
},
|
|
1700
1704
|
children: [
|
|
1701
|
-
/* @__PURE__ */ i("div", { className: At.titleContainer, children: /* @__PURE__ */ i("h2", { children:
|
|
1705
|
+
/* @__PURE__ */ i("div", { className: At.titleContainer, children: /* @__PURE__ */ i("h2", { children: g(t) }) }),
|
|
1702
1706
|
/* @__PURE__ */ i(
|
|
1703
1707
|
c2,
|
|
1704
1708
|
{
|
|
1705
1709
|
data: n,
|
|
1706
|
-
length:
|
|
1710
|
+
length: d,
|
|
1707
1711
|
fontColor: o,
|
|
1708
|
-
maxValue:
|
|
1709
|
-
numberOfDivisions:
|
|
1710
|
-
leftPadding:
|
|
1712
|
+
maxValue: c,
|
|
1713
|
+
numberOfDivisions: l,
|
|
1714
|
+
leftPadding: a,
|
|
1711
1715
|
orientation: u,
|
|
1712
|
-
xLabelPadding:
|
|
1716
|
+
xLabelPadding: f,
|
|
1713
1717
|
mainColor: m
|
|
1714
1718
|
}
|
|
1715
1719
|
)
|
|
@@ -1753,21 +1757,21 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1753
1757
|
optionText: vn
|
|
1754
1758
|
}, Mt = ({
|
|
1755
1759
|
indicator: n,
|
|
1756
|
-
values:
|
|
1760
|
+
values: d = [],
|
|
1757
1761
|
activeColor: s,
|
|
1758
1762
|
defaultColor: r = "#92898A",
|
|
1759
1763
|
activeIndicator: t,
|
|
1760
1764
|
activeIndicatorType: o,
|
|
1761
|
-
onClickIndicator:
|
|
1762
|
-
multiple:
|
|
1763
|
-
onChangeType:
|
|
1765
|
+
onClickIndicator: c,
|
|
1766
|
+
multiple: l = !1,
|
|
1767
|
+
onChangeType: a
|
|
1764
1768
|
}) => {
|
|
1765
|
-
const { t: u } = A(), { name:
|
|
1769
|
+
const { t: u } = A(), { name: f, type: m, disabled: g } = n, [p, y] = I(!1);
|
|
1766
1770
|
O(() => {
|
|
1767
1771
|
t && y(
|
|
1768
|
-
|
|
1769
|
-
(_) => _.name == String(
|
|
1770
|
-
) : t.name ==
|
|
1772
|
+
l ? t.some(
|
|
1773
|
+
(_) => _.name == String(f)
|
|
1774
|
+
) : t.name == f
|
|
1771
1775
|
);
|
|
1772
1776
|
}, [t]);
|
|
1773
1777
|
const b = () => /* @__PURE__ */ i("div", { className: U.switchExternalContainer, children: /* @__PURE__ */ i("div", { className: U.switchType, children: /* @__PURE__ */ h("div", { className: U.switchTypeOptions, children: [
|
|
@@ -1775,7 +1779,7 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1775
1779
|
"div",
|
|
1776
1780
|
{
|
|
1777
1781
|
className: U.optionContainer,
|
|
1778
|
-
onClick: () =>
|
|
1782
|
+
onClick: () => a("cat"),
|
|
1779
1783
|
children: [
|
|
1780
1784
|
/* @__PURE__ */ i(
|
|
1781
1785
|
"span",
|
|
@@ -1804,7 +1808,7 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1804
1808
|
"div",
|
|
1805
1809
|
{
|
|
1806
1810
|
className: U.optionContainer,
|
|
1807
|
-
onClick: () =>
|
|
1811
|
+
onClick: () => a("abs"),
|
|
1808
1812
|
children: [
|
|
1809
1813
|
/* @__PURE__ */ i(
|
|
1810
1814
|
"span",
|
|
@@ -1829,7 +1833,7 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1829
1833
|
]
|
|
1830
1834
|
}
|
|
1831
1835
|
)
|
|
1832
|
-
] }) }) }), v = () => /* @__PURE__ */ i("div", { className: U.switchExternalContainer, children: /* @__PURE__ */ i("div", { className: U.switchType, children: /* @__PURE__ */ i("div", { className: U.switchTypeOptions, children:
|
|
1836
|
+
] }) }) }), v = () => /* @__PURE__ */ i("div", { className: U.switchExternalContainer, children: /* @__PURE__ */ i("div", { className: U.switchType, children: /* @__PURE__ */ i("div", { className: U.switchTypeOptions, children: d.map((_, w) => /* @__PURE__ */ h(
|
|
1833
1837
|
"div",
|
|
1834
1838
|
{
|
|
1835
1839
|
className: U.optionContainer,
|
|
@@ -1850,18 +1854,18 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1850
1854
|
"div",
|
|
1851
1855
|
{
|
|
1852
1856
|
className: U.indicatorNameContainer,
|
|
1853
|
-
onClick: () => !
|
|
1857
|
+
onClick: () => !g && c({ indicator: n }),
|
|
1854
1858
|
children: [
|
|
1855
1859
|
/* @__PURE__ */ i(
|
|
1856
1860
|
"div",
|
|
1857
1861
|
{
|
|
1858
1862
|
style: {
|
|
1859
1863
|
border: p ? `1px solid ${s}` : `1px solid ${r}`,
|
|
1860
|
-
opacity:
|
|
1864
|
+
opacity: g ? 0.5 : 1,
|
|
1861
1865
|
backgroundColor: p ? s : "transparent"
|
|
1862
1866
|
},
|
|
1863
1867
|
className: U.dot,
|
|
1864
|
-
children:
|
|
1868
|
+
children: l && /* @__PURE__ */ i("img", { src: p ? un : dn, alt: "" })
|
|
1865
1869
|
}
|
|
1866
1870
|
),
|
|
1867
1871
|
/* @__PURE__ */ i(
|
|
@@ -1870,12 +1874,12 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1870
1874
|
className: U.indicatorName,
|
|
1871
1875
|
style: {
|
|
1872
1876
|
color: p ? s : r,
|
|
1873
|
-
opacity:
|
|
1877
|
+
opacity: g ? 0.5 : 1
|
|
1874
1878
|
},
|
|
1875
1879
|
children: /* @__PURE__ */ i(
|
|
1876
1880
|
$t,
|
|
1877
1881
|
{
|
|
1878
|
-
i18nKey:
|
|
1882
|
+
i18nKey: f,
|
|
1879
1883
|
components: { sup: /* @__PURE__ */ i("sup", {}) },
|
|
1880
1884
|
shouldUnescape: !0
|
|
1881
1885
|
}
|
|
@@ -1885,8 +1889,8 @@ const an = "_indicatorsCategory_arwy3_2", ln = "_title_arwy3_5", cn = "_list_arw
|
|
|
1885
1889
|
]
|
|
1886
1890
|
}
|
|
1887
1891
|
),
|
|
1888
|
-
(t == null ? void 0 : t.name) ===
|
|
1889
|
-
(t == null ? void 0 : t.name) ===
|
|
1892
|
+
(t == null ? void 0 : t.name) === f && m === "both" && /* @__PURE__ */ i("div", { children: b() }),
|
|
1893
|
+
(t == null ? void 0 : t.name) === f && m === "twoUnits" && /* @__PURE__ */ i("div", { children: v() })
|
|
1890
1894
|
] });
|
|
1891
1895
|
};
|
|
1892
1896
|
Mt.propTypes = {
|
|
@@ -1906,22 +1910,22 @@ const xn = "_indicatorsSubCategory_1nuug_2", wn = "_list_1nuug_11", Ot = {
|
|
|
1906
1910
|
list: wn
|
|
1907
1911
|
}, d2 = ({
|
|
1908
1912
|
subcName: n,
|
|
1909
|
-
indicators:
|
|
1913
|
+
indicators: d,
|
|
1910
1914
|
defaultColor: s,
|
|
1911
1915
|
activeColor: r,
|
|
1912
1916
|
activeSubCategory: t,
|
|
1913
1917
|
onClickSubCategory: o,
|
|
1914
|
-
id:
|
|
1915
|
-
activeIndicator:
|
|
1916
|
-
onClickIndicator:
|
|
1918
|
+
id: c,
|
|
1919
|
+
activeIndicator: l,
|
|
1920
|
+
onClickIndicator: a,
|
|
1917
1921
|
multiple: u,
|
|
1918
|
-
activeIndicatorType:
|
|
1922
|
+
activeIndicatorType: f,
|
|
1919
1923
|
onChangeType: m
|
|
1920
1924
|
}) => {
|
|
1921
|
-
const { t:
|
|
1925
|
+
const { t: g } = A(), [p, y] = I(!1);
|
|
1922
1926
|
return O(() => {
|
|
1923
|
-
y(t ==
|
|
1924
|
-
}, [t,
|
|
1927
|
+
y(t == c);
|
|
1928
|
+
}, [t, c]), /* @__PURE__ */ h(
|
|
1925
1929
|
St.div,
|
|
1926
1930
|
{
|
|
1927
1931
|
className: Ot.indicatorsSubCategory,
|
|
@@ -1929,26 +1933,26 @@ const xn = "_indicatorsSubCategory_1nuug_2", wn = "_list_1nuug_11", Ot = {
|
|
|
1929
1933
|
animate: { height: p ? "auto" : "43px" },
|
|
1930
1934
|
transition: { duration: 0.4 },
|
|
1931
1935
|
children: [
|
|
1932
|
-
/* @__PURE__ */ i("button", { onClick: () => o(
|
|
1936
|
+
/* @__PURE__ */ i("button", { onClick: () => o(c), children: /* @__PURE__ */ h("h3", { style: { color: p ? r : s }, children: [
|
|
1933
1937
|
/* @__PURE__ */ i("span", { style: { color: p ? r : s }, children: p ? "-" : "+" }),
|
|
1934
1938
|
/* @__PURE__ */ i(
|
|
1935
1939
|
"span",
|
|
1936
1940
|
{
|
|
1937
1941
|
style: { color: p ? r : s },
|
|
1938
|
-
children:
|
|
1942
|
+
children: g(n)
|
|
1939
1943
|
}
|
|
1940
1944
|
)
|
|
1941
1945
|
] }) }),
|
|
1942
|
-
|
|
1946
|
+
d && /* @__PURE__ */ i("div", { className: Ot.list, children: d == null ? void 0 : d.map((b, v) => /* @__PURE__ */ i(
|
|
1943
1947
|
Mt,
|
|
1944
1948
|
{
|
|
1945
1949
|
indicator: b,
|
|
1946
1950
|
defaultColor: s,
|
|
1947
1951
|
activeColor: r,
|
|
1948
|
-
activeIndicator:
|
|
1949
|
-
onClickIndicator:
|
|
1952
|
+
activeIndicator: l,
|
|
1953
|
+
onClickIndicator: a,
|
|
1950
1954
|
multiple: u,
|
|
1951
|
-
activeIndicatorType:
|
|
1955
|
+
activeIndicatorType: f,
|
|
1952
1956
|
onChangeType: m
|
|
1953
1957
|
},
|
|
1954
1958
|
"indicator" + v
|
|
@@ -1971,24 +1975,24 @@ d2.propTypes = {
|
|
|
1971
1975
|
};
|
|
1972
1976
|
const u2 = ({
|
|
1973
1977
|
cat: n,
|
|
1974
|
-
id:
|
|
1978
|
+
id: d,
|
|
1975
1979
|
activeColor: s,
|
|
1976
1980
|
defaultColor: r,
|
|
1977
1981
|
onClickCategory: t,
|
|
1978
1982
|
activeCategory: o,
|
|
1979
|
-
activeSubCategory:
|
|
1980
|
-
onClickSubCategory:
|
|
1981
|
-
activeIndicator:
|
|
1983
|
+
activeSubCategory: c,
|
|
1984
|
+
onClickSubCategory: l,
|
|
1985
|
+
activeIndicator: a,
|
|
1982
1986
|
onClickIndicator: u,
|
|
1983
|
-
multiple:
|
|
1987
|
+
multiple: f,
|
|
1984
1988
|
activeIndicatorType: m,
|
|
1985
|
-
onChangeType:
|
|
1989
|
+
onChangeType: g
|
|
1986
1990
|
}) => {
|
|
1987
1991
|
var v;
|
|
1988
1992
|
const { t: p } = A(), [y, b] = I(!1);
|
|
1989
1993
|
return O(() => {
|
|
1990
|
-
b(o ===
|
|
1991
|
-
}, [o,
|
|
1994
|
+
b(o === d);
|
|
1995
|
+
}, [o, d]), /* @__PURE__ */ h(
|
|
1992
1996
|
St.div,
|
|
1993
1997
|
{
|
|
1994
1998
|
className: Xe.indicatorsCategory,
|
|
@@ -2001,7 +2005,7 @@ const u2 = ({
|
|
|
2001
2005
|
marginBottom: y ? "20px" : "0px"
|
|
2002
2006
|
},
|
|
2003
2007
|
children: [
|
|
2004
|
-
/* @__PURE__ */ h("h2", { className: `${Xe.title}`, onClick: () => t(
|
|
2008
|
+
/* @__PURE__ */ h("h2", { className: `${Xe.title}`, onClick: () => t(d), children: [
|
|
2005
2009
|
/* @__PURE__ */ i("span", { className: Xe.plus, style: { color: y ? s : r }, children: y ? "-" : "+" }),
|
|
2006
2010
|
/* @__PURE__ */ i(
|
|
2007
2011
|
"span",
|
|
@@ -2012,23 +2016,23 @@ const u2 = ({
|
|
|
2012
2016
|
)
|
|
2013
2017
|
] }),
|
|
2014
2018
|
n.subcategories ? n.subcategories.map(
|
|
2015
|
-
({ name: _, subcategory: w, indicators: L },
|
|
2019
|
+
({ name: _, subcategory: w, indicators: L }, C) => /* @__PURE__ */ i(
|
|
2016
2020
|
d2,
|
|
2017
2021
|
{
|
|
2018
2022
|
id: w,
|
|
2019
|
-
activeSubCategory:
|
|
2023
|
+
activeSubCategory: c,
|
|
2020
2024
|
subcName: _,
|
|
2021
|
-
onClickSubCategory:
|
|
2022
|
-
activeIndicator:
|
|
2025
|
+
onClickSubCategory: l,
|
|
2026
|
+
activeIndicator: a,
|
|
2023
2027
|
onClickIndicator: u,
|
|
2024
|
-
multiple:
|
|
2028
|
+
multiple: f,
|
|
2025
2029
|
activeColor: s,
|
|
2026
2030
|
defaultColor: r,
|
|
2027
2031
|
indicators: L,
|
|
2028
2032
|
activeIndicatorType: m,
|
|
2029
|
-
onChangeType:
|
|
2033
|
+
onChangeType: g
|
|
2030
2034
|
},
|
|
2031
|
-
`subcKey ${
|
|
2035
|
+
`subcKey ${C}`
|
|
2032
2036
|
)
|
|
2033
2037
|
) : /* @__PURE__ */ i("div", { className: Xe.list, children: (v = n.indicators) == null ? void 0 : v.map((_, w) => /* @__PURE__ */ i(
|
|
2034
2038
|
Mt,
|
|
@@ -2037,11 +2041,11 @@ const u2 = ({
|
|
|
2037
2041
|
values: _.type == "twoUnits" && _.values,
|
|
2038
2042
|
activeColor: s,
|
|
2039
2043
|
defaultColor: r,
|
|
2040
|
-
activeIndicator:
|
|
2044
|
+
activeIndicator: a,
|
|
2041
2045
|
onClickIndicator: u,
|
|
2042
|
-
multiple:
|
|
2046
|
+
multiple: f,
|
|
2043
2047
|
activeIndicatorType: m,
|
|
2044
|
-
onChangeType:
|
|
2048
|
+
onChangeType: g
|
|
2045
2049
|
},
|
|
2046
2050
|
`indicator${w}`
|
|
2047
2051
|
)) })
|
|
@@ -2068,7 +2072,7 @@ const Nn = "_indicatorsList_13b3m_2", kn = "_title_13b3m_6", Rt = {
|
|
|
2068
2072
|
title: kn
|
|
2069
2073
|
}, $n = ({
|
|
2070
2074
|
indicators: n,
|
|
2071
|
-
activeColor:
|
|
2075
|
+
activeColor: d,
|
|
2072
2076
|
defaultColor: s = "#92898A",
|
|
2073
2077
|
// Función que se ejecuta al seleccionar un indicador, recibe el o los ikeys como parametro
|
|
2074
2078
|
onChange: r,
|
|
@@ -2077,29 +2081,29 @@ const Nn = "_indicatorsList_13b3m_2", kn = "_title_13b3m_6", Rt = {
|
|
|
2077
2081
|
// Si multiple es true, debe ser un array de strings, sino un string
|
|
2078
2082
|
defaultValue: o = null,
|
|
2079
2083
|
//si el indicador es tipo "both" cuando se cambia el tipo
|
|
2080
|
-
changeIndType:
|
|
2081
|
-
activeIndicatorType:
|
|
2084
|
+
changeIndType: c,
|
|
2085
|
+
activeIndicatorType: l
|
|
2082
2086
|
}) => {
|
|
2083
|
-
const { t:
|
|
2084
|
-
|
|
2085
|
-
}, v = (
|
|
2086
|
-
|
|
2087
|
-
}, _ = ({ indicator:
|
|
2088
|
-
w(
|
|
2089
|
-
}, w = (
|
|
2087
|
+
const { t: a } = A(), [u, f] = I(), [m, g] = I(), [p, y] = I(), b = (C) => {
|
|
2088
|
+
f(u == C ? null : C);
|
|
2089
|
+
}, v = (C) => {
|
|
2090
|
+
g(m == C ? null : C);
|
|
2091
|
+
}, _ = ({ indicator: C }) => {
|
|
2092
|
+
w(C);
|
|
2093
|
+
}, w = (C) => {
|
|
2090
2094
|
if (!t)
|
|
2091
2095
|
y(
|
|
2092
|
-
(p == null ? void 0 : p.name) ==
|
|
2096
|
+
(p == null ? void 0 : p.name) == C.name ? null : C
|
|
2093
2097
|
);
|
|
2094
2098
|
else {
|
|
2095
2099
|
let N = p && p.length > 0 ? [...p] : [];
|
|
2096
2100
|
y(
|
|
2097
2101
|
N != null && N.some(
|
|
2098
|
-
(x) => x.name ==
|
|
2102
|
+
(x) => x.name == C.name
|
|
2099
2103
|
) ? N.filter(
|
|
2100
|
-
(x) => x.name != String(
|
|
2101
|
-
) : [...N,
|
|
2102
|
-
),
|
|
2104
|
+
(x) => x.name != String(C.name)
|
|
2105
|
+
) : [...N, C]
|
|
2106
|
+
), C.type == "both" && c("cat");
|
|
2103
2107
|
}
|
|
2104
2108
|
};
|
|
2105
2109
|
O(() => {
|
|
@@ -2107,50 +2111,50 @@ const Nn = "_indicatorsList_13b3m_2", kn = "_title_13b3m_6", Rt = {
|
|
|
2107
2111
|
}, [p]), k2(() => {
|
|
2108
2112
|
if (o && !p)
|
|
2109
2113
|
if (t && o && Array.isArray(o)) {
|
|
2110
|
-
let
|
|
2111
|
-
y([...
|
|
2114
|
+
let C = p && p.length > 0 ? [...p] : [];
|
|
2115
|
+
y([...C, ...o]), L(o[0].name);
|
|
2112
2116
|
} else
|
|
2113
2117
|
w(o), L(o.name);
|
|
2114
2118
|
}, []), O(() => {
|
|
2115
2119
|
if (o != p)
|
|
2116
2120
|
if (t && o && Array.isArray(o)) {
|
|
2117
|
-
let
|
|
2118
|
-
y([...
|
|
2121
|
+
let C = p && p.length > 0 ? [...p] : [];
|
|
2122
|
+
y([...C, ...o]), L(o[0].name);
|
|
2119
2123
|
} else
|
|
2120
2124
|
w(o), L(o.name);
|
|
2121
2125
|
}, [o]);
|
|
2122
|
-
const L = (
|
|
2126
|
+
const L = (C) => {
|
|
2123
2127
|
const N = n.find((x) => {
|
|
2124
2128
|
if (x.subcategories) {
|
|
2125
2129
|
let S = x.subcategories.find(
|
|
2126
|
-
($) => $.indicators.find((k) => k.name ==
|
|
2130
|
+
($) => $.indicators.find((k) => k.name == C)
|
|
2127
2131
|
);
|
|
2128
2132
|
if (S)
|
|
2129
|
-
return
|
|
2133
|
+
return g(S.subcategory), S;
|
|
2130
2134
|
} else
|
|
2131
|
-
return x.indicators.some((S) => S.name ==
|
|
2135
|
+
return x.indicators.some((S) => S.name == C);
|
|
2132
2136
|
});
|
|
2133
|
-
N &&
|
|
2137
|
+
N && f(N.category);
|
|
2134
2138
|
};
|
|
2135
2139
|
return /* @__PURE__ */ h("div", { className: Rt.indicatorsList, children: [
|
|
2136
|
-
/* @__PURE__ */ i("h2", { className: Rt.title, style: { color: s }, children:
|
|
2137
|
-
n.map((
|
|
2140
|
+
/* @__PURE__ */ i("h2", { className: Rt.title, style: { color: s }, children: a("indicators.indicators") }),
|
|
2141
|
+
n.map((C, N) => /* @__PURE__ */ i(
|
|
2138
2142
|
u2,
|
|
2139
2143
|
{
|
|
2140
|
-
id:
|
|
2141
|
-
cat:
|
|
2144
|
+
id: C.category,
|
|
2145
|
+
cat: C,
|
|
2142
2146
|
onClickCategory: b,
|
|
2143
2147
|
activeCategory: u,
|
|
2144
2148
|
onClickSubCategory: v,
|
|
2145
2149
|
activeSubCategory: m,
|
|
2146
2150
|
onClickIndicator: _,
|
|
2147
2151
|
activeIndicator: p,
|
|
2148
|
-
activeColor:
|
|
2152
|
+
activeColor: d,
|
|
2149
2153
|
defaultColor: s,
|
|
2150
2154
|
multiple: t,
|
|
2151
2155
|
onChange: r,
|
|
2152
|
-
onChangeType:
|
|
2153
|
-
activeIndicatorType:
|
|
2156
|
+
onChangeType: c,
|
|
2157
|
+
activeIndicatorType: l
|
|
2154
2158
|
},
|
|
2155
2159
|
`categoryKey${N}`
|
|
2156
2160
|
))
|
|
@@ -2173,9 +2177,9 @@ const Sn = "_langSelector_o9enq_2", Ln = "_currentLang_o9enq_14", Mn = "_arrow_o
|
|
|
2173
2177
|
arrow: Mn,
|
|
2174
2178
|
prevImg: Tn,
|
|
2175
2179
|
langMenu: Dn
|
|
2176
|
-
}, Bn = ({ langs: n, arrow:
|
|
2177
|
-
const [r, t] = I(!1), { i18n: o } = A(),
|
|
2178
|
-
o.changeLanguage(
|
|
2180
|
+
}, Bn = ({ langs: n, arrow: d, imgPrev: s }) => {
|
|
2181
|
+
const [r, t] = I(!1), { i18n: o } = A(), c = n.find((a) => a.code == o.language), l = (a) => {
|
|
2182
|
+
o.changeLanguage(a), t(!1);
|
|
2179
2183
|
};
|
|
2180
2184
|
return /* @__PURE__ */ h("div", { className: Me.langSelector, children: [
|
|
2181
2185
|
/* @__PURE__ */ h(
|
|
@@ -2187,19 +2191,19 @@ const Sn = "_langSelector_o9enq_2", Ln = "_currentLang_o9enq_14", Mn = "_arrow_o
|
|
|
2187
2191
|
},
|
|
2188
2192
|
children: [
|
|
2189
2193
|
s && /* @__PURE__ */ i("img", { className: Me.prevImg, src: s }),
|
|
2190
|
-
(
|
|
2191
|
-
/* @__PURE__ */ i("img", { src:
|
|
2194
|
+
(c == null ? void 0 : c.titleSelected) || (c == null ? void 0 : c.title),
|
|
2195
|
+
/* @__PURE__ */ i("img", { src: d, className: Me.arrow })
|
|
2192
2196
|
]
|
|
2193
2197
|
}
|
|
2194
2198
|
),
|
|
2195
|
-
r && /* @__PURE__ */ i("div", { className: Me.langMenu, children: n.map((
|
|
2199
|
+
r && /* @__PURE__ */ i("div", { className: Me.langMenu, children: n.map((a) => /* @__PURE__ */ i(
|
|
2196
2200
|
"button",
|
|
2197
2201
|
{
|
|
2198
|
-
className: (
|
|
2199
|
-
onClick: () => a
|
|
2200
|
-
children:
|
|
2202
|
+
className: (c == null ? void 0 : c.code) == a.code ? Me.active : "",
|
|
2203
|
+
onClick: () => l(a.code),
|
|
2204
|
+
children: a.title
|
|
2201
2205
|
},
|
|
2202
|
-
|
|
2206
|
+
a.code
|
|
2203
2207
|
)) })
|
|
2204
2208
|
] });
|
|
2205
2209
|
};
|
|
@@ -2237,7 +2241,7 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2237
2241
|
//JSON with the styles of the container (optional)
|
|
2238
2242
|
containerStyles: n,
|
|
2239
2243
|
//Title on top of the legend
|
|
2240
|
-
title:
|
|
2244
|
+
title: d,
|
|
2241
2245
|
//Array to display the info behind the title should have: [{title, value}, ...]
|
|
2242
2246
|
infoList: s,
|
|
2243
2247
|
//Array of legend items to display: [{title, categories, absolute}, ...]
|
|
@@ -2247,34 +2251,34 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2247
2251
|
onClickMoreInfo: t,
|
|
2248
2252
|
//If not passed it will read t("moreInformation")
|
|
2249
2253
|
buttonTitle: o,
|
|
2250
|
-
onClickClose:
|
|
2254
|
+
onClickClose: c
|
|
2251
2255
|
}) => {
|
|
2252
|
-
const { t:
|
|
2256
|
+
const { t: l } = A();
|
|
2253
2257
|
return /* @__PURE__ */ h(
|
|
2254
2258
|
"div",
|
|
2255
2259
|
{
|
|
2256
2260
|
style: n ? { ...n } : {},
|
|
2257
2261
|
className: `${K.legendContainer}`,
|
|
2258
2262
|
children: [
|
|
2259
|
-
/* @__PURE__ */ i("button", { className: K.closeButton, onClick:
|
|
2260
|
-
|
|
2263
|
+
/* @__PURE__ */ i("button", { className: K.closeButton, onClick: c }),
|
|
2264
|
+
d && /* @__PURE__ */ i(
|
|
2261
2265
|
"div",
|
|
2262
2266
|
{
|
|
2263
2267
|
className: K.titleContainer,
|
|
2264
2268
|
style: {
|
|
2265
2269
|
marginBottom: (!s || s.length == 0) && "15px"
|
|
2266
2270
|
},
|
|
2267
|
-
children: /* @__PURE__ */ i("h2", { children:
|
|
2271
|
+
children: /* @__PURE__ */ i("h2", { children: d })
|
|
2268
2272
|
}
|
|
2269
2273
|
),
|
|
2270
|
-
s && s.length > 0 && /* @__PURE__ */ i("div", { className: K.infoContainer, children: /* @__PURE__ */ i("ul", { children: s.map(({ title:
|
|
2271
|
-
/* @__PURE__ */ i("h3", { className: K.title, children: `${
|
|
2274
|
+
s && s.length > 0 && /* @__PURE__ */ i("div", { className: K.infoContainer, children: /* @__PURE__ */ i("ul", { children: s.map(({ title: a, value: u }) => /* @__PURE__ */ h("li", { children: [
|
|
2275
|
+
/* @__PURE__ */ i("h3", { className: K.title, children: `${a}:` }),
|
|
2272
2276
|
/* @__PURE__ */ h("span", { className: K.value, children: [
|
|
2273
2277
|
" ",
|
|
2274
2278
|
u
|
|
2275
2279
|
] })
|
|
2276
|
-
] },
|
|
2277
|
-
r && r.length > 0 && r.map((
|
|
2280
|
+
] }, d)) }) }),
|
|
2281
|
+
r && r.length > 0 && r.map((a, u) => /* @__PURE__ */ h("div", { children: [
|
|
2278
2282
|
/* @__PURE__ */ i(
|
|
2279
2283
|
"h3",
|
|
2280
2284
|
{
|
|
@@ -2282,10 +2286,10 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2282
2286
|
style: {
|
|
2283
2287
|
marginTop: s && s.length > 0 && u === 0 ? "30px" : u > 0 ? "20px" : "0px"
|
|
2284
2288
|
},
|
|
2285
|
-
children:
|
|
2289
|
+
children: a.title && /* @__PURE__ */ i(
|
|
2286
2290
|
$t,
|
|
2287
2291
|
{
|
|
2288
|
-
i18nKey:
|
|
2292
|
+
i18nKey: a.title,
|
|
2289
2293
|
components: { sup: /* @__PURE__ */ i("sup", {}) },
|
|
2290
2294
|
shouldUnescape: !0
|
|
2291
2295
|
}
|
|
@@ -2293,35 +2297,35 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2293
2297
|
}
|
|
2294
2298
|
),
|
|
2295
2299
|
/* @__PURE__ */ h("div", { className: K.legendListContainer, children: [
|
|
2296
|
-
|
|
2300
|
+
a.absolute ? /* @__PURE__ */ h("div", { className: K.absoluteValueContainer, children: [
|
|
2297
2301
|
/* @__PURE__ */ i(
|
|
2298
2302
|
"div",
|
|
2299
2303
|
{
|
|
2300
2304
|
className: K.absoluteValueColor,
|
|
2301
2305
|
style: {
|
|
2302
|
-
background: `linear-gradient(to bottom, ${
|
|
2306
|
+
background: `linear-gradient(to bottom, ${a.absolute.maxColor} 0%, ${a.absolute.midColor ? `${a.absolute.midColor} 50%,` : ""} ${a.absolute.minColor} 100%)`
|
|
2303
2307
|
}
|
|
2304
2308
|
}
|
|
2305
2309
|
),
|
|
2306
2310
|
/* @__PURE__ */ h("div", { className: K.absoluteValueText, children: [
|
|
2307
2311
|
/* @__PURE__ */ h("span", { children: [
|
|
2308
|
-
|
|
2312
|
+
a.absolute.maxValue,
|
|
2309
2313
|
" ",
|
|
2310
|
-
a
|
|
2314
|
+
l(a.absolute.unit)
|
|
2311
2315
|
] }),
|
|
2312
|
-
|
|
2313
|
-
|
|
2316
|
+
a.absolute.midValue && /* @__PURE__ */ h("span", { children: [
|
|
2317
|
+
a.absolute.midValue,
|
|
2314
2318
|
" ",
|
|
2315
|
-
a
|
|
2319
|
+
l(a.absolute.unit)
|
|
2316
2320
|
] }),
|
|
2317
2321
|
/* @__PURE__ */ h("span", { children: [
|
|
2318
|
-
|
|
2322
|
+
a.absolute.minValue,
|
|
2319
2323
|
" ",
|
|
2320
|
-
a
|
|
2324
|
+
l(a.absolute.unit)
|
|
2321
2325
|
] })
|
|
2322
2326
|
] })
|
|
2323
|
-
] }) :
|
|
2324
|
-
({ title:
|
|
2327
|
+
] }) : a.categories && a.categories.length > 0 && /* @__PURE__ */ i("div", { className: K.gridContainer, children: a.categories.map(
|
|
2328
|
+
({ title: f, color: m }, g) => /* @__PURE__ */ h(
|
|
2325
2329
|
"div",
|
|
2326
2330
|
{
|
|
2327
2331
|
className: K.elementLegendContainer,
|
|
@@ -2334,29 +2338,29 @@ const Vn = "_legendContainer_4ndr8_3", Fn = "_closeButton_4ndr8_41", An = "_titl
|
|
|
2334
2338
|
}
|
|
2335
2339
|
),
|
|
2336
2340
|
/* @__PURE__ */ h("div", { className: K.titleLegendElement, children: [
|
|
2337
|
-
|
|
2341
|
+
l(f),
|
|
2338
2342
|
" "
|
|
2339
2343
|
] })
|
|
2340
2344
|
]
|
|
2341
2345
|
},
|
|
2342
|
-
|
|
2346
|
+
g
|
|
2343
2347
|
)
|
|
2344
2348
|
) }),
|
|
2345
|
-
|
|
2349
|
+
a.absolute && a.absolute.noDataColor && /* @__PURE__ */ h("div", { className: K.noDataContainer, children: [
|
|
2346
2350
|
/* @__PURE__ */ i(
|
|
2347
2351
|
"div",
|
|
2348
2352
|
{
|
|
2349
2353
|
className: K.noData,
|
|
2350
2354
|
style: {
|
|
2351
|
-
background:
|
|
2355
|
+
background: a.absolute.noDataColor
|
|
2352
2356
|
}
|
|
2353
2357
|
}
|
|
2354
2358
|
),
|
|
2355
|
-
/* @__PURE__ */ i("div", { className: K.absoluteValueText, children: /* @__PURE__ */ i("span", { children: a
|
|
2359
|
+
/* @__PURE__ */ i("div", { className: K.absoluteValueText, children: /* @__PURE__ */ i("span", { children: l(a.absolute.noDataText) }) })
|
|
2356
2360
|
] })
|
|
2357
2361
|
] })
|
|
2358
2362
|
] }, u)),
|
|
2359
|
-
t && /* @__PURE__ */ i("button", { className: K.moreInfoContainer, onClick: t, children: o ||
|
|
2363
|
+
t && /* @__PURE__ */ i("button", { className: K.moreInfoContainer, onClick: t, children: o || l("moreInformation") })
|
|
2360
2364
|
]
|
|
2361
2365
|
}
|
|
2362
2366
|
);
|
|
@@ -2398,8 +2402,8 @@ Un.propTypes = {
|
|
|
2398
2402
|
};
|
|
2399
2403
|
const Gn = "_logo_1ewa6_2", It = {
|
|
2400
2404
|
logo: Gn
|
|
2401
|
-
}, Xn = ({ src: n, alt:
|
|
2402
|
-
const { t: r } = A(), t = /* @__PURE__ */ i("img", { src: n, alt: r(
|
|
2405
|
+
}, Xn = ({ src: n, alt: d, href: s }) => {
|
|
2406
|
+
const { t: r } = A(), t = /* @__PURE__ */ i("img", { src: n, alt: r(d) });
|
|
2403
2407
|
return s ? /* @__PURE__ */ i("div", { className: It.logo, children: /* @__PURE__ */ i("a", { href: s, children: t }) }) : /* @__PURE__ */ i("div", { className: It.logo, children: t });
|
|
2404
2408
|
};
|
|
2405
2409
|
Xn.propTypes = {
|
|
@@ -2414,18 +2418,18 @@ const Qn = "_mapContainer_84pkf_2", Jn = {
|
|
|
2414
2418
|
L2.accessToken = "pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";
|
|
2415
2419
|
const Yn = ({
|
|
2416
2420
|
initialView: n = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
|
|
2417
|
-
maxZoom:
|
|
2421
|
+
maxZoom: d = 17,
|
|
2418
2422
|
minZoom: s = 8,
|
|
2419
2423
|
mapStyle: r,
|
|
2420
2424
|
firstSymbolLayer: t,
|
|
2421
2425
|
cssProps: o = "",
|
|
2422
|
-
onClick:
|
|
2423
|
-
interactiveLayers:
|
|
2424
|
-
popUp:
|
|
2426
|
+
onClick: c = "",
|
|
2427
|
+
interactiveLayers: l = [],
|
|
2428
|
+
popUp: a = !1,
|
|
2425
2429
|
sources: u = [],
|
|
2426
|
-
layers:
|
|
2430
|
+
layers: f = []
|
|
2427
2431
|
}) => {
|
|
2428
|
-
const m = Y(), [
|
|
2432
|
+
const m = Y(), [g, p] = I(null), y = M2((b) => b.mapState.showTexts);
|
|
2429
2433
|
return O(() => {
|
|
2430
2434
|
if (m.current) {
|
|
2431
2435
|
const b = m.current.getMap();
|
|
@@ -2439,17 +2443,17 @@ const Yn = ({
|
|
|
2439
2443
|
initialViewState: n,
|
|
2440
2444
|
ref: m,
|
|
2441
2445
|
hash: !1,
|
|
2442
|
-
maxZoom:
|
|
2446
|
+
maxZoom: d,
|
|
2443
2447
|
minZoom: s,
|
|
2444
2448
|
mapStyle: r,
|
|
2445
|
-
onClick:
|
|
2446
|
-
interactiveLayerIds:
|
|
2449
|
+
onClick: c,
|
|
2450
|
+
interactiveLayerIds: l,
|
|
2447
2451
|
children: [
|
|
2448
2452
|
u.length && u.map((b, v) => /* @__PURE__ */ i(
|
|
2449
2453
|
D2,
|
|
2450
2454
|
{
|
|
2451
2455
|
...b,
|
|
2452
|
-
children:
|
|
2456
|
+
children: f.length && f.map((_, w) => {
|
|
2453
2457
|
if (_.sourceId == b.id) return /* @__PURE__ */ i(
|
|
2454
2458
|
B2,
|
|
2455
2459
|
{
|
|
@@ -2463,14 +2467,14 @@ const Yn = ({
|
|
|
2463
2467
|
v
|
|
2464
2468
|
)),
|
|
2465
2469
|
/* @__PURE__ */ i(V2, { position: "bottom-right", visualizePitch: !0 }),
|
|
2466
|
-
|
|
2470
|
+
a && g && /* @__PURE__ */ i(
|
|
2467
2471
|
F2,
|
|
2468
2472
|
{
|
|
2469
|
-
longitude:
|
|
2470
|
-
latitude:
|
|
2471
|
-
anchor:
|
|
2473
|
+
longitude: a.longitude,
|
|
2474
|
+
latitude: a.latitude,
|
|
2475
|
+
anchor: a.anchor,
|
|
2472
2476
|
onClose: () => p(null),
|
|
2473
|
-
children:
|
|
2477
|
+
children: a.content
|
|
2474
2478
|
}
|
|
2475
2479
|
)
|
|
2476
2480
|
]
|
|
@@ -2528,32 +2532,32 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2528
2532
|
FeaturePopUp: ni,
|
|
2529
2533
|
title: ii
|
|
2530
2534
|
}, si = ({ props: n }) => {
|
|
2531
|
-
const { t:
|
|
2535
|
+
const { t: d } = A();
|
|
2532
2536
|
return /* @__PURE__ */ i("div", { className: Et.FeaturePopUp, children: n.map((s) => /* @__PURE__ */ h("p", { children: [
|
|
2533
2537
|
/* @__PURE__ */ h("span", { className: Et.title, children: [
|
|
2534
2538
|
/* @__PURE__ */ i($t, { i18nKey: s.name, components: { sup: /* @__PURE__ */ i("sup", {}) }, shouldUnescape: !0 }),
|
|
2535
2539
|
":"
|
|
2536
2540
|
] }),
|
|
2537
|
-
isNaN(s.value) ? /* @__PURE__ */ i(et, { children:
|
|
2541
|
+
isNaN(s.value) ? /* @__PURE__ */ i(et, { children: d(s.value) }) : /* @__PURE__ */ h(et, { children: [
|
|
2538
2542
|
s.value.toLocaleString("de", { maximumFractionDigits: 2 }),
|
|
2539
2543
|
" ",
|
|
2540
|
-
|
|
2544
|
+
d(s.unit)
|
|
2541
2545
|
] })
|
|
2542
2546
|
] })) });
|
|
2543
2547
|
}, ri = ({
|
|
2544
2548
|
initialView: n = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
|
|
2545
|
-
maxZoom:
|
|
2549
|
+
maxZoom: d = 17,
|
|
2546
2550
|
minZoom: s = 8,
|
|
2547
2551
|
mapStyle: r,
|
|
2548
2552
|
firstSymbolLayer: t,
|
|
2549
2553
|
cssProps: o = {},
|
|
2550
|
-
onClick:
|
|
2551
|
-
interactiveLayers:
|
|
2552
|
-
sources:
|
|
2554
|
+
onClick: c = "",
|
|
2555
|
+
interactiveLayers: l = [],
|
|
2556
|
+
sources: a = [],
|
|
2553
2557
|
layers: u = [],
|
|
2554
|
-
popUpParams:
|
|
2558
|
+
popUpParams: f,
|
|
2555
2559
|
onClosePopUp: m,
|
|
2556
|
-
showTexts:
|
|
2560
|
+
showTexts: g,
|
|
2557
2561
|
hash: p = !1
|
|
2558
2562
|
}) => {
|
|
2559
2563
|
const y = Y();
|
|
@@ -2561,10 +2565,10 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2561
2565
|
if (y.current) {
|
|
2562
2566
|
const b = y.current.getMap();
|
|
2563
2567
|
b.getStyle().layers.map((_) => {
|
|
2564
|
-
_.type == "symbol" && _.id != "professionals" && (
|
|
2568
|
+
_.type == "symbol" && _.id != "professionals" && (g ? b.setLayoutProperty(_.id, "visibility", "visible") : b.setLayoutProperty(_.id, "visibility", "none"));
|
|
2565
2569
|
});
|
|
2566
2570
|
}
|
|
2567
|
-
}, [
|
|
2571
|
+
}, [g]), O(() => {
|
|
2568
2572
|
let b = new A2();
|
|
2569
2573
|
return ut.addProtocol("pmtiles", b.tile), () => {
|
|
2570
2574
|
ut.removeProtocol("pmtiles");
|
|
@@ -2576,13 +2580,13 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2576
2580
|
initialViewState: n,
|
|
2577
2581
|
ref: y,
|
|
2578
2582
|
hash: p,
|
|
2579
|
-
maxZoom:
|
|
2583
|
+
maxZoom: d,
|
|
2580
2584
|
minZoom: s,
|
|
2581
2585
|
mapStyle: r,
|
|
2582
|
-
onClick:
|
|
2583
|
-
interactiveLayerIds:
|
|
2586
|
+
onClick: c,
|
|
2587
|
+
interactiveLayerIds: l,
|
|
2584
2588
|
children: [
|
|
2585
|
-
|
|
2589
|
+
a.length && a.map((b, v) => /* @__PURE__ */ i(
|
|
2586
2590
|
R2,
|
|
2587
2591
|
{
|
|
2588
2592
|
...b,
|
|
@@ -2604,13 +2608,13 @@ const ei = "_mapContainer_b0pyr_3", ti = {
|
|
|
2604
2608
|
v
|
|
2605
2609
|
)),
|
|
2606
2610
|
/* @__PURE__ */ i(E2, { position: "bottom-right", visualizePitch: !0 }),
|
|
2607
|
-
|
|
2611
|
+
f && /* @__PURE__ */ i(
|
|
2608
2612
|
q2,
|
|
2609
2613
|
{
|
|
2610
|
-
longitude:
|
|
2611
|
-
latitude:
|
|
2614
|
+
longitude: f.lng,
|
|
2615
|
+
latitude: f.lat,
|
|
2612
2616
|
onClose: m,
|
|
2613
|
-
children: /* @__PURE__ */ i(si, { props:
|
|
2617
|
+
children: /* @__PURE__ */ i(si, { props: f.props })
|
|
2614
2618
|
}
|
|
2615
2619
|
)
|
|
2616
2620
|
]
|
|
@@ -2670,14 +2674,14 @@ const oi = "_sectionBar_yf2vy_2", ai = "_leftContent_yf2vy_14", li = "_textConta
|
|
|
2670
2674
|
rightContent: ui
|
|
2671
2675
|
}, pi = ({
|
|
2672
2676
|
leftIcon: n,
|
|
2673
|
-
title:
|
|
2677
|
+
title: d,
|
|
2674
2678
|
subtitle: s,
|
|
2675
2679
|
rightContent: r,
|
|
2676
2680
|
mainColor: t,
|
|
2677
2681
|
width: o,
|
|
2678
|
-
titleColor:
|
|
2679
|
-
subTitleColor:
|
|
2680
|
-
borderTop:
|
|
2682
|
+
titleColor: c = "#605b56",
|
|
2683
|
+
subTitleColor: l = "#605b56",
|
|
2684
|
+
borderTop: a = !1
|
|
2681
2685
|
}) => {
|
|
2682
2686
|
const { t: u } = A();
|
|
2683
2687
|
return /* @__PURE__ */ h(
|
|
@@ -2686,14 +2690,14 @@ const oi = "_sectionBar_yf2vy_2", ai = "_leftContent_yf2vy_14", li = "_textConta
|
|
|
2686
2690
|
className: ve.sectionBar,
|
|
2687
2691
|
style: {
|
|
2688
2692
|
width: o && o,
|
|
2689
|
-
borderTop:
|
|
2693
|
+
borderTop: a ? "1px solid #000" : "0px"
|
|
2690
2694
|
},
|
|
2691
2695
|
children: [
|
|
2692
2696
|
/* @__PURE__ */ h("div", { className: ve.leftContent, children: [
|
|
2693
2697
|
n && /* @__PURE__ */ i("img", { src: n, alt: "Icono", className: ve.icon }),
|
|
2694
2698
|
/* @__PURE__ */ h("div", { className: ve.textContainer, children: [
|
|
2695
|
-
/* @__PURE__ */ i("div", { className: ve.title, style: { color:
|
|
2696
|
-
s && /* @__PURE__ */ i("div", { className: ve.subtitle, style: { color:
|
|
2699
|
+
/* @__PURE__ */ i("div", { className: ve.title, style: { color: c }, children: u(d) }),
|
|
2700
|
+
s && /* @__PURE__ */ i("div", { className: ve.subtitle, style: { color: l }, children: s })
|
|
2697
2701
|
] })
|
|
2698
2702
|
] }),
|
|
2699
2703
|
/* @__PURE__ */ i("div", { className: ve.rightContent, children: r })
|
|
@@ -2726,20 +2730,20 @@ const hi = z2({
|
|
|
2726
2730
|
activeIndicatorUnit: null
|
|
2727
2731
|
},
|
|
2728
2732
|
reducers: {
|
|
2729
|
-
setShowTexts: (n,
|
|
2730
|
-
n.showTexts =
|
|
2733
|
+
setShowTexts: (n, d) => {
|
|
2734
|
+
n.showTexts = d.payload;
|
|
2731
2735
|
},
|
|
2732
|
-
setYear: (n,
|
|
2733
|
-
n.sliderSelectedYear =
|
|
2736
|
+
setYear: (n, d) => {
|
|
2737
|
+
n.sliderSelectedYear = d.payload;
|
|
2734
2738
|
},
|
|
2735
|
-
setActiveIndicatorKey: (n,
|
|
2736
|
-
n.activeIndicatorKey =
|
|
2739
|
+
setActiveIndicatorKey: (n, d) => {
|
|
2740
|
+
n.activeIndicatorKey = d.payload;
|
|
2737
2741
|
},
|
|
2738
|
-
setActiveIndicatorType: (n,
|
|
2739
|
-
n.activeIndicatorType =
|
|
2742
|
+
setActiveIndicatorType: (n, d) => {
|
|
2743
|
+
n.activeIndicatorType = d.payload;
|
|
2740
2744
|
},
|
|
2741
|
-
setActiveIndicatorUnit: (n,
|
|
2742
|
-
n.activeIndicatorUnit =
|
|
2745
|
+
setActiveIndicatorUnit: (n, d) => {
|
|
2746
|
+
n.activeIndicatorUnit = d.payload;
|
|
2743
2747
|
}
|
|
2744
2748
|
}
|
|
2745
2749
|
}), { 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 = {
|
|
@@ -2749,47 +2753,47 @@ const hi = z2({
|
|
|
2749
2753
|
sliderResults: bi
|
|
2750
2754
|
}, _i = ({
|
|
2751
2755
|
onResults: n = !1,
|
|
2752
|
-
defaultYear:
|
|
2756
|
+
defaultYear: d = 2025,
|
|
2753
2757
|
firstYear: s = 2025,
|
|
2754
2758
|
lastYear: r = 2050,
|
|
2755
2759
|
marcas: t = null,
|
|
2756
2760
|
zIndex: o = 10,
|
|
2757
|
-
rightBarOpen:
|
|
2761
|
+
rightBarOpen: c = !1,
|
|
2758
2762
|
//If this is false, the slider will stop
|
|
2759
|
-
conditionToBeRuning:
|
|
2760
|
-
onChange:
|
|
2763
|
+
conditionToBeRuning: l = null,
|
|
2764
|
+
onChange: a = (u) => {
|
|
2761
2765
|
console.log("year changed to ", u);
|
|
2762
2766
|
}
|
|
2763
2767
|
}) => {
|
|
2764
|
-
const
|
|
2768
|
+
const f = t || ((C, N) => {
|
|
2765
2769
|
const x = [];
|
|
2766
|
-
x.push({ label: "", value:
|
|
2767
|
-
const S = Math.ceil(
|
|
2770
|
+
x.push({ label: "", value: C });
|
|
2771
|
+
const S = Math.ceil(C / 10) * 10;
|
|
2768
2772
|
for (let $ = S; $ < N; $ += 10)
|
|
2769
2773
|
x.push({ label: "", value: $ });
|
|
2770
2774
|
return x[x.length - 1].value !== N && x.push({ label: "", value: N }), x;
|
|
2771
|
-
})(s, r), [m,
|
|
2775
|
+
})(s, r), [m, g] = I(d);
|
|
2772
2776
|
O(() => {
|
|
2773
|
-
|
|
2774
|
-
}, [
|
|
2775
|
-
const p = (
|
|
2776
|
-
|
|
2777
|
+
g(d);
|
|
2778
|
+
}, [d]);
|
|
2779
|
+
const p = (C, N) => {
|
|
2780
|
+
g(N), a(N);
|
|
2777
2781
|
}, [y, b] = I(!1);
|
|
2778
2782
|
O(() => {
|
|
2779
|
-
|
|
2780
|
-
}, [
|
|
2781
|
-
|
|
2782
|
-
}, [
|
|
2783
|
+
d && console.log("defaultYear changed:", d), d && g(d);
|
|
2784
|
+
}, [d]), O(() => {
|
|
2785
|
+
l === !1 && b(!1);
|
|
2786
|
+
}, [l]);
|
|
2783
2787
|
const v = () => {
|
|
2784
2788
|
b(!0);
|
|
2785
2789
|
}, _ = () => {
|
|
2786
2790
|
b(!1);
|
|
2787
2791
|
};
|
|
2788
|
-
((
|
|
2792
|
+
((C, N, x = []) => {
|
|
2789
2793
|
const S = Y();
|
|
2790
2794
|
O(() => {
|
|
2791
|
-
S.current =
|
|
2792
|
-
}, [
|
|
2795
|
+
S.current = C;
|
|
2796
|
+
}, [C]), O(() => {
|
|
2793
2797
|
function $() {
|
|
2794
2798
|
S.current();
|
|
2795
2799
|
}
|
|
@@ -2800,9 +2804,9 @@ const hi = z2({
|
|
|
2800
2804
|
}, [N, ...x]);
|
|
2801
2805
|
})(
|
|
2802
2806
|
() => {
|
|
2803
|
-
y &&
|
|
2804
|
-
const N =
|
|
2805
|
-
return N > r ? (
|
|
2807
|
+
y && g((C) => {
|
|
2808
|
+
const N = C + 1;
|
|
2809
|
+
return N > r ? (a(s), s) : (a(N), N);
|
|
2806
2810
|
});
|
|
2807
2811
|
},
|
|
2808
2812
|
1e3,
|
|
@@ -2835,7 +2839,7 @@ const hi = z2({
|
|
|
2835
2839
|
j2,
|
|
2836
2840
|
{
|
|
2837
2841
|
sx: { width: 400 },
|
|
2838
|
-
className: `${n ? Oe.sliderResults : Oe.slider} ${
|
|
2842
|
+
className: `${n ? Oe.sliderResults : Oe.slider} ${c ? Oe.sliderOpen : ""}`,
|
|
2839
2843
|
style: { zIndex: o },
|
|
2840
2844
|
children: [
|
|
2841
2845
|
s,
|
|
@@ -2846,7 +2850,7 @@ const hi = z2({
|
|
|
2846
2850
|
value: m,
|
|
2847
2851
|
valueLabelDisplay: "on",
|
|
2848
2852
|
step: 1,
|
|
2849
|
-
marks:
|
|
2853
|
+
marks: f,
|
|
2850
2854
|
min: s,
|
|
2851
2855
|
max: r,
|
|
2852
2856
|
onChange: p,
|
|
@@ -2882,7 +2886,7 @@ const vi = "_TopNavMenuContainer_12mp4_2", xi = "_topNavOptions_12mp4_13", wi =
|
|
|
2882
2886
|
active: wi
|
|
2883
2887
|
}, Ni = ({
|
|
2884
2888
|
options: n = [],
|
|
2885
|
-
containerStyles:
|
|
2889
|
+
containerStyles: d,
|
|
2886
2890
|
borderColor: s = "red",
|
|
2887
2891
|
textColor: r = "white",
|
|
2888
2892
|
onChangeNavLink: t = (o) => {
|
|
@@ -2890,19 +2894,19 @@ const vi = "_TopNavMenuContainer_12mp4_2", xi = "_topNavOptions_12mp4_13", wi =
|
|
|
2890
2894
|
}
|
|
2891
2895
|
}) => {
|
|
2892
2896
|
const { t: o } = A();
|
|
2893
|
-
return /* @__PURE__ */ i("div", { className: mt.TopNavMenuContainer, style: { ...
|
|
2897
|
+
return /* @__PURE__ */ i("div", { className: mt.TopNavMenuContainer, style: { ...d }, children: n.map((c, l) => /* @__PURE__ */ i(
|
|
2894
2898
|
t2,
|
|
2895
2899
|
{
|
|
2896
|
-
to:
|
|
2897
|
-
className: ({ isActive:
|
|
2898
|
-
onClick: () => t(
|
|
2899
|
-
style: ({ isActive:
|
|
2900
|
+
to: c.url,
|
|
2901
|
+
className: ({ isActive: a }) => `${mt.topNavOptions} ${a ? mt.active : ""} `,
|
|
2902
|
+
onClick: () => t(c.url),
|
|
2903
|
+
style: ({ isActive: a }) => ({
|
|
2900
2904
|
color: r,
|
|
2901
|
-
borderBottom:
|
|
2905
|
+
borderBottom: a ? `5px solid ${s}` : "5px solid transparent"
|
|
2902
2906
|
}),
|
|
2903
|
-
children: o(
|
|
2907
|
+
children: o(c.name)
|
|
2904
2908
|
},
|
|
2905
|
-
|
|
2909
|
+
l
|
|
2906
2910
|
)) });
|
|
2907
2911
|
};
|
|
2908
2912
|
Ni.propTypes = {
|
|
@@ -2919,26 +2923,26 @@ const ki = "_LogInButton_1vxj5_2", $i = {
|
|
|
2919
2923
|
LogInButton: ki
|
|
2920
2924
|
}, Si = ({
|
|
2921
2925
|
cssClass: n,
|
|
2922
|
-
notLoggedInLabel:
|
|
2926
|
+
notLoggedInLabel: d = "Log in",
|
|
2923
2927
|
loggedInLabel: s = "Log out",
|
|
2924
2928
|
containerStyles: r,
|
|
2925
2929
|
userName: t = "",
|
|
2926
2930
|
isLoggedIn: o = !1,
|
|
2927
|
-
onClickLogIn:
|
|
2931
|
+
onClickLogIn: c = () => {
|
|
2928
2932
|
console.log("Login clicked");
|
|
2929
2933
|
},
|
|
2930
|
-
onClickLogOut:
|
|
2934
|
+
onClickLogOut: l = () => {
|
|
2931
2935
|
console.log("Logout clicked");
|
|
2932
2936
|
}
|
|
2933
2937
|
}) => {
|
|
2934
|
-
const { t:
|
|
2938
|
+
const { t: a } = A();
|
|
2935
2939
|
return /* @__PURE__ */ i(
|
|
2936
2940
|
"div",
|
|
2937
2941
|
{
|
|
2938
2942
|
style: { ...r },
|
|
2939
2943
|
className: `${$i.LogInButton} link ${n}`,
|
|
2940
|
-
onClick: o ?
|
|
2941
|
-
children: o ? t ||
|
|
2944
|
+
onClick: o ? l : c,
|
|
2945
|
+
children: o ? t || a(s) : a(d)
|
|
2942
2946
|
}
|
|
2943
2947
|
);
|
|
2944
2948
|
};
|
|
@@ -2974,20 +2978,20 @@ const Li = "_elementSelector_1ox68_2", Mi = "_header_1ox68_14", Ti = "_nameDateC
|
|
|
2974
2978
|
var qt;
|
|
2975
2979
|
function Nt() {
|
|
2976
2980
|
return Nt = Object.assign ? Object.assign.bind() : function(n) {
|
|
2977
|
-
for (var
|
|
2978
|
-
var s = arguments[
|
|
2981
|
+
for (var d = 1; d < arguments.length; d++) {
|
|
2982
|
+
var s = arguments[d];
|
|
2979
2983
|
for (var r in s) ({}).hasOwnProperty.call(s, r) && (n[r] = s[r]);
|
|
2980
2984
|
}
|
|
2981
2985
|
return n;
|
|
2982
2986
|
}, Nt.apply(null, arguments);
|
|
2983
2987
|
}
|
|
2984
|
-
var Ji = function(
|
|
2988
|
+
var Ji = function(d) {
|
|
2985
2989
|
return /* @__PURE__ */ Ve.createElement("svg", Nt({
|
|
2986
2990
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2987
2991
|
width: 26,
|
|
2988
2992
|
height: 14,
|
|
2989
2993
|
fill: "none"
|
|
2990
|
-
},
|
|
2994
|
+
}, d), qt || (qt = /* @__PURE__ */ Ve.createElement("g", {
|
|
2991
2995
|
fill: "currentColor"
|
|
2992
2996
|
}, /* @__PURE__ */ Ve.createElement("path", {
|
|
2993
2997
|
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"
|
|
@@ -2997,34 +3001,34 @@ var Ji = function(c) {
|
|
|
2997
3001
|
};
|
|
2998
3002
|
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 = ({
|
|
2999
3003
|
listelement: n,
|
|
3000
|
-
onClickElement:
|
|
3004
|
+
onClickElement: d,
|
|
3001
3005
|
isActive: s,
|
|
3002
3006
|
activeColor: r,
|
|
3003
3007
|
fontColor: t,
|
|
3004
3008
|
moreInfo: o,
|
|
3005
|
-
columns:
|
|
3006
|
-
elementButtons:
|
|
3007
|
-
processTooltip:
|
|
3009
|
+
columns: c,
|
|
3010
|
+
elementButtons: l,
|
|
3011
|
+
processTooltip: a,
|
|
3008
3012
|
defaultTooltip: u,
|
|
3009
|
-
showEye:
|
|
3013
|
+
showEye: f = !0
|
|
3010
3014
|
}) => {
|
|
3011
|
-
const { name: m, created_at:
|
|
3015
|
+
const { name: m, created_at: g, id: p, isBeingProcessed: y } = n, [b, v] = I(!1), { t: _ } = A();
|
|
3012
3016
|
O(() => {
|
|
3013
|
-
console.log("elementButtons: ",
|
|
3014
|
-
}, [
|
|
3015
|
-
const w =
|
|
3017
|
+
console.log("elementButtons: ", l);
|
|
3018
|
+
}, [l]);
|
|
3019
|
+
const w = l && l.edit && !n.is_default && !n.is_baseline, L = l && l.trash && !n.is_default && !n.is_baseline;
|
|
3016
3020
|
return /* @__PURE__ */ h(
|
|
3017
3021
|
"div",
|
|
3018
3022
|
{
|
|
3019
3023
|
className: ne.listElement,
|
|
3020
3024
|
style: { borderBottom: `1px solid ${t}` },
|
|
3021
3025
|
children: [
|
|
3022
|
-
/* @__PURE__ */ i("div", { className: ne.elementNameDate, onClick: () =>
|
|
3026
|
+
/* @__PURE__ */ i("div", { className: ne.elementNameDate, onClick: () => d(p), children: Object.keys(c).map((C) => C === "name" ? /* @__PURE__ */ i("div", { className: ne.elementNameContainer, children: /* @__PURE__ */ h(
|
|
3023
3027
|
"div",
|
|
3024
3028
|
{
|
|
3025
|
-
className: `${ne.elementName} ${
|
|
3029
|
+
className: `${ne.elementName} ${f && ne.nameAndEye}`,
|
|
3026
3030
|
children: [
|
|
3027
|
-
|
|
3031
|
+
f && (s ? /* @__PURE__ */ i(
|
|
3028
3032
|
Ji,
|
|
3029
3033
|
{
|
|
3030
3034
|
style: { color: r, marginRight: 9 }
|
|
@@ -3040,75 +3044,75 @@ const Yi = "data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%20
|
|
|
3040
3044
|
/* @__PURE__ */ i("span", { style: { color: s ? r : t }, children: m })
|
|
3041
3045
|
]
|
|
3042
3046
|
}
|
|
3043
|
-
) }) :
|
|
3047
|
+
) }) : C == "data" ? /* @__PURE__ */ i("div", { className: ne.elementDate, children: g ? new Date(g).toLocaleDateString() : "" }) : /* @__PURE__ */ i("div", { className: ne.elementDate, children: n[C] })) }),
|
|
3044
3048
|
/* @__PURE__ */ h("div", { className: ne.elementButtons, children: [
|
|
3045
3049
|
n.processing && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3046
3050
|
/* @__PURE__ */ i("img", { src: Ui }),
|
|
3047
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3051
|
+
/* @__PURE__ */ i(pe, { text: a, position: "left" })
|
|
3048
3052
|
] }),
|
|
3049
|
-
|
|
3053
|
+
l.filter && !n.is_default && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3050
3054
|
/* @__PURE__ */ i(
|
|
3051
3055
|
"button",
|
|
3052
3056
|
{
|
|
3053
|
-
onClick: () =>
|
|
3054
|
-
disabled:
|
|
3057
|
+
onClick: () => l.filter.onclick(n),
|
|
3058
|
+
disabled: l.filter.disabled || !1,
|
|
3055
3059
|
children: /* @__PURE__ */ i("img", { src: Ki })
|
|
3056
3060
|
}
|
|
3057
3061
|
),
|
|
3058
3062
|
/* @__PURE__ */ i(
|
|
3059
3063
|
pe,
|
|
3060
3064
|
{
|
|
3061
|
-
text:
|
|
3065
|
+
text: l.filter.tooltiptext,
|
|
3062
3066
|
position: "left"
|
|
3063
3067
|
}
|
|
3064
3068
|
)
|
|
3065
3069
|
] }),
|
|
3066
|
-
|
|
3070
|
+
l.copy && !n.is_default && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3067
3071
|
/* @__PURE__ */ i(
|
|
3068
3072
|
"button",
|
|
3069
3073
|
{
|
|
3070
|
-
onClick: () =>
|
|
3071
|
-
disabled:
|
|
3074
|
+
onClick: () => l.copy.onclick(n),
|
|
3075
|
+
disabled: l.copy.disabled || !1,
|
|
3072
3076
|
children: /* @__PURE__ */ i("img", { src: Wi })
|
|
3073
3077
|
}
|
|
3074
3078
|
),
|
|
3075
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3079
|
+
/* @__PURE__ */ i(pe, { text: l.copy.tooltiptext, position: "left" })
|
|
3076
3080
|
] }),
|
|
3077
3081
|
w && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3078
3082
|
/* @__PURE__ */ i(
|
|
3079
3083
|
"button",
|
|
3080
3084
|
{
|
|
3081
|
-
onClick: () =>
|
|
3082
|
-
disabled:
|
|
3085
|
+
onClick: () => l.edit.onclick(n),
|
|
3086
|
+
disabled: l.edit.disabled || !1,
|
|
3083
3087
|
children: /* @__PURE__ */ i("img", { src: Xi })
|
|
3084
3088
|
}
|
|
3085
3089
|
),
|
|
3086
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3090
|
+
/* @__PURE__ */ i(pe, { text: l.edit.tooltiptext, position: "left" })
|
|
3087
3091
|
] }),
|
|
3088
|
-
|
|
3092
|
+
l.info && n.is_default && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3089
3093
|
/* @__PURE__ */ i(
|
|
3090
3094
|
"button",
|
|
3091
3095
|
{
|
|
3092
|
-
onClick: () =>
|
|
3093
|
-
disabled:
|
|
3096
|
+
onClick: () => l.info.onclick(n),
|
|
3097
|
+
disabled: l.info.disabled || !1,
|
|
3094
3098
|
children: /* @__PURE__ */ i("img", { src: Qi })
|
|
3095
3099
|
}
|
|
3096
3100
|
),
|
|
3097
|
-
/* @__PURE__ */ i(pe, { text:
|
|
3101
|
+
/* @__PURE__ */ i(pe, { text: l.info.tooltiptext, position: "left" })
|
|
3098
3102
|
] }),
|
|
3099
3103
|
L && /* @__PURE__ */ h("div", { className: "tooltip-parent", children: [
|
|
3100
3104
|
/* @__PURE__ */ i(
|
|
3101
3105
|
"button",
|
|
3102
3106
|
{
|
|
3103
|
-
onClick: () =>
|
|
3104
|
-
disabled:
|
|
3107
|
+
onClick: () => l.trash.onclick(n),
|
|
3108
|
+
disabled: l.trash.disabled || !1,
|
|
3105
3109
|
children: /* @__PURE__ */ i("img", { src: Hi })
|
|
3106
3110
|
}
|
|
3107
3111
|
),
|
|
3108
3112
|
/* @__PURE__ */ i(
|
|
3109
3113
|
pe,
|
|
3110
3114
|
{
|
|
3111
|
-
text:
|
|
3115
|
+
text: l.trash.tooltiptext,
|
|
3112
3116
|
position: "left"
|
|
3113
3117
|
}
|
|
3114
3118
|
)
|
|
@@ -3175,23 +3179,23 @@ p2.propTypes = {
|
|
|
3175
3179
|
};
|
|
3176
3180
|
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 = ({
|
|
3177
3181
|
elementsList: n,
|
|
3178
|
-
activeElementId:
|
|
3182
|
+
activeElementId: d,
|
|
3179
3183
|
fontColor: s = "#605B56",
|
|
3180
3184
|
activeColor: r,
|
|
3181
3185
|
buttonContainerStyles: t = {},
|
|
3182
3186
|
containerStyles: o = {},
|
|
3183
|
-
newElementButton:
|
|
3187
|
+
newElementButton: c,
|
|
3184
3188
|
//{label: 'text', onClick: function(), disabled}/null
|
|
3185
|
-
onClickElement:
|
|
3186
|
-
columns:
|
|
3189
|
+
onClickElement: l = (y) => console.log(`OnCLickElement: ${y}`),
|
|
3190
|
+
columns: a,
|
|
3187
3191
|
// {'name': nomLabel/null, 'data':dataLabel/null, 'ambit':ambitLabel/null, 'escenari':escenariLabel/null}
|
|
3188
3192
|
elementButtons: u,
|
|
3189
3193
|
//{'copy': {onClick:onClickCopy, tooltipText:'text'}/null, 'filter': {onClick:onClickFilter, tooltipText:'text'}/null, 'trash':{onClick:onClickTrash, tooltipText:'text'}/null}
|
|
3190
|
-
moreInfo:
|
|
3194
|
+
moreInfo: f = !1,
|
|
3191
3195
|
//{label: 'x'}
|
|
3192
3196
|
processTooltip: m,
|
|
3193
3197
|
//texto para el tooltip del simbolo "En proceso"
|
|
3194
|
-
defaultTooltip:
|
|
3198
|
+
defaultTooltip: g,
|
|
3195
3199
|
//texto para el tooltip del símbolo de candado para los elementos default
|
|
3196
3200
|
showEye: p = !0
|
|
3197
3201
|
}) => {
|
|
@@ -3199,21 +3203,21 @@ const zt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
3199
3203
|
O(() => {
|
|
3200
3204
|
n && v(n);
|
|
3201
3205
|
}, [n]);
|
|
3202
|
-
const _ = (
|
|
3203
|
-
if (typeof
|
|
3204
|
-
if (/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(
|
|
3205
|
-
return new Date(
|
|
3206
|
-
const N = /^(\d{2})[-/.]\s*(\d{2})[-/.]\s*(\d{4})$/.exec(
|
|
3206
|
+
const _ = (C) => {
|
|
3207
|
+
if (typeof C != "string") return null;
|
|
3208
|
+
if (/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(C))
|
|
3209
|
+
return new Date(C);
|
|
3210
|
+
const N = /^(\d{2})[-/.]\s*(\d{2})[-/.]\s*(\d{4})$/.exec(C);
|
|
3207
3211
|
if (N)
|
|
3208
3212
|
return /* @__PURE__ */ new Date(`${N[3]}-${N[2]}-${N[1]}`);
|
|
3209
|
-
const x = /^(\d{2})[-/]\s*(\d{2})[-/]\s*(\d{4})$/.exec(
|
|
3213
|
+
const x = /^(\d{2})[-/]\s*(\d{2})[-/]\s*(\d{4})$/.exec(C);
|
|
3210
3214
|
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;
|
|
3211
|
-
}, w = (
|
|
3215
|
+
}, w = (C) => _(C) !== null, L = (C) => {
|
|
3212
3216
|
if (!b || b.length === 0) return;
|
|
3213
3217
|
let N = [...b];
|
|
3214
|
-
const x = N.find(($) => $[
|
|
3218
|
+
const x = N.find(($) => $[C] !== null && $[C] !== void 0), S = x ? w(x[C]) : !1;
|
|
3215
3219
|
N.sort(($, k) => {
|
|
3216
|
-
const T = $[
|
|
3220
|
+
const T = $[C], F = k[C];
|
|
3217
3221
|
if (T == null && F == null) return 0;
|
|
3218
3222
|
if (T == null) return 1;
|
|
3219
3223
|
if (F == null) return -1;
|
|
@@ -3237,42 +3241,42 @@ const zt = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%20
|
|
|
3237
3241
|
className: de.header,
|
|
3238
3242
|
style: { borderBottom: `1px solid ${s}` },
|
|
3239
3243
|
children: [
|
|
3240
|
-
/* @__PURE__ */ i("div", { className: de.nameDateContainer, children: Object.keys(
|
|
3241
|
-
/* @__PURE__ */ i("span", { children: y(
|
|
3244
|
+
/* @__PURE__ */ i("div", { className: de.nameDateContainer, children: Object.keys(a).map((C) => C === "name" ? /* @__PURE__ */ i("div", { className: de.elementName, children: /* @__PURE__ */ h("button", { onClick: () => L("name"), children: [
|
|
3245
|
+
/* @__PURE__ */ i("span", { children: y(a.name) }),
|
|
3242
3246
|
/* @__PURE__ */ i("img", { src: zt, alt: "order arrow" })
|
|
3243
|
-
] }) },
|
|
3244
|
-
/* @__PURE__ */ i("span", { children: y(
|
|
3247
|
+
] }) }, C) : C === "data" ? /* @__PURE__ */ i("div", { className: de.elementDate, children: /* @__PURE__ */ h("button", { onClick: () => L("created_at"), children: [
|
|
3248
|
+
/* @__PURE__ */ i("span", { children: y(a.data) }),
|
|
3245
3249
|
/* @__PURE__ */ i("img", { src: zt, alt: "order arrow" })
|
|
3246
|
-
] }) },
|
|
3250
|
+
] }) }, C) : /* @__PURE__ */ i("div", { className: de.elementDate, children: /* @__PURE__ */ i("span", { children: y(a[C]) }) }, C)) }),
|
|
3247
3251
|
/* @__PURE__ */ i("div", { className: de.buttonsContainer })
|
|
3248
3252
|
]
|
|
3249
3253
|
}
|
|
3250
3254
|
),
|
|
3251
|
-
/* @__PURE__ */ i("div", { className: de.elementListContainer, children: b && b.length > 0 && b.map((
|
|
3255
|
+
/* @__PURE__ */ i("div", { className: de.elementListContainer, children: b && b.length > 0 && b.map((C) => /* @__PURE__ */ i(
|
|
3252
3256
|
p2,
|
|
3253
3257
|
{
|
|
3254
|
-
isActive:
|
|
3255
|
-
listelement:
|
|
3258
|
+
isActive: d == C.id,
|
|
3259
|
+
listelement: C,
|
|
3256
3260
|
fontColor: s,
|
|
3257
3261
|
activeColor: r,
|
|
3258
|
-
onClickElement:
|
|
3259
|
-
columns:
|
|
3262
|
+
onClickElement: l,
|
|
3263
|
+
columns: a,
|
|
3260
3264
|
elementButtons: u,
|
|
3261
|
-
moreInfo:
|
|
3265
|
+
moreInfo: f,
|
|
3262
3266
|
processTooltip: m,
|
|
3263
|
-
defaultTooltip:
|
|
3267
|
+
defaultTooltip: g,
|
|
3264
3268
|
showEye: p
|
|
3265
3269
|
},
|
|
3266
|
-
`elementKey${
|
|
3270
|
+
`elementKey${C.id}`
|
|
3267
3271
|
)) }),
|
|
3268
|
-
|
|
3272
|
+
c && /* @__PURE__ */ i("div", { className: de.newElementButtonContainer, children: /* @__PURE__ */ i(
|
|
3269
3273
|
it,
|
|
3270
3274
|
{
|
|
3271
3275
|
style: { ...t },
|
|
3272
|
-
onClick:
|
|
3276
|
+
onClick: c.onClick,
|
|
3273
3277
|
borderColor: "grey",
|
|
3274
|
-
disabled:
|
|
3275
|
-
children: y(
|
|
3278
|
+
disabled: c.disabled || !1,
|
|
3279
|
+
children: y(c.label)
|
|
3276
3280
|
}
|
|
3277
3281
|
) })
|
|
3278
3282
|
]
|
|
@@ -3340,43 +3344,43 @@ const ts = "_formContainer_asv64_2", ns = "_categorySelectorContainer_asv64_11",
|
|
|
3340
3344
|
};
|
|
3341
3345
|
var rs = (n) => n.type === "checkbox", os = (n) => n instanceof Date, h2 = (n) => n == null;
|
|
3342
3346
|
const as = (n) => typeof n == "object";
|
|
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,
|
|
3344
|
-
const
|
|
3345
|
-
return ze(
|
|
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, d) => n.has(cs(d)), us = (n) => {
|
|
3348
|
+
const d = n.constructor && n.constructor.prototype;
|
|
3349
|
+
return ze(d) && d.hasOwnProperty("isPrototypeOf");
|
|
3346
3350
|
}, ps = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
3347
3351
|
function m2(n) {
|
|
3348
|
-
let
|
|
3352
|
+
let d;
|
|
3349
3353
|
const s = Array.isArray(n), r = typeof FileList < "u" ? n instanceof FileList : !1;
|
|
3350
3354
|
if (n instanceof Date)
|
|
3351
|
-
|
|
3355
|
+
d = new Date(n);
|
|
3352
3356
|
else if (!(ps && (n instanceof Blob || r)) && (s || ze(n)))
|
|
3353
|
-
if (
|
|
3354
|
-
|
|
3357
|
+
if (d = s ? [] : {}, !s && !us(n))
|
|
3358
|
+
d = n;
|
|
3355
3359
|
else
|
|
3356
3360
|
for (const t in n)
|
|
3357
|
-
n.hasOwnProperty(t) && (
|
|
3361
|
+
n.hasOwnProperty(t) && (d[t] = m2(n[t]));
|
|
3358
3362
|
else
|
|
3359
3363
|
return n;
|
|
3360
|
-
return
|
|
3364
|
+
return d;
|
|
3361
3365
|
}
|
|
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,
|
|
3363
|
-
if (!
|
|
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, d, s) => {
|
|
3367
|
+
if (!d || !ze(n))
|
|
3364
3368
|
return s;
|
|
3365
|
-
const r = (g2(
|
|
3366
|
-
return kt(r) || r === n ? kt(n[
|
|
3367
|
-
}, gt = (n) => typeof n == "boolean", Pt = (n,
|
|
3369
|
+
const r = (g2(d) ? [d] : C2(d)).reduce((t, o) => h2(t) ? t : t[o], n);
|
|
3370
|
+
return kt(r) || r === n ? kt(n[d]) ? s : n[d] : r;
|
|
3371
|
+
}, gt = (n) => typeof n == "boolean", Pt = (n, d, s) => {
|
|
3368
3372
|
let r = -1;
|
|
3369
|
-
const t = g2(
|
|
3373
|
+
const t = g2(d) ? [d] : C2(d), o = t.length, c = o - 1;
|
|
3370
3374
|
for (; ++r < o; ) {
|
|
3371
|
-
const
|
|
3372
|
-
let
|
|
3373
|
-
if (r !==
|
|
3374
|
-
const u = n[
|
|
3375
|
-
|
|
3375
|
+
const l = t[r];
|
|
3376
|
+
let a = s;
|
|
3377
|
+
if (r !== c) {
|
|
3378
|
+
const u = n[l];
|
|
3379
|
+
a = ze(u) || Array.isArray(u) ? u : isNaN(+t[r + 1]) ? {} : [];
|
|
3376
3380
|
}
|
|
3377
|
-
if (
|
|
3381
|
+
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
3378
3382
|
return;
|
|
3379
|
-
n[
|
|
3383
|
+
n[l] = a, n = n[l];
|
|
3380
3384
|
}
|
|
3381
3385
|
};
|
|
3382
3386
|
const Zt = {
|
|
@@ -3387,22 +3391,22 @@ const Zt = {
|
|
|
3387
3391
|
}, f2 = E.createContext(null);
|
|
3388
3392
|
f2.displayName = "HookFormContext";
|
|
3389
3393
|
const Tt = () => E.useContext(f2);
|
|
3390
|
-
var ms = (n,
|
|
3394
|
+
var ms = (n, d, s, r = !0) => {
|
|
3391
3395
|
const t = {
|
|
3392
|
-
defaultValues:
|
|
3396
|
+
defaultValues: d._defaultValues
|
|
3393
3397
|
};
|
|
3394
3398
|
for (const o in n)
|
|
3395
3399
|
Object.defineProperty(t, o, {
|
|
3396
3400
|
get: () => {
|
|
3397
|
-
const
|
|
3398
|
-
return
|
|
3401
|
+
const c = o;
|
|
3402
|
+
return d._proxyFormState[c] !== jt.all && (d._proxyFormState[c] = !r || jt.all), s && (s[c] = !0), n[c];
|
|
3399
3403
|
}
|
|
3400
3404
|
});
|
|
3401
3405
|
return t;
|
|
3402
3406
|
};
|
|
3403
3407
|
const y2 = typeof window < "u" ? Ve.useLayoutEffect : Ve.useEffect;
|
|
3404
3408
|
function gs(n) {
|
|
3405
|
-
const
|
|
3409
|
+
const d = Tt(), { control: s = d.control, disabled: r, name: t, exact: o } = n || {}, [c, l] = E.useState(s._formState), a = E.useRef({
|
|
3406
3410
|
isDirty: !1,
|
|
3407
3411
|
isLoading: !1,
|
|
3408
3412
|
dirtyFields: !1,
|
|
@@ -3414,72 +3418,72 @@ function gs(n) {
|
|
|
3414
3418
|
});
|
|
3415
3419
|
return y2(() => s._subscribe({
|
|
3416
3420
|
name: t,
|
|
3417
|
-
formState:
|
|
3421
|
+
formState: a.current,
|
|
3418
3422
|
exact: o,
|
|
3419
3423
|
callback: (u) => {
|
|
3420
|
-
!r &&
|
|
3424
|
+
!r && l({
|
|
3421
3425
|
...s._formState,
|
|
3422
3426
|
...u
|
|
3423
3427
|
});
|
|
3424
3428
|
}
|
|
3425
3429
|
}), [t, r, o]), E.useEffect(() => {
|
|
3426
|
-
|
|
3427
|
-
}, [s]), E.useMemo(() => ms(
|
|
3430
|
+
a.current.isValid && s._setValid(!0);
|
|
3431
|
+
}, [s]), E.useMemo(() => ms(c, s, a.current, !1), [c, s]);
|
|
3428
3432
|
}
|
|
3429
|
-
var Cs = (n) => typeof n == "string", fs = (n,
|
|
3433
|
+
var Cs = (n) => typeof n == "string", fs = (n, d, s, r, t) => Cs(n) ? J(s, n, t) : Array.isArray(n) ? n.map((o) => J(s, o)) : s;
|
|
3430
3434
|
function ys(n) {
|
|
3431
|
-
const
|
|
3435
|
+
const d = Tt(), { control: s = d.control, name: r, defaultValue: t, disabled: o, exact: c } = n || {}, l = E.useRef(t), [a, u] = E.useState(s._getWatch(r, l.current));
|
|
3432
3436
|
return y2(() => s._subscribe({
|
|
3433
3437
|
name: r,
|
|
3434
3438
|
formState: {
|
|
3435
3439
|
values: !0
|
|
3436
3440
|
},
|
|
3437
|
-
exact:
|
|
3438
|
-
callback: (
|
|
3439
|
-
}), [r, s, o,
|
|
3441
|
+
exact: c,
|
|
3442
|
+
callback: (f) => !o && u(fs(r, s._names, f.values || s._formValues, !1, l.current))
|
|
3443
|
+
}), [r, s, o, c]), E.useEffect(() => s._removeUnmounted()), a;
|
|
3440
3444
|
}
|
|
3441
3445
|
function bs(n) {
|
|
3442
|
-
const
|
|
3446
|
+
const d = Tt(), { name: s, disabled: r, control: t = d.control, shouldUnregister: o } = n, c = ds(t._names.array, s), l = ys({
|
|
3443
3447
|
control: t,
|
|
3444
3448
|
name: s,
|
|
3445
3449
|
defaultValue: J(t._formValues, s, J(t._defaultValues, s, n.defaultValue)),
|
|
3446
3450
|
exact: !0
|
|
3447
|
-
}),
|
|
3451
|
+
}), a = gs({
|
|
3448
3452
|
control: t,
|
|
3449
3453
|
name: s,
|
|
3450
3454
|
exact: !0
|
|
3451
|
-
}), u = E.useRef(n),
|
|
3455
|
+
}), u = E.useRef(n), f = E.useRef(t.register(s, {
|
|
3452
3456
|
...n.rules,
|
|
3453
|
-
value:
|
|
3457
|
+
value: l,
|
|
3454
3458
|
...gt(n.disabled) ? { disabled: n.disabled } : {}
|
|
3455
3459
|
})), m = E.useMemo(() => Object.defineProperties({}, {
|
|
3456
3460
|
invalid: {
|
|
3457
3461
|
enumerable: !0,
|
|
3458
|
-
get: () => !!J(
|
|
3462
|
+
get: () => !!J(a.errors, s)
|
|
3459
3463
|
},
|
|
3460
3464
|
isDirty: {
|
|
3461
3465
|
enumerable: !0,
|
|
3462
|
-
get: () => !!J(
|
|
3466
|
+
get: () => !!J(a.dirtyFields, s)
|
|
3463
3467
|
},
|
|
3464
3468
|
isTouched: {
|
|
3465
3469
|
enumerable: !0,
|
|
3466
|
-
get: () => !!J(
|
|
3470
|
+
get: () => !!J(a.touchedFields, s)
|
|
3467
3471
|
},
|
|
3468
3472
|
isValidating: {
|
|
3469
3473
|
enumerable: !0,
|
|
3470
|
-
get: () => !!J(
|
|
3474
|
+
get: () => !!J(a.validatingFields, s)
|
|
3471
3475
|
},
|
|
3472
3476
|
error: {
|
|
3473
3477
|
enumerable: !0,
|
|
3474
|
-
get: () => J(
|
|
3478
|
+
get: () => J(a.errors, s)
|
|
3475
3479
|
}
|
|
3476
|
-
}), [
|
|
3480
|
+
}), [a, s]), g = E.useCallback((v) => f.current.onChange({
|
|
3477
3481
|
target: {
|
|
3478
3482
|
value: ls(v),
|
|
3479
3483
|
name: s
|
|
3480
3484
|
},
|
|
3481
3485
|
type: Zt.CHANGE
|
|
3482
|
-
}), [s]), p = E.useCallback(() =>
|
|
3486
|
+
}), [s]), p = E.useCallback(() => f.current.onBlur({
|
|
3483
3487
|
target: {
|
|
3484
3488
|
value: J(t._formValues, s),
|
|
3485
3489
|
name: s
|
|
@@ -3495,12 +3499,12 @@ function bs(n) {
|
|
|
3495
3499
|
});
|
|
3496
3500
|
}, [t._fields, s]), b = E.useMemo(() => ({
|
|
3497
3501
|
name: s,
|
|
3498
|
-
value:
|
|
3499
|
-
...gt(r) ||
|
|
3500
|
-
onChange:
|
|
3502
|
+
value: l,
|
|
3503
|
+
...gt(r) || a.disabled ? { disabled: a.disabled || r } : {},
|
|
3504
|
+
onChange: g,
|
|
3501
3505
|
onBlur: p,
|
|
3502
3506
|
ref: y
|
|
3503
|
-
}), [s, r,
|
|
3507
|
+
}), [s, r, a.disabled, g, p, y, l]);
|
|
3504
3508
|
return E.useEffect(() => {
|
|
3505
3509
|
const v = t._options.shouldUnregister || o;
|
|
3506
3510
|
t.register(s, {
|
|
@@ -3508,26 +3512,26 @@ function bs(n) {
|
|
|
3508
3512
|
...gt(u.current.disabled) ? { disabled: u.current.disabled } : {}
|
|
3509
3513
|
});
|
|
3510
3514
|
const _ = (w, L) => {
|
|
3511
|
-
const
|
|
3512
|
-
|
|
3515
|
+
const C = J(t._fields, w);
|
|
3516
|
+
C && C._f && (C._f.mount = L);
|
|
3513
3517
|
};
|
|
3514
3518
|
if (_(s, !0), v) {
|
|
3515
3519
|
const w = m2(J(t._options.defaultValues, s));
|
|
3516
3520
|
Pt(t._defaultValues, s, w), kt(J(t._formValues, s)) && Pt(t._formValues, s, w);
|
|
3517
3521
|
}
|
|
3518
|
-
return !
|
|
3519
|
-
(
|
|
3522
|
+
return !c && t.register(s), () => {
|
|
3523
|
+
(c ? v && !t._state.action : v) ? t.unregister(s) : _(s, !1);
|
|
3520
3524
|
};
|
|
3521
|
-
}, [s, t,
|
|
3525
|
+
}, [s, t, c, o]), E.useEffect(() => {
|
|
3522
3526
|
t._setDisabledField({
|
|
3523
3527
|
disabled: r,
|
|
3524
3528
|
name: s
|
|
3525
3529
|
});
|
|
3526
3530
|
}, [r, s, t]), E.useMemo(() => ({
|
|
3527
3531
|
field: b,
|
|
3528
|
-
formState:
|
|
3532
|
+
formState: a,
|
|
3529
3533
|
fieldState: m
|
|
3530
|
-
}), [b,
|
|
3534
|
+
}), [b, a, m]);
|
|
3531
3535
|
}
|
|
3532
3536
|
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 = {
|
|
3533
3537
|
textInputContainer: _s,
|
|
@@ -3539,7 +3543,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3539
3543
|
errorMessage: ks
|
|
3540
3544
|
}, Ze = ({
|
|
3541
3545
|
errorMessage: n,
|
|
3542
|
-
errorColor:
|
|
3546
|
+
errorColor: d = "red",
|
|
3543
3547
|
containerStyles: s
|
|
3544
3548
|
}) => {
|
|
3545
3549
|
const { t: r } = A();
|
|
@@ -3547,32 +3551,32 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3547
3551
|
"div",
|
|
3548
3552
|
{
|
|
3549
3553
|
className: $s.errorMessage,
|
|
3550
|
-
style: { color:
|
|
3554
|
+
style: { color: d, ...s },
|
|
3551
3555
|
children: n ? r(n) : ""
|
|
3552
3556
|
}
|
|
3553
3557
|
);
|
|
3554
3558
|
}, 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) => ({
|
|
3555
3559
|
errorColor: "red"
|
|
3556
|
-
})), Ht = ({ input: n, reactHookFormInstance:
|
|
3560
|
+
})), Ht = ({ input: n, reactHookFormInstance: d }) => {
|
|
3557
3561
|
const {
|
|
3558
3562
|
code: s,
|
|
3559
3563
|
type: r,
|
|
3560
3564
|
label: t,
|
|
3561
3565
|
maxLength: o,
|
|
3562
|
-
required:
|
|
3563
|
-
validateFunction:
|
|
3564
|
-
placeholder:
|
|
3566
|
+
required: c,
|
|
3567
|
+
validateFunction: l,
|
|
3568
|
+
placeholder: a,
|
|
3565
3569
|
errorColor: u = "red",
|
|
3566
|
-
width:
|
|
3570
|
+
width: f = 325,
|
|
3567
3571
|
onClickForgotPass: m = () => {
|
|
3568
3572
|
console.log("Click on forgot password");
|
|
3569
3573
|
},
|
|
3570
|
-
forgotPassLabel:
|
|
3574
|
+
forgotPassLabel: g = "forgot-password",
|
|
3571
3575
|
//Lógica extra al onChange además de actualizar el valor en RHF
|
|
3572
3576
|
onChangeExtraFunction: p = () => {
|
|
3573
3577
|
}
|
|
3574
|
-
} = n, { t: y } = A(), { control: b, trigger: v, clearErrors: _ } =
|
|
3575
|
-
Y(
|
|
3578
|
+
} = n, { t: y } = A(), { control: b, trigger: v, clearErrors: _ } = d, { errorColor: w } = je((x) => x), [L, C] = I(!1);
|
|
3579
|
+
Y(c);
|
|
3576
3580
|
const N = () => r ? r === "password" && L ? "text" : r : "text";
|
|
3577
3581
|
return /* @__PURE__ */ i(
|
|
3578
3582
|
Pe,
|
|
@@ -3580,9 +3584,9 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3580
3584
|
name: s,
|
|
3581
3585
|
control: b,
|
|
3582
3586
|
rules: {
|
|
3583
|
-
required:
|
|
3587
|
+
required: c ? `${y(t)} ${y("errorMessages.required")}` : !1,
|
|
3584
3588
|
maxLength: o || void 0,
|
|
3585
|
-
validate:
|
|
3589
|
+
validate: l || void 0
|
|
3586
3590
|
},
|
|
3587
3591
|
render: ({ field: x, fieldState: S }) => {
|
|
3588
3592
|
var F;
|
|
@@ -3593,12 +3597,12 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3593
3597
|
/* @__PURE__ */ h("h3", { className: Ie.labelContainer, children: [
|
|
3594
3598
|
y(t),
|
|
3595
3599
|
" ",
|
|
3596
|
-
|
|
3600
|
+
c && /* @__PURE__ */ i("label", { style: { color: S.error ? u : "" }, children: "*" })
|
|
3597
3601
|
] }),
|
|
3598
3602
|
/* @__PURE__ */ h(
|
|
3599
3603
|
"div",
|
|
3600
3604
|
{
|
|
3601
|
-
style: { position: "relative", width:
|
|
3605
|
+
style: { position: "relative", width: f },
|
|
3602
3606
|
className: Ie.inputContainer,
|
|
3603
3607
|
children: [
|
|
3604
3608
|
/* @__PURE__ */ i(
|
|
@@ -3607,14 +3611,14 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3607
3611
|
...k,
|
|
3608
3612
|
type: N(),
|
|
3609
3613
|
onChange: T,
|
|
3610
|
-
placeholder:
|
|
3614
|
+
placeholder: a ? y(a) : "",
|
|
3611
3615
|
maxLength: o || void 0
|
|
3612
3616
|
}
|
|
3613
3617
|
),
|
|
3614
3618
|
r == "password" && /* @__PURE__ */ i(
|
|
3615
3619
|
"button",
|
|
3616
3620
|
{
|
|
3617
|
-
onClick: () =>
|
|
3621
|
+
onClick: () => C(!L),
|
|
3618
3622
|
type: "button",
|
|
3619
3623
|
className: Ie.showPasswordButton,
|
|
3620
3624
|
children: /* @__PURE__ */ i(
|
|
@@ -3629,7 +3633,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3629
3633
|
]
|
|
3630
3634
|
}
|
|
3631
3635
|
),
|
|
3632
|
-
r == "password" && /* @__PURE__ */ i("div", { className: Ie.forgotPassButton, children: /* @__PURE__ */ i("button", { onClick: m, children: y(
|
|
3636
|
+
r == "password" && /* @__PURE__ */ i("div", { className: Ie.forgotPassButton, children: /* @__PURE__ */ i("button", { onClick: m, children: y(g) }) }),
|
|
3633
3637
|
/* @__PURE__ */ i(
|
|
3634
3638
|
Ze,
|
|
3635
3639
|
{
|
|
@@ -3651,62 +3655,62 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3651
3655
|
selectInput: Fs,
|
|
3652
3656
|
option: As,
|
|
3653
3657
|
dropdownArrow: Os
|
|
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:
|
|
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: d, onChange: s }) => {
|
|
3655
3659
|
const {
|
|
3656
3660
|
code: r,
|
|
3657
3661
|
type: t,
|
|
3658
3662
|
label: o,
|
|
3659
|
-
maxLength:
|
|
3660
|
-
required:
|
|
3661
|
-
validateFunction:
|
|
3663
|
+
maxLength: c,
|
|
3664
|
+
required: l,
|
|
3665
|
+
validateFunction: a,
|
|
3662
3666
|
placeholder: u,
|
|
3663
|
-
errorColor:
|
|
3667
|
+
errorColor: f = "red",
|
|
3664
3668
|
width: m = 325,
|
|
3665
|
-
options:
|
|
3669
|
+
options: g = []
|
|
3666
3670
|
//Used if we dont use react hook form
|
|
3667
|
-
} = n, { t: p } = A(), { control: y, trigger: b, clearErrors: v } =
|
|
3668
|
-
Y(
|
|
3671
|
+
} = n, { t: p } = A(), { control: y, trigger: b, clearErrors: v } = d || {}, { errorColor: _ } = je((C) => C);
|
|
3672
|
+
Y(l);
|
|
3669
3673
|
const [w, L] = I(null);
|
|
3670
3674
|
return O(() => {
|
|
3671
3675
|
w && s && s(w);
|
|
3672
|
-
}, [w, s]),
|
|
3676
|
+
}, [w, s]), d ? /* @__PURE__ */ i(
|
|
3673
3677
|
Pe,
|
|
3674
3678
|
{
|
|
3675
3679
|
name: r,
|
|
3676
3680
|
control: y,
|
|
3677
3681
|
rules: {
|
|
3678
|
-
required:
|
|
3679
|
-
validate:
|
|
3680
|
-
let N =
|
|
3681
|
-
return
|
|
3682
|
+
required: l ? `${p(o)} ${p("errorMessages.required")}` : !1,
|
|
3683
|
+
validate: a ? (C) => {
|
|
3684
|
+
let N = d.getValues();
|
|
3685
|
+
return a(C, N);
|
|
3682
3686
|
} : void 0
|
|
3683
3687
|
},
|
|
3684
|
-
render: ({ field:
|
|
3688
|
+
render: ({ field: C, fieldState: N }) => {
|
|
3685
3689
|
var S;
|
|
3686
|
-
const x =
|
|
3687
|
-
($) => $.value ===
|
|
3690
|
+
const x = g.find(
|
|
3691
|
+
($) => $.value === C.value
|
|
3688
3692
|
);
|
|
3689
3693
|
return /* @__PURE__ */ h("div", { className: X.selectInputContainer, children: [
|
|
3690
3694
|
o && /* @__PURE__ */ h("h3", { className: X.labelContainer, children: [
|
|
3691
3695
|
p(o),
|
|
3692
3696
|
" ",
|
|
3693
|
-
|
|
3697
|
+
l && /* @__PURE__ */ i("label", { style: { color: N.error ? f : "" }, children: "*" })
|
|
3694
3698
|
] }),
|
|
3695
3699
|
/* @__PURE__ */ h("div", { className: X.selectWrapper, children: [
|
|
3696
3700
|
/* @__PURE__ */ h("div", { className: X.inputContainer, style: { width: m }, children: [
|
|
3697
3701
|
/* @__PURE__ */ h(
|
|
3698
3702
|
"select",
|
|
3699
3703
|
{
|
|
3700
|
-
...
|
|
3701
|
-
value:
|
|
3704
|
+
...C,
|
|
3705
|
+
value: C.value ?? "",
|
|
3702
3706
|
onChange: ($) => {
|
|
3703
|
-
const k = $.target.value, T =
|
|
3704
|
-
|
|
3707
|
+
const k = $.target.value, T = g.every((F) => typeof F.value == "number") ? Number(k) : k;
|
|
3708
|
+
C.onChange(T);
|
|
3705
3709
|
},
|
|
3706
3710
|
className: X.selectInput,
|
|
3707
3711
|
children: [
|
|
3708
3712
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: p(u || "selectOption") }),
|
|
3709
|
-
|
|
3713
|
+
g.map(($, k) => /* @__PURE__ */ i(
|
|
3710
3714
|
"option",
|
|
3711
3715
|
{
|
|
3712
3716
|
value: $.value,
|
|
@@ -3733,7 +3737,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3733
3737
|
Ze,
|
|
3734
3738
|
{
|
|
3735
3739
|
errorMessage: (S = N.error) == null ? void 0 : S.message,
|
|
3736
|
-
errorColor: _ ||
|
|
3740
|
+
errorColor: _ || f
|
|
3737
3741
|
}
|
|
3738
3742
|
)
|
|
3739
3743
|
] });
|
|
@@ -3743,26 +3747,26 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3743
3747
|
o && /* @__PURE__ */ h("h3", { className: X.labelContainer, children: [
|
|
3744
3748
|
p(o),
|
|
3745
3749
|
" ",
|
|
3746
|
-
|
|
3750
|
+
l && /* @__PURE__ */ i("label", { children: "*" })
|
|
3747
3751
|
] }),
|
|
3748
3752
|
/* @__PURE__ */ h("div", { className: X.inputContainer, style: { width: m }, children: [
|
|
3749
3753
|
/* @__PURE__ */ h(
|
|
3750
3754
|
"select",
|
|
3751
3755
|
{
|
|
3752
3756
|
value: w ?? "",
|
|
3753
|
-
onChange: (
|
|
3754
|
-
const N =
|
|
3757
|
+
onChange: (C) => {
|
|
3758
|
+
const N = C.target.value, x = g.every((S) => typeof S.value == "number") ? Number(N) : N;
|
|
3755
3759
|
L(x);
|
|
3756
3760
|
},
|
|
3757
3761
|
className: X.selectInput,
|
|
3758
3762
|
children: [
|
|
3759
3763
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: p(u || "selectOption") }),
|
|
3760
|
-
|
|
3764
|
+
g.map((C, N) => /* @__PURE__ */ i(
|
|
3761
3765
|
"option",
|
|
3762
3766
|
{
|
|
3763
|
-
value:
|
|
3767
|
+
value: C.value,
|
|
3764
3768
|
className: X.option,
|
|
3765
|
-
children: p(
|
|
3769
|
+
children: p(C.label)
|
|
3766
3770
|
},
|
|
3767
3771
|
N
|
|
3768
3772
|
))
|
|
@@ -3772,10 +3776,10 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3772
3776
|
/* @__PURE__ */ i("img", { src: Wt, alt: "Open", className: X.dropdownArrow })
|
|
3773
3777
|
] }),
|
|
3774
3778
|
(() => {
|
|
3775
|
-
const
|
|
3779
|
+
const C = g.find(
|
|
3776
3780
|
(N) => N.value === w
|
|
3777
3781
|
);
|
|
3778
|
-
return
|
|
3782
|
+
return C && C.description ? /* @__PURE__ */ i("div", { className: X.optionDescription, children: p(C.description) }) : null;
|
|
3779
3783
|
})()
|
|
3780
3784
|
] });
|
|
3781
3785
|
}, 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 = {
|
|
@@ -3785,34 +3789,34 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3785
3789
|
radioQuestion: zs,
|
|
3786
3790
|
inputContainer: Ps,
|
|
3787
3791
|
radioInput: Zs
|
|
3788
|
-
}, js = ({ input: n, reactHookFormInstance:
|
|
3792
|
+
}, js = ({ input: n, reactHookFormInstance: d }) => {
|
|
3789
3793
|
const {
|
|
3790
3794
|
code: s,
|
|
3791
3795
|
label: r,
|
|
3792
3796
|
required: t,
|
|
3793
3797
|
validateFunction: o,
|
|
3794
|
-
errorColor:
|
|
3795
|
-
options:
|
|
3796
|
-
multi:
|
|
3797
|
-
} = n, { t: u } = A(), { control:
|
|
3798
|
-
if (
|
|
3799
|
-
let L = w.filter((
|
|
3798
|
+
errorColor: c = "red",
|
|
3799
|
+
options: l = [],
|
|
3800
|
+
multi: a = !1
|
|
3801
|
+
} = n, { t: u } = A(), { control: f, trigger: m, clearErrors: g } = d, { errorColor: p } = je((v) => v), y = ({ options: v, onChange: _, actualValue: w }) => {
|
|
3802
|
+
if (a && w && w.length > 0) {
|
|
3803
|
+
let L = w.filter((C) => C !== v);
|
|
3800
3804
|
_(L);
|
|
3801
3805
|
}
|
|
3802
3806
|
}, b = ({ options: v, onChange: _, actualValue: w }) => {
|
|
3803
|
-
|
|
3807
|
+
a ? w && w.length > 0 ? _([...w, v]) : _([v]) : _(v);
|
|
3804
3808
|
};
|
|
3805
3809
|
return Y(t), /* @__PURE__ */ i(
|
|
3806
3810
|
Pe,
|
|
3807
3811
|
{
|
|
3808
|
-
control:
|
|
3812
|
+
control: f,
|
|
3809
3813
|
name: s,
|
|
3810
3814
|
rules: {
|
|
3811
3815
|
validate: (v) => t && (v == null || v === "") ? `${u(r)} ${u("errorMessages.required")}` : null
|
|
3812
3816
|
},
|
|
3813
3817
|
render: ({
|
|
3814
3818
|
formState: { errors: v },
|
|
3815
|
-
field: { onChange: _, onBlur: w, value: L, ref:
|
|
3819
|
+
field: { onChange: _, onBlur: w, value: L, ref: C },
|
|
3816
3820
|
fieldState: N
|
|
3817
3821
|
}) => {
|
|
3818
3822
|
var x;
|
|
@@ -3828,7 +3832,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3828
3832
|
t && /* @__PURE__ */ i(
|
|
3829
3833
|
"label",
|
|
3830
3834
|
{
|
|
3831
|
-
style: { color: N.error ?
|
|
3835
|
+
style: { color: N.error ? c : "" },
|
|
3832
3836
|
children: "*"
|
|
3833
3837
|
}
|
|
3834
3838
|
)
|
|
@@ -3836,14 +3840,14 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3836
3840
|
}
|
|
3837
3841
|
) }),
|
|
3838
3842
|
/* @__PURE__ */ h("div", { className: xe.inputContainer, children: [
|
|
3839
|
-
|
|
3843
|
+
l.map(
|
|
3840
3844
|
({
|
|
3841
3845
|
label: S,
|
|
3842
3846
|
value: $,
|
|
3843
3847
|
disabled: k = !1,
|
|
3844
3848
|
italicLabel: T
|
|
3845
3849
|
}, F) => {
|
|
3846
|
-
const D = L &&
|
|
3850
|
+
const D = L && a ? L.isArray && (L == null ? void 0 : L.length) > 0 && L.some((B) => B === $) : L === $;
|
|
3847
3851
|
return /* @__PURE__ */ h("label", { children: [
|
|
3848
3852
|
/* @__PURE__ */ i(
|
|
3849
3853
|
"input",
|
|
@@ -3851,13 +3855,13 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3851
3855
|
type: "radio",
|
|
3852
3856
|
checked: D,
|
|
3853
3857
|
onChange: () => {
|
|
3854
|
-
|
|
3858
|
+
a ? D ? y({
|
|
3855
3859
|
actualValue: L,
|
|
3856
|
-
options:
|
|
3860
|
+
options: l,
|
|
3857
3861
|
onChange: _
|
|
3858
3862
|
}) : b({
|
|
3859
3863
|
actualValue: L,
|
|
3860
|
-
options:
|
|
3864
|
+
options: l,
|
|
3861
3865
|
onChange: _
|
|
3862
3866
|
}) : _($);
|
|
3863
3867
|
},
|
|
@@ -3873,7 +3877,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3873
3877
|
Ze,
|
|
3874
3878
|
{
|
|
3875
3879
|
errorMessage: (x = N.error) == null ? void 0 : x.message,
|
|
3876
|
-
errorColor: p ||
|
|
3880
|
+
errorColor: p || c
|
|
3877
3881
|
}
|
|
3878
3882
|
)
|
|
3879
3883
|
] })
|
|
@@ -3890,36 +3894,36 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3890
3894
|
labels: Xs,
|
|
3891
3895
|
minLabel: Qs,
|
|
3892
3896
|
maxLabel: Js
|
|
3893
|
-
}, b2 = ({ input: n, reactHookFormInstance:
|
|
3897
|
+
}, b2 = ({ input: n, reactHookFormInstance: d, onChange: s }) => {
|
|
3894
3898
|
const {
|
|
3895
3899
|
code: r,
|
|
3896
3900
|
label: t,
|
|
3897
3901
|
minValue: o = 1,
|
|
3898
|
-
maxValue:
|
|
3899
|
-
defValue:
|
|
3900
|
-
thumbColor:
|
|
3902
|
+
maxValue: c = 5,
|
|
3903
|
+
defValue: l = 3,
|
|
3904
|
+
thumbColor: a = "#B32F5D",
|
|
3901
3905
|
//trackColors = ["#B32F5D", "#EFEFEF"],
|
|
3902
3906
|
required: u,
|
|
3903
|
-
errorColor:
|
|
3907
|
+
errorColor: f = "red",
|
|
3904
3908
|
labelWidth: m = "300px",
|
|
3905
|
-
sliderWidth:
|
|
3909
|
+
sliderWidth: g = "300px",
|
|
3906
3910
|
minText: p,
|
|
3907
3911
|
maxText: y,
|
|
3908
3912
|
disabled: b = !1,
|
|
3909
3913
|
marks: v = Array.from(
|
|
3910
|
-
{ length:
|
|
3914
|
+
{ length: c - o + 1 },
|
|
3911
3915
|
(k, T) => o + T
|
|
3912
3916
|
),
|
|
3913
3917
|
showMarksNumber: _ = !0
|
|
3914
|
-
} = n, { t: w } = A(), { control: L, trigger:
|
|
3918
|
+
} = n, { t: w } = A(), { control: L, trigger: C, clearErrors: N } = d || {};
|
|
3915
3919
|
Y(u);
|
|
3916
|
-
const { errorColorForm: x } = je((k) => k), [S, $] = I(
|
|
3917
|
-
return
|
|
3920
|
+
const { errorColorForm: x } = je((k) => k), [S, $] = I(l);
|
|
3921
|
+
return d ? /* @__PURE__ */ i(
|
|
3918
3922
|
Pe,
|
|
3919
3923
|
{
|
|
3920
3924
|
name: r,
|
|
3921
3925
|
control: L,
|
|
3922
|
-
defaultValue:
|
|
3926
|
+
defaultValue: l,
|
|
3923
3927
|
rules: {
|
|
3924
3928
|
required: u ? `${w(t)} ${w("errorMessages.required")}` : !1
|
|
3925
3929
|
},
|
|
@@ -3930,7 +3934,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3930
3934
|
{
|
|
3931
3935
|
className: W.rankingSliderContainer,
|
|
3932
3936
|
style: {
|
|
3933
|
-
gridTemplateColumns: `${t && m} ${
|
|
3937
|
+
gridTemplateColumns: `${t && m} ${g}`
|
|
3934
3938
|
},
|
|
3935
3939
|
children: [
|
|
3936
3940
|
t && /* @__PURE__ */ i("p", { className: W.labelContainer, children: w(t) }),
|
|
@@ -3941,9 +3945,9 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3941
3945
|
xt,
|
|
3942
3946
|
{
|
|
3943
3947
|
min: o,
|
|
3944
|
-
max:
|
|
3948
|
+
max: c,
|
|
3945
3949
|
step: 1,
|
|
3946
|
-
value: k.value ??
|
|
3950
|
+
value: k.value ?? l,
|
|
3947
3951
|
onChange: (D) => k.onChange(D),
|
|
3948
3952
|
marks: !0,
|
|
3949
3953
|
className: W.slider,
|
|
@@ -3952,7 +3956,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3952
3956
|
"div",
|
|
3953
3957
|
{
|
|
3954
3958
|
...D,
|
|
3955
|
-
style: { ...D.style, backgroundColor:
|
|
3959
|
+
style: { ...D.style, backgroundColor: a }
|
|
3956
3960
|
}
|
|
3957
3961
|
),
|
|
3958
3962
|
trackClassName: W.track,
|
|
@@ -3968,7 +3972,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3968
3972
|
Ze,
|
|
3969
3973
|
{
|
|
3970
3974
|
errorMessage: (F = T.error) == null ? void 0 : F.message,
|
|
3971
|
-
errorColor: x ||
|
|
3975
|
+
errorColor: x || f
|
|
3972
3976
|
}
|
|
3973
3977
|
)
|
|
3974
3978
|
]
|
|
@@ -3980,7 +3984,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3980
3984
|
"div",
|
|
3981
3985
|
{
|
|
3982
3986
|
className: W.rankingSliderContainer,
|
|
3983
|
-
style: { gridTemplateColumns: `${t && m} ${
|
|
3987
|
+
style: { gridTemplateColumns: `${t && m} ${g}` },
|
|
3984
3988
|
children: [
|
|
3985
3989
|
t && /* @__PURE__ */ i("p", { className: W.labelContainer, children: w(t) }),
|
|
3986
3990
|
/* @__PURE__ */ h("div", { className: W.inputContainer, children: [
|
|
@@ -3990,7 +3994,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
3990
3994
|
xt,
|
|
3991
3995
|
{
|
|
3992
3996
|
min: o,
|
|
3993
|
-
max:
|
|
3997
|
+
max: c,
|
|
3994
3998
|
step: 1,
|
|
3995
3999
|
value: S,
|
|
3996
4000
|
onChange: (k) => {
|
|
@@ -4003,7 +4007,7 @@ const Pe = (n) => n.render(bs(n)), _s = "_textInputContainer_1o3iy_2", vs = "_la
|
|
|
4003
4007
|
"div",
|
|
4004
4008
|
{
|
|
4005
4009
|
...k,
|
|
4006
|
-
style: { ...k.style, backgroundColor:
|
|
4010
|
+
style: { ...k.style, backgroundColor: a }
|
|
4007
4011
|
}
|
|
4008
4012
|
),
|
|
4009
4013
|
trackClassName: W.track,
|
|
@@ -4040,119 +4044,119 @@ b2.propTypes = {
|
|
|
4040
4044
|
const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc_6", Kt = {
|
|
4041
4045
|
textDescriptionContainer: Ys,
|
|
4042
4046
|
textDescriptionText: er
|
|
4043
|
-
}, tr = ({ input: n, inputContainerStyles:
|
|
4047
|
+
}, tr = ({ input: n, inputContainerStyles: d }) => /* @__PURE__ */ i(
|
|
4044
4048
|
"div",
|
|
4045
4049
|
{
|
|
4046
4050
|
className: Kt.textDescriptionContainer,
|
|
4047
|
-
style: { margin: "10px 0", ...
|
|
4051
|
+
style: { margin: "10px 0", ...d },
|
|
4048
4052
|
children: /* @__PURE__ */ i("p", { className: Kt.textDescriptionText, children: n.text })
|
|
4049
4053
|
}
|
|
4050
4054
|
), Ee = ({
|
|
4051
4055
|
inputs: n,
|
|
4052
|
-
inputContainerStyles:
|
|
4056
|
+
inputContainerStyles: d,
|
|
4053
4057
|
reactHookFormInstance: s
|
|
4054
4058
|
}) => {
|
|
4055
|
-
const { watch: r } = s, t = r(), o = Fe(() => n == null ? void 0 : n.map((
|
|
4056
|
-
const
|
|
4059
|
+
const { watch: r } = s, t = r(), o = Fe(() => n == null ? void 0 : n.map((c) => {
|
|
4060
|
+
const l = typeof c.required == "function" ? c.required(t) : c.required;
|
|
4057
4061
|
return {
|
|
4058
|
-
...
|
|
4059
|
-
required:
|
|
4062
|
+
...c,
|
|
4063
|
+
required: l
|
|
4060
4064
|
};
|
|
4061
4065
|
}), [n, t]);
|
|
4062
|
-
return /* @__PURE__ */ i("div", { className: De.inputsContainer, children: o == null ? void 0 : o.map((
|
|
4063
|
-
const { inputType:
|
|
4064
|
-
switch (
|
|
4066
|
+
return /* @__PURE__ */ i("div", { className: De.inputsContainer, children: o == null ? void 0 : o.map((c, l) => {
|
|
4067
|
+
const { inputType: a } = c;
|
|
4068
|
+
switch (a) {
|
|
4065
4069
|
case Te.text:
|
|
4066
4070
|
return /* @__PURE__ */ i(
|
|
4067
4071
|
"div",
|
|
4068
4072
|
{
|
|
4069
4073
|
className: De.inputContainer,
|
|
4070
|
-
style: { ...
|
|
4074
|
+
style: { ...d },
|
|
4071
4075
|
children: /* @__PURE__ */ i(
|
|
4072
4076
|
Ht,
|
|
4073
4077
|
{
|
|
4074
|
-
input:
|
|
4078
|
+
input: c,
|
|
4075
4079
|
reactHookFormInstance: s
|
|
4076
4080
|
}
|
|
4077
4081
|
)
|
|
4078
4082
|
},
|
|
4079
|
-
`${
|
|
4083
|
+
`${c.code}${l}`
|
|
4080
4084
|
);
|
|
4081
4085
|
case Te.password:
|
|
4082
4086
|
return /* @__PURE__ */ i(
|
|
4083
4087
|
"div",
|
|
4084
4088
|
{
|
|
4085
4089
|
className: De.inputContainer,
|
|
4086
|
-
style: { ...
|
|
4090
|
+
style: { ...d },
|
|
4087
4091
|
children: /* @__PURE__ */ i(
|
|
4088
4092
|
Ht,
|
|
4089
4093
|
{
|
|
4090
|
-
input:
|
|
4094
|
+
input: c,
|
|
4091
4095
|
reactHookFormInstance: s
|
|
4092
4096
|
}
|
|
4093
4097
|
)
|
|
4094
4098
|
},
|
|
4095
|
-
`${
|
|
4099
|
+
`${c.code}${l}`
|
|
4096
4100
|
);
|
|
4097
4101
|
case Te.select:
|
|
4098
4102
|
return /* @__PURE__ */ i(
|
|
4099
4103
|
"div",
|
|
4100
4104
|
{
|
|
4101
4105
|
className: De.inputContainer,
|
|
4102
|
-
style: { ...
|
|
4106
|
+
style: { ...d },
|
|
4103
4107
|
children: /* @__PURE__ */ i(
|
|
4104
4108
|
Rs,
|
|
4105
4109
|
{
|
|
4106
|
-
input:
|
|
4110
|
+
input: c,
|
|
4107
4111
|
reactHookFormInstance: s
|
|
4108
4112
|
}
|
|
4109
4113
|
)
|
|
4110
4114
|
},
|
|
4111
|
-
`${
|
|
4115
|
+
`${c.code}${l}`
|
|
4112
4116
|
);
|
|
4113
4117
|
case Te.radioList:
|
|
4114
4118
|
return /* @__PURE__ */ i(
|
|
4115
4119
|
"div",
|
|
4116
4120
|
{
|
|
4117
4121
|
className: De.inputContainer,
|
|
4118
|
-
style: { ...
|
|
4122
|
+
style: { ...d },
|
|
4119
4123
|
children: /* @__PURE__ */ i(
|
|
4120
4124
|
js,
|
|
4121
4125
|
{
|
|
4122
|
-
input:
|
|
4126
|
+
input: c,
|
|
4123
4127
|
reactHookFormInstance: s
|
|
4124
4128
|
}
|
|
4125
4129
|
)
|
|
4126
4130
|
},
|
|
4127
|
-
`${
|
|
4131
|
+
`${c.code}${l}`
|
|
4128
4132
|
);
|
|
4129
4133
|
case Te.rankingSlider:
|
|
4130
4134
|
return /* @__PURE__ */ i(
|
|
4131
4135
|
"div",
|
|
4132
4136
|
{
|
|
4133
4137
|
className: De.inputContainer,
|
|
4134
|
-
style: { ...
|
|
4138
|
+
style: { ...d },
|
|
4135
4139
|
children: /* @__PURE__ */ i(
|
|
4136
4140
|
b2,
|
|
4137
4141
|
{
|
|
4138
|
-
input:
|
|
4142
|
+
input: c,
|
|
4139
4143
|
reactHookFormInstance: s
|
|
4140
4144
|
}
|
|
4141
4145
|
)
|
|
4142
4146
|
},
|
|
4143
|
-
`${
|
|
4147
|
+
`${c.code}${l}`
|
|
4144
4148
|
);
|
|
4145
4149
|
case Te.textDescription:
|
|
4146
4150
|
return /* @__PURE__ */ i(
|
|
4147
4151
|
tr,
|
|
4148
4152
|
{
|
|
4149
|
-
input:
|
|
4150
|
-
inputContainerStyles:
|
|
4153
|
+
input: c,
|
|
4154
|
+
inputContainerStyles: d
|
|
4151
4155
|
},
|
|
4152
|
-
`${
|
|
4156
|
+
`${c.code}${l}`
|
|
4153
4157
|
);
|
|
4154
4158
|
default:
|
|
4155
|
-
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("h4", { children: "Default" }) }, `${
|
|
4159
|
+
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("h4", { children: "Default" }) }, `${c.code}${l}`);
|
|
4156
4160
|
}
|
|
4157
4161
|
}) });
|
|
4158
4162
|
}, nr = "_categorySelector_1guuv_2", ir = "_sectionItemActive_1guuv_16", sr = "_sectionItem_1guuv_16", rr = "_sectionItemError_1guuv_32", qe = {
|
|
@@ -4162,35 +4166,35 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4162
4166
|
sectionItemError: rr
|
|
4163
4167
|
}, Ut = ({
|
|
4164
4168
|
categories: n,
|
|
4165
|
-
onChange:
|
|
4169
|
+
onChange: d,
|
|
4166
4170
|
activeCategory: s,
|
|
4167
4171
|
activeColor: r,
|
|
4168
4172
|
containerStyles: t = {},
|
|
4169
4173
|
categoriesWithErrors: o = []
|
|
4170
4174
|
}) => {
|
|
4171
|
-
const { t:
|
|
4172
|
-
|
|
4175
|
+
const { t: c } = A(), l = (a) => {
|
|
4176
|
+
d(a);
|
|
4173
4177
|
};
|
|
4174
4178
|
return /* @__PURE__ */ i(
|
|
4175
4179
|
"div",
|
|
4176
4180
|
{
|
|
4177
4181
|
className: qe.categorySelector,
|
|
4178
4182
|
style: t ? { ...t } : {},
|
|
4179
|
-
children: n.map((
|
|
4180
|
-
const { id:
|
|
4183
|
+
children: n.map((a, u) => {
|
|
4184
|
+
const { id: f, label: m } = a, g = s == f, p = o.includes(f);
|
|
4181
4185
|
return /* @__PURE__ */ i(
|
|
4182
4186
|
"button",
|
|
4183
4187
|
{
|
|
4184
|
-
className: `${qe.sectionItem} ${
|
|
4188
|
+
className: `${qe.sectionItem} ${g ? qe.sectionItemActive : ""} ${p ? qe.sectionItemError : ""}`,
|
|
4185
4189
|
type: "button",
|
|
4186
|
-
style: { backgroundColor:
|
|
4187
|
-
onClick: () =>
|
|
4190
|
+
style: { backgroundColor: g ? r : "inherit" },
|
|
4191
|
+
onClick: () => l(f),
|
|
4188
4192
|
children: /* @__PURE__ */ i(
|
|
4189
4193
|
"span",
|
|
4190
4194
|
{
|
|
4191
|
-
style: { color:
|
|
4195
|
+
style: { color: g ? "white" : "inherit" },
|
|
4192
4196
|
className: qe.sectionLabel,
|
|
4193
|
-
children:
|
|
4197
|
+
children: c(m)
|
|
4194
4198
|
}
|
|
4195
4199
|
)
|
|
4196
4200
|
},
|
|
@@ -4201,18 +4205,18 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4201
4205
|
);
|
|
4202
4206
|
}, to = ({
|
|
4203
4207
|
reactHookFormInstance: n,
|
|
4204
|
-
formObject:
|
|
4208
|
+
formObject: d,
|
|
4205
4209
|
CategoryComponent: s,
|
|
4206
4210
|
inputContainerStyles: r,
|
|
4207
4211
|
generalError: t,
|
|
4208
4212
|
errorColor: o = "red",
|
|
4209
|
-
submitButtonLabel:
|
|
4210
|
-
submitButtonStyles:
|
|
4211
|
-
showCategorySelector:
|
|
4213
|
+
submitButtonLabel: c = "Submit",
|
|
4214
|
+
submitButtonStyles: l = { width: 325 },
|
|
4215
|
+
showCategorySelector: a = !0,
|
|
4212
4216
|
defaultCategory: u = null,
|
|
4213
|
-
categoryLabel:
|
|
4217
|
+
categoryLabel: f = "Select Category",
|
|
4214
4218
|
activeCategory: m = null,
|
|
4215
|
-
activeCategoryColor:
|
|
4219
|
+
activeCategoryColor: g = "#b32f5d",
|
|
4216
4220
|
categoriesWithErrors: p = [],
|
|
4217
4221
|
onSubmit: y = (b) => console.log("Form submitted with: ", b)
|
|
4218
4222
|
}) => {
|
|
@@ -4220,25 +4224,25 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4220
4224
|
O(() => {
|
|
4221
4225
|
o && je.setState(() => ({ errorColor: o }));
|
|
4222
4226
|
}, [o]);
|
|
4223
|
-
const w = Fe(() =>
|
|
4227
|
+
const w = Fe(() => d ? d.filter((k) => k.category).map((k) => {
|
|
4224
4228
|
var T;
|
|
4225
4229
|
return {
|
|
4226
4230
|
id: k.categoryId,
|
|
4227
4231
|
label: k.category,
|
|
4228
4232
|
hasSubcategories: ((T = k.subcategories) == null ? void 0 : T.length) > 0
|
|
4229
4233
|
};
|
|
4230
|
-
}) : [], [
|
|
4231
|
-
const T =
|
|
4234
|
+
}) : [], [d]), L = (k) => {
|
|
4235
|
+
const T = d == null ? void 0 : d.find((F) => F.categoryId === k);
|
|
4232
4236
|
return (T == null ? void 0 : T.subcategories) || [];
|
|
4233
|
-
}, [
|
|
4237
|
+
}, [C, N] = I(
|
|
4234
4238
|
m || u || null
|
|
4235
4239
|
), [x, S] = I(null);
|
|
4236
4240
|
O(() => {
|
|
4237
|
-
!
|
|
4238
|
-
}, [w,
|
|
4239
|
-
const k = L(
|
|
4241
|
+
!C && w.length > 0 && N(w[0].id);
|
|
4242
|
+
}, [w, C]), O(() => {
|
|
4243
|
+
const k = L(C);
|
|
4240
4244
|
!x && (k == null ? void 0 : k.length) > 0 && S(k[0].id);
|
|
4241
|
-
}, [
|
|
4245
|
+
}, [C, x, d]);
|
|
4242
4246
|
const $ = (k, T) => {
|
|
4243
4247
|
var F;
|
|
4244
4248
|
if (((F = k.subcategories) == null ? void 0 : F.length) > 0) {
|
|
@@ -4255,7 +4259,7 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4255
4259
|
categories: D,
|
|
4256
4260
|
categoriesWithErrors: p,
|
|
4257
4261
|
onChange: (B) => S(B),
|
|
4258
|
-
activeColor:
|
|
4262
|
+
activeColor: g
|
|
4259
4263
|
}
|
|
4260
4264
|
)
|
|
4261
4265
|
},
|
|
@@ -4332,20 +4336,20 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4332
4336
|
] }, k.categoryId);
|
|
4333
4337
|
};
|
|
4334
4338
|
return /* @__PURE__ */ h("form", { className: Re.formContainer, onSubmit: v(y), children: [
|
|
4335
|
-
|
|
4339
|
+
a && w.length > 0 && /* @__PURE__ */ i("div", { className: Re.categorySelectorContainer, children: /* @__PURE__ */ i(
|
|
4336
4340
|
Ut,
|
|
4337
4341
|
{
|
|
4338
|
-
activeCategory:
|
|
4342
|
+
activeCategory: C,
|
|
4339
4343
|
categories: w,
|
|
4340
4344
|
categoriesWithErrors: p,
|
|
4341
4345
|
onChange: (k) => {
|
|
4342
4346
|
N(k), S(null);
|
|
4343
4347
|
},
|
|
4344
|
-
activeColor:
|
|
4348
|
+
activeColor: g
|
|
4345
4349
|
}
|
|
4346
4350
|
) }),
|
|
4347
|
-
/* @__PURE__ */ i("div", { className: Re.formObjectContainer, children:
|
|
4348
|
-
const F = k.categoryId ===
|
|
4351
|
+
/* @__PURE__ */ i("div", { className: Re.formObjectContainer, children: d == null ? void 0 : d.map((k, T) => {
|
|
4352
|
+
const F = k.categoryId === C;
|
|
4349
4353
|
return k.category ? /* @__PURE__ */ i(
|
|
4350
4354
|
"div",
|
|
4351
4355
|
{
|
|
@@ -4369,7 +4373,7 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4369
4373
|
);
|
|
4370
4374
|
}) }),
|
|
4371
4375
|
/* @__PURE__ */ h("div", { className: Re.buttonContainer, children: [
|
|
4372
|
-
/* @__PURE__ */ i(it, { containerStyles:
|
|
4376
|
+
/* @__PURE__ */ i(it, { containerStyles: l, type: "submit", children: b(c) }),
|
|
4373
4377
|
/* @__PURE__ */ i(Ze, { errorMessage: t, errorColor: o })
|
|
4374
4378
|
] })
|
|
4375
4379
|
] });
|
|
@@ -4384,23 +4388,23 @@ const Ys = "_textDescriptionContainer_163pc_2", er = "_textDescriptionText_163pc
|
|
|
4384
4388
|
buttonWrapper: hr
|
|
4385
4389
|
}, mr = ({
|
|
4386
4390
|
onClose: n,
|
|
4387
|
-
icon:
|
|
4391
|
+
icon: d,
|
|
4388
4392
|
message: s,
|
|
4389
4393
|
submessage: r,
|
|
4390
4394
|
buttons: t,
|
|
4391
4395
|
maxHeight: o = "450px",
|
|
4392
|
-
maxWidth:
|
|
4396
|
+
maxWidth: c = "450px"
|
|
4393
4397
|
}) => /* @__PURE__ */ i("div", { className: fe.overlay, children: /* @__PURE__ */ h(
|
|
4394
4398
|
"div",
|
|
4395
4399
|
{
|
|
4396
4400
|
className: fe.modal,
|
|
4397
|
-
style: { maxHeight: o, maxWidth:
|
|
4401
|
+
style: { maxHeight: o, maxWidth: c },
|
|
4398
4402
|
children: [
|
|
4399
4403
|
/* @__PURE__ */ i("button", { className: fe.closeButton, onClick: n, "aria-label": "Close modal", children: "✕" }),
|
|
4400
|
-
|
|
4404
|
+
d && /* @__PURE__ */ i("img", { src: d, alt: "icon", className: fe.icon }),
|
|
4401
4405
|
/* @__PURE__ */ i("p", { className: fe.message, children: s }),
|
|
4402
4406
|
r && /* @__PURE__ */ i("p", { className: fe.submessage, children: r }),
|
|
4403
|
-
t.length > 0 && /* @__PURE__ */ i("div", { className: fe.buttonsContainer, children: t.map((
|
|
4407
|
+
t.length > 0 && /* @__PURE__ */ i("div", { className: fe.buttonsContainer, children: t.map((l, a) => /* @__PURE__ */ i("div", { className: fe.buttonWrapper, children: l }, a)) })
|
|
4404
4408
|
]
|
|
4405
4409
|
}
|
|
4406
4410
|
) });
|
|
@@ -4430,7 +4434,7 @@ const gr = "_stepsContainer_1cyua_3", Cr = "_stepWrapper_1cyua_9", fr = "_circle
|
|
|
4430
4434
|
label: vr,
|
|
4431
4435
|
labelActive: xr,
|
|
4432
4436
|
connector: wr
|
|
4433
|
-
}, _2 = ({ steps: n, activeColor:
|
|
4437
|
+
}, _2 = ({ steps: n, activeColor: d }) => /* @__PURE__ */ i("div", { className: ue.stepsContainer, children: n.map((s, r) => {
|
|
4434
4438
|
const t = s.status === "active", o = s.status === "completed";
|
|
4435
4439
|
return /* @__PURE__ */ h("div", { className: ue.stepWrapper, children: [
|
|
4436
4440
|
/* @__PURE__ */ h("div", { className: ue.circleContainer, children: [
|
|
@@ -4440,7 +4444,7 @@ const gr = "_stepsContainer_1cyua_3", Cr = "_stepWrapper_1cyua_9", fr = "_circle
|
|
|
4440
4444
|
className: `${ue.circle}
|
|
4441
4445
|
${t ? ue.active : ""}
|
|
4442
4446
|
${o ? ue.completed : ""}`,
|
|
4443
|
-
style: t ? { backgroundColor:
|
|
4447
|
+
style: t ? { backgroundColor: d } : {},
|
|
4444
4448
|
onClick: s.onClick,
|
|
4445
4449
|
children: r + 1
|
|
4446
4450
|
}
|
|
@@ -4472,7 +4476,7 @@ _2.defaultProps = {
|
|
|
4472
4476
|
};
|
|
4473
4477
|
const Nr = "_statusTextContainer_ch14r_2", kr = {
|
|
4474
4478
|
statusTextContainer: Nr
|
|
4475
|
-
}, v2 = ({ text: n, color:
|
|
4479
|
+
}, v2 = ({ text: n, color: d }) => /* @__PURE__ */ i("div", { className: kr.statusTextContainer, style: { background: d }, children: /* @__PURE__ */ i("span", { children: n }) });
|
|
4476
4480
|
v2.propTypes = {
|
|
4477
4481
|
text: e.string,
|
|
4478
4482
|
color: e.string
|
|
@@ -4488,20 +4492,20 @@ const $r = "_buttonsContainer_1c7dw_2", Sr = "_button_1c7dw_2", Lr = "_active_1c
|
|
|
4488
4492
|
}, Mr = ({
|
|
4489
4493
|
buttons: n = []
|
|
4490
4494
|
}) => {
|
|
4491
|
-
const { t:
|
|
4495
|
+
const { t: d } = A();
|
|
4492
4496
|
return /* @__PURE__ */ i("div", { className: `${Qe.buttonsContainer}`, children: n.map((s, r) => {
|
|
4493
4497
|
const {
|
|
4494
4498
|
isActive: t,
|
|
4495
4499
|
name: o,
|
|
4496
|
-
onClick:
|
|
4500
|
+
onClick: c
|
|
4497
4501
|
} = s;
|
|
4498
4502
|
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
4499
4503
|
"button",
|
|
4500
4504
|
{
|
|
4501
|
-
onClick:
|
|
4505
|
+
onClick: c,
|
|
4502
4506
|
className: `${Qe.button}
|
|
4503
4507
|
${t && Qe.active}`,
|
|
4504
|
-
children: /* @__PURE__ */ i("span", { className: Qe.buttonName, children:
|
|
4508
|
+
children: /* @__PURE__ */ i("span", { className: Qe.buttonName, children: d(o) })
|
|
4505
4509
|
}
|
|
4506
4510
|
) }, r);
|
|
4507
4511
|
}) });
|
|
@@ -4523,23 +4527,23 @@ const Tr = "_switchContainer_194wl_2", Dr = "_labelRight_194wl_9", Br = "_labelL
|
|
|
4523
4527
|
switch: "_switch_194wl_2",
|
|
4524
4528
|
slider: Vr,
|
|
4525
4529
|
disabled: Fr
|
|
4526
|
-
}, Ar = ({ input: n, reactHookFormInstance:
|
|
4530
|
+
}, Ar = ({ input: n, reactHookFormInstance: d, onChange: s, onoff: r = !0 }) => {
|
|
4527
4531
|
const {
|
|
4528
4532
|
code: t,
|
|
4529
4533
|
labelLeft: o,
|
|
4530
|
-
labelRight:
|
|
4531
|
-
defValue:
|
|
4532
|
-
colorOn:
|
|
4534
|
+
labelRight: c,
|
|
4535
|
+
defValue: l = !1,
|
|
4536
|
+
colorOn: a = "#5A514D",
|
|
4533
4537
|
disabled: u = !1,
|
|
4534
|
-
width:
|
|
4535
|
-
} = n, { t: m } = A(), { control:
|
|
4538
|
+
width: f = 240
|
|
4539
|
+
} = n, { t: m } = A(), { control: g } = d || {}, [p, y] = I(l), b = (_) => {
|
|
4536
4540
|
y(_), s && s(_);
|
|
4537
|
-
}, v = (_, w) => /* @__PURE__ */ h("div", { className: Be.switchContainer, style: { width: `${
|
|
4541
|
+
}, v = (_, w) => /* @__PURE__ */ h("div", { className: Be.switchContainer, style: { width: `${f}px` }, children: [
|
|
4538
4542
|
o && /* @__PURE__ */ i(
|
|
4539
4543
|
"span",
|
|
4540
4544
|
{
|
|
4541
4545
|
className: Be.labelLeft,
|
|
4542
|
-
style: { width: `${(
|
|
4546
|
+
style: { width: `${(f - 74) / 2}px` },
|
|
4543
4547
|
children: m(o)
|
|
4544
4548
|
}
|
|
4545
4549
|
),
|
|
@@ -4558,19 +4562,19 @@ const Tr = "_switchContainer_194wl_2", Dr = "_labelRight_194wl_9", Br = "_labelL
|
|
|
4558
4562
|
{
|
|
4559
4563
|
className: Be.slider,
|
|
4560
4564
|
style: {
|
|
4561
|
-
"--switch-thumb-color": r ? _ ?
|
|
4565
|
+
"--switch-thumb-color": r ? _ ? a : "#ccc" : a
|
|
4562
4566
|
}
|
|
4563
4567
|
}
|
|
4564
4568
|
)
|
|
4565
4569
|
] }),
|
|
4566
|
-
|
|
4570
|
+
c && /* @__PURE__ */ i("span", { className: Be.labelRight, style: { width: `${(f - 74) / 2}px` }, children: m(c) })
|
|
4567
4571
|
] });
|
|
4568
|
-
return
|
|
4572
|
+
return d ? /* @__PURE__ */ i(
|
|
4569
4573
|
Pe,
|
|
4570
4574
|
{
|
|
4571
4575
|
name: t,
|
|
4572
|
-
control:
|
|
4573
|
-
defaultValue:
|
|
4576
|
+
control: g,
|
|
4577
|
+
defaultValue: l,
|
|
4574
4578
|
render: ({ field: _ }) => v(_.value, _.onChange)
|
|
4575
4579
|
}
|
|
4576
4580
|
) : v(p, b);
|
|
@@ -4592,7 +4596,7 @@ const Or = "_overlay_1xyw2_2", Rr = "_popup_1xyw2_15", Ir = "_gif_1xyw2_25", Er
|
|
|
4592
4596
|
popup: Rr,
|
|
4593
4597
|
gif: Ir,
|
|
4594
4598
|
message: Er
|
|
4595
|
-
}, qr = ({ gifSrc: n, message:
|
|
4599
|
+
}, qr = ({ gifSrc: n, message: d }) => /* @__PURE__ */ i("div", { className: Je.overlay, children: /* @__PURE__ */ h("div", { className: Je.popup, children: [
|
|
4596
4600
|
n && /* @__PURE__ */ i(
|
|
4597
4601
|
"img",
|
|
4598
4602
|
{
|
|
@@ -4601,7 +4605,7 @@ const Or = "_overlay_1xyw2_2", Rr = "_popup_1xyw2_15", Ir = "_gif_1xyw2_25", Er
|
|
|
4601
4605
|
className: Je.gif
|
|
4602
4606
|
}
|
|
4603
4607
|
),
|
|
4604
|
-
|
|
4608
|
+
d && /* @__PURE__ */ i("p", { className: Je.message, children: d })
|
|
4605
4609
|
] }) });
|
|
4606
4610
|
qr.propTypes = {
|
|
4607
4611
|
gifSrc: e.string,
|
|
@@ -4618,13 +4622,13 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4618
4622
|
button: Ur
|
|
4619
4623
|
}, x2 = ({
|
|
4620
4624
|
options: n,
|
|
4621
|
-
backgroundColor:
|
|
4625
|
+
backgroundColor: d,
|
|
4622
4626
|
textColor: s,
|
|
4623
4627
|
iconColor: r
|
|
4624
4628
|
}) => {
|
|
4625
|
-
const [t, o] = I(!1),
|
|
4629
|
+
const [t, o] = I(!1), c = () => o((y) => !y), l = () => o(!1), a = 7, u = t ? 11 : 0, f = t ? 13 : 0, m = t ? -11.51666 : 0, g = t ? -13 : 0, p = "0.35s";
|
|
4626
4630
|
return /* @__PURE__ */ h("div", { className: ae.container, children: [
|
|
4627
|
-
/* @__PURE__ */ i("button", { onClick:
|
|
4631
|
+
/* @__PURE__ */ i("button", { onClick: c, className: ae.burger, children: /* @__PURE__ */ h(
|
|
4628
4632
|
"svg",
|
|
4629
4633
|
{
|
|
4630
4634
|
width: "40",
|
|
@@ -4640,27 +4644,27 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4640
4644
|
transform: `translateY(${u}px)`,
|
|
4641
4645
|
transition: `transform ${p} cubic-bezier(0.42, 0, 0.58, 1)`
|
|
4642
4646
|
},
|
|
4643
|
-
children: /* @__PURE__ */ i("circle", { cx: "20", cy: "9", r:
|
|
4647
|
+
children: /* @__PURE__ */ i("circle", { cx: "20", cy: "9", r: a, fill: r })
|
|
4644
4648
|
}
|
|
4645
4649
|
),
|
|
4646
4650
|
/* @__PURE__ */ i(
|
|
4647
4651
|
"g",
|
|
4648
4652
|
{
|
|
4649
4653
|
style: {
|
|
4650
|
-
transform: `translate(${
|
|
4654
|
+
transform: `translate(${f}px, ${m}px)`,
|
|
4651
4655
|
transition: `transform ${p} cubic-bezier(0.42, 0, 0.58, 1)`
|
|
4652
4656
|
},
|
|
4653
|
-
children: /* @__PURE__ */ i("circle", { cx: "7", cy: "31.51666", r:
|
|
4657
|
+
children: /* @__PURE__ */ i("circle", { cx: "7", cy: "31.51666", r: a, fill: r })
|
|
4654
4658
|
}
|
|
4655
4659
|
),
|
|
4656
4660
|
/* @__PURE__ */ i(
|
|
4657
4661
|
"g",
|
|
4658
4662
|
{
|
|
4659
4663
|
style: {
|
|
4660
|
-
transform: `translate(${
|
|
4664
|
+
transform: `translate(${g}px, ${m}px)`,
|
|
4661
4665
|
transition: `transform ${p} cubic-bezier(0.42, 0, 0.58, 1)`
|
|
4662
4666
|
},
|
|
4663
|
-
children: /* @__PURE__ */ i("circle", { cx: "33", cy: "31.51666", r:
|
|
4667
|
+
children: /* @__PURE__ */ i("circle", { cx: "33", cy: "31.51666", r: a, fill: r })
|
|
4664
4668
|
}
|
|
4665
4669
|
),
|
|
4666
4670
|
/* @__PURE__ */ i(
|
|
@@ -4676,7 +4680,7 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4676
4680
|
/* @__PURE__ */ h(
|
|
4677
4681
|
"g",
|
|
4678
4682
|
{
|
|
4679
|
-
stroke:
|
|
4683
|
+
stroke: d,
|
|
4680
4684
|
strokeWidth: "2",
|
|
4681
4685
|
strokeLinecap: "round",
|
|
4682
4686
|
style: {
|
|
@@ -4696,14 +4700,14 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4696
4700
|
"div",
|
|
4697
4701
|
{
|
|
4698
4702
|
className: `${ae.menu} ${t ? ae.menuOpen : ae.menuClose}`,
|
|
4699
|
-
style: { backgroundColor:
|
|
4703
|
+
style: { backgroundColor: d, color: s },
|
|
4700
4704
|
children: /* @__PURE__ */ i("ul", { className: ae.list, children: n.map((y, b) => /* @__PURE__ */ h("li", { className: ae.item, children: [
|
|
4701
4705
|
y.url && /* @__PURE__ */ i(
|
|
4702
4706
|
t2,
|
|
4703
4707
|
{
|
|
4704
4708
|
to: y.url,
|
|
4705
4709
|
className: ({ isActive: v }) => `${ae.link} ${v ? ae.active : ""}`,
|
|
4706
|
-
onClick:
|
|
4710
|
+
onClick: l,
|
|
4707
4711
|
style: { color: s },
|
|
4708
4712
|
children: y.name
|
|
4709
4713
|
}
|
|
@@ -4713,7 +4717,7 @@ const zr = "_container_1pl8d_3", Pr = "_burger_1pl8d_10", Zr = "_menu_1pl8d_21",
|
|
|
4713
4717
|
{
|
|
4714
4718
|
className: ae.button,
|
|
4715
4719
|
onClick: () => {
|
|
4716
|
-
y.onclick(),
|
|
4720
|
+
y.onclick(), l();
|
|
4717
4721
|
},
|
|
4718
4722
|
children: y.name
|
|
4719
4723
|
}
|
|
@@ -4740,18 +4744,18 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4740
4744
|
svg: Xr
|
|
4741
4745
|
}, Qr = ({
|
|
4742
4746
|
data: n,
|
|
4743
|
-
keys:
|
|
4747
|
+
keys: d,
|
|
4744
4748
|
colors: s,
|
|
4745
4749
|
width: r = "100%",
|
|
4746
4750
|
height: t = 300,
|
|
4747
4751
|
margin: o = { top: 20, right: 20, bottom: 60, left: 60 },
|
|
4748
|
-
className:
|
|
4749
|
-
showXAxisLabels:
|
|
4750
|
-
showYAxisLabels:
|
|
4752
|
+
className: c = "",
|
|
4753
|
+
showXAxisLabels: l = !0,
|
|
4754
|
+
showYAxisLabels: a = !0,
|
|
4751
4755
|
showGrid: u = !0,
|
|
4752
|
-
xAxisTickRotation:
|
|
4753
|
-
yAxisTickFormat: m = (
|
|
4754
|
-
barPadding:
|
|
4756
|
+
xAxisTickRotation: f = -90,
|
|
4757
|
+
yAxisTickFormat: m = (C) => C.toLocaleString("es-ES"),
|
|
4758
|
+
barPadding: g = 0.1,
|
|
4755
4759
|
groupPadding: p = 0.05,
|
|
4756
4760
|
animationDuration: y = 750,
|
|
4757
4761
|
onBarHover: b,
|
|
@@ -4760,7 +4764,7 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4760
4764
|
xAxisLabel: w,
|
|
4761
4765
|
yAxisLabel: L
|
|
4762
4766
|
}) => {
|
|
4763
|
-
const
|
|
4767
|
+
const C = Y(), N = Y(), [x, S] = I({ width: 0, height: 0 });
|
|
4764
4768
|
return O(() => {
|
|
4765
4769
|
const $ = () => {
|
|
4766
4770
|
if (N.current) {
|
|
@@ -4774,22 +4778,22 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4774
4778
|
return $(), window.addEventListener("resize", $), () => window.removeEventListener("resize", $);
|
|
4775
4779
|
}, [r, t]), O(() => {
|
|
4776
4780
|
if (!n || n.length === 0 || x.width === 0) return;
|
|
4777
|
-
const $ = Ne(
|
|
4781
|
+
const $ = Ne(C.current), k = x.width, T = x.height, F = k - o.left - o.right, D = T - o.top - o.bottom;
|
|
4778
4782
|
if (F <= 0 || D <= 0) return;
|
|
4779
|
-
const B = n.map((V) => V.anyo || V.year || V.x), R =
|
|
4783
|
+
const B = n.map((V) => V.anyo || V.year || V.x), R = d, 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(g), z = 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 || {}));
|
|
4780
4784
|
$.selectAll("*").remove();
|
|
4781
4785
|
const me = $.append("g").attr("transform", `translate(${o.left},${o.top})`);
|
|
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),
|
|
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), l && (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(${f})`).style("text-anchor", f < 0 ? "end" : "middle").style("font-size", "12px").style("fill", "#605B56"), w && me.append("text").attr(
|
|
4783
4787
|
"transform",
|
|
4784
4788
|
`translate(${F / 2}, ${D + o.bottom - 5})`
|
|
4785
|
-
).style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(w)),
|
|
4789
|
+
).style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(w)), a && (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));
|
|
4786
4790
|
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(
|
|
4787
4791
|
(V) => R.map((te) => ({
|
|
4788
4792
|
key: te,
|
|
4789
4793
|
value: V[te],
|
|
4790
4794
|
data: V
|
|
4791
4795
|
}))
|
|
4792
|
-
).enter().append("rect").attr("class", "bar").attr("x", (V) =>
|
|
4796
|
+
).enter().append("rect").attr("class", "bar").attr("x", (V) => z(V.key)).attr("y", D).attr("width", z.bandwidth()).attr("height", 0).attr("fill", (V) => he(V.key)).style("cursor", b || v ? "pointer" : "default");
|
|
4793
4797
|
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) {
|
|
4794
4798
|
Ne(this).style("opacity", 0.8), b(V, te);
|
|
4795
4799
|
}).on("mouseout", function(V, te) {
|
|
@@ -4797,16 +4801,16 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4797
4801
|
}), v && Se.on("click", v);
|
|
4798
4802
|
}, [
|
|
4799
4803
|
n,
|
|
4800
|
-
|
|
4804
|
+
d,
|
|
4801
4805
|
s,
|
|
4802
4806
|
x,
|
|
4803
4807
|
o,
|
|
4804
|
-
|
|
4808
|
+
g,
|
|
4805
4809
|
p,
|
|
4806
|
-
a,
|
|
4807
4810
|
l,
|
|
4811
|
+
a,
|
|
4808
4812
|
u,
|
|
4809
|
-
|
|
4813
|
+
f,
|
|
4810
4814
|
m,
|
|
4811
4815
|
y,
|
|
4812
4816
|
b,
|
|
@@ -4818,12 +4822,12 @@ const Gr = "_svgContainer_1rxoe_2", Xr = "_svg_1rxoe_2", Gt = {
|
|
|
4818
4822
|
"div",
|
|
4819
4823
|
{
|
|
4820
4824
|
ref: N,
|
|
4821
|
-
className: `${Gt.svgContainer} ${
|
|
4825
|
+
className: `${Gt.svgContainer} ${c}`,
|
|
4822
4826
|
style: { width: r, height: t + o.top + o.bottom },
|
|
4823
4827
|
children: /* @__PURE__ */ i(
|
|
4824
4828
|
"svg",
|
|
4825
4829
|
{
|
|
4826
|
-
ref:
|
|
4830
|
+
ref: C,
|
|
4827
4831
|
className: Gt.svg,
|
|
4828
4832
|
width: x.width,
|
|
4829
4833
|
height: x.height
|
|
@@ -4867,19 +4871,19 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4867
4871
|
svg: Yr
|
|
4868
4872
|
}, e1 = ({
|
|
4869
4873
|
data: n,
|
|
4870
|
-
keys:
|
|
4874
|
+
keys: d,
|
|
4871
4875
|
colors: s,
|
|
4872
4876
|
// Array of values to display as a line over the bars
|
|
4873
4877
|
lineData: r = null,
|
|
4874
4878
|
width: t = "100%",
|
|
4875
4879
|
height: o = 300,
|
|
4876
|
-
margin:
|
|
4877
|
-
className:
|
|
4878
|
-
showXAxisLabels:
|
|
4880
|
+
margin: c = { top: 20, right: 20, bottom: 60, left: 60 },
|
|
4881
|
+
className: l = "",
|
|
4882
|
+
showXAxisLabels: a = !0,
|
|
4879
4883
|
showYAxisLabels: u = !0,
|
|
4880
|
-
showGrid:
|
|
4884
|
+
showGrid: f = !0,
|
|
4881
4885
|
xAxisTickRotation: m = -90,
|
|
4882
|
-
yAxisTickFormat:
|
|
4886
|
+
yAxisTickFormat: g = ($) => $.toLocaleString("es-ES"),
|
|
4883
4887
|
barPadding: p = 0.4,
|
|
4884
4888
|
animationDuration: y = 750,
|
|
4885
4889
|
onBarHover: b,
|
|
@@ -4887,7 +4891,7 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4887
4891
|
title: _,
|
|
4888
4892
|
xAxisLabel: w,
|
|
4889
4893
|
yAxisLabel: L,
|
|
4890
|
-
stackOrder:
|
|
4894
|
+
stackOrder: C = "reverse",
|
|
4891
4895
|
// "reverse", "ascending", "descending", "insideOut", "none"
|
|
4892
4896
|
showTooltip: N = !0,
|
|
4893
4897
|
reverseKeys: x = !0,
|
|
@@ -4912,12 +4916,12 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4912
4916
|
return B(), window.addEventListener("resize", B), () => window.removeEventListener("resize", B);
|
|
4913
4917
|
}, [t, o]), O(() => {
|
|
4914
4918
|
if (!n || n.length === 0 || T.containerWidth === 0) return;
|
|
4915
|
-
const B = Ne($.current), { containerWidth: R, height: Z } = T, ee = R -
|
|
4916
|
-
if (
|
|
4919
|
+
const B = Ne($.current), { containerWidth: R, height: Z } = T, ee = R - c.left - c.right, H = n.length * S, z = Math.max(ee, H), ie = z + c.left + c.right, he = Z - c.top - c.bottom;
|
|
4920
|
+
if (z <= 0 || he <= 0) return;
|
|
4917
4921
|
B.attr("width", ie).attr("height", Z);
|
|
4918
|
-
const me = x ? [...
|
|
4922
|
+
const me = x ? [...d].reverse() : d, $e = [];
|
|
4919
4923
|
n.forEach((M) => {
|
|
4920
|
-
const
|
|
4924
|
+
const P = M.any || M.year || M.x, j = me.map((G) => ({
|
|
4921
4925
|
key: G,
|
|
4922
4926
|
value: Number(M[G]) || 0,
|
|
4923
4927
|
data: M
|
|
@@ -4934,7 +4938,7 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4934
4938
|
// El punto más bajo
|
|
4935
4939
|
height: ct,
|
|
4936
4940
|
data: G.data,
|
|
4937
|
-
xKey:
|
|
4941
|
+
xKey: P
|
|
4938
4942
|
}), at = ce;
|
|
4939
4943
|
});
|
|
4940
4944
|
let lt = 0;
|
|
@@ -4947,7 +4951,7 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4947
4951
|
y1: Math.max(ye, ce),
|
|
4948
4952
|
height: ct,
|
|
4949
4953
|
data: G.data,
|
|
4950
|
-
xKey:
|
|
4954
|
+
xKey: P
|
|
4951
4955
|
}), lt = ce;
|
|
4952
4956
|
});
|
|
4953
4957
|
});
|
|
@@ -4960,13 +4964,13 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4960
4964
|
const te = [
|
|
4961
4965
|
Math.min(Se[0], V[0]),
|
|
4962
4966
|
Math.max(Se[1], V[1])
|
|
4963
|
-
], re = ft().domain(n.map((M) => M.any || M.year || M.x)).range([0,
|
|
4964
|
-
const j = re(M.any || M.year || M.x) + re.bandwidth() / 2, ot = se(r[
|
|
4967
|
+
], re = ft().domain(n.map((M) => M.any || M.year || M.x)).range([0, z]).padding(p), se = Jt().domain([te[0], te[1]]).nice(6).range([he, 0]), w2 = Yt().domain(d).range(Array.isArray(s) ? s : Object.values(s || {})), He = r && r.length > 0 ? n.map((M, P) => {
|
|
4968
|
+
const j = re(M.any || M.year || M.x) + re.bandwidth() / 2, ot = se(r[P] || 0);
|
|
4965
4969
|
return { x: j, y: ot };
|
|
4966
4970
|
}) : [];
|
|
4967
4971
|
B.selectAll("*").remove();
|
|
4968
|
-
const oe = B.append("g").attr("transform", `translate(${
|
|
4969
|
-
_ && B.append("text").attr("x", svgWidth / 2).attr("y",
|
|
4972
|
+
const oe = B.append("g").attr("transform", `translate(${c.left},${c.top})`);
|
|
4973
|
+
_ && B.append("text").attr("x", svgWidth / 2).attr("y", c.top / 2).attr("text-anchor", "middle").style("font-size", "16px").style("font-weight", "bold").style("fill", "#333").text(_), f && oe.append("g").attr("class", "grid").selectAll("line").data(se.ticks(6)).enter().append("line").attr("x1", 0).attr("x2", z).attr("y1", (M) => se(M)).attr("y2", (M) => se(M)).style("stroke", "#e0e0e0").style("stroke-width", 0.5), a && (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(
|
|
4970
4974
|
"x",
|
|
4971
4975
|
(j) => re(j.any || j.year || j.x) + re.bandwidth() / 2
|
|
4972
4976
|
).attr("y", 19).style(
|
|
@@ -4977,8 +4981,8 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4977
4981
|
(j) => `rotate(${m} ${re(j.any || j.year || j.x) + re.bandwidth() / 2} 15)`
|
|
4978
4982
|
).text((j) => j.any || j.year || j.x), w && oe.append("text").attr(
|
|
4979
4983
|
"transform",
|
|
4980
|
-
`translate(${
|
|
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(
|
|
4984
|
+
`translate(${z / 2}, ${he + c.bottom - 5})`
|
|
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(g)).call((M) => M.select(".domain").remove()), oe.append("g").attr("class", "y-ticks").attr("transform", `translate(${z}, 0)`).call(yt(se).ticks(6).tickSizeInner(z)).call((M) => M.select(".domain").remove()).call((M) => M.selectAll(".tick text").remove()), L && oe.append("text").attr("transform", "rotate(-90)").attr("y", 0 - c.left).attr("x", 0 - he / 2).attr("dy", "1em").style("text-anchor", "middle").style("font-size", "14px").style("fill", "#333").text(L));
|
|
4982
4986
|
let le;
|
|
4983
4987
|
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"));
|
|
4984
4988
|
const st = oe.selectAll(".segment").data($e, (M) => `${M.xKey}-${M.key}`);
|
|
@@ -4987,65 +4991,65 @@ const Jr = "_svgContainer_7fkic_2", Yr = "_svg_7fkic_2", Xt = {
|
|
|
4987
4991
|
"cursor",
|
|
4988
4992
|
b || v || N ? "pointer" : "default"
|
|
4989
4993
|
).merge(st);
|
|
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,
|
|
4991
|
-
const j =
|
|
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, P) {
|
|
4995
|
+
const j = P.value;
|
|
4992
4996
|
N && le && le.style("visibility", "visible").html(`
|
|
4993
|
-
<strong>${D(
|
|
4994
|
-
${
|
|
4995
|
-
${
|
|
4997
|
+
<strong>${D(P.key)}</strong><br/>
|
|
4998
|
+
${P.xKey}<br/>
|
|
4999
|
+
${g(j)}
|
|
4996
5000
|
`), Ne(this).style("opacity", 0.8), b && b(M, {
|
|
4997
|
-
key:
|
|
5001
|
+
key: P.key,
|
|
4998
5002
|
value: j,
|
|
4999
|
-
data:
|
|
5003
|
+
data: P.data
|
|
5000
5004
|
});
|
|
5001
5005
|
}).on("mousemove", function(M) {
|
|
5002
5006
|
N && le && le.style("top", M.pageY - 10 + "px").style("left", M.pageX + 10 + "px");
|
|
5003
5007
|
}).on("mouseout", function() {
|
|
5004
5008
|
N && le && le.style("visibility", "hidden"), Ne(this).style("opacity", 1);
|
|
5005
|
-
}), v && rt.on("click", function(M,
|
|
5006
|
-
const j =
|
|
5009
|
+
}), v && rt.on("click", function(M, P) {
|
|
5010
|
+
const j = P.value;
|
|
5007
5011
|
v(M, {
|
|
5008
|
-
key:
|
|
5012
|
+
key: P.key,
|
|
5009
5013
|
value: j,
|
|
5010
|
-
data:
|
|
5014
|
+
data: P.data
|
|
5011
5015
|
});
|
|
5012
5016
|
}), He && He.length > 1) {
|
|
5013
|
-
const M = $2().x((
|
|
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", (
|
|
5017
|
+
const M = $2().x((P) => P.x).y((P) => P.y).curve(S2);
|
|
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", (P) => P.x).attr("cy", (P) => P.y).attr("r", 4).attr("fill", "#ff6b6b").attr("stroke", "white").attr("stroke-width", 1);
|
|
5015
5019
|
}
|
|
5016
5020
|
return () => {
|
|
5017
5021
|
le && le.remove();
|
|
5018
5022
|
};
|
|
5019
5023
|
}, [
|
|
5020
5024
|
n,
|
|
5021
|
-
|
|
5025
|
+
d,
|
|
5022
5026
|
s,
|
|
5023
5027
|
r,
|
|
5024
5028
|
T,
|
|
5025
|
-
|
|
5029
|
+
c,
|
|
5026
5030
|
p,
|
|
5027
|
-
|
|
5031
|
+
a,
|
|
5028
5032
|
u,
|
|
5029
|
-
C,
|
|
5030
|
-
m,
|
|
5031
5033
|
f,
|
|
5034
|
+
m,
|
|
5035
|
+
g,
|
|
5032
5036
|
y,
|
|
5033
5037
|
b,
|
|
5034
5038
|
v,
|
|
5035
5039
|
_,
|
|
5036
5040
|
w,
|
|
5037
5041
|
L,
|
|
5038
|
-
|
|
5042
|
+
C,
|
|
5039
5043
|
N,
|
|
5040
5044
|
x
|
|
5041
5045
|
]), /* @__PURE__ */ i(
|
|
5042
5046
|
"div",
|
|
5043
5047
|
{
|
|
5044
5048
|
ref: k,
|
|
5045
|
-
className: `${Xt.svgContainer} ${
|
|
5049
|
+
className: `${Xt.svgContainer} ${l}`,
|
|
5046
5050
|
style: {
|
|
5047
5051
|
width: t,
|
|
5048
|
-
height: o +
|
|
5052
|
+
height: o + c.top + c.bottom,
|
|
5049
5053
|
overflowX: "auto"
|
|
5050
5054
|
},
|
|
5051
5055
|
children: /* @__PURE__ */ i("svg", { ref: $, className: Xt.svg })
|
|
@@ -5117,37 +5121,37 @@ const t1 = "_externalContainer_1er0i_2", n1 = "_externalSintetic_1er0i_9", i1 =
|
|
|
5117
5121
|
return parseFloat(n.toFixed(3));
|
|
5118
5122
|
if (n === 0)
|
|
5119
5123
|
return n;
|
|
5120
|
-
}, g1 = (n,
|
|
5124
|
+
}, g1 = (n, d) => {
|
|
5121
5125
|
let s = 0;
|
|
5122
|
-
return
|
|
5126
|
+
return d.forEach((r) => {
|
|
5123
5127
|
r[n] && (s += r[n]);
|
|
5124
5128
|
}), s;
|
|
5125
5129
|
}, C1 = ({
|
|
5126
5130
|
data: n,
|
|
5127
|
-
keys:
|
|
5131
|
+
keys: d,
|
|
5128
5132
|
colors: s,
|
|
5129
5133
|
locales: r,
|
|
5130
5134
|
total: t = !1,
|
|
5131
5135
|
years: o = !1,
|
|
5132
|
-
activeGraphics:
|
|
5133
|
-
units:
|
|
5134
|
-
translate:
|
|
5136
|
+
activeGraphics: c = "ind",
|
|
5137
|
+
units: l = {},
|
|
5138
|
+
translate: a,
|
|
5135
5139
|
getTotal: u = g1,
|
|
5136
|
-
columnWidth:
|
|
5140
|
+
columnWidth: f = 50
|
|
5137
5141
|
}) => {
|
|
5138
|
-
const m =
|
|
5142
|
+
const m = a || ((p) => p), g = (p) => p === "demanda_red" || p === "reduccio_demanda_red" ? (l.demanda || "").replace("(", "").replace(")", "") : l[p] || "";
|
|
5139
5143
|
return /* @__PURE__ */ h(
|
|
5140
5144
|
"div",
|
|
5141
5145
|
{
|
|
5142
|
-
className: `${Q.externalContainer} ${
|
|
5146
|
+
className: `${Q.externalContainer} ${c === "sin" ? Q.externalSintetic : ""}`,
|
|
5143
5147
|
children: [
|
|
5144
5148
|
o === !0 && /* @__PURE__ */ h(et, { children: [
|
|
5145
5149
|
/* @__PURE__ */ i("div", {}),
|
|
5146
|
-
/* @__PURE__ */ i("div", { className: Q.yearTitles, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearTitle, style: { width:
|
|
5150
|
+
/* @__PURE__ */ i("div", { className: Q.yearTitles, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearTitle, style: { width: f }, children: p.anyo }, y)) })
|
|
5147
5151
|
] }),
|
|
5148
|
-
/* @__PURE__ */ i("div", { className: Q.titles, children:
|
|
5152
|
+
/* @__PURE__ */ i("div", { className: Q.titles, children: d.map((p, y) => /* @__PURE__ */ h("div", { className: Q.titleContainer, children: [
|
|
5149
5153
|
m(r[p]),
|
|
5150
|
-
|
|
5154
|
+
c !== "sin" && /* @__PURE__ */ i(
|
|
5151
5155
|
"span",
|
|
5152
5156
|
{
|
|
5153
5157
|
className: Q.circle,
|
|
@@ -5155,7 +5159,7 @@ const t1 = "_externalContainer_1er0i_2", n1 = "_externalSintetic_1er0i_9", i1 =
|
|
|
5155
5159
|
}
|
|
5156
5160
|
)
|
|
5157
5161
|
] }, y)) }),
|
|
5158
|
-
t === !0 && /* @__PURE__ */ i("div", { className: Q.totalContainer, children:
|
|
5162
|
+
t === !0 && /* @__PURE__ */ i("div", { className: Q.totalContainer, children: d.map((p, y) => {
|
|
5159
5163
|
var b;
|
|
5160
5164
|
return /* @__PURE__ */ h(
|
|
5161
5165
|
"div",
|
|
@@ -5164,13 +5168,13 @@ const t1 = "_externalContainer_1er0i_2", n1 = "_externalSintetic_1er0i_9", i1 =
|
|
|
5164
5168
|
children: [
|
|
5165
5169
|
(b = u(p, n)) == null ? void 0 : b.toLocaleString("es-ES"),
|
|
5166
5170
|
" ",
|
|
5167
|
-
|
|
5171
|
+
g(p)
|
|
5168
5172
|
]
|
|
5169
5173
|
},
|
|
5170
5174
|
y
|
|
5171
5175
|
);
|
|
5172
5176
|
}) }),
|
|
5173
|
-
/* @__PURE__ */ i("div", { className: Q.yearDatas, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearDataContainer, style: { width:
|
|
5177
|
+
/* @__PURE__ */ i("div", { className: Q.yearDatas, children: n.map((p, y) => /* @__PURE__ */ i("div", { className: Q.yearDataContainer, style: { width: f }, children: d.map(
|
|
5174
5178
|
(b, v) => {
|
|
5175
5179
|
var _, w;
|
|
5176
5180
|
return isNaN(p[b]) ? null : /* @__PURE__ */ i(
|
|
@@ -5219,17 +5223,17 @@ const f1 = "_speedGraphic_d1k72_2", Ct = {
|
|
|
5219
5223
|
speedGraphic: f1
|
|
5220
5224
|
}, y1 = ({
|
|
5221
5225
|
minValue: n = 0,
|
|
5222
|
-
maxValue:
|
|
5226
|
+
maxValue: d = 100,
|
|
5223
5227
|
value: s = 50,
|
|
5224
5228
|
title: r = !1,
|
|
5225
5229
|
percent: t = !1,
|
|
5226
5230
|
unit: o = !1,
|
|
5227
|
-
greenColor:
|
|
5228
|
-
orangeColor:
|
|
5229
|
-
redColor:
|
|
5231
|
+
greenColor: c = "#00CF1E",
|
|
5232
|
+
orangeColor: l = "#FFAC00",
|
|
5233
|
+
redColor: a = "#FF1E37"
|
|
5230
5234
|
}) => {
|
|
5231
|
-
s < n && (s = n), s >
|
|
5232
|
-
const u = (s - n) / (
|
|
5235
|
+
s < n && (s = n), s > d && (s = d);
|
|
5236
|
+
const u = (s - n) / (d - n), f = 270 + u * 180, m = t ? Math.round(u * 100) : s;
|
|
5233
5237
|
return /* @__PURE__ */ h("div", { className: Ct.speedGraphic, children: [
|
|
5234
5238
|
/* @__PURE__ */ h(
|
|
5235
5239
|
"svg",
|
|
@@ -5244,87 +5248,87 @@ const f1 = "_speedGraphic_d1k72_2", Ct = {
|
|
|
5244
5248
|
"path",
|
|
5245
5249
|
{
|
|
5246
5250
|
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",
|
|
5247
|
-
fill:
|
|
5251
|
+
fill: c
|
|
5248
5252
|
}
|
|
5249
5253
|
),
|
|
5250
5254
|
/* @__PURE__ */ i(
|
|
5251
5255
|
"path",
|
|
5252
5256
|
{
|
|
5253
5257
|
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",
|
|
5254
|
-
fill:
|
|
5258
|
+
fill: c
|
|
5255
5259
|
}
|
|
5256
5260
|
),
|
|
5257
5261
|
/* @__PURE__ */ i(
|
|
5258
5262
|
"path",
|
|
5259
5263
|
{
|
|
5260
5264
|
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",
|
|
5261
|
-
fill:
|
|
5265
|
+
fill: l
|
|
5262
5266
|
}
|
|
5263
5267
|
),
|
|
5264
5268
|
/* @__PURE__ */ i(
|
|
5265
5269
|
"path",
|
|
5266
5270
|
{
|
|
5267
5271
|
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",
|
|
5268
|
-
fill:
|
|
5272
|
+
fill: l
|
|
5269
5273
|
}
|
|
5270
5274
|
),
|
|
5271
5275
|
/* @__PURE__ */ i(
|
|
5272
5276
|
"path",
|
|
5273
5277
|
{
|
|
5274
5278
|
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",
|
|
5275
|
-
fill:
|
|
5279
|
+
fill: a
|
|
5276
5280
|
}
|
|
5277
5281
|
),
|
|
5278
5282
|
/* @__PURE__ */ i(
|
|
5279
5283
|
"path",
|
|
5280
5284
|
{
|
|
5281
5285
|
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",
|
|
5282
|
-
fill:
|
|
5286
|
+
fill: a
|
|
5283
5287
|
}
|
|
5284
5288
|
),
|
|
5285
5289
|
/* @__PURE__ */ i(
|
|
5286
5290
|
"path",
|
|
5287
5291
|
{
|
|
5288
5292
|
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",
|
|
5289
|
-
fill:
|
|
5293
|
+
fill: c
|
|
5290
5294
|
}
|
|
5291
5295
|
),
|
|
5292
5296
|
/* @__PURE__ */ i(
|
|
5293
5297
|
"path",
|
|
5294
5298
|
{
|
|
5295
5299
|
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",
|
|
5296
|
-
fill:
|
|
5300
|
+
fill: c
|
|
5297
5301
|
}
|
|
5298
5302
|
),
|
|
5299
5303
|
/* @__PURE__ */ i(
|
|
5300
5304
|
"path",
|
|
5301
5305
|
{
|
|
5302
5306
|
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",
|
|
5303
|
-
fill:
|
|
5307
|
+
fill: l
|
|
5304
5308
|
}
|
|
5305
5309
|
),
|
|
5306
5310
|
/* @__PURE__ */ i(
|
|
5307
5311
|
"path",
|
|
5308
5312
|
{
|
|
5309
5313
|
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",
|
|
5310
|
-
fill:
|
|
5314
|
+
fill: l
|
|
5311
5315
|
}
|
|
5312
5316
|
),
|
|
5313
5317
|
/* @__PURE__ */ i(
|
|
5314
5318
|
"path",
|
|
5315
5319
|
{
|
|
5316
5320
|
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",
|
|
5317
|
-
fill:
|
|
5321
|
+
fill: a
|
|
5318
5322
|
}
|
|
5319
5323
|
),
|
|
5320
5324
|
/* @__PURE__ */ i(
|
|
5321
5325
|
"path",
|
|
5322
5326
|
{
|
|
5323
5327
|
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",
|
|
5324
|
-
fill:
|
|
5328
|
+
fill: a
|
|
5325
5329
|
}
|
|
5326
5330
|
),
|
|
5327
|
-
/* @__PURE__ */ i("g", { transform: `rotate(${
|
|
5331
|
+
/* @__PURE__ */ i("g", { transform: `rotate(${f} 122 122)`, children: /* @__PURE__ */ i(
|
|
5328
5332
|
"path",
|
|
5329
5333
|
{
|
|
5330
5334
|
id: "aguja",
|
|
@@ -5363,13 +5367,13 @@ const b1 = "_header_13kbt_2", _1 = "_leftComponents_13kbt_13", v1 = "_centerComp
|
|
|
5363
5367
|
componentsContainer: w1
|
|
5364
5368
|
}, N1 = ({
|
|
5365
5369
|
cssProps: n,
|
|
5366
|
-
leftComponents:
|
|
5370
|
+
leftComponents: d = [],
|
|
5367
5371
|
centerComponents: s = [],
|
|
5368
5372
|
rightComponents: r = [],
|
|
5369
5373
|
zIndex: t = 10,
|
|
5370
5374
|
height: o = 60,
|
|
5371
|
-
backgroundColor:
|
|
5372
|
-
isFooter:
|
|
5375
|
+
backgroundColor: c = "#605B56",
|
|
5376
|
+
isFooter: l = !1
|
|
5373
5377
|
// If true, it will apply footer styles
|
|
5374
5378
|
}) => /* @__PURE__ */ h(
|
|
5375
5379
|
"div",
|
|
@@ -5379,14 +5383,14 @@ const b1 = "_header_13kbt_2", _1 = "_leftComponents_13kbt_13", v1 = "_centerComp
|
|
|
5379
5383
|
...n,
|
|
5380
5384
|
zIndex: t,
|
|
5381
5385
|
height: o,
|
|
5382
|
-
backgroundColor:
|
|
5383
|
-
top:
|
|
5384
|
-
bottom:
|
|
5386
|
+
backgroundColor: c,
|
|
5387
|
+
top: l ? "auto" : 0,
|
|
5388
|
+
bottom: l ? 0 : "auto"
|
|
5385
5389
|
},
|
|
5386
5390
|
children: [
|
|
5387
|
-
/* @__PURE__ */ i("div", { className: we.leftComponents, children:
|
|
5388
|
-
/* @__PURE__ */ i("div", { className: we.centerComponents, children: s.map((
|
|
5389
|
-
/* @__PURE__ */ i("div", { className: we.rightComponents, children: r.map((
|
|
5391
|
+
/* @__PURE__ */ i("div", { className: we.leftComponents, children: d.map((a, u) => /* @__PURE__ */ i("div", { className: we.componentsContainer, children: a }, u)) }),
|
|
5392
|
+
/* @__PURE__ */ i("div", { className: we.centerComponents, children: s.map((a, u) => /* @__PURE__ */ i("div", { className: we.componentsContainer, children: a }, u)) }),
|
|
5393
|
+
/* @__PURE__ */ i("div", { className: we.rightComponents, children: r.map((a, u) => /* @__PURE__ */ i("div", { className: we.componentsContainer, children: a }, u)) })
|
|
5390
5394
|
]
|
|
5391
5395
|
}
|
|
5392
5396
|
);
|
|
@@ -5407,7 +5411,7 @@ const k1 = "_sidebar_1kaqu_2", $1 = "_open_1kaqu_16", S1 = "_content_1kaqu_20",
|
|
|
5407
5411
|
closeButton: L1
|
|
5408
5412
|
}, 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 = ({
|
|
5409
5413
|
width: n = "300px",
|
|
5410
|
-
children:
|
|
5414
|
+
children: d,
|
|
5411
5415
|
showRightBar: s,
|
|
5412
5416
|
onCloseBar: r
|
|
5413
5417
|
}) => {
|
|
@@ -5421,7 +5425,7 @@ const k1 = "_sidebar_1kaqu_2", $1 = "_open_1kaqu_16", S1 = "_content_1kaqu_20",
|
|
|
5421
5425
|
style: { width: s ? n : 0 },
|
|
5422
5426
|
children: s && /* @__PURE__ */ h("div", { className: Ye.content, children: [
|
|
5423
5427
|
/* @__PURE__ */ i("button", { className: Ye.closeButton, onClick: t, children: /* @__PURE__ */ i("img", { src: M1, alt: "Close Sidebar" }) }),
|
|
5424
|
-
|
|
5428
|
+
d
|
|
5425
5429
|
] })
|
|
5426
5430
|
}
|
|
5427
5431
|
);
|