
    g]                     0    S r SSKrSSKrSSKrSS jrS rg)a  adds autohandler functionality to Mako templates.

requires that the TemplateLookup class is used with templates.

usage::

    <%!
        from mako.ext.autohandler import autohandler
    %>
    <%inherit file="${autohandler(template, context)}"/>


or with custom autohandler filename::

    <%!
        from mako.ext.autohandler import autohandler
    %>
    <%inherit file="${autohandler(template, context, name='somefilename')}"/>

    Nc                    UR                   nU R                  R                  nUR                  (       d   UR                  [
        XB4   $ [        R                  " S[        R                  " U5      5      U/-   n[        U5      (       a  SSR                  U5      -   nXd:w  aE  [        X65      (       a5  UR                  (       d"  UR                  R                  [
        XB4U5      $ U$ [        U5      S:X  a  OU/USS & [        U5      (       a  M  UR                  (       d"  UR                  R                  [
        XB4S 5      $ g ! [         a     GNf = f)Nz([^/]+)/   )lookupmodule_template_urifilesystem_checks
_uri_cacheautohandlerKeyErrorrefindall	posixpathdirnamelenjoin_file_exists
setdefault)templatecontextnamer   r	   tokenspaths          \/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/mako/ext/autohandler.pyr   r   !   s/   ^^FOO11M##	$$k=%GHH ZZ
I$5$5m$DENF
f++SXXf%% \&%?%?++((33 -6  v;!frs f++ ##  ++-.
 	
 -  		s   E 
EEc                     [         R                  " SSU5      nU R                   H/  n[        R                  R                  US-   U-   5      (       d  M/    g   g)Nz^/ r   TF)r   subdirectoriesosr   exists)r   r   psubds       r   r   r   @   sG    66%T"D77>>!c'D.))       )r   )__doc__r    r   r   r   r    r$   r   <module>r'      s   * 
  	>r$   