@concordium/verification-web-ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/assets/appstore-icon.svg.js +5 -0
  3. package/dist/assets/appstore-icon.svg.js.map +1 -0
  4. package/dist/assets/playstore-icon.svg.js +5 -0
  5. package/dist/assets/playstore-icon.svg.js.map +1 -0
  6. package/dist/components/desktop/landing.js +122 -5
  7. package/dist/components/desktop/landing.js.map +1 -1
  8. package/dist/components/desktop/processing.js +6 -1
  9. package/dist/components/desktop/processing.js.map +1 -1
  10. package/dist/components/desktop/returning-user.js +3 -2
  11. package/dist/components/desktop/returning-user.js.map +1 -1
  12. package/dist/components/desktop/scan.d.ts +6 -3
  13. package/dist/components/desktop/scan.js +116 -12
  14. package/dist/components/desktop/scan.js.map +1 -1
  15. package/dist/components/desktop/wallet-selection.d.ts +20 -0
  16. package/dist/components/desktop/wallet-selection.js +423 -0
  17. package/dist/components/desktop/wallet-selection.js.map +1 -0
  18. package/dist/constants/modal.constants.d.ts +2 -0
  19. package/dist/constants/modal.constants.js +3 -1
  20. package/dist/constants/modal.constants.js.map +1 -1
  21. package/dist/constants/popup.constants.d.ts +2 -2
  22. package/dist/constants/wallet.registry.d.ts +61 -0
  23. package/dist/constants/wallet.registry.js +129 -0
  24. package/dist/constants/wallet.registry.js.map +1 -0
  25. package/dist/constants/walletconnect.constants.d.ts +3 -0
  26. package/dist/constants/walletconnect.constants.js +14 -1
  27. package/dist/constants/walletconnect.constants.js.map +1 -1
  28. package/dist/index.js +7 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/sdk.d.ts +17 -0
  31. package/dist/sdk.js +52 -10
  32. package/dist/sdk.js.map +1 -1
  33. package/dist/services/walletconnect.service.d.ts +10 -0
  34. package/dist/services/walletconnect.service.js +34 -0
  35. package/dist/services/walletconnect.service.js.map +1 -1
  36. package/dist/types/index.d.ts +5 -0
  37. package/dist/utils/mobileAppDetection.d.ts +13 -0
  38. package/dist/utils/mobileAppDetection.js +7 -3
  39. package/dist/utils/mobileAppDetection.js.map +1 -1
  40. package/dist/verification-web-ui.css +1 -1
  41. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### 0.2.0
6
+
7
+ - Enhanced WalletConnect integration and improved mobile app detection.
8
+ - Refactored popup utility and session detection for improved readability and consistency.
9
+ - Updated package metadata and publish setup (including `repository` and `engines` fields).
10
+ - Added ESLint configuration and aligned scripts/dependencies with lint-first workflows.
11
+ - Fixed loading video asset import ordering and corrected asset path casing.
12
+ - Updated `@walletconnect/types` and related dependency/configuration adjustments.
13
+ - Removed unused example integration and obsolete configuration files.
14
+
5
15
  ## 0.1.0
6
16
 
7
17
  - Initial release
