ó
    EñiÄ,  ã                   ó`   • S SK rS SKJs  Jr  S SKJrJrJ	r	J
r
  SSKJr  SrSr " S S\5      rg)	é    N)ÚListÚOptionalÚSequenceÚcasté   )ÚBaseProviderTÚlac                   óÌ  • \ rS rSrSrSrSr  SS\\   S\\	\      S\
\   4S	 jjr    SS
\S\\
\      S\\   S\S\
\   4
S jjrSS\\   S\\	\      S\4S jjr SS\S\S\\	\      S\4S jjrSS
\S\\	\      S\
\   4S jjr SS\S\S\\	\      S\4S jjrSS
\S\\	\      S\
\   4S jjrS S\S\\	\      S\4S jjr S!S\S\S\\	\      S\
\   4S jjrSrg)"ÚProvideré   a·  Implement default lorem provider for Faker.

.. important::
   The default locale of the lorem provider is ``la``. When using a locale
   without a localized lorem provider, the ``la`` lorem provider will be
   used, so generated words will be in pseudo-Latin. The locale used for
   the standard provider docs was ``en_US``, and ``en_US`` has a localized
   lorem provider which is why the samples here show words in American
   English.
Ú Ú.NÚpart_of_speechÚext_word_listÚreturnc                 ó¤   • Ub  UnO@U(       a-  XR                   ;  a  [        U S35      eU R                   U   nOU R                  n[        U5      $ )a¤  Get list of words.

``ext_word_list`` is a parameter that allows the user to provide a list
of words to be used instead of the built-in word list. If ``ext_word_list``
is provided, then the value of ``part_of_speech`` is ignored.

``part_of_speech`` is a parameter that defines to what part of speech
the returned word belongs. If ``ext_word_list`` is not ``None``, then
``part_of_speech`` is ignored. If the value of ``part_of_speech`` does
not correspond to an existent part of speech according to the set locale,
then an exception is raised.

:sample: part_of_speech="abc", ext_word_list=['abc', 'def', 'ghi', 'jkl']
:sample: part_of_speech="abc"
:sample: ext_word_list=['abc', 'def', 'ghi', 'jkl']

.. warning::
    Depending on the length of a locale provider's built-in word list or
    on the length of ``ext_word_list`` if provided, a large ``nb`` can
    exhaust said lists if ``unique`` is ``True``, raising an exception.
z' is not recognized as a part of speech.)Úparts_of_speechÚ
ValueErrorÚ	word_listÚlist©Úselfr   r   r   s       Ú[/home/mande/repo/quber/.venv/lib/python3.13/site-packages/faker/providers/lorem/__init__.pyÚget_words_listÚProvider.get_words_list   sU   € ð6 Ñ$Ø%‰IÞØ×%9Ñ%9Ó9Ü  NÐ#3Ð3ZÐ![Ó\Ð\à ×0Ñ0°Ñ@‘	àŸ™ˆIä�I‹Ðó    ÚnbÚuniquec                 óÆ   • U R                  X2S9nU(       a&  [        [        [           U R	                  XQS95      nU$ [        [        [           U R                  XQS95      nU$ )a…  Generate a tuple of words.

The ``nb`` argument controls the number of words in the resulting list,
and if ``ext_word_list`` is provided, words from that list will be used
instead of those from the locale provider's built-in word list.

if ``word_list`` is not provided, the method will use a default value of None,
which will result in the method calling the ``get_words_list`` method to get the
word list. If ``word_list`` is provided, the method will use the provided list.

If ``unique`` is ``True``, this method will return a list containing
unique words. Under the hood, |random_sample| will be used for sampling
without replacement. If ``unique`` is ``False``, |random_choices| is
used instead, and the list returned may contain duplicates.

:sample:
:sample: nb=5
:sample: nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']
:sample: nb=4, ext_word_list=['abc', 'def', 'ghi', 'jkl'], unique=True
)r   r   )Úlength)r   r   r   ÚstrÚrandom_sampleÚrandom_choices)r   r   r   r   r   r   Úunique_samplesÚsampless           r   ÚwordsÚProvider.wordsA   sa   € ð8 ×'Ñ'°~Ð'Ðcˆ	æÜ!¤$¤s¡)¨T×-?Ñ-?À	Ð-?Ð-UÓVˆNØ!Ð!Ü”tœC‘y $×"5Ñ"5°iÐ"5Ð"KÓLˆØˆr   c                 óN   • U R                  X5      nU R                  SU5      S   $ )z¶Generate a word.

This method uses |words| under the hood with the ``nb`` argument set to
``1`` to generate the result.

:sample:
:sample: ext_word_list=['abc', 'def', 'ghi', 'jkl']
é   r   )r   r&   r   s       r   ÚwordÚProvider.worde   s*   € ð ×'Ñ'¨ÓFˆ	à�z‰z˜!˜YÓ'¨Ñ*Ð*r   Únb_wordsÚvariable_nb_wordsc                 ó  • US::  a  gU(       a  U R                  USS9nU R                  US9n[        U R                  XS95      nUS   R	                  5       US'   U R
                  R                  U5      U R                  -   $ )a¥  Generate a sentence.

The ``nb_words`` argument controls how many words the sentence will
contain, and setting ``variable_nb_words`` to ``False`` will generate
the exact amount, while setting it to ``True`` (default) will generate
a random amount (+/-40%, minimum of 1) using |randomize_nb_elements|.

Under the hood, |words| is used to generate the words, so the argument
``ext_word_list`` works in the same way here as it would in that method.

:sample: nb_words=10
:sample: nb_words=10, variable_nb_words=False
:sample: nb_words=10, ext_word_list=['abc', 'def', 'ghi', 'jkl']
:sample: nb_words=10, variable_nb_words=True,
         ext_word_list=['abc', 'def', 'ghi', 'jkl']
r   Ú r)   ©Úmin©r   )r   r   )Úrandomize_nb_elementsr   r   r&   ÚtitleÚword_connectorÚjoinÚsentence_punctuation)r   r,   r-   r   r   r&   s         r   ÚsentenceÚProvider.sentencer   s„   € ð& �q‹=ØæØ×1Ñ1°(ÀÐ1ÐBˆHà×'Ñ'°mÐ'ÐDˆ	Ü�T—Z‘Z 8�ZÐEÓFˆØ˜‘8—>‘>Ó#ˆˆa‰à×"Ñ"×'Ñ'¨Ó.°×1JÑ1JÑJÐJr   c                 ó^   • [        SU5       Vs/ s H  o0R                  US9PM     sn$ s  snf )aL  Generate a list of sentences.

This method uses |sentence| under the hood to generate sentences, and
the ``nb`` argument controls exactly how many sentences the list will
contain. The ``ext_word_list`` argument works in exactly the same way
as well.

:sample:
:sample: nb=5
:sample: nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']
r   r2   )Úranger8   ©r   r   r   Ú_s       r   Ú	sentencesÚProvider.sentences‘   s-   € ô EJÈ!ÈRÄLÓQÂL¸q—‘¨M�Ó:ÁLÑQÐQùÒQó   �*Únb_sentencesÚvariable_nb_sentencesc                 ó’   • US::  a  gU(       a  U R                  USS9nU R                  R                  U R                  XS95      nU$ )aÐ  Generate a paragraph.

The ``nb_sentences`` argument controls how many sentences the paragraph
will contain, and setting ``variable_nb_sentences`` to ``False`` will
generate the exact amount, while setting it to ``True`` (default) will
generate a random amount (+/-40%, minimum of 1) using
|randomize_nb_elements|.

Under the hood, |sentences| is used to generate the sentences, so the
argument ``ext_word_list`` works in the same way here as it would in
that method.

:sample: nb_sentences=5
:sample: nb_sentences=5, variable_nb_sentences=False
:sample: nb_sentences=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']
:sample: nb_sentences=5, variable_nb_sentences=False,
         ext_word_list=['abc', 'def', 'ghi', 'jkl']
r   r/   r)   r0   r2   )r3   r5   r6   r>   )r   rA   rB   r   Úparas        r   Ú	paragraphÚProvider.paragraphŸ   sM   € ð* ˜1ÓØæ Ø×5Ñ5°lÈÐ5ÐJˆLà×"Ñ"×'Ñ'¨¯©°|¨Ð(aÓbˆàˆr   c                 ó^   • [        SU5       Vs/ s H  o0R                  US9PM     sn$ s  snf )aF  Generate a list of paragraphs.

This method uses |paragraph| under the hood to generate paragraphs, and
the ``nb`` argument controls exactly how many sentences the list will
contain. The ``ext_word_list`` argument works in exactly the same way
as well.

:sample: nb=5
:sample: nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']
r   r2   )r;   rE   r<   s       r   Ú
paragraphsÚProvider.paragraphs¾   s-   € ô FKÈ1ÈbÄ\ÓRÂ\À—‘¨]�Ó;Á\ÑRÐRùÒRr@   Úmax_nb_charsc                 óŠ  • / nUS:  a  [        S5      eUS:  a¹  U(       dk  SnXA:  aK  U(       a  U R                  OSU R                  US9-   nUR                  U5        U[	        U5      -  nXA:  a  MK  UR                  5         U(       d  Mk  US   S   R                  5       US   SS -   US'   [	        U5      S-
  nX6==   U R                  -  ss'   OáUS	:  as  U(       dk  SnXA:  aK  U(       a  U R                  OSU R                  US9-   nUR                  U5        U[	        U5      -  nXA:  a  MK  UR                  5         U(       d  Mk  OhU(       da  SnXA:  aA  U(       a  S
OSU R                  US9-   nUR                  U5        U[	        U5      -  nXA:  a  MA  UR                  5         U(       d  Ma  SR                  U5      $ )aÒ  Generate a text string.

The ``max_nb_chars`` argument controls the approximate number of
characters the text string will have, and depending on its value, this
method may use either |words|, |sentences|, or |paragraphs| for text
generation. The ``ext_word_list`` argument works in exactly the same way
it would in any of those methods.

:sample: max_nb_chars=20
:sample: max_nb_chars=80
:sample: max_nb_chars=160
:sample: ext_word_list=['abc', 'def', 'ghi', 'jkl']
é   z6text() can only generate text of at least 5 charactersé   r   r/   r2   r)   Néd   Ú
)r   r5   r*   ÚappendÚlenÚpopÚupperr7   r8   rE   r6   )	r   rJ   r   ÚtextÚsizer*   Ú
last_indexr8   rE   s	            r   rT   ÚProvider.textË   s²  € ð ˆØ˜!ÓÜÐUÓVÐVà˜"ÓæØ�ð Ó)Þ37˜D×/Ò/¸RÀ4Ç9Á9Ð[hÀ9ÐCiÑi�DØ—K‘K Ô%ØœC ›IÑ%�Dð Õ)ð —‘”
÷ �dð ˜1‘g˜a‘j×&Ñ&Ó(¨4°©7°1°2¨;Ñ6ˆD�‰GÜ˜T› Q™ˆJØÓ × 9Ñ 9Ñ9ÔØ˜CÓæØ�ð Ó)Þ7; × 3Ò 3ÀÀtÇ}Á}ÐcpÀ}ÐGqÑq�HØ—K‘K Ô)ØœC ›MÑ)�Dð Õ)ð —‘”
÷ �døö Ø�ð Ó)Þ)-¡°2¸¿¹ÐVc¸Ð9dÑ d�IØ—K‘K 	Ô*ØœC 	›NÑ*�Dð Õ)ð —‘”
÷ �dð �w‰w�t‹}Ðr   Únb_textsc                 ób   • [        SU5       Vs/ s H  o@R                  X#5      PM     sn$ s  snf )a¸  Generate a list of text strings.

The ``nb_texts`` argument controls how many text strings the list will
contain, and this method uses |text| under the hood for text generation,
so the two remaining arguments, ``max_nb_chars`` and ``ext_word_list``
will work in exactly the same way as well.

:sample: nb_texts=5
:sample: nb_texts=5, max_nb_chars=50
:sample: nb_texts=5, max_nb_chars=50,
         ext_word_list=['abc', 'def', 'ghi', 'jkl']
r   )r;   rT   )r   rX   rJ   r   r=   s        r   ÚtextsÚProvider.texts  s.   € ô AFÀaÈÔ@RÓSÒ@R¸1—	‘	˜,Ö6Ñ@RÑSÐSùÒSs   �,© )NN)é   NNF)é   TN)r]   N)r]   TN)éÈ   N)r]   r_   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r5   r7   r   r!   r   r   r   ÚintÚboolr&   r*   r8   r>   rE   rH   rT   rZ   Ú__static_attributes__r\   r   r   r   r      s  † ñ	ð €NØÐð )-Ø15ñ%à  ™ð%ð   ¨¡Ñ.ð%ð 
ˆc‰õ	%ðR Ø-1Ø(,Øñ"àð"ð    S¡	Ñ*ð"ð ! ™ð	"ð
 ð"ð 
ˆc‰õ"ñH+ 8¨C¡=ð +ÈÐQYÐZ]ÑQ^ÑH_ð +Ðknõ +ð koñKØðKØ48ðKØPXÐYaÐbeÑYfÑPgðKà	õKñ>R˜Cð R°H¸XÀc¹]Ñ4Kð RÐW[Ð\_ÑW`õ Rð swñØðØ<@ðØX`ÐaiÐjmÑanÑXoðà	õñ>S˜Sð S°X¸hÀs¹mÑ5Lð SÐX\Ð]`ÑXaõ Sñ7 ð 7¸8ÀHÈSÁMÑ;Rð 7Ð^aõ 7ðt dhñTØðTØ/2ðTØIQÐRZÐ[^ÑR_ÑI`ðTà	ˆc‰÷Tð Tr   r   )ÚbuiltinsÚ@py_builtinsÚ_pytest.assertion.rewriteÚ	assertionÚrewriteÚ
@pytest_arÚtypingr   r   r   r   r/   r   Ú	localizedÚdefault_localer   r\   r   r   Ú<module>rq      s/   ðß  „ × 1Ó 1å à€	ð €ôHTˆ|õ HTr   