@rpcbase/ui 0.208.0 → 0.209.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 +13 -13
- package/dist/index100.js +3 -3
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +9 -3
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +4 -9
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +9 -4
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +18 -12
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +25 -18
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +5 -24
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +2 -2
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +4 -3
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +3 -3
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +3 -4
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +3 -3
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +8 -5
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +7 -8
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +34 -7
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +7 -34
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +5 -7
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +7 -5
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +9 -7
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +3 -7
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +4 -3
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +3 -4
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +3 -3
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +4 -3
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +3 -4
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +3 -3
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +7 -5
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +57 -8
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +7 -57
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +19 -6
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +19 -19
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +34 -19
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +5 -34
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +8 -5
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +13 -7
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +10 -14
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +6 -10
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +4 -5
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +5 -5
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +5 -5
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +5 -5
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +4 -5
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +6 -4
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +21 -7
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +9 -21
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +7 -8
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +5 -6
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +6 -6
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +4 -6
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +4 -4
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +5 -4
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +4 -5
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +5 -4
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +4 -5
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +4 -4
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +3 -3
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +29 -5
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +33 -29
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +15 -32
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +10 -14
- package/dist/index159.js.map +1 -1
- package/dist/index160.js +9 -11
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +16 -9
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +86 -16
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +47 -86
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +16 -46
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +8 -17
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +10 -8
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +4 -9
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +22 -5
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +7 -22
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +6 -7
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +4 -4
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +4 -6
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +6 -4
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +67 -6
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +17 -67
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +12 -17
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +9 -12
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +20 -9
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +14 -17
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +54 -16
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +9 -54
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +6 -10
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +26 -6
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +26 -26
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +10 -23
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +13 -13
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +6 -13
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +23 -6
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +385 -23
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +487 -377
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +122 -487
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +53 -131
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +76 -51
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +897 -75
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +19 -899
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +446 -17
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +4 -448
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +57 -4
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +56 -52
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +55 -56
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +8 -60
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +15 -7
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +143 -15
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +4 -145
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +11 -4
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +104 -10
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +347 -94
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +87 -349
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +304 -73
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +193 -309
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +19 -211
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +27 -18
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +187 -27
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +16 -186
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +62 -18
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +40 -58
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +9 -43
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +25 -10
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +45 -25
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +17 -44
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +3 -18
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +5 -3
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +20 -4
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +24 -20
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +66 -23
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +14 -67
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +4 -15
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +51 -4
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +5 -50
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +26 -5
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +11 -24
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +8 -12
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +3 -13
- package/dist/index234.js +29 -3
- package/dist/index234.js.map +1 -0
- package/dist/index235.js +68 -25
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -71
- package/dist/index237.js +15 -3
- package/dist/index237.js.map +1 -0
- package/dist/index238.js +51 -12
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +114 -50
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +9 -0
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +6 -115
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +13 -6
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +687 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +234 -668
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +670 -222
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +7430 -700
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7 -7431
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +12 -6
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +5 -12
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +459 -5
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +20 -8
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +32 -454
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +18 -36
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +25 -17
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +4 -27
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +58 -4
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +7 -58
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +12 -7
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +3 -13
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +17 -3
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +23 -14
- package/dist/index259.js.map +1 -1
- package/dist/index26.js +56 -18
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +41 -23
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +13 -43
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +25 -13
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +16 -24
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +33 -15
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +5 -35
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +9 -5
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +7 -8
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +9 -8
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +10 -9
- package/dist/index269.js.map +1 -1
- package/dist/index27.js +50 -53
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +7 -10
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +73 -7
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +161 -63
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +100 -157
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +13 -113
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +78 -12
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +23 -57
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +12 -45
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +16 -13
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +98 -15
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +1 -59
- package/dist/index280.js +50 -93
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +57 -5
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +41 -78
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +100 -58
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +46 -104
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +39 -51
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +141 -42
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +119 -122
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +222 -107
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +159 -173
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +4 -0
- package/dist/index290.js +177 -119
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +5 -298
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +6 -5
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +7 -6
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +5 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +4 -4
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +21 -6
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +10 -21
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +126 -10
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +146 -108
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +8 -6
- package/dist/index30.js.map +1 -0
- package/dist/index300.js +55 -151
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +107 -66
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +489 -107
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +63 -492
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +4 -63
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +28 -4
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +65 -27
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +147 -60
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +56 -147
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +553 -53
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +6 -5
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +170 -521
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +327 -206
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +251 -314
- package/dist/index312.js.map +1 -1
- package/dist/index32.js +3 -3
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +7 -5
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +7 -4
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +5 -10
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +7 -5
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +8 -7
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +12 -8
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +5 -11
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +6 -6
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +5 -5
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +9 -6
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +8 -9
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +5 -8
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +2 -2
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +11 -5
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +4 -4
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +6 -10
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +4 -7
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +6 -4
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +6 -6
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +5 -5
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +8 -5
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +13 -9
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +5 -12
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +4 -4
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +4 -4
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +13 -6
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +4 -10
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +8 -7
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +68 -9
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +8 -68
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +31 -8
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +10 -31
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +16 -10
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +200 -15
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +21 -201
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +12 -16
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +123 -17
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +18 -122
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +9 -19
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +9 -8
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +11 -7
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +7 -11
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +6 -6
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +4 -9
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +42 -5
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +368 -29
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +37 -379
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +22 -39
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +56 -20
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +7 -57
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +4 -6
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +3 -3
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +3 -3
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +3 -3
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +5 -4
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +3 -3
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +10 -6
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +7 -10
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +6 -7
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +5 -6
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +7 -5
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +48 -8
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +104 -46
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +8 -103
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +5 -9
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +3 -3
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +6 -7
- package/dist/index99.js.map +1 -1
- package/package.json +2 -2
- package/dist/index233.js.map +0 -1
- package/dist/index236.js.map +0 -1
- package/dist/index28.js.map +0 -1
- package/dist/index313.js +0 -272
- package/dist/index313.js.map +0 -1
package/dist/index276.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { parseDigit as e } from "./index275.js";
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js
|
|
3
|
+
function t(e, t) {
|
|
3
4
|
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
4
5
|
if (r) return (r = r.call(e)).next.bind(r);
|
|
5
|
-
if (Array.isArray(e) || (r =
|
|
6
|
+
if (Array.isArray(e) || (r = n(e)) || t && e && typeof e.length == "number") {
|
|
6
7
|
r && (e = r);
|
|
7
8
|
var i = 0;
|
|
8
9
|
return function() {
|
|
@@ -14,71 +15,36 @@ function e(e, n) {
|
|
|
14
15
|
}
|
|
15
16
|
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
|
}
|
|
17
|
-
function
|
|
18
|
+
function n(e, t) {
|
|
18
19
|
if (e) {
|
|
19
|
-
if (typeof e == "string") return
|
|
20
|
-
var
|
|
21
|
-
return
|
|
20
|
+
if (typeof e == "string") return r(e, t);
|
|
21
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
22
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
+
function r(e, t) {
|
|
25
26
|
(t == null || t > e.length) && (t = e.length);
|
|
26
27
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
27
28
|
return r;
|
|
28
29
|
}
|
|
29
|
-
var r = {
|
|
30
|
-
0: "0",
|
|
31
|
-
1: "1",
|
|
32
|
-
2: "2",
|
|
33
|
-
3: "3",
|
|
34
|
-
4: "4",
|
|
35
|
-
5: "5",
|
|
36
|
-
6: "6",
|
|
37
|
-
7: "7",
|
|
38
|
-
8: "8",
|
|
39
|
-
9: "9",
|
|
40
|
-
"0": "0",
|
|
41
|
-
"1": "1",
|
|
42
|
-
"2": "2",
|
|
43
|
-
"3": "3",
|
|
44
|
-
"4": "4",
|
|
45
|
-
"5": "5",
|
|
46
|
-
"6": "6",
|
|
47
|
-
"7": "7",
|
|
48
|
-
"8": "8",
|
|
49
|
-
"9": "9",
|
|
50
|
-
"٠": "0",
|
|
51
|
-
"١": "1",
|
|
52
|
-
"٢": "2",
|
|
53
|
-
"٣": "3",
|
|
54
|
-
"٤": "4",
|
|
55
|
-
"٥": "5",
|
|
56
|
-
"٦": "6",
|
|
57
|
-
"٧": "7",
|
|
58
|
-
"٨": "8",
|
|
59
|
-
"٩": "9",
|
|
60
|
-
"۰": "0",
|
|
61
|
-
"۱": "1",
|
|
62
|
-
"۲": "2",
|
|
63
|
-
"۳": "3",
|
|
64
|
-
"۴": "4",
|
|
65
|
-
"۵": "5",
|
|
66
|
-
"۶": "6",
|
|
67
|
-
"۷": "7",
|
|
68
|
-
"۸": "8",
|
|
69
|
-
"۹": "9"
|
|
70
|
-
};
|
|
71
30
|
function i(e) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
for (var n = "", r = e(t.split("")), a; !(a = r()).done;) {
|
|
76
|
-
var o = a.value, s = i(o);
|
|
77
|
-
s && (n += s);
|
|
31
|
+
for (var n = "", r = t(e.split("")), i; !(i = r()).done;) {
|
|
32
|
+
var o = i.value;
|
|
33
|
+
n += a(o, n) || "";
|
|
78
34
|
}
|
|
79
35
|
return n;
|
|
80
36
|
}
|
|
37
|
+
function a(t, n, r) {
|
|
38
|
+
if (t === "+") {
|
|
39
|
+
if (n) {
|
|
40
|
+
typeof r == "function" && r("end");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
return "+";
|
|
44
|
+
}
|
|
45
|
+
return e(t);
|
|
46
|
+
}
|
|
81
47
|
//#endregion
|
|
82
|
-
export {
|
|
48
|
+
export { i as default };
|
|
83
49
|
|
|
84
50
|
//# sourceMappingURL=index276.js.map
|
package/dist/index276.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index276.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index276.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.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; }\nimport { parseDigit } from './helpers/parseDigits.js';\n\n/**\r\n * Parses phone number characters from a string.\r\n * Drops all punctuation leaving only digits and the leading `+` sign (if any).\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * // Outputs '8800555'.\r\n * parseIncompletePhoneNumber('8 (800) 555')\r\n * // Outputs '+7800555'.\r\n * parseIncompletePhoneNumber('+7 800 555')\r\n * ```\r\n */\nexport default function parseIncompletePhoneNumber(string) {\n var result = '';\n // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n result += parsePhoneNumberCharacter(character, result) || '';\n }\n return result;\n}\n\n/**\r\n * Parses next character while parsing phone number digits (including a `+`)\r\n * from text: discards everything except `+` and digits, and `+` is only allowed\r\n * at the start of a phone number.\r\n * For example, is used in `react-phone-number-input` where it uses\r\n * [`input-format`](https://gitlab.com/catamphetamine/input-format).\r\n * @param {string} character - Yet another character from raw input string.\r\n * @param {string?} prevParsedCharacters - Previous parsed characters.\r\n * @param {function?} eventListener - An optional \"on event\" function.\r\n * @return {string?} The parsed character.\r\n */\nexport function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {\n // Only allow a leading `+`.\n if (character === '+') {\n // If this `+` is not the first parsed character\n // then discard it.\n if (prevParsedCharacters) {\n // `eventListener` argument was added to this `export`ed function on Dec 26th, 2023.\n // Any 3rd-party code that used to `import` and call this function before that\n // won't be passing any `eventListener` argument.\n //\n // The addition of the `eventListener` argument was to fix the slightly-weird behavior\n // of parsing an input string when the user inputs something like `\"2+7\"\n // https://github.com/catamphetamine/react-phone-number-input/issues/437\n //\n // If the parser encounters an unexpected `+` in a string being parsed\n // then it simply discards that out-of-place `+` and any following characters.\n //\n if (typeof eventListener === 'function') {\n eventListener('end');\n }\n return;\n }\n return '+';\n }\n // Allow digits.\n return parseDigit(character);\n}\n//# sourceMappingURL=parseIncompletePhoneNumber.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;;AAkBhJ,SAAwB,EAA2B,GAAQ;AAQzD,MAAK,IAPD,IAAS,IAOJ,IAAY,EAAgC,EAAO,MAAM,GAAG,CAAC,EAAE,GAAO,EAAE,IAAQ,GAAW,EAAE,OAAO;EAC3G,IAAI,IAAY,EAAM;AACtB,OAAU,EAA0B,GAAW,EAAO,IAAI;;AAE5D,QAAO;;AAcT,SAAgB,EAA0B,GAAW,GAAsB,GAAe;AAExF,KAAI,MAAc,KAAK;AAGrB,MAAI,GAAsB;AAYxB,GAAI,OAAO,KAAkB,cAC3B,EAAc,MAAM;AAEtB;;AAEF,SAAO;;AAGT,QAAO,EAAW,EAAU"}
|
package/dist/index277.js
CHANGED
|
@@ -1,50 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
var
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return i >= e.length ? { done: !0 } : {
|
|
11
|
-
done: !1,
|
|
12
|
-
value: e[i++]
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1
|
+
import { VALID_DIGITS as e } from "./index257.js";
|
|
2
|
+
var t = "([" + e + "]|[\\-\\.\\(\\)]?)", n = "^\\+" + t + "*[" + e + "]" + t + "*$", r = new RegExp(n, "g"), i = e, a = "[" + i + "]+((\\-)*[" + i + "])*", o = "[a-zA-Z]+((\\-)*[" + i + "])*", s = "^(" + a + "\\.)*" + o + "\\.?$", c = new RegExp(s, "g"), l = "tel:", u = ";phone-context=", d = ";isub=";
|
|
3
|
+
function f(e) {
|
|
4
|
+
var t = e.indexOf(u);
|
|
5
|
+
if (t < 0) return null;
|
|
6
|
+
var n = t + u.length;
|
|
7
|
+
if (n >= e.length) return "";
|
|
8
|
+
var r = e.indexOf(";", n);
|
|
9
|
+
return r >= 0 ? e.substring(n, r) : e.substring(n);
|
|
17
10
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
if (typeof e == "string") return r(e, t);
|
|
21
|
-
var n = {}.toString.call(e).slice(8, -1);
|
|
22
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function r(e, t) {
|
|
26
|
-
(t == null || t > e.length) && (t = e.length);
|
|
27
|
-
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
28
|
-
return r;
|
|
29
|
-
}
|
|
30
|
-
function i(e) {
|
|
31
|
-
for (var n = "", r = t(e.split("")), i; !(i = r()).done;) {
|
|
32
|
-
var o = i.value;
|
|
33
|
-
n += a(o, n) || "";
|
|
34
|
-
}
|
|
35
|
-
return n;
|
|
36
|
-
}
|
|
37
|
-
function a(t, n, r) {
|
|
38
|
-
if (t === "+") {
|
|
39
|
-
if (n) {
|
|
40
|
-
typeof r == "function" && r("end");
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
return "+";
|
|
44
|
-
}
|
|
45
|
-
return e(t);
|
|
11
|
+
function p(e) {
|
|
12
|
+
return e === null ? !0 : e.length === 0 ? !1 : r.test(e) || c.test(e);
|
|
46
13
|
}
|
|
47
14
|
//#endregion
|
|
48
|
-
export {
|
|
15
|
+
export { d as RFC3966_ISDN_SUBADDRESS_, u as RFC3966_PHONE_CONTEXT_, l as RFC3966_PREFIX_, f as default, p as isPhoneContextValid };
|
|
49
16
|
|
|
50
17
|
//# sourceMappingURL=index277.js.map
|
package/dist/index277.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index277.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index277.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js"],"sourcesContent":["// When phone numbers are written in `RFC3966` format — `\"tel:+12133734253\"` —\n// they can have their \"calling code\" part written separately in a `phone-context` parameter.\n// Example: `\"tel:12133734253;phone-context=+1\"`.\n// This function parses the full phone number from the local number and the `phone-context`\n// when the `phone-context` contains a `+` sign.\n\nimport { VALID_DIGITS\n// PLUS_CHARS\n} from '../constants.js';\nexport var PLUS_SIGN = '+';\nvar RFC3966_VISUAL_SEPARATOR_ = '[\\\\-\\\\.\\\\(\\\\)]?';\nvar RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';\nvar RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';\n\n/**\r\n * Regular expression of valid global-number-digits for the phone-context\r\n * parameter, following the syntax defined in RFC3966.\r\n */\nvar RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g');\n\n// In this port of Google's library, we don't accept alpha characters in phone numbers.\n// const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS\nvar ALPHANUM_ = VALID_DIGITS;\nvar RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar VALID_ALPHA_ = 'a-zA-Z';\nvar RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\\\.)*' + RFC3966_TOPLABEL_ + '\\\\.?$';\n\n/**\r\n * Regular expression of valid domainname for the phone-context parameter,\r\n * following the syntax defined in RFC3966.\r\n */\nvar RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');\nexport var RFC3966_PREFIX_ = 'tel:';\nexport var RFC3966_PHONE_CONTEXT_ = ';phone-context=';\nexport var RFC3966_ISDN_SUBADDRESS_ = ';isub=';\n\n/**\r\n * Extracts the value of the phone-context parameter of `numberToExtractFrom`,\r\n * following the syntax defined in RFC3966.\r\n *\r\n * @param {string} numberToExtractFrom\r\n * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.\r\n */\nexport default function extractPhoneContext(numberToExtractFrom) {\n var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);\n // If no phone-context parameter is present\n if (indexOfPhoneContext < 0) {\n return null;\n }\n var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;\n // If phone-context parameter is empty\n if (phoneContextStart >= numberToExtractFrom.length) {\n return '';\n }\n var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart);\n // If phone-context is not the last parameter\n if (phoneContextEnd >= 0) {\n return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);\n } else {\n return numberToExtractFrom.substring(phoneContextStart);\n }\n}\n\n/**\r\n * Returns whether the value of phoneContext follows the syntax defined in RFC3966.\r\n *\r\n * @param {string|null} phoneContext\r\n * @return {boolean}\r\n */\nexport function isPhoneContextValid(phoneContext) {\n if (phoneContext === null) {\n return true;\n }\n if (phoneContext.length === 0) {\n return false;\n }\n\n // Does phone-context value match pattern of global-number-digits or domainname.\n return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);\n}\n//# sourceMappingURL=extractPhoneContext.js.map"],"x_google_ignoreList":[0],"mappings":";AAWA,IAAI,IAAuB,OAAY,IAAA,sBACnC,IAAgC,SAAyB,IAAuB,OAAY,IAAe,MAAM,IAAuB,MAMxI,IAAwC,IAAI,OAAO,GAA+B,IAAI,EAItF,IAAY,GACZ,IAAuB,MAAM,IAAY,eAAe,IAAY,OAEpE,IAAoB,sBAAoC,IAAY,OACpE,IAAsB,OAAO,IAAuB,UAAU,IAAoB,SAMlF,IAA8B,IAAI,OAAO,GAAqB,IAAI,EAC3D,IAAkB,QAClB,IAAyB,mBACzB,IAA2B;AAStC,SAAwB,EAAoB,GAAqB;CAC/D,IAAI,IAAsB,EAAoB,QAAQ,EAAuB;AAE7E,KAAI,IAAsB,EACxB,QAAO;CAET,IAAI,IAAoB,IAAsB,EAAuB;AAErE,KAAI,KAAqB,EAAoB,OAC3C,QAAO;CAET,IAAI,IAAkB,EAAoB,QAAQ,KAAK,EAAkB;AAKvE,QAHE,KAAmB,IACd,EAAoB,UAAU,GAAmB,EAAgB,GAEjE,EAAoB,UAAU,EAAkB;;AAU3D,SAAgB,EAAoB,GAAc;AAShD,QARI,MAAiB,OACZ,KAEL,EAAa,WAAW,IACnB,KAIF,EAAsC,KAAK,EAAa,IAAI,EAA4B,KAAK,EAAa"}
|
package/dist/index278.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { ParseError as e } from "./index273.js";
|
|
2
|
+
import t, { RFC3966_ISDN_SUBADDRESS_ as n, RFC3966_PHONE_CONTEXT_ as r, RFC3966_PREFIX_ as i, isPhoneContextValid as a } from "./index277.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js
|
|
4
|
+
function o(o, s) {
|
|
5
|
+
var c = s.extractFormattedPhoneNumber, l = t(o);
|
|
6
|
+
if (!a(l)) throw new e("NOT_A_NUMBER");
|
|
7
|
+
var u;
|
|
8
|
+
if (l === null) u = c(o) || "";
|
|
9
|
+
else {
|
|
10
|
+
u = "", l.charAt(0) === "+" && (u += l);
|
|
11
|
+
var d = o.indexOf(i), f = d >= 0 ? d + i.length : 0, p = o.indexOf(r);
|
|
12
|
+
u += o.substring(f, p);
|
|
13
|
+
}
|
|
14
|
+
var m = u.indexOf(n);
|
|
15
|
+
if (m > 0 && (u = u.substring(0, m)), u !== "") return u;
|
|
13
16
|
}
|
|
14
17
|
//#endregion
|
|
15
|
-
export {
|
|
18
|
+
export { o as default };
|
|
16
19
|
|
|
17
20
|
//# sourceMappingURL=index278.js.map
|
package/dist/index278.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index278.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/
|
|
1
|
+
{"version":3,"file":"index278.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js"],"sourcesContent":["import extractPhoneContext, { isPhoneContextValid, PLUS_SIGN, RFC3966_PREFIX_, RFC3966_PHONE_CONTEXT_, RFC3966_ISDN_SUBADDRESS_ } from './extractPhoneContext.js';\nimport ParseError from '../ParseError.js';\n\n/**\r\n * @param {string} numberToParse\r\n * @param {string} nationalNumber\r\n * @return {}\r\n */\nexport default function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {\n var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;\n var phoneContext = extractPhoneContext(numberToParse);\n if (!isPhoneContextValid(phoneContext)) {\n throw new ParseError('NOT_A_NUMBER');\n }\n var phoneNumberString;\n if (phoneContext === null) {\n // Extract a possible number from the string passed in.\n // (this strips leading characters that could not be the start of a phone number)\n phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';\n } else {\n phoneNumberString = '';\n\n // If the phone context contains a phone number prefix, we need to capture\n // it, whereas domains will be ignored.\n if (phoneContext.charAt(0) === PLUS_SIGN) {\n phoneNumberString += phoneContext;\n }\n\n // Now append everything between the \"tel:\" prefix and the phone-context.\n // This should include the national number, an optional extension or\n // isdn-subaddress component. Note we also handle the case when \"tel:\" is\n // missing, as we have seen in some of the phone number inputs.\n // In that case, we append everything from the beginning.\n var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);\n var indexOfNationalNumber;\n // RFC 3966 \"tel:\" prefix is preset at this stage because\n // `isPhoneContextValid()` requires it to be present.\n /* istanbul ignore else */\n if (indexOfRfc3966Prefix >= 0) {\n indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;\n } else {\n indexOfNationalNumber = 0;\n }\n var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);\n phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);\n }\n\n // Delete the isdn-subaddress and everything after it if it is present.\n // Note extension won't appear at the same time with isdn-subaddress\n // according to paragraph 5.3 of the RFC3966 spec.\n var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);\n if (indexOfIsdn > 0) {\n phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);\n }\n // If both phone context and isdn-subaddress are absent but other\n // parameters are present, the parameters are left in nationalNumber.\n // This is because we are concerned about deleting content from a potential\n // number string when there is no strong evidence that the number is\n // actually written in RFC3966.\n\n if (phoneNumberString !== '') {\n return phoneNumberString;\n }\n}\n//# sourceMappingURL=extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAQA,SAAwB,EAAwD,GAAe,GAAM;CACnG,IAAI,IAA8B,EAAK,6BACnC,IAAe,EAAoB,EAAc;AACrD,KAAI,CAAC,EAAoB,EAAa,CACpC,OAAM,IAAI,EAAW,eAAe;CAEtC,IAAI;AACJ,KAAI,MAAiB,KAGnB,KAAoB,EAA4B,EAAc,IAAI;MAC7D;AAKL,EAJA,IAAoB,IAIhB,EAAa,OAAO,EAAE,KAAA,QACxB,KAAqB;EAQvB,IAAI,IAAuB,EAAc,QAAQ,EAAgB,EAC7D,IAIA,KAAwB,IACF,IAAuB,EAAgB,SAEvC,GAEtB,IAAsB,EAAc,QAAQ,EAAuB;AACvE,OAAqB,EAAc,UAAU,GAAuB,EAAoB;;CAM1F,IAAI,IAAc,EAAkB,QAAQ,EAAyB;AAUrE,KATI,IAAc,MAChB,IAAoB,EAAkB,UAAU,GAAG,EAAY,GAQ7D,MAAsB,GACxB,QAAO"}
|
package/dist/index279.js
CHANGED
|
@@ -1,20 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { Metadata as e, getCountryCallingCode as t } from "./index249.js";
|
|
2
|
+
import { isPossibleNumber as n } from "./index252.js";
|
|
3
|
+
import r from "./index253.js";
|
|
4
|
+
import { PLUS_CHARS as i, VALID_DIGITS as a } from "./index257.js";
|
|
5
|
+
import o from "./index261.js";
|
|
6
|
+
import s from "./index262.js";
|
|
7
|
+
import c from "./index264.js";
|
|
8
|
+
import l, { isViablePhoneNumberStart as u } from "./index269.js";
|
|
9
|
+
import { PhoneNumber as d } from "./index272.js";
|
|
10
|
+
import { ParseError as f } from "./index273.js";
|
|
11
|
+
import p from "./index274.js";
|
|
12
|
+
import m from "./index276.js";
|
|
13
|
+
import h from "./index278.js";
|
|
14
|
+
//#region ../../node_modules/libphonenumber-js/es6/parse.js
|
|
15
|
+
var g = 250, _ = RegExp("[" + i + a + "]"), v = RegExp("[^" + a + "#]+$"), y = !1;
|
|
16
|
+
function b(t, i, a) {
|
|
17
|
+
if (i ||= {}, a = new e(a), i.defaultCountry && !a.hasCountry(i.defaultCountry)) throw i.v2 ? new f("INVALID_COUNTRY") : Error(`Unknown country: ${i.defaultCountry}`);
|
|
18
|
+
var o = S(t, i.v2, i.extract), s = o.number, c = o.ext, l = o.error;
|
|
19
|
+
if (!s) {
|
|
20
|
+
if (i.v2) throw l === "TOO_SHORT" ? new f("TOO_SHORT") : new f("NOT_A_NUMBER");
|
|
21
|
+
return {};
|
|
13
22
|
}
|
|
14
|
-
var m = u.
|
|
15
|
-
if (
|
|
23
|
+
var u = w(s, i.defaultCountry, i.defaultCallingCode, a), p = u.country, m = u.nationalNumber, h = u.countryCallingCode, g = u.countryCallingCodeSource, _ = u.carrierCode;
|
|
24
|
+
if (!a.hasSelectedNumberingPlan()) {
|
|
25
|
+
if (i.v2) throw new f("INVALID_COUNTRY");
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
if (!m || m.length < 2) {
|
|
29
|
+
/* istanbul ignore if */
|
|
30
|
+
if (i.v2) throw new f("TOO_SHORT");
|
|
31
|
+
return {};
|
|
32
|
+
}
|
|
33
|
+
if (m.length > 17) {
|
|
34
|
+
if (i.v2) throw new f("TOO_LONG");
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
if (i.v2) {
|
|
38
|
+
var v = new d(h, m, a.metadata);
|
|
39
|
+
return p && (v.country = p), _ && (v.carrierCode = _), c && (v.ext = c), v.__countryCallingCodeSource = g, v;
|
|
40
|
+
}
|
|
41
|
+
var y = (i.extended ? a.hasSelectedNumberingPlan() : p) ? r(m, a.nationalNumberPattern()) : !1;
|
|
42
|
+
return i.extended ? {
|
|
43
|
+
country: p,
|
|
44
|
+
countryCallingCode: h,
|
|
45
|
+
carrierCode: _,
|
|
46
|
+
valid: y,
|
|
47
|
+
possible: y ? !0 : !!(i.extended === !0 && a.possibleLengths() && n(m, p, a)),
|
|
48
|
+
phone: m,
|
|
49
|
+
ext: c
|
|
50
|
+
} : y ? C(p, m, c) : {};
|
|
51
|
+
}
|
|
52
|
+
function x(e, t, n) {
|
|
53
|
+
if (e) {
|
|
54
|
+
if (e.length > g) {
|
|
55
|
+
if (n) throw new f("TOO_LONG");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (t === !1) return e;
|
|
59
|
+
var r = e.search(_);
|
|
60
|
+
if (!(r < 0)) return e.slice(r).replace(v, "");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function S(e, t, n) {
|
|
64
|
+
var r = h(e, { extractFormattedPhoneNumber: function(e) {
|
|
65
|
+
return x(e, n, t);
|
|
66
|
+
} });
|
|
67
|
+
if (!r) return {};
|
|
68
|
+
if (!l(r)) return u(r) ? { error: "TOO_SHORT" } : {};
|
|
69
|
+
var i = p(r);
|
|
70
|
+
return i.ext ? i : { number: r };
|
|
71
|
+
}
|
|
72
|
+
function C(e, t, n) {
|
|
73
|
+
var r = {
|
|
74
|
+
country: e,
|
|
75
|
+
phone: t
|
|
76
|
+
};
|
|
77
|
+
return n && (r.ext = n), r;
|
|
78
|
+
}
|
|
79
|
+
function w(e, n, r, i) {
|
|
80
|
+
var a = c(m(e), void 0, n, r, i.metadata), l = a.countryCallingCodeSource, u = a.countryCallingCode, d = a.number, f;
|
|
81
|
+
if (u) i.selectNumberingPlan(u);
|
|
82
|
+
else if (d && (n || r)) i.selectNumberingPlan(n, r), n ? f = n : y && i.isNonGeographicCallingCode(r) && (f = "001"), u = r || t(n, i.metadata);
|
|
83
|
+
else return {};
|
|
84
|
+
if (!d) return {
|
|
85
|
+
countryCallingCodeSource: l,
|
|
86
|
+
countryCallingCode: u
|
|
87
|
+
};
|
|
88
|
+
var p = s(m(d), f, i), h = p.nationalNumber, g = p.carrierCode, _ = o(u, {
|
|
89
|
+
nationalNumber: h,
|
|
90
|
+
metadata: i
|
|
91
|
+
});
|
|
92
|
+
return _ && (f = _, _ === "001" || i.selectNumberingPlan(f)), {
|
|
93
|
+
country: f,
|
|
94
|
+
countryCallingCode: u,
|
|
95
|
+
countryCallingCodeSource: l,
|
|
96
|
+
nationalNumber: h,
|
|
97
|
+
carrierCode: g
|
|
98
|
+
};
|
|
16
99
|
}
|
|
17
100
|
//#endregion
|
|
18
|
-
export {
|
|
101
|
+
export { b as default };
|
|
19
102
|
|
|
20
103
|
//# sourceMappingURL=index279.js.map
|
package/dist/index279.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index279.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js"],"sourcesContent":["import extractPhoneContext, { isPhoneContextValid, PLUS_SIGN, RFC3966_PREFIX_, RFC3966_PHONE_CONTEXT_, RFC3966_ISDN_SUBADDRESS_ } from './extractPhoneContext.js';\nimport ParseError from '../ParseError.js';\n\n/**\r\n * @param {string} numberToParse\r\n * @param {string} nationalNumber\r\n * @return {}\r\n */\nexport default function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {\n var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;\n var phoneContext = extractPhoneContext(numberToParse);\n if (!isPhoneContextValid(phoneContext)) {\n throw new ParseError('NOT_A_NUMBER');\n }\n var phoneNumberString;\n if (phoneContext === null) {\n // Extract a possible number from the string passed in.\n // (this strips leading characters that could not be the start of a phone number)\n phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';\n } else {\n phoneNumberString = '';\n\n // If the phone context contains a phone number prefix, we need to capture\n // it, whereas domains will be ignored.\n if (phoneContext.charAt(0) === PLUS_SIGN) {\n phoneNumberString += phoneContext;\n }\n\n // Now append everything between the \"tel:\" prefix and the phone-context.\n // This should include the national number, an optional extension or\n // isdn-subaddress component. Note we also handle the case when \"tel:\" is\n // missing, as we have seen in some of the phone number inputs.\n // In that case, we append everything from the beginning.\n var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);\n var indexOfNationalNumber;\n // RFC 3966 \"tel:\" prefix is preset at this stage because\n // `isPhoneContextValid()` requires it to be present.\n /* istanbul ignore else */\n if (indexOfRfc3966Prefix >= 0) {\n indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;\n } else {\n indexOfNationalNumber = 0;\n }\n var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);\n phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);\n }\n\n // Delete the isdn-subaddress and everything after it if it is present.\n // Note extension won't appear at the same time with isdn-subaddress\n // according to paragraph 5.3 of the RFC3966 spec.\n var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);\n if (indexOfIsdn > 0) {\n phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);\n }\n // If both phone context and isdn-subaddress are absent but other\n // parameters are present, the parameters are left in nationalNumber.\n // This is because we are concerned about deleting content from a potential\n // number string when there is no strong evidence that the number is\n // actually written in RFC3966.\n\n if (phoneNumberString !== '') {\n return phoneNumberString;\n }\n}\n//# sourceMappingURL=extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAQA,SAAwB,EAAwD,GAAe,GAAM;CACnG,IAAI,IAA8B,EAAK,6BACnC,IAAe,EAAoB,EAAc;AACrD,KAAI,CAAC,EAAoB,EAAa,CACpC,OAAM,IAAI,EAAW,eAAe;CAEtC,IAAI;AACJ,KAAI,MAAiB,KAGnB,KAAoB,EAA4B,EAAc,IAAI;MAC7D;AAKL,EAJA,IAAoB,IAIhB,EAAa,OAAO,EAAE,KAAA,QACxB,KAAqB;EAQvB,IAAI,IAAuB,EAAc,QAAQ,EAAgB,EAC7D,IAIA,KAAwB,IACF,IAAuB,EAAgB,SAEvC,GAEtB,IAAsB,EAAc,QAAQ,EAAuB;AACvE,OAAqB,EAAc,UAAU,GAAuB,EAAoB;;CAM1F,IAAI,IAAc,EAAkB,QAAQ,EAAyB;AAUrE,KATI,IAAc,MAChB,IAAoB,EAAkB,UAAU,GAAG,EAAY,GAQ7D,MAAsB,GACxB,QAAO"}
|
|
1
|
+
{"version":3,"file":"index279.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/parse.js"],"sourcesContent":["// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\n\nimport { VALID_DIGITS, PLUS_CHARS, MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN } from './constants.js';\nimport ParseError from './ParseError.js';\nimport Metadata from './metadata.js';\nimport isViablePhoneNumber, { isViablePhoneNumberStart } from './helpers/isViablePhoneNumber.js';\nimport extractExtension from './helpers/extension/extractExtension.js';\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber.js';\nimport getCountryCallingCode from './getCountryCallingCode.js';\nimport { isPossibleNumber } from './isPossible.js';\n// import { parseRFC3966 } from './helpers/RFC3966.js'\nimport PhoneNumber from './PhoneNumber.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractNationalNumber from './helpers/extractNationalNumber.js';\n// import stripIddPrefix from './helpers/stripIddPrefix.js'\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport extractFormattedPhoneNumberFromPossibleRfc3966NumberUri from './helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js';\n\n// We don't allow input strings for parsing to be longer than 250 chars.\n// This prevents malicious input from consuming CPU.\nvar MAX_INPUT_STRING_LENGTH = 250;\n\n// This consists of the plus symbol, digits, and arabic-indic digits.\nvar PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');\n\n// Regular expression of trailing characters that we want to remove.\n// A trailing `#` is sometimes used when writing phone numbers with extensions in US.\n// Example: \"+1 (645) 123 1234-910#\" number has extension \"910\".\nvar AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\n// Examples:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\n\n/**\r\n * Parses a phone number.\r\n *\r\n * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)\r\n * parse('123456789', { defaultCountry: 'RU' }, metadata)\r\n * parse('123456789', undefined, metadata)\r\n *\r\n * @param {string} input\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).\r\n */\nexport default function parse(text, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata);\n\n // Validate `defaultCountry`.\n if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n throw new Error(\"Unknown country: \".concat(options.defaultCountry));\n }\n\n // Parse the phone number.\n var _parseInput = parseInput(text, options.v2, options.extract),\n formattedPhoneNumber = _parseInput.number,\n ext = _parseInput.ext,\n error = _parseInput.error;\n\n // If the phone number is not viable then return nothing.\n if (!formattedPhoneNumber) {\n if (options.v2) {\n if (error === 'TOO_SHORT') {\n throw new ParseError('TOO_SHORT');\n }\n throw new ParseError('NOT_A_NUMBER');\n }\n return {};\n }\n var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),\n country = _parsePhoneNumber.country,\n nationalNumber = _parsePhoneNumber.nationalNumber,\n countryCallingCode = _parsePhoneNumber.countryCallingCode,\n countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,\n carrierCode = _parsePhoneNumber.carrierCode;\n if (!metadata.hasSelectedNumberingPlan()) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n return {};\n }\n\n // Validate national (significant) number length.\n if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {\n // Won't throw here because the regexp already demands length > 1.\n /* istanbul ignore if */\n if (options.v2) {\n throw new ParseError('TOO_SHORT');\n }\n // Google's demo just throws an error in this case.\n return {};\n }\n\n // Validate national (significant) number length.\n //\n // A sidenote:\n //\n // They say that sometimes national (significant) numbers\n // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).\n // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36\n // Such numbers will just be discarded.\n //\n if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {\n if (options.v2) {\n throw new ParseError('TOO_LONG');\n }\n // Google's demo just throws an error in this case.\n return {};\n }\n if (options.v2) {\n var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);\n if (country) {\n phoneNumber.country = country;\n }\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n if (ext) {\n phoneNumber.ext = ext;\n }\n phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;\n return phoneNumber;\n }\n\n // Check if national phone number pattern matches the number.\n // National number pattern is different for each country,\n // even for those ones which are part of the \"NANPA\" group.\n var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;\n if (!options.extended) {\n return valid ? result(country, nationalNumber, ext) : {};\n }\n\n // isInternational: countryCallingCode !== undefined\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n carrierCode: carrierCode,\n valid: valid,\n possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata) ? true : false,\n phone: nationalNumber,\n ext: ext\n };\n}\n\n/**\r\n * Extracts a formatted phone number from text.\r\n * Doesn't guarantee that the extracted phone number\r\n * is a valid phone number (for example, doesn't validate its length).\r\n * @param {string} text\r\n * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.\r\n * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.\r\n * @return {string}\r\n * @example\r\n * // Returns \"(213) 373-4253\".\r\n * extractFormattedPhoneNumber(\"Call (213) 373-4253 for assistance.\")\r\n */\nfunction _extractFormattedPhoneNumber(text, extract, throwOnError) {\n if (!text) {\n return;\n }\n if (text.length > MAX_INPUT_STRING_LENGTH) {\n if (throwOnError) {\n throw new ParseError('TOO_LONG');\n }\n return;\n }\n if (extract === false) {\n return text;\n }\n // Attempt to extract a possible number from the string passed in\n var startsAt = text.search(PHONE_NUMBER_START_PATTERN);\n if (startsAt < 0) {\n return;\n }\n return text\n // Trim everything to the left of the phone number\n .slice(startsAt)\n // Remove trailing non-numerical characters\n .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');\n}\n\n/**\r\n * @param {string} text - Input.\r\n * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.\r\n * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\nfunction parseInput(text, v2, extract) {\n // // Parse RFC 3966 phone number URI.\n // if (text && text.indexOf('tel:') === 0) {\n // \treturn parseRFC3966(text)\n // }\n // let number = extractFormattedPhoneNumber(text, extract, v2)\n var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {\n extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {\n return _extractFormattedPhoneNumber(text, extract, v2);\n }\n });\n // If the phone number is not viable, then abort.\n if (!number) {\n return {};\n }\n if (!isViablePhoneNumber(number)) {\n if (isViablePhoneNumberStart(number)) {\n return {\n error: 'TOO_SHORT'\n };\n }\n return {};\n }\n // Attempt to parse extension first, since it doesn't require region-specific\n // data and we want to have the non-normalised number here.\n var withExtensionStripped = extractExtension(number);\n if (withExtensionStripped.ext) {\n return withExtensionStripped;\n }\n return {\n number: number\n };\n}\n\n/**\r\n * Creates `parse()` result object.\r\n */\nfunction result(country, nationalNumber, ext) {\n var result = {\n country: country,\n phone: nationalNumber\n };\n if (ext) {\n result.ext = ext;\n }\n return result;\n}\n\n/**\r\n * Parses a viable phone number.\r\n * @param {string} formattedPhoneNumber — Example: \"(213) 373-4253\".\r\n * @param {string} [defaultCountry]\r\n * @param {string} [defaultCallingCode]\r\n * @param {Metadata} metadata\r\n * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.\r\n */\nfunction parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {\n // Extract calling code from phone number.\n var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata),\n countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number;\n\n // The exact country of the phone number\n var country;\n\n // If `formattedPhoneNumber` is passed in \"international\" format,\n // choose a country by `countryCallingCode`.\n if (countryCallingCode) {\n metadata.selectNumberingPlan(countryCallingCode);\n }\n // Else, if `formattedPhoneNumber` is passed in \"national\" format,\n // then `number` is defined and `countryCallingCode` is `undefined`.\n else if (number && (defaultCountry || defaultCallingCode)) {\n metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);\n if (defaultCountry) {\n country = defaultCountry;\n } else {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n country = '001';\n }\n }\n }\n countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);\n } else return {};\n if (!number) {\n return {\n countryCallingCodeSource: countryCallingCodeSource,\n countryCallingCode: countryCallingCode\n };\n }\n var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata),\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode;\n\n // Sometimes there are several countries\n // corresponding to the same country phone code\n // (e.g. NANPA countries all having `1` country phone code).\n // Therefore, to reliably determine the exact country,\n // national (significant) number should have been parsed first.\n //\n // When `metadata.json` is generated, all \"ambiguous\" country phone codes\n // get their countries populated with the full set of\n // \"phone number type\" regular expressions.\n //\n var exactCountry = getCountryByCallingCode(countryCallingCode, {\n nationalNumber: nationalNumber,\n metadata: metadata\n });\n if (exactCountry) {\n country = exactCountry;\n /* istanbul ignore if */\n if (exactCountry === '001') {\n // Can't happen with `USE_NON_GEOGRAPHIC_COUNTRY_CODE` being `false`.\n // If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` is set to `true` for some reason,\n // then remove the \"istanbul ignore if\".\n } else {\n metadata.selectNumberingPlan(country);\n }\n }\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n countryCallingCodeSource: countryCallingCodeSource,\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n}\n//# sourceMappingURL=parse.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAwBA,IAAI,IAA0B,KAG1B,IAAiC,OAAO,MAAM,IAAa,IAAe,IAAI,EAK9E,IAAqC,OAAO,OAAO,IAAe,OAAY,EAC9E,IAAkC;AA0BtC,SAAwB,EAAM,GAAM,GAAS,GAAU;AAOrD,KAJA,MAAqB,EAAE,EACvB,IAAW,IAAI,EAAS,EAAS,EAG7B,EAAQ,kBAAkB,CAAC,EAAS,WAAW,EAAQ,eAAe,CAIxE,OAHI,EAAQ,KACJ,IAAI,EAAW,kBAAkB,GAE/B,MAAM,oBAA2B,EAAQ,iBAAgB;CAIrE,IAAI,IAAc,EAAW,GAAM,EAAQ,IAAI,EAAQ,QAAQ,EAC7D,IAAuB,EAAY,QACnC,IAAM,EAAY,KAClB,IAAQ,EAAY;AAGtB,KAAI,CAAC,GAAsB;AACzB,MAAI,EAAQ,GAIV,OAHI,MAAU,cACN,IAAI,EAAW,YAAY,GAE7B,IAAI,EAAW,eAAe;AAEtC,SAAO,EAAE;;CAEX,IAAI,IAAoB,EAAiB,GAAsB,EAAQ,gBAAgB,EAAQ,oBAAoB,EAAS,EAC1H,IAAU,EAAkB,SAC5B,IAAiB,EAAkB,gBACnC,IAAqB,EAAkB,oBACvC,IAA2B,EAAkB,0BAC7C,IAAc,EAAkB;AAClC,KAAI,CAAC,EAAS,0BAA0B,EAAE;AACxC,MAAI,EAAQ,GACV,OAAM,IAAI,EAAW,kBAAkB;AAEzC,SAAO,EAAE;;AAIX,KAAI,CAAC,KAAkB,EAAe,SAAA,GAA6B;;AAGjE,MAAI,EAAQ,GACV,OAAM,IAAI,EAAW,YAAY;AAGnC,SAAO,EAAE;;AAYX,KAAI,EAAe,SAAA,IAA6B;AAC9C,MAAI,EAAQ,GACV,OAAM,IAAI,EAAW,WAAW;AAGlC,SAAO,EAAE;;AAEX,KAAI,EAAQ,IAAI;EACd,IAAI,IAAc,IAAI,EAAY,GAAoB,GAAgB,EAAS,SAAS;AAWxF,SAVI,MACF,EAAY,UAAU,IAEpB,MACF,EAAY,cAAc,IAExB,MACF,EAAY,MAAM,IAEpB,EAAY,6BAA6B,GAClC;;CAMT,IAAI,KAAS,EAAQ,WAAW,EAAS,0BAA0B,GAAG,KAAW,EAAgB,GAAgB,EAAS,uBAAuB,CAAC,GAAG;AAOrJ,QANK,EAAQ,WAMN;EACI;EACW;EACP;EACN;EACP,UAAU,IAAQ,KAAO,KAAQ,aAAa,MAAQ,EAAS,iBAAiB,IAAI,EAAiB,GAAgB,GAAS,EAAS;EACvI,OAAO;EACF;EACN,GAbQ,IAAQ,EAAO,GAAS,GAAgB,EAAI,GAAG,EAAE;;AA4B5D,SAAS,EAA6B,GAAM,GAAS,GAAc;AAC5D,QAGL;MAAI,EAAK,SAAS,GAAyB;AACzC,OAAI,EACF,OAAM,IAAI,EAAW,WAAW;AAElC;;AAEF,MAAI,MAAY,GACd,QAAO;EAGT,IAAI,IAAW,EAAK,OAAO,EAA2B;AAClD,YAAW,GAGf,QAAO,EAEN,MAAM,EAAS,CAEf,QAAQ,GAAgC,GAAG;;;AAS9C,SAAS,EAAW,GAAM,GAAI,GAAS;CAMrC,IAAI,IAAS,EAAwD,GAAM,EACzE,6BAA6B,SAAqC,GAAM;AACtE,SAAO,EAA6B,GAAM,GAAS,EAAG;IAEzD,CAAC;AAEF,KAAI,CAAC,EACH,QAAO,EAAE;AAEX,KAAI,CAAC,EAAoB,EAAO,CAM9B,QALI,EAAyB,EAAO,GAC3B,EACL,OAAO,aACR,GAEI,EAAE;CAIX,IAAI,IAAwB,EAAiB,EAAO;AAIpD,QAHI,EAAsB,MACjB,IAEF,EACG,WACT;;AAMH,SAAS,EAAO,GAAS,GAAgB,GAAK;CAC5C,IAAI,IAAS;EACF;EACT,OAAO;EACR;AAID,QAHI,MACF,EAAO,MAAM,IAER;;AAWT,SAAS,EAAiB,GAAsB,GAAgB,GAAoB,GAAU;CAE5F,IAAI,IAAwB,EAA0B,EAA2B,EAAqB,EAAE,KAAA,GAAW,GAAgB,GAAoB,EAAS,SAAS,EACvK,IAA2B,EAAsB,0BACjD,IAAqB,EAAsB,oBAC3C,IAAS,EAAsB,QAG7B;AAIJ,KAAI,EACF,GAAS,oBAAoB,EAAmB;UAIzC,MAAW,KAAkB,GAYpC,CAXA,EAAS,oBAAoB,GAAgB,EAAmB,EAC5D,IACF,IAAU,IAGN,KACE,EAAS,2BAA2B,EAAmB,KACzD,IAAU,QAIhB,IAAqB,KAAsB,EAAsB,GAAgB,EAAS,SAAS;KAC9F,QAAO,EAAE;AAChB,KAAI,CAAC,EACH,QAAO;EACqB;EACN;EACrB;CAEH,IAAI,IAAwB,EAAsB,EAA2B,EAAO,EAAE,GAAS,EAAS,EACtG,IAAiB,EAAsB,gBACvC,IAAc,EAAsB,aAYlC,IAAe,EAAwB,GAAoB;EAC7C;EACN;EACX,CAAC;AAYF,QAXI,MACF,IAAU,GAEN,MAAiB,SAKnB,EAAS,oBAAoB,EAAQ,GAGlC;EACI;EACW;EACM;EACV;EACH;EACd"}
|
package/dist/index28.js
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TZDateMini as t } from "./index27.js";
|
|
3
|
-
//#region ../../node_modules/@date-fns/tz/date/index.js
|
|
4
|
-
var n = class n extends t {
|
|
5
|
-
static tz(e, ...t) {
|
|
6
|
-
return t.length ? new n(...t, e) : new n(Date.now(), e);
|
|
7
|
-
}
|
|
8
|
-
toISOString() {
|
|
9
|
-
let [e, t, n] = this.tzComponents(), r = `${e}${t}:${n}`;
|
|
10
|
-
return this.internal.toISOString().slice(0, -1) + r;
|
|
11
|
-
}
|
|
12
|
-
toString() {
|
|
13
|
-
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
14
|
-
}
|
|
15
|
-
toDateString() {
|
|
16
|
-
let [e, t, n, r] = this.internal.toUTCString().split(" ");
|
|
17
|
-
return `${e?.slice(0, -1)} ${n} ${t} ${r}`;
|
|
18
|
-
}
|
|
19
|
-
toTimeString() {
|
|
20
|
-
let t = this.internal.toUTCString().split(" ")[4], [n, r, i] = this.tzComponents();
|
|
21
|
-
return `${t} GMT${n}${r}${i} (${e(this.timeZone, this)})`;
|
|
22
|
-
}
|
|
23
|
-
toLocaleString(e, t) {
|
|
24
|
-
return Date.prototype.toLocaleString.call(this, e, {
|
|
25
|
-
...t,
|
|
26
|
-
timeZone: t?.timeZone || this.timeZone
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
toLocaleDateString(e, t) {
|
|
30
|
-
return Date.prototype.toLocaleDateString.call(this, e, {
|
|
31
|
-
...t,
|
|
32
|
-
timeZone: t?.timeZone || this.timeZone
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
toLocaleTimeString(e, t) {
|
|
36
|
-
return Date.prototype.toLocaleTimeString.call(this, e, {
|
|
37
|
-
...t,
|
|
38
|
-
timeZone: t?.timeZone || this.timeZone
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
tzComponents() {
|
|
42
|
-
let e = this.getTimezoneOffset();
|
|
43
|
-
return [
|
|
44
|
-
e > 0 ? "-" : "+",
|
|
45
|
-
String(Math.floor(Math.abs(e) / 60)).padStart(2, "0"),
|
|
46
|
-
String(Math.abs(e) % 60).padStart(2, "0")
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
withTimeZone(e) {
|
|
50
|
-
return new n(+this, e);
|
|
51
|
-
}
|
|
52
|
-
[Symbol.for("constructDateFrom")](e) {
|
|
53
|
-
return new n(+new Date(e), this.timeZone);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
//#endregion
|
|
57
|
-
export { n as TZDate };
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=index28.js.map
|
|
1
|
+
import "./index27.js";
|