
    ͆hg3                       S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKJr  S SK	J
r
  S SKJrJrJrJrJrJrJrJrJrJrJr  S SKJrJr  S SKJr  \(       a  S SKJr  \R<                  " S	5      r\" S
5      r  " S S\\    5      r! " S S\"5      r#\\$\!4   r%\\%   r&\\\$\"4      r'\\\$\$4      r( " S S\5      r)\RT                  " SS9SS j5       r+ " S S\)5      r,\
SS j5       r- SSS.     SS jjjr.g)    )annotationsN)UserDict)contextmanager)IOTYPE_CHECKINGAnyGenericIteratorListMappingSequenceTupleTypeVaroverload)
exceptionsutils)weak_propertyMkDocsConfigzmkdocs.configTc                      \ rS rSrSS jr\S 5       r\R                  S 5       rSS jrSS jr	SS jr
SS jrSS	 jrS
 r\SSS jj5       r\SSS jj5       rSS jrSS jrSrg)BaseConfigOption%   c                     / U l         S U l        g N)warningsdefaultselfs    J/opt/services/DDDS/venv/lib/python3.13/site-packages/mkdocs/config/base.py__init__BaseConfigOption.__init__&   s    #%    c                p     U R                   R                  5       $ ! [         a    U R                   s $ f = fr   )_defaultcopyAttributeErrorr   s    r    r   BaseConfigOption.default*   s3    	!==%%'' 	!== 	!s    55c                    Xl         g r   )r%   r   values     r    r   r(   2   s    r#   c               $    U R                  U5      $ r   )run_validationr*   s     r    validateBaseConfigOption.validate6   s    ""5))r#   c                    / U l         g r   )r   r   s    r    reset_warningsBaseConfigOption.reset_warnings9   s	    r#   c                    g)z
Before all options are validated, perform a pre-validation process.

The pre-validation process method should be implemented by subclasses.
N r   configkey_names      r    pre_validationBaseConfigOption.pre_validation<       r#   c                   U$ )za
Perform validation for a value.

The run_validation method should be implemented by subclasses.
r4   r*   s     r    r-   BaseConfigOption.run_validationC   s	     r#   c                    g)z
After all options have passed validation, perform a post-validation
process to do any additional changes dependent on other config values.

The post-validation process method should be implemented by subclasses.
Nr4   r5   s      r    post_validation BaseConfigOption.post_validationK   r:   r#   c                r    UR                  S5      (       a  UR                  S5      (       d  US S nX l        g )N_)endswith
startswith_name)r   ownernames      r    __set_name__BaseConfigOption.__set_name__S   s/    ==dooc&:&:9D
r#   Nc                    g r   r4   r   objtypes      r    __get__BaseConfigOption.__get__X       r#   c                    g r   r4   rK   s      r    rN   rO   \   rP   r#   c                L    [        U[        5      (       d  U $ XR                     $ r   )
isinstanceConfigrE   rK   s      r    rN   rO   `   s     #v&&K::r#   c                    [        U[        5      (       d+  [        SU R                   S[	        U5       S[         35      eX!U R                  '   g )Nzcan't set attribute (z) because the parent is a z not a )rS   rT   r'   rE   rM   )r   rL   r+   s      r    __set__BaseConfigOption.__set__e   sL    #v&& '

|3MdSVi[X_`f_gh   DJJr#   )r%   rE   r   r   returnNone)r+   objectrY   r   )r6   rT   r7   strrY   rZ   )r+   r[   r   )rL   rT   rY   r   )rY   r   )r+   r   )__name__
__module____qualname____firstlineno__r!   propertyr   setterr.   r1   r8   r-   r>   rH   r   rN   rV   __static_attributes__r4   r#   r    r   r   %   s     ! ! ^^ *
    
 r#   r   c                      \ rS rSrSrS rSrg)ValidationErrorm   z=Raised during the validation process of the config on errors.c                j    [        U 5      [        U5      L =(       a    [        U 5      [        U5      :H  $ r   )rM   r\   )r   others     r    __eq__ValidationError.__eq__p   s'    DzT%[(DSY#e*-DDr#   r4   N)r]   r^   r_   r`   __doc__ri   rc   r4   r#   r    re   re   m   s    GEr#   re   c                     ^  \ rS rSr% SrS\S'   S\S'   S rSU 4S jjrSSU 4S	 jjjrSS
 jr	SS jr
