react-better-html 1.1.169 → 1.1.171

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1519,1774 +1519,54 @@ var appConfig = {
1519
1519
  };
1520
1520
  var defaultAlertDuration = 2.3 * 1e3;
1521
1521
 
1522
- // src/utils/functions.ts
1523
- import CryptoJS from "crypto-js";
1522
+ // src/components/alerts/AlertsHolder.tsx
1523
+ import { memo as memo7 } from "react";
1524
1524
 
1525
- // src/constants/countries.ts
1526
- var countries = [
1527
- {
1528
- name: "Afghanistan",
1529
- code: "AF",
1530
- timeZone: "Asia/Kabul",
1531
- phoneNumberExtension: "93"
1532
- },
1533
- {
1534
- name: "\xC5land Islands",
1535
- code: "AX",
1536
- timeZone: "Europe/Mariehamn",
1537
- phoneNumberExtension: "358"
1538
- },
1539
- {
1540
- name: "Albania",
1541
- code: "AL",
1542
- timeZone: "Europe/Tirane",
1543
- phoneNumberExtension: "355"
1544
- },
1545
- {
1546
- name: "Algeria",
1547
- code: "DZ",
1548
- timeZone: "Africa/Algiers",
1549
- phoneNumberExtension: "213"
1550
- },
1551
- {
1552
- name: "United States of America",
1553
- code: "US",
1554
- timeZone: "America/New_York",
1555
- phoneNumberExtension: "1",
1556
- phoneNumberFormat: "(XXX)XXX-XXXX"
1557
- },
1558
- {
1559
- name: "American Samoa",
1560
- code: "AS",
1561
- timeZone: "Pacific/Pago_Pago",
1562
- phoneNumberExtension: "1",
1563
- phoneNumberFormat: "(XXX)XXX-XXXX"
1564
- },
1565
- {
1566
- name: "Andorra",
1567
- code: "AD",
1568
- timeZone: "Europe/Andorra",
1569
- phoneNumberExtension: "376"
1570
- },
1571
- {
1572
- name: "Angola",
1573
- code: "AO",
1574
- timeZone: "Africa/Luanda",
1575
- phoneNumberExtension: "244"
1576
- },
1577
- {
1578
- name: "Anguilla",
1579
- code: "AI",
1580
- timeZone: "America/Anguilla",
1581
- phoneNumberExtension: "1",
1582
- phoneNumberFormat: "(XXX)XXX-XXXX"
1583
- },
1584
- {
1585
- name: "Antarctica",
1586
- code: "AQ",
1587
- timeZone: "Antarctica/Casey",
1588
- phoneNumberExtension: "672"
1589
- },
1590
- {
1591
- name: "Antigua and Barbuda",
1592
- code: "AG",
1593
- timeZone: "America/Antigua",
1594
- phoneNumberExtension: "1",
1595
- phoneNumberFormat: "(XXX)XXX-XXXX"
1596
- },
1597
- {
1598
- name: "Argentina",
1599
- code: "AR",
1600
- timeZone: "America/Argentina/Buenos_Aires",
1601
- phoneNumberExtension: "54"
1602
- },
1603
- {
1604
- name: "Armenia",
1605
- code: "AM",
1606
- timeZone: "Asia/Yerevan",
1607
- phoneNumberExtension: "374"
1608
- },
1609
- {
1610
- name: "Aruba",
1611
- code: "AW",
1612
- timeZone: "America/Aruba",
1613
- phoneNumberExtension: "297"
1614
- },
1615
- {
1616
- name: "Australia",
1617
- code: "AU",
1618
- timeZone: "Australia/Sydney",
1619
- phoneNumberExtension: "61"
1620
- },
1621
- {
1622
- name: "Austria",
1623
- code: "AT",
1624
- timeZone: "Europe/Vienna",
1625
- phoneNumberExtension: "43"
1626
- },
1627
- {
1628
- name: "Azerbaijan",
1629
- code: "AZ",
1630
- timeZone: "Asia/Baku",
1631
- phoneNumberExtension: "994"
1632
- },
1633
- {
1634
- name: "Bahamas",
1635
- code: "BS",
1636
- timeZone: "America/Nassau",
1637
- phoneNumberExtension: "1",
1638
- phoneNumberFormat: "(XXX)XXX-XXXX"
1639
- },
1640
- {
1641
- name: "Bahrain",
1642
- code: "BH",
1643
- timeZone: "Asia/Bahrain",
1644
- phoneNumberExtension: "973"
1645
- },
1646
- {
1647
- name: "Bangladesh",
1648
- code: "BD",
1649
- timeZone: "Asia/Dhaka",
1650
- phoneNumberExtension: "880"
1651
- },
1652
- {
1653
- name: "Barbados",
1654
- code: "BB",
1655
- timeZone: "America/Barbados",
1656
- phoneNumberExtension: "1",
1657
- phoneNumberFormat: "(XXX)XXX-XXXX"
1658
- },
1659
- {
1660
- name: "Belarus",
1661
- code: "BY",
1662
- timeZone: "Europe/Minsk",
1663
- phoneNumberExtension: "375"
1664
- },
1665
- {
1666
- name: "Belgium",
1667
- code: "BE",
1668
- timeZone: "Europe/Brussels",
1669
- phoneNumberExtension: "32"
1670
- },
1671
- {
1672
- name: "Belize",
1673
- code: "BZ",
1674
- timeZone: "America/Belize",
1675
- phoneNumberExtension: "501"
1676
- },
1677
- {
1678
- name: "Benin",
1679
- code: "BJ",
1680
- timeZone: "Africa/Porto-Novo",
1681
- phoneNumberExtension: "229"
1682
- },
1683
- {
1684
- name: "Bermuda",
1685
- code: "BM",
1686
- timeZone: "Atlantic/Bermuda",
1687
- phoneNumberExtension: "1",
1688
- phoneNumberFormat: "(XXX)XXX-XXXX"
1689
- },
1690
- {
1691
- name: "Bhutan",
1692
- code: "BT",
1693
- timeZone: "Asia/Thimphu",
1694
- phoneNumberExtension: "975"
1695
- },
1696
- {
1697
- name: "Bolivia",
1698
- code: "BO",
1699
- timeZone: "America/La_Paz",
1700
- phoneNumberExtension: "591"
1701
- },
1702
- {
1703
- name: "Bosnia and Herzegovina",
1704
- code: "BA",
1705
- timeZone: "Europe/Sarajevo",
1706
- phoneNumberExtension: "387"
1707
- },
1708
- {
1709
- name: "Botswana",
1710
- code: "BW",
1711
- timeZone: "Africa/Gaborone",
1712
- phoneNumberExtension: "267"
1713
- },
1714
- {
1715
- name: "Bouvet Island",
1716
- code: "BV",
1717
- timeZone: "Europe/Oslo",
1718
- phoneNumberExtension: "47"
1525
+ // src/components/alerts/Alert.tsx
1526
+ import { memo as memo6, useCallback as useCallback2, useEffect as useEffect3, useMemo, useRef, useState } from "react";
1527
+ import styled6 from "styled-components";
1528
+
1529
+ // src/plugins/alerts.ts
1530
+ var defaultAlertsPluginOptions = {
1531
+ position: "bottom",
1532
+ align: "right",
1533
+ defaultDuration: "auto",
1534
+ maxWidth: 460,
1535
+ withLoaderBar: true,
1536
+ withCloseButton: true
1537
+ };
1538
+ var alertsPlugin = (options) => ({
1539
+ name: "alerts",
1540
+ initialize: () => {
1541
+ console.log("alerts plugin initialized");
1719
1542
  },
1720
- {
1721
- name: "Brazil",
1722
- code: "BR",
1723
- timeZone: "America/Sao_Paulo",
1724
- phoneNumberExtension: "55"
1543
+ getConfig: () => ({
1544
+ ...defaultAlertsPluginOptions,
1545
+ ...options
1546
+ })
1547
+ });
1548
+
1549
+ // src/plugins/reactRouterDom.ts
1550
+ var defaultReactRouterDomPluginOptions = {};
1551
+ var reactRouterDomPlugin = (options) => ({
1552
+ name: "react-router-dom",
1553
+ initialize: () => {
1554
+ console.log("react-router-dom plugin initialized");
1725
1555
  },
1726
- {
1727
- name: "British Indian Ocean Territory",
1728
- code: "IO",
1729
- timeZone: "Indian/Chagos",
1730
- phoneNumberExtension: "246"
1731
- },
1732
- {
1733
- name: "Brunei Darussalam",
1734
- code: "BN",
1735
- timeZone: "Asia/Brunei",
1736
- phoneNumberExtension: "673"
1737
- },
1738
- {
1739
- name: "Bulgaria",
1740
- code: "BG",
1741
- timeZone: "Europe/Sofia",
1742
- phoneNumberExtension: "359",
1743
- phoneNumberFormat: "XX XXX XXXX"
1744
- },
1745
- {
1746
- name: "Burkina Faso",
1747
- code: "BF",
1748
- timeZone: "Africa/Ouagadougou",
1749
- phoneNumberExtension: "226"
1750
- },
1751
- {
1752
- name: "Burundi",
1753
- code: "BI",
1754
- timeZone: "Africa/Bujumbura",
1755
- phoneNumberExtension: "257"
1756
- },
1757
- {
1758
- name: "Cambodia",
1759
- code: "KH",
1760
- timeZone: "Asia/Phnom_Penh",
1761
- phoneNumberExtension: "855"
1762
- },
1763
- {
1764
- name: "Cameroon",
1765
- code: "CM",
1766
- timeZone: "Africa/Douala",
1767
- phoneNumberExtension: "237"
1768
- },
1769
- {
1770
- name: "Canada",
1771
- code: "CA",
1772
- timeZone: "America/Toronto",
1773
- phoneNumberExtension: "1",
1774
- phoneNumberFormat: "(XXX)XXX-XXXX"
1775
- },
1776
- {
1777
- name: "Cape Verde",
1778
- code: "CV",
1779
- timeZone: "Atlantic/Cape_Verde",
1780
- phoneNumberExtension: "238"
1781
- },
1782
- {
1783
- name: "Cayman Islands",
1784
- code: "KY",
1785
- timeZone: "America/Cayman",
1786
- phoneNumberExtension: "1",
1787
- phoneNumberFormat: "(XXX)XXX-XXXX"
1788
- },
1789
- {
1790
- name: "Central African Republic",
1791
- code: "CF",
1792
- timeZone: "Africa/Bangui",
1793
- phoneNumberExtension: "236"
1794
- },
1795
- {
1796
- name: "Chad",
1797
- code: "TD",
1798
- timeZone: "Africa/Ndjamena",
1799
- phoneNumberExtension: "235"
1800
- },
1801
- {
1802
- name: "Chile",
1803
- code: "CL",
1804
- timeZone: "America/Santiago",
1805
- phoneNumberExtension: "56"
1806
- },
1807
- {
1808
- name: "China",
1809
- code: "CN",
1810
- timeZone: "Asia/Shanghai",
1811
- phoneNumberExtension: "86"
1812
- },
1813
- {
1814
- name: "Christmas Island",
1815
- code: "CX",
1816
- timeZone: "Indian/Christmas",
1817
- phoneNumberExtension: "61"
1818
- },
1819
- {
1820
- name: "Cocos (Keeling) Islands",
1821
- code: "CC",
1822
- timeZone: "Indian/Cocos",
1823
- phoneNumberExtension: "61"
1824
- },
1825
- {
1826
- name: "Colombia",
1827
- code: "CO",
1828
- timeZone: "America/Bogota",
1829
- phoneNumberExtension: "57"
1830
- },
1831
- {
1832
- name: "Comoros",
1833
- code: "KM",
1834
- timeZone: "Indian/Comoro",
1835
- phoneNumberExtension: "269"
1836
- },
1837
- {
1838
- name: "Congo",
1839
- code: "CG",
1840
- timeZone: "Africa/Brazzaville",
1841
- phoneNumberExtension: "242"
1842
- },
1843
- {
1844
- name: "Congo, The Democratic Republic of the",
1845
- code: "CD",
1846
- timeZone: "Africa/Kinshasa",
1847
- phoneNumberExtension: "243"
1848
- },
1849
- {
1850
- name: "Cook Islands",
1851
- code: "CK",
1852
- timeZone: "Pacific/Rarotonga",
1853
- phoneNumberExtension: "682"
1854
- },
1855
- {
1856
- name: "Costa Rica",
1857
- code: "CR",
1858
- timeZone: "America/Costa_Rica",
1859
- phoneNumberExtension: "506"
1860
- },
1861
- {
1862
- name: "Cote D'Ivoire",
1863
- code: "CI",
1864
- timeZone: "Africa/Abidjan",
1865
- phoneNumberExtension: "225"
1866
- },
1867
- {
1868
- name: "Croatia",
1869
- code: "HR",
1870
- timeZone: "Europe/Zagreb",
1871
- phoneNumberExtension: "385"
1872
- },
1873
- {
1874
- name: "Cuba",
1875
- code: "CU",
1876
- timeZone: "America/Havana",
1877
- phoneNumberExtension: "53"
1878
- },
1879
- {
1880
- name: "Cyprus",
1881
- code: "CY",
1882
- timeZone: "Asia/Nicosia",
1883
- phoneNumberExtension: "357"
1884
- },
1885
- {
1886
- name: "Czech Republic",
1887
- code: "CZ",
1888
- timeZone: "Europe/Prague",
1889
- phoneNumberExtension: "420"
1890
- },
1891
- {
1892
- name: "Denmark",
1893
- code: "DK",
1894
- timeZone: "Europe/Copenhagen",
1895
- phoneNumberExtension: "45"
1896
- },
1897
- {
1898
- name: "Djibouti",
1899
- code: "DJ",
1900
- timeZone: "Africa/Djibouti",
1901
- phoneNumberExtension: "253"
1902
- },
1903
- {
1904
- name: "Dominica",
1905
- code: "DM",
1906
- timeZone: "America/Dominica",
1907
- phoneNumberExtension: "1",
1908
- phoneNumberFormat: "(XXX)XXX-XXXX"
1909
- },
1910
- {
1911
- name: "Dominican Republic",
1912
- code: "DO",
1913
- timeZone: "America/Santo_Domingo",
1914
- phoneNumberExtension: "1",
1915
- phoneNumberFormat: "(XXX)XXX-XXXX"
1916
- },
1917
- {
1918
- name: "Ecuador",
1919
- code: "EC",
1920
- timeZone: "America/Guayaquil",
1921
- phoneNumberExtension: "593"
1922
- },
1923
- {
1924
- name: "Egypt",
1925
- code: "EG",
1926
- timeZone: "Africa/Cairo",
1927
- phoneNumberExtension: "20"
1928
- },
1929
- {
1930
- name: "El Salvador",
1931
- code: "SV",
1932
- timeZone: "America/El_Salvador",
1933
- phoneNumberExtension: "503"
1934
- },
1935
- {
1936
- name: "Equatorial Guinea",
1937
- code: "GQ",
1938
- timeZone: "Africa/Malabo",
1939
- phoneNumberExtension: "240"
1940
- },
1941
- {
1942
- name: "Eritrea",
1943
- code: "ER",
1944
- timeZone: "Africa/Asmara",
1945
- phoneNumberExtension: "291"
1946
- },
1947
- {
1948
- name: "Estonia",
1949
- code: "EE",
1950
- timeZone: "Europe/Tallinn",
1951
- phoneNumberExtension: "372"
1952
- },
1953
- {
1954
- name: "Ethiopia",
1955
- code: "ET",
1956
- timeZone: "Africa/Addis_Ababa",
1957
- phoneNumberExtension: "251"
1958
- },
1959
- {
1960
- name: "Falkland Islands (Malvinas)",
1961
- code: "FK",
1962
- timeZone: "Atlantic/Stanley",
1963
- phoneNumberExtension: "500"
1964
- },
1965
- {
1966
- name: "Faroe Islands",
1967
- code: "FO",
1968
- timeZone: "Atlantic/Faroe",
1969
- phoneNumberExtension: "298"
1970
- },
1971
- {
1972
- name: "Fiji",
1973
- code: "FJ",
1974
- timeZone: "Pacific/Fiji",
1975
- phoneNumberExtension: "679"
1976
- },
1977
- {
1978
- name: "Finland",
1979
- code: "FI",
1980
- timeZone: "Europe/Helsinki",
1981
- phoneNumberExtension: "358",
1982
- phoneNumberFormat: "XX XXX XX XX"
1983
- },
1984
- {
1985
- name: "France",
1986
- code: "FR",
1987
- timeZone: "Europe/Paris",
1988
- phoneNumberExtension: "33",
1989
- phoneNumberFormat: "X XX XX XX XX"
1990
- },
1991
- {
1992
- name: "French Guiana",
1993
- code: "GF",
1994
- timeZone: "America/Cayenne",
1995
- phoneNumberExtension: "594"
1996
- },
1997
- {
1998
- name: "French Polynesia",
1999
- code: "PF",
2000
- timeZone: "Pacific/Tahiti",
2001
- phoneNumberExtension: "689"
2002
- },
2003
- {
2004
- name: "French Southern Territories",
2005
- code: "TF",
2006
- timeZone: "Indian/Kerguelen",
2007
- phoneNumberExtension: "262"
2008
- },
2009
- {
2010
- name: "Gabon",
2011
- code: "GA",
2012
- timeZone: "Africa/Libreville",
2013
- phoneNumberExtension: "241"
2014
- },
2015
- {
2016
- name: "Gambia",
2017
- code: "GM",
2018
- timeZone: "Africa/Banjul",
2019
- phoneNumberExtension: "220"
2020
- },
2021
- {
2022
- name: "Georgia",
2023
- code: "GE",
2024
- timeZone: "Asia/Tbilisi",
2025
- phoneNumberExtension: "995"
2026
- },
2027
- {
2028
- name: "Germany",
2029
- code: "DE",
2030
- timeZone: "Europe/Berlin",
2031
- phoneNumberExtension: "49",
2032
- phoneNumberFormat: "XXXX XXXXXXX"
2033
- },
2034
- {
2035
- name: "Ghana",
2036
- code: "GH",
2037
- timeZone: "Africa/Accra",
2038
- phoneNumberExtension: "233"
2039
- },
2040
- {
2041
- name: "Gibraltar",
2042
- code: "GI",
2043
- timeZone: "Europe/Gibraltar",
2044
- phoneNumberExtension: "350"
2045
- },
2046
- {
2047
- name: "Greece",
2048
- code: "GR",
2049
- timeZone: "Europe/Athens",
2050
- phoneNumberExtension: "30"
2051
- },
2052
- {
2053
- name: "Greenland",
2054
- code: "GL",
2055
- timeZone: "America/Godthab",
2056
- phoneNumberExtension: "299"
2057
- },
2058
- {
2059
- name: "Grenada",
2060
- code: "GD",
2061
- timeZone: "America/Grenada",
2062
- phoneNumberExtension: "1",
2063
- phoneNumberFormat: "(XXX)XXX-XXXX"
2064
- },
2065
- {
2066
- name: "Guadeloupe",
2067
- code: "GP",
2068
- timeZone: "America/Guadeloupe",
2069
- phoneNumberExtension: "590"
2070
- },
2071
- {
2072
- name: "Guam",
2073
- code: "GU",
2074
- timeZone: "Pacific/Guam",
2075
- phoneNumberExtension: "1",
2076
- phoneNumberFormat: "(XXX)XXX-XXXX"
2077
- },
2078
- {
2079
- name: "Guatemala",
2080
- code: "GT",
2081
- timeZone: "America/Guatemala",
2082
- phoneNumberExtension: "502"
2083
- },
2084
- {
2085
- name: "United Kingdom",
2086
- code: "GB",
2087
- timeZone: "Europe/London",
2088
- phoneNumberExtension: "44",
2089
- phoneNumberFormat: "XX XXXX XXXX"
2090
- },
2091
- {
2092
- name: "Guernsey",
2093
- code: "GG",
2094
- timeZone: "Europe/Guernsey",
2095
- phoneNumberExtension: "44",
2096
- phoneNumberFormat: "XX XXXX XXXX"
2097
- },
2098
- {
2099
- name: "Guinea",
2100
- code: "GN",
2101
- timeZone: "Africa/Conakry",
2102
- phoneNumberExtension: "224"
2103
- },
2104
- {
2105
- name: "Guinea-Bissau",
2106
- code: "GW",
2107
- timeZone: "Africa/Bissau",
2108
- phoneNumberExtension: "245"
2109
- },
2110
- {
2111
- name: "Guyana",
2112
- code: "GY",
2113
- timeZone: "America/Guyana",
2114
- phoneNumberExtension: "592"
2115
- },
2116
- {
2117
- name: "Haiti",
2118
- code: "HT",
2119
- timeZone: "America/Port-au-Prince",
2120
- phoneNumberExtension: "509"
2121
- },
2122
- {
2123
- name: "Heard Island and Mcdonald Islands",
2124
- code: "HM",
2125
- timeZone: "Indian/Kerguelen",
2126
- phoneNumberExtension: "672"
2127
- },
2128
- {
2129
- name: "Holy See (Vatican City State)",
2130
- code: "VA",
2131
- timeZone: "Europe/Vatican",
2132
- phoneNumberExtension: "379"
2133
- },
2134
- {
2135
- name: "Honduras",
2136
- code: "HN",
2137
- timeZone: "America/Tegucigalpa",
2138
- phoneNumberExtension: "504"
2139
- },
2140
- {
2141
- name: "Hong Kong",
2142
- code: "HK",
2143
- timeZone: "Asia/Hong_Kong",
2144
- phoneNumberExtension: "852"
2145
- },
2146
- {
2147
- name: "Hungary",
2148
- code: "HU",
2149
- timeZone: "Europe/Budapest",
2150
- phoneNumberExtension: "36"
2151
- },
2152
- {
2153
- name: "Iceland",
2154
- code: "IS",
2155
- timeZone: "Atlantic/Reykjavik",
2156
- phoneNumberExtension: "354"
2157
- },
2158
- {
2159
- name: "India",
2160
- code: "IN",
2161
- timeZone: "Asia/Kolkata",
2162
- phoneNumberExtension: "91"
2163
- },
2164
- {
2165
- name: "Indonesia",
2166
- code: "ID",
2167
- timeZone: "Asia/Jakarta",
2168
- phoneNumberExtension: "62"
2169
- },
2170
- {
2171
- name: "Iran, Islamic Republic Of",
2172
- code: "IR",
2173
- timeZone: "Asia/Tehran",
2174
- phoneNumberExtension: "98"
2175
- },
2176
- {
2177
- name: "Iraq",
2178
- code: "IQ",
2179
- timeZone: "Asia/Baghdad",
2180
- phoneNumberExtension: "964"
2181
- },
2182
- {
2183
- name: "Ireland",
2184
- code: "IE",
2185
- timeZone: "Europe/Dublin",
2186
- phoneNumberExtension: "353"
2187
- },
2188
- {
2189
- name: "Israel",
2190
- code: "IL",
2191
- timeZone: "Asia/Jerusalem",
2192
- phoneNumberExtension: "972"
2193
- },
2194
- {
2195
- name: "Italy",
2196
- code: "IT",
2197
- timeZone: "Europe/Rome",
2198
- phoneNumberExtension: "39",
2199
- phoneNumberFormat: "XXX XXX XXXX"
2200
- },
2201
- {
2202
- name: "Jamaica",
2203
- code: "JM",
2204
- timeZone: "America/Jamaica",
2205
- phoneNumberExtension: "1",
2206
- phoneNumberFormat: "(XXX)XXX-XXXX"
2207
- },
2208
- {
2209
- name: "Japan",
2210
- code: "JP",
2211
- timeZone: "Asia/Tokyo",
2212
- phoneNumberExtension: "81"
2213
- },
2214
- {
2215
- name: "Jersey",
2216
- code: "JE",
2217
- timeZone: "Europe/Jersey",
2218
- phoneNumberExtension: "44",
2219
- phoneNumberFormat: "XX XXXX XXXX"
2220
- },
2221
- {
2222
- name: "Jordan",
2223
- code: "JO",
2224
- timeZone: "Asia/Amman",
2225
- phoneNumberExtension: "962"
2226
- },
2227
- {
2228
- name: "Kazakhstan",
2229
- code: "KZ",
2230
- timeZone: "Asia/Almaty",
2231
- phoneNumberExtension: "7"
2232
- },
2233
- {
2234
- name: "Kenya",
2235
- code: "KE",
2236
- timeZone: "Africa/Nairobi",
2237
- phoneNumberExtension: "254"
2238
- },
2239
- {
2240
- name: "Kiribati",
2241
- code: "KI",
2242
- timeZone: "Pacific/Tarawa",
2243
- phoneNumberExtension: "686"
2244
- },
2245
- {
2246
- name: "Korea, Democratic People's Republic of (North Korea)",
2247
- code: "KP",
2248
- timeZone: "Asia/Pyongyang",
2249
- phoneNumberExtension: "850"
2250
- },
2251
- {
2252
- name: "Korea, Republic of (South Korea)",
2253
- code: "KR",
2254
- timeZone: "Asia/Seoul",
2255
- phoneNumberExtension: "82"
2256
- },
2257
- {
2258
- name: "Kuwait",
2259
- code: "KW",
2260
- timeZone: "Asia/Kuwait",
2261
- phoneNumberExtension: "965"
2262
- },
2263
- {
2264
- name: "Kyrgyzstan",
2265
- code: "KG",
2266
- timeZone: "Asia/Bishkek",
2267
- phoneNumberExtension: "996"
2268
- },
2269
- {
2270
- name: "Lao People's Democratic Republic",
2271
- code: "LA",
2272
- timeZone: "Asia/Vientiane",
2273
- phoneNumberExtension: "856"
2274
- },
2275
- {
2276
- name: "Latvia",
2277
- code: "LV",
2278
- timeZone: "Europe/Riga",
2279
- phoneNumberExtension: "371"
2280
- },
2281
- {
2282
- name: "Lebanon",
2283
- code: "LB",
2284
- timeZone: "Asia/Beirut",
2285
- phoneNumberExtension: "961"
2286
- },
2287
- {
2288
- name: "Lesotho",
2289
- code: "LS",
2290
- timeZone: "Africa/Maseru",
2291
- phoneNumberExtension: "266"
2292
- },
2293
- {
2294
- name: "Liberia",
2295
- code: "LR",
2296
- timeZone: "Africa/Monrovia",
2297
- phoneNumberExtension: "231"
2298
- },
2299
- {
2300
- name: "Libyan Arab Jamahiriya",
2301
- code: "LY",
2302
- timeZone: "Africa/Tripoli",
2303
- phoneNumberExtension: "218"
2304
- },
2305
- {
2306
- name: "Liechtenstein",
2307
- code: "LI",
2308
- timeZone: "Europe/Vaduz",
2309
- phoneNumberExtension: "423"
2310
- },
2311
- {
2312
- name: "Lithuania",
2313
- code: "LT",
2314
- timeZone: "Europe/Vilnius",
2315
- phoneNumberExtension: "370"
2316
- },
2317
- {
2318
- name: "Luxembourg",
2319
- code: "LU",
2320
- timeZone: "Europe/Luxembourg",
2321
- phoneNumberExtension: "352"
2322
- },
2323
- {
2324
- name: "Macao",
2325
- code: "MO",
2326
- timeZone: "Asia/Macau",
2327
- phoneNumberExtension: "853"
2328
- },
2329
- {
2330
- name: "Macedonia, The Former Yugoslav Republic of",
2331
- code: "MK",
2332
- timeZone: "Europe/Skopje",
2333
- phoneNumberExtension: "389"
2334
- },
2335
- {
2336
- name: "Madagascar",
2337
- code: "MG",
2338
- timeZone: "Indian/Antananarivo",
2339
- phoneNumberExtension: "261"
2340
- },
2341
- {
2342
- name: "Malawi",
2343
- code: "MW",
2344
- timeZone: "Africa/Blantyre",
2345
- phoneNumberExtension: "265"
2346
- },
2347
- {
2348
- name: "Malaysia",
2349
- code: "MY",
2350
- timeZone: "Asia/Kuala_Lumpur",
2351
- phoneNumberExtension: "60"
2352
- },
2353
- {
2354
- name: "Maldives",
2355
- code: "MV",
2356
- timeZone: "Indian/Maldives",
2357
- phoneNumberExtension: "960"
2358
- },
2359
- {
2360
- name: "Mali",
2361
- code: "ML",
2362
- timeZone: "Africa/Bamako",
2363
- phoneNumberExtension: "223"
2364
- },
2365
- {
2366
- name: "Malta",
2367
- code: "MT",
2368
- timeZone: "Europe/Malta",
2369
- phoneNumberExtension: "356"
2370
- },
2371
- {
2372
- name: "Marshall Islands",
2373
- code: "MH",
2374
- timeZone: "Pacific/Majuro",
2375
- phoneNumberExtension: "692"
2376
- },
2377
- {
2378
- name: "Martinique",
2379
- code: "MQ",
2380
- timeZone: "America/Martinique",
2381
- phoneNumberExtension: "596"
2382
- },
2383
- {
2384
- name: "Mauritania",
2385
- code: "MR",
2386
- timeZone: "Africa/Nouakchott",
2387
- phoneNumberExtension: "222"
2388
- },
2389
- {
2390
- name: "Mauritius",
2391
- code: "MU",
2392
- timeZone: "Indian/Mauritius",
2393
- phoneNumberExtension: "230"
2394
- },
2395
- {
2396
- name: "Mayotte",
2397
- code: "YT",
2398
- timeZone: "Indian/Mayotte",
2399
- phoneNumberExtension: "262"
2400
- },
2401
- {
2402
- name: "Mexico",
2403
- code: "MX",
2404
- timeZone: "America/Mexico_City",
2405
- phoneNumberExtension: "52"
2406
- },
2407
- {
2408
- name: "Micronesia, Federated States of",
2409
- code: "FM",
2410
- timeZone: "Pacific/Chuuk",
2411
- phoneNumberExtension: "691"
2412
- },
2413
- {
2414
- name: "Moldova, Republic of",
2415
- code: "MD",
2416
- timeZone: "Europe/Chisinau",
2417
- phoneNumberExtension: "373"
2418
- },
2419
- {
2420
- name: "Monaco",
2421
- code: "MC",
2422
- timeZone: "Europe/Monaco",
2423
- phoneNumberExtension: "377"
2424
- },
2425
- {
2426
- name: "Mongolia",
2427
- code: "MN",
2428
- timeZone: "Asia/Ulaanbaatar",
2429
- phoneNumberExtension: "976"
2430
- },
2431
- {
2432
- name: "Montserrat",
2433
- code: "MS",
2434
- timeZone: "America/Montserrat",
2435
- phoneNumberExtension: "1",
2436
- phoneNumberFormat: "(XXX)XXX-XXXX"
2437
- },
2438
- {
2439
- name: "Morocco",
2440
- code: "MA",
2441
- timeZone: "Africa/Casablanca",
2442
- phoneNumberExtension: "212"
2443
- },
2444
- {
2445
- name: "Mozambique",
2446
- code: "MZ",
2447
- timeZone: "Africa/Maputo",
2448
- phoneNumberExtension: "258"
2449
- },
2450
- {
2451
- name: "Myanmar",
2452
- code: "MM",
2453
- timeZone: "Asia/Yangon",
2454
- phoneNumberExtension: "95"
2455
- },
2456
- {
2457
- name: "Namibia",
2458
- code: "NA",
2459
- timeZone: "Africa/Windhoek",
2460
- phoneNumberExtension: "264"
2461
- },
2462
- {
2463
- name: "Nauru",
2464
- code: "NR",
2465
- timeZone: "Pacific/Nauru",
2466
- phoneNumberExtension: "674"
2467
- },
2468
- {
2469
- name: "Nepal",
2470
- code: "NP",
2471
- timeZone: "Asia/Kathmandu",
2472
- phoneNumberExtension: "977"
2473
- },
2474
- {
2475
- name: "Netherlands",
2476
- code: "NL",
2477
- timeZone: "Europe/Amsterdam",
2478
- phoneNumberExtension: "31"
2479
- },
2480
- {
2481
- name: "New Caledonia",
2482
- code: "NC",
2483
- timeZone: "Pacific/Noumea",
2484
- phoneNumberExtension: "687"
2485
- },
2486
- {
2487
- name: "New Zealand",
2488
- code: "NZ",
2489
- timeZone: "Pacific/Auckland",
2490
- phoneNumberExtension: "64"
2491
- },
2492
- {
2493
- name: "Nicaragua",
2494
- code: "NI",
2495
- timeZone: "America/Managua",
2496
- phoneNumberExtension: "505"
2497
- },
2498
- {
2499
- name: "Niger",
2500
- code: "NE",
2501
- timeZone: "Africa/Niamey",
2502
- phoneNumberExtension: "227"
2503
- },
2504
- {
2505
- name: "Nigeria",
2506
- code: "NG",
2507
- timeZone: "Africa/Lagos",
2508
- phoneNumberExtension: "234"
2509
- },
2510
- {
2511
- name: "Niue",
2512
- code: "NU",
2513
- timeZone: "Pacific/Niue",
2514
- phoneNumberExtension: "683"
2515
- },
2516
- {
2517
- name: "Norfolk Island",
2518
- code: "NF",
2519
- timeZone: "Pacific/Norfolk",
2520
- phoneNumberExtension: "672"
2521
- },
2522
- {
2523
- name: "Northern Mariana Islands",
2524
- code: "MP",
2525
- timeZone: "Pacific/Saipan",
2526
- phoneNumberExtension: "1",
2527
- phoneNumberFormat: "(XXX)XXX-XXXX"
2528
- },
2529
- {
2530
- name: "Norway",
2531
- code: "NO",
2532
- timeZone: "Europe/Oslo",
2533
- phoneNumberExtension: "47"
2534
- },
2535
- {
2536
- name: "Oman",
2537
- code: "OM",
2538
- timeZone: "Asia/Muscat",
2539
- phoneNumberExtension: "968"
2540
- },
2541
- {
2542
- name: "Pakistan",
2543
- code: "PK",
2544
- timeZone: "Asia/Karachi",
2545
- phoneNumberExtension: "92"
2546
- },
2547
- {
2548
- name: "Palau",
2549
- code: "PW",
2550
- timeZone: "Pacific/Palau",
2551
- phoneNumberExtension: "680"
2552
- },
2553
- {
2554
- name: "Palestinian Territory, Occupied",
2555
- code: "PS",
2556
- timeZone: "Asia/Hebron",
2557
- phoneNumberExtension: "970"
2558
- },
2559
- {
2560
- name: "Panama",
2561
- code: "PA",
2562
- timeZone: "America/Panama",
2563
- phoneNumberExtension: "507"
2564
- },
2565
- {
2566
- name: "Papua New Guinea",
2567
- code: "PG",
2568
- timeZone: "Pacific/Port_Moresby",
2569
- phoneNumberExtension: "675"
2570
- },
2571
- {
2572
- name: "Paraguay",
2573
- code: "PY",
2574
- timeZone: "America/Asuncion",
2575
- phoneNumberExtension: "595"
2576
- },
2577
- {
2578
- name: "Peru",
2579
- code: "PE",
2580
- timeZone: "America/Lima",
2581
- phoneNumberExtension: "51"
2582
- },
2583
- {
2584
- name: "Philippines",
2585
- code: "PH",
2586
- timeZone: "Asia/Manila",
2587
- phoneNumberExtension: "63"
2588
- },
2589
- {
2590
- name: "Pitcairn",
2591
- code: "PN",
2592
- timeZone: "Pacific/Pitcairn",
2593
- phoneNumberExtension: "64"
2594
- },
2595
- {
2596
- name: "Poland",
2597
- code: "PL",
2598
- timeZone: "Europe/Warsaw",
2599
- phoneNumberExtension: "48"
2600
- },
2601
- {
2602
- name: "Portugal",
2603
- code: "PT",
2604
- timeZone: "Europe/Lisbon",
2605
- phoneNumberExtension: "351"
2606
- },
2607
- {
2608
- name: "Puerto Rico",
2609
- code: "PR",
2610
- timeZone: "America/Puerto_Rico",
2611
- phoneNumberExtension: "1",
2612
- phoneNumberFormat: "(XXX)XXX-XXXX"
2613
- },
2614
- {
2615
- name: "Qatar",
2616
- code: "QA",
2617
- timeZone: "Asia/Qatar",
2618
- phoneNumberExtension: "974"
2619
- },
2620
- {
2621
- name: "Reunion",
2622
- code: "RE",
2623
- timeZone: "Indian/Reunion",
2624
- phoneNumberExtension: "262"
2625
- },
2626
- {
2627
- name: "Romania",
2628
- code: "RO",
2629
- timeZone: "Europe/Bucharest",
2630
- phoneNumberExtension: "40"
2631
- },
2632
- {
2633
- name: "Russian Federation",
2634
- code: "RU",
2635
- timeZone: "Europe/Moscow",
2636
- phoneNumberExtension: "7"
2637
- },
2638
- {
2639
- name: "RWANDA",
2640
- code: "RW",
2641
- timeZone: "Africa/Kigali",
2642
- phoneNumberExtension: "250"
2643
- },
2644
- {
2645
- name: "Saint Helena",
2646
- code: "SH",
2647
- timeZone: "Atlantic/St_Helena",
2648
- phoneNumberExtension: "290"
2649
- },
2650
- {
2651
- name: "Saint Kitts and Nevis",
2652
- code: "KN",
2653
- timeZone: "America/St_Kitts",
2654
- phoneNumberExtension: "1",
2655
- phoneNumberFormat: "(XXX)XXX-XXXX"
2656
- },
2657
- {
2658
- name: "Saint Lucia",
2659
- code: "LC",
2660
- timeZone: "America/St_Lucia",
2661
- phoneNumberExtension: "1",
2662
- phoneNumberFormat: "(XXX)XXX-XXXX"
2663
- },
2664
- {
2665
- name: "Saint Pierre and Miquelon",
2666
- code: "PM",
2667
- timeZone: "America/Miquelon",
2668
- phoneNumberExtension: "508"
2669
- },
2670
- {
2671
- name: "Saint Vincent and the Grenadines",
2672
- code: "VC",
2673
- timeZone: "America/St_Vincent",
2674
- phoneNumberExtension: "1",
2675
- phoneNumberFormat: "(XXX)XXX-XXXX"
2676
- },
2677
- {
2678
- name: "Samoa",
2679
- code: "WS",
2680
- timeZone: "Pacific/Apia",
2681
- phoneNumberExtension: "685"
2682
- },
2683
- {
2684
- name: "San Marino",
2685
- code: "SM",
2686
- timeZone: "Europe/San_Marino",
2687
- phoneNumberExtension: "378"
2688
- },
2689
- {
2690
- name: "Sao Tome and Principe",
2691
- code: "ST",
2692
- timeZone: "Africa/Sao_Tome",
2693
- phoneNumberExtension: "239"
2694
- },
2695
- {
2696
- name: "Saudi Arabia",
2697
- code: "SA",
2698
- timeZone: "Asia/Riyadh",
2699
- phoneNumberExtension: "966"
2700
- },
2701
- {
2702
- name: "Senegal",
2703
- code: "SN",
2704
- timeZone: "Africa/Dakar",
2705
- phoneNumberExtension: "221"
2706
- },
2707
- {
2708
- name: "Republic of Serbia",
2709
- code: "RS",
2710
- timeZone: "Europe/Belgrade",
2711
- phoneNumberExtension: "381"
2712
- },
2713
- {
2714
- name: "Seychelles",
2715
- code: "SC",
2716
- timeZone: "Indian/Mahe",
2717
- phoneNumberExtension: "248"
2718
- },
2719
- {
2720
- name: "Sierra Leone",
2721
- code: "SL",
2722
- timeZone: "Africa/Freetown",
2723
- phoneNumberExtension: "232"
2724
- },
2725
- {
2726
- name: "Singapore",
2727
- code: "SG",
2728
- timeZone: "Asia/Singapore",
2729
- phoneNumberExtension: "65"
2730
- },
2731
- {
2732
- name: "Slovakia",
2733
- code: "SK",
2734
- timeZone: "Europe/Bratislava",
2735
- phoneNumberExtension: "421"
2736
- },
2737
- {
2738
- name: "Slovenia",
2739
- code: "SI",
2740
- timeZone: "Europe/Ljubljana",
2741
- phoneNumberExtension: "386"
2742
- },
2743
- {
2744
- name: "Solomon Islands",
2745
- code: "SB",
2746
- timeZone: "Pacific/Guadalcanal",
2747
- phoneNumberExtension: "677"
2748
- },
2749
- {
2750
- name: "Somalia",
2751
- code: "SO",
2752
- timeZone: "Africa/Mogadishu",
2753
- phoneNumberExtension: "252"
2754
- },
2755
- {
2756
- name: "South Africa",
2757
- code: "ZA",
2758
- timeZone: "Africa/Johannesburg",
2759
- phoneNumberExtension: "27"
2760
- },
2761
- {
2762
- name: "South Georgia and the South Sandwich Islands",
2763
- code: "GS",
2764
- timeZone: "Atlantic/South_Georgia",
2765
- phoneNumberExtension: "500"
2766
- },
2767
- {
2768
- name: "Spain",
2769
- code: "ES",
2770
- timeZone: "Europe/Madrid",
2771
- phoneNumberExtension: "34"
2772
- },
2773
- {
2774
- name: "Sri Lanka",
2775
- code: "LK",
2776
- timeZone: "Asia/Colombo",
2777
- phoneNumberExtension: "94"
2778
- },
2779
- {
2780
- name: "Sudan",
2781
- code: "SD",
2782
- timeZone: "Africa/Khartoum",
2783
- phoneNumberExtension: "249"
2784
- },
2785
- {
2786
- name: "Suriname",
2787
- code: "SR",
2788
- timeZone: "America/Paramaribo",
2789
- phoneNumberExtension: "597"
2790
- },
2791
- {
2792
- name: "Svalbard and Jan Mayen",
2793
- code: "SJ",
2794
- timeZone: "Arctic/Longyearbyen",
2795
- phoneNumberExtension: "47"
2796
- },
2797
- {
2798
- name: "Swaziland",
2799
- code: "SZ",
2800
- timeZone: "Africa/Mbabane",
2801
- phoneNumberExtension: "268"
2802
- },
2803
- {
2804
- name: "Sweden",
2805
- code: "SE",
2806
- timeZone: "Europe/Stockholm",
2807
- phoneNumberExtension: "46"
2808
- },
2809
- {
2810
- name: "Switzerland",
2811
- code: "CH",
2812
- timeZone: "Europe/Zurich",
2813
- phoneNumberExtension: "41"
2814
- },
2815
- {
2816
- name: "Syrian Arab Republic",
2817
- code: "SY",
2818
- timeZone: "Asia/Damascus",
2819
- phoneNumberExtension: "963"
2820
- },
2821
- {
2822
- name: "Taiwan, Province of China",
2823
- code: "TW",
2824
- timeZone: "Asia/Taipei",
2825
- phoneNumberExtension: "886"
2826
- },
2827
- {
2828
- name: "Tajikistan",
2829
- code: "TJ",
2830
- timeZone: "Asia/Dushanbe",
2831
- phoneNumberExtension: "992"
2832
- },
2833
- {
2834
- name: "Tanzania, United Republic of",
2835
- code: "TZ",
2836
- timeZone: "Africa/Dar_es_Salaam",
2837
- phoneNumberExtension: "255"
2838
- },
2839
- {
2840
- name: "Thailand",
2841
- code: "TH",
2842
- timeZone: "Asia/Bangkok",
2843
- phoneNumberExtension: "66"
2844
- },
2845
- {
2846
- name: "Timor-Leste",
2847
- code: "TL",
2848
- timeZone: "Asia/Dili",
2849
- phoneNumberExtension: "670"
2850
- },
2851
- {
2852
- name: "Togo",
2853
- code: "TG",
2854
- timeZone: "Africa/Lome",
2855
- phoneNumberExtension: "228"
2856
- },
2857
- {
2858
- name: "Tokelau",
2859
- code: "TK",
2860
- timeZone: "Pacific/Fakaofo",
2861
- phoneNumberExtension: "690"
2862
- },
2863
- {
2864
- name: "Tonga",
2865
- code: "TO",
2866
- timeZone: "Pacific/Tongatapu",
2867
- phoneNumberExtension: "676"
2868
- },
2869
- {
2870
- name: "Trinidad and Tobago",
2871
- code: "TT",
2872
- timeZone: "America/Port_of_Spain",
2873
- phoneNumberExtension: "1",
2874
- phoneNumberFormat: "(XXX)XXX-XXXX"
2875
- },
2876
- {
2877
- name: "Tunisia",
2878
- code: "TN",
2879
- timeZone: "Africa/Tunis",
2880
- phoneNumberExtension: "216"
2881
- },
2882
- {
2883
- name: "Turkey",
2884
- code: "TR",
2885
- timeZone: "Europe/Istanbul",
2886
- phoneNumberExtension: "90"
2887
- },
2888
- {
2889
- name: "Turkmenistan",
2890
- code: "TM",
2891
- timeZone: "Asia/Ashgabat",
2892
- phoneNumberExtension: "993"
2893
- },
2894
- {
2895
- name: "Turks and Caicos Islands",
2896
- code: "TC",
2897
- timeZone: "America/Grand_Turk",
2898
- phoneNumberExtension: "1",
2899
- phoneNumberFormat: "(XXX)XXX-XXXX"
2900
- },
2901
- {
2902
- name: "Tuvalu",
2903
- code: "TV",
2904
- timeZone: "Pacific/Funafuti",
2905
- phoneNumberExtension: "688"
2906
- },
2907
- {
2908
- name: "Uganda",
2909
- code: "UG",
2910
- timeZone: "Africa/Kampala",
2911
- phoneNumberExtension: "256"
2912
- },
2913
- {
2914
- name: "Ukraine",
2915
- code: "UA",
2916
- timeZone: "Europe/Kiev",
2917
- phoneNumberExtension: "380"
2918
- },
2919
- {
2920
- name: "United Arab Emirates",
2921
- code: "AE",
2922
- timeZone: "Asia/Dubai",
2923
- phoneNumberExtension: "971"
2924
- },
2925
- {
2926
- name: "United States Minor Outlying Islands",
2927
- code: "UM",
2928
- timeZone: "Pacific/Midway",
2929
- phoneNumberExtension: "1",
2930
- phoneNumberFormat: "(XXX)XXX-XXXX"
2931
- },
2932
- {
2933
- name: "Uruguay",
2934
- code: "UY",
2935
- timeZone: "America/Montevideo",
2936
- phoneNumberExtension: "598"
2937
- },
2938
- {
2939
- name: "Uzbekistan",
2940
- code: "UZ",
2941
- timeZone: "Asia/Tashkent",
2942
- phoneNumberExtension: "998"
2943
- },
2944
- {
2945
- name: "Vanuatu",
2946
- code: "VU",
2947
- timeZone: "Pacific/Efate",
2948
- phoneNumberExtension: "678"
2949
- },
2950
- {
2951
- name: "Venezuela",
2952
- code: "VE",
2953
- timeZone: "America/Caracas",
2954
- phoneNumberExtension: "58"
2955
- },
2956
- {
2957
- name: "Viet Nam",
2958
- code: "VN",
2959
- timeZone: "Asia/Ho_Chi_Minh",
2960
- phoneNumberExtension: "84"
2961
- },
2962
- {
2963
- name: "Virgin Islands, British",
2964
- code: "VG",
2965
- timeZone: "America/Tortola",
2966
- phoneNumberExtension: "1",
2967
- phoneNumberFormat: "(XXX)XXX-XXXX"
2968
- },
2969
- {
2970
- name: "Virgin Islands, U.S.",
2971
- code: "VI",
2972
- timeZone: "America/St_Thomas",
2973
- phoneNumberExtension: "1",
2974
- phoneNumberFormat: "(XXX)XXX-XXXX"
2975
- },
2976
- {
2977
- name: "Wallis and Futuna",
2978
- code: "WF",
2979
- timeZone: "Pacific/Wallis",
2980
- phoneNumberExtension: "681"
2981
- },
2982
- {
2983
- name: "Western Sahara",
2984
- code: "EH",
2985
- timeZone: "Africa/El_Aaiun",
2986
- phoneNumberExtension: "212"
2987
- },
2988
- {
2989
- name: "Yemen",
2990
- code: "YE",
2991
- timeZone: "Asia/Aden",
2992
- phoneNumberExtension: "967"
2993
- },
2994
- {
2995
- name: "Zambia",
2996
- code: "ZM",
2997
- timeZone: "Africa/Lusaka",
2998
- phoneNumberExtension: "260"
2999
- },
3000
- {
3001
- name: "Zimbabwe",
3002
- code: "ZW",
3003
- timeZone: "Africa/Harare",
3004
- phoneNumberExtension: "263"
3005
- }
3006
- ];
3007
-
3008
- // src/utils/variableFunctions.ts
3009
- var checkBetterHtmlContextValue = (value, functionsName) => {
3010
- if (value === void 0) {
3011
- throw new Error(
3012
- `\`${functionsName}()\` must be used within a \`<BetterHtmlProvider>\`. Make sure to add one at the root of your component tree.`
3013
- );
3014
- }
3015
- return value !== void 0;
3016
- };
3017
- var loaderControls = {
3018
- startLoading: (loaderName) => {
3019
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "loaderControls.startLoading")) return;
3020
- externalBetterHtmlContextValue.setLoaders((oldValue) => ({
3021
- ...oldValue,
3022
- [loaderName.toString()]: true
3023
- }));
3024
- },
3025
- stopLoading: (loaderName) => {
3026
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "loaderControls.stopLoading")) return;
3027
- externalBetterHtmlContextValue.setLoaders((oldValue) => ({
3028
- ...oldValue,
3029
- [loaderName.toString()]: false
3030
- }));
3031
- }
3032
- };
3033
- var alertControls = {
3034
- createAlert: (alert) => {
3035
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.createAlert"))
3036
- return void 0;
3037
- const readyAlert = {
3038
- id: crypto.randomUUID(),
3039
- ...alert
3040
- };
3041
- externalBetterHtmlContextValue.setAlerts((oldValue) => [...oldValue, readyAlert]);
3042
- return readyAlert;
3043
- },
3044
- removeAlert: (alertId) => {
3045
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.removeAlert")) return;
3046
- externalBetterHtmlContextValue.setAlerts((oldValue) => oldValue.filter((alert) => alert.id !== alertId));
3047
- }
3048
- };
3049
- var colorThemeControls = {
3050
- toggleTheme: (theme2) => {
3051
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "colorThemeControls.toggleTheme")) return;
3052
- const currentColorTheme = externalBetterHtmlContextValue.colorTheme;
3053
- const newColorTheme = theme2 ?? (currentColorTheme === "dark" ? "light" : "dark");
3054
- setTimeout(() => {
3055
- window.document.body.parentElement?.setAttribute("data-theme", newColorTheme);
3056
- LocalStorage.setItem("theme", newColorTheme);
3057
- }, 0.01 * 1e3);
3058
- }
3059
- };
3060
- var filterHover = () => {
3061
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "filterHover")) return void 0;
3062
- return {
3063
- z05: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.95)",
3064
- z1: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.3)" : "brightness(0.9)",
3065
- z2: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.6)" : "brightness(0.8)",
3066
- z3: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.9)" : "brightness(0.7)"
3067
- };
3068
- };
3069
-
3070
- // src/utils/functions.ts
3071
- var generateRandomString = (stringLength, options) => {
3072
- const capitals = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
3073
- const lowers = "abcdefghijklmnopqrstuvwxyz";
3074
- const numbers = "0123456789";
3075
- const includes = [];
3076
- if (options?.includeCapitalLetters !== false) includes.push(capitals);
3077
- if (options?.includeLowerLetters !== false) includes.push(lowers);
3078
- if (options?.includeNumbers !== false) includes.push(numbers);
3079
- const characters = includes.join("");
3080
- const dashSections = Math.max(1, options?.dashSections ?? 1);
3081
- const dashSectionLength = Math.floor(stringLength / dashSections);
3082
- if (stringLength < dashSections) return "";
3083
- let result = "";
3084
- let currentSectionLength = 0;
3085
- while (result.length < stringLength) {
3086
- if (currentSectionLength >= dashSectionLength) {
3087
- result += "-";
3088
- currentSectionLength = 0;
3089
- }
3090
- if (result.length < stringLength) {
3091
- result += characters.charAt(Math.floor(Math.random() * characters.length));
3092
- currentSectionLength += 1;
3093
- }
3094
- }
3095
- return result;
3096
- };
3097
- var getBrowser = () => {
3098
- const userAgent = navigator.userAgent.toLowerCase();
3099
- if (userAgent.includes("firefox")) return "firefox";
3100
- if (userAgent.includes("chrome") && !userAgent.includes("edg")) return "chrome";
3101
- if (userAgent.includes("safari") && !userAgent.includes("chrome")) return "safari";
3102
- if (userAgent.includes("edg")) return "edge";
3103
- if (userAgent.includes("opr") || userAgent.includes("opera")) return "opera";
3104
- return;
3105
- };
3106
- var formatPhoneNumber = (phoneNumber) => {
3107
- const cleanPhoneNumber = phoneNumber.replace(/\D/g, "");
3108
- const country = countries.find(
3109
- (country2) => country2.phoneNumberExtension === cleanPhoneNumber.slice(0, country2.phoneNumberExtension.length)
3110
- );
3111
- if (!country) return phoneNumber;
3112
- let phonNumberRest = cleanPhoneNumber.slice(country.phoneNumberExtension.length);
3113
- if (country.phoneNumberFormat) {
3114
- let formattedNumber = "";
3115
- let index = 0;
3116
- for (const char of country.phoneNumberFormat) {
3117
- if (char === "X" && index < phonNumberRest.length) {
3118
- formattedNumber += phonNumberRest[index];
3119
- index++;
3120
- } else {
3121
- formattedNumber += char;
3122
- }
3123
- }
3124
- phonNumberRest = formattedNumber.replace(/X/g, "").trim();
3125
- }
3126
- return `+${country.phoneNumberExtension} ${phonNumberRest}`;
3127
- };
3128
- var getFormErrorObject = (formValues) => {
3129
- return {};
3130
- };
3131
- var eventPreventDefault = (event) => {
3132
- event.preventDefault();
3133
- };
3134
- var eventStopPropagation = (event) => {
3135
- event.stopPropagation();
3136
- };
3137
- var eventPreventStop = (event) => {
3138
- event.preventDefault();
3139
- event.stopPropagation();
3140
- };
3141
- var encryptString = (text) => {
3142
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "encryptString")) return void 0;
3143
- const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find((plugin) => plugin.name === "localStorage");
3144
- if (!localStoragePlugin2) {
3145
- throw new Error(
3146
- "`encryptString` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
3147
- );
3148
- }
3149
- const pluginConfig = localStoragePlugin2.getConfig();
3150
- if (!pluginConfig.encryption?.enabled) return text;
3151
- const encrypted = CryptoJS.AES.encrypt(text, CryptoJS.enc.Hex.parse(pluginConfig.encryption.secretKey), {
3152
- iv: CryptoJS.enc.Hex.parse(pluginConfig.encryption.iv),
3153
- mode: CryptoJS.mode.CBC,
3154
- padding: CryptoJS.pad.Pkcs7
3155
- }).toString();
3156
- return encrypted;
3157
- };
3158
- var decryptString = (text) => {
3159
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "decryptString")) return void 0;
3160
- const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find((plugin) => plugin.name === "localStorage");
3161
- if (!localStoragePlugin2) {
3162
- throw new Error(
3163
- "`decryptString` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
3164
- );
3165
- }
3166
- const pluginConfig = localStoragePlugin2.getConfig();
3167
- if (!pluginConfig.encryption?.enabled) return text;
3168
- const decrypted = CryptoJS.AES.decrypt(text, CryptoJS.enc.Hex.parse(pluginConfig.encryption.secretKey), {
3169
- iv: CryptoJS.enc.Hex.parse(pluginConfig.encryption.iv),
3170
- mode: CryptoJS.mode.CBC,
3171
- padding: CryptoJS.pad.Pkcs7
3172
- });
3173
- return decrypted.toString(CryptoJS.enc.Utf8);
3174
- };
3175
-
3176
- // src/utils/localStorage.ts
3177
- function generateLocalStorage() {
3178
- return {
3179
- setItem: (name, value) => {
3180
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "generateLocalStorage"))
3181
- return void 0;
3182
- const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find(
3183
- (plugin) => plugin.name === "localStorage"
3184
- );
3185
- if (!localStoragePlugin2) {
3186
- throw new Error(
3187
- "`generateLocalStorage` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
3188
- );
3189
- }
3190
- const pluginConfig = localStoragePlugin2.getConfig();
3191
- const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
3192
- const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
3193
- const readyValue = encryptionEnabled ? encryptString(JSON.stringify(value)) : JSON.stringify(value);
3194
- if (value) localStorage.setItem(readyName.toString(), readyValue);
3195
- else localStorage.removeItem(readyName.toString());
3196
- },
3197
- getItem: (name) => {
3198
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "generateLocalStorage"))
3199
- return void 0;
3200
- const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find(
3201
- (plugin) => plugin.name === "localStorage"
3202
- );
3203
- if (!localStoragePlugin2) {
3204
- throw new Error(
3205
- "`generateLocalStorage` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
3206
- );
3207
- }
3208
- const pluginConfig = localStoragePlugin2.getConfig();
3209
- const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
3210
- const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
3211
- const item = localStorage.getItem(readyName.toString());
3212
- if (item === null) return void 0;
3213
- try {
3214
- return encryptionEnabled ? JSON.parse(decryptString(item)) : JSON.parse(item);
3215
- } catch (error) {
3216
- return void 0;
3217
- }
3218
- },
3219
- removeItem: (name) => {
3220
- if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "generateLocalStorage"))
3221
- return void 0;
3222
- const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find(
3223
- (plugin) => plugin.name === "localStorage"
3224
- );
3225
- if (!localStoragePlugin2) {
3226
- throw new Error(
3227
- "`generateLocalStorage` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
3228
- );
3229
- }
3230
- const pluginConfig = localStoragePlugin2.getConfig();
3231
- const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
3232
- const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
3233
- localStorage.removeItem(readyName.toString());
3234
- },
3235
- removeAllItems: () => {
3236
- localStorage.clear();
3237
- }
3238
- };
3239
- }
3240
- var LocalStorage = generateLocalStorage();
3241
-
3242
- // src/components/alerts/AlertsHolder.tsx
3243
- import { memo as memo7 } from "react";
3244
-
3245
- // src/components/alerts/Alert.tsx
3246
- import { memo as memo6, useCallback as useCallback2, useEffect as useEffect3, useMemo, useRef, useState } from "react";
3247
- import styled6 from "styled-components";
3248
-
3249
- // src/plugins/alerts.ts
3250
- var defaultAlertsPluginOptions = {
3251
- position: "bottom",
3252
- align: "right",
3253
- defaultDuration: "auto",
3254
- maxWidth: 460,
3255
- withLoaderBar: true,
3256
- withCloseButton: true
3257
- };
3258
- var alertsPlugin = (options) => ({
3259
- name: "alerts",
3260
- initialize: () => {
3261
- console.log("alerts plugin initialized");
3262
- },
3263
- getConfig: () => ({
3264
- ...defaultAlertsPluginOptions,
3265
- ...options
3266
- })
3267
- });
3268
-
3269
- // src/plugins/reactRouterDom.ts
3270
- var defaultReactRouterDomPluginOptions = {};
3271
- var reactRouterDomPlugin = (options) => ({
3272
- name: "react-router-dom",
3273
- initialize: () => {
3274
- console.log("react-router-dom plugin initialized");
3275
- },
3276
- getConfig: () => ({
3277
- ...defaultReactRouterDomPluginOptions,
3278
- ...options
3279
- })
3280
- });
3281
-
3282
- // src/plugins/localStorage.ts
3283
- var defaultLocalStoragePluginOptions = {
3284
- encryption: {}
3285
- };
3286
- var localStoragePlugin = (options) => ({
3287
- name: "localStorage",
3288
- initialize: () => {
3289
- console.log("localStorage plugin initialized");
1556
+ getConfig: () => ({
1557
+ ...defaultReactRouterDomPluginOptions,
1558
+ ...options
1559
+ })
1560
+ });
1561
+
1562
+ // src/plugins/localStorage.ts
1563
+ var defaultLocalStoragePluginOptions = {
1564
+ encryption: {}
1565
+ };
1566
+ var localStoragePlugin = (options) => ({
1567
+ name: "localStorage",
1568
+ initialize: () => {
1569
+ console.log("localStorage plugin initialized");
3290
1570
  },
3291
1571
  getConfig: () => ({
3292
1572
  ...defaultLocalStoragePluginOptions,
@@ -4250,7 +2530,7 @@ function BetterHtmlProviderContent({ children }) {
4250
2530
  }
4251
2531
  function BetterHtmlProvider({ value, plugins: pluginsToUse, children }) {
4252
2532
  const [colorTheme, setColorTheme] = useState2(
4253
- LocalStorage.getItem("theme") === "dark" ? "dark" : value?.colorTheme ?? "light"
2533
+ localStorage.getItem("theme") === "dark" ? "dark" : value?.colorTheme ?? "light"
4254
2534
  );
4255
2535
  const [loaders, setLoaders] = useState2(value?.loaders ?? {});
4256
2536
  const [plugins] = useState2(pluginsToUse ?? []);
@@ -5262,413 +3542,2067 @@ var ModalComponent = forwardRef7(function Modal({
5262
3542
  children: isOpenedLate ? /* @__PURE__ */ jsx12(
5263
3543
  Div_default.column,
5264
3544
  {
5265
- position: "relative",
5266
- width: "100%",
5267
- maxWidth: maxWidth ?? app.contentMaxWidth / 1.3,
5268
- minHeight: `calc(100% - ${theme2.styles.space * 2}px)`,
5269
- alignItems: "center",
5270
- justifyContent: "center",
3545
+ position: "relative",
3546
+ width: "100%",
3547
+ maxWidth: maxWidth ?? app.contentMaxWidth / 1.3,
3548
+ minHeight: `calc(100% - ${theme2.styles.space * 2}px)`,
3549
+ alignItems: "center",
3550
+ justifyContent: "center",
3551
+ marginBlock: theme2.styles.space,
3552
+ marginInline: "auto",
3553
+ transform: `translateY(${theme2.styles.space}px)`,
3554
+ transition: theme2.styles.transition,
3555
+ animation: isOpened ? "fadeInAnimation 0.2s ease forwards" : "fadeOutAnimation 0.2s ease forwards",
3556
+ children: /* @__PURE__ */ jsxs8(
3557
+ Div_default,
3558
+ {
3559
+ position: "relative",
3560
+ width: "100%",
3561
+ minHeight: 32 + theme2.styles.space * 2,
3562
+ backgroundColor: theme2.colors.backgroundBase,
3563
+ borderRadius: theme2.styles.borderRadius * 2,
3564
+ padding: !title ? theme2.styles.space : void 0,
3565
+ overflow,
3566
+ children: [
3567
+ title ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
3568
+ /* @__PURE__ */ jsxs8(
3569
+ Div_default.row,
3570
+ {
3571
+ alignItems: "center",
3572
+ gap: theme2.styles.gap,
3573
+ backgroundColor: headerBackgroundColor,
3574
+ borderTopLeftRadius: theme2.styles.borderRadius * 2 - 1,
3575
+ borderTopRightRadius: theme2.styles.borderRadius * 2 - 1,
3576
+ paddingInline: theme2.styles.space,
3577
+ paddingBlock: theme2.styles.space,
3578
+ transition: theme2.styles.transition,
3579
+ children: [
3580
+ /* @__PURE__ */ jsxs8(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
3581
+ /* @__PURE__ */ jsx12(
3582
+ Text_default,
3583
+ {
3584
+ as: "h1",
3585
+ color: titleColor ?? theme2.colors.textPrimary,
3586
+ transition: theme2.styles.transition,
3587
+ children: title
3588
+ }
3589
+ ),
3590
+ description && /* @__PURE__ */ jsx12(
3591
+ Text_default,
3592
+ {
3593
+ color: descriptionColor ?? theme2.colors.textSecondary,
3594
+ transition: theme2.styles.transition,
3595
+ children: description
3596
+ }
3597
+ )
3598
+ ] }),
3599
+ !withoutCloseButton && /* @__PURE__ */ jsx12(
3600
+ Button_default.icon,
3601
+ {
3602
+ icon: "XMark",
3603
+ marginTop: 1,
3604
+ iconColor: titleColor,
3605
+ onClick: onClickClose,
3606
+ transition: theme2.styles.transition
3607
+ }
3608
+ )
3609
+ ]
3610
+ }
3611
+ ),
3612
+ /* @__PURE__ */ jsx12(Divider_default.horizontal, {})
3613
+ ] }) : /* @__PURE__ */ jsx12(Fragment2, { children: !withoutCloseButton && /* @__PURE__ */ jsx12(Div_default, { position: "absolute", top: theme2.styles.space, right: theme2.styles.space, children: /* @__PURE__ */ jsx12(Button_default.icon, { icon: "XMark", onClick: onClickClose }) }) }),
3614
+ /* @__PURE__ */ jsx12(Div_default, { padding: title ? theme2.styles.space : void 0, children })
3615
+ ]
3616
+ }
3617
+ )
3618
+ }
3619
+ ) : void 0
3620
+ }
3621
+ ),
3622
+ document.body
3623
+ );
3624
+ });
3625
+ ModalComponent.confirmation = forwardRef7(function Confirmation({ message, continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
3626
+ const theme2 = useTheme();
3627
+ const modalRef = useRef3(null);
3628
+ const onCancelElement = useCallback6(() => {
3629
+ onCancel?.();
3630
+ modalRef.current?.close();
3631
+ }, [onCancel]);
3632
+ const onContinueElement = useCallback6(() => {
3633
+ onContinue?.();
3634
+ modalRef.current?.close();
3635
+ }, [onContinue]);
3636
+ useImperativeHandle(ref, () => modalRef.current, []);
3637
+ return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
3638
+ /* @__PURE__ */ jsx12(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue? This action may be irreversible." }),
3639
+ /* @__PURE__ */ jsxs8(
3640
+ Div_default.row,
3641
+ {
3642
+ alignItems: "center",
3643
+ justifyContent: "flex-end",
3644
+ gap: theme2.styles.gap,
3645
+ marginTop: theme2.styles.space * 2,
3646
+ children: [
3647
+ /* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
3648
+ /* @__PURE__ */ jsx12(Button_default, { text: "Continue", loaderName: continueButtonLoaderName, onClick: onContinueElement })
3649
+ ]
3650
+ }
3651
+ )
3652
+ ] });
3653
+ });
3654
+ ModalComponent.destructive = forwardRef7(function Destructive2({ message, deleteButtonLoaderName, onDelete, onCancel, ...props }, ref) {
3655
+ const theme2 = useTheme();
3656
+ const modalRef = useRef3(null);
3657
+ const onCancelElement = useCallback6(() => {
3658
+ onCancel?.();
3659
+ modalRef.current?.close();
3660
+ }, [onCancel]);
3661
+ const onDeleteElement = useCallback6(() => {
3662
+ onDelete?.();
3663
+ modalRef.current?.close();
3664
+ }, [onDelete]);
3665
+ useImperativeHandle(ref, () => modalRef.current, []);
3666
+ return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
3667
+ /* @__PURE__ */ jsx12(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue with the deleting of the item? This action may be irreversible." }),
3668
+ /* @__PURE__ */ jsxs8(
3669
+ Div_default.row,
3670
+ {
3671
+ alignItems: "center",
3672
+ justifyContent: "flex-end",
3673
+ gap: theme2.styles.gap,
3674
+ marginTop: theme2.styles.space * 2,
3675
+ children: [
3676
+ /* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
3677
+ /* @__PURE__ */ jsx12(
3678
+ Button_default.destructive,
3679
+ {
3680
+ icon: "trash",
3681
+ text: "Delete",
3682
+ loaderName: deleteButtonLoaderName,
3683
+ onClick: onDeleteElement
3684
+ }
3685
+ )
3686
+ ]
3687
+ }
3688
+ )
3689
+ ] });
3690
+ });
3691
+ var Modal2 = memo12(ModalComponent);
3692
+ Modal2.confirmation = ModalComponent.confirmation;
3693
+ Modal2.destructive = ModalComponent.destructive;
3694
+ var Modal_default = Modal2;
3695
+
3696
+ // src/components/PageHolder.tsx
3697
+ import { forwardRef as forwardRef8, memo as memo13 } from "react";
3698
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
3699
+ var PageHolderComponent = forwardRef8(function PageHolder({ noMaxContentWidth, children, ...props }, ref) {
3700
+ const theme2 = useTheme();
3701
+ const { app } = useBetterHtmlContextInternal();
3702
+ return /* @__PURE__ */ jsx13(
3703
+ Div_default,
3704
+ {
3705
+ as: "main",
3706
+ width: "100%",
3707
+ maxWidth: !noMaxContentWidth ? app.contentMaxWidth : void 0,
3708
+ margin: "0px auto",
3709
+ padding: theme2.styles.space,
3710
+ ...props,
3711
+ ref,
3712
+ children
3713
+ }
3714
+ );
3715
+ });
3716
+ PageHolderComponent.center = forwardRef8(function Center({
3717
+ pageBackgroundColor,
3718
+ pageBackgroundImage,
3719
+ contentMaxWidth,
3720
+ behindComponent,
3721
+ sideComponent,
3722
+ sideComponentPosition = "right",
3723
+ noMaxContentWidth,
3724
+ children,
3725
+ ...props
3726
+ }, ref) {
3727
+ const theme2 = useTheme();
3728
+ const mediaQuery = useMediaQuery();
3729
+ const { app } = useBetterHtmlContextInternal();
3730
+ const breakingPoint = mediaQuery.size1000;
3731
+ const withSideComponent = sideComponent && !breakingPoint;
3732
+ return /* @__PURE__ */ jsxs9(
3733
+ Div_default.row,
3734
+ {
3735
+ position: "relative",
3736
+ width: "100%",
3737
+ minHeight: "100svh",
3738
+ alignItems: "center",
3739
+ justifyContent: "center",
3740
+ backgroundColor: pageBackgroundColor,
3741
+ backgroundImage: pageBackgroundImage,
3742
+ children: [
3743
+ behindComponent && /* @__PURE__ */ jsx13(
3744
+ Div_default,
3745
+ {
3746
+ position: "fixed",
3747
+ width: `${withSideComponent ? 50 : 100}%`,
3748
+ height: "100svh",
3749
+ top: 0,
3750
+ left: sideComponentPosition === "right" ? 0 : "auto",
3751
+ right: sideComponentPosition === "left" ? 0 : "auto",
3752
+ zIndex: 1,
3753
+ children: behindComponent
3754
+ }
3755
+ ),
3756
+ sideComponentPosition === "left" && withSideComponent && /* @__PURE__ */ jsx13(Div_default, { width: "50%" }),
3757
+ /* @__PURE__ */ jsx13(Div_default.column, { position: "relative", width: `${withSideComponent ? 50 : 100}%`, alignItems: "center", zIndex: 2, children: /* @__PURE__ */ jsx13(
3758
+ Div_default.box,
3759
+ {
3760
+ width: `calc(100% - ${theme2.styles.space * 2}px)`,
3761
+ maxWidth: !noMaxContentWidth ? contentMaxWidth ?? app.contentMaxWidth / 2 : void 0,
3762
+ marginInline: theme2.styles.space,
5271
3763
  marginBlock: theme2.styles.space,
5272
- marginInline: "auto",
5273
- transform: `translateY(${theme2.styles.space}px)`,
5274
- transition: theme2.styles.transition,
5275
- animation: isOpened ? "fadeInAnimation 0.2s ease forwards" : "fadeOutAnimation 0.2s ease forwards",
5276
- children: /* @__PURE__ */ jsxs8(
5277
- Div_default,
5278
- {
5279
- position: "relative",
5280
- width: "100%",
5281
- minHeight: 32 + theme2.styles.space * 2,
5282
- backgroundColor: theme2.colors.backgroundBase,
5283
- borderRadius: theme2.styles.borderRadius * 2,
5284
- padding: !title ? theme2.styles.space : void 0,
5285
- overflow,
5286
- children: [
5287
- title ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
5288
- /* @__PURE__ */ jsxs8(
5289
- Div_default.row,
5290
- {
5291
- alignItems: "center",
5292
- gap: theme2.styles.gap,
5293
- backgroundColor: headerBackgroundColor,
5294
- borderTopLeftRadius: theme2.styles.borderRadius * 2 - 1,
5295
- borderTopRightRadius: theme2.styles.borderRadius * 2 - 1,
5296
- paddingInline: theme2.styles.space,
5297
- paddingBlock: theme2.styles.space,
5298
- transition: theme2.styles.transition,
5299
- children: [
5300
- /* @__PURE__ */ jsxs8(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
5301
- /* @__PURE__ */ jsx12(
5302
- Text_default,
5303
- {
5304
- as: "h1",
5305
- color: titleColor ?? theme2.colors.textPrimary,
5306
- transition: theme2.styles.transition,
5307
- children: title
5308
- }
5309
- ),
5310
- description && /* @__PURE__ */ jsx12(
5311
- Text_default,
5312
- {
5313
- color: descriptionColor ?? theme2.colors.textSecondary,
5314
- transition: theme2.styles.transition,
5315
- children: description
5316
- }
5317
- )
5318
- ] }),
5319
- !withoutCloseButton && /* @__PURE__ */ jsx12(
5320
- Button_default.icon,
5321
- {
5322
- icon: "XMark",
5323
- marginTop: 1,
5324
- iconColor: titleColor,
5325
- onClick: onClickClose,
5326
- transition: theme2.styles.transition
5327
- }
5328
- )
5329
- ]
5330
- }
5331
- ),
5332
- /* @__PURE__ */ jsx12(Divider_default.horizontal, {})
5333
- ] }) : /* @__PURE__ */ jsx12(Fragment2, { children: !withoutCloseButton && /* @__PURE__ */ jsx12(Div_default, { position: "absolute", top: theme2.styles.space, right: theme2.styles.space, children: /* @__PURE__ */ jsx12(Button_default.icon, { icon: "XMark", onClick: onClickClose }) }) }),
5334
- /* @__PURE__ */ jsx12(Div_default, { padding: title ? theme2.styles.space : void 0, children })
5335
- ]
5336
- }
5337
- )
3764
+ ...props,
3765
+ ref,
3766
+ children
5338
3767
  }
5339
- ) : void 0
5340
- }
5341
- ),
5342
- document.body
3768
+ ) }),
3769
+ sideComponentPosition === "right" && withSideComponent && /* @__PURE__ */ jsx13(Div_default, { width: "50%" }),
3770
+ withSideComponent && /* @__PURE__ */ jsx13(
3771
+ Div_default,
3772
+ {
3773
+ position: "fixed",
3774
+ width: "50%",
3775
+ height: "100svh",
3776
+ top: 0,
3777
+ left: sideComponentPosition === "left" ? 0 : "auto",
3778
+ right: sideComponentPosition === "right" ? 0 : "auto",
3779
+ children: sideComponent
3780
+ }
3781
+ )
3782
+ ]
3783
+ }
5343
3784
  );
