



'''simple docstring'''



from math import cos, sin, sqrt, tau

from audio_filters.iir_filter import IIRFilter



def   __lowerCAmelCase					(							lowerCamelCase   :						int				,		lowerCamelCase   :						int				,		lowerCamelCase   :						float = 1 / sqrt(2					)					):






	'''simple docstring'''




	__lowerCAmelCase												=  tau * frequency / samplerate
	__lowerCAmelCase												=  sin(lowerCamelCase					)
	__lowerCAmelCase												=  cos(lowerCamelCase					)
	__lowerCAmelCase												=  _sin / (2 * q_factor)

	__lowerCAmelCase												=  (1 - _cos) / 2
	__lowerCAmelCase												=  1 - _cos

	__lowerCAmelCase												=  1 + alpha
	__lowerCAmelCase												=  -2 * _cos
	__lowerCAmelCase												=  1 - alpha

	__lowerCAmelCase												=  IIRFilter(2					)
	filt.set_coefficients([aa, aa, aa]				,		[ba, ba, ba]					)
	return filt



def   __lowerCAmelCase					(							lowerCamelCase   :						int				,		lowerCamelCase   :						int				,		lowerCamelCase   :						float = 1 / sqrt(2					)					):






	'''simple docstring'''




	__lowerCAmelCase												=  tau * frequency / samplerate
	__lowerCAmelCase												=  sin(lowerCamelCase					)
	__lowerCAmelCase												=  cos(lowerCamelCase					)
	__lowerCAmelCase												=  _sin / (2 * q_factor)

	__lowerCAmelCase												=  (1 + _cos) / 2
	__lowerCAmelCase												=  -1 - _cos

	__lowerCAmelCase												=  1 + alpha
	__lowerCAmelCase												=  -2 * _cos
	__lowerCAmelCase												=  1 - alpha

	__lowerCAmelCase												=  IIRFilter(2					)
	filt.set_coefficients([aa, aa, aa]				,		[ba, ba, ba]					)
	return filt



def   __lowerCAmelCase					(							lowerCamelCase   :						int				,		lowerCamelCase   :						int				,		lowerCamelCase   :						float = 1 / sqrt(2					)					):






	'''simple docstring'''




	__lowerCAmelCase												=  tau * frequency / samplerate
	__lowerCAmelCase												=  sin(lowerCamelCase					)
	__lowerCAmelCase												=  cos(lowerCamelCase					)
	__lowerCAmelCase												=  _sin / (2 * q_factor)

	__lowerCAmelCase												=  _sin / 2
	__lowerCAmelCase												=  0
	__lowerCAmelCase												=  -ba

	__lowerCAmelCase												=  1 + alpha
	__lowerCAmelCase												=  -2 * _cos
	__lowerCAmelCase												=  1 - alpha

	__lowerCAmelCase												=  IIRFilter(2					)
	filt.set_coefficients([aa, aa, aa]				,		[ba, ba, ba]					)
	return filt



def   __lowerCAmelCase					(							lowerCamelCase   :						int				,		lowerCamelCase   :						int				,		lowerCamelCase   :						float = 1 / sqrt(2					)					):






	'''simple docstring'''




	__lowerCAmelCase												=  tau * frequency / samplerate
	__lowerCAmelCase												=  sin(lowerCamelCase					)
	__lowerCAmelCase												=  cos(lowerCamelCase					)
	__lowerCAmelCase												=  _sin / (2 * q_factor)

	__lowerCAmelCase												=  1 - alpha
	__lowerCAmelCase												=  -2 * _cos
	__lowerCAmelCase												=  1 + alpha

	__lowerCAmelCase												=  IIRFilter(2					)
	filt.set_coefficients([ba, ba, ba]				,		[ba, ba, ba]					)
	return filt



def   __lowerCAmelCase					(							lowerCamelCase   :						int				,		lowerCamelCase   :						int				,		lowerCamelCase   :						float				,		lowerCamelCase   :						float = 1 / sqrt(2					)				,		):






	'''simple docstring'''




	__lowerCAmelCase												=  tau * frequency / samplerate
	__lowerCAmelCase												=  sin(lowerCamelCase					)
	__lowerCAmelCase												=  cos(lowerCamelCase					)
	__lowerCAmelCase												=  _sin / (2 * q_factor)
	__lowerCAmelCase												=  10 ** (gain_db / 40)

	__lowerCAmelCase												=  1 + alpha * big_a
	__lowerCAmelCase												=  -2 * _cos
	__lowerCAmelCase												=  1 - alpha * big_a
	__lowerCAmelCase												=  1 + alpha / big_a
	__lowerCAmelCase												=  -2 * _cos
	__lowerCAmelCase												=  1 - alpha / big_a

	__lowerCAmelCase												=  IIRFilter(2					)
	filt.set_coefficients([aa, aa, aa]				,		[ba, ba, ba]					)
	return filt



