@rpcbase/ui 0.202.0 → 0.204.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +25 -73
- package/dist/index10.js +18 -28
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +8 -8
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +8 -7
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +14 -7
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +9 -9
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +14 -148
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +21 -43
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +27 -7
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +8 -10
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +8 -16
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +9 -16
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +1674 -41
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +9 -10
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +8 -34
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +8 -13
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +11 -13
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +10 -11
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +37 -16
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +10 -104
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +9 -23
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +10 -56
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +12 -75
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +10 -470
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +8 -12
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +9 -23
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +8 -19
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +8 -26
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +9 -9
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +8 -8
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +9 -27
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +11 -38
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +60 -19
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +9 -9
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +22 -140
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +23 -8
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +22 -7
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +37 -7
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +8 -7
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +11 -6
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +17 -9
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +14 -27
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +9 -10
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +8 -9
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +8 -8
- package/dist/index139.js.map +1 -1
- package/dist/index14.js +194 -78
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +8 -6
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +8 -6
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +7 -7
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +9 -6
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +24 -8
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +11 -6
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +10 -6
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +9 -6
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +9 -8
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +7 -10
- package/dist/index149.js.map +1 -1
- package/dist/index15.js +33 -874
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +7 -8
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +9 -50
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +8 -50
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +9 -209
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +8 -25
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +7 -27
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +8 -403
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +32 -609
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +35 -19
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +18 -8
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +57 -23
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +14 -8
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +12 -61
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +19 -69
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +89 -9
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +50 -7
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +20 -10
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +11 -20
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +13 -8
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +8 -8
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +25 -16
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +9 -20
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +10 -13
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +9 -17
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +9 -17
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +7 -8
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +9 -9
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +70 -10
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +20 -9
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +15 -12
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +12 -8
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +23 -8
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +27 -460
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +20 -12
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +58 -8
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +13 -8
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +9 -7
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +29 -14
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +29 -13
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +16 -13
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +16 -14
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +9 -14
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +26 -13
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +65 -666
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +388 -10
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +499 -10
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +134 -9
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +55 -9
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +80 -10
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +902 -9
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +22 -58
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +452 -12
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +7 -22
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +60 -32
- package/dist/index199.js.map +1 -1
- package/dist/index2.js +10 -8
- package/dist/index20.js +43 -469
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +63 -15
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +11 -28
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +19 -8
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +148 -20
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +7 -11
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +13 -13
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +107 -13
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +359 -23
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +99 -14
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +329 -12
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +12 -266
- package/dist/index21.js.map +1 -1
- package/dist/index210.js +213 -12
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +22 -8
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +30 -8
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +189 -18
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +21 -13
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +46 -21
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +12 -18
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +28 -16
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +47 -8
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +19 -70
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +16 -8
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +6 -5
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +8 -367
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +24 -265
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +27 -63
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +68 -47
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +17 -172
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +7 -113
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +53 -27
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +8 -10
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +28 -6
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +109 -30
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +16 -8
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +12 -7
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +3 -470
- package/dist/index233.js +28 -188
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +68 -107
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +3 -266
- package/dist/index236.js +14 -12
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +53 -45
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +117 -7
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +9 -28
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +3 -269
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +15 -31
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +689 -7
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +256 -71
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +704 -184
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +7433 -49
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +9 -7
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +16 -22
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +8 -15
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +462 -16
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +41 -158
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +11 -179
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +21 -32
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +30 -12
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +8 -52
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +62 -15
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +10 -47
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +14 -97
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +6 -90
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +20 -109
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +28 -55
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +47 -15
- package/dist/index259.js.map +1 -1
- package/dist/index26.js +22 -16
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +16 -40
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +28 -11
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +20 -119
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +38 -20
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +8 -18
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +12 -6
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +11 -39
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +12 -23
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +13 -12
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +10 -11
- package/dist/index269.js.map +1 -1
- package/dist/index27.js +61 -2924
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +76 -22
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +174 -31
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +118 -20
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +18 -8
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +83 -5
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +49 -26
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +15 -114
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +19 -18
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +98 -523
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +60 -131
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +58 -5
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +109 -134
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +75 -9
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +117 -9
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +59 -7
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +46 -18
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +146 -12
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +143 -9
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +258 -8
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +241 -546
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +302 -50
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +1 -40
- package/dist/index290.js +9 -21
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +9 -9
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +10 -11
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +9 -10
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +9 -11
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +24 -15
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +13 -12
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +130 -17
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +167 -23
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +69 -65
- package/dist/index299.js.map +1 -1
- package/dist/index3.js +6 -5
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +6 -6
- package/dist/index300.js +113 -72
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +495 -12
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +65 -16
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7 -69
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +30 -7
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +68 -58
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +155 -70
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +563 -32
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +213 -11
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +335 -156
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +8 -128
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +271 -110
- package/dist/index310.js.map +1 -1
- package/dist/index32.js +8 -234
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +8 -26
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +11 -54
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +13 -24
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +9 -133
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +11 -225
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +12 -94
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +15 -121
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +24 -28
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +9 -8
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +10 -847
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +10 -60
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +12 -10
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +12 -5
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +8 -14
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +8 -21
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +14 -10
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +15 -5
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +10 -26
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +34 -48
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +7 -236
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +9 -9
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +9 -36
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +9 -29
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +12 -10
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +16 -14
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +10 -5
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +10 -5
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +10 -5
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +17 -5
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +42 -227
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +11 -208
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +11 -6
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +70 -50
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +10 -53
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +33 -10
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +13 -18
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +19 -137
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +203 -13
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +22 -218
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +20 -16
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +225 -37
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +125 -49
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +21 -52
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +12 -7
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +12 -8
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +17 -31
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +13 -53
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +13 -12
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +8 -55
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +44 -7
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +383 -7
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +36 -32
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +41 -18
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +25 -9
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +60 -10
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +10 -19
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +8 -7
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +8 -7
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +8 -8
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +8 -8
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +9 -7
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +9 -7
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +33 -181
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +13 -9
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +10 -27
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +9 -9
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +8 -7
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +10 -9
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +50 -8
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +108 -7
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +13 -8
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +9 -7
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +9 -11
- package/dist/index99.js.map +1 -1
- package/package.json +6 -6
- package/dist/index.js.map +0 -1
- package/dist/index2.js.map +0 -1
- package/dist/index232.js.map +0 -1
- package/dist/index235.js.map +0 -1
- package/dist/index29.js.map +0 -1
- package/dist/index30.js.map +0 -1
- package/dist/index311.js +0 -7
- package/dist/index311.js.map +0 -1
- package/dist/index312.js +0 -26
- package/dist/index312.js.map +0 -1
- package/dist/index313.js +0 -19
- package/dist/index313.js.map +0 -1
- package/dist/index314.js +0 -32
- package/dist/index314.js.map +0 -1
- package/dist/index315.js +0 -16
- package/dist/index315.js.map +0 -1
- package/dist/index316.js +0 -10
- package/dist/index316.js.map +0 -1
- package/dist/index317.js +0 -26
- package/dist/index317.js.map +0 -1
- package/dist/index318.js +0 -16
- package/dist/index318.js.map +0 -1
- package/dist/index319.js +0 -31
- package/dist/index319.js.map +0 -1
- package/dist/index320.js +0 -8
- package/dist/index320.js.map +0 -1
package/dist/index249.js
CHANGED
|
@@ -1,158 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (this.context = [{
|
|
43
|
-
or: !0,
|
|
44
|
-
instructions: []
|
|
45
|
-
}], this.parsePattern(r), this.context.length !== 1)
|
|
46
|
-
throw new Error("Non-finalized contexts left when pattern parse ended");
|
|
47
|
-
var n = this.context[0], i = n.branches, o = n.instructions;
|
|
48
|
-
if (i)
|
|
49
|
-
return {
|
|
50
|
-
op: "|",
|
|
51
|
-
args: i.concat([a(o)])
|
|
52
|
-
};
|
|
53
|
-
if (o.length === 0)
|
|
54
|
-
throw new Error("Pattern is required");
|
|
55
|
-
return o.length === 1 ? o[0] : o;
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
key: "startContext",
|
|
59
|
-
value: function(r) {
|
|
60
|
-
this.context.push(r);
|
|
61
|
-
}
|
|
62
|
-
}, {
|
|
63
|
-
key: "endContext",
|
|
64
|
-
value: function() {
|
|
65
|
-
this.context.pop();
|
|
66
|
-
}
|
|
67
|
-
}, {
|
|
68
|
-
key: "getContext",
|
|
69
|
-
value: function() {
|
|
70
|
-
return this.context[this.context.length - 1];
|
|
71
|
-
}
|
|
72
|
-
}, {
|
|
73
|
-
key: "parsePattern",
|
|
74
|
-
value: function(r) {
|
|
75
|
-
if (!r)
|
|
76
|
-
throw new Error("Pattern is required");
|
|
77
|
-
var n = r.match(w);
|
|
78
|
-
if (!n) {
|
|
79
|
-
if (C.test(r))
|
|
80
|
-
throw new Error("Illegal characters found in a pattern: ".concat(r));
|
|
81
|
-
this.getContext().instructions = this.getContext().instructions.concat(r.split(""));
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
var i = n[1], o = r.slice(0, n.index), c = r.slice(n.index + i.length);
|
|
85
|
-
switch (i) {
|
|
86
|
-
case "(?:":
|
|
87
|
-
o && this.parsePattern(o), this.startContext({
|
|
88
|
-
or: !0,
|
|
89
|
-
instructions: [],
|
|
90
|
-
branches: []
|
|
91
|
-
});
|
|
92
|
-
break;
|
|
93
|
-
case ")":
|
|
94
|
-
if (!this.getContext().or)
|
|
95
|
-
throw new Error('")" operator must be preceded by "(?:" operator');
|
|
96
|
-
if (o && this.parsePattern(o), this.getContext().instructions.length === 0)
|
|
97
|
-
throw new Error('No instructions found after "|" operator in an "or" group');
|
|
98
|
-
var h = this.getContext(), u = h.branches;
|
|
99
|
-
u.push(a(this.getContext().instructions)), this.endContext(), this.getContext().instructions.push({
|
|
100
|
-
op: "|",
|
|
101
|
-
args: u
|
|
102
|
-
});
|
|
103
|
-
break;
|
|
104
|
-
case "|":
|
|
105
|
-
if (!this.getContext().or)
|
|
106
|
-
throw new Error('"|" operator can only be used inside "or" groups');
|
|
107
|
-
if (o && this.parsePattern(o), !this.getContext().branches)
|
|
108
|
-
if (this.context.length === 1)
|
|
109
|
-
this.getContext().branches = [];
|
|
110
|
-
else
|
|
111
|
-
throw new Error('"branches" not found in an "or" group context');
|
|
112
|
-
this.getContext().branches.push(a(this.getContext().instructions)), this.getContext().instructions = [];
|
|
113
|
-
break;
|
|
114
|
-
case "[":
|
|
115
|
-
o && this.parsePattern(o), this.startContext({
|
|
116
|
-
oneOfSet: !0
|
|
117
|
-
});
|
|
118
|
-
break;
|
|
119
|
-
case "]":
|
|
120
|
-
if (!this.getContext().oneOfSet)
|
|
121
|
-
throw new Error('"]" operator must be preceded by "[" operator');
|
|
122
|
-
this.endContext(), this.getContext().instructions.push({
|
|
123
|
-
op: "[]",
|
|
124
|
-
args: b(o)
|
|
125
|
-
});
|
|
126
|
-
break;
|
|
127
|
-
/* istanbul ignore next */
|
|
128
|
-
default:
|
|
129
|
-
throw new Error("Unknown operator: ".concat(i));
|
|
130
|
-
}
|
|
131
|
-
c && this.parsePattern(c);
|
|
132
|
-
}
|
|
133
|
-
}]);
|
|
134
|
-
})();
|
|
135
|
-
function b(t) {
|
|
136
|
-
for (var e = [], r = 0; r < t.length; ) {
|
|
137
|
-
if (t[r] === "-") {
|
|
138
|
-
if (r === 0 || r === t.length - 1)
|
|
139
|
-
throw new Error("Couldn't parse a one-of set pattern: ".concat(t));
|
|
140
|
-
for (var n = t[r - 1].charCodeAt(0) + 1, i = t[r + 1].charCodeAt(0) - 1, o = n; o <= i; )
|
|
141
|
-
e.push(String.fromCharCode(o)), o++;
|
|
142
|
-
} else
|
|
143
|
-
e.push(t[r]);
|
|
144
|
-
r++;
|
|
145
|
-
}
|
|
146
|
-
return e;
|
|
147
|
-
}
|
|
148
|
-
var C = /[\(\)\[\]\?\:\|]/, w = new RegExp(
|
|
149
|
-
// any of:
|
|
150
|
-
"(\\||\\(\\?\\:|\\)|\\[|\\])"
|
|
151
|
-
);
|
|
152
|
-
function a(t) {
|
|
153
|
-
return t.length === 1 ? t[0] : t;
|
|
154
|
-
}
|
|
155
|
-
export {
|
|
156
|
-
y as default
|
|
157
|
-
};
|
|
158
|
-
//# sourceMappingURL=index249.js.map
|
|
1
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/mergeArrays.js
|
|
2
|
+
function e(e, n) {
|
|
3
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
4
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
5
|
+
if (Array.isArray(e) || (r = t(e)) || n && e && typeof e.length == "number") {
|
|
6
|
+
r && (e = r);
|
|
7
|
+
var i = 0;
|
|
8
|
+
return function() {
|
|
9
|
+
return i >= e.length ? { done: !0 } : {
|
|
10
|
+
done: !1,
|
|
11
|
+
value: e[i++]
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
16
|
+
}
|
|
17
|
+
function t(e, t) {
|
|
18
|
+
if (e) {
|
|
19
|
+
if (typeof e == "string") return n(e, t);
|
|
20
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
21
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? n(e, t) : void 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function n(e, t) {
|
|
25
|
+
(t == null || t > e.length) && (t = e.length);
|
|
26
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
27
|
+
return r;
|
|
28
|
+
}
|
|
29
|
+
function r(t, n) {
|
|
30
|
+
for (var r = t.slice(), i = e(n), a; !(a = i()).done;) {
|
|
31
|
+
var o = a.value;
|
|
32
|
+
t.indexOf(o) < 0 && r.push(o);
|
|
33
|
+
}
|
|
34
|
+
return r.sort(function(e, t) {
|
|
35
|
+
return e - t;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { r as default };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=index249.js.map
|
package/dist/index249.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index249.js","sources":["../../../node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar PatternParser = /*#__PURE__*/function () {\n function PatternParser() {\n _classCallCheck(this, PatternParser);\n }\n return _createClass(PatternParser, [{\n key: \"parse\",\n value: function parse(pattern) {\n this.context = [{\n or: true,\n instructions: []\n }];\n this.parsePattern(pattern);\n if (this.context.length !== 1) {\n throw new Error('Non-finalized contexts left when pattern parse ended');\n }\n var _this$context$ = this.context[0],\n branches = _this$context$.branches,\n instructions = _this$context$.instructions;\n if (branches) {\n return {\n op: '|',\n args: branches.concat([expandSingleElementArray(instructions)])\n };\n }\n\n /* istanbul ignore if */\n if (instructions.length === 0) {\n throw new Error('Pattern is required');\n }\n if (instructions.length === 1) {\n return instructions[0];\n }\n return instructions;\n }\n }, {\n key: \"startContext\",\n value: function startContext(context) {\n this.context.push(context);\n }\n }, {\n key: \"endContext\",\n value: function endContext() {\n this.context.pop();\n }\n }, {\n key: \"getContext\",\n value: function getContext() {\n return this.context[this.context.length - 1];\n }\n }, {\n key: \"parsePattern\",\n value: function parsePattern(pattern) {\n if (!pattern) {\n throw new Error('Pattern is required');\n }\n var match = pattern.match(OPERATOR);\n if (!match) {\n if (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {\n throw new Error(\"Illegal characters found in a pattern: \".concat(pattern));\n }\n this.getContext().instructions = this.getContext().instructions.concat(pattern.split(''));\n return;\n }\n var operator = match[1];\n var before = pattern.slice(0, match.index);\n var rightPart = pattern.slice(match.index + operator.length);\n switch (operator) {\n case '(?:':\n if (before) {\n this.parsePattern(before);\n }\n this.startContext({\n or: true,\n instructions: [],\n branches: []\n });\n break;\n case ')':\n if (!this.getContext().or) {\n throw new Error('\")\" operator must be preceded by \"(?:\" operator');\n }\n if (before) {\n this.parsePattern(before);\n }\n if (this.getContext().instructions.length === 0) {\n throw new Error('No instructions found after \"|\" operator in an \"or\" group');\n }\n var _this$getContext = this.getContext(),\n branches = _this$getContext.branches;\n branches.push(expandSingleElementArray(this.getContext().instructions));\n this.endContext();\n this.getContext().instructions.push({\n op: '|',\n args: branches\n });\n break;\n case '|':\n if (!this.getContext().or) {\n throw new Error('\"|\" operator can only be used inside \"or\" groups');\n }\n if (before) {\n this.parsePattern(before);\n }\n // The top-level is an implicit \"or\" group, if required.\n if (!this.getContext().branches) {\n // `branches` are not defined only for the root implicit \"or\" operator.\n /* istanbul ignore else */\n if (this.context.length === 1) {\n this.getContext().branches = [];\n } else {\n throw new Error('\"branches\" not found in an \"or\" group context');\n }\n }\n this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions));\n this.getContext().instructions = [];\n break;\n case '[':\n if (before) {\n this.parsePattern(before);\n }\n this.startContext({\n oneOfSet: true\n });\n break;\n case ']':\n if (!this.getContext().oneOfSet) {\n throw new Error('\"]\" operator must be preceded by \"[\" operator');\n }\n this.endContext();\n this.getContext().instructions.push({\n op: '[]',\n args: parseOneOfSet(before)\n });\n break;\n\n /* istanbul ignore next */\n default:\n throw new Error(\"Unknown operator: \".concat(operator));\n }\n if (rightPart) {\n this.parsePattern(rightPart);\n }\n }\n }]);\n}();\nexport { PatternParser as default };\nfunction parseOneOfSet(pattern) {\n var values = [];\n var i = 0;\n while (i < pattern.length) {\n if (pattern[i] === '-') {\n if (i === 0 || i === pattern.length - 1) {\n throw new Error(\"Couldn't parse a one-of set pattern: \".concat(pattern));\n }\n var prevValue = pattern[i - 1].charCodeAt(0) + 1;\n var nextValue = pattern[i + 1].charCodeAt(0) - 1;\n var value = prevValue;\n while (value <= nextValue) {\n values.push(String.fromCharCode(value));\n value++;\n }\n } else {\n values.push(pattern[i]);\n }\n i++;\n }\n return values;\n}\nvar ILLEGAL_CHARACTER_REGEXP = /[\\(\\)\\[\\]\\?\\:\\|]/;\nvar OPERATOR = new RegExp(\n// any of:\n'(' +\n// or operator\n'\\\\|' +\n// or\n'|' +\n// or group start\n'\\\\(\\\\?\\\\:' +\n// or\n'|' +\n// or group end\n'\\\\)' +\n// or\n'|' +\n// one-of set start\n'\\\\[' +\n// or\n'|' +\n// one-of set end\n'\\\\]' + ')');\nfunction expandSingleElementArray(array) {\n if (array.length === 1) {\n return array[0];\n }\n return array;\n}\n//# sourceMappingURL=AsYouTypeFormatter.PatternParser.js.map"],"names":["_typeof","o","_classCallCheck","a","n","_defineProperties","e","r","t","_toPropertyKey","_createClass","i","_toPrimitive","PatternParser","pattern","_this$context$","branches","instructions","expandSingleElementArray","context","match","OPERATOR","ILLEGAL_CHARACTER_REGEXP","operator","before","rightPart","_this$getContext","parseOneOfSet","values","prevValue","nextValue","value","array"],"mappings":"AAAA,SAASA,EAAQC,GAAG;AAAE;AAA2B,SAAOD,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAUC,GAAG;AAAE,WAAO,OAAOA;AAAA,EAAG,IAAI,SAAUA,GAAG;AAAE,WAAOA,KAAmB,OAAO,UAArB,cAA+BA,EAAE,gBAAgB,UAAUA,MAAM,OAAO,YAAY,WAAW,OAAOA;AAAA,EAAG,GAAGD,EAAQC,CAAC;AAAG;AAC7T,SAASC,EAAgBC,GAAGC,GAAG;AAAE,MAAI,EAAED,aAAaC,GAAI,OAAM,IAAI,UAAU,mCAAmC;AAAG;AAClH,SAASC,EAAkBC,GAAGC,GAAG;AAAE,WAASC,IAAI,GAAGA,IAAID,EAAE,QAAQC,KAAK;AAAE,QAAIP,IAAIM,EAAEC,CAAC;AAAG,IAAAP,EAAE,aAAaA,EAAE,cAAc,IAAIA,E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J,GAAC;AAED,SAASE,EAAcb,GAAS;AAG9B,WAFIc,IAAS,CAAA,GACTjB,IAAI,GACDA,IAAIG,EAAQ,UAAQ;AACzB,QAAIA,EAAQH,CAAC,MAAM,KAAK;AACtB,UAAIA,MAAM,KAAKA,MAAMG,EAAQ,SAAS;AACpC,cAAM,IAAI,MAAM,wCAAwC,OAAOA,CAAO,CAAC;AAKzE,eAHIe,IAAYf,EAAQH,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI,GAC3CmB,IAAYhB,EAAQH,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI,GAC3CoB,IAAQF,GACLE,KAASD;AACd,QAAAF,EAAO,KAAK,OAAO,aAAaG,CAAK,CAAC,GACtCA;AAAA,IAEJ;AACE,MAAAH,EAAO,KAAKd,EAAQH,CAAC,CAAC;AAExB,IAAAA;AAAA,EACF;AACA,SAAOiB;AACT;AACA,IAAIN,IAA2B,oBAC3BD,IAAW,IAAI;AAAA;AAAA,EAEnB;AAkBW;AACX,SAASH,EAAyBc,GAAO;AACvC,SAAIA,EAAM,WAAW,IACZA,EAAM,CAAC,IAETA;AACT;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index249.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/mergeArrays.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n/**\r\n * Merges two arrays.\r\n * @param {*} a\r\n * @param {*} b\r\n * @return {*}\r\n */\nexport default function mergeArrays(a, b) {\n var merged = a.slice();\n for (var _iterator = _createForOfIteratorHelperLoose(b), _step; !(_step = _iterator()).done;) {\n var element = _step.value;\n if (a.indexOf(element) < 0) {\n merged.push(element);\n }\n }\n return merged.sort(function (a, b) {\n return a - b;\n });\n\n // ES6 version, requires Set polyfill.\n // let merged = new Set(a)\n // for (const element of b) {\n // \tmerged.add(i)\n // }\n // return Array.from(merged).sort((a, b) => a - b)\n}\n//# sourceMappingURL=mergeArrays.js.map"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAgC,GAAG,GAAG;CAAE,IAAI,IAAmB,OAAO,SAAtB,OAAgC,EAAE,OAAO,aAAa,EAAE;AAAe,KAAI,EAAG,SAAQ,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK,EAAE;AAAE,KAAI,MAAM,QAAQ,EAAE,KAAK,IAAI,EAA4B,EAAE,KAAK,KAAK,KAAiB,OAAO,EAAE,UAArB,UAA6B;AAAE,QAAM,IAAI;EAAI,IAAI,IAAI;AAAG,SAAO,WAAY;AAAE,UAAO,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,GAAG;IAAE,MAAM,CAAC;IAAG,OAAO,EAAE;IAAM;;;AAAO,OAAU,UAAU,wIAAwI;;AACviB,SAAS,EAA4B,GAAG,GAAG;AAAE,KAAI,GAAG;AAAE,MAAgB,OAAO,KAAnB,SAAsB,QAAO,EAAkB,GAAG,EAAE;EAAE,IAAI,IAAI,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG;AAAE,SAAoB,MAAb,YAAkB,EAAE,gBAAgB,IAAI,EAAE,YAAY,OAAiB,MAAV,SAAyB,MAAV,QAAc,MAAM,KAAK,EAAE,GAAmB,MAAhB,eAAqB,2CAA2C,KAAK,EAAE,GAAG,EAAkB,GAAG,EAAE,GAAG,KAAK;;;AACpX,SAAS,EAAkB,GAAG,GAAG;AAAE,EAAS,KAAR,QAAa,IAAI,EAAE,YAAY,IAAI,EAAE;AAAS,MAAK,IAAI,IAAI,GAAG,IAAI,MAAM,EAAE,EAAE,IAAI,GAAG,IAAK,GAAE,KAAK,EAAE;AAAI,QAAO;;AAOhJ,SAAwB,EAAY,GAAG,GAAG;AAExC,MAAK,IADD,IAAS,EAAE,OAAO,EACb,IAAY,EAAgC,EAAE,EAAE,GAAO,EAAE,IAAQ,GAAW,EAAE,OAAO;EAC5F,IAAI,IAAU,EAAM;AACpB,EAAI,EAAE,QAAQ,EAAQ,GAAG,KACvB,EAAO,KAAK,EAAQ;;AAGxB,QAAO,EAAO,KAAK,SAAU,GAAG,GAAG;AACjC,SAAO,IAAI;GACX"}
|
package/dist/index25.js
CHANGED
|
@@ -1,180 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}, {
|
|
9
|
-
value: "daily",
|
|
10
|
-
label: "Daily"
|
|
11
|
-
}, {
|
|
12
|
-
value: "weekly",
|
|
13
|
-
label: "Weekly"
|
|
14
|
-
}], f = (r) => {
|
|
15
|
-
const o = r?.digestFrequency, s = o === "off" || o === "daily" || o === "weekly" ? o : "weekly", p = Array.isArray(r?.topicPreferences) ? r.topicPreferences.map((i) => ({
|
|
16
|
-
topic: typeof i.topic == "string" ? i.topic.trim() : "",
|
|
17
|
-
inApp: i.inApp === !0,
|
|
18
|
-
emailDigest: i.emailDigest === !0,
|
|
19
|
-
push: i.push === !0
|
|
20
|
-
})).filter((i) => i.topic.length > 0) : [];
|
|
21
|
-
return {
|
|
22
|
-
digestFrequency: s,
|
|
23
|
-
topicPreferences: p,
|
|
24
|
-
...typeof r?.lastDigestSentAt == "string" ? {
|
|
25
|
-
lastDigestSentAt: r.lastDigestSentAt
|
|
26
|
-
} : {}
|
|
27
|
-
};
|
|
28
|
-
}, T = (r) => {
|
|
29
|
-
if (!Array.isArray(r)) return [];
|
|
30
|
-
const o = /* @__PURE__ */ new Set();
|
|
31
|
-
return r.map((s) => ({
|
|
32
|
-
topic: typeof s.topic == "string" ? s.topic.trim() : "",
|
|
33
|
-
title: typeof s.title == "string" ? s.title.trim() : "",
|
|
34
|
-
description: typeof s.description == "string" ? s.description.trim() : void 0
|
|
35
|
-
})).filter((s) => s.topic.length > 0).filter((s) => o.has(s.topic) ? !1 : (o.add(s.topic), !0));
|
|
36
|
-
}, y = (r, o) => {
|
|
37
|
-
const s = {
|
|
38
|
-
topic: "",
|
|
39
|
-
inApp: !0,
|
|
40
|
-
emailDigest: !0,
|
|
41
|
-
push: !1
|
|
42
|
-
}, p = new Map(r.topicPreferences.map((i) => [i.topic, i]));
|
|
43
|
-
return {
|
|
44
|
-
...r,
|
|
45
|
-
topicPreferences: o.map((i) => {
|
|
46
|
-
const d = p.get(i.topic);
|
|
47
|
-
return d ? {
|
|
48
|
-
topic: i.topic,
|
|
49
|
-
inApp: d.inApp === !0,
|
|
50
|
-
emailDigest: d.emailDigest === !0,
|
|
51
|
-
push: d.push === !0
|
|
52
|
-
} : {
|
|
53
|
-
...s,
|
|
54
|
-
topic: i.topic
|
|
55
|
-
};
|
|
56
|
-
})
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
function z({
|
|
60
|
-
className: r,
|
|
61
|
-
topics: o
|
|
62
|
-
}) {
|
|
63
|
-
const [s, p] = g(!0), [i, d] = g(!1), [j, u] = g(null), [m, h] = g(() => f({
|
|
64
|
-
digestFrequency: "weekly",
|
|
65
|
-
topicPreferences: []
|
|
66
|
-
})), a = A(() => T(o), [o]), P = async () => {
|
|
67
|
-
p(!0), u(null);
|
|
68
|
-
try {
|
|
69
|
-
const t = await fetch("/api/rb/notifications/settings", {
|
|
70
|
-
method: "GET",
|
|
71
|
-
credentials: "include"
|
|
72
|
-
}), c = await t.json().catch(() => null);
|
|
73
|
-
if (!t.ok || !c?.ok) {
|
|
74
|
-
u(c?.error || "Unable to load notification settings.");
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const n = f(c.settings);
|
|
78
|
-
h(a.length > 0 ? y(n, a) : n);
|
|
79
|
-
} catch {
|
|
80
|
-
u("Unable to load notification settings.");
|
|
81
|
-
} finally {
|
|
82
|
-
p(!1);
|
|
83
|
-
}
|
|
84
|
-
}, v = async (t) => {
|
|
85
|
-
d(!0), u(null);
|
|
86
|
-
try {
|
|
87
|
-
const c = await fetch("/api/rb/notifications/settings", {
|
|
88
|
-
method: "PUT",
|
|
89
|
-
headers: {
|
|
90
|
-
"Content-Type": "application/json"
|
|
91
|
-
},
|
|
92
|
-
credentials: "include",
|
|
93
|
-
body: JSON.stringify({
|
|
94
|
-
digestFrequency: t.digestFrequency,
|
|
95
|
-
topicPreferences: t.topicPreferences
|
|
96
|
-
})
|
|
97
|
-
}), n = await c.json().catch(() => null);
|
|
98
|
-
if (!c.ok || !n?.ok) {
|
|
99
|
-
u(n?.error || "Unable to save notification settings.");
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
const l = f(n.settings);
|
|
103
|
-
h(a.length > 0 ? y(l, a) : l);
|
|
104
|
-
} catch {
|
|
105
|
-
u("Unable to save notification settings.");
|
|
106
|
-
} finally {
|
|
107
|
-
d(!1);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
k(() => {
|
|
111
|
-
P();
|
|
112
|
-
}, []), k(() => {
|
|
113
|
-
a.length !== 0 && h((t) => y(t, a));
|
|
114
|
-
}, [a]);
|
|
115
|
-
const N = (t, c) => {
|
|
116
|
-
const l = m.topicPreferences.some((x) => x.topic === t) ? m.topicPreferences.map((x) => x.topic === t ? c(x) : x) : [...m.topicPreferences, c({
|
|
117
|
-
topic: t,
|
|
118
|
-
inApp: !0,
|
|
119
|
-
emailDigest: !0,
|
|
120
|
-
push: !1
|
|
121
|
-
})], b = f({
|
|
122
|
-
...m,
|
|
123
|
-
topicPreferences: l
|
|
124
|
-
});
|
|
125
|
-
h(b), v(b);
|
|
126
|
-
};
|
|
127
|
-
return s ? /* @__PURE__ */ e.jsx("div", { className: w("flex items-center justify-center py-10 text-muted-foreground", r), children: /* @__PURE__ */ e.jsx(S, { className: "h-4 w-4 animate-spin" }) }) : /* @__PURE__ */ e.jsxs("div", { className: w("space-y-4", r), children: [
|
|
128
|
-
/* @__PURE__ */ e.jsx("div", { className: "rounded-md border bg-background p-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
129
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
130
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-sm font-semibold", children: "Email digest" }),
|
|
131
|
-
/* @__PURE__ */ e.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: "Choose how often we email you a summary." })
|
|
132
|
-
] }),
|
|
133
|
-
/* @__PURE__ */ e.jsx("select", { value: m.digestFrequency, onChange: (t) => {
|
|
134
|
-
const c = t.target.value, n = f({
|
|
135
|
-
...m,
|
|
136
|
-
digestFrequency: c
|
|
137
|
-
});
|
|
138
|
-
h(n), v(n);
|
|
139
|
-
}, className: "h-9 rounded-md border bg-background px-2 text-sm", children: D.map((t) => /* @__PURE__ */ e.jsx("option", { value: t.value, children: t.label }, t.value)) })
|
|
140
|
-
] }) }),
|
|
141
|
-
/* @__PURE__ */ e.jsxs("div", { className: "rounded-md border bg-background p-4", children: [
|
|
142
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-start justify-between gap-3", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
143
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-sm font-semibold", children: "Topics" }),
|
|
144
|
-
/* @__PURE__ */ e.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: "Choose where you receive each topic." })
|
|
145
|
-
] }) }),
|
|
146
|
-
a.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "mt-4 text-sm text-muted-foreground", children: "No topics configured." }) : /* @__PURE__ */ e.jsx("div", { className: "mt-4 overflow-x-auto", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full text-sm", children: [
|
|
147
|
-
/* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsxs("tr", { className: "text-left text-xs text-muted-foreground", children: [
|
|
148
|
-
/* @__PURE__ */ e.jsx("th", { className: "py-2 pr-4 font-medium", children: "Topic" }),
|
|
149
|
-
/* @__PURE__ */ e.jsx("th", { className: "py-2 pr-4 font-medium", children: "In-app" }),
|
|
150
|
-
/* @__PURE__ */ e.jsx("th", { className: "py-2 pr-4 font-medium", children: "Email digest" }),
|
|
151
|
-
/* @__PURE__ */ e.jsx("th", { className: "py-2 pr-4 font-medium", children: "Push" })
|
|
152
|
-
] }) }),
|
|
153
|
-
/* @__PURE__ */ e.jsx("tbody", { children: m.topicPreferences.map((t) => {
|
|
154
|
-
const c = a.find((n) => n.topic === t.topic);
|
|
155
|
-
return /* @__PURE__ */ e.jsxs("tr", { className: "border-t align-top", children: [
|
|
156
|
-
/* @__PURE__ */ e.jsx("td", { className: "py-3 pr-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
157
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: c?.title || t.topic }),
|
|
158
|
-
c?.description ? /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: c.description }) : null,
|
|
159
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-[11px] text-muted-foreground", children: t.topic })
|
|
160
|
-
] }) }),
|
|
161
|
-
/* @__PURE__ */ e.jsx("td", { className: "py-3 pr-4", children: /* @__PURE__ */ e.jsx("input", { type: "checkbox", checked: t.inApp, onChange: (n) => N(t.topic, (l) => ({
|
|
162
|
-
...l,
|
|
163
|
-
inApp: n.target.checked
|
|
164
|
-
})) }) }),
|
|
165
|
-
/* @__PURE__ */ e.jsx("td", { className: "py-3 pr-4", children: /* @__PURE__ */ e.jsx("input", { type: "checkbox", checked: t.emailDigest, onChange: (n) => N(t.topic, (l) => ({
|
|
166
|
-
...l,
|
|
167
|
-
emailDigest: n.target.checked
|
|
168
|
-
})) }) }),
|
|
169
|
-
/* @__PURE__ */ e.jsx("td", { className: "py-3 pr-4", children: /* @__PURE__ */ e.jsx("input", { type: "checkbox", checked: t.push, disabled: !0, className: "opacity-50", "aria-label": "Push notifications (coming soon)" }) })
|
|
170
|
-
] }, t.topic);
|
|
171
|
-
}) })
|
|
172
|
-
] }) }),
|
|
173
|
-
j ? /* @__PURE__ */ e.jsx("div", { className: "mt-3 text-sm text-destructive", children: j }) : i ? /* @__PURE__ */ e.jsx("div", { className: "mt-3 text-xs text-muted-foreground", children: "Saving…" }) : null
|
|
174
|
-
] })
|
|
175
|
-
] });
|
|
1
|
+
//#region ../../node_modules/@date-fns/tz/tzName/index.js
|
|
2
|
+
function e(e, t, n = "long") {
|
|
3
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
4
|
+
hour: "numeric",
|
|
5
|
+
timeZone: e,
|
|
6
|
+
timeZoneName: n
|
|
7
|
+
}).format(t).split(/\s/g).slice(2).join(" ");
|
|
176
8
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
//# sourceMappingURL=index25.js.map
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as tzName };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index25.js.map
|
package/dist/index25.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index25.js","sources":["../src/components/Notifications/NotificationsSettings.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type { NotificationDigestFrequency, NotificationSettings, NotificationTopicCatalogItem, NotificationTopicPreference } from \"./types\"\n\n\ntype SettingsResponse = {\n ok?: boolean\n error?: string\n settings?: NotificationSettings\n}\n\nconst digestValues: Array<{ value: NotificationDigestFrequency; label: string }> = [\n { value: \"off\", label: \"Off\" },\n { value: \"daily\", label: \"Daily\" },\n { value: \"weekly\", label: \"Weekly\" },\n]\n\nconst normalizeSettings = (settings: NotificationSettings | undefined): NotificationSettings => {\n const digestFrequency = settings?.digestFrequency\n const frequency: NotificationDigestFrequency =\n digestFrequency === \"off\" || digestFrequency === \"daily\" || digestFrequency === \"weekly\"\n ? digestFrequency\n : \"weekly\"\n\n const topicPreferences = Array.isArray(settings?.topicPreferences)\n ? settings!.topicPreferences\n .map((pref) => ({\n topic: typeof pref.topic === \"string\" ? pref.topic.trim() : \"\",\n inApp: pref.inApp === true,\n emailDigest: pref.emailDigest === true,\n push: pref.push === true,\n }))\n .filter((pref) => pref.topic.length > 0)\n : []\n\n return {\n digestFrequency: frequency,\n topicPreferences,\n ...(typeof settings?.lastDigestSentAt === \"string\" ? { lastDigestSentAt: settings.lastDigestSentAt } : {}),\n }\n}\n\nconst normalizeTopics = (topics: NotificationTopicCatalogItem[] | undefined): NotificationTopicCatalogItem[] => {\n if (!Array.isArray(topics)) return []\n\n const seen = new Set<string>()\n return topics\n .map((topic) => ({\n topic: typeof topic.topic === \"string\" ? topic.topic.trim() : \"\",\n title: typeof topic.title === \"string\" ? topic.title.trim() : \"\",\n description: typeof topic.description === \"string\" ? topic.description.trim() : undefined,\n }))\n .filter((topic) => topic.topic.length > 0)\n .filter((topic) => {\n if (seen.has(topic.topic)) return false\n seen.add(topic.topic)\n return true\n })\n}\n\nconst applyTopicsToSettings = (\n settings: NotificationSettings,\n topics: NotificationTopicCatalogItem[],\n): NotificationSettings => {\n const defaults: NotificationTopicPreference = {\n topic: \"\",\n inApp: true,\n emailDigest: true,\n push: false,\n }\n\n const byTopic = new Map(settings.topicPreferences.map((pref) => [pref.topic, pref]))\n return {\n ...settings,\n topicPreferences: topics.map((topic) => {\n const existing = byTopic.get(topic.topic)\n return existing\n ? {\n topic: topic.topic,\n inApp: existing.inApp === true,\n emailDigest: existing.emailDigest === true,\n push: existing.push === true,\n }\n : {\n ...defaults,\n topic: topic.topic,\n }\n }),\n }\n}\n\nexport function NotificationsSettings({\n className,\n topics,\n}: {\n className?: string\n topics?: NotificationTopicCatalogItem[]\n}) {\n const [loading, setLoading] = useState(true)\n const [saving, setSaving] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const [settings, setSettings] = useState<NotificationSettings>(() =>\n normalizeSettings({ digestFrequency: \"weekly\", topicPreferences: [] }),\n )\n\n const normalizedTopics = useMemo(() => normalizeTopics(topics), [topics])\n\n const loadSettings = async () => {\n setLoading(true)\n setError(null)\n try {\n const res = await fetch(\"/api/rb/notifications/settings\", {\n method: \"GET\",\n credentials: \"include\",\n })\n const json = (await res.json().catch(() => null)) as SettingsResponse | null\n if (!res.ok || !json?.ok) {\n setError(json?.error || \"Unable to load notification settings.\")\n return\n }\n const normalized = normalizeSettings(json.settings)\n setSettings(normalizedTopics.length > 0 ? applyTopicsToSettings(normalized, normalizedTopics) : normalized)\n } catch {\n setError(\"Unable to load notification settings.\")\n } finally {\n setLoading(false)\n }\n }\n\n const saveSettings = async (next: NotificationSettings) => {\n setSaving(true)\n setError(null)\n try {\n const res = await fetch(\"/api/rb/notifications/settings\", {\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n credentials: \"include\",\n body: JSON.stringify({\n digestFrequency: next.digestFrequency,\n topicPreferences: next.topicPreferences,\n }),\n })\n const json = (await res.json().catch(() => null)) as SettingsResponse | null\n if (!res.ok || !json?.ok) {\n setError(json?.error || \"Unable to save notification settings.\")\n return\n }\n const normalized = normalizeSettings(json.settings)\n setSettings(normalizedTopics.length > 0 ? applyTopicsToSettings(normalized, normalizedTopics) : normalized)\n } catch {\n setError(\"Unable to save notification settings.\")\n } finally {\n setSaving(false)\n }\n }\n\n useEffect(() => {\n void loadSettings()\n }, [])\n\n useEffect(() => {\n if (normalizedTopics.length === 0) return\n setSettings((current) => applyTopicsToSettings(current, normalizedTopics))\n }, [normalizedTopics])\n\n const updatePreference = (topic: string, update: (p: NotificationTopicPreference) => NotificationTopicPreference) => {\n const hasExisting = settings.topicPreferences.some((p) => p.topic === topic)\n const nextPrefs = hasExisting\n ? settings.topicPreferences.map((p) => (p.topic === topic ? update(p) : p))\n : [...settings.topicPreferences, update({ topic, inApp: true, emailDigest: true, push: false })]\n const next = normalizeSettings({ ...settings, topicPreferences: nextPrefs })\n setSettings(next)\n void saveSettings(next)\n }\n\n if (loading) {\n return (\n <div className={cn(\"flex items-center justify-center py-10 text-muted-foreground\", className)}>\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n )\n }\n\n return (\n <div className={cn(\"space-y-4\", className)}>\n <div className=\"rounded-md border bg-background p-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <div className=\"text-sm font-semibold\">Email digest</div>\n <div className=\"mt-1 text-xs text-muted-foreground\">Choose how often we email you a summary.</div>\n </div>\n <select\n value={settings.digestFrequency}\n onChange={(e) => {\n const value = e.target.value as NotificationDigestFrequency\n const next = normalizeSettings({ ...settings, digestFrequency: value })\n setSettings(next)\n void saveSettings(next)\n }}\n className=\"h-9 rounded-md border bg-background px-2 text-sm\"\n >\n {digestValues.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n\n <div className=\"rounded-md border bg-background p-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <div className=\"text-sm font-semibold\">Topics</div>\n <div className=\"mt-1 text-xs text-muted-foreground\">Choose where you receive each topic.</div>\n </div>\n </div>\n\n {normalizedTopics.length === 0 ? (\n <div className=\"mt-4 text-sm text-muted-foreground\">No topics configured.</div>\n ) : (\n <div className=\"mt-4 overflow-x-auto\">\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"text-left text-xs text-muted-foreground\">\n <th className=\"py-2 pr-4 font-medium\">Topic</th>\n <th className=\"py-2 pr-4 font-medium\">In-app</th>\n <th className=\"py-2 pr-4 font-medium\">Email digest</th>\n <th className=\"py-2 pr-4 font-medium\">Push</th>\n </tr>\n </thead>\n <tbody>\n {settings.topicPreferences.map((pref) => {\n const meta = normalizedTopics.find((topic) => topic.topic === pref.topic)\n return (\n <tr key={pref.topic} className=\"border-t align-top\">\n <td className=\"py-3 pr-4\">\n <div className=\"flex flex-col gap-1\">\n <span className=\"font-medium\">{meta?.title || pref.topic}</span>\n {meta?.description ? (\n <span className=\"text-xs text-muted-foreground\">{meta.description}</span>\n ) : null}\n <span className=\"text-[11px] text-muted-foreground\">{pref.topic}</span>\n </div>\n </td>\n <td className=\"py-3 pr-4\">\n <input\n type=\"checkbox\"\n checked={pref.inApp}\n onChange={(e) =>\n updatePreference(pref.topic, (p) => ({ ...p, inApp: e.target.checked }))\n }\n />\n </td>\n <td className=\"py-3 pr-4\">\n <input\n type=\"checkbox\"\n checked={pref.emailDigest}\n onChange={(e) =>\n updatePreference(pref.topic, (p) => ({ ...p, emailDigest: e.target.checked }))\n }\n />\n </td>\n <td className=\"py-3 pr-4\">\n <input\n type=\"checkbox\"\n checked={pref.push}\n disabled\n className=\"opacity-50\"\n aria-label=\"Push notifications (coming soon)\"\n />\n </td>\n </tr>\n )\n })}\n </tbody>\n </table>\n </div>\n )}\n\n {error ? (\n <div className=\"mt-3 text-sm text-destructive\">{error}</div>\n ) : saving ? (\n <div className=\"mt-3 text-xs text-muted-foreground\">Saving…</div>\n ) : null}\n </div>\n </div>\n )\n}\n"],"names":["digestValues","value","label","normalizeSettings","settings","digestFrequency","frequency","topicPreferences","Array","isArray","map","pref","topic","trim","inApp","emailDigest","push","filter","length","lastDigestSentAt","normalizeTopics","topics","seen","Set","title","description","undefined","has","add","applyTopicsToSettings","defaults","byTopic","Map","existing","get","NotificationsSettings","className","loading","setLoading","useState","saving","setSaving","error","setError","setSettings","normalizedTopics","useMemo","loadSettings","res","fetch","method","credentials","json","catch","ok","normalized","saveSettings","next","headers","body","JSON","stringify","useEffect","current","updatePreference","update","nextPrefs","some","p","jsx","cn","Loader2","jsxs","e","target","opt","meta","find","checked"],"mappings":";;;;AAcA,MAAMA,IAA6E,CACjF;AAAA,EAAEC,OAAO;AAAA,EAAOC,OAAO;AAAM,GAC7B;AAAA,EAAED,OAAO;AAAA,EAASC,OAAO;AAAQ,GACjC;AAAA,EAAED,OAAO;AAAA,EAAUC,OAAO;AAAS,CAAC,GAGhCC,IAAoBA,CAACC,MAAqE;AAC9F,QAAMC,IAAkBD,GAAUC,iBAC5BC,IACJD,MAAoB,SAASA,MAAoB,WAAWA,MAAoB,WAC5EA,IACA,UAEAE,IAAmBC,MAAMC,QAAQL,GAAUG,gBAAgB,IAC7DH,EAAUG,iBACTG,IAAKC,CAAAA,OAAU;AAAA,IACdC,OAAO,OAAOD,EAAKC,SAAU,WAAWD,EAAKC,MAAMC,SAAS;AAAA,IAC5DC,OAAOH,EAAKG,UAAU;AAAA,IACtBC,aAAaJ,EAAKI,gBAAgB;AAAA,IAClCC,MAAML,EAAKK,SAAS;AAAA,EAAA,EACpB,EACDC,OAAQN,CAAAA,MAASA,EAAKC,MAAMM,SAAS,CAAC,IACvC,CAAA;AAEJ,SAAO;AAAA,IACLb,iBAAiBC;AAAAA,IACjBC,kBAAAA;AAAAA,IACA,GAAI,OAAOH,GAAUe,oBAAqB,WAAW;AAAA,MAAEA,kBAAkBf,EAASe;AAAAA,IAAAA,IAAqB,CAAA;AAAA,EAAC;AAE5G,GAEMC,IAAkBA,CAACC,MAAuF;AAC9G,MAAI,CAACb,MAAMC,QAAQY,CAAM,UAAU,CAAA;AAEnC,QAAMC,wBAAWC,IAAAA;AACjB,SAAOF,EACJX,IAAKE,CAAAA,OAAW;AAAA,IACfA,OAAO,OAAOA,EAAMA,SAAU,WA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AAA,kCACC,MAAA,EAAG,WAAU,aACZ,UAAAyD,gBAAAA,EAAAA,IAAC,WACC,MAAK,YACL,SAAS1D,EAAKG,OACd,UAAW2D,CAAAA,MACTT,EAAiBrD,EAAKC,OAAQwD,CAAAA,OAAO;AAAA,cAAE,GAAGA;AAAAA,cAAGtD,OAAO2D,EAAEC,OAAOI;AAAAA,YAAAA,EAAU,GACxE,GAEL;AAAA,kCACC,MAAA,EAAG,WAAU,aACZ,UAAAT,gBAAAA,EAAAA,IAAC,WACC,MAAK,YACL,SAAS1D,EAAKI,aACd,UAAW0D,CAAAA,MACTT,EAAiBrD,EAAKC,OAAQwD,CAAAA,OAAO;AAAA,cAAE,GAAGA;AAAAA,cAAGrD,aAAa0D,EAAEC,OAAOI;AAAAA,YAAAA,EAAU,GAC9E,GAEL;AAAA,kCACC,MAAA,EAAG,WAAU,aACZ,UAAAT,gBAAAA,EAAAA,IAAC,WACC,MAAK,YACL,SAAS1D,EAAKK,MACd,UAAQ,IACR,WAAU,cACV,cAAW,oCAAkC,EAAA,CAEjD;AAAA,UAAA,EAAA,GApCOL,EAAKC,KAqCd;AAAA,QAEJ,CAAC,EAAA,CACH;AAAA,MAAA,EAAA,CACF,EAAA,CACF;AAAA,MAGD8B,IACC2B,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,iCAAiC3B,UAAAA,EAAAA,CAAM,IACpDF,IACF6B,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,sCAAqC,qBAAO,IACzD;AAAA,IAAA,EAAA,CACN;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index25.js","names":[],"sources":["../../../node_modules/@date-fns/tz/tzName/index.js"],"sourcesContent":["/**\n * Time zone name format.\n */\n\n/**\n * The function returns the time zone name for the given date in the specified\n * time zone.\n *\n * It uses the `Intl.DateTimeFormat` API and by default outputs the time zone\n * name in a long format, e.g. \"Pacific Standard Time\" or\n * \"Singapore Standard Time\".\n *\n * It is possible to specify the format as the third argument using one of the following options\n *\n * - \"short\": e.g. \"EDT\" or \"GMT+8\".\n * - \"long\": e.g. \"Eastern Daylight Time\".\n * - \"shortGeneric\": e.g. \"ET\" or \"Singapore Time\".\n * - \"longGeneric\": e.g. \"Eastern Time\" or \"Singapore Standard Time\".\n *\n * These options correspond to TR35 tokens `z..zzz`, `zzzz`, `v`, and `vvvv` respectively: https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-zone\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date object to get the time zone name for\n * @param format - Optional format of the time zone name. Defaults to \"long\". Can be \"short\", \"long\", \"shortGeneric\", or \"longGeneric\".\n *\n * @returns Time zone name (e.g. \"Singapore Standard Time\")\n */\nexport function tzName(timeZone, date, format = \"long\") {\n return new Intl.DateTimeFormat(\"en-US\", {\n // Enforces engine to render the time. Without the option JavaScriptCore omits it.\n hour: \"numeric\",\n timeZone: timeZone,\n timeZoneName: format\n }).format(date).split(/\\s/g) // Format.JS uses non-breaking spaces\n .slice(2) // Skip the hour and AM/PM parts\n .join(\" \");\n}"],"x_google_ignoreList":[0],"mappings":";AA2BA,SAAgB,EAAO,GAAU,GAAM,IAAS,QAAQ;AACtD,QAAO,IAAI,KAAK,eAAe,SAAS;EAEtC,MAAM;EACI;EACV,cAAc;EACf,CAAC,CAAC,OAAO,EAAK,CAAC,MAAM,MAAM,CAC3B,MAAM,EAAE,CACR,KAAK,IAAI"}
|
package/dist/index250.js
CHANGED
|
@@ -1,34 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
throw new Error("Invalid phone number object passed");
|
|
7
|
-
r.selectNumberingPlan(e.countryCallingCode);
|
|
8
|
-
} else {
|
|
9
|
-
if (!e.phone)
|
|
10
|
-
return !1;
|
|
11
|
-
if (e.country) {
|
|
12
|
-
if (!r.hasCountry(e.country))
|
|
13
|
-
throw new Error("Unknown country: ".concat(e.country));
|
|
14
|
-
r.selectNumberingPlan(e.country);
|
|
15
|
-
} else {
|
|
16
|
-
if (!e.countryCallingCode)
|
|
17
|
-
throw new Error("Invalid phone number object passed");
|
|
18
|
-
r.selectNumberingPlan(e.countryCallingCode);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (r.possibleLengths())
|
|
22
|
-
return s(e.phone || e.nationalNumber, e.country, r);
|
|
23
|
-
if (e.countryCallingCode && r.isNonGeographicCallingCode(e.countryCallingCode))
|
|
24
|
-
return !0;
|
|
25
|
-
throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
|
|
1
|
+
import { Metadata as e } from "./index248.js";
|
|
2
|
+
import t from "./index249.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js
|
|
4
|
+
function n(e, t, n) {
|
|
5
|
+
return r(e, t, void 0, n);
|
|
26
6
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
7
|
+
function r(n, i, a, o) {
|
|
8
|
+
i && (o = new e(o.metadata), o.selectNumberingPlan(i));
|
|
9
|
+
var s = o.type(a), c = s && s.possibleLengths() || o.possibleLengths();
|
|
10
|
+
if (!c) return "IS_POSSIBLE";
|
|
11
|
+
if (a === "FIXED_LINE_OR_MOBILE") {
|
|
12
|
+
/* istanbul ignore next */
|
|
13
|
+
if (!o.type("FIXED_LINE")) return r(n, i, "MOBILE", o);
|
|
14
|
+
var l = o.type("MOBILE");
|
|
15
|
+
l && (c = t(c, l.possibleLengths()));
|
|
16
|
+
} else if (a && !s) return "INVALID_LENGTH";
|
|
17
|
+
var u = n.length, d = c[0];
|
|
18
|
+
return d === u ? "IS_POSSIBLE" : d > u ? "TOO_SHORT" : c[c.length - 1] < u ? "TOO_LONG" : c.indexOf(u, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
29
19
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=index250.js.map
|
|
20
|
+
//#endregion
|
|
21
|
+
export { n as default };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=index250.js.map
|
package/dist/index250.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index250.js","sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index250.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js"],"sourcesContent":["import Metadata from '../metadata.js';\nimport mergeArrays from './mergeArrays.js';\nexport default function checkNumberLength(nationalNumber, country, metadata) {\n return checkNumberLengthForType(nationalNumber, country, undefined, metadata);\n}\n\n// Checks whether a number is possible for a certain `country` based on the number length.\n//\n// This function is not supported by metadata generated with ancient versions of\n// `libphonenumber-js` (before version `1.0.18`) which didn't include \"possible lengths\".\n//\n// There was also a known issue with `checkNumberLength()` function:\n// if a number is possible only in a certain `country` among several `countries`\n// that share the same \"country calling code\", that function would check\n// the possibility of the phone number only in the \"main\" `country` for the \"country calling code\"\n// and would not check if it's actually be possible in the speciifc `country`.\n//\n// For example, \"+1310xxxx\" numbers are valid in Canada.\n// However, they are not possible in the US due to being too short.\n// Since Canada and the US share the same country calling code — \"+1\" —\n// `checkNumberLength()` function used to return not \"IS_POSSIBLE\" for \"+1310xxxx\" numbers.\n//\n// In such cases, when using \"/max\" metadata, `isValid()` could output `true`\n// but at the same time `isPossible()` could output `false`, which was contradictory.\n//\n// See https://issuetracker.google.com/issues/335892662 for the discusson in Google's issues.\n//\n// The solution suggested by Google was implemented: an optional `country` argument\n// was added to `checkNumberLength()` function. If present, that `country` will be used\n// to check phone number length for that specific `country` rather than the \"main\" country\n// for the shared \"country calling code\".\n//\nexport function checkNumberLengthForType(nationalNumber, country, type, metadata) {\n // If the exact `country` is specified, it's no necessarily already selected in `metadata`.\n // Most likely, in cases when there're multiple countries corresponding to the same\n // \"country calling code\", the \"main\" country for that \"country calling code\" will be selected.\n if (country) {\n metadata = new Metadata(metadata.metadata);\n metadata.selectNumberingPlan(country);\n }\n var type_info = metadata.type(type);\n\n // There should always be \"<possiblePengths/>\" set for every type element.\n // This is declared in the XML schema.\n // For size efficiency, where a sub-description (e.g. fixed-line)\n // has the same \"<possiblePengths/>\" as the \"general description\", this is missing,\n // so we fall back to the \"general description\". Where no numbers of the type\n // exist at all, there is one possible length (-1) which is guaranteed\n // not to match the length of any real phone number.\n var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();\n // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n\n // Metadata before version `1.0.18` didn't contain `possible_lengths`.\n if (!possible_lengths) {\n return 'IS_POSSIBLE';\n }\n if (type === 'FIXED_LINE_OR_MOBILE') {\n // No such country in metadata.\n /* istanbul ignore next */\n if (!metadata.type('FIXED_LINE')) {\n // The rare case has been encountered where no fixedLine data is available\n // (true for some non-geographic entities), so we just check mobile.\n return checkNumberLengthForType(nationalNumber, country, 'MOBILE', metadata);\n }\n var mobile_type = metadata.type('MOBILE');\n if (mobile_type) {\n // Merge the mobile data in if there was any. \"Concat\" creates a new\n // array, it doesn't edit possible_lengths in place, so we don't need a copy.\n // Note that when adding the possible lengths from mobile, we have\n // to again check they aren't empty since if they are this indicates\n // they are the same as the general desc and should be obtained from there.\n possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());\n // The current list is sorted; we need to merge in the new list and\n // re-sort (duplicates are okay). Sorting isn't so expensive because\n // the lists are very small.\n\n // if (local_lengths) {\n // \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n // } else {\n // \tlocal_lengths = mobile_type.possibleLengthsLocal()\n // }\n }\n }\n // If the type doesn't exist then return 'INVALID_LENGTH'.\n else if (type && !type_info) {\n return 'INVALID_LENGTH';\n }\n var actual_length = nationalNumber.length;\n\n // In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n // // This is safe because there is never an overlap beween the possible lengths\n // // and the local-only lengths; this is checked at build time.\n // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n // {\n // \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n // }\n\n var minimum_length = possible_lengths[0];\n if (minimum_length === actual_length) {\n return 'IS_POSSIBLE';\n }\n if (minimum_length > actual_length) {\n return 'TOO_SHORT';\n }\n if (possible_lengths[possible_lengths.length - 1] < actual_length) {\n return 'TOO_LONG';\n }\n\n // We skip the first element since we've already checked it.\n return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';\n}\n//# sourceMappingURL=checkNumberLength.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAwB,EAAkB,GAAgB,GAAS,GAAU;AAC3E,QAAO,EAAyB,GAAgB,GAAS,KAAA,GAAW,EAAS;;AA6B/E,SAAgB,EAAyB,GAAgB,GAAS,GAAM,GAAU;AAIhF,CAAI,MACF,IAAW,IAAI,EAAS,EAAS,SAAS,EAC1C,EAAS,oBAAoB,EAAQ;CAEvC,IAAI,IAAY,EAAS,KAAK,EAAK,EAS/B,IAAmB,KAAa,EAAU,iBAAiB,IAAI,EAAS,iBAAiB;AAI7F,KAAI,CAAC,EACH,QAAO;AAET,KAAI,MAAS,wBAAwB;;AAGnC,MAAI,CAAC,EAAS,KAAK,aAAa,CAG9B,QAAO,EAAyB,GAAgB,GAAS,UAAU,EAAS;EAE9E,IAAI,IAAc,EAAS,KAAK,SAAS;AACzC,EAAI,MAMF,IAAmB,EAAY,GAAkB,EAAY,iBAAiB,CAAC;YAa1E,KAAQ,CAAC,EAChB,QAAO;CAET,IAAI,IAAgB,EAAe,QAU/B,IAAiB,EAAiB;AAYtC,QAXI,MAAmB,IACd,gBAEL,IAAiB,IACZ,cAEL,EAAiB,EAAiB,SAAS,KAAK,IAC3C,aAIF,EAAiB,QAAQ,GAAe,EAAE,IAAI,IAAI,gBAAgB"}
|
package/dist/index251.js
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { Metadata as e } from "./index248.js";
|
|
2
|
+
import t from "./index250.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6/isPossible.js
|
|
4
|
+
function n(t, n, i) {
|
|
5
|
+
if (n === void 0 && (n = {}), i = new e(i), n.v2) {
|
|
6
|
+
if (!t.countryCallingCode) throw Error("Invalid phone number object passed");
|
|
7
|
+
i.selectNumberingPlan(t.countryCallingCode);
|
|
8
|
+
} else {
|
|
9
|
+
if (!t.phone) return !1;
|
|
10
|
+
if (t.country) {
|
|
11
|
+
if (!i.hasCountry(t.country)) throw Error(`Unknown country: ${t.country}`);
|
|
12
|
+
i.selectNumberingPlan(t.country);
|
|
13
|
+
} else {
|
|
14
|
+
if (!t.countryCallingCode) throw Error("Invalid phone number object passed");
|
|
15
|
+
i.selectNumberingPlan(t.countryCallingCode);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (i.possibleLengths()) return r(t.phone || t.nationalNumber, t.country, i);
|
|
19
|
+
if (t.countryCallingCode && i.isNonGeographicCallingCode(t.countryCallingCode)) return !0;
|
|
20
|
+
throw Error("Missing \"possibleLengths\" in metadata. Perhaps the metadata has been generated before v1.0.18.");
|
|
9
21
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
function r(e, n, r) {
|
|
23
|
+
switch (t(e, n, r)) {
|
|
24
|
+
case "IS_POSSIBLE": return !0;
|
|
25
|
+
default: return !1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { n as default, r as isPossibleNumber };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=index251.js.map
|