


'''simple docstring'''






def lowerCamelCase__     (		__lowerCamelCase			:				str				):







   '''simple docstring'''




   _UpperCAmelCase  :  Optional[int]				       =[0 for i in range(len(__lowerCamelCase				)				)]

   # initialize interval's left pointer and right pointer
   _UpperCAmelCase       ,			_UpperCAmelCase  :  Optional[Any]				       =0, 0

   for i in range(1			,       len(__lowerCamelCase				)				):
      # case when current index is inside the interval
      if i <= right_pointer:
         _UpperCAmelCase  :  str				       =min(right_pointer - i + 1			,       z_result[i - left_pointer]				)
         _UpperCAmelCase  :  int				       =min_edge

      while go_next(__lowerCamelCase			,       __lowerCamelCase			,       __lowerCamelCase				):
         z_result[i] += 1

      # if new index's result gives us more right interval,
      # we've to update left_pointer and right_pointer
      if i + z_result[i] - 1 > right_pointer:
         _UpperCAmelCase       ,			_UpperCAmelCase  :  str				       =i, i + z_result[i] - 1

   return z_result





def lowerCamelCase__     (		__lowerCamelCase			:				int			,       __lowerCamelCase			:				list[int]			,       __lowerCamelCase			:				str				):







   '''simple docstring'''




   return i + z_result[i] < len(__lowerCamelCase				) and s[z_result[i]] == s[i + z_result[i]]





def lowerCamelCase__     (		__lowerCamelCase			:				str			,       __lowerCamelCase			:				str				):







   '''simple docstring'''




   _UpperCAmelCase  :  Union[str, Any]				       =0
   # concatenate 'pattern' and 'input_str' and call z_function
   # with concatenated string
   _UpperCAmelCase  :  int				       =z_function(pattern + input_str				)

   for val in z_result:
      # if value is greater then length of the pattern string
      # that means this index is starting position of substring
      # which is equal to pattern string
      if val >= len(__lowerCamelCase				):
         answer += 1

   return answer


if __name__ == "__main__":
 import doctest

 doctest.testmod()





'''simple docstring'''






import argparse


lowercase				='docs/source/_static/js/custom.js'





def lowerCamelCase__     (		__lowerCamelCase			:				List[Any]				):







   '''simple docstring'''




   with open(__lowerCamelCase			,       encoding='utf-8'			,       newline='\n'				) as f:
      _UpperCAmelCase  :  Optional[Any]				       =f.readlines()
   _UpperCAmelCase  :  Dict				       =0

   # First let's put the right version
   while not lines[index].startswith('const stableVersion ='				):
      index += 1
   _UpperCAmelCase  :  Tuple				       =f"const stableVersion = \"v{version}\"\n"

   # Then update the dictionary
   while not lines[index].startswith('const versionMapping = {'				):
      index += 1

   # We go until the end
   while not lines[index].startswith('}'				):
      index += 1
   # We add the new version at the end
   lines[index - 1] += f"    \"v{version}\": \"v{version}\",\n"

   with open(__lowerCamelCase			,       'w'			,       encoding='utf-8'			,       newline='\n'				) as f:
      f.writelines(__lowerCamelCase				)


if __name__ == "__main__":
 lowercase				=argparse.ArgumentParser()
 parser.add_argument('--version', help='Release version.')
 lowercase				=parser.parse_args()
 update_custom_js(args.version)

