
    m                         d Z ddlmZ ddlmZ ddlmZ ddlZddlZ eh d      ZdZ	dj                  d	 ej                  D              Zd
 Zd ZddZy)zGenerate random names.    )absolute_import)division)unicode_literalsN>   bahbajbalbambarbehbewbezbicbinbodbokbolbonbowboxbunburbuscaccakcaqcincoccokconcoqcozcukculcumcuncurdandawdaydemdevdicdikdiqdixdomdotdudfagfakfanfapfasfekfelfezfisfobfokfotfucfukfuqfutfuxgadgalgangargatgaygecgeygidgilgizgoggopgotgoygucgudgukguqhaghahhehhenhethonhorhujhulhurhusjapjavjebjewjitjizjobkackakkankaqkarkawkefkelkenkepkikkirkockokkoqkorkoxkukkumkunkuskutkuzlamlanlaslemletliclidliklilliqlolloploxludlullunlusluzmajmalmegmehmesmicmikminmiqmormufmulmunmutnadnasnibnignimnoqnunnutpadpahpapparpatpazpekpelpespikpispixpodpompotpugpukpumpusqabqijquzracrakralranraqrevrisritrotrucsacsaksaqsatseksersetsexseysiksobsodsolsotsoysucsudsuksuqsuttaltaytemtintittoctogtoktoqtostuntupvagvajwacwahwakwaqwarwaswatwenwogwopxuyyalyidyoryukzakzebzigzovzutaeiou c              #   2   K   | ]  }|t         vs|  y wN)_VOWELS).0ls     4lib/googlecloudsdk/command_lib/run/name_generator.py	<genexpr>r  !  s     L!7A1G;Ka!7s   c                     | t         vS r  )_INVALID_THREE_LETTER_WORDS)words    r  IsValidWordr
  $  s    	0	00    c                     	 t        j                  t              t        j                  t              z   t        j                  t              z   }| rt	        |      r|S ])aE  Generate random 3-letter words.

  Words are generated in a consonant-vowel-consonant order to be pronounceable.
  A specific word matching this pattern has a 1/21*1/5*1/21 = 1/2205 chance
  of being generated.

  Args:
    validate: bool, True to validate words against the invalid set.

  Returns:
    str, 3-letter word
  )randomchoice_CONSONANTSr  r
  )validater	  s     r  _ThreeLetterGeneratorr  (  sM     	k"V]]7%;;k"	# 	 {4(k 	r  c                     | dkD  sJ t        |       D cg c]  }t        |       }}||j                  d|       |j                  |      S c c}w )a  Generate a random string of 3-letter sections.

  Each word has a 1/2205 chance of being generated (see _GenerateThreeLetter).
  Therefore a specific name has a (1/2205)^(sections) chance of being generated.
  For 3 sections, the denominator is over 10.7 billion.

  Args:
    sections: int, number of 3-letter generated sections to include
    separator: str, separator between sections
    prefix: str, prefix of the generated name. This acts like an additional
      section at the start of the name and will be separated from the
      generated sections by the seperator argument, however it does not count
      towards the number of sections specified by the sections argument.
    validate: bool, True to validate sections against invalid word list

  Returns:
    str, generated name
  r   )ranger  insertjoin)sections	separatorprefixr  _namess         r  GenerateNamer  =  sW    & 
A49(O
DOq *O%
D	LLF		 Es   A)   -NT)__doc__
__future__r   r   r   r  string	frozensetr  r  r  ascii_lowercaser  r
  r  r   r  r  <module>r$     s^     &  '   ( y) y v ggL!7!7LL1*r  