@@ -0,0 +1,5 @@
1
+ const appstoreIcon = "data:image/svg+xml,%3csvg%20width='120'%20height='40'%20viewBox='0%200%20120%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20fill='black'/%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20stroke='%23A6A6A6'/%3e%3cpath%20d='M24.7045%2020.763C24.7166%2019.8431%2024.9669%2018.9411%2025.4321%2018.141C25.8972%2017.3409%2026.5621%2016.6687%2027.3648%2016.1869C26.8548%2015.4758%2026.1821%2014.8907%2025.4%2014.4779C24.6178%2014.065%2023.7479%2013.836%2022.8592%2013.8088C20.9635%2013.6146%2019.1258%2014.9163%2018.1598%2014.9163C17.1751%2014.9163%2015.6878%2013.8281%2014.0862%2013.8603C13.0502%2013.893%2012.0406%2014.1871%2011.1557%2014.714C10.2708%2015.2408%209.54075%2015.9825%209.03674%2016.8668C6.85352%2020.5571%208.48201%2025.9808%2010.5734%2028.9639C11.6197%2030.4246%2012.8426%2032.0562%2014.4428%2031.9984C16.0086%2031.9349%2016.5934%2031.0235%2018.4835%2031.0235C20.3561%2031.0235%2020.9048%2031.9984%2022.5374%2031.9616C24.2176%2031.9349%2025.2762%2030.4944%2026.2859%2029.0198C27.0377%2027.979%2027.6162%2026.8287%2028%2025.6115C27.0238%2025.2084%2026.1908%2024.5337%2025.6048%2023.6715C25.0187%2022.8093%2024.7056%2021.7977%2024.7045%2020.763Z'%20fill='white'/%3e%3cpath%20d='M21.621%2011.8471C22.5372%2010.7734%2022.9885%209.39335%2022.8792%208C21.4796%208.14352%2020.1867%208.7966%2019.2582%209.82911C18.8043%2010.3335%2018.4566%2010.9203%2018.235%2011.556C18.0135%2012.1917%2017.9224%2012.8638%2017.9671%2013.5338C18.6672%2013.5408%2019.3597%2013.3927%2019.9927%2013.1005C20.6256%2012.8084%2021.1824%2012.3798%2021.621%2011.8471Z'%20fill='white'/%3e%3cpath%20d='M36.791%208.50146H38.8608C40.6494%208.50146%2041.5195%209.56494%2041.5195%2011.4941C41.5195%2013.4233%2040.6406%2014.5%2038.8608%2014.5H36.791V8.50146ZM37.7886%209.34082V13.6606H38.751C39.9375%2013.6606%2040.4956%2012.9443%2040.4956%2011.5073C40.4956%2010.0615%2039.9331%209.34082%2038.751%209.34082H37.7886ZM44.6748%209.77588C45.8877%209.77588%2046.7358%2010.5625%2046.7358%2011.8677V12.4697C46.7358%2013.8188%2045.8877%2014.5791%2044.6748%2014.5791C43.4443%2014.5791%2042.605%2013.8276%2042.605%2012.4741V11.8721C42.605%2010.6021%2043.4575%209.77588%2044.6748%209.77588ZM44.6792%2010.5625C43.9849%2010.5625%2043.5894%2011.1426%2043.5894%2011.9204V12.439C43.5894%2013.2168%2043.9585%2013.7925%2044.6792%2013.7925C45.3911%2013.7925%2045.7559%2013.2212%2045.7559%2012.439V11.9204C45.7559%2011.1426%2045.3735%2010.5625%2044.6792%2010.5625ZM53.8989%209.85498L52.6772%2014.5H51.6841L50.7129%2011.0723H50.6865L49.7329%2014.5H48.7354L47.4609%209.85498H48.5112L49.2583%2013.397H49.3022L50.2383%209.85498H51.1567L52.1191%2013.397H52.1631L52.9233%209.85498H53.8989ZM54.8657%2014.5V9.85498H55.8237V10.6899H55.8721C55.9907%2010.3252%2056.3291%209.78467%2057.2695%209.78467C58.2056%209.78467%2058.834%2010.3032%2058.834%2011.3623V14.5H57.8584V11.6479C57.8584%2010.9404%2057.4893%2010.6152%2056.9399%2010.6152C56.2192%2010.6152%2055.8413%2011.1689%2055.8413%2011.9204V14.5H54.8657ZM60.3105%2014.5V8.18506H61.2861V14.5H60.3105ZM64.6348%209.77588C65.8477%209.77588%2066.6958%2010.5625%2066.6958%2011.8677V12.4697C66.6958%2013.8188%2065.8477%2014.5791%2064.6348%2014.5791C63.4043%2014.5791%2062.5649%2013.8276%2062.5649%2012.4741V11.8721C62.5649%2010.6021%2063.4175%209.77588%2064.6348%209.77588ZM64.6392%2010.5625C63.9448%2010.5625%2063.5493%2011.1426%2063.5493%2011.9204V12.439C63.5493%2013.2168%2063.9185%2013.7925%2064.6392%2013.7925C65.3511%2013.7925%2065.7158%2013.2212%2065.7158%2012.439V11.9204C65.7158%2011.1426%2065.3335%2010.5625%2064.6392%2010.5625ZM69.2227%2014.5703C68.3218%2014.5703%2067.7021%2014.0166%2067.7021%2013.1509C67.7021%2012.3291%2068.2734%2011.7754%2069.3457%2011.7754H70.519V11.3403C70.519%2010.8086%2070.1807%2010.5581%2069.6445%2010.5581C69.1172%2010.5581%2068.8799%2010.7778%2068.8052%2011.0854H67.8779C67.9351%2010.3076%2068.5195%209.78467%2069.6753%209.78467C70.6685%209.78467%2071.4902%2010.1978%2071.4902%2011.3535V14.5H70.563V13.8979H70.519C70.3125%2014.2539%2069.9082%2014.5703%2069.2227%2014.5703ZM69.5259%2013.8145C70.0796%2013.8145%2070.519%2013.4365%2070.519%2012.9312V12.4302H69.4995C68.9326%2012.4302%2068.6821%2012.7158%2068.6821%2013.1025C68.6821%2013.5859%2069.0864%2013.8145%2069.5259%2013.8145ZM74.4961%209.79346C75.1509%209.79346%2075.6519%2010.0835%2075.832%2010.5537H75.8804V8.18506H76.856V14.5H75.9067V13.7573H75.8584C75.7178%2014.2275%2075.1597%2014.5615%2074.4829%2014.5615C73.415%2014.5615%2072.7207%2013.8013%2072.7207%2012.5752V11.7798C72.7207%2010.5537%2073.4282%209.79346%2074.4961%209.79346ZM74.7686%2010.5933C74.1182%2010.5933%2073.7139%2011.0767%2073.7139%2011.9204V12.4302C73.7139%2013.2783%2074.1226%2013.7617%2074.7905%2013.7617C75.4497%2013.7617%2075.8804%2013.2827%2075.8804%2012.4917V11.7886C75.8804%2011.0723%2075.4102%2010.5933%2074.7686%2010.5933ZM82.2129%209.77588C83.4258%209.77588%2084.2739%2010.5625%2084.2739%2011.8677V12.4697C84.2739%2013.8188%2083.4258%2014.5791%2082.2129%2014.5791C80.9824%2014.5791%2080.1431%2013.8276%2080.1431%2012.4741V11.8721C80.1431%2010.6021%2080.9956%209.77588%2082.2129%209.77588ZM82.2173%2010.5625C81.5229%2010.5625%2081.1274%2011.1426%2081.1274%2011.9204V12.439C81.1274%2013.2168%2081.4966%2013.7925%2082.2173%2013.7925C82.9292%2013.7925%2083.2939%2013.2212%2083.2939%2012.439V11.9204C83.2939%2011.1426%2082.9116%2010.5625%2082.2173%2010.5625ZM85.5308%2014.5V9.85498H86.4888V10.6899H86.5371C86.6558%2010.3252%2086.9941%209.78467%2087.9346%209.78467C88.8706%209.78467%2089.499%2010.3032%2089.499%2011.3623V14.5H88.5234V11.6479C88.5234%2010.9404%2088.1543%2010.6152%2087.605%2010.6152C86.8843%2010.6152%2086.5063%2011.1689%2086.5063%2011.9204V14.5H85.5308ZM93.2739%209.88574V8.72559H94.2275V9.88574H95.269V10.6504H94.2275V13.1157C94.2275%2013.6211%2094.4165%2013.7617%2094.9395%2013.7617C95.0713%2013.7617%2095.2471%2013.7529%2095.3218%2013.7441V14.4912C95.2427%2014.5044%2094.9175%2014.5308%2094.6978%2014.5308C93.5684%2014.5308%2093.2607%2014.1265%2093.2607%2013.1948V10.6504H92.5532V9.88574H93.2739ZM96.4995%2014.5V8.18506H97.4707V10.6899H97.519C97.6201%2010.3604%2097.998%209.78467%2098.9297%209.78467C99.835%209.78467%20100.481%2010.3076%20100.481%2011.3667V14.5H99.5098V11.6523C99.5098%2010.9448%2099.1187%2010.6152%2098.5649%2010.6152C97.8662%2010.6152%2097.4707%2011.1646%2097.4707%2011.9204V14.5H96.4995ZM103.755%2014.5791C102.489%2014.5791%20101.703%2013.8013%20101.703%2012.4917V11.8633C101.703%2010.5449%20102.564%209.77588%20103.698%209.77588C104.862%209.77588%20105.684%2010.5845%20105.684%2011.8633V12.4082H102.669V12.6367C102.669%2013.3047%20103.065%2013.7969%20103.75%2013.7969C104.26%2013.7969%20104.612%2013.5552%20104.678%2013.2651H105.631C105.574%2013.8013%20105.007%2014.5791%20103.755%2014.5791ZM102.669%2011.771H104.73V11.7095C104.73%2011.0107%20104.322%2010.5449%20103.702%2010.5449C103.083%2010.5449%20102.669%2011.0107%20102.669%2011.7095V11.771Z'%20fill='white'/%3e%3cpath%20d='M38.2061%2030.5H36.1758L40.3066%2018.5029H42.5391L46.6611%2030.5H44.5518L43.4883%2027.1777H39.2783L38.2061%2030.5ZM41.4316%2020.5771H41.3525L39.7266%2025.6484H43.04L41.4316%2020.5771ZM52.2644%2030.6318C51.0603%2030.6318%2050.1462%2030.0605%2049.654%2029.208H49.5837V33.585H47.6325V21.21H49.531V22.5723H49.6013C50.1111%2021.6846%2051.0603%2021.0869%2052.3083%2021.0869C54.3913%2021.0869%2055.8767%2022.6602%2055.8767%2025.4375V26.2637C55.8767%2029.0234%2054.4089%2030.6318%2052.2644%2030.6318ZM51.8161%2029.0234C53.0554%2029.0234%2053.8991%2028.0303%2053.8991%2026.1582V25.5078C53.8991%2023.7061%2053.1081%2022.6777%2051.781%2022.6777C50.4187%2022.6777%2049.5661%2023.7852%2049.5661%2025.499V26.1582C49.5661%2027.916%2050.4275%2029.0234%2051.8161%2029.0234ZM62.183%2030.6318C60.9789%2030.6318%2060.0649%2030.0605%2059.5727%2029.208H59.5024V33.585H57.5512V21.21H59.4496V22.5723H59.52C60.0297%2021.6846%2060.9789%2021.0869%2062.227%2021.0869C64.31%2021.0869%2065.7954%2022.6602%2065.7954%2025.4375V26.2637C65.7954%2029.0234%2064.3276%2030.6318%2062.183%2030.6318ZM61.7348%2029.0234C62.9741%2029.0234%2063.8178%2028.0303%2063.8178%2026.1582V25.5078C63.8178%2023.7061%2063.0268%2022.6777%2061.6996%2022.6777C60.3373%2022.6777%2059.4848%2023.7852%2059.4848%2025.499V26.1582C59.4848%2027.916%2060.3461%2029.0234%2061.7348%2029.0234ZM69.8387%2027.1689H71.7899C71.8778%2028.2061%2072.7919%2029.0938%2074.4882%2029.0938C76.0438%2029.0938%2076.9667%2028.3643%2076.9667%2027.2305C76.9667%2026.3164%2076.3514%2025.8242%2075.0682%2025.5166L73.0995%2025.0244C71.5526%2024.6641%2070.1639%2023.7412%2070.1639%2021.79C70.1639%2019.4961%2072.1679%2018.2393%2074.497%2018.2393C76.8261%2018.2393%2078.7684%2019.4961%2078.8124%2021.7373H76.8964C76.8085%2020.7178%2076.0262%2019.874%2074.4706%2019.874C73.0995%2019.874%2072.1679%2020.5244%2072.1679%2021.6406C72.1679%2022.4229%2072.7128%2022.9854%2073.829%2023.2402L75.7889%2023.7236C77.5907%2024.1631%2078.9618%2025.0156%2078.9618%2027.0547C78.9618%2029.4102%2077.0546%2030.7373%2074.3387%2030.7373C70.9989%2030.7373%2069.8827%2028.7861%2069.8387%2027.1689ZM81.3395%2021.21V18.9512H83.2555V21.21H85.066V22.7744H83.2555V27.7314C83.2555%2028.7422%2083.6334%2029.0234%2084.6793%2029.0234C84.8463%2029.0234%2085.0045%2029.0234%2085.1188%2029.0059V30.5C84.9605%2030.5264%2084.5914%2030.5615%2084.1959%2030.5615C81.9371%2030.5615%2081.3131%2029.7529%2081.3131%2027.8896V22.7744H80.0299V21.21H81.3395ZM90.3353%2021.0518C93.0071%2021.0518%2094.4573%2022.9326%2094.4573%2025.4639V26.2109C94.4573%2028.8301%2093.0159%2030.6582%2090.3353%2030.6582C87.6546%2030.6582%2086.1956%2028.8301%2086.1956%2026.2109V25.4639C86.1956%2022.9414%2087.6634%2021.0518%2090.3353%2021.0518ZM90.3353%2022.6162C88.8851%2022.6162%2088.1644%2023.8027%2088.1644%2025.4902V26.2021C88.1644%2027.8633%2088.8763%2029.085%2090.3353%2029.085C91.7943%2029.085%2092.4974%2027.8721%2092.4974%2026.2021V25.4902C92.4974%2023.7939%2091.7855%2022.6162%2090.3353%2022.6162ZM96.1055%2030.5V21.21H98.0567V22.4316H98.127C98.3643%2021.8516%2099.0586%2021.0781%20100.351%2021.0781C100.606%2021.0781%20100.825%2021.0957%20101.01%2021.1309V22.8535C100.843%2022.8096%20100.5%2022.7832%20100.175%2022.7832C98.6104%2022.7832%2098.083%2023.75%2098.083%2024.998V30.5H96.1055ZM105.743%2030.6582C103.256%2030.6582%20101.674%2029.0146%20101.674%2026.2637V25.3232C101.674%2022.7305%20103.22%2021.0518%20105.664%2021.0518C108.142%2021.0518%20109.636%2022.792%20109.636%2025.4111V26.2988H103.598V26.5186C103.598%2028.083%20104.442%2029.1201%20105.769%2029.1201C106.762%2029.1201%20107.439%2028.6279%20107.677%2027.8281H109.531C109.25%2029.3311%20108.037%2030.6582%20105.743%2030.6582ZM103.598%2024.9365H107.729V24.9189C107.729%2023.6006%20106.912%2022.5635%20105.673%2022.5635C104.416%2022.5635%20103.598%2023.6006%20103.598%2024.9189V24.9365Z'%20fill='white'/%3e%3c/svg%3e";
2
+ export {
3
+ appstoreIcon as default
4
+ };
5
+ //# sourceMappingURL=appstore-icon.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appstore-icon.svg.js","sources":["../../src/assets/appstore-icon.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='120'%20height='40'%20viewBox='0%200%20120%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20fill='black'/%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20stroke='%23A6A6A6'/%3e%3cpath%20d='M24.7045%2020.763C24.7166%2019.8431%2024.9669%2018.9411%2025.4321%2018.141C25.8972%2017.3409%2026.5621%2016.6687%2027.3648%2016.1869C26.8548%2015.4758%2026.1821%2014.8907%2025.4%2014.4779C24.6178%2014.065%2023.7479%2013.836%2022.8592%2013.8088C20.9635%2013.6146%2019.1258%2014.9163%2018.1598%2014.9163C17.1751%2014.9163%2015.6878%2013.8281%2014.0862%2013.8603C13.0502%2013.893%2012.0406%2014.1871%2011.1557%2014.714C10.2708%2015.2408%209.54075%2015.9825%209.03674%2016.8668C6.85352%2020.5571%208.48201%2025.9808%2010.5734%2028.9639C11.6197%2030.4246%2012.8426%2032.0562%2014.4428%2031.9984C16.0086%2031.9349%2016.5934%2031.0235%2018.4835%2031.0235C20.3561%2031.0235%2020.9048%2031.9984%2022.5374%2031.9616C24.2176%2031.9349%2025.2762%2030.4944%2026.2859%2029.0198C27.0377%2027.979%2027.6162%2026.8287%2028%2025.6115C27.0238%2025.2084%2026.1908%2024.5337%2025.6048%2023.6715C25.0187%2022.8093%2024.7056%2021.7977%2024.7045%2020.763Z'%20fill='white'/%3e%3cpath%20d='M21.621%2011.8471C22.5372%2010.7734%2022.9885%209.39335%2022.8792%208C21.4796%208.14352%2020.1867%208.7966%2019.2582%209.82911C18.8043%2010.3335%2018.4566%2010.9203%2018.235%2011.556C18.0135%2012.1917%2017.9224%2012.8638%2017.9671%2013.5338C18.6672%2013.5408%2019.3597%2013.3927%2019.9927%2013.1005C20.6256%2012.8084%2021.1824%2012.3798%2021.621%2011.8471Z'%20fill='white'/%3e%3cpath%20d='M36.791%208.50146H38.8608C40.6494%208.50146%2041.5195%209.56494%2041.5195%2011.4941C41.5195%2013.4233%2040.6406%2014.5%2038.8608%2014.5H36.791V8.50146ZM37.7886%209.34082V13.6606H38.751C39.9375%2013.6606%2040.4956%2012.9443%2040.4956%2011.5073C40.4956%2010.0615%2039.9331%209.34082%2038.751%209.34082H37.7886ZM44.6748%209.77588C45.8877%209.77588%2046.7358%2010.5625%2046.7358%2011.8677V12.4697C46.7358%2013.8188%2045.8877%2014.5791%2044.6748%2014.5791C43.4443%2014.5791%2042.605%2013.8276%2042.605%2012.4741V11.8721C42.605%2010.6021%2043.4575%209.77588%2044.6748%209.77588ZM44.6792%2010.5625C43.9849%2010.5625%2043.5894%2011.1426%2043.5894%2011.9204V12.439C43.5894%2013.2168%2043.9585%2013.7925%2044.6792%2013.7925C45.3911%2013.7925%2045.7559%2013.2212%2045.7559%2012.439V11.9204C45.7559%2011.1426%2045.3735%2010.5625%2044.6792%2010.5625ZM53.8989%209.85498L52.6772%2014.5H51.6841L50.7129%2011.0723H50.6865L49.7329%2014.5H48.7354L47.4609%209.85498H48.5112L49.2583%2013.397H49.3022L50.2383%209.85498H51.1567L52.1191%2013.397H52.1631L52.9233%209.85498H53.8989ZM54.8657%2014.5V9.85498H55.8237V10.6899H55.8721C55.9907%2010.3252%2056.3291%209.78467%2057.2695%209.78467C58.2056%209.78467%2058.834%2010.3032%2058.834%2011.3623V14.5H57.8584V11.6479C57.8584%2010.9404%2057.4893%2010.6152%2056.9399%2010.6152C56.2192%2010.6152%2055.8413%2011.1689%2055.8413%2011.9204V14.5H54.8657ZM60.3105%2014.5V8.18506H61.2861V14.5H60.3105ZM64.6348%209.77588C65.8477%209.77588%2066.6958%2010.5625%2066.6958%2011.8677V12.4697C66.6958%2013.8188%2065.8477%2014.5791%2064.6348%2014.5791C63.4043%2014.5791%2062.5649%2013.8276%2062.5649%2012.4741V11.8721C62.5649%2010.6021%2063.4175%209.77588%2064.6348%209.77588ZM64.6392%2010.5625C63.9448%2010.5625%2063.5493%2011.1426%2063.5493%2011.9204V12.439C63.5493%2013.2168%2063.9185%2013.7925%2064.6392%2013.7925C65.3511%2013.7925%2065.7158%2013.2212%2065.7158%2012.439V11.9204C65.7158%2011.1426%2065.3335%2010.5625%2064.6392%2010.5625ZM69.2227%2014.5703C68.3218%2014.5703%2067.7021%2014.0166%2067.7021%2013.1509C67.7021%2012.3291%2068.2734%2011.7754%2069.3457%2011.7754H70.519V11.3403C70.519%2010.8086%2070.1807%2010.5581%2069.6445%2010.5581C69.1172%2010.5581%2068.8799%2010.7778%2068.8052%2011.0854H67.8779C67.9351%2010.3076%2068.5195%209.78467%2069.6753%209.78467C70.6685%209.78467%2071.4902%2010.1978%2071.4902%2011.3535V14.5H70.563V13.8979H70.519C70.3125%2014.2539%2069.9082%2014.5703%2069.2227%2014.5703ZM69.5259%2013.8145C70.0796%2013.8145%2070.519%2013.4365%2070.519%2012.9312V12.4302H69.4995C68.9326%2012.4302%2068.6821%2012.7158%2068.6821%2013.1025C68.6821%2013.5859%2069.0864%2013.8145%2069.5259%2013.8145ZM74.4961%209.79346C75.1509%209.79346%2075.6519%2010.0835%2075.832%2010.5537H75.8804V8.18506H76.856V14.5H75.9067V13.7573H75.8584C75.7178%2014.2275%2075.1597%2014.5615%2074.4829%2014.5615C73.415%2014.5615%2072.7207%2013.8013%2072.7207%2012.5752V11.7798C72.7207%2010.5537%2073.4282%209.79346%2074.4961%209.79346ZM74.7686%2010.5933C74.1182%2010.5933%2073.7139%2011.0767%2073.7139%2011.9204V12.4302C73.7139%2013.2783%2074.1226%2013.7617%2074.7905%2013.7617C75.4497%2013.7617%2075.8804%2013.2827%2075.8804%2012.4917V11.7886C75.8804%2011.0723%2075.4102%2010.5933%2074.7686%2010.5933ZM82.2129%209.77588C83.4258%209.77588%2084.2739%2010.5625%2084.2739%2011.8677V12.4697C84.2739%2013.8188%2083.4258%2014.5791%2082.2129%2014.5791C80.9824%2014.5791%2080.1431%2013.8276%2080.1431%2012.4741V11.8721C80.1431%2010.6021%2080.9956%209.77588%2082.2129%209.77588ZM82.2173%2010.5625C81.5229%2010.5625%2081.1274%2011.1426%2081.1274%2011.9204V12.439C81.1274%2013.2168%2081.4966%2013.7925%2082.2173%2013.7925C82.9292%2013.7925%2083.2939%2013.2212%2083.2939%2012.439V11.9204C83.2939%2011.1426%2082.9116%2010.5625%2082.2173%2010.5625ZM85.5308%2014.5V9.85498H86.4888V10.6899H86.5371C86.6558%2010.3252%2086.9941%209.78467%2087.9346%209.78467C88.8706%209.78467%2089.499%2010.3032%2089.499%2011.3623V14.5H88.5234V11.6479C88.5234%2010.9404%2088.1543%2010.6152%2087.605%2010.6152C86.8843%2010.6152%2086.5063%2011.1689%2086.5063%2011.9204V14.5H85.5308ZM93.2739%209.88574V8.72559H94.2275V9.88574H95.269V10.6504H94.2275V13.1157C94.2275%2013.6211%2094.4165%2013.7617%2094.9395%2013.7617C95.0713%2013.7617%2095.2471%2013.7529%2095.3218%2013.7441V14.4912C95.2427%2014.5044%2094.9175%2014.5308%2094.6978%2014.5308C93.5684%2014.5308%2093.2607%2014.1265%2093.2607%2013.1948V10.6504H92.5532V9.88574H93.2739ZM96.4995%2014.5V8.18506H97.4707V10.6899H97.519C97.6201%2010.3604%2097.998%209.78467%2098.9297%209.78467C99.835%209.78467%20100.481%2010.3076%20100.481%2011.3667V14.5H99.5098V11.6523C99.5098%2010.9448%2099.1187%2010.6152%2098.5649%2010.6152C97.8662%2010.6152%2097.4707%2011.1646%2097.4707%2011.9204V14.5H96.4995ZM103.755%2014.5791C102.489%2014.5791%20101.703%2013.8013%20101.703%2012.4917V11.8633C101.703%2010.5449%20102.564%209.77588%20103.698%209.77588C104.862%209.77588%20105.684%2010.5845%20105.684%2011.8633V12.4082H102.669V12.6367C102.669%2013.3047%20103.065%2013.7969%20103.75%2013.7969C104.26%2013.7969%20104.612%2013.5552%20104.678%2013.2651H105.631C105.574%2013.8013%20105.007%2014.5791%20103.755%2014.5791ZM102.669%2011.771H104.73V11.7095C104.73%2011.0107%20104.322%2010.5449%20103.702%2010.5449C103.083%2010.5449%20102.669%2011.0107%20102.669%2011.7095V11.771Z'%20fill='white'/%3e%3cpath%20d='M38.2061%2030.5H36.1758L40.3066%2018.5029H42.5391L46.6611%2030.5H44.5518L43.4883%2027.1777H39.2783L38.2061%2030.5ZM41.4316%2020.5771H41.3525L39.7266%2025.6484H43.04L41.4316%2020.5771ZM52.2644%2030.6318C51.0603%2030.6318%2050.1462%2030.0605%2049.654%2029.208H49.5837V33.585H47.6325V21.21H49.531V22.5723H49.6013C50.1111%2021.6846%2051.0603%2021.0869%2052.3083%2021.0869C54.3913%2021.0869%2055.8767%2022.6602%2055.8767%2025.4375V26.2637C55.8767%2029.0234%2054.4089%2030.6318%2052.2644%2030.6318ZM51.8161%2029.0234C53.0554%2029.0234%2053.8991%2028.0303%2053.8991%2026.1582V25.5078C53.8991%2023.7061%2053.1081%2022.6777%2051.781%2022.6777C50.4187%2022.6777%2049.5661%2023.7852%2049.5661%2025.499V26.1582C49.5661%2027.916%2050.4275%2029.0234%2051.8161%2029.0234ZM62.183%2030.6318C60.9789%2030.6318%2060.0649%2030.0605%2059.5727%2029.208H59.5024V33.585H57.5512V21.21H59.4496V22.5723H59.52C60.0297%2021.6846%2060.9789%2021.0869%2062.227%2021.0869C64.31%2021.0869%2065.7954%2022.6602%2065.7954%2025.4375V26.2637C65.7954%2029.0234%2064.3276%2030.6318%2062.183%2030.6318ZM61.7348%2029.0234C62.9741%2029.0234%2063.8178%2028.0303%2063.8178%2026.1582V25.5078C63.8178%2023.7061%2063.0268%2022.6777%2061.6996%2022.6777C60.3373%2022.6777%2059.4848%2023.7852%2059.4848%2025.499V26.1582C59.4848%2027.916%2060.3461%2029.0234%2061.7348%2029.0234ZM69.8387%2027.1689H71.7899C71.8778%2028.2061%2072.7919%2029.0938%2074.4882%2029.0938C76.0438%2029.0938%2076.9667%2028.3643%2076.9667%2027.2305C76.9667%2026.3164%2076.3514%2025.8242%2075.0682%2025.5166L73.0995%2025.0244C71.5526%2024.6641%2070.1639%2023.7412%2070.1639%2021.79C70.1639%2019.4961%2072.1679%2018.2393%2074.497%2018.2393C76.8261%2018.2393%2078.7684%2019.4961%2078.8124%2021.7373H76.8964C76.8085%2020.7178%2076.0262%2019.874%2074.4706%2019.874C73.0995%2019.874%2072.1679%2020.5244%2072.1679%2021.6406C72.1679%2022.4229%2072.7128%2022.9854%2073.829%2023.2402L75.7889%2023.7236C77.5907%2024.1631%2078.9618%2025.0156%2078.9618%2027.0547C78.9618%2029.4102%2077.0546%2030.7373%2074.3387%2030.7373C70.9989%2030.7373%2069.8827%2028.7861%2069.8387%2027.1689ZM81.3395%2021.21V18.9512H83.2555V21.21H85.066V22.7744H83.2555V27.7314C83.2555%2028.7422%2083.6334%2029.0234%2084.6793%2029.0234C84.8463%2029.0234%2085.0045%2029.0234%2085.1188%2029.0059V30.5C84.9605%2030.5264%2084.5914%2030.5615%2084.1959%2030.5615C81.9371%2030.5615%2081.3131%2029.7529%2081.3131%2027.8896V22.7744H80.0299V21.21H81.3395ZM90.3353%2021.0518C93.0071%2021.0518%2094.4573%2022.9326%2094.4573%2025.4639V26.2109C94.4573%2028.8301%2093.0159%2030.6582%2090.3353%2030.6582C87.6546%2030.6582%2086.1956%2028.8301%2086.1956%2026.2109V25.4639C86.1956%2022.9414%2087.6634%2021.0518%2090.3353%2021.0518ZM90.3353%2022.6162C88.8851%2022.6162%2088.1644%2023.8027%2088.1644%2025.4902V26.2021C88.1644%2027.8633%2088.8763%2029.085%2090.3353%2029.085C91.7943%2029.085%2092.4974%2027.8721%2092.4974%2026.2021V25.4902C92.4974%2023.7939%2091.7855%2022.6162%2090.3353%2022.6162ZM96.1055%2030.5V21.21H98.0567V22.4316H98.127C98.3643%2021.8516%2099.0586%2021.0781%20100.351%2021.0781C100.606%2021.0781%20100.825%2021.0957%20101.01%2021.1309V22.8535C100.843%2022.8096%20100.5%2022.7832%20100.175%2022.7832C98.6104%2022.7832%2098.083%2023.75%2098.083%2024.998V30.5H96.1055ZM105.743%2030.6582C103.256%2030.6582%20101.674%2029.0146%20101.674%2026.2637V25.3232C101.674%2022.7305%20103.22%2021.0518%20105.664%2021.0518C108.142%2021.0518%20109.636%2022.792%20109.636%2025.4111V26.2988H103.598V26.5186C103.598%2028.083%20104.442%2029.1201%20105.769%2029.1201C106.762%2029.1201%20107.439%2028.6279%20107.677%2027.8281H109.531C109.25%2029.3311%20108.037%2030.6582%20105.743%2030.6582ZM103.598%2024.9365H107.729V24.9189C107.729%2023.6006%20106.912%2022.5635%20105.673%2022.5635C104.416%2022.5635%20103.598%2023.6006%20103.598%2024.9189V24.9365Z'%20fill='white'/%3e%3c/svg%3e\""],"names":[],"mappings":"AAAA,MAAA,eAAe;"}
@@ -0,0 +1,5 @@
1
+ const playstoreIcon = "data:image/svg+xml,%3csvg%20width='120'%20height='40'%20viewBox='0%200%20120%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20fill='black'/%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20stroke='%23A6A6A6'/%3e%3cpath%20d='M17.8051%2019.4617L8.08984%2030.0059C8.09076%2030.0078%208.09076%2030.0106%208.09167%2030.0125C8.39005%2031.1574%209.41203%2032%2010.6256%2032C11.1111%2032%2011.5664%2031.8656%2011.957%2031.6305L11.988%2031.6118L22.9232%2025.1593L17.8051%2019.4617Z'%20fill='%23EA4335'/%3e%3cpath%20d='M27.6332%2017.6662L27.624%2017.6597L22.9029%2014.8612L17.584%2019.7013L22.922%2025.1582L27.6177%2022.3878C28.4407%2021.9324%2029.0001%2021.045%2029.0001%2020.0223C29.0001%2019.0052%2028.4489%2018.1225%2027.6332%2017.6662Z'%20fill='%23FBBC04'/%3e%3cpath%20d='M8.08942%209.99325C8.03102%2010.2135%208%2010.4449%208%2010.6838V29.3163C8%2029.5552%208.03102%2029.7866%208.09034%2030.0059L18.1386%2019.7313L8.08942%209.99325Z'%20fill='%234285F4'/%3e%3cpath%20d='M17.8767%2020L22.9044%2014.8594L11.982%208.3836C11.5851%208.14005%2011.1215%208.00009%2010.6261%208.00009C9.41246%208.00009%208.38865%208.84456%208.09027%209.99043C8.09027%209.99136%208.08936%209.9923%208.08936%209.99323L17.8767%2020Z'%20fill='%2334A853'/%3e%3cpath%20d='M43.61%2011.71C43.61%2012.71%2043.3133%2013.5067%2042.72%2014.1C42.0533%2014.8067%2041.1767%2015.16%2040.09%2015.16C39.05%2015.16%2038.17%2014.8%2037.45%2014.08C36.73%2013.36%2036.37%2012.4733%2036.37%2011.42C36.37%2010.3667%2036.73%209.48%2037.45%208.76C38.17%208.04%2039.05%207.68%2040.09%207.68C40.6167%207.68%2041.1133%207.77333%2041.58%207.96C42.0467%208.14667%2042.43%208.41%2042.73%208.75L42.07%209.41C41.85%209.14333%2041.5633%208.93667%2041.21%208.79C40.8633%208.63667%2040.49%208.56%2040.09%208.56C39.31%208.56%2038.65%208.83%2038.11%209.37C37.5767%209.91667%2037.31%2010.6%2037.31%2011.42C37.31%2012.24%2037.5767%2012.9233%2038.11%2013.47C38.65%2014.01%2039.31%2014.28%2040.09%2014.28C40.8033%2014.28%2041.3967%2014.08%2041.87%2013.68C42.3433%2013.28%2042.6167%2012.73%2042.69%2012.03H40.09V11.17H43.56C43.5933%2011.3567%2043.61%2011.5367%2043.61%2011.71ZM48.9078%207.84V8.72H45.6478V10.99H48.5878V11.85H45.6478V14.12H48.9078V15H44.7278V7.84H48.9078ZM52.5877%208.72V15H51.6677V8.72H49.6677V7.84H54.5877V8.72H52.5877ZM58.6654%2015H57.7454V7.84H58.6654V15ZM62.5487%208.72V15H61.6287V8.72H59.6287V7.84H64.5487V8.72H62.5487ZM74.521%2011.42C74.521%2012.48%2074.1677%2013.3667%2073.461%2014.08C72.7477%2014.8%2071.8743%2015.16%2070.841%2015.16C69.801%2015.16%2068.9277%2014.8%2068.221%2014.08C67.5143%2013.3667%2067.161%2012.48%2067.161%2011.42C67.161%2010.36%2067.5143%209.47333%2068.221%208.76C68.9277%208.04%2069.801%207.68%2070.841%207.68C71.881%207.68%2072.7543%208.04333%2073.461%208.77C74.1677%209.48333%2074.521%2010.3667%2074.521%2011.42ZM68.101%2011.42C68.101%2012.2467%2068.361%2012.93%2068.881%2013.47C69.4077%2014.01%2070.061%2014.28%2070.841%2014.28C71.621%2014.28%2072.271%2014.01%2072.791%2013.47C73.3177%2012.9367%2073.581%2012.2533%2073.581%2011.42C73.581%2010.5867%2073.3177%209.90333%2072.791%209.37C72.271%208.83%2071.621%208.56%2070.841%208.56C70.061%208.56%2069.4077%208.83%2068.881%209.37C68.361%209.91%2068.101%2010.5933%2068.101%2011.42ZM76.5267%2015H75.6067V7.84H76.7267L80.2067%2013.41H80.2467L80.2067%2012.03V7.84H81.1267V15H80.1667L76.5267%209.16H76.4867L76.5267%2010.54V15Z'%20fill='white'/%3e%3cpath%20d='M93.5181%2031.4097H95.1469V20.3981H93.5181V31.4097ZM108.189%2024.3646L106.322%2029.1388H106.266L104.328%2024.3646H102.573L105.479%2031.0371L103.823%2034.749H105.521L110%2024.3646H108.189ZM98.9519%2030.1588C98.4176%2030.1588%2097.6739%2029.8902%2097.6739%2029.2234C97.6739%2028.3742%2098.6001%2028.0483%2099.4005%2028.0483C100.116%2028.0483%20100.454%2028.2042%20100.889%2028.4165C100.762%2029.4365%2099.892%2030.1588%2098.9519%2030.1588ZM99.1483%2024.1241C97.969%2024.1241%2096.7469%2024.6482%2096.2424%2025.8101L97.6879%2026.4188C97.9969%2025.8101%2098.5721%2025.611%2099.1762%2025.611C100.019%2025.611%20100.875%2026.121%20100.889%2027.0283V27.1411C100.594%2026.971%2099.9627%2026.7165%2099.1902%2026.7165C97.632%2026.7165%2096.0451%2027.5806%2096.0451%2029.1952C96.0451%2030.6689%2097.323%2031.6184%2098.7546%2031.6184C99.8501%2031.6184%20100.454%2031.1225%20100.833%2030.5411H100.889V31.3912H102.461V27.1692C102.461%2025.2146%20101.015%2024.1241%2099.1483%2024.1241ZM89.0821%2025.7053H86.7655V21.9308H89.0821C90.2998%2021.9308%2090.9911%2022.9482%2090.9911%2023.8176C90.9911%2024.6711%2090.2998%2025.7053%2089.0821%2025.7053ZM89.0402%2020.3981H85.1375V31.4097H86.7655V27.2379H89.0402C90.8453%2027.2379%2092.6199%2025.9184%2092.6199%2023.8176C92.6199%2021.7168%2090.8453%2020.3981%2089.0402%2020.3981ZM67.7583%2030.1606C66.6332%2030.1606%2065.6913%2029.2102%2065.6913%2027.9047C65.6913%2026.5852%2066.6332%2025.6198%2067.7583%2025.6198C68.8695%2025.6198%2069.7406%2026.5852%2069.7406%2027.9047C69.7406%2029.2102%2068.8695%2030.1606%2067.7583%2030.1606ZM69.6289%2024.9812H69.5722C69.2064%2024.5417%2068.5038%2024.1444%2067.6178%2024.1444C65.7611%2024.1444%2064.0599%2025.7898%2064.0599%2027.9047C64.0599%2030.0047%2065.7611%2031.6369%2067.6178%2031.6369C68.5038%2031.6369%2069.2064%2031.2396%2069.5722%2030.7851H69.6289V31.3251C69.6289%2032.7582%2068.8695%2033.5246%2067.6457%2033.5246C66.6471%2033.5246%2066.0282%2032.8005%2065.7751%2032.1901L64.3549%2032.7864C64.7626%2033.78%2065.8458%2035%2067.6457%2035C69.5582%2035%2071.1757%2033.8646%2071.1757%2031.0978V24.3708H69.6289V24.9812ZM72.3008%2031.4097H73.9323V20.3973H72.3008V31.4097ZM76.3362%2027.777C76.2943%2026.3298%2077.4474%2025.5916%2078.2766%2025.5916C78.9243%2025.5916%2079.4725%2025.9176%2079.6549%2026.3862L76.3362%2027.777ZM81.3989%2026.528C81.0899%2025.6912%2080.1472%2024.1444%2078.2208%2024.1444C76.3083%2024.1444%2074.7196%2025.6621%2074.7196%2027.8907C74.7196%2029.9906%2076.2943%2031.6369%2078.4032%2031.6369C80.1053%2031.6369%2081.0899%2030.5869%2081.4976%2029.9765L80.2319%2029.1247C79.8103%2029.7493%2079.2333%2030.1606%2078.4032%2030.1606C77.5739%2030.1606%2076.983%2029.7774%2076.6033%2029.0261L81.5674%2026.9534L81.3989%2026.528ZM41.8501%2025.2939V26.883H45.6184C45.5058%2027.777%2045.2107%2028.4297%2044.7612%2028.8834C44.2121%2029.4374%2043.3541%2030.0479%2041.8501%2030.0479C39.5291%2030.0479%2037.7152%2028.1602%2037.7152%2025.8189C37.7152%2023.4767%2039.5291%2021.5899%2041.8501%2021.5899C43.1018%2021.5899%2044.0157%2022.0867%2044.6905%2022.7254L45.8017%2021.604C44.8589%2020.6959%2043.6081%2020%2041.8501%2020C38.6719%2020%2036%2022.6117%2036%2025.8189C36%2029.0261%2038.6719%2031.6369%2041.8501%2031.6369C43.5653%2031.6369%2044.8589%2031.0688%2045.8715%2030.0047C46.9129%2028.9547%2047.2358%2027.4793%2047.2358%2026.2866C47.2358%2025.9176%2047.2079%2025.5775%2047.1512%2025.2939H41.8501ZM51.5208%2030.1606C50.3957%2030.1606%2049.425%2029.2243%2049.425%2027.8907C49.425%2026.5421%2050.3957%2025.6198%2051.5208%2025.6198C52.6451%2025.6198%2053.6158%2026.5421%2053.6158%2027.8907C53.6158%2029.2243%2052.6451%2030.1606%2051.5208%2030.1606ZM51.5208%2024.1444C49.4669%2024.1444%2047.7936%2025.7194%2047.7936%2027.8907C47.7936%2030.0479%2049.4669%2031.6369%2051.5208%2031.6369C53.5739%2031.6369%2055.2472%2030.0479%2055.2472%2027.8907C55.2472%2025.7194%2053.5739%2024.1444%2051.5208%2024.1444ZM59.65%2030.1606C58.5249%2030.1606%2057.5542%2029.2243%2057.5542%2027.8907C57.5542%2026.5421%2058.5249%2025.6198%2059.65%2025.6198C60.7752%2025.6198%2061.745%2026.5421%2061.745%2027.8907C61.745%2029.2243%2060.7752%2030.1606%2059.65%2030.1606ZM59.65%2024.1444C57.597%2024.1444%2055.9237%2025.7194%2055.9237%2027.8907C55.9237%2030.0479%2057.597%2031.6369%2059.65%2031.6369C61.7031%2031.6369%2063.3764%2030.0479%2063.3764%2027.8907C63.3764%2025.7194%2061.7031%2024.1444%2059.65%2024.1444Z'%20fill='white'/%3e%3c/svg%3e";
2
+ export {
3
+ playstoreIcon as default
4
+ };
5
+ //# sourceMappingURL=playstore-icon.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playstore-icon.svg.js","sources":["../../src/assets/playstore-icon.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='120'%20height='40'%20viewBox='0%200%20120%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20fill='black'/%3e%3crect%20x='0.5'%20y='0.5'%20width='119'%20height='39'%20rx='5.5'%20stroke='%23A6A6A6'/%3e%3cpath%20d='M17.8051%2019.4617L8.08984%2030.0059C8.09076%2030.0078%208.09076%2030.0106%208.09167%2030.0125C8.39005%2031.1574%209.41203%2032%2010.6256%2032C11.1111%2032%2011.5664%2031.8656%2011.957%2031.6305L11.988%2031.6118L22.9232%2025.1593L17.8051%2019.4617Z'%20fill='%23EA4335'/%3e%3cpath%20d='M27.6332%2017.6662L27.624%2017.6597L22.9029%2014.8612L17.584%2019.7013L22.922%2025.1582L27.6177%2022.3878C28.4407%2021.9324%2029.0001%2021.045%2029.0001%2020.0223C29.0001%2019.0052%2028.4489%2018.1225%2027.6332%2017.6662Z'%20fill='%23FBBC04'/%3e%3cpath%20d='M8.08942%209.99325C8.03102%2010.2135%208%2010.4449%208%2010.6838V29.3163C8%2029.5552%208.03102%2029.7866%208.09034%2030.0059L18.1386%2019.7313L8.08942%209.99325Z'%20fill='%234285F4'/%3e%3cpath%20d='M17.8767%2020L22.9044%2014.8594L11.982%208.3836C11.5851%208.14005%2011.1215%208.00009%2010.6261%208.00009C9.41246%208.00009%208.38865%208.84456%208.09027%209.99043C8.09027%209.99136%208.08936%209.9923%208.08936%209.99323L17.8767%2020Z'%20fill='%2334A853'/%3e%3cpath%20d='M43.61%2011.71C43.61%2012.71%2043.3133%2013.5067%2042.72%2014.1C42.0533%2014.8067%2041.1767%2015.16%2040.09%2015.16C39.05%2015.16%2038.17%2014.8%2037.45%2014.08C36.73%2013.36%2036.37%2012.4733%2036.37%2011.42C36.37%2010.3667%2036.73%209.48%2037.45%208.76C38.17%208.04%2039.05%207.68%2040.09%207.68C40.6167%207.68%2041.1133%207.77333%2041.58%207.96C42.0467%208.14667%2042.43%208.41%2042.73%208.75L42.07%209.41C41.85%209.14333%2041.5633%208.93667%2041.21%208.79C40.8633%208.63667%2040.49%208.56%2040.09%208.56C39.31%208.56%2038.65%208.83%2038.11%209.37C37.5767%209.91667%2037.31%2010.6%2037.31%2011.42C37.31%2012.24%2037.5767%2012.9233%2038.11%2013.47C38.65%2014.01%2039.31%2014.28%2040.09%2014.28C40.8033%2014.28%2041.3967%2014.08%2041.87%2013.68C42.3433%2013.28%2042.6167%2012.73%2042.69%2012.03H40.09V11.17H43.56C43.5933%2011.3567%2043.61%2011.5367%2043.61%2011.71ZM48.9078%207.84V8.72H45.6478V10.99H48.5878V11.85H45.6478V14.12H48.9078V15H44.7278V7.84H48.9078ZM52.5877%208.72V15H51.6677V8.72H49.6677V7.84H54.5877V8.72H52.5877ZM58.6654%2015H57.7454V7.84H58.6654V15ZM62.5487%208.72V15H61.6287V8.72H59.6287V7.84H64.5487V8.72H62.5487ZM74.521%2011.42C74.521%2012.48%2074.1677%2013.3667%2073.461%2014.08C72.7477%2014.8%2071.8743%2015.16%2070.841%2015.16C69.801%2015.16%2068.9277%2014.8%2068.221%2014.08C67.5143%2013.3667%2067.161%2012.48%2067.161%2011.42C67.161%2010.36%2067.5143%209.47333%2068.221%208.76C68.9277%208.04%2069.801%207.68%2070.841%207.68C71.881%207.68%2072.7543%208.04333%2073.461%208.77C74.1677%209.48333%2074.521%2010.3667%2074.521%2011.42ZM68.101%2011.42C68.101%2012.2467%2068.361%2012.93%2068.881%2013.47C69.4077%2014.01%2070.061%2014.28%2070.841%2014.28C71.621%2014.28%2072.271%2014.01%2072.791%2013.47C73.3177%2012.9367%2073.581%2012.2533%2073.581%2011.42C73.581%2010.5867%2073.3177%209.90333%2072.791%209.37C72.271%208.83%2071.621%208.56%2070.841%208.56C70.061%208.56%2069.4077%208.83%2068.881%209.37C68.361%209.91%2068.101%2010.5933%2068.101%2011.42ZM76.5267%2015H75.6067V7.84H76.7267L80.2067%2013.41H80.2467L80.2067%2012.03V7.84H81.1267V15H80.1667L76.5267%209.16H76.4867L76.5267%2010.54V15Z'%20fill='white'/%3e%3cpath%20d='M93.5181%2031.4097H95.1469V20.3981H93.5181V31.4097ZM108.189%2024.3646L106.322%2029.1388H106.266L104.328%2024.3646H102.573L105.479%2031.0371L103.823%2034.749H105.521L110%2024.3646H108.189ZM98.9519%2030.1588C98.4176%2030.1588%2097.6739%2029.8902%2097.6739%2029.2234C97.6739%2028.3742%2098.6001%2028.0483%2099.4005%2028.0483C100.116%2028.0483%20100.454%2028.2042%20100.889%2028.4165C100.762%2029.4365%2099.892%2030.1588%2098.9519%2030.1588ZM99.1483%2024.1241C97.969%2024.1241%2096.7469%2024.6482%2096.2424%2025.8101L97.6879%2026.4188C97.9969%2025.8101%2098.5721%2025.611%2099.1762%2025.611C100.019%2025.611%20100.875%2026.121%20100.889%2027.0283V27.1411C100.594%2026.971%2099.9627%2026.7165%2099.1902%2026.7165C97.632%2026.7165%2096.0451%2027.5806%2096.0451%2029.1952C96.0451%2030.6689%2097.323%2031.6184%2098.7546%2031.6184C99.8501%2031.6184%20100.454%2031.1225%20100.833%2030.5411H100.889V31.3912H102.461V27.1692C102.461%2025.2146%20101.015%2024.1241%2099.1483%2024.1241ZM89.0821%2025.7053H86.7655V21.9308H89.0821C90.2998%2021.9308%2090.9911%2022.9482%2090.9911%2023.8176C90.9911%2024.6711%2090.2998%2025.7053%2089.0821%2025.7053ZM89.0402%2020.3981H85.1375V31.4097H86.7655V27.2379H89.0402C90.8453%2027.2379%2092.6199%2025.9184%2092.6199%2023.8176C92.6199%2021.7168%2090.8453%2020.3981%2089.0402%2020.3981ZM67.7583%2030.1606C66.6332%2030.1606%2065.6913%2029.2102%2065.6913%2027.9047C65.6913%2026.5852%2066.6332%2025.6198%2067.7583%2025.6198C68.8695%2025.6198%2069.7406%2026.5852%2069.7406%2027.9047C69.7406%2029.2102%2068.8695%2030.1606%2067.7583%2030.1606ZM69.6289%2024.9812H69.5722C69.2064%2024.5417%2068.5038%2024.1444%2067.6178%2024.1444C65.7611%2024.1444%2064.0599%2025.7898%2064.0599%2027.9047C64.0599%2030.0047%2065.7611%2031.6369%2067.6178%2031.6369C68.5038%2031.6369%2069.2064%2031.2396%2069.5722%2030.7851H69.6289V31.3251C69.6289%2032.7582%2068.8695%2033.5246%2067.6457%2033.5246C66.6471%2033.5246%2066.0282%2032.8005%2065.7751%2032.1901L64.3549%2032.7864C64.7626%2033.78%2065.8458%2035%2067.6457%2035C69.5582%2035%2071.1757%2033.8646%2071.1757%2031.0978V24.3708H69.6289V24.9812ZM72.3008%2031.4097H73.9323V20.3973H72.3008V31.4097ZM76.3362%2027.777C76.2943%2026.3298%2077.4474%2025.5916%2078.2766%2025.5916C78.9243%2025.5916%2079.4725%2025.9176%2079.6549%2026.3862L76.3362%2027.777ZM81.3989%2026.528C81.0899%2025.6912%2080.1472%2024.1444%2078.2208%2024.1444C76.3083%2024.1444%2074.7196%2025.6621%2074.7196%2027.8907C74.7196%2029.9906%2076.2943%2031.6369%2078.4032%2031.6369C80.1053%2031.6369%2081.0899%2030.5869%2081.4976%2029.9765L80.2319%2029.1247C79.8103%2029.7493%2079.2333%2030.1606%2078.4032%2030.1606C77.5739%2030.1606%2076.983%2029.7774%2076.6033%2029.0261L81.5674%2026.9534L81.3989%2026.528ZM41.8501%2025.2939V26.883H45.6184C45.5058%2027.777%2045.2107%2028.4297%2044.7612%2028.8834C44.2121%2029.4374%2043.3541%2030.0479%2041.8501%2030.0479C39.5291%2030.0479%2037.7152%2028.1602%2037.7152%2025.8189C37.7152%2023.4767%2039.5291%2021.5899%2041.8501%2021.5899C43.1018%2021.5899%2044.0157%2022.0867%2044.6905%2022.7254L45.8017%2021.604C44.8589%2020.6959%2043.6081%2020%2041.8501%2020C38.6719%2020%2036%2022.6117%2036%2025.8189C36%2029.0261%2038.6719%2031.6369%2041.8501%2031.6369C43.5653%2031.6369%2044.8589%2031.0688%2045.8715%2030.0047C46.9129%2028.9547%2047.2358%2027.4793%2047.2358%2026.2866C47.2358%2025.9176%2047.2079%2025.5775%2047.1512%2025.2939H41.8501ZM51.5208%2030.1606C50.3957%2030.1606%2049.425%2029.2243%2049.425%2027.8907C49.425%2026.5421%2050.3957%2025.6198%2051.5208%2025.6198C52.6451%2025.6198%2053.6158%2026.5421%2053.6158%2027.8907C53.6158%2029.2243%2052.6451%2030.1606%2051.5208%2030.1606ZM51.5208%2024.1444C49.4669%2024.1444%2047.7936%2025.7194%2047.7936%2027.8907C47.7936%2030.0479%2049.4669%2031.6369%2051.5208%2031.6369C53.5739%2031.6369%2055.2472%2030.0479%2055.2472%2027.8907C55.2472%2025.7194%2053.5739%2024.1444%2051.5208%2024.1444ZM59.65%2030.1606C58.5249%2030.1606%2057.5542%2029.2243%2057.5542%2027.8907C57.5542%2026.5421%2058.5249%2025.6198%2059.65%2025.6198C60.7752%2025.6198%2061.745%2026.5421%2061.745%2027.8907C61.745%2029.2243%2060.7752%2030.1606%2059.65%2030.1606ZM59.65%2024.1444C57.597%2024.1444%2055.9237%2025.7194%2055.9237%2027.8907C55.9237%2030.0479%2057.597%2031.6369%2059.65%2031.6369C61.7031%2031.6369%2063.3764%2030.0479%2063.3764%2027.8907C63.3764%2025.7194%2061.7031%2024.1444%2059.65%2024.1444Z'%20fill='white'/%3e%3c/svg%3e\""],"names":[],"mappings":"AAAA,MAAA,gBAAe;"}
@@ -1,12 +1,16 @@
1
+ import appstoreIcon from "../../assets/appstore-icon.svg.js";
1
2
  import arrowRight from "../../assets/arrow-right.svg.js";