SS jrSS jrSS jrSS jrSS jr\SS j5       rSrU =r$ )rT   {   a@  
Base class for MkDocs configuration, plugin configuration (and sub-configuration) objects.

It should be subclassed and have `ConfigOption`s defined as attributes.
For examples, see mkdocs/contrib/search/__init__.py and mkdocs/config/defaults.py.

Behavior as it was prior to MkDocs 1.4 is now handled by LegacyConfig.
PlainConfigSchema_schemar\   config_file_pathc                   [        [        U SS5      5      nU R                  R                  5        H+  u  p#[	        U[
        5      (       d  M  X1[        USU5      '   M-     [        UR                  5       5      U l        U R                   H5  u  p#SUl        [        USS 5      c  M  [        U R                   SU S35      e   g )Nro   r4   rE   T_legacy_required.z: Setting 'required' is unsupported in class-based configs. All values are required, or can be wrapped into config_options.Optional)dictgetattr__dict__itemsrS   r   tuplero   required	TypeErrorr]   )clsschema	attr_nameattrs       r    __init_subclass__Config.__init_subclass__   s    gc9b12"||113OI$ 011<@wtWi89  4 FLLN+"{{OI DMt/6B||nAi[ 1^ ^   +r#   c                J   > U [         L a  [        U0 UD6$ [        TU ]  U 5      $ )zSCompatibility: allow referring to `LegacyConfig(...)` constructor as `Config(...)`.)rT   LegacyConfigsuper__new__)r{   argskwargs	__class__s      r    r   Config.__new__   s)    &=000ws##r#   c                p  > [         TU ]  5         / U l        U R                  5         U R                   VVs1 s H  u  p#UiM	     snnU l        Ub8  [        U[        5      (       d#   UR                  [        R                  " 5       S9nU=(       d    SU l        g s  snnf ! [         a    [        S5      ef = f)N)encodingz)config_file_path is not a Unicode string. )r   r!   _Config__user_configsset_defaultsro   _schema_keysrS   r\   decodesysgetfilesystemencodingUnicodeDecodeErrorre   rp   )r   rp   kvr   s       r    r!   Config.__init__   s    *,+/<<8<41Q<8'
;KS0Q0QS#3#:#:CD]D]D_#:#`  !1 6B 9 & S%&QRRSs   B&"B B5c                J    U R                    H  u  pUR                  X'   M     g)z\
Set the base config by going through each validator and getting the
default if it has one.
N)ro   r   )r   keyconfig_options      r    r   Config.set_defaults   s"    
 #',,C%--DI #/r#   c                  ^ / n/ nU R                    Hb  u  mn U R                  T5      nUR                  U5      U T'   UR                  " U4S jUR                   5       5        UR                  5         Md     [        U R                  5       5      U R                  -
   H  mUR                  " TST 345        M     X4$ ! [         a  nUR                  TU45         S nA  Mk  S nAff = f)Nc              3  ,   >#    U  H	  nTU4v   M     g 7fr   r4   .0wr   s     r    	<genexpr>#Config._validate.<locals>.<genexpr>        I2HQa2H   z!Unrecognised configuration name: )ro   getr.   extendr   r1   re   appendsetkeysr   )r   failedr   r   r+   er   s         @r    	_validateConfig._validate   s    !#%"&,,C)2259S	I-2H2HII,,. #/ tyy{#d&7&77COOS$EcU"KLM 8  # sAh's   AB??
C(	C##C(c                "  ^ / n/ nU R                    HM  u  mn UR                  U TS9  UR                  " U4S jUR                   5       5        UR	                  5         MO     X4$ ! [
         a  nUR                  TU45         S nAMw  S nAff = f)Nr7   c              3  ,   >#    U  H	  nTU4v   M     g 7fr   r4   r   s     r    r   'Config._pre_validate.<locals>.<genexpr>   r   r   )ro   r8   r   r   r1   re   r   r   r   r   r   r   r   s        @r    _pre_validateConfig._pre_validate   s    !#%"&,,C(,,TC,@I-2H2HII,,.	 #/  # (sAh''(   AA&&
B0B		Bc                "  ^ / n/ nU R                    HM  u  mn UR                  U TS9  UR                  " U4S jUR                   5       5        UR	                  5         MO     X4$ ! [
         a  nUR                  TU45         S nAMw  S nAff = f)Nr   c              3  ,   >#    U  H	  nTU4v   M     g 7fr   r4   r   s     r    r   (Config._post_validate.<locals>.<genexpr>   r   r   )ro   r>   r   r   r1   re   r   r   s        @r    _post_validateConfig._post_validate   s    !#%"&,,C(--dS-AI-2H2HII,,.	 #/  # (sAh''(r   c                   U R                  5       u  pU R                  5       u  p4UR                  U5        UR                  " U5        [        U5      S:X  a5  U R	                  5       u  pVUR                  U5        UR                  " U5        X4$ )Nr   )r   r   r   lenr   )r   r   r   
run_failedrun_warningspost_failedpost_warningss          r    r.   Config.validate   sz    --/#'>>#3 
j!% v;!)-)<)<)>&KMM+&OOM*r#   c                    [        U[        5      (       d"  [        R                  " S[	        U5       35      eU R
                  R                  U5        U R                  U5        g)z&Load config options from a dictionary.zPThe configuration is invalid. Expected a key-value mapping (dict) but received: N)rS   rt   r   ConfigurationErrorrM   r   r   update)r   patchs     r    	load_dictConfig.load_dict   sX    %&&//66:5k]D 
 	""5)Er#   c                    [         R                  " S[        5        U R                  [        R
                  " U5      5      $ )zALoad config options from the open file descriptor of a YAML file.zjConfig.load_file is not used since MkDocs 1.5 and will be removed soon. Use MkDocsConfig.load_file instead)r   warnDeprecationWarningr   r   	yaml_load)r   config_files     r    	load_fileConfig.load_file   s0    1	

 ~~eook:;;r#   c                P    [         R                  " S[        5        U R                  $ )Nz>user_configs is never used in MkDocs and will be removed soon.)r   r   r   r   r   s    r    user_configsConfig.user_configs	  s"    LN`	
 """r#   )__user_configsr   rp   )rY   rT   r   )rp   zstr | bytes | NonerX   )rY   z#tuple[ConfigErrors, ConfigWarnings])r   rt   rY   rZ   )r   r   rY   rZ   )rY   zSequence[Mapping[str, Any]])r]   r^   r_   r`   rk   __annotations__r   r   r!   r   r   r   r   r.   r   r   r   r   rc   __classcell__r   s   @r    rT   rT   {   sa      $7 7. &   "	< # #r#   rT   )maxsizec                    [        U [        5      (       a  U R                  $ [        S U R                  R                  5        5       5      $ )zeExtract ConfigOptions defined in a class (used just as a container) and put them into a schema tuple.c              3  Z   #    U  H!  u  p[        U[        5      (       d  M  X4v   M#     g 7fr   )rS   r   r   r   r   s      r    r   get_schema.<locals>.<genexpr>  s"     \$8DAJqJZ<[!$8s   +
+)
issubclassrT   ro   rx   rv   rw   )r{   s    r    
get_schemar     s9     #v{{\CLL$6$6$8\\\r#   c                  4   ^  \ rS rSrSrSSU 4S jjjrSrU =r$ )r   i  zVA configuration object for plugins, as just a dict without type-safe attribute access.c                R   > [        S U 5       5      U l        [        TU ]  U5        g )Nc              3  ,   #    U  H
  u  pX4v   M     g 7fr   r4   r   s      r    r   (LegacyConfig.__init__.<locals>.<genexpr>  s     7aVs   )rx   ro   r   r!   )r   r|   rp   r   s      r    r!   LegacyConfig.__init__  s#    777)*r#   )ro   r   )r|   rn   rp   
str | None)r]   r^   r_   r`   rk   r!   rc   r   r   s   @r    r   r     s    `+ +r#   r   c              #    #    U c  SS/nO=[        U [        5      (       a  U /nO$[        U SS5      (       a  U R                  /nOU nSnU(       aj  U HG  n[        R
                  R                  U5      n[        R                  SU 35         [        US5      n  OI   [        R                  " SUS	    S
35      e[        R                  SW 35         UR                  S	5         Uv   [        US5      (       a  UR!                  5         gg! [         a     M  f = f! [         a     NEf = f! [        US5      (       a  UR!                  5         f f = f7f)a~  
A context manager which yields an open file descriptor ready to be read.

Accepts a filename as a string, an open or closed file descriptor, or None.
When None, it defaults to `mkdocs.yml` in the CWD. If a closed file descriptor
is received, a new file descriptor is opened for the same file.

The file descriptor is automatically closed when the context manager block is existed.
Nz
mkdocs.ymlzmkdocs.yamlclosedFzLoading configuration file: rbzConfig file 'r   z' does not exist.close)rS   r\   ru   rG   ospathabspathlogdebugopenFileNotFoundErrorr   r   seekOSErrorhasattrr   )r   paths_to_tryresult_config_filer   s       r    _open_config_filer   !  sX     $m4	K	%	%#}	h	.	.#(()( D77??4(DII4TF;<%)$%5" ! //-Q?PPa0bcc		01C0DEF	##A&'  %w//$$& 0 %   		 %w//$$& 0s`   B	ED9ED $D, (#E
DEDE
D)&E(D))E,$EErp   c                  UR                  5       nUR                  5       R                  5        H  u  pEUb  M
  UR                  U5        M     [        U 5       nSSKJn  Uc?  [        R                  (       a*  U[        R                  R                  La  [        USS5      nU" US9nUR                  U5        SSS5        WR                  U5        UR                  5       u  pU
 H   u  p[        R                  SU SU 35        M"     U	 H   u  p[        R                  SU SU 35        M"     UR                  5        H!  u  pE[        R!                  SU SU< 35        M#     [#        U	5      S:  a  [$        R&                  " S	5      eUR(                  (       a2  [#        U
5      S:  a#  [$        R&                  " S
[#        U
5       S35      eU$ ! , (       d  f       GN= f)a!  
Load the configuration for a given file object or name.

The config_file can either be a file object, string or None. If it is None
the default `mkdocs.yml` filename will loaded.

Extra kwargs are passed to the configuration to replace any default values
unless they themselves are None.
Nr   r   rG   r   zConfig value 'z': z' = z#Aborted with a configuration error!zAborted with z) configuration warnings in 'strict' mode!)r&   rw   popr   mkdocs.config.defaultsr   r   stdinbufferru   r   r   r.   r   warningerrorr   r   r   Abortstrict)r   rp   r   optionsr   r+   fdr   cfgerrorsr   config_namer   r   s                 r    load_configr  T  s    kkmG lln**,
=KK - 
;	'27#yyRsyy'7'77#*2vt#< ,<=b 
( MM'||~F (n[MWI>? !) %		N;-s5':; % iik
		N3%tE956 " 6{QDEE	H)CM?*ST
 	
 JA 
(	's   A G
G)r{   rM   rY   rn   )r   str | IO | NonerY   zIterator[IO]r   )r   r  rp   r   rY   r   )/
__future__r   	functoolsloggingr   r   r   collectionsr   
contextlibr   typingr   r   r   r	   r
   r   r   r   r   r   r   mkdocsr   r   mkdocs.utilsr   r   r   	getLoggerr   r   r   	Exceptionre   r\   PlainConfigSchemaItemrn   ConfigErrorsConfigWarningsrT   	lru_cacher   r   r   r  r4   r#   r    <module>r     s<   "   	 
    %    % &3 ( CLE wqz E PEi E c#334 23 E#y.)*eCHo&S#X S#l T"] #]+6 + /' /'f $(4KO4 4>H44r#   