
    $gC                     X    d dl Z d dlZddlmZ ddlmZ d Z e       Zd	dZ	 d
dZ	d Z
y)    N   )
exceptions)AttributeDictc                      t        dD  ci c]:  } | t        j                  | t        j                  | j                                     < c}       S c c} w )N)DASH_APP_NAMEDASH_URL_BASE_PATHNAMEDASH_ROUTES_PATHNAME_PREFIXDASH_REQUESTS_PATHNAME_PREFIX!DASH_SUPPRESS_CALLBACK_EXCEPTIONSDASH_ASSETS_EXTERNAL_PATHDASH_INCLUDE_ASSETS_FILESDASH_COMPONENTS_CACHE_MAX_AGEr   DASH_SERVE_DEV_BUNDLES
DASH_DEBUGDASH_UIDASH_PROPS_CHECKDASH_HOT_RELOADDASH_HOT_RELOAD_INTERVALDASH_HOT_RELOAD_WATCH_INTERVALDASH_HOT_RELOAD_MAX_RETRYDASH_SILENCE_ROUTES_LOGGINGDASH_PRUNE_ERRORSDASH_COMPRESSHOSTPORT)r   osgetenvlower)vars    J/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/dash/_configs.pyload_dash_env_varsr!   	   sK    	
 3		#))+ 677	
 	
s   ?Ac                     ||S t               j                  d| j                                }||S |j                         dv r|j                         dk(  S |S )zeConsolidate the config with priority from high to low provided init
    value > OS environ > default.DASH_>   truefalser$   )r!   getupperr   )namevaldefaultenvs       r    get_combined_configr,   ,   s\     



"
"U4::<.#9
:C
{$'IIK3D$D399;& M#M    c                 <   d}t        d|       } t        d|      }t        d|      }| &|$t        j                  |j                  d            | &|$t        j                  |j                  d            | || }n|d}|j	                  d      st        j                  d      |j                  d      st        j                  d	      t               j                  }|s|r	d|z   |z   }n||}|j	                  d      st        j                  d
      | ||fS )Na^  
    {} This is ambiguous.
    To fix this, set `routes_pathname_prefix` instead of `url_base_pathname`.

    Note that `requests_pathname_prefix` is the prefix for the AJAX calls that
    originate from the client (the web browser) and `routes_pathname_prefix` is
    the prefix for the API routes on the backend (this flask server).
    `url_base_pathname` will set `requests_pathname_prefix` and
    `routes_pathname_prefix` to the same value.
    If you need these to be different values then you should set
    `requests_pathname_prefix` and `routes_pathname_prefix`,
    not `url_base_pathname`.
    url_base_pathnameroutes_pathname_prefixrequests_pathname_prefixz@You supplied `url_base_pathname` and `requests_pathname_prefix`.z>You supplied `url_base_pathname` and `routes_pathname_prefix`./z0`routes_pathname_prefix` needs to start with `/`z.`routes_pathname_prefix` needs to end with `/`z2`requests_pathname_prefix` needs to start with `/`)r,   r   InvalidConfigformat
startswithendswithr!   r   )r/   r0   r1   _pathname_config_error_messageapp_names        r    pathname_configsr9   :   sm   &" ,,?ARS0 "8  3"$<  $)A)M&&*11R
 	
 $)?)K&&*11P
 	
 $)?)G!2		'!$!,,S1&&>
 	
 "**3/&&'WXX!#11H##&>4J#J 	!	)#9 #..s3&&@
 	
 46NNNr-   c                    |sy t        |      dk7  }t        j                  j                  t        j
                  j                  |       |      }|s|r:t        j                  j                  |      sd| d}t        j                  |      |S )Npagesz
        A folder called `z` does not exist. If a folder for pages is not
        required in your application, set `pages_folder=""`. For example:
        `app = Dash(__name__,  pages_folder="")`
        )
strr   pathjoinflaskhelpersget_root_pathisdirr   r3   )r(   pages_folder	use_pagesis_custom_folderpages_folder_path	error_msgs         r    pages_folder_configrH   }   s    <(G3U]]%@%@%FU%rww}}=N/O& (		
 &&y11r-   )N)NNN)r   r?    r   _utilsr   r!   DASH_ENV_VARSr,   r9   rH    r-   r    <module>rM      s=    	   !@ #$N SW@OFr-   