5344
3785
  });
5345
- ModalComponent.confirmation = forwardRef7(function Confirmation({ message, continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
3786
+ var PageHolder2 = memo13(PageHolderComponent);
3787
+ PageHolder2.center = PageHolderComponent.center;
3788
+ var PageHolder_default = PageHolder2;
3789
+
3790
+ // src/components/Chip.tsx
3791
+ import { forwardRef as forwardRef9, memo as memo14 } from "react";
3792
+
3793
+ // src/utils/colorManipulation.ts
3794
+ var rgbToHsl = (r, g, b) => {
3795
+ r /= 255;
3796
+ g /= 255;
3797
+ b /= 255;
3798
+ const max = Math.max(r, g, b);
3799
+ const min = Math.min(r, g, b);
3800
+ let h = 0;
3801
+ let s = 0;
3802
+ const l = (max + min) / 2;
3803
+ if (max !== min) {
3804
+ const d = max - min;
3805
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
3806
+ switch (max) {
3807
+ case r:
3808
+ h = (g - b) / d + (g < b ? 6 : 0);
3809
+ break;
3810
+ case g:
3811
+ h = (b - r) / d + 2;
3812
+ break;
3813
+ case b:
3814
+ h = (r - g) / d + 4;
3815
+ break;
3816
+ }
3817
+ h /= 6;
3818
+ }
3819
+ return [h, s, l];
3820
+ };
3821
+ var hslToRgb = (h, s, l) => {
3822
+ let r, g, b;
3823
+ if (s === 0) {
3824
+ r = g = b = l;
3825
+ } else {
3826
+ const hue2rgb = (p2, q2, t) => {
3827
+ if (t < 0) t += 1;
3828
+ if (t > 1) t -= 1;
3829
+ if (t < 1 / 6) return p2 + (q2 - p2) * 6 * t;
3830
+ if (t < 1 / 2) return q2;
3831
+ if (t < 2 / 3) return p2 + (q2 - p2) * (2 / 3 - t) * 6;
3832
+ return p2;
3833
+ };
3834
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
3835
+ const p = 2 * l - q;
3836
+ r = hue2rgb(p, q, h + 1 / 3);
3837
+ g = hue2rgb(p, q, h);
3838
+ b = hue2rgb(p, q, h - 1 / 3);
3839
+ }
3840
+ return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
3841
+ };
3842
+ var lightenColor = (hexColor, amount) => {
3843
+ let hex = hexColor.replace(/^#/, "");
3844
+ if (hex.length === 3) {
3845
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
3846
+ }
3847
+ const safeAmount = Math.max(0, Math.min(1, amount));
3848
+ const r = parseInt(hex.substring(0, 2), 16);
3849
+ const g = parseInt(hex.substring(2, 4), 16);
3850
+ const b = parseInt(hex.substring(4, 6), 16);
3851
+ const lightenComponent = (component) => {
3852
+ return Math.round(component + (255 - component) * safeAmount);
3853
+ };
3854
+ const rHex = lightenComponent(r).toString(16).padStart(2, "0");
3855
+ const gHex = lightenComponent(g).toString(16).padStart(2, "0");
3856
+ const bHex = lightenComponent(b).toString(16).padStart(2, "0");
3857
+ return `#${rHex}${gHex}${bHex}`;
3858
+ };
3859
+ var darkenColor = (hexColor, amount) => {
3860
+ let hex = hexColor.replace(/^#/, "");
3861
+ if (hex.length === 3) {
3862
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
3863
+ }
3864
+ const safeAmount = Math.max(0, Math.min(1, amount));
3865
+ const r = parseInt(hex.substring(0, 2), 16);
3866
+ const g = parseInt(hex.substring(2, 4), 16);
3867
+ const b = parseInt(hex.substring(4, 6), 16);
3868
+ const darkenComponent = (component) => {
3869
+ return Math.round(component * (1 - safeAmount));
3870
+ };
3871
+ const rHex = darkenComponent(r).toString(16).padStart(2, "0");
3872
+ const gHex = darkenComponent(g).toString(16).padStart(2, "0");
3873
+ const bHex = darkenComponent(b).toString(16).padStart(2, "0");
3874
+ return `#${rHex}${gHex}${bHex}`;
3875
+ };
3876
+ var saturateColor = (hexColor, amount) => {
3877
+ let hex = hexColor.replace(/^#/, "");
3878
+ if (hex.length === 3) {
3879
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
3880
+ }
3881
+ const safeAmount = Math.max(0, Math.min(1, amount));
3882
+ const r = parseInt(hex.substring(0, 2), 16);
3883
+ const g = parseInt(hex.substring(2, 4), 16);
3884
+ const b = parseInt(hex.substring(4, 6), 16);
3885
+ const [h, s, l] = rgbToHsl(r, g, b);
3886
+ const newSaturation = Math.min(1, s + safeAmount * (1 - s));
3887
+ const [newR, newG, newB] = hslToRgb(h, newSaturation, l);
3888
+ const rHex = Math.round(newR).toString(16).padStart(2, "0");
3889
+ const gHex = Math.round(newG).toString(16).padStart(2, "0");
3890
+ const bHex = Math.round(newB).toString(16).padStart(2, "0");
3891
+ return `#${rHex}${gHex}${bHex}`;
3892
+ };
3893
+ var desaturateColor = (hexColor, amount) => {
3894
+ let hex = hexColor.replace(/^#/, "");
3895
+ if (hex.length === 3) {
3896
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
3897
+ }
3898
+ const safeAmount = Math.max(0, Math.min(1, amount));
3899
+ const r = parseInt(hex.substring(0, 2), 16);
3900
+ const g = parseInt(hex.substring(2, 4), 16);
3901
+ const b = parseInt(hex.substring(4, 6), 16);
3902
+ const [h, s, l] = rgbToHsl(r, g, b);
3903
+ const newSaturation = Math.max(0, s * (1 - safeAmount));
3904
+ const [newR, newG, newB] = hslToRgb(h, newSaturation, l);
3905
+ const rHex = Math.round(newR).toString(16).padStart(2, "0");
3906
+ const gHex = Math.round(newG).toString(16).padStart(2, "0");
3907
+ const bHex = Math.round(newB).toString(16).padStart(2, "0");
3908
+ return `#${rHex}${gHex}${bHex}`;
3909
+ };
3910
+
3911
+ // src/components/Chip.tsx
3912
+ import { jsx as jsx14 } from "react/jsx-runtime";
3913
+ var ChipComponent = forwardRef9(function Chip({ text, color, backgroundColor, borderRadius, isCircle, ...props }, ref) {
5346
3914
  const theme2 = useTheme();
5347
- const modalRef = useRef3(null);
5348
- const onCancelElement = useCallback6(() => {
5349
- onCancel?.();
5350
- modalRef.current?.close();
5351
- }, [onCancel]);
5352
- const onContinueElement = useCallback6(() => {
5353
- onContinue?.();
5354
- modalRef.current?.close();
5355
- }, [onContinue]);
5356
- useImperativeHandle(ref, () => modalRef.current, []);
5357
- return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
5358
- /* @__PURE__ */ jsx12(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue? This action may be irreversible." }),
5359
- /* @__PURE__ */ jsxs8(
5360
- Div_default.row,
5361
- {
5362
- alignItems: "center",
5363
- justifyContent: "flex-end",
5364
- gap: theme2.styles.gap,
5365
- marginTop: theme2.styles.space * 2,
5366
- children: [
5367
- /* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
5368
- /* @__PURE__ */ jsx12(Button_default, { text: "Continue", loaderName: continueButtonLoaderName, onClick: onContinueElement })
5369
- ]
5370
- }
5371
- )
5372
- ] });
3915
+ return /* @__PURE__ */ jsx14(
3916
+ Div_default,
3917
+ {
3918
+ width: "fit-content",
3919
+ backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
3920
+ borderRadius: isCircle ? 999 : borderRadius ?? theme2.styles.borderRadius / 1.3,
3921
+ paddingBlock: theme2.styles.gap / 2,
3922
+ paddingInline: theme2.styles.space / 1.5,
3923
+ ...props,
3924
+ ref,
3925
+ children: /* @__PURE__ */ jsx14(Text_default, { color: color ?? theme2.colors.textPrimary, children: text })
3926
+ }
3927
+ );
5373
3928
  });
5374
- ModalComponent.destructive = forwardRef7(function Destructive2({ message, deleteButtonLoaderName, onDelete, onCancel, ...props }, ref) {
3929
+ ChipComponent.colored = forwardRef9(function Colored({ color, ...props }, ref) {
5375
3930
  const theme2 = useTheme();
5376
- const modalRef = useRef3(null);
5377
- const onCancelElement = useCallback6(() => {
5378
- onCancel?.();
5379
- modalRef.current?.close();
5380
- }, [onCancel]);
5381
- const onDeleteElement = useCallback6(() => {
5382
- onDelete?.();
5383
- modalRef.current?.close();
5384
- }, [onDelete]);
5385
- useImperativeHandle(ref, () => modalRef.current, []);
5386
- return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
5387
- /* @__PURE__ */ jsx12(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue with the deleting of the item? This action may be irreversible." }),
5388
- /* @__PURE__ */ jsxs8(
5389
- Div_default.row,
5390
- {
5391
- alignItems: "center",
5392
- justifyContent: "flex-end",
5393
- gap: theme2.styles.gap,
5394
- marginTop: theme2.styles.space * 2,
5395
- children: [
5396
- /* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
5397
- /* @__PURE__ */ jsx12(
5398
- Button_default.destructive,
5399
- {
5400
- icon: "trash",
5401
- text: "Delete",
5402
- loaderName: deleteButtonLoaderName,
5403
- onClick: onDeleteElement
5404
- }
5405
- )
5406
- ]
5407
- }
5408
- )
5409
- ] });
3931
+ const { colorTheme } = useBetterHtmlContextInternal();
3932
+ const readyColor = color ?? theme2.colors.textSecondary;
3933
+ return /* @__PURE__ */ jsx14(
3934
+ ChipComponent,
3935
+ {
3936
+ color: colorTheme === "light" ? darkenColor(readyColor, 0.7) : lightenColor(readyColor, 0.7),
3937
+ backgroundColor: readyColor + "40",
3938
+ border: `1px solid ${readyColor}`,
3939
+ ref,
3940
+ ...props
3941
+ }
3942
+ );
5410
3943
  });
5411
- var Modal2 = memo12(ModalComponent);
5412
- Modal2.confirmation = ModalComponent.confirmation;
5413
- Modal2.destructive = ModalComponent.destructive;
5414
- var Modal_default = Modal2;
3944
+ var Chip2 = memo14(ChipComponent);
3945
+ Chip2.colored = ChipComponent.colored;
3946
+ var Chip_default = Chip2;
3947
+
3948
+ // src/components/InputField.tsx
3949
+ import { forwardRef as forwardRef11, memo as memo18, useCallback as useCallback9, useState as useState7, useEffect as useEffect8, useMemo as useMemo6, useRef as useRef5, useId as useId2 } from "react";
3950
+ import styled10 from "styled-components";
3951
+
3952
+ // src/constants/countries.ts
3953
+ var countries = [
3954
+ {
3955
+ name: "Afghanistan",
3956
+ code: "AF",
3957
+ timeZone: "Asia/Kabul",
3958
+ phoneNumberExtension: "93"
3959
+ },
3960
+ {
3961
+ name: "\xC5land Islands",
3962
+ code: "AX",
3963
+ timeZone: "Europe/Mariehamn",
3964
+ phoneNumberExtension: "358"
3965
+ },
3966
+ {
3967
+ name: "Albania",
3968
+ code: "AL",
3969
+ timeZone: "Europe/Tirane",
3970
+ phoneNumberExtension: "355"
3971
+ },
3972
+ {
3973
+ name: "Algeria",
3974
+ code: "DZ",
3975
+ timeZone: "Africa/Algiers",
3976
+ phoneNumberExtension: "213"
3977
+ },
3978
+ {
3979
+ name: "United States of America",
3980
+ code: "US",
3981
+ timeZone: "America/New_York",
3982
+ phoneNumberExtension: "1",
3983
+ phoneNumberFormat: "(XXX)XXX-XXXX"
3984
+ },
3985
+ {
3986
+ name: "American Samoa",
3987
+ code: "AS",
3988
+ timeZone: "Pacific/Pago_Pago",
3989
+ phoneNumberExtension: "1",
3990
+ phoneNumberFormat: "(XXX)XXX-XXXX"
3991
+ },
3992
+ {
3993
+ name: "Andorra",
3994
+ code: "AD",
3995
+ timeZone: "Europe/Andorra",
3996
+ phoneNumberExtension: "376"
3997
+ },
3998
+ {
3999
+ name: "Angola",
4000
+ code: "AO",
4001
+ timeZone: "Africa/Luanda",
4002
+ phoneNumberExtension: "244"
4003
+ },
4004
+ {
4005
+ name: "Anguilla",
4006
+ code: "AI",
4007
+ timeZone: "America/Anguilla",
4008
+ phoneNumberExtension: "1",
4009
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4010
+ },
4011
+ {
4012
+ name: "Antarctica",
4013
+ code: "AQ",
4014
+ timeZone: "Antarctica/Casey",
4015
+ phoneNumberExtension: "672"
4016
+ },
4017
+ {
4018
+ name: "Antigua and Barbuda",
4019
+ code: "AG",
4020
+ timeZone: "America/Antigua",
4021
+ phoneNumberExtension: "1",
4022
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4023
+ },
4024
+ {
4025
+ name: "Argentina",
4026
+ code: "AR",
4027
+ timeZone: "America/Argentina/Buenos_Aires",
4028
+ phoneNumberExtension: "54"
4029
+ },
4030
+ {
4031
+ name: "Armenia",
4032
+ code: "AM",
4033
+ timeZone: "Asia/Yerevan",
4034
+ phoneNumberExtension: "374"
4035
+ },
4036
+ {
4037
+ name: "Aruba",
4038
+ code: "AW",
4039
+ timeZone: "America/Aruba",
4040
+ phoneNumberExtension: "297"
4041
+ },
4042
+ {
4043
+ name: "Australia",
4044
+ code: "AU",
4045
+ timeZone: "Australia/Sydney",
4046
+ phoneNumberExtension: "61"
4047
+ },
4048
+ {
4049
+ name: "Austria",
4050
+ code: "AT",
4051
+ timeZone: "Europe/Vienna",
4052
+ phoneNumberExtension: "43"
4053
+ },
4054
+ {
4055
+ name: "Azerbaijan",
4056
+ code: "AZ",
4057
+ timeZone: "Asia/Baku",
4058
+ phoneNumberExtension: "994"
4059
+ },
4060
+ {
4061
+ name: "Bahamas",
4062
+ code: "BS",
4063
+ timeZone: "America/Nassau",
4064
+ phoneNumberExtension: "1",
4065
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4066
+ },
4067
+ {
4068
+ name: "Bahrain",
4069
+ code: "BH",
4070
+ timeZone: "Asia/Bahrain",
4071
+ phoneNumberExtension: "973"
4072
+ },
4073
+ {
4074
+ name: "Bangladesh",
4075
+ code: "BD",
4076
+ timeZone: "Asia/Dhaka",
4077
+ phoneNumberExtension: "880"
4078
+ },
4079
+ {
4080
+ name: "Barbados",
4081
+ code: "BB",
4082
+ timeZone: "America/Barbados",
4083
+ phoneNumberExtension: "1",
4084
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4085
+ },
4086
+ {
4087
+ name: "Belarus",
4088
+ code: "BY",
4089
+ timeZone: "Europe/Minsk",
4090
+ phoneNumberExtension: "375"
4091
+ },
4092
+ {
4093
+ name: "Belgium",
4094
+ code: "BE",
4095
+ timeZone: "Europe/Brussels",
4096
+ phoneNumberExtension: "32"
4097
+ },
4098
+ {
4099
+ name: "Belize",
4100
+ code: "BZ",
4101
+ timeZone: "America/Belize",
4102
+ phoneNumberExtension: "501"
4103
+ },
4104
+ {
4105
+ name: "Benin",
4106
+ code: "BJ",
4107
+ timeZone: "Africa/Porto-Novo",
4108
+ phoneNumberExtension: "229"
4109
+ },
4110
+ {
4111
+ name: "Bermuda",
4112
+ code: "BM",
4113
+ timeZone: "Atlantic/Bermuda",
4114
+ phoneNumberExtension: "1",
4115
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4116
+ },
4117
+ {
4118
+ name: "Bhutan",
4119
+ code: "BT",
4120
+ timeZone: "Asia/Thimphu",
4121
+ phoneNumberExtension: "975"
4122
+ },
4123
+ {
4124
+ name: "Bolivia",
4125
+ code: "BO",
4126
+ timeZone: "America/La_Paz",
4127
+ phoneNumberExtension: "591"
4128
+ },
4129
+ {
4130
+ name: "Bosnia and Herzegovina",
4131
+ code: "BA",
4132
+ timeZone: "Europe/Sarajevo",
4133
+ phoneNumberExtension: "387"
4134
+ },
4135
+ {
4136
+ name: "Botswana",
4137
+ code: "BW",
4138
+ timeZone: "Africa/Gaborone",
4139
+ phoneNumberExtension: "267"
4140
+ },
4141
+ {
4142
+ name: "Bouvet Island",
4143
+ code: "BV",
4144
+ timeZone: "Europe/Oslo",
4145
+ phoneNumberExtension: "47"
4146
+ },
4147
+ {
4148
+ name: "Brazil",
4149
+ code: "BR",
4150
+ timeZone: "America/Sao_Paulo",
4151
+ phoneNumberExtension: "55"
4152
+ },
4153
+ {
4154
+ name: "British Indian Ocean Territory",
4155
+ code: "IO",
4156
+ timeZone: "Indian/Chagos",
4157
+ phoneNumberExtension: "246"
4158
+ },
4159
+ {
4160
+ name: "Brunei Darussalam",
4161
+ code: "BN",
4162
+ timeZone: "Asia/Brunei",
4163
+ phoneNumberExtension: "673"
4164
+ },
4165
+ {
4166
+ name: "Bulgaria",
4167
+ code: "BG",
4168
+ timeZone: "Europe/Sofia",
4169
+ phoneNumberExtension: "359",
4170
+ phoneNumberFormat: "XX XXX XXXX"
4171
+ },
4172
+ {
4173
+ name: "Burkina Faso",
4174
+ code: "BF",
4175
+ timeZone: "Africa/Ouagadougou",
4176
+ phoneNumberExtension: "226"
4177
+ },
4178
+ {
4179
+ name: "Burundi",
4180
+ code: "BI",
4181
+ timeZone: "Africa/Bujumbura",
4182
+ phoneNumberExtension: "257"
4183
+ },
4184
+ {
4185
+ name: "Cambodia",
4186
+ code: "KH",
4187
+ timeZone: "Asia/Phnom_Penh",
4188
+ phoneNumberExtension: "855"
4189
+ },
4190
+ {
4191
+ name: "Cameroon",
4192
+ code: "CM",
4193
+ timeZone: "Africa/Douala",
4194
+ phoneNumberExtension: "237"
4195
+ },
4196
+ {
4197
+ name: "Canada",
4198
+ code: "CA",
4199
+ timeZone: "America/Toronto",
4200
+ phoneNumberExtension: "1",
4201
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4202
+ },
4203
+ {
4204
+ name: "Cape Verde",
4205
+ code: "CV",
4206
+ timeZone: "Atlantic/Cape_Verde",
4207
+ phoneNumberExtension: "238"
4208
+ },
4209
+ {
4210
+ name: "Cayman Islands",
4211
+ code: "KY",
4212
+ timeZone: "America/Cayman",
4213
+ phoneNumberExtension: "1",
4214
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4215
+ },
4216
+ {
4217
+ name: "Central African Republic",
4218
+ code: "CF",
4219
+ timeZone: "Africa/Bangui",
4220
+ phoneNumberExtension: "236"
4221
+ },
4222
+ {
4223
+ name: "Chad",
4224
+ code: "TD",
4225
+ timeZone: "Africa/Ndjamena",
4226
+ phoneNumberExtension: "235"
4227
+ },
4228
+ {
4229
+ name: "Chile",
4230
+ code: "CL",
4231
+ timeZone: "America/Santiago",
4232
+ phoneNumberExtension: "56"
4233
+ },
4234
+ {
4235
+ name: "China",
4236
+ code: "CN",
4237
+ timeZone: "Asia/Shanghai",
4238
+ phoneNumberExtension: "86"
4239
+ },
4240
+ {
4241
+ name: "Christmas Island",
4242
+ code: "CX",
4243
+ timeZone: "Indian/Christmas",
4244
+ phoneNumberExtension: "61"
4245
+ },
4246
+ {
4247
+ name: "Cocos (Keeling) Islands",
4248
+ code: "CC",
4249
+ timeZone: "Indian/Cocos",
4250
+ phoneNumberExtension: "61"
4251
+ },
4252
+ {
4253
+ name: "Colombia",
4254
+ code: "CO",
4255
+ timeZone: "America/Bogota",
4256
+ phoneNumberExtension: "57"
4257
+ },
4258
+ {
4259
+ name: "Comoros",
4260
+ code: "KM",
4261
+ timeZone: "Indian/Comoro",
4262
+ phoneNumberExtension: "269"
4263
+ },
4264
+ {
4265
+ name: "Congo",
4266
+ code: "CG",
4267
+ timeZone: "Africa/Brazzaville",
4268
+ phoneNumberExtension: "242"
4269
+ },
4270
+ {
4271
+ name: "Congo, The Democratic Republic of the",
4272
+ code: "CD",
4273
+ timeZone: "Africa/Kinshasa",
4274
+ phoneNumberExtension: "243"
4275
+ },
4276
+ {
4277
+ name: "Cook Islands",
4278
+ code: "CK",
4279
+ timeZone: "Pacific/Rarotonga",
4280
+ phoneNumberExtension: "682"
4281
+ },
4282
+ {
4283
+ name: "Costa Rica",
4284
+ code: "CR",
4285
+ timeZone: "America/Costa_Rica",
4286
+ phoneNumberExtension: "506"
4287
+ },
4288
+ {
4289
+ name: "Cote D'Ivoire",
4290
+ code: "CI",
4291
+ timeZone: "Africa/Abidjan",
4292
+ phoneNumberExtension: "225"
4293
+ },
4294
+ {
4295
+ name: "Croatia",
4296
+ code: "HR",
4297
+ timeZone: "Europe/Zagreb",
4298
+ phoneNumberExtension: "385"
4299
+ },
4300
+ {
4301
+ name: "Cuba",
4302
+ code: "CU",
4303
+ timeZone: "America/Havana",
4304
+ phoneNumberExtension: "53"
4305
+ },
4306
+ {
4307
+ name: "Cyprus",
4308
+ code: "CY",
4309
+ timeZone: "Asia/Nicosia",
4310
+ phoneNumberExtension: "357"
4311
+ },
4312
+ {
4313
+ name: "Czech Republic",
4314
+ code: "CZ",
4315
+ timeZone: "Europe/Prague",
4316
+ phoneNumberExtension: "420"
4317
+ },
4318
+ {
4319
+ name: "Denmark",
4320
+ code: "DK",
4321
+ timeZone: "Europe/Copenhagen",
4322
+ phoneNumberExtension: "45"
4323
+ },
4324
+ {
4325
+ name: "Djibouti",
4326
+ code: "DJ",
4327
+ timeZone: "Africa/Djibouti",
4328
+ phoneNumberExtension: "253"
4329
+ },
4330
+ {
4331
+ name: "Dominica",
4332
+ code: "DM",
4333
+ timeZone: "America/Dominica",
4334
+ phoneNumberExtension: "1",
4335
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4336
+ },
4337
+ {
4338
+ name: "Dominican Republic",
4339
+ code: "DO",
4340
+ timeZone: "America/Santo_Domingo",
4341
+ phoneNumberExtension: "1",
4342
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4343
+ },
4344
+ {
4345
+ name: "Ecuador",
4346
+ code: "EC",
4347
+ timeZone: "America/Guayaquil",
4348
+ phoneNumberExtension: "593"
4349
+ },
4350
+ {
4351
+ name: "Egypt",
4352
+ code: "EG",
4353
+ timeZone: "Africa/Cairo",
4354
+ phoneNumberExtension: "20"
4355
+ },
4356
+ {
4357
+ name: "El Salvador",
4358
+ code: "SV",
4359
+ timeZone: "America/El_Salvador",
4360
+ phoneNumberExtension: "503"
4361
+ },
4362
+ {
4363
+ name: "Equatorial Guinea",
4364
+ code: "GQ",
4365
+ timeZone: "Africa/Malabo",
4366
+ phoneNumberExtension: "240"
4367
+ },
4368
+ {
4369
+ name: "Eritrea",
4370
+ code: "ER",
4371
+ timeZone: "Africa/Asmara",
4372
+ phoneNumberExtension: "291"
4373
+ },
4374
+ {
4375
+ name: "Estonia",
4376
+ code: "EE",
4377
+ timeZone: "Europe/Tallinn",
4378
+ phoneNumberExtension: "372"
4379
+ },
4380
+ {
4381
+ name: "Ethiopia",
4382
+ code: "ET",
4383
+ timeZone: "Africa/Addis_Ababa",
4384
+ phoneNumberExtension: "251"
4385
+ },
4386
+ {
4387
+ name: "Falkland Islands (Malvinas)",
4388
+ code: "FK",
4389
+ timeZone: "Atlantic/Stanley",
4390
+ phoneNumberExtension: "500"
4391
+ },
4392
+ {
4393
+ name: "Faroe Islands",
4394
+ code: "FO",
4395
+ timeZone: "Atlantic/Faroe",
4396
+ phoneNumberExtension: "298"
4397
+ },
4398
+ {
4399
+ name: "Fiji",
4400
+ code: "FJ",
4401
+ timeZone: "Pacific/Fiji",
4402
+ phoneNumberExtension: "679"
4403
+ },
4404
+ {
4405
+ name: "Finland",
4406
+ code: "FI",
4407
+ timeZone: "Europe/Helsinki",
4408
+ phoneNumberExtension: "358",
4409
+ phoneNumberFormat: "XX XXX XX XX"
4410
+ },
4411
+ {
4412
+ name: "France",
4413
+ code: "FR",
4414
+ timeZone: "Europe/Paris",
4415
+ phoneNumberExtension: "33",
4416
+ phoneNumberFormat: "X XX XX XX XX"
4417
+ },
4418
+ {
4419
+ name: "French Guiana",
4420
+ code: "GF",
4421
+ timeZone: "America/Cayenne",
4422
+ phoneNumberExtension: "594"
4423
+ },
4424
+ {
4425
+ name: "French Polynesia",
4426
+ code: "PF",
4427
+ timeZone: "Pacific/Tahiti",
4428
+ phoneNumberExtension: "689"
4429
+ },
4430
+ {
4431
+ name: "French Southern Territories",
4432
+ code: "TF",
4433
+ timeZone: "Indian/Kerguelen",
4434
+ phoneNumberExtension: "262"
4435
+ },
4436
+ {
4437
+ name: "Gabon",
4438
+ code: "GA",
4439
+ timeZone: "Africa/Libreville",
4440
+ phoneNumberExtension: "241"
4441
+ },
4442
+ {
4443
+ name: "Gambia",
4444
+ code: "GM",
4445
+ timeZone: "Africa/Banjul",
4446
+ phoneNumberExtension: "220"
4447
+ },
4448
+ {
4449
+ name: "Georgia",
4450
+ code: "GE",
4451
+ timeZone: "Asia/Tbilisi",
4452
+ phoneNumberExtension: "995"
4453
+ },
4454
+ {
4455
+ name: "Germany",
4456
+ code: "DE",
4457
+ timeZone: "Europe/Berlin",
4458
+ phoneNumberExtension: "49",
4459
+ phoneNumberFormat: "XXXX XXXXXXX"
4460
+ },
4461
+ {
4462
+ name: "Ghana",
4463
+ code: "GH",
4464
+ timeZone: "Africa/Accra",
4465
+ phoneNumberExtension: "233"
4466
+ },
4467
+ {
4468
+ name: "Gibraltar",
4469
+ code: "GI",
4470
+ timeZone: "Europe/Gibraltar",
4471
+ phoneNumberExtension: "350"
4472
+ },
4473
+ {
4474
+ name: "Greece",
4475
+ code: "GR",
4476
+ timeZone: "Europe/Athens",
4477
+ phoneNumberExtension: "30"
4478
+ },
4479
+ {
4480
+ name: "Greenland",
4481
+ code: "GL",
4482
+ timeZone: "America/Godthab",
4483
+ phoneNumberExtension: "299"
4484
+ },
4485
+ {
4486
+ name: "Grenada",
4487
+ code: "GD",
4488
+ timeZone: "America/Grenada",
4489
+ phoneNumberExtension: "1",
4490
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4491
+ },
4492
+ {
4493
+ name: "Guadeloupe",
4494
+ code: "GP",
4495
+ timeZone: "America/Guadeloupe",
4496
+ phoneNumberExtension: "590"
4497
+ },
4498
+ {
4499
+ name: "Guam",
4500
+ code: "GU",
4501
+ timeZone: "Pacific/Guam",
4502
+ phoneNumberExtension: "1",
4503
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4504
+ },
4505
+ {
4506
+ name: "Guatemala",
4507
+ code: "GT",
4508
+ timeZone: "America/Guatemala",
4509
+ phoneNumberExtension: "502"
4510
+ },
4511
+ {
4512
+ name: "United Kingdom",
4513
+ code: "GB",
4514
+ timeZone: "Europe/London",
4515
+ phoneNumberExtension: "44",
4516
+ phoneNumberFormat: "XX XXXX XXXX"
4517
+ },
4518
+ {
4519
+ name: "Guernsey",
4520
+ code: "GG",
4521
+ timeZone: "Europe/Guernsey",
4522
+ phoneNumberExtension: "44",
4523
+ phoneNumberFormat: "XX XXXX XXXX"
4524
+ },
4525
+ {
4526
+ name: "Guinea",
4527
+ code: "GN",
4528
+ timeZone: "Africa/Conakry",
4529
+ phoneNumberExtension: "224"
4530
+ },
4531
+ {
4532
+ name: "Guinea-Bissau",
4533
+ code: "GW",
4534
+ timeZone: "Africa/Bissau",
4535
+ phoneNumberExtension: "245"
4536
+ },
4537
+ {
4538
+ name: "Guyana",
4539
+ code: "GY",
4540
+ timeZone: "America/Guyana",
4541
+ phoneNumberExtension: "592"
4542
+ },
4543
+ {
4544
+ name: "Haiti",
4545
+ code: "HT",
4546
+ timeZone: "America/Port-au-Prince",
4547
+ phoneNumberExtension: "509"
4548
+ },
4549
+ {
4550
+ name: "Heard Island and Mcdonald Islands",
4551
+ code: "HM",
4552
+ timeZone: "Indian/Kerguelen",
4553
+ phoneNumberExtension: "672"
4554
+ },
4555
+ {
4556
+ name: "Holy See (Vatican City State)",
4557
+ code: "VA",
4558
+ timeZone: "Europe/Vatican",
4559
+ phoneNumberExtension: "379"
4560
+ },
4561
+ {
4562
+ name: "Honduras",
4563
+ code: "HN",
4564
+ timeZone: "America/Tegucigalpa",
4565
+ phoneNumberExtension: "504"
4566
+ },
4567
+ {
4568
+ name: "Hong Kong",
4569
+ code: "HK",
4570
+ timeZone: "Asia/Hong_Kong",
4571
+ phoneNumberExtension: "852"
4572
+ },
4573
+ {
4574
+ name: "Hungary",
4575
+ code: "HU",
4576
+ timeZone: "Europe/Budapest",
4577
+ phoneNumberExtension: "36"
4578
+ },
4579
+ {
4580
+ name: "Iceland",
4581
+ code: "IS",
4582
+ timeZone: "Atlantic/Reykjavik",
4583
+ phoneNumberExtension: "354"
4584
+ },
4585
+ {
4586
+ name: "India",
4587
+ code: "IN",
4588
+ timeZone: "Asia/Kolkata",
4589
+ phoneNumberExtension: "91"
4590
+ },
4591
+ {
4592
+ name: "Indonesia",
4593
+ code: "ID",
4594
+ timeZone: "Asia/Jakarta",
4595
+ phoneNumberExtension: "62"
4596
+ },
4597
+ {
4598
+ name: "Iran, Islamic Republic Of",
4599
+ code: "IR",
4600
+ timeZone: "Asia/Tehran",
4601
+ phoneNumberExtension: "98"
4602
+ },
4603
+ {
4604
+ name: "Iraq",
4605
+ code: "IQ",
4606
+ timeZone: "Asia/Baghdad",
4607
+ phoneNumberExtension: "964"
4608
+ },
4609
+ {
4610
+ name: "Ireland",
4611
+ code: "IE",
4612
+ timeZone: "Europe/Dublin",
4613
+ phoneNumberExtension: "353"
4614
+ },
4615
+ {
4616
+ name: "Israel",
4617
+ code: "IL",
4618
+ timeZone: "Asia/Jerusalem",
4619
+ phoneNumberExtension: "972"
4620
+ },
4621
+ {
4622
+ name: "Italy",
4623
+ code: "IT",
4624
+ timeZone: "Europe/Rome",
4625
+ phoneNumberExtension: "39",
4626
+ phoneNumberFormat: "XXX XXX XXXX"
4627
+ },
4628
+ {
4629
+ name: "Jamaica",
4630
+ code: "JM",
4631
+ timeZone: "America/Jamaica",
4632
+ phoneNumberExtension: "1",
4633
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4634
+ },
4635
+ {
4636
+ name: "Japan",
4637
+ code: "JP",
4638
+ timeZone: "Asia/Tokyo",
4639
+ phoneNumberExtension: "81"
4640
+ },
4641
+ {
4642
+ name: "Jersey",
4643
+ code: "JE",
4644
+ timeZone: "Europe/Jersey",
4645
+ phoneNumberExtension: "44",
4646
+ phoneNumberFormat: "XX XXXX XXXX"
4647
+ },
4648
+ {
4649
+ name: "Jordan",
4650
+ code: "JO",
4651
+ timeZone: "Asia/Amman",
4652
+ phoneNumberExtension: "962"
4653
+ },
4654
+ {
4655
+ name: "Kazakhstan",
4656
+ code: "KZ",
4657
+ timeZone: "Asia/Almaty",
4658
+ phoneNumberExtension: "7"
4659
+ },
4660
+ {
4661
+ name: "Kenya",
4662
+ code: "KE",
4663
+ timeZone: "Africa/Nairobi",
4664
+ phoneNumberExtension: "254"
4665
+ },
4666
+ {
4667
+ name: "Kiribati",
4668
+ code: "KI",
4669
+ timeZone: "Pacific/Tarawa",
4670
+ phoneNumberExtension: "686"
4671
+ },
4672
+ {
4673
+ name: "Korea, Democratic People's Republic of (North Korea)",
4674
+ code: "KP",
4675
+ timeZone: "Asia/Pyongyang",
4676
+ phoneNumberExtension: "850"
4677
+ },
4678
+ {
4679
+ name: "Korea, Republic of (South Korea)",
4680
+ code: "KR",
4681
+ timeZone: "Asia/Seoul",
4682
+ phoneNumberExtension: "82"
4683
+ },
4684
+ {
4685
+ name: "Kuwait",
4686
+ code: "KW",
4687
+ timeZone: "Asia/Kuwait",
4688
+ phoneNumberExtension: "965"
4689
+ },
4690
+ {
4691
+ name: "Kyrgyzstan",
4692
+ code: "KG",
4693
+ timeZone: "Asia/Bishkek",
4694
+ phoneNumberExtension: "996"
4695
+ },
4696
+ {
4697
+ name: "Lao People's Democratic Republic",
4698
+ code: "LA",
4699
+ timeZone: "Asia/Vientiane",
4700
+ phoneNumberExtension: "856"
4701
+ },
4702
+ {
4703
+ name: "Latvia",
4704
+ code: "LV",
4705
+ timeZone: "Europe/Riga",
4706
+ phoneNumberExtension: "371"
4707
+ },
4708
+ {
4709
+ name: "Lebanon",
4710
+ code: "LB",
4711
+ timeZone: "Asia/Beirut",
4712
+ phoneNumberExtension: "961"
4713
+ },
4714
+ {
4715
+ name: "Lesotho",
4716
+ code: "LS",
4717
+ timeZone: "Africa/Maseru",
4718
+ phoneNumberExtension: "266"
4719
+ },
4720
+ {
4721
+ name: "Liberia",
4722
+ code: "LR",
4723
+ timeZone: "Africa/Monrovia",
4724
+ phoneNumberExtension: "231"
4725
+ },
4726
+ {
4727
+ name: "Libyan Arab Jamahiriya",
4728
+ code: "LY",
4729
+ timeZone: "Africa/Tripoli",
4730
+ phoneNumberExtension: "218"
4731
+ },
4732
+ {
4733
+ name: "Liechtenstein",
4734
+ code: "LI",
4735
+ timeZone: "Europe/Vaduz",
4736
+ phoneNumberExtension: "423"
4737
+ },
4738
+ {
4739
+ name: "Lithuania",
4740
+ code: "LT",
4741
+ timeZone: "Europe/Vilnius",
4742
+ phoneNumberExtension: "370"
4743
+ },
4744
+ {
4745
+ name: "Luxembourg",
4746
+ code: "LU",
4747
+ timeZone: "Europe/Luxembourg",
4748
+ phoneNumberExtension: "352"
4749
+ },
4750
+ {
4751
+ name: "Macao",
4752
+ code: "MO",
4753
+ timeZone: "Asia/Macau",
4754
+ phoneNumberExtension: "853"
4755
+ },
4756
+ {
4757
+ name: "Macedonia, The Former Yugoslav Republic of",
4758
+ code: "MK",
4759
+ timeZone: "Europe/Skopje",
4760
+ phoneNumberExtension: "389"
4761
+ },
4762
+ {
4763
+ name: "Madagascar",
4764
+ code: "MG",
4765
+ timeZone: "Indian/Antananarivo",
4766
+ phoneNumberExtension: "261"
4767
+ },
4768
+ {
4769
+ name: "Malawi",
4770
+ code: "MW",
4771
+ timeZone: "Africa/Blantyre",
4772
+ phoneNumberExtension: "265"
4773
+ },
4774
+ {
4775
+ name: "Malaysia",
4776
+ code: "MY",
4777
+ timeZone: "Asia/Kuala_Lumpur",
4778
+ phoneNumberExtension: "60"
4779
+ },
4780
+ {
4781
+ name: "Maldives",
4782
+ code: "MV",
4783
+ timeZone: "Indian/Maldives",
4784
+ phoneNumberExtension: "960"
4785
+ },
4786
+ {
4787
+ name: "Mali",
4788
+ code: "ML",
4789
+ timeZone: "Africa/Bamako",
4790
+ phoneNumberExtension: "223"
4791
+ },
4792
+ {
4793
+ name: "Malta",
4794
+ code: "MT",
4795
+ timeZone: "Europe/Malta",
4796
+ phoneNumberExtension: "356"
4797
+ },
4798
+ {
4799
+ name: "Marshall Islands",
4800
+ code: "MH",
4801
+ timeZone: "Pacific/Majuro",
4802
+ phoneNumberExtension: "692"
4803
+ },
4804
+ {
4805
+ name: "Martinique",
4806
+ code: "MQ",
4807
+ timeZone: "America/Martinique",
4808
+ phoneNumberExtension: "596"
4809
+ },
4810
+ {
4811
+ name: "Mauritania",
4812
+ code: "MR",
4813
+ timeZone: "Africa/Nouakchott",
4814
+ phoneNumberExtension: "222"
4815
+ },
4816
+ {
4817
+ name: "Mauritius",
4818
+ code: "MU",
4819
+ timeZone: "Indian/Mauritius",
4820
+ phoneNumberExtension: "230"
4821
+ },
4822
+ {
4823
+ name: "Mayotte",
4824
+ code: "YT",
4825
+ timeZone: "Indian/Mayotte",
4826
+ phoneNumberExtension: "262"
4827
+ },
4828
+ {
4829
+ name: "Mexico",
4830
+ code: "MX",
4831
+ timeZone: "America/Mexico_City",
4832
+ phoneNumberExtension: "52"
4833
+ },
4834
+ {
4835
+ name: "Micronesia, Federated States of",
4836
+ code: "FM",
4837
+ timeZone: "Pacific/Chuuk",
4838
+ phoneNumberExtension: "691"
4839
+ },
4840
+ {
4841
+ name: "Moldova, Republic of",
4842
+ code: "MD",
4843
+ timeZone: "Europe/Chisinau",
4844
+ phoneNumberExtension: "373"
4845
+ },
4846
+ {
4847
+ name: "Monaco",
4848
+ code: "MC",
4849
+ timeZone: "Europe/Monaco",
4850
+ phoneNumberExtension: "377"
4851
+ },
4852
+ {
4853
+ name: "Mongolia",
4854
+ code: "MN",
4855
+ timeZone: "Asia/Ulaanbaatar",
4856
+ phoneNumberExtension: "976"
4857
+ },
4858
+ {
4859
+ name: "Montserrat",
4860
+ code: "MS",
4861
+ timeZone: "America/Montserrat",
4862
+ phoneNumberExtension: "1",
4863
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4864
+ },
4865
+ {
4866
+ name: "Morocco",
4867
+ code: "MA",
4868
+ timeZone: "Africa/Casablanca",
4869
+ phoneNumberExtension: "212"
4870
+ },
4871
+ {
4872
+ name: "Mozambique",
4873
+ code: "MZ",
4874
+ timeZone: "Africa/Maputo",
4875
+ phoneNumberExtension: "258"
4876
+ },
4877
+ {
4878
+ name: "Myanmar",
4879
+ code: "MM",
4880
+ timeZone: "Asia/Yangon",
4881
+ phoneNumberExtension: "95"
4882
+ },
4883
+ {
4884
+ name: "Namibia",
4885
+ code: "NA",
4886
+ timeZone: "Africa/Windhoek",
4887
+ phoneNumberExtension: "264"
4888
+ },
4889
+ {
4890
+ name: "Nauru",
4891
+ code: "NR",
4892
+ timeZone: "Pacific/Nauru",
4893
+ phoneNumberExtension: "674"
4894
+ },
4895
+ {
4896
+ name: "Nepal",
4897
+ code: "NP",
4898
+ timeZone: "Asia/Kathmandu",
4899
+ phoneNumberExtension: "977"
4900
+ },
4901
+ {
4902
+ name: "Netherlands",
4903
+ code: "NL",
4904
+ timeZone: "Europe/Amsterdam",
4905
+ phoneNumberExtension: "31"
4906
+ },
4907
+ {
4908
+ name: "New Caledonia",
4909
+ code: "NC",
4910
+ timeZone: "Pacific/Noumea",
4911
+ phoneNumberExtension: "687"
4912
+ },
4913
+ {
4914
+ name: "New Zealand",
4915
+ code: "NZ",
4916
+ timeZone: "Pacific/Auckland",
4917
+ phoneNumberExtension: "64"
4918
+ },
4919
+ {
4920
+ name: "Nicaragua",
4921
+ code: "NI",
4922
+ timeZone: "America/Managua",
4923
+ phoneNumberExtension: "505"
4924
+ },
4925
+ {
4926
+ name: "Niger",
4927
+ code: "NE",
4928
+ timeZone: "Africa/Niamey",
4929
+ phoneNumberExtension: "227"
4930
+ },
4931
+ {
4932
+ name: "Nigeria",
4933
+ code: "NG",
4934
+ timeZone: "Africa/Lagos",
4935
+ phoneNumberExtension: "234"
4936
+ },
4937
+ {
4938
+ name: "Niue",
4939
+ code: "NU",
4940
+ timeZone: "Pacific/Niue",
4941
+ phoneNumberExtension: "683"
4942
+ },
4943
+ {
4944
+ name: "Norfolk Island",
4945
+ code: "NF",
4946
+ timeZone: "Pacific/Norfolk",
4947
+ phoneNumberExtension: "672"
4948
+ },
4949
+ {
4950
+ name: "Northern Mariana Islands",
4951
+ code: "MP",
4952
+ timeZone: "Pacific/Saipan",
4953
+ phoneNumberExtension: "1",
4954
+ phoneNumberFormat: "(XXX)XXX-XXXX"
4955
+ },
4956
+ {
4957
+ name: "Norway",
4958
+ code: "NO",
4959
+ timeZone: "Europe/Oslo",
4960
+ phoneNumberExtension: "47"
4961
+ },
4962
+ {
4963
+ name: "Oman",
4964
+ code: "OM",
4965
+ timeZone: "Asia/Muscat",
4966
+ phoneNumberExtension: "968"
4967
+ },
4968
+ {
4969
+ name: "Pakistan",
4970
+ code: "PK",
4971
+ timeZone: "Asia/Karachi",
4972
+ phoneNumberExtension: "92"
4973
+ },
4974
+ {
4975
+ name: "Palau",
4976
+ code: "PW",
4977
+ timeZone: "Pacific/Palau",
4978
+ phoneNumberExtension: "680"
4979
+ },
4980
+ {
4981
+ name: "Palestinian Territory, Occupied",
4982
+ code: "PS",
4983
+ timeZone: "Asia/Hebron",
4984
+ phoneNumberExtension: "970"
4985
+ },
4986
+ {
4987
+ name: "Panama",
4988
+ code: "PA",
4989
+ timeZone: "America/Panama",
4990
+ phoneNumberExtension: "507"
4991
+ },
4992
+ {
4993
+ name: "Papua New Guinea",
4994
+ code: "PG",
4995
+ timeZone: "Pacific/Port_Moresby",
4996
+ phoneNumberExtension: "675"
4997
+ },
4998
+ {
4999
+ name: "Paraguay",
5000
+ code: "PY",
5001
+ timeZone: "America/Asuncion",
5002
+ phoneNumberExtension: "595"
5003
+ },
5004
+ {
5005
+ name: "Peru",
5006
+ code: "PE",
5007
+ timeZone: "America/Lima",
5008
+ phoneNumberExtension: "51"
5009
+ },
5010
+ {
5011
+ name: "Philippines",
5012
+ code: "PH",
5013
+ timeZone: "Asia/Manila",
5014
+ phoneNumberExtension: "63"
5015
+ },
5016
+ {
5017
+ name: "Pitcairn",
5018
+ code: "PN",
5019
+ timeZone: "Pacific/Pitcairn",
5020
+ phoneNumberExtension: "64"
5021
+ },
5022
+ {
5023
+ name: "Poland",
5024
+ code: "PL",
5025
+ timeZone: "Europe/Warsaw",
5026
+ phoneNumberExtension: "48"
5027
+ },
5028
+ {
5029
+ name: "Portugal",
5030
+ code: "PT",
5031
+ timeZone: "Europe/Lisbon",
5032
+ phoneNumberExtension: "351"
5033
+ },
5034
+ {
5035
+ name: "Puerto Rico",
5036
+ code: "PR",
5037
+ timeZone: "America/Puerto_Rico",
5038
+ phoneNumberExtension: "1",
5039
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5040
+ },
5041
+ {
5042
+ name: "Qatar",
5043
+ code: "QA",
5044
+ timeZone: "Asia/Qatar",
5045
+ phoneNumberExtension: "974"
5046
+ },
5047
+ {
5048
+ name: "Reunion",
5049
+ code: "RE",
5050
+ timeZone: "Indian/Reunion",
5051
+ phoneNumberExtension: "262"
5052
+ },
5053
+ {
5054
+ name: "Romania",
5055
+ code: "RO",
5056
+ timeZone: "Europe/Bucharest",
5057
+ phoneNumberExtension: "40"
5058
+ },
5059
+ {
5060
+ name: "Russian Federation",
5061
+ code: "RU",
5062
+ timeZone: "Europe/Moscow",
5063
+ phoneNumberExtension: "7"
5064
+ },
5065
+ {
5066
+ name: "RWANDA",
5067
+ code: "RW",
5068
+ timeZone: "Africa/Kigali",
5069
+ phoneNumberExtension: "250"
5070
+ },
5071
+ {
5072
+ name: "Saint Helena",
5073
+ code: "SH",
5074
+ timeZone: "Atlantic/St_Helena",
5075
+ phoneNumberExtension: "290"
5076
+ },
5077
+ {
5078
+ name: "Saint Kitts and Nevis",
5079
+ code: "KN",
5080
+ timeZone: "America/St_Kitts",
5081
+ phoneNumberExtension: "1",
5082
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5083
+ },
5084
+ {
5085
+ name: "Saint Lucia",
5086
+ code: "LC",
5087
+ timeZone: "America/St_Lucia",
5088
+ phoneNumberExtension: "1",
5089
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5090
+ },
5091
+ {
5092
+ name: "Saint Pierre and Miquelon",
5093
+ code: "PM",
5094
+ timeZone: "America/Miquelon",
5095
+ phoneNumberExtension: "508"
5096
+ },
5097
+ {
5098
+ name: "Saint Vincent and the Grenadines",
5099
+ code: "VC",
5100
+ timeZone: "America/St_Vincent",
5101
+ phoneNumberExtension: "1",
5102
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5103
+ },
5104
+ {
5105
+ name: "Samoa",
5106
+ code: "WS",
5107
+ timeZone: "Pacific/Apia",
5108
+ phoneNumberExtension: "685"
5109
+ },
5110
+ {
5111
+ name: "San Marino",
5112
+ code: "SM",
5113
+ timeZone: "Europe/San_Marino",
5114
+ phoneNumberExtension: "378"
5115
+ },
5116
+ {
5117
+ name: "Sao Tome and Principe",
5118
+ code: "ST",
5119
+ timeZone: "Africa/Sao_Tome",
5120
+ phoneNumberExtension: "239"
5121
+ },
5122
+ {
5123
+ name: "Saudi Arabia",
5124
+ code: "SA",
5125
+ timeZone: "Asia/Riyadh",
5126
+ phoneNumberExtension: "966"
5127
+ },
5128
+ {
5129
+ name: "Senegal",
5130
+ code: "SN",
5131
+ timeZone: "Africa/Dakar",
5132
+ phoneNumberExtension: "221"
5133
+ },
5134
+ {
5135
+ name: "Republic of Serbia",
5136
+ code: "RS",
5137
+ timeZone: "Europe/Belgrade",
5138
+ phoneNumberExtension: "381"
5139
+ },
5140
+ {
5141
+ name: "Seychelles",
5142
+ code: "SC",
5143
+ timeZone: "Indian/Mahe",
5144
+ phoneNumberExtension: "248"
5145
+ },
5146
+ {
5147
+ name: "Sierra Leone",
5148
+ code: "SL",
5149
+ timeZone: "Africa/Freetown",
5150
+ phoneNumberExtension: "232"
5151
+ },
5152
+ {
5153
+ name: "Singapore",
5154
+ code: "SG",
5155
+ timeZone: "Asia/Singapore",
5156
+ phoneNumberExtension: "65"
5157
+ },
5158
+ {
5159
+ name: "Slovakia",
5160
+ code: "SK",
5161
+ timeZone: "Europe/Bratislava",
5162
+ phoneNumberExtension: "421"
5163
+ },
5164
+ {
5165
+ name: "Slovenia",
5166
+ code: "SI",
5167
+ timeZone: "Europe/Ljubljana",
5168
+ phoneNumberExtension: "386"
5169
+ },
5170
+ {
5171
+ name: "Solomon Islands",
5172
+ code: "SB",
5173
+ timeZone: "Pacific/Guadalcanal",
5174
+ phoneNumberExtension: "677"
5175
+ },
5176
+ {
5177
+ name: "Somalia",
5178
+ code: "SO",
5179
+ timeZone: "Africa/Mogadishu",
5180
+ phoneNumberExtension: "252"
5181
+ },
5182
+ {
5183
+ name: "South Africa",
5184
+ code: "ZA",
5185
+ timeZone: "Africa/Johannesburg",
5186
+ phoneNumberExtension: "27"
5187
+ },
5188
+ {
5189
+ name: "South Georgia and the South Sandwich Islands",
5190
+ code: "GS",
5191
+ timeZone: "Atlantic/South_Georgia",
5192
+ phoneNumberExtension: "500"
5193
+ },
5194
+ {
5195
+ name: "Spain",
5196
+ code: "ES",
5197
+ timeZone: "Europe/Madrid",
5198
+ phoneNumberExtension: "34"
5199
+ },
5200
+ {
5201
+ name: "Sri Lanka",
5202
+ code: "LK",
5203
+ timeZone: "Asia/Colombo",
5204
+ phoneNumberExtension: "94"
5205
+ },
5206
+ {
5207
+ name: "Sudan",
5208
+ code: "SD",
5209
+ timeZone: "Africa/Khartoum",
5210
+ phoneNumberExtension: "249"
5211
+ },
5212
+ {
5213
+ name: "Suriname",
5214
+ code: "SR",
5215
+ timeZone: "America/Paramaribo",
5216
+ phoneNumberExtension: "597"
5217
+ },
5218
+ {
5219
+ name: "Svalbard and Jan Mayen",
5220
+ code: "SJ",
5221
+ timeZone: "Arctic/Longyearbyen",
5222
+ phoneNumberExtension: "47"
5223
+ },
5224
+ {
5225
+ name: "Swaziland",
5226
+ code: "SZ",
5227
+ timeZone: "Africa/Mbabane",
5228
+ phoneNumberExtension: "268"
5229
+ },
5230
+ {
5231
+ name: "Sweden",
5232
+ code: "SE",
5233
+ timeZone: "Europe/Stockholm",
5234
+ phoneNumberExtension: "46"
5235
+ },
5236
+ {
5237
+ name: "Switzerland",
5238
+ code: "CH",
5239
+ timeZone: "Europe/Zurich",
5240
+ phoneNumberExtension: "41"
5241
+ },
5242
+ {
5243
+ name: "Syrian Arab Republic",
5244
+ code: "SY",
5245
+ timeZone: "Asia/Damascus",
5246
+ phoneNumberExtension: "963"
5247
+ },
5248
+ {
5249
+ name: "Taiwan, Province of China",
5250
+ code: "TW",
5251
+ timeZone: "Asia/Taipei",
5252
+ phoneNumberExtension: "886"
5253
+ },
5254
+ {
5255
+ name: "Tajikistan",
5256
+ code: "TJ",
5257
+ timeZone: "Asia/Dushanbe",
5258
+ phoneNumberExtension: "992"
5259
+ },
5260
+ {
5261
+ name: "Tanzania, United Republic of",
5262
+ code: "TZ",
5263
+ timeZone: "Africa/Dar_es_Salaam",
5264
+ phoneNumberExtension: "255"
5265
+ },
5266
+ {
5267
+ name: "Thailand",
5268
+ code: "TH",
5269
+ timeZone: "Asia/Bangkok",
5270
+ phoneNumberExtension: "66"
5271
+ },
5272
+ {
5273
+ name: "Timor-Leste",
5274
+ code: "TL",
5275
+ timeZone: "Asia/Dili",
5276
+ phoneNumberExtension: "670"
5277
+ },
5278
+ {
5279
+ name: "Togo",
5280
+ code: "TG",
5281
+ timeZone: "Africa/Lome",
5282
+ phoneNumberExtension: "228"
5283
+ },
5284
+ {
5285
+ name: "Tokelau",
5286
+ code: "TK",
5287
+ timeZone: "Pacific/Fakaofo",
5288
+ phoneNumberExtension: "690"
5289
+ },
5290
+ {
5291
+ name: "Tonga",
5292
+ code: "TO",
5293
+ timeZone: "Pacific/Tongatapu",
5294
+ phoneNumberExtension: "676"
5295
+ },
5296
+ {
5297
+ name: "Trinidad and Tobago",
5298
+ code: "TT",
5299
+ timeZone: "America/Port_of_Spain",
5300
+ phoneNumberExtension: "1",
5301
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5302
+ },
5303
+ {
5304
+ name: "Tunisia",
5305
+ code: "TN",
5306
+ timeZone: "Africa/Tunis",
5307
+ phoneNumberExtension: "216"
5308
+ },
5309
+ {
5310
+ name: "Turkey",
5311
+ code: "TR",
5312
+ timeZone: "Europe/Istanbul",
5313
+ phoneNumberExtension: "90"
5314
+ },
5315
+ {
5316
+ name: "Turkmenistan",
5317
+ code: "TM",
5318
+ timeZone: "Asia/Ashgabat",
5319
+ phoneNumberExtension: "993"
5320
+ },
5321
+ {
5322
+ name: "Turks and Caicos Islands",
5323
+ code: "TC",
5324
+ timeZone: "America/Grand_Turk",
5325
+ phoneNumberExtension: "1",
5326
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5327
+ },
5328
+ {
5329
+ name: "Tuvalu",
5330
+ code: "TV",
5331
+ timeZone: "Pacific/Funafuti",
5332
+ phoneNumberExtension: "688"
5333
+ },
5334
+ {
5335
+ name: "Uganda",
5336
+ code: "UG",
5337
+ timeZone: "Africa/Kampala",
5338
+ phoneNumberExtension: "256"
5339
+ },
5340
+ {
5341
+ name: "Ukraine",
5342
+ code: "UA",
5343
+ timeZone: "Europe/Kiev",
5344
+ phoneNumberExtension: "380"
5345
+ },
5346
+ {
5347
+ name: "United Arab Emirates",
5348
+ code: "AE",
5349
+ timeZone: "Asia/Dubai",
5350
+ phoneNumberExtension: "971"
5351
+ },
5352
+ {
5353
+ name: "United States Minor Outlying Islands",
5354
+ code: "UM",
5355
+ timeZone: "Pacific/Midway",
5356
+ phoneNumberExtension: "1",
5357
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5358
+ },
5359
+ {
5360
+ name: "Uruguay",
5361
+ code: "UY",
5362
+ timeZone: "America/Montevideo",
5363
+ phoneNumberExtension: "598"
5364
+ },
5365
+ {
5366
+ name: "Uzbekistan",
5367
+ code: "UZ",
5368
+ timeZone: "Asia/Tashkent",
5369
+ phoneNumberExtension: "998"
5370
+ },
5371
+ {
5372
+ name: "Vanuatu",
5373
+ code: "VU",
5374
+ timeZone: "Pacific/Efate",
5375
+ phoneNumberExtension: "678"
5376
+ },
5377
+ {
5378
+ name: "Venezuela",
5379
+ code: "VE",
5380
+ timeZone: "America/Caracas",
5381
+ phoneNumberExtension: "58"
5382
+ },
5383
+ {
5384
+ name: "Viet Nam",
5385
+ code: "VN",
5386
+ timeZone: "Asia/Ho_Chi_Minh",
5387
+ phoneNumberExtension: "84"
5388
+ },
5389
+ {
5390
+ name: "Virgin Islands, British",
5391
+ code: "VG",
5392
+ timeZone: "America/Tortola",
5393
+ phoneNumberExtension: "1",
5394
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5395
+ },
5396
+ {
5397
+ name: "Virgin Islands, U.S.",
5398
+ code: "VI",
5399
+ timeZone: "America/St_Thomas",
5400
+ phoneNumberExtension: "1",
5401
+ phoneNumberFormat: "(XXX)XXX-XXXX"
5402
+ },
5403
+ {
5404
+ name: "Wallis and Futuna",
5405
+ code: "WF",
5406
+ timeZone: "Pacific/Wallis",
5407
+ phoneNumberExtension: "681"
5408
+ },
5409
+ {
5410
+ name: "Western Sahara",
5411
+ code: "EH",
5412
+ timeZone: "Africa/El_Aaiun",
5413
+ phoneNumberExtension: "212"
5414
+ },
5415
+ {
5416
+ name: "Yemen",
5417
+ code: "YE",
5418
+ timeZone: "Asia/Aden",
5419
+ phoneNumberExtension: "967"
5420
+ },
5421
+ {
5422
+ name: "Zambia",
5423
+ code: "ZM",
5424
+ timeZone: "Africa/Lusaka",
5425
+ phoneNumberExtension: "260"
5426
+ },
5427
+ {
5428
+ name: "Zimbabwe",
5429
+ code: "ZW",
5430
+ timeZone: "Africa/Harare",
5431
+ phoneNumberExtension: "263"
5432
+ }
5433
+ ];
5415
5434
 
5416
- // src/components/PageHolder.tsx
5417
- import { forwardRef as forwardRef8, memo as memo13 } from "react";
5418
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
5419
- var PageHolderComponent = forwardRef8(function PageHolder({ noMaxContentWidth, children, ...props }, ref) {
5420
- const theme2 = useTheme();
5421
- const { app } = useBetterHtmlContextInternal();
5422
- return /* @__PURE__ */ jsx13(
5423
- Div_default,
5424
- {
5425
- as: "main",
5426
- width: "100%",
5427
- maxWidth: !noMaxContentWidth ? app.contentMaxWidth : void 0,
5428
- margin: "0px auto",
5429
- padding: theme2.styles.space,
5430
- ...props,
5431
- ref,
5432
- children
5433
- }
5434
- );
5435
- });
5436
- PageHolderComponent.center = forwardRef8(function Center({
5437
- pageBackgroundColor,
5438
- pageBackgroundImage,
5439
- contentMaxWidth,
5440
- behindComponent,
5441
- sideComponent,
5442
- sideComponentPosition = "right",
5443
- noMaxContentWidth,
5444
- children,
5445
- ...props
5446
- }, ref) {
5447
- const theme2 = useTheme();
5448
- const mediaQuery = useMediaQuery();
5449
- const { app } = useBetterHtmlContextInternal();
5450
- const breakingPoint = mediaQuery.size1000;
5451
- const withSideComponent = sideComponent && !breakingPoint;
5452
- return /* @__PURE__ */ jsxs9(
5453
- Div_default.row,
5454
- {
5455
- position: "relative",
5456
- width: "100%",
5457
- minHeight: "100svh",
5458
- alignItems: "center",
5459
- justifyContent: "center",
5460
- backgroundColor: pageBackgroundColor,
5461
- backgroundImage: pageBackgroundImage,
5462
- children: [
5463
- behindComponent && /* @__PURE__ */ jsx13(
5464
- Div_default,
5465
- {
5466
- position: "fixed",
5467
- width: `${withSideComponent ? 50 : 100}%`,
5468
- height: "100svh",
5469
- top: 0,
5470
- left: sideComponentPosition === "right" ? 0 : "auto",
5471
- right: sideComponentPosition === "left" ? 0 : "auto",
5472
- zIndex: 1,
5473
- children: behindComponent
5474
- }
5475
- ),
5476
- sideComponentPosition === "left" && withSideComponent && /* @__PURE__ */ jsx13(Div_default, { width: "50%" }),
5477
- /* @__PURE__ */ jsx13(Div_default.column, { position: "relative", width: `${withSideComponent ? 50 : 100}%`, alignItems: "center", zIndex: 2, children: /* @__PURE__ */ jsx13(
5478
- Div_default.box,
5479
- {
5480
- width: `calc(100% - ${theme2.styles.space * 2}px)`,
5481
- maxWidth: !noMaxContentWidth ? contentMaxWidth ?? app.contentMaxWidth / 2 : void 0,
5482
- marginInline: theme2.styles.space,
5483
- marginBlock: theme2.styles.space,
5484
- ...props,
5485
- ref,
5486
- children
5487
- }
5488
- ) }),
5489
- sideComponentPosition === "right" && withSideComponent && /* @__PURE__ */ jsx13(Div_default, { width: "50%" }),
5490
- withSideComponent && /* @__PURE__ */ jsx13(
5491
- Div_default,
5492
- {
5493
- position: "fixed",
5494
- width: "50%",
5495
- height: "100svh",
5496
- top: 0,
5497
- left: sideComponentPosition === "left" ? 0 : "auto",
5498
- right: sideComponentPosition === "right" ? 0 : "auto",
5499
- children: sideComponent
5500
- }
5501
- )
5502
- ]
5503
- }
5504
- );
5505
- });
5506
- var PageHolder2 = memo13(PageHolderComponent);
5507
- PageHolder2.center = PageHolderComponent.center;
5508
- var PageHolder_default = PageHolder2;
5435
+ // src/utils/functions.ts
5436
+ import CryptoJS from "crypto-js";
5509
5437
 
5510
- // src/components/Chip.tsx
5511
- import { forwardRef as forwardRef9, memo as memo14 } from "react";
5438
+ // src/utils/variableFunctions.ts
5439
+ var checkBetterHtmlContextValue = (value, functionsName) => {
5440
+ if (value === void 0) {
5441
+ throw new Error(
5442
+ `\`${functionsName}()\` must be used within a \`<BetterHtmlProvider>\`. Make sure to add one at the root of your component tree.`
5443
+ );
5444
+ }
5445
+ return value !== void 0;
5446
+ };
5447
+ var loaderControls = {
5448
+ startLoading: (loaderName) => {
5449
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "loaderControls.startLoading")) return;
5450
+ externalBetterHtmlContextValue.setLoaders((oldValue) => ({
5451
+ ...oldValue,
5452
+ [loaderName.toString()]: true
5453
+ }));
5454
+ },
5455
+ stopLoading: (loaderName) => {
5456
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "loaderControls.stopLoading")) return;
5457
+ externalBetterHtmlContextValue.setLoaders((oldValue) => ({
5458
+ ...oldValue,
5459
+ [loaderName.toString()]: false
5460
+ }));
5461
+ }
5462
+ };
5463
+ var alertControls = {
5464
+ createAlert: (alert) => {
5465
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.createAlert"))
5466
+ return void 0;
5467
+ const readyAlert = {
5468
+ id: crypto.randomUUID(),
5469
+ ...alert
5470
+ };
5471
+ externalBetterHtmlContextValue.setAlerts((oldValue) => [...oldValue, readyAlert]);
5472
+ return readyAlert;
5473
+ },
5474
+ removeAlert: (alertId) => {
5475
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.removeAlert")) return;
5476
+ externalBetterHtmlContextValue.setAlerts((oldValue) => oldValue.filter((alert) => alert.id !== alertId));
5477
+ }
5478
+ };
5479
+ var colorThemeControls = {
5480
+ toggleTheme: (theme2) => {
5481
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "colorThemeControls.toggleTheme")) return;
5482
+ const currentColorTheme = externalBetterHtmlContextValue.colorTheme;
5483
+ const newColorTheme = theme2 ?? (currentColorTheme === "dark" ? "light" : "dark");
5484
+ setTimeout(() => {
5485
+ window.document.body.parentElement?.setAttribute("data-theme", newColorTheme);
5486
+ localStorage.setItem("theme", newColorTheme);
5487
+ }, 0.01 * 1e3);
5488
+ }
5489
+ };
5490
+ var filterHover = () => {
5491
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "filterHover")) return void 0;
5492
+ return {
5493
+ z05: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.95)",
5494
+ z1: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.3)" : "brightness(0.9)",
5495
+ z2: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.6)" : "brightness(0.8)",
5496
+ z3: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.9)" : "brightness(0.7)"
5497
+ };
5498
+ };
5512
5499
 