2
3
  import concordiumModalLogo from "../../assets/concordium-modal-logo.svg.js";
3
4
  import modalGraphic from "../../assets/modal-graphic.svg.js";
5
+ import playstoreIcon from "../../assets/playstore-icon.svg.js";
4
6
  import sectionSeparator from "../../assets/section-separator.svg.js";
7
+ import { getGlobalContainer, getConfig, isMobileScreen } from "../../config.state.js";
8
+ import { ID_APP_STORE } from "../../constants/wallet.registry.js";
5
9
  import "@walletconnect/sign-client";
6
10
  import "../../services/service.factory.js";
7
- import { getGlobalContainer, getConfig } from "../../config.state.js";
8
11
  /* empty css */
9
12
  import "../../sdk.js";
13
+ import { openAppStoreForConcordiumID } from "../../utils/mobileAppDetection.js";
10
14
  const createLandingModal = () => {
11
15
  const landingHTML = `
12
16
  <div class="desktop--modal-overlay">
@@ -32,13 +36,27 @@ const createLandingModal = () => {
32
36
 
33
37
  <div class="flex flex-col items-center py-4">
34
38
  <button class="desktop--primary-button" id="start-verification-btn">
35
- <span>Start private verification</span>
39
+ <span>Open with ID App</span>
36
40
  <img src="${arrowRight}" alt="arrow-right-icon" />
37
41
  </button>
38
42
  </div>
43
+
44
+ <div class="flex flex-col items-center" style="border-radius: var(--semantic-radius-l, 16px); background: var(--semantic-surface-primary-a5, rgba(0, 0, 0, 0.05)); padding: 16px; gap: 12px;">
45
+ <p class="desktop--landing-description" style="margin: 0;">Download Concordium ID</p>
46
+ <div class="flex items-center justify-center" style="gap: 8px;">
47
+ <a href="https://apps.apple.com/ca/app/concordium-id/id6746754485" target="_blank" rel="noopener noreferrer">
48
+ <img src="${appstoreIcon}" alt="Download on App Store" />
49
+ </a>
50
+ <a href="https://play.google.com/store/apps/details?id=com.idwallet.app&hl=en_CA" target="_blank" rel="noopener noreferrer">
51
+ <img src="${playstoreIcon}" alt="Get it on Google Play" />
52
+ </a>
53
+ </div>
54
+ <p class="desktop--landing-description" style="margin: 0;">Come back here and continue after installing the app.</p>
55
+ </div>
56
+
39
57
  <img src="${sectionSeparator}" alt="" class="mx-auto" />
40
58
  <div class="flex items-center justify-center">
41
- <p class="desktop--download-text">Download & Install the <a href="#">Concordium ID App</a> and come back here to verify.</p>
59
+ <p class="desktop--download-text">or <a href="#" id="open-with-wallet-link">Open with Wallet</a> via Concordium Wallet, Bitcoin.com, Coin98, <a href="#" id="show-more-wallets-link">Ledger</a></p>
42
60
  </div>
43
61
  </div>
44
62
  </div>
@@ -48,10 +66,109 @@ const createLandingModal = () => {
48
66
  landingContainer.innerHTML = landingHTML;
49
67
  const startBtn = landingContainer.querySelector("#start-verification-btn");
50
68
  startBtn?.addEventListener("click", async () => {
51
- const { showScanModal } = await import("./scan.js");
69
+ const isMobile = isMobileScreen();
70
+ if (isMobile) {
71
+ try {
72
+ console.log("[Mobile] Opening ID App - initializing WalletConnect...");
73
+ const { ServiceFactory } = await import("../../services/index.js");
74
+ const { ModalConstants } = await import("../../constants/modal.constants.js");
75
+ const { WalletConnectConstants } = await import("../../constants/walletconnect.constants.js");
76
+ const { getConcordiumIdDeepLink } = await import("../../constants/wallet.registry.js");
77
+ const wcService = ServiceFactory.createWalletConnectService();
78
+ await wcService.initialize();
79
+ await wcService.clearAllSessionsForNewPairing();
80
+ const network = localStorage.getItem(ModalConstants.LOCAL_STORAGE_FLAGS.SDK_NETWORK) || "testnet";
81
+ const chainIds = WalletConnectConstants.CHAIN_IDS[network];
82
+ console.log("[Mobile] Generating WalletConnect URI...");
83
+ const { uri, approval } = await wcService.connect({
84
+ ccd: {
85
+ // Request all methods for broad wallet compatibility
86
+ methods: [...WalletConnectConstants.ALL_METHODS],
87
+ chains: chainIds,
88
+ events: [...WalletConnectConstants.EVENTS]
89
+ }
90
+ });
91
+ if (!uri) {
92
+ throw new Error("Failed to generate WalletConnect URI");
93
+ }
94
+ console.log("[Mobile] WalletConnect URI generated:", uri.substring(0, 50) + "...");
95
+ localStorage.setItem(ModalConstants.LOCAL_STORAGE_FLAGS.WALLET_CONNECT_URI, uri);
96
+ localStorage.setItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONNECTED_WALLET_NAME, "Concordium ID");
97
+ approval().then(async (session) => {
98
+ console.log("[Mobile] Session approved:", session.peer?.metadata?.name);
99
+ const { handleSessionApproval } = await import("./scan.js");
100
+ await handleSessionApproval(session);
101
+ }).catch((error) => {
102
+ console.error("Session approval failed:", error);
103
+ });
104
+ const deepLink = getConcordiumIdDeepLink(uri);
105
+ console.log("[Mobile] Opening deep link:", deepLink.substring(0, 80) + "...");
106
+ const isAndroid = /android/i.test(navigator.userAgent);
107
+ let appOpened = false;
108
+ const markAppOpened = () => {
109
+ console.log("[Mobile] App opened detected");
110
+ appOpened = true;
111
+ };
112
+ document.addEventListener("visibilitychange", () => {
113
+ if (document.hidden) markAppOpened();
114
+ });
115
+ window.addEventListener("pagehide", markAppOpened);
116
+ window.addEventListener("blur", markAppOpened);
117
+ if (isAndroid) {
118
+ const iframe = document.createElement("iframe");
119
+ iframe.style.display = "none";
120
+ iframe.src = deepLink;
121
+ document.body.appendChild(iframe);
122
+ setTimeout(() => {
123
+ window.location.href = deepLink;
124
+ }, 100);
125
+ setTimeout(() => {
126
+ if (!appOpened && !document.hidden) {
127
+ console.log("[Mobile] App not detected after timeout, redirecting to Play Store...");
128
+ window.location.href = ID_APP_STORE.android;
129
+ }
130
+ if (iframe.parentNode) {
131
+ iframe.parentNode.removeChild(iframe);
132
+ }
133
+ }, 2500);
134
+ } else {
135
+ const link = document.createElement("a");
136
+ link.href = deepLink;
137
+ link.style.display = "none";
138
+ document.body.appendChild(link);
139
+ link.click();
140
+ setTimeout(() => {
141
+ if (link.parentNode) {
142
+ link.parentNode.removeChild(link);
143
+ }
144
+ }, 100);
145
+ }
146
+ } catch (error) {
147
+ console.error("Failed to open Concordium ID app:", error);
148
+ openAppStoreForConcordiumID();
149
+ }
150
+ } else {
151
+ const { showScanModal } = await import("./scan.js");
152
+ const { hideLandingModal: hideLandingModal2 } = await Promise.resolve().then(() => landing);
153
+ hideLandingModal2();
154
+ await showScanModal();
155
+ }
156
+ });
157
+ const openWalletLink = landingContainer.querySelector("#open-with-wallet-link");
158
+ openWalletLink?.addEventListener("click", async (e) => {
159
+ e.preventDefault();
160
+ const { showWalletSelectionModal } = await import("./wallet-selection.js");
161
+ const { hideLandingModal: hideLandingModal2 } = await Promise.resolve().then(() => landing);
162
+ hideLandingModal2();
163
+ await showWalletSelectionModal();
164
+ });
165
+ const moreWalletsLink = landingContainer.querySelector("#show-more-wallets-link");
166
+ moreWalletsLink?.addEventListener("click", async (e) => {
167
+ e.preventDefault();
168
+ const { showWalletSelectionModal } = await import("./wallet-selection.js");
52
169
  const { hideLandingModal: hideLandingModal2 } = await Promise.resolve().then(() => landing);
53
170
  hideLandingModal2();
54
- await showScanModal();
171
+ await showWalletSelectionModal();
55
172
  });
56
173
  return landingContainer;
57
174
  };
@@ -1 +1 @@
1
- {"version":3,"file":"landing.js","sources":["../../../src/components/desktop/landing.ts"],"sourcesContent":["import arrowRight from '@/assets/arrow-right.svg';\nimport concordiumModalLogo from '@/assets/concordium-modal-logo.svg';\nimport modalGraphic from '@/assets/modal-graphic.svg';\nimport sectionSeparator from '@/assets/section-separator.svg';\nimport { getConfig, getGlobalContainer } from '@/index';\nimport type { HideModalFunction, ModalFunction, ShowModalFunction } from '@/types';\n\nexport const createLandingModal: ModalFunction = () => {\n const landingHTML = `\n <div class=\"desktop--modal-overlay\">\n <div class=\"desktop--modal-container\">\n <div class=\"desktop--modal-body\">\n <div class=\"flex items-center justify-end p-1 md:p-2\">\n <img\n src=\"${concordiumModalLogo}\"\n alt=\"concordium-modal-logo\"\n class=\"max-w-full h-auto py-4\"\n />\n </div>\n\n <div class=\"flex flex-col items-center gap-4 text-center px-4\">\n <img\n src=\"${modalGraphic}\"\n alt=\"modal-graphic\"\n class=\"max-w-full h-auto py-4\"\n />\n <h1 class=\"desktop--landing-title\">Fast, one click, Anonymous Verification</h1>\n <p class=\"desktop--landing-description\">Connect and verify in seconds. This process uses your Concordium ID to confirm who you are without your details ever leaving your device.</p>\n </div>\n\n <div class=\"flex flex-col items-center py-4\">\n <button class=\"desktop--primary-button\" id=\"start-verification-btn\">\n <span>Start private verification</span>\n <img src=\"${arrowRight}\" alt=\"arrow-right-icon\" />\n </button>\n </div>\n <img src=\"${sectionSeparator}\" alt=\"\" class=\"mx-auto\" />\n <div class=\"flex items-center justify-center\">\n <p class=\"desktop--download-text\">Download & Install the <a href=\"#\">Concordium ID App</a> and come back here to verify.</p>\n </div>\n </div>\n </div>\n </div>\n `;\n\n const landingContainer = document.createElement('div');\n landingContainer.innerHTML = landingHTML;\n\n // Add event listener for the start verification button\n const startBtn = landingContainer.querySelector('#start-verification-btn') as HTMLButtonElement | null;\n startBtn?.addEventListener('click', async () => {\n const { showScanModal } = await import('./scan');\n const { hideLandingModal } = await import('./landing');\n hideLandingModal();\n await showScanModal();\n });\n\n return landingContainer;\n};\n\nexport const showLandingModal: ShowModalFunction = async () => {\n // Ensure DOM is ready before resolving container\n if (document.readyState === 'loading') {\n await new Promise((resolve) => {\n document.addEventListener('DOMContentLoaded', resolve, { once: true });\n });\n }\n\n // Resolve container with retries (similar to initConcordiumModal)\n let targetContainer = getGlobalContainer();\n\n // If still not found, wait a bit and try again (for React apps that might still be mounting)\n if (!targetContainer) {\n await new Promise((resolve) => setTimeout(resolve, 100));\n targetContainer = getGlobalContainer();\n }\n\n if (!targetContainer) {\n console.error('Container not found for modal');\n console.error(`Container not found for Concordium modal. Tried: ${getConfig().defaultContainer}`);\n console.error('Available elements:', {\n root: document.querySelector('#root'),\n app: document.querySelector('#app'),\n body: document.body,\n });\n return;\n }\n\n // Prevent horizontal scrolling on body\n document.body.style.overflowX = 'hidden';\n\n // Find existing modal to crossfade\n const existingModal = targetContainer.querySelector('.desktop--modal-overlay') as HTMLElement | null;\n\n const landing = createLandingModal();\n landing.id = 'landing-modal';\n\n // Get the modal container for transforms\n const modalContainer = landing.querySelector('.desktop--modal-container') as HTMLElement;\n\n // For smooth transitions, prepare new modal completely before showing\n landing.style.opacity = '0';\n modalContainer.style.transform = 'translateY(-20px) scale(0.95)';\n modalContainer.style.transition = 'transform 0.3s ease-out';\n targetContainer.appendChild(landing);\n\n // Force a reflow to ensure the styles are applied\n landing.offsetHeight;\n\n // Now start the transition\n landing.style.transition = 'opacity 0.3s ease-out';\n\n // Use a small delay to ensure DOM is fully ready\n setTimeout(() => {\n // Start simultaneous crossfade\n if (existingModal) {\n const existingContainer = existingModal.querySelector('.desktop--modal-container') as HTMLElement;\n existingModal.style.transition = 'opacity 0.3s ease-in';\n if (existingContainer) {\n existingContainer.style.transition = 'transform 0.3s ease-in';\n existingContainer.style.transform = 'translateY(-20px) scale(0.95)';\n }\n existingModal.style.opacity = '0';\n existingModal.style.pointerEvents = 'none';\n existingModal.style.zIndex = '9998';\n }\n\n // Show new modal\n landing.style.opacity = '1';\n modalContainer.style.transform = 'translateY(0) scale(1)';\n\n // Remove old modal after transition completes\n if (existingModal) {\n setTimeout(() => {\n if (existingModal.parentNode) {\n existingModal.parentNode.removeChild(existingModal);\n }\n }, 350);\n }\n }, 10);\n};\n\nexport const hideLandingModal: HideModalFunction = () => {\n const modal = document.querySelector('#landing-modal') as HTMLElement | null;\n if (modal) {\n // Add fade-out animation\n modal.classList.add('modal-exiting');\n\n // Remove after animation completes\n setTimeout(() => {\n modal.remove();\n // Restore body overflow if no other modals are present\n if (\n !document.querySelector('.desktop--modal-overlay') &&\n !document.querySelector('.mobile--modal-overlay')\n ) {\n document.body.style.overflowX = '';\n }\n }, 300);\n }\n};\n"],"names":["hideLandingModal","landing"],"mappings":";;;;;;;;;AAOO,MAAM,qBAAoC,MAAM;AACnD,QAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAMH,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAQnB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAWP,UAAU;AAAA;AAAA;AAAA,sBAGd,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASlC,QAAM,mBAAmB,SAAS,cAAc,KAAK;AACrD,mBAAiB,YAAY;AAG7B,QAAM,WAAW,iBAAiB,cAAc,yBAAy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c,cAAc,2BAA2B;AACjF,oBAAc,MAAM,aAAa;AACjC,UAAI,mBAAmB;AACnB,0BAAkB,MAAM,aAAa;AACrC,0BAAkB,MAAM,YAAY;AAAA,MACxC;AACA,oBAAc,MAAM,UAAU;AAC9B,oBAAc,MAAM,gBAAgB;AACpC,oBAAc,MAAM,SAAS;AAAA,IACjC;AAGA,IAAAA,SAAQ,MAAM,UAAU;AACxB,mBAAe,MAAM,YAAY;AAGjC,QAAI,eAAe;AACf,iBAAW,MAAM;AACb,YAAI,cAAc,YAAY;AAC1B,wBAAc,WAAW,YAAY,aAAa;AAAA,QACtD;AAAA,MACJ,GAAG,GAAG;AAAA,IACV;AAAA,EACJ,GAAG,EAAE;AACT;AAEO,MAAM,mBAAsC,MAAM;AACrD,QAAM,QAAQ,SAAS,cAAc,gBAAgB;AACrD,MAAI,OAAO;AAEP,UAAM,UAAU,IAAI,eAAe;AAGnC,eAAW,MAAM;AACb,YAAM,OAAA;AAEN,UACI,CAAC,SAAS,cAAc,yBAAyB,KACjD,CAAC,SAAS,cAAc,wBAAwB,GAClD;AACE,iBAAS,KAAK,MAAM,YAAY;AAAA,MACpC;AAAA,IACJ,GAAG,GAAG;AAAA,EACV;AACJ;;;;;;;"}
1
+ {"version":3,"file":"landing.js","sources":["../../../src/components/desktop/landing.ts"],"sourcesContent":["import appstoreIcon from '@/assets/appstore-icon.svg';\nimport arrowRight from '@/assets/arrow-right.svg';\nimport concordiumModalLogo from '@/assets/concordium-modal-logo.svg';\nimport modalGraphic from '@/assets/modal-graphic.svg';\nimport playstoreIcon from '@/assets/playstore-icon.svg';\nimport sectionSeparator from '@/assets/section-separator.svg';\nimport { isMobileScreen } from '@/config.state';\nimport { ID_APP_STORE } from '@/constants/wallet.registry';\nimport { getConfig, getGlobalContainer } from '@/index';\nimport type { HideModalFunction, ModalFunction, ShowModalFunction } from '@/types';\nimport { openAppStoreForConcordiumID } from '@/utils/mobileAppDetection';\n\nexport const createLandingModal: ModalFunction = () => {\n const landingHTML = `\n <div class=\"desktop--modal-overlay\">\n <div class=\"desktop--modal-container\">\n <div class=\"desktop--modal-body\">\n <div class=\"flex items-center justify-end p-1 md:p-2\">\n <img\n src=\"${concordiumModalLogo}\"\n alt=\"concordium-modal-logo\"\n class=\"max-w-full h-auto py-4\"\n />\n </div>\n\n <div class=\"flex flex-col items-center gap-4 text-center px-4\">\n <img\n src=\"${modalGraphic}\"\n alt=\"modal-graphic\"\n class=\"max-w-full h-auto py-4\"\n />\n <h1 class=\"desktop--landing-title\">Fast, one click, Anonymous Verification</h1>\n <p class=\"desktop--landing-description\">Connect and verify in seconds. This process uses your Concordium ID to confirm who you are without your details ever leaving your device.</p>\n </div>\n\n <div class=\"flex flex-col items-center py-4\">\n <button class=\"desktop--primary-button\" id=\"start-verification-btn\">\n <span>Open with ID App</span>\n <img src=\"${arrowRight}\" alt=\"arrow-right-icon\" />\n </button>\n </div>\n\n <div class=\"flex flex-col items-center\" style=\"border-radius: var(--semantic-radius-l, 16px); background: var(--semantic-surface-primary-a5, rgba(0, 0, 0, 0.05)); padding: 16px; gap: 12px;\">\n <p class=\"desktop--landing-description\" style=\"margin: 0;\">Download Concordium ID</p>\n <div class=\"flex items-center justify-center\" style=\"gap: 8px;\">\n <a href=\"https://apps.apple.com/ca/app/concordium-id/id6746754485\" target=\"_blank\" rel=\"noopener noreferrer\">\n <img src=\"${appstoreIcon}\" alt=\"Download on App Store\" />\n </a>\n <a href=\"https://play.google.com/store/apps/details?id=com.idwallet.app&hl=en_CA\" target=\"_blank\" rel=\"noopener noreferrer\">\n <img src=\"${playstoreIcon}\" alt=\"Get it on Google Play\" />\n </a>\n </div>\n <p class=\"desktop--landing-description\" style=\"margin: 0;\">Come back here and continue after installing the app.</p>\n </div>\n\n <img src=\"${sectionSeparator}\" alt=\"\" class=\"mx-auto\" />\n <div class=\"flex items-center justify-center\">\n <p class=\"desktop--download-text\">or <a href=\"#\" id=\"open-with-wallet-link\">Open with Wallet</a> via Concordium Wallet, Bitcoin.com, Coin98, <a href=\"#\" id=\"show-more-wallets-link\">Ledger</a></p>\n </div>\n </div>\n </div>\n </div>\n `;\n\n const landingContainer = document.createElement('div');\n landingContainer.innerHTML = landingHTML;\n\n // Add event listener for the start verification button\n const startBtn = landingContainer.querySelector('#start-verification-btn') as HTMLButtonElement | null;\n startBtn?.addEventListener('click', async () => {\n const isMobile = isMobileScreen();\n\n if (isMobile) {\n // On mobile, try to open the Concordium ID app directly\n // First, we need to initialize WalletConnect to get a URI\n try {\n console.log('[Mobile] Opening ID App - initializing WalletConnect...');\n const { ServiceFactory } = await import('@/services');\n const { ModalConstants } = await import('@/constants/modal.constants');\n const { WalletConnectConstants } = await import('@/constants/walletconnect.constants');\n const { getConcordiumIdDeepLink } = await import('@/constants/wallet.registry');\n\n // Get WalletConnect service and generate URI\n const wcService = ServiceFactory.createWalletConnectService();\n await wcService.initialize();\n\n // Clear existing sessions to ensure fresh pairing\n await wcService.clearAllSessionsForNewPairing();\n\n const network =\n (localStorage.getItem(ModalConstants.LOCAL_STORAGE_FLAGS.SDK_NETWORK) as 'mainnet' | 'testnet') ||\n 'testnet';\n const chainIds = WalletConnectConstants.CHAIN_IDS[network];\n\n console.log('[Mobile] Generating WalletConnect URI...');\n // Generate WalletConnect URI by calling connect()\n const { uri, approval } = await wcService.connect({\n ccd: {\n // Request all methods for broad wallet compatibility\n methods: [...WalletConnectConstants.ALL_METHODS],\n chains: chainIds,\n events: [...WalletConnectConstants.EVENTS],\n },\n });\n\n if (!uri) {\n throw new Error('Failed to generate WalletConnect URI');\n }\n\n console.log('[Mobile] WalletConnect URI generated:', uri.substring(0, 50) + '...');\n\n // Store URI for later use\n localStorage.setItem(ModalConstants.LOCAL_STORAGE_FLAGS.WALLET_CONNECT_URI, uri);\n\n // Store connected wallet name\n localStorage.setItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONNECTED_WALLET_NAME, 'Concordium ID');\n\n // Handle session approval in the background\n approval()\n .then(async (session) => {\n console.log('[Mobile] Session approved:', session.peer?.metadata?.name);\n const { handleSessionApproval } = await import('./scan');\n await handleSessionApproval(session);\n })\n .catch((error) => {\n console.error('Session approval failed:', error);\n });\n\n // Generate deep link\n const deepLink = getConcordiumIdDeepLink(uri);\n console.log('[Mobile] Opening deep link:', deepLink.substring(0, 80) + '...');\n\n const isAndroid = /android/i.test(navigator.userAgent);\n\n // Track if app opened (page loses visibility)\n let appOpened = false;\n const markAppOpened = () => {\n console.log('[Mobile] App opened detected');\n appOpened = true;\n };\n\n document.addEventListener('visibilitychange', () => {\n if (document.hidden) markAppOpened();\n });\n window.addEventListener('pagehide', markAppOpened);\n window.addEventListener('blur', markAppOpened);\n\n if (isAndroid) {\n // Android: Try deep link, fall back to Play Store after timeout\n // Use iframe trick for more reliable detection\n const iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n iframe.src = deepLink;\n document.body.appendChild(iframe);\n\n // Also try window.location as backup\n setTimeout(() => {\n window.location.href = deepLink;\n }, 100);\n\n // After 2.5 seconds, if still on page, redirect to Play Store\n setTimeout(() => {\n if (!appOpened && !document.hidden) {\n console.log('[Mobile] App not detected after timeout, redirecting to Play Store...');\n window.location.href = ID_APP_STORE.android;\n }\n // Clean up iframe\n if (iframe.parentNode) {\n iframe.parentNode.removeChild(iframe);\n }\n }, 2500);\n } else {\n // iOS: Use a hidden link click for better Safari compatibility\n const link = document.createElement('a');\n link.href = deepLink;\n link.style.display = 'none';\n document.body.appendChild(link);\n link.click();\n\n // Clean up\n setTimeout(() => {\n if (link.parentNode) {\n link.parentNode.removeChild(link);\n }\n }, 100);\n }\n } catch (error) {\n console.error('Failed to open Concordium ID app:', error);\n // Fallback to app store if something goes wrong\n openAppStoreForConcordiumID();\n }\n } else {\n // On desktop, show the scan modal with QR code\n const { showScanModal } = await import('./scan');\n const { hideLandingModal } = await import('./landing');\n hideLandingModal();\n await showScanModal();\n }\n });\n\n // Add event listener for \"Open with Wallet\" link\n const openWalletLink = landingContainer.querySelector('#open-with-wallet-link') as HTMLAnchorElement | null;\n openWalletLink?.addEventListener('click', async (e) => {\n e.preventDefault();\n const { showWalletSelectionModal } = await import('./wallet-selection');\n const { hideLandingModal } = await import('./landing');\n hideLandingModal();\n await showWalletSelectionModal();\n });\n\n // Add event listener for \"more\" link (shows same wallet selection modal)\n const moreWalletsLink = landingContainer.querySelector('#show-more-wallets-link') as HTMLAnchorElement | null;\n moreWalletsLink?.addEventListener('click', async (e) => {\n e.preventDefault();\n const { showWalletSelectionModal } = await import('./wallet-selection');\n const { hideLandingModal } = await import('./landing');\n hideLandingModal();\n await showWalletSelectionModal();\n });\n\n return landingContainer;\n};\n\nexport const showLandingModal: ShowModalFunction = async () => {\n // Ensure DOM is ready before resolving container\n if (document.readyState === 'loading') {\n await new Promise((resolve) => {\n document.addEventListener('DOMContentLoaded', resolve, { once: true });\n });\n }\n\n // Resolve container with retries (similar to initConcordiumModal)\n let targetContainer = getGlobalContainer();\n\n // If still not found, wait a bit and try again (for React apps that might still be mounting)\n if (!targetContainer) {\n await new Promise((resolve) => setTimeout(resolve, 100));\n targetContainer = getGlobalContainer();\n }\n\n if (!targetContainer) {\n console.error('Container not found for modal');\n console.error(`Container not found for Concordium modal. Tried: ${getConfig().defaultContainer}`);\n console.error('Available elements:', {\n root: document.querySelector('#root'),\n app: document.querySelector('#app'),\n body: document.body,\n });\n return;\n }\n\n // Prevent horizontal scrolling on body\n document.body.style.overflowX = 'hidden';\n\n // Find existing modal to crossfade\n const existingModal = targetContainer.querySelector('.desktop--modal-overlay') as HTMLElement | null;\n\n const landing = createLandingModal();\n landing.id = 'landing-modal';\n\n // Get the modal container for transforms\n const modalContainer = landing.querySelector('.desktop--modal-container') as HTMLElement;\n\n // For smooth transitions, prepare new modal completely before showing\n landing.style.opacity = '0';\n modalContainer.style.transform = 'translateY(-20px) scale(0.95)';\n modalContainer.style.transition = 'transform 0.3s ease-out';\n targetContainer.appendChild(landing);\n\n // Force a reflow to ensure the styles are applied\n landing.offsetHeight;\n\n // Now start the transition\n landing.style.transition = 'opacity 0.3s ease-out';\n\n // Use a small delay to ensure DOM is fully ready\n setTimeout(() => {\n // Start simultaneous crossfade\n if (existingModal) {\n const existingContainer = existingModal.querySelector('.desktop--modal-container') as HTMLElement;\n existingModal.style.transition = 'opacity 0.3s ease-in';\n if (existingContainer) {\n existingContainer.style.transition = 'transform 0.3s ease-in';\n existingContainer.style.transform = 'translateY(-20px) scale(0.95)';\n }\n existingModal.style.opacity = '0';\n existingModal.style.pointerEvents = 'none';\n existingModal.style.zIndex = '9998';\n }\n\n // Show new modal\n landing.style.opacity = '1';\n modalContainer.style.transform = 'translateY(0) scale(1)';\n\n // Remove old modal after transition completes\n if (existingModal) {\n setTimeout(() => {\n if (existingModal.parentNode) {\n existingModal.parentNode.removeChild(existingModal);\n }\n }, 350);\n }\n }, 10);\n};\n\nexport const hideLandingModal: HideModalFunction = () => {\n const modal = document.querySelector('#landing-modal') as HTMLElement | null;\n if (modal) {\n // Add fade-out animation\n modal.classList.add('modal-exiting');\n\n // Remove after animation completes\n setTimeout(() => {\n modal.remove();\n // Restore body overflow if no other modals are present\n if (\n !document.querySelector('.desktop--modal-overlay') &&\n !document.querySelector('.mobile--modal-overlay')\n ) {\n document.body.style.overflowX = '';\n }\n }, 300);\n }\n};\n"],"names":["hideLandingModal","landing"],"mappings":";;;;;;;;;;;;;AAYO,MAAM,qBAAoC,MAAM;AACnD,QAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAMH,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAQnB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAWP,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAQR,YAAY;AAAA;AAAA;AAAA,4BAGZ,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMnB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AA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;AACb,YAAM,OAAA;AAEN,UACI,CAAC,SAAS,cAAc,yBAAyB,KACjD,CAAC,SAAS,cAAc,wBAAwB,GAClD;AACE,iBAAS,KAAK,MAAM,YAAY;AAAA,MACpC;AAAA,IACJ,GAAG,GAAG;AAAA,EACV;AACJ;;;;;;;"}
@@ -2,9 +2,14 @@ import concordiumModalLogo from "../../assets/concordium-modal-logo.svg.js";
2
2
  import loadingVideo from "../../assets/loading.mp4.js";