def   __lowerCAmelCase					(							lowerCamelCase   :						int				,		lowerCamelCase   :						int				,		lowerCamelCase   :						float				,		lowerCamelCase   :						float = 1 / sqrt(2					)				,		):






	'''simple docstring'''




	__lowerCAmelCase												=  tau * frequency / samplerate
	__lowerCAmelCase												=  sin(lowerCamelCase					)
	__lowerCAmelCase												=  cos(lowerCamelCase					)
	__lowerCAmelCase												=  _sin / (2 * q_factor)
	__lowerCAmelCase												=  10 ** (gain_db / 40)
	__lowerCAmelCase												=  (big_a + 1) - (big_a - 1) * _cos
	__lowerCAmelCase												=  (big_a + 1) + (big_a - 1) * _cos
	__lowerCAmelCase												=  (big_a - 1) - (big_a + 1) * _cos
	__lowerCAmelCase												=  (big_a - 1) + (big_a + 1) * _cos
	__lowerCAmelCase												=  2 * sqrt(lowerCamelCase					) * alpha

	__lowerCAmelCase												=  big_a * (pmc + aaa)
	__lowerCAmelCase												=  2 * big_a * mpc
	__lowerCAmelCase												=  big_a * (pmc - aaa)
	__lowerCAmelCase												=  ppmc + aaa
	__lowerCAmelCase												=  -2 * pmpc
	__lowerCAmelCase												=  ppmc - aaa

	__lowerCAmelCase												=  IIRFilter(2					)
	filt.set_coefficients([aa, aa, aa]				,		[ba, ba, ba]					)
	return filt




def   __lowerCAmelCase					(							lowerCamelCase   :						int				,		lowerCamelCase   :						int				,		lowerCamelCase   :						float				,		lowerCamelCase   :						float = 1 / sqrt(2					)				,		):






	'''simple docstring'''




	__lowerCAmelCase												=  tau * frequency / samplerate
	__lowerCAmelCase												=  sin(lowerCamelCase					)
	__lowerCAmelCase												=  cos(lowerCamelCase					)
	__lowerCAmelCase												=  _sin / (2 * q_factor)
	__lowerCAmelCase												=  10 ** (gain_db / 40)
	__lowerCAmelCase												=  (big_a + 1) - (big_a - 1) * _cos
	__lowerCAmelCase												=  (big_a + 1) + (big_a - 1) * _cos
	__lowerCAmelCase												=  (big_a - 1) - (big_a + 1) * _cos
	__lowerCAmelCase												=  (big_a - 1) + (big_a + 1) * _cos
	__lowerCAmelCase												=  2 * sqrt(lowerCamelCase					) * alpha

	__lowerCAmelCase												=  big_a * (ppmc + aaa)
	__lowerCAmelCase												=  -2 * big_a * pmpc
	__lowerCAmelCase												=  big_a * (ppmc - aaa)
	__lowerCAmelCase												=  pmc + aaa
	__lowerCAmelCase												=  2 * mpc
	__lowerCAmelCase												=  pmc - aaa

	__lowerCAmelCase												=  IIRFilter(2					)
	filt.set_coefficients([aa, aa, aa]				,		[ba, ba, ba]					)
	return filt




'''simple docstring'''



import re



def   __lowerCAmelCase					(							lowerCamelCase   :						str					):






	'''simple docstring'''




	__lowerCAmelCase												=  re.compile(
	    r"^(?:0|94|\+94|0{2}94)" r"7(0|1|2|4|5|6|7|8)" r"(-| |)" r"\d{7}$"					)

	return bool(re.search(lowerCamelCase				,		lowerCamelCase					)					)


if __name__ == "__main__":
	lowerCAmelCase	:		Optional[Any]				=   '''0094702343221'''

	print(is_sri_lankan_phone_number(phone))