5513
- // src/utils/colorManipulation.ts
5514
- var rgbToHsl = (r, g, b) => {
5515
- r /= 255;
5516
- g /= 255;
5517
- b /= 255;
5518
- const max = Math.max(r, g, b);
5519
- const min = Math.min(r, g, b);
5520
- let h = 0;
5521
- let s = 0;
5522
- const l = (max + min) / 2;
5523
- if (max !== min) {
5524
- const d = max - min;
5525
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
5526
- switch (max) {
5527
- case r:
5528
- h = (g - b) / d + (g < b ? 6 : 0);
5529
- break;
5530
- case g:
5531
- h = (b - r) / d + 2;
5532
- break;
5533
- case b:
5534
- h = (r - g) / d + 4;
5535
- break;
5500
+ // src/utils/functions.ts
5501
+ var generateRandomString = (stringLength, options) => {
5502
+ const capitals = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
5503
+ const lowers = "abcdefghijklmnopqrstuvwxyz";
5504
+ const numbers = "0123456789";
5505
+ const includes = [];
5506
+ if (options?.includeCapitalLetters !== false) includes.push(capitals);
5507
+ if (options?.includeLowerLetters !== false) includes.push(lowers);
5508
+ if (options?.includeNumbers !== false) includes.push(numbers);
5509
+ const characters = includes.join("");
5510
+ const dashSections = Math.max(1, options?.dashSections ?? 1);
5511
+ const dashSectionLength = Math.floor(stringLength / dashSections);
5512
+ if (stringLength < dashSections) return "";
5513
+ let result = "";
5514
+ let currentSectionLength = 0;
5515
+ while (result.length < stringLength) {
5516
+ if (currentSectionLength >= dashSectionLength) {
5517
+ result += "-";
5518
+ currentSectionLength = 0;
5519
+ }
5520
+ if (result.length < stringLength) {
5521
+ result += characters.charAt(Math.floor(Math.random() * characters.length));
5522
+ currentSectionLength += 1;
5536
5523
  }
5537
- h /= 6;
5538
5524
  }
5539
- return [h, s, l];
5525
+ return result;
5540
5526
  };
5541
- var hslToRgb = (h, s, l) => {
5542
- let r, g, b;
5543
- if (s === 0) {
5544
- r = g = b = l;
5545
- } else {
5546
- const hue2rgb = (p2, q2, t) => {
5547
- if (t < 0) t += 1;
5548
- if (t > 1) t -= 1;
5549
- if (t < 1 / 6) return p2 + (q2 - p2) * 6 * t;
5550
- if (t < 1 / 2) return q2;
5551
- if (t < 2 / 3) return p2 + (q2 - p2) * (2 / 3 - t) * 6;
5552
- return p2;
5553
- };
5554
- const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
5555
- const p = 2 * l - q;
5556
- r = hue2rgb(p, q, h + 1 / 3);
5557
- g = hue2rgb(p, q, h);
5558
- b = hue2rgb(p, q, h - 1 / 3);
5559
- }
5560
- return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
5527
+ var getBrowser = () => {
5528
+ const userAgent = navigator.userAgent.toLowerCase();
5529
+ if (userAgent.includes("firefox")) return "firefox";
5530
+ if (userAgent.includes("chrome") && !userAgent.includes("edg")) return "chrome";
5531
+ if (userAgent.includes("safari") && !userAgent.includes("chrome")) return "safari";
5532
+ if (userAgent.includes("edg")) return "edge";
5533
+ if (userAgent.includes("opr") || userAgent.includes("opera")) return "opera";
5534
+ return;
5561
5535
  };
5562
- var lightenColor = (hexColor, amount) => {
5563
- let hex = hexColor.replace(/^#/, "");
5564
- if (hex.length === 3) {
5565
- hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
5536
+ var formatPhoneNumber = (phoneNumber) => {
5537
+ const cleanPhoneNumber = phoneNumber.replace(/\D/g, "");
5538
+ const country = countries.find(
5539
+ (country2) => country2.phoneNumberExtension === cleanPhoneNumber.slice(0, country2.phoneNumberExtension.length)
5540
+ );
5541
+ if (!country) return phoneNumber;
5542
+ let phonNumberRest = cleanPhoneNumber.slice(country.phoneNumberExtension.length);
5543
+ if (country.phoneNumberFormat) {
5544
+ let formattedNumber = "";
5545
+ let index = 0;
5546
+ for (const char of country.phoneNumberFormat) {
5547
+ if (char === "X" && index < phonNumberRest.length) {
5548
+ formattedNumber += phonNumberRest[index];
5549
+ index++;
5550
+ } else {
5551
+ formattedNumber += char;
5552
+ }
5553
+ }
5554
+ phonNumberRest = formattedNumber.replace(/X/g, "").trim();
5566
5555
  }
5567
- const safeAmount = Math.max(0, Math.min(1, amount));
5568
- const r = parseInt(hex.substring(0, 2), 16);
5569
- const g = parseInt(hex.substring(2, 4), 16);
5570
- const b = parseInt(hex.substring(4, 6), 16);
5571
- const lightenComponent = (component) => {
5572
- return Math.round(component + (255 - component) * safeAmount);
5573
- };
5574
- const rHex = lightenComponent(r).toString(16).padStart(2, "0");
5575
- const gHex = lightenComponent(g).toString(16).padStart(2, "0");
5576
- const bHex = lightenComponent(b).toString(16).padStart(2, "0");
5577
- return `#${rHex}${gHex}${bHex}`;
5556
+ return `+${country.phoneNumberExtension} ${phonNumberRest}`;
5578
5557
  };
5579
- var darkenColor = (hexColor, amount) => {
5580
- let hex = hexColor.replace(/^#/, "");
5581
- if (hex.length === 3) {
5582
- hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
5583
- }
5584
- const safeAmount = Math.max(0, Math.min(1, amount));
5585
- const r = parseInt(hex.substring(0, 2), 16);
5586
- const g = parseInt(hex.substring(2, 4), 16);
5587
- const b = parseInt(hex.substring(4, 6), 16);
5588
- const darkenComponent = (component) => {
5589
- return Math.round(component * (1 - safeAmount));
5590
- };
5591
- const rHex = darkenComponent(r).toString(16).padStart(2, "0");
5592
- const gHex = darkenComponent(g).toString(16).padStart(2, "0");
5593
- const bHex = darkenComponent(b).toString(16).padStart(2, "0");
5594
- return `#${rHex}${gHex}${bHex}`;
5558
+ var getFormErrorObject = (formValues) => {
5559
+ return {};
5595
5560
  };
5596
- var saturateColor = (hexColor, amount) => {
5597
- let hex = hexColor.replace(/^#/, "");
5598
- if (hex.length === 3) {
5599
- hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
5561
+ var eventPreventDefault = (event) => {
5562
+ event.preventDefault();
5563
+ };
5564
+ var eventStopPropagation = (event) => {
5565
+ event.stopPropagation();
5566
+ };
5567
+ var eventPreventStop = (event) => {
5568
+ event.preventDefault();
5569
+ event.stopPropagation();
5570
+ };
5571
+ var encryptString = (text) => {
5572
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "encryptString")) return void 0;
5573
+ const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find((plugin) => plugin.name === "localStorage");
5574
+ if (!localStoragePlugin2) {
5575
+ throw new Error(
5576
+ "`encryptString` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
5577
+ );
5600
5578
  }
5601
- const safeAmount = Math.max(0, Math.min(1, amount));
5602
- const r = parseInt(hex.substring(0, 2), 16);
5603
- const g = parseInt(hex.substring(2, 4), 16);
5604
- const b = parseInt(hex.substring(4, 6), 16);
5605
- const [h, s, l] = rgbToHsl(r, g, b);
5606
- const newSaturation = Math.min(1, s + safeAmount * (1 - s));
5607
- const [newR, newG, newB] = hslToRgb(h, newSaturation, l);
5608
- const rHex = Math.round(newR).toString(16).padStart(2, "0");
5609
- const gHex = Math.round(newG).toString(16).padStart(2, "0");
5610
- const bHex = Math.round(newB).toString(16).padStart(2, "0");
5611
- return `#${rHex}${gHex}${bHex}`;
5579
+ const pluginConfig = localStoragePlugin2.getConfig();
5580
+ if (!pluginConfig.encryption?.enabled) return text;
5581
+ const encrypted = CryptoJS.AES.encrypt(text, CryptoJS.enc.Hex.parse(pluginConfig.encryption.secretKey), {
5582
+ iv: CryptoJS.enc.Hex.parse(pluginConfig.encryption.iv),
5583
+ mode: CryptoJS.mode.CBC,
5584
+ padding: CryptoJS.pad.Pkcs7
5585
+ }).toString();
5586
+ return encrypted;
5612
5587
  };
5613
- var desaturateColor = (hexColor, amount) => {
5614
- let hex = hexColor.replace(/^#/, "");
5615
- if (hex.length === 3) {
5616
- hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
5588
+ var decryptString = (text) => {
5589
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "decryptString")) return void 0;
5590
+ const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find((plugin) => plugin.name === "localStorage");
5591
+ if (!localStoragePlugin2) {
5592
+ throw new Error(
5593
+ "`decryptString` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
5594
+ );
5617
5595
  }
5618
- const safeAmount = Math.max(0, Math.min(1, amount));
5619
- const r = parseInt(hex.substring(0, 2), 16);
5620
- const g = parseInt(hex.substring(2, 4), 16);
5621
- const b = parseInt(hex.substring(4, 6), 16);
5622
- const [h, s, l] = rgbToHsl(r, g, b);
5623
- const newSaturation = Math.max(0, s * (1 - safeAmount));
5624
- const [newR, newG, newB] = hslToRgb(h, newSaturation, l);
5625
- const rHex = Math.round(newR).toString(16).padStart(2, "0");
5626
- const gHex = Math.round(newG).toString(16).padStart(2, "0");
5627
- const bHex = Math.round(newB).toString(16).padStart(2, "0");
5628
- return `#${rHex}${gHex}${bHex}`;
5596
+ const pluginConfig = localStoragePlugin2.getConfig();
5597
+ if (!pluginConfig.encryption?.enabled) return text;
5598
+ const decrypted = CryptoJS.AES.decrypt(text, CryptoJS.enc.Hex.parse(pluginConfig.encryption.secretKey), {
5599
+ iv: CryptoJS.enc.Hex.parse(pluginConfig.encryption.iv),
5600
+ mode: CryptoJS.mode.CBC,
5601
+ padding: CryptoJS.pad.Pkcs7
5602
+ });
5603
+ return decrypted.toString(CryptoJS.enc.Utf8);
5629
5604
  };
5630
5605
 
5631
- // src/components/Chip.tsx
5632
- import { jsx as jsx14 } from "react/jsx-runtime";
5633
- var ChipComponent = forwardRef9(function Chip({ text, color, backgroundColor, borderRadius, isCircle, ...props }, ref) {
5634
- const theme2 = useTheme();
5635
- return /* @__PURE__ */ jsx14(
5636
- Div_default,
5637
- {
5638
- width: "fit-content",
5639
- backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
5640
- borderRadius: isCircle ? 999 : borderRadius ?? theme2.styles.borderRadius / 1.3,
5641
- paddingBlock: theme2.styles.gap / 2,
5642
- paddingInline: theme2.styles.space / 1.5,
5643
- ...props,
5644
- ref,
5645
- children: /* @__PURE__ */ jsx14(Text_default, { color: color ?? theme2.colors.textPrimary, children: text })
5646
- }
5647
- );
5648
- });
5649
- ChipComponent.colored = forwardRef9(function Colored({ color, ...props }, ref) {
5650
- const theme2 = useTheme();
5651
- const { colorTheme } = useBetterHtmlContextInternal();
5652
- const readyColor = color ?? theme2.colors.textSecondary;
5653
- return /* @__PURE__ */ jsx14(
5654
- ChipComponent,
5655
- {
5656
- color: colorTheme === "light" ? darkenColor(readyColor, 0.7) : lightenColor(readyColor, 0.7),
5657
- backgroundColor: readyColor + "40",
5658
- border: `1px solid ${readyColor}`,
5659
- ref,
5660
- ...props
5661
- }
5662
- );
5663
- });
5664
- var Chip2 = memo14(ChipComponent);
5665
- Chip2.colored = ChipComponent.colored;
5666
- var Chip_default = Chip2;
5667
-
5668
- // src/components/InputField.tsx
5669
- import { forwardRef as forwardRef11, memo as memo18, useCallback as useCallback9, useState as useState7, useEffect as useEffect8, useMemo as useMemo6, useRef as useRef5, useId as useId2 } from "react";
5670
- import styled10 from "styled-components";
5671
-
5672
5606
  // src/components/Label.tsx
5673
5607
  import { memo as memo15 } from "react";
5674
5608
  import { jsxs as jsxs10 } from "react/jsx-runtime";
@@ -7506,6 +7440,10 @@ var FormComponent = forwardRef13(function Form({
7506
7440
  submitButtonId,
7507
7441
  submitButtonIsDisabled,
7508
7442
  cancelButtonText,
7443
+ cancelButtonLoaderName,
7444
+ cancelButtonIsLoading,
7445
+ cancelButtonId,
7446
+ cancelButtonIsDisabled,
7509
7447
  actionButtonsLocation = "right",
7510
7448
  gap,
7511
7449
  isDestructive,
@@ -7539,7 +7477,17 @@ var FormComponent = forwardRef13(function Form({
7539
7477
  marginTop: theme2.styles.space,
7540
7478
  children: [
7541
7479
  renderActionButtons,
7542
- onClickCancel && /* @__PURE__ */ jsx19(Button_default.secondary, { text: cancelButtonText ?? "Cancel", onClick: onClickCancel }),
7480
+ onClickCancel && /* @__PURE__ */ jsx19(
7481
+ Button_default.secondary,
7482
+ {
7483
+ text: cancelButtonText ?? "Cancel",
7484
+ isLoading: cancelButtonIsLoading,
7485
+ loaderName: cancelButtonLoaderName,
7486
+ disabled: cancelButtonIsDisabled,
7487
+ id: cancelButtonId,
7488
+ onClick: onClickCancel
7489
+ }
7490
+ ),
7543
7491
  /* @__PURE__ */ jsx19(
7544
7492
  SubmitButtonTag,
7545
7493
  {
@@ -7646,7 +7594,7 @@ var ColorThemeSwitchComponent = function ColorThemeSwitch({
7646
7594
  }) {
7647
7595
  const form = useForm({
7648
7596
  defaultValues: {
7649
- darkMode: LocalStorage.getItem("theme") === "dark"
7597
+ darkMode: localStorage.getItem("theme") === "dark"
7650
7598
  }
7651
7599
  });
7652
7600
  useEffect9(() => {
@@ -9251,6 +9199,71 @@ FoldableComponent.box = forwardRef18(function Box3({ ...props }, ref) {
9251
9199
  var Foldable2 = memo25(FoldableComponent);
9252
9200
  Foldable2.box = FoldableComponent.box;
9253
9201
  var Foldable_default = Foldable2;
9202
+
9203
+ // src/utils/localStorage.ts
9204
+ function generateLocalStorage() {
9205
+ return {
9206
+ setItem: (name, value) => {
9207
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "generateLocalStorage.setItem"))
9208
+ return void 0;
9209
+ const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find(
9210
+ (plugin) => plugin.name === "localStorage"
9211
+ );
9212
+ if (!localStoragePlugin2) {
9213
+ throw new Error(
9214
+ "`generateLocalStorage.setItem` function requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
9215
+ );
9216
+ }
9217
+ const pluginConfig = localStoragePlugin2.getConfig();
9218
+ const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
9219
+ const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
9220
+ const readyValue = encryptionEnabled ? encryptString(JSON.stringify(value)) : JSON.stringify(value);
9221
+ if (value) localStorage.setItem(readyName.toString(), readyValue);
9222
+ else localStorage.removeItem(readyName.toString());
9223
+ },
9224
+ getItem: (name) => {
9225
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "generateLocalStorage.getItem"))
9226
+ return void 0;
9227
+ const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find(
9228
+ (plugin) => plugin.name === "localStorage"
9229
+ );
9230
+ if (!localStoragePlugin2) {
9231
+ throw new Error(
9232
+ "`generateLocalStorage.getItem` function requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
9233
+ );
9234
+ }
9235
+ const pluginConfig = localStoragePlugin2.getConfig();
9236
+ const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
9237
+ const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
9238
+ const item = localStorage.getItem(readyName.toString());
9239
+ if (item === null) return void 0;
9240
+ try {
9241
+ return encryptionEnabled ? JSON.parse(decryptString(item)) : JSON.parse(item);
9242
+ } catch (error) {
9243
+ return void 0;
9244
+ }
9245
+ },
9246
+ removeItem: (name) => {
9247
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "generateLocalStorage.removeItem"))
9248
+ return void 0;
9249
+ const localStoragePlugin2 = externalBetterHtmlContextValue.plugins.find(
9250
+ (plugin) => plugin.name === "localStorage"
9251
+ );
9252
+ if (!localStoragePlugin2) {
9253
+ throw new Error(
9254
+ "`generateLocalStorage.removeItem` function requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
9255
+ );
9256
+ }
9257
+ const pluginConfig = localStoragePlugin2.getConfig();
9258
+ const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
9259
+ const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
9260
+ localStorage.removeItem(readyName.toString());
9261
+ },
9262
+ removeAllItems: () => {
9263
+ localStorage.clear();
9264
+ }
9265
+ };
9266
+ }
9254
9267
  export {
9255
9268
  BetterHtmlProvider_default as BetterHtmlProvider,
9256
9269
  Button_default as Button,