3
3
  import modalGraphicDelete from "../../assets/modal-graphic-delete.svg.js";
4
4
  import modalGraphicSuccess from "../../assets/modal-graphic-success.svg.js";
5
+ import { ModalConstants } from "../../constants/modal.constants.js";
5
6
  let processingModalElement = null;
6
7
  let eventListenerCleanup = null;
8
+ function getConnectedWalletName() {
9
+ return localStorage.getItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONNECTED_WALLET_NAME) || "Wallet";
10
+ }
7
11
  const createProcessingModal = (state = "loading") => {
12
+ const walletName = getConnectedWalletName();
8
13
  const processingHTML = `
9
14
  <div class="desktop--modal-overlay">
10
15
  <div class="desktop--modal-container">
@@ -28,7 +33,7 @@ const createProcessingModal = (state = "loading") => {
28
33
  ${state === "loading" ? "Verification in Progress" : state === "success" ? "Success!" : "Verification Failed!"}
29
34
  </p>
30
35
  <p class="desktop--processing-text">
31
- ${state === "loading" ? "Approve in your ConcordiumID App" : state === "success" ? "Verification completed" : "Something went wrong with your verification. Please repeat the process"}
36
+ ${state === "loading" ? `Approve in your ${walletName}` : state === "success" ? "Verification completed" : "Something went wrong with your verification. Please repeat the process"}
32
37
  </p>
33
38
  </div>
34
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"processing.js","sources":["../../../src/components/desktop/processing.ts"],"sourcesContent":["import concordiumModalLogo from '@/assets/concordium-modal-logo.svg';\nimport loadingVideo from '@/assets/loading.mp4';\nimport modalGraphicDelete from '@/assets/modal-graphic-delete.svg';\nimport modalGraphicSuccess from '@/assets/modal-graphic-success.svg';\nimport type { HideModalFunction, ShowModalFunction } from '@/types';\n\ntype ProcessingState = 'loading' | 'success' | 'error';\n\n// Global variables for modal state management following your pattern\nlet processingModalElement: HTMLElement | null = null;\nlet eventListenerCleanup: (() => void) | null = null;\n\nexport const createProcessingModal = (state: ProcessingState = 'loading'): HTMLElement => {\n const processingHTML = `\n <div class=\"desktop--modal-overlay\">\n <div class=\"desktop--modal-container\">\n <div class=\"desktop--modal-body\">\n <div class=\"flex items-center justify-end p-2\">\n <img\n src=\"${concordiumModalLogo}\"\n alt=\"concordium-modal-logo\"\n class=\"object-cover\"\n />\n </div>\n\n <div class=\"flex items-center justify-center\">\n ${\n state === 'loading'\n ? `<video autoplay loop muted playsinline class=\"max-w-full h-auto\" style=\"max-height: 80px; object-fit: contain;\">\n <source src=\"${loadingVideo}\" type=\"video/mp4\" />\n </video>`\n : state === 'success'\n ? `<img src=\"${modalGraphicSuccess}\" alt=\"success-graphic\" class=\"max-w-full h-auto\" style=\"max-height: 80px; object-fit: contain;\" />`\n : `<img src=\"${modalGraphicDelete}\" alt=\"error-graphic\" class=\"max-w-full h-auto\" style=\"max-height: 80px; object-fit: contain;\" />`\n }\n </div>\n\n <div class=\"flex flex-col items-center gap-2\">\n <p class=\"font-medium text-[20px] leading-[25px] tracking-[0.2px] font-jakarta\" style=\"color: #0D0F11;\">\n ${\n state === 'loading'\n ? 'Verification in Progress'\n : state === 'success'\n ? 'Success!'\n : 'Verification Failed!'\n }\n </p>\n <p class=\"desktop--processing-text\">\n ${\n state === 'loading'\n ? 'Approve in your ConcordiumID App'\n : state === 'success'\n ? 'Verification completed'\n : 'Something went wrong with your verification. Please repeat the process'\n }\n </p>\n </div>\n\n <div class=\"flex items-center justify-center gap-3 mt-3\">\n ${\n state === 'loading'\n ? `<button disabled class=\"desktop--disabled-button\" id=\"approve-btn\">\n <span>Please wait</span>\n </button>`\n : state === 'success'\n ? `<button class=\"desktop--primary-button\" id=\"close-btn\">\n <span>Continue to site</span>\n </button>`\n : `<button class=\"desktop--primary-button\" id=\"repeat-btn\" style=\"background-color: #0D0F11;\">\n <span>Try again</span>\n </button>`\n }\n </div>\n </div>\n </div>\n </div>\n`;\n\n // Create a container div\n const processingContainer = document.createElement('div');\n processingContainer.innerHTML = processingHTML;\n\n // Add event listeners\n const closeBtn = processingContainer.querySelector('#close-btn') as HTMLButtonElement | null;\n\n closeBtn?.addEventListener('click', async () => {\n // Only dispatch event if this is a success state close\n if (state === 'success') {\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'close',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'success',\n action: 'close',\n },\n });\n }\n\n // Always just hide the modal, don't navigate anywhere\n hideProcessingModal();\n });\n\n // Add event listener for repeat verification button (error state)\n const repeatBtn = processingContainer.querySelector('#repeat-btn') as HTMLButtonElement | null;\n\n repeatBtn?.addEventListener('click', async () => {\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'repeat-verification',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'error',\n action: 'repeat',\n },\n });\n\n // Hide error modal and show landing modal to restart\n hideProcessingModal();\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n });\n\n return processingContainer.firstElementChild as HTMLElement;\n};\n\nexport const showProcessingModal: ShowModalFunction = async () => {\n // Check for active sessions before showing processing modal\n // Continue with normal processing modal flow\n\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer) {\n console.error('Container not found for processing modal');\n return;\n }\n\n // Find existing modal to crossfade\n const existingModal = targetContainer.querySelector('.desktop--modal-overlay') as HTMLElement | null;\n\n // Create and store modal element reference\n processingModalElement = createProcessingModal('loading');\n processingModalElement.id = 'processing-modal';\n\n // Get the modal container for transforms\n const modalContainer = processingModalElement.querySelector('.desktop--modal-container') as HTMLElement;\n\n // For smooth transitions, prepare new modal completely before showing\n processingModalElement.style.opacity = '0';\n modalContainer.style.transform = 'translateY(-20px) scale(0.95)';\n modalContainer.style.transition = 'transform 0.3s ease-out';\n targetContainer.appendChild(processingModalElement);\n\n // Force a reflow to ensure the styles are applied\n processingModalElement.offsetHeight;\n\n // Now start the transition\n processingModalElement.style.transition = 'opacity 0.3s ease-out';\n\n // Use a small delay to ensure DOM is fully ready\n setTimeout(() => {\n // Start simultaneous crossfade\n if (existingModal) {\n const existingContainer = existingModal.querySelector('.desktop--modal-container') as HTMLElement;\n existingModal.style.transition = 'opacity 0.3s ease-in';\n if (existingContainer) {\n existingContainer.style.transition = 'transform 0.3s ease-in';\n existingContainer.style.transform = 'translateY(-20px) scale(0.95)';\n }\n existingModal.style.opacity = '0';\n existingModal.style.pointerEvents = 'none';\n existingModal.style.zIndex = '9998';\n }\n\n // Show new modal\n processingModalElement!.style.opacity = '1';\n modalContainer.style.transform = 'translateY(0) scale(1)';\n\n // Remove old modal after transition completes\n if (existingModal) {\n setTimeout(() => {\n if (existingModal.parentNode) {\n existingModal.parentNode.removeChild(existingModal);\n }\n }, 350);\n }\n }, 10);\n\n // Dispatch initial event\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'processing',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'loading',\n message: 'Verification in progress',\n },\n });\n\n // Listen for verification-completed event to show success state\n const handleVerificationCompleted = (event: Event) => {\n const customEvent = event as CustomEvent;\n if (customEvent.detail?.type === 'verification-completed') {\n // Show success state in processing modal\n showSuccessState();\n }\n };\n\n // Add event listener with the named function for proper cleanup\n window.addEventListener('concordium-event', handleVerificationCompleted);\n\n // Store cleanup function with the correct reference\n eventListenerCleanup = () => {\n window.removeEventListener('concordium-event', handleVerificationCompleted);\n };\n};\n\nexport const hideProcessingModal: HideModalFunction = () => {\n if (processingModalElement) {\n // Add fade-out animation\n processingModalElement.classList.add('modal-exiting');\n\n // Remove from DOM after animation completes\n setTimeout(() => {\n const container = processingModalElement?.parentNode;\n if (container && processingModalElement) {\n container.removeChild(processingModalElement);\n }\n processingModalElement = null;\n\n // Ensure any leftover scan modals are also removed\n const leftoverScanModal = document.querySelector('#scan-modal');\n if (leftoverScanModal) {\n leftoverScanModal.remove();\n }\n }, 300);\n }\n\n // Clean up event listeners following your cleanup pattern\n if (eventListenerCleanup) {\n eventListenerCleanup();\n eventListenerCleanup = null;\n }\n};\n\n// Function to transition to success state following your commented pattern\nexport async function showSuccessState(): Promise<void> {\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer || !processingModalElement) {\n console.error('Container or modal element not found');\n return;\n }\n\n // Get current modal for crossfade\n const currentModal = processingModalElement;\n\n // Create and show success modal with crossfade\n const newModal = createProcessingModal('success');\n newModal.id = 'processing-modal';\n\n // Add new modal with entering class (starts hidden)\n newModal.classList.add('modal-entering');\n targetContainer.appendChild(newModal);\n\n // Use requestAnimationFrame to ensure DOM is ready\n requestAnimationFrame(() => {\n // Start crossfade: fade out old, fade in new simultaneously\n if (currentModal) {\n currentModal.classList.add('modal-exiting');\n }\n\n // Trigger animation by removing entering class and adding visible\n requestAnimationFrame(() => {\n newModal.classList.remove('modal-entering');\n newModal.classList.add('modal-visible');\n });\n });\n\n // Update reference\n processingModalElement = newModal;\n\n // Remove old modal after transition completes\n if (currentModal) {\n setTimeout(() => {\n if (currentModal.parentNode) {\n currentModal.parentNode.removeChild(currentModal);\n }\n }, 300);\n }\n\n // Dispatch success event\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'success',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'success',\n message: 'Verification completed successfully',\n },\n });\n}\n\n/**\n * Shows the error state in the processing modal.\n * This function can be called by merchants to display an error state\n * when verification fails or encounters an issue.\n */\nexport async function showErrorState(): Promise<void> {\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer) {\n console.error('Container not found for error modal');\n return;\n }\n\n // Get current modal for crossfade (if exists)\n const currentModal = processingModalElement;\n\n // Create and show error modal with crossfade\n const newModal = createProcessingModal('error');\n newModal.id = 'processing-modal';\n\n // Add new modal with entering class (starts hidden)\n newModal.classList.add('modal-entering');\n targetContainer.appendChild(newModal);\n\n // Use requestAnimationFrame to ensure DOM is ready\n requestAnimationFrame(() => {\n // Start crossfade: fade out old, fade in new simultaneously\n if (currentModal) {\n currentModal.classList.add('modal-exiting');\n }\n\n // Trigger animation by removing entering class and adding visible\n requestAnimationFrame(() => {\n newModal.classList.remove('modal-entering');\n newModal.classList.add('modal-visible');\n });\n });\n\n // Update reference\n processingModalElement = newModal;\n\n // Remove old modal after transition completes\n if (currentModal) {\n setTimeout(() => {\n if (currentModal.parentNode) {\n currentModal.parentNode.removeChild(currentModal);\n }\n }, 300);\n }\n\n // Dispatch error event\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'error',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'error',\n message: 'Verification failed',\n },\n });\n}\n"],"names":[],"mappings":";;;;AASA,IAAI,yBAA6C;AACjD,IAAI,uBAA4C;AAEzC,MAAM,wBAAwB,CAAC,QAAyB,cAA2B;AACtF,QAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAMI,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAQ1B,UAAU,YACJ;AAAA,0CACY,YAAY;AAAA,qCAExB,UAAU,YACR,aAAa,mBAAmB,wGAChC,aAAa,kBAAkB,mGAC3C;AAAA;AAAA;AAAA;AAAA;AAAA,0BAMQ,UAAU,YACJ,6BACA,UAAU,YACR,aACA,sBACZ;AAAA;AAAA;AAAA,0BAII,UAAU,YACJ,qCACA,UAAU,YACR,2BACA,wEACZ;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMA,UAAU,YACJ;AAAA;AAAA,wCAGA,UAAU,YACR;AAAA;AAAA,wCAGA;AAAA;AAAA,qCAGZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAQhB,QAAM,sBAAsB,SAAS,cAAc,KAAK;AAC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,UAAU,IAAI,gBAAgB;AACvC,kBAAgB,YAAY,QAAQ;AAGpC,wBAAsB,MAAM;AAExB,QAAI,cAAc;AACd,mBAAa,UAAU,IAAI,eAAe;AAAA,IAC9C;AAGA,0BAAsB,MAAM;AACxB,eAAS,UAAU,OAAO,gBAAgB;AAC1C,eAAS,UAAU,IAAI,eAAe;AAAA,IAC1C,CAAC;AAAA,EACL,CAAC;AAGD,2BAAyB;AAGzB,MAAI,cAAc;AACd,eAAW,MAAM;AACb,UAAI,aAAa,YAAY;AACzB,qBAAa,WAAW,YAAY,YAAY;AAAA,MACpD;AAAA,IACJ,GAAG,GAAG;AAAA,EACV;AAGA,QAAM,EAAE,wBAAA,IAA4B,MAAM,OAAO,gBAAa;AAC9D,0BAAwB;AAAA,IACpB,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,MAAM;AAAA,MACF,OAAO;AAAA,MACP,SAAS;AAAA,IAAA;AAAA,EACb,CACH;AACL;"}
1
+ {"version":3,"file":"processing.js","sources":["../../../src/components/desktop/processing.ts"],"sourcesContent":["import concordiumModalLogo from '@/assets/concordium-modal-logo.svg';\nimport loadingVideo from '@/assets/loading.mp4';\nimport modalGraphicDelete from '@/assets/modal-graphic-delete.svg';\nimport modalGraphicSuccess from '@/assets/modal-graphic-success.svg';\nimport { ModalConstants } from '@/constants/modal.constants';\nimport type { HideModalFunction, ShowModalFunction } from '@/types';\n\ntype ProcessingState = 'loading' | 'success' | 'error';\n\n// Global variables for modal state management following your pattern\nlet processingModalElement: HTMLElement | null = null;\nlet eventListenerCleanup: (() => void) | null = null;\n\n/**\n * Get the connected wallet name from localStorage, with fallback\n */\nfunction getConnectedWalletName(): string {\n return localStorage.getItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONNECTED_WALLET_NAME) || 'Wallet';\n}\n\nexport const createProcessingModal = (state: ProcessingState = 'loading'): HTMLElement => {\n const walletName = getConnectedWalletName();\n\n const processingHTML = `\n <div class=\"desktop--modal-overlay\">\n <div class=\"desktop--modal-container\">\n <div class=\"desktop--modal-body\">\n <div class=\"flex items-center justify-end p-2\">\n <img\n src=\"${concordiumModalLogo}\"\n alt=\"concordium-modal-logo\"\n class=\"object-cover\"\n />\n </div>\n\n <div class=\"flex items-center justify-center\">\n ${\n state === 'loading'\n ? `<video autoplay loop muted playsinline class=\"max-w-full h-auto\" style=\"max-height: 80px; object-fit: contain;\">\n <source src=\"${loadingVideo}\" type=\"video/mp4\" />\n </video>`\n : state === 'success'\n ? `<img src=\"${modalGraphicSuccess}\" alt=\"success-graphic\" class=\"max-w-full h-auto\" style=\"max-height: 80px; object-fit: contain;\" />`\n : `<img src=\"${modalGraphicDelete}\" alt=\"error-graphic\" class=\"max-w-full h-auto\" style=\"max-height: 80px; object-fit: contain;\" />`\n }\n </div>\n\n <div class=\"flex flex-col items-center gap-2\">\n <p class=\"font-medium text-[20px] leading-[25px] tracking-[0.2px] font-jakarta\" style=\"color: #0D0F11;\">\n ${\n state === 'loading'\n ? 'Verification in Progress'\n : state === 'success'\n ? 'Success!'\n : 'Verification Failed!'\n }\n </p>\n <p class=\"desktop--processing-text\">\n ${\n state === 'loading'\n ? `Approve in your ${walletName}`\n : state === 'success'\n ? 'Verification completed'\n : 'Something went wrong with your verification. Please repeat the process'\n }\n </p>\n </div>\n\n <div class=\"flex items-center justify-center gap-3 mt-3\">\n ${\n state === 'loading'\n ? `<button disabled class=\"desktop--disabled-button\" id=\"approve-btn\">\n <span>Please wait</span>\n </button>`\n : state === 'success'\n ? `<button class=\"desktop--primary-button\" id=\"close-btn\">\n <span>Continue to site</span>\n </button>`\n : `<button class=\"desktop--primary-button\" id=\"repeat-btn\" style=\"background-color: #0D0F11;\">\n <span>Try again</span>\n </button>`\n }\n </div>\n </div>\n </div>\n </div>\n`;\n\n // Create a container div\n const processingContainer = document.createElement('div');\n processingContainer.innerHTML = processingHTML;\n\n // Add event listeners\n const closeBtn = processingContainer.querySelector('#close-btn') as HTMLButtonElement | null;\n\n closeBtn?.addEventListener('click', async () => {\n // Only dispatch event if this is a success state close\n if (state === 'success') {\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'close',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'success',\n action: 'close',\n },\n });\n }\n\n // Always just hide the modal, don't navigate anywhere\n hideProcessingModal();\n });\n\n // Add event listener for repeat verification button (error state)\n const repeatBtn = processingContainer.querySelector('#repeat-btn') as HTMLButtonElement | null;\n\n repeatBtn?.addEventListener('click', async () => {\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'repeat-verification',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'error',\n action: 'repeat',\n },\n });\n\n // Hide error modal and show landing modal to restart\n hideProcessingModal();\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n });\n\n return processingContainer.firstElementChild as HTMLElement;\n};\n\nexport const showProcessingModal: ShowModalFunction = async () => {\n // Check for active sessions before showing processing modal\n // Continue with normal processing modal flow\n\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer) {\n console.error('Container not found for processing modal');\n return;\n }\n\n // Find existing modal to crossfade\n const existingModal = targetContainer.querySelector('.desktop--modal-overlay') as HTMLElement | null;\n\n // Create and store modal element reference\n processingModalElement = createProcessingModal('loading');\n processingModalElement.id = 'processing-modal';\n\n // Get the modal container for transforms\n const modalContainer = processingModalElement.querySelector('.desktop--modal-container') as HTMLElement;\n\n // For smooth transitions, prepare new modal completely before showing\n processingModalElement.style.opacity = '0';\n modalContainer.style.transform = 'translateY(-20px) scale(0.95)';\n modalContainer.style.transition = 'transform 0.3s ease-out';\n targetContainer.appendChild(processingModalElement);\n\n // Force a reflow to ensure the styles are applied\n processingModalElement.offsetHeight;\n\n // Now start the transition\n processingModalElement.style.transition = 'opacity 0.3s ease-out';\n\n // Use a small delay to ensure DOM is fully ready\n setTimeout(() => {\n // Start simultaneous crossfade\n if (existingModal) {\n const existingContainer = existingModal.querySelector('.desktop--modal-container') as HTMLElement;\n existingModal.style.transition = 'opacity 0.3s ease-in';\n if (existingContainer) {\n existingContainer.style.transition = 'transform 0.3s ease-in';\n existingContainer.style.transform = 'translateY(-20px) scale(0.95)';\n }\n existingModal.style.opacity = '0';\n existingModal.style.pointerEvents = 'none';\n existingModal.style.zIndex = '9998';\n }\n\n // Show new modal\n processingModalElement!.style.opacity = '1';\n modalContainer.style.transform = 'translateY(0) scale(1)';\n\n // Remove old modal after transition completes\n if (existingModal) {\n setTimeout(() => {\n if (existingModal.parentNode) {\n existingModal.parentNode.removeChild(existingModal);\n }\n }, 350);\n }\n }, 10);\n\n // Dispatch initial event\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'processing',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'loading',\n message: 'Verification in progress',\n },\n });\n\n // Listen for verification-completed event to show success state\n const handleVerificationCompleted = (event: Event) => {\n const customEvent = event as CustomEvent;\n if (customEvent.detail?.type === 'verification-completed') {\n // Show success state in processing modal\n showSuccessState();\n }\n };\n\n // Add event listener with the named function for proper cleanup\n window.addEventListener('concordium-event', handleVerificationCompleted);\n\n // Store cleanup function with the correct reference\n eventListenerCleanup = () => {\n window.removeEventListener('concordium-event', handleVerificationCompleted);\n };\n};\n\nexport const hideProcessingModal: HideModalFunction = () => {\n if (processingModalElement) {\n // Add fade-out animation\n processingModalElement.classList.add('modal-exiting');\n\n // Remove from DOM after animation completes\n setTimeout(() => {\n const container = processingModalElement?.parentNode;\n if (container && processingModalElement) {\n container.removeChild(processingModalElement);\n }\n processingModalElement = null;\n\n // Ensure any leftover scan modals are also removed\n const leftoverScanModal = document.querySelector('#scan-modal');\n if (leftoverScanModal) {\n leftoverScanModal.remove();\n }\n }, 300);\n }\n\n // Clean up event listeners following your cleanup pattern\n if (eventListenerCleanup) {\n eventListenerCleanup();\n eventListenerCleanup = null;\n }\n};\n\n// Function to transition to success state following your commented pattern\nexport async function showSuccessState(): Promise<void> {\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer || !processingModalElement) {\n console.error('Container or modal element not found');\n return;\n }\n\n // Get current modal for crossfade\n const currentModal = processingModalElement;\n\n // Create and show success modal with crossfade\n const newModal = createProcessingModal('success');\n newModal.id = 'processing-modal';\n\n // Add new modal with entering class (starts hidden)\n newModal.classList.add('modal-entering');\n targetContainer.appendChild(newModal);\n\n // Use requestAnimationFrame to ensure DOM is ready\n requestAnimationFrame(() => {\n // Start crossfade: fade out old, fade in new simultaneously\n if (currentModal) {\n currentModal.classList.add('modal-exiting');\n }\n\n // Trigger animation by removing entering class and adding visible\n requestAnimationFrame(() => {\n newModal.classList.remove('modal-entering');\n newModal.classList.add('modal-visible');\n });\n });\n\n // Update reference\n processingModalElement = newModal;\n\n // Remove old modal after transition completes\n if (currentModal) {\n setTimeout(() => {\n if (currentModal.parentNode) {\n currentModal.parentNode.removeChild(currentModal);\n }\n }, 300);\n }\n\n // Dispatch success event\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'success',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'success',\n message: 'Verification completed successfully',\n },\n });\n}\n\n/**\n * Shows the error state in the processing modal.\n * This function can be called by merchants to display an error state\n * when verification fails or encounters an issue.\n */\nexport async function showErrorState(): Promise<void> {\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer) {\n console.error('Container not found for error modal');\n return;\n }\n\n // Get current modal for crossfade (if exists)\n const currentModal = processingModalElement;\n\n // Create and show error modal with crossfade\n const newModal = createProcessingModal('error');\n newModal.id = 'processing-modal';\n\n // Add new modal with entering class (starts hidden)\n newModal.classList.add('modal-entering');\n targetContainer.appendChild(newModal);\n\n // Use requestAnimationFrame to ensure DOM is ready\n requestAnimationFrame(() => {\n // Start crossfade: fade out old, fade in new simultaneously\n if (currentModal) {\n currentModal.classList.add('modal-exiting');\n }\n\n // Trigger animation by removing entering class and adding visible\n requestAnimationFrame(() => {\n newModal.classList.remove('modal-entering');\n newModal.classList.add('modal-visible');\n });\n });\n\n // Update reference\n processingModalElement = newModal;\n\n // Remove old modal after transition completes\n if (currentModal) {\n setTimeout(() => {\n if (currentModal.parentNode) {\n currentModal.parentNode.removeChild(currentModal);\n }\n }, 300);\n }\n\n // Dispatch error event\n const { dispatchConcordiumEvent } = await import('../../index');\n dispatchConcordiumEvent({\n type: 'error',\n source: 'desktop',\n modalType: 'processing',\n data: {\n state: 'error',\n message: 'Verification failed',\n },\n });\n}\n"],"names":[],"mappings":";;;;;AAUA,IAAI,yBAA6C;AACjD,IAAI,uBAA4C;AAKhD,SAAS,yBAAiC;AACtC,SAAO,aAAa,QAAQ,eAAe,oBAAoB,qBAAqB,KAAK;AAC7F;AAEO,MAAM,wBAAwB,CAAC,QAAyB,cAA2B;AACtF,QAAM,aAAa,uBAAA;AAEnB,QAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAMI,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAQ1B,UAAU,YACJ;AAAA,0CACY,YAAY;AAAA,qCAExB,UAAU,YACR,aAAa,mBAAmB,wGAChC,aAAa,kBAAkB,mGAC3C;AAAA;AAAA;AAAA;AAAA;AAAA,0BAMQ,UAAU,YACJ,6BACA,UAAU,YACR,aACA,sBACZ;AAAA;AAAA;AAAA,0BAII,UAAU,YACJ,mBAAmB,UAAU,KAC7B,UAAU,YACR,2BACA,wEACZ;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMA,UAAU,YACJ;AAAA;AAAA,wCAGA,UAAU,YACR;AAAA;AAAA,wCAGA;AAAA;AAAA,qCAGZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAQhB,QAAM,sBAAsB,SAAS,cAAc,KAAK;AACxD,sBAAoB,YAAY;AAGhC,QAAM,WAAW,oBAAoB,cAAc,YAAY;AAE/D,YAAU,iBAAiB,SAA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cAAc;AACd,mBAAa,UAAU,IAAI,eAAe;AAAA,IAC9C;AAGA,0BAAsB,MAAM;AACxB,eAAS,UAAU,OAAO,gBAAgB;AAC1C,eAAS,UAAU,IAAI,eAAe;AAAA,IAC1C,CAAC;AAAA,EACL,CAAC;AAGD,2BAAyB;AAGzB,MAAI,cAAc;AACd,eAAW,MAAM;AACb,UAAI,aAAa,YAAY;AACzB,qBAAa,WAAW,YAAY,YAAY;AAAA,MACpD;AAAA,IACJ,GAAG,GAAG;AAAA,EACV;AAGA,QAAM,EAAE,wBAAA,IAA4B,MAAM,OAAO,gBAAa;AAC9D,0BAAwB;AAAA,IACpB,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,MAAM;AAAA,MACF,OAAO;AAAA,MACP,SAAS;AAAA,IAAA;AAAA,EACb,CACH;AACL;"}
@@ -48,8 +48,7 @@ const createReturningUserModal = () => {
48
48
  const { ServiceFactory } = await import("../../services/index.js");
49
49
  const walletConnectService = ServiceFactory.createWalletConnectService();
50
50
  await walletConnectService.initialize();
51
- const activeSessions = walletConnectService.getActiveSessions();
52
- const activeSessionData = activeSessions[0];
51
+ const activeSessionData = walletConnectService.getMostRecentSession();
53
52
  if (!activeSessionData) {
54
53
  console.error("No active session found");
55
54
  hideReturningUserModal();
@@ -86,6 +85,8 @@ const createReturningUserModal = () => {
86
85
  source: "desktop",
87
86
  modalType: "returning-user"
88
87
  });
88
+ const { autoSendPresentationRequestIfConfigured } = await import("./scan.js");
89
+ await autoSendPresentationRequestIfConfigured(topic);
89
90
  } catch (error) {
90
91
  console.error("Failed to continue with existing session:", error);
91
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"returning-user.js","sources":["../../../src/components/desktop/returning-user.ts"],"sourcesContent":["import arrowRight from '@/assets/arrow-right.svg';\nimport concordiumModalLogo from '@/assets/concordium-modal-logo.svg';\nimport modalGraphicSuccess from '@/assets/modal-graphic-success.svg';\nimport { ModalConstants } from '@/constants/modal.constants';\nimport type { HideModalFunction, ModalFunction, ShowModalFunction } from '@/types';\n\nimport { dispatchConcordiumEvent } from '../../index';\n\nexport const createReturningUserModal: ModalFunction = () => {\n const modalHTML = `\n <div class=\"desktop--modal-overlay\">\n <div class=\"desktop--modal-container\">\n <div class=\"desktop--modal-body\">\n <div class=\"flex items-center justify-end p-2\">\n <img\n src=\"${concordiumModalLogo}\"\n alt=\"concordium-modal-logo\"\n class=\"object-cover\"\n />\n </div>\n\n <div class=\"flex items-center justify-center\">\n <img src=\"${modalGraphicSuccess}\" alt=\"success-graphic\" class=\"object-cover\" />\n </div>\n\n <div class=\"flex flex-col items-center gap-2\">\n <p class=\"font-medium text-[20px] leading-[25px] tracking-[0.2px] font-jakarta\" style=\"color: #0D0F11;\">Your ID is still connected</p>\n </div>\n\n <div class=\"flex flex-col items-center gap-4\">\n <button class=\"desktop--primary-button\" id=\"continue-btn\" style=\"margin-bottom: 10px;\">\n <span>Start private verification</span>\n <img src=\"${arrowRight}\" alt=\"arrow-right-icon\" class=\"object-cover\" />\n </button>\n\n <button class=\"desktop--outline-button\" id=\"disconnect-btn\">Disconnect</button>\n </div>\n </div>\n </div>\n </div>\n `;\n\n const modalContainer = document.createElement('div');\n modalContainer.innerHTML = modalHTML;\n\n const continueBtn = modalContainer.querySelector('#continue-btn') as HTMLButtonElement | null;\n const disconnectBtn = modalContainer.querySelector('#disconnect-btn') as HTMLButtonElement | null;\n\n continueBtn?.addEventListener('click', async () => {\n // Get active session from WalletConnect service\n const { ServiceFactory } = await import('@/services');\n const walletConnectService = ServiceFactory.createWalletConnectService();\n await walletConnectService.initialize();\n const activeSessions = walletConnectService.getActiveSessions();\n const activeSessionData = activeSessions[0]; // Get first active session\n\n // Check if session exists\n if (!activeSessionData) {\n console.error('No active session found');\n\n // Redirect to landing modal since session is missing\n hideReturningUserModal();\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n return;\n }\n\n // Extract session details\n const { topic, namespaces } = activeSessionData;\n const accounts = namespaces?.ccd?.accounts || [];\n\n // Emit active_session event to merchant with session data\n window.dispatchEvent(\n new CustomEvent('verification-web-ui-event', {\n detail: {\n type: 'active_session',\n data: {\n message: 'Active WalletConnect session detected',\n timestamp: Date.now(),\n topic,\n accounts,\n namespaces,\n session: activeSessionData,\n },\n },\n bubbles: true,\n composed: true,\n })\n );\n\n // Use existing session to continue verification\n try {\n localStorage.setItem(ModalConstants.LOCAL_STORAGE_FLAGS.ACTIVE_SESSION, JSON.stringify(true));\n hideReturningUserModal();\n const { showProcessingModal } = await import('./processing');\n await showProcessingModal();\n\n dispatchConcordiumEvent({\n type: 'active-session-continue',\n source: 'desktop',\n modalType: 'returning-user',\n });\n } catch (error) {\n console.error('Failed to continue with existing session:', error);\n }\n });\n\n disconnectBtn?.addEventListener('click', async () => {\n // Disconnect all active sessions\n try {\n const { ServiceFactory } = await import('@/services');\n const walletConnectService = ServiceFactory.createWalletConnectService();\n await walletConnectService.disconnectAll();\n\n // Clear localStorage flags to reset state\n const { updateWalletFlags } = await import('@/utils/sessionDetection');\n updateWalletFlags();\n\n // Clear any stored session data\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.ONLY_ONE_OPTION);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.APP_NOT_INSTALLED);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONCORDIUM_ID_NOT_INSTALLED);\n\n // Navigate to landing modal\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n hideReturningUserModal();\n } catch (error) {\n console.error('Failed to disconnect sessions:', error);\n\n // Even if disconnect fails, clear flags and redirect\n try {\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.ONLY_ONE_OPTION);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.APP_NOT_INSTALLED);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONCORDIUM_ID_NOT_INSTALLED);\n } catch (storageError) {\n console.error('Failed to clear localStorage flags:', storageError);\n }\n\n // Still navigate to landing modal\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n hideReturningUserModal();\n }\n });\n\n return modalContainer.firstElementChild as HTMLElement;\n};\n\nexport const showReturningUserModal: ShowModalFunction = async () => {\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer) {\n console.error('Container not found for modal');\n return;\n }\n\n // Find existing modal to crossfade\n const existingModal = targetContainer.querySelector('.desktop--modal-overlay') as HTMLElement | null;\n\n const modal = createReturningUserModal();\n modal.id = 'returning-user-modal';\n\n // Get the modal container for transforms\n const modalContainer = modal.querySelector('.desktop--modal-container') as HTMLElement;\n\n // For smooth transitions, prepare new modal completely before showing\n modal.style.opacity = '0';\n modalContainer.style.transform = 'translateY(-20px) scale(0.95)';\n modalContainer.style.transition = 'transform 0.3s ease-out';\n targetContainer.appendChild(modal);\n\n // Force a reflow to ensure the styles are applied\n modal.offsetHeight;\n\n // Now start the transition\n modal.style.transition = 'opacity 0.3s ease-out';\n\n // Use a small delay to ensure DOM is fully ready\n setTimeout(() => {\n // Start simultaneous crossfade\n if (existingModal) {\n const existingContainer = existingModal.querySelector('.desktop--modal-container') as HTMLElement;\n existingModal.style.transition = 'opacity 0.3s ease-in';\n if (existingContainer) {\n existingContainer.style.transition = 'transform 0.3s ease-in';\n existingContainer.style.transform = 'translateY(-20px) scale(0.95)';\n }\n existingModal.style.opacity = '0';\n existingModal.style.pointerEvents = 'none';\n existingModal.style.zIndex = '9998';\n }\n\n // Show new modal\n modal.style.opacity = '1';\n modalContainer.style.transform = 'translateY(0) scale(1)';\n\n // Remove old modal after transition completes\n if (existingModal) {\n setTimeout(() => {\n if (existingModal.parentNode) {\n existingModal.parentNode.removeChild(existingModal);\n }\n }, 350);\n }\n }, 10);\n};\n\nexport const hideReturningUserModal: HideModalFunction = () => {\n const modal = document.querySelector('#returning-user-modal') as HTMLElement | null;\n if (modal) {\n // Add fade-out animation\n modal.classList.add('modal-exiting');\n\n // Remove after animation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AAa;AACzD,QAAM,kBAAkB,mBAAA;AAExB,MAAI,CAAC,iBAAiB;AAClB,YAAQ,MAAM,+BAA+B;AAC7C;AAAA,EACJ;AAGA,QAAM,gBAAgB,gBAAgB,cAAc,yBAAyB;AAE7E,QAAM,QAAQ,yBAAA;AACd,QAAM,KAAK;AAGX,QAAM,iBAAiB,MAAM,cAAc,2BAA2B;AAGtE,QAAM,MAAM,UAAU;AACtB,iBAAe,MAAM,YAAY;AACjC,iBAAe,MAAM,aAAa;AAClC,kBAAgB,YAAY,KAAK;AAGjC,QAAM;AAGN,QAAM,MAAM,aAAa;AAGzB,aAAW,MAAM;AAEb,QAAI,eAAe;AACf,YAAM,oBAAoB,cAAc,cAAc,2BAA2B;AACjF,oBAAc,MAAM,aAAa;AACjC,UAAI,mBAAmB;AACnB,0BAAkB,MAAM,aAAa;AACrC,0BAAkB,MAAM,YAAY;AAAA,MACxC;AACA,oBAAc,MAAM,UAAU;AAC9B,oBAAc,MAAM,gBAAgB;AACpC,oBAAc,MAAM,SAAS;AAAA,IACjC;AAGA,UAAM,MAAM,UAAU;AACtB,mBAAe,MAAM,YAAY;AAGjC,QAAI,eAAe;AACf,iBAAW,MAAM;AACb,YAAI,cAAc,YAAY;AAC1B,wBAAc,WAAW,YAAY,aAAa;AAAA,QACtD;AAAA,MACJ,GAAG,GAAG;AAAA,IACV;AAAA,EACJ,GAAG,EAAE;AACT;AAEO,MAAM,yBAA4C,MAAM;AAC3D,QAAM,QAAQ,SAAS,cAAc,uBAAuB;AAC5D,MAAI,OAAO;AAEP,UAAM,UAAU,IAAI,eAAe;AAGnC,eAAW,MAAM;AACb,YAAM,OAAA;AAAA,IACV,GAAG,GAAG;AAAA,EACV;AACJ;"}
1
+ {"version":3,"file":"returning-user.js","sources":["../../../src/components/desktop/returning-user.ts"],"sourcesContent":["import arrowRight from '@/assets/arrow-right.svg';\nimport concordiumModalLogo from '@/assets/concordium-modal-logo.svg';\nimport modalGraphicSuccess from '@/assets/modal-graphic-success.svg';\nimport { ModalConstants } from '@/constants/modal.constants';\nimport type { HideModalFunction, ModalFunction, ShowModalFunction } from '@/types';\n\nimport { dispatchConcordiumEvent } from '../../index';\n\nexport const createReturningUserModal: ModalFunction = () => {\n const modalHTML = `\n <div class=\"desktop--modal-overlay\">\n <div class=\"desktop--modal-container\">\n <div class=\"desktop--modal-body\">\n <div class=\"flex items-center justify-end p-2\">\n <img\n src=\"${concordiumModalLogo}\"\n alt=\"concordium-modal-logo\"\n class=\"object-cover\"\n />\n </div>\n\n <div class=\"flex items-center justify-center\">\n <img src=\"${modalGraphicSuccess}\" alt=\"success-graphic\" class=\"object-cover\" />\n </div>\n\n <div class=\"flex flex-col items-center gap-2\">\n <p class=\"font-medium text-[20px] leading-[25px] tracking-[0.2px] font-jakarta\" style=\"color: #0D0F11;\">Your ID is still connected</p>\n </div>\n\n <div class=\"flex flex-col items-center gap-4\">\n <button class=\"desktop--primary-button\" id=\"continue-btn\" style=\"margin-bottom: 10px;\">\n <span>Start private verification</span>\n <img src=\"${arrowRight}\" alt=\"arrow-right-icon\" class=\"object-cover\" />\n </button>\n\n <button class=\"desktop--outline-button\" id=\"disconnect-btn\">Disconnect</button>\n </div>\n </div>\n </div>\n </div>\n `;\n\n const modalContainer = document.createElement('div');\n modalContainer.innerHTML = modalHTML;\n\n const continueBtn = modalContainer.querySelector('#continue-btn') as HTMLButtonElement | null;\n const disconnectBtn = modalContainer.querySelector('#disconnect-btn') as HTMLButtonElement | null;\n\n continueBtn?.addEventListener('click', async () => {\n // Get active session from WalletConnect service\n const { ServiceFactory } = await import('@/services');\n const walletConnectService = ServiceFactory.createWalletConnectService();\n await walletConnectService.initialize();\n // Get the most recent session (sorted by expiry - most recent first)\n const activeSessionData = walletConnectService.getMostRecentSession();\n\n // Check if session exists\n if (!activeSessionData) {\n console.error('No active session found');\n\n // Redirect to landing modal since session is missing\n hideReturningUserModal();\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n return;\n }\n\n // Extract session details\n const { topic, namespaces } = activeSessionData;\n const accounts = namespaces?.ccd?.accounts || [];\n\n // Emit active_session event to merchant with session data\n window.dispatchEvent(\n new CustomEvent('verification-web-ui-event', {\n detail: {\n type: 'active_session',\n data: {\n message: 'Active WalletConnect session detected',\n timestamp: Date.now(),\n topic,\n accounts,\n namespaces,\n session: activeSessionData,\n },\n },\n bubbles: true,\n composed: true,\n })\n );\n\n // Use existing session to continue verification\n try {\n localStorage.setItem(ModalConstants.LOCAL_STORAGE_FLAGS.ACTIVE_SESSION, JSON.stringify(true));\n hideReturningUserModal();\n const { showProcessingModal } = await import('./processing');\n await showProcessingModal();\n\n dispatchConcordiumEvent({\n type: 'active-session-continue',\n source: 'desktop',\n modalType: 'returning-user',\n });\n\n // Auto-send presentation request if configured\n const { autoSendPresentationRequestIfConfigured } = await import('./scan');\n await autoSendPresentationRequestIfConfigured(topic);\n } catch (error) {\n console.error('Failed to continue with existing session:', error);\n }\n });\n\n disconnectBtn?.addEventListener('click', async () => {\n // Disconnect all active sessions\n try {\n const { ServiceFactory } = await import('@/services');\n const walletConnectService = ServiceFactory.createWalletConnectService();\n await walletConnectService.disconnectAll();\n\n // Clear localStorage flags to reset state\n const { updateWalletFlags } = await import('@/utils/sessionDetection');\n updateWalletFlags();\n\n // Clear any stored session data\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.ONLY_ONE_OPTION);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.APP_NOT_INSTALLED);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONCORDIUM_ID_NOT_INSTALLED);\n\n // Navigate to landing modal\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n hideReturningUserModal();\n } catch (error) {\n console.error('Failed to disconnect sessions:', error);\n\n // Even if disconnect fails, clear flags and redirect\n try {\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.ONLY_ONE_OPTION);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.APP_NOT_INSTALLED);\n localStorage.removeItem(ModalConstants.LOCAL_STORAGE_FLAGS.CONCORDIUM_ID_NOT_INSTALLED);\n } catch (storageError) {\n console.error('Failed to clear localStorage flags:', storageError);\n }\n\n // Still navigate to landing modal\n const { showLandingModal } = await import('./landing');\n await showLandingModal();\n hideReturningUserModal();\n }\n });\n\n return modalContainer.firstElementChild as HTMLElement;\n};\n\nexport const showReturningUserModal: ShowModalFunction = async () => {\n const { getGlobalContainer } = await import('../../index');\n const targetContainer = getGlobalContainer();\n\n if (!targetContainer) {\n console.error('Container not found for modal');\n return;\n }\n\n // Find existing modal to crossfade\n const existingModal = targetContainer.querySelector('.desktop--modal-overlay') as HTMLElement | null;\n\n const modal = createReturningUserModal();\n modal.id = 'returning-user-modal';\n\n // Get the modal container for transforms\n const modalContainer = modal.querySelector('.desktop--modal-container') as HTMLElement;\n\n // For smooth transitions, prepare new modal completely before showing\n modal.style.opacity = '0';\n modalContainer.style.transform = 'translateY(-20px) scale(0.95)';\n modalContainer.style.transition = 'transform 0.3s ease-out';\n targetContainer.appendChild(modal);\n\n // Force a reflow to ensure the styles are applied\n modal.offsetHeight;\n\n // Now start the transition\n modal.style.transition = 'opacity 0.3s ease-out';\n\n // Use a small delay to ensure DOM is fully ready\n setTimeout(() => {\n // Start simultaneous crossfade\n if (existingModal) {\n const existingContainer = existingModal.querySelector('.desktop--modal-container') as HTMLElement;\n existingModal.style.transition = 'opacity 0.3s ease-in';\n if (existingContainer) {\n existingContainer.style.transition = 'transform 0.3s ease-in';\n existingContainer.style.transform = 'translateY(-20px) scale(0.95)';\n }\n existingModal.style.opacity = '0';\n existingModal.style.pointerEvents = 'none';\n existingModal.style.zIndex = '9998';\n }\n\n // Show new modal\n modal.style.opacity = '1';\n modalContainer.style.transform = 'translateY(0) scale(1)';\n\n // Remove old modal after transition completes\n if (existingModal) {\n setTimeout(() => {\n if (existingModal.parentNode) {\n existingModal.parentNode.removeChild(existingModal);\n }\n }, 350);\n }\n }, 10);\n};\n\nexport const hideReturningUserModal: HideModalFunction = () => {\n const modal = document.querySelector('#returning-user-modal') as HTMLElement | null;\n if (modal) {\n // Add fade-out animation\n modal.classList.add('modal-exiting');\n\n // Remove after animation completes\n setTimeout(() => {\n modal.remove();\n }, 300);\n }\n};\n"],"names":[],"mappings":";;;;;;;;;AAQO,MAAM,2BAA0C,MAAM;AACzD,QAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAMH,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAOhB,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAUjB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU9B,QAAM,iBAAiB,SAAS,cAAc,KAAK;AACnD,iBAAe,YAAY;AAE3B,QAAM,cAAc,eAAe,cAAc,eAAe;AAChE,QAAM,gBAAgB,eAAe,cAAc,iBAAiB;AAEpE,eAAa,iBAAiB,SAAS,YAAY;AAE/C,UAAM,EAAE,eAAA,IAAmB,MAAM,OAAO,yBAAY;AACpD,UAAM,uBAAuB,eAAe,2BAAA;AAC5C,UAAM,qBAAqB,WAAA;AAE3B,UAAM,oBAAoB,qBAAqB,qBAAA;AAG/C,QAAI,CAAC,mBAAmB;AACpB,cAAQ,MAAM,yBAAyB;AAGvC,6BAAA;AACA,YAAM,EAAE,iBAAA,IAAqB,MAAM,OAAO,cAAW;AACrD,YAAM,iBAAA;AACN;AAAA,IACJ;AAGA,UAAM,EAAE,OAAO,WAAA,IAAe;AAC9B,UAAM,WAAW,YAAY,KAAK,YAAY,CAAA;AAG9C,WAAO;AAAA,MACH,IAAI,YAAY,6BAA6B;AAAA,QACzC,QAAQ;AAAA,UACJ,MAAM;AAAA,UACN,MAAM;AAAA,YACF,SAAS;AAAA,YACT,WAAW,KAAK,IAAA;AAAA,YAChB;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS;AAAA,U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J;"}
@@ -3,13 +3,16 @@ export declare const createScanModal: ModalFunction;
3
3
  export declare const showScanModal: ShowModalFunction;
4
4
  export declare const hideScanModal: HideModalFunction;
5
5
  /**
6
- * Handles session approval and transitions to processing modal
7
- * Called when QR code is scanned and wallet approves the connection
8
- * @param sessionData - The session data from WalletConnect approval
6
+ * Auto-send the presentation request if one is configured in localStorage.
7
+ * This is called after session approval to automatically trigger verification.
8
+ * Tries v1 method first (ID App), then falls back to v0 (Concordium Wallet).
9
+ * @param topic - The session topic to use for the request
9
10
  */
11
+ export declare function autoSendPresentationRequestIfConfigured(topic: string): Promise<void>;
10
12
  /**
11
13
  * Handle WalletConnect session approval
12
14
  * Emits session_approved event to merchant and transitions to processing modal
15
+ * If a presentationRequest is configured, automatically sends the verification request
13
16
  */
14
17
  export declare function handleSessionApproval(sessionData: any): Promise<void>;
15
18
  /**