
     f                    B    d dl mZ ddlmZ d Z G d dee          ZdS )    )annotations   )UpdateDictMixinc                @     t           fd fd fdd           S )zReturn a new property object for a content security policy header.
    Useful if you want to add support for a csp extension in a
    subclass.
    c                .    |                                S N)
_get_valuexkeys    ^/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/werkzeug/datastructures/csp.py<lambda>zcsp_property.<locals>.<lambda>       !,,s##     c                0    |                      |          S r   )
_set_value)r   vr   s     r   r   zcsp_property.<locals>.<lambda>   s    Q\\#q)) r   c                .    |                                S r   )
_del_valuer
   s    r   r   zcsp_property.<locals>.<lambda>   r   r   zaccessor for )property)r   s   `r   csp_propertyr      sF    
 ####))))####	  r   c                  d   e Zd ZdZ ed          Z ed          Z ed          Z ed          Z ed          Z	 ed          Z
 ed          Z ed	          Z ed
          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Z ed          Zd$dZd Zd Z d  Z!d! Z"d" Z#d# Z$dS )%ContentSecurityPolicyaV  Subclass of a dict that stores values for a Content Security Policy
    header. It has accessors for all the level 3 policies.

    Because the csp directives in the HTTP header use dashes the
    python descriptors use underscores for that.

    To get a header of the :class:`ContentSecuirtyPolicy` object again
    you can convert the object into a string or call the
    :meth:`to_header` method.  If you plan to subclass it and add your
    own items have a look at the sourcecode for that class.

    .. versionadded:: 1.0.0
       Support for Content Security Policy headers was added.

    zbase-uriz	child-srczconnect-srczdefault-srczfont-srczform-actionzframe-ancestorsz	frame-srczimg-srczmanifest-srcz	media-srcznavigate-toz
object-srczprefetch-srczplugin-typesz	report-toz
report-urisandboxz
script-srczscript-src-attrzscript-src-elemz	style-srczstyle-src-attrzstyle-src-elemz
worker-src Nc                `    t                               | |pd           || _        |d u| _        d S )Nr   )dict__init__	on_updateprovided)selfvaluesr   s      r   r   zContentSecurityPolicy.__init__>   s1    dFLb)))"d*r   c                ,    |                      |          S )+Used internally by the accessor properties.)getr!   r   s     r   r	   z ContentSecurityPolicy._get_valueC   s    xx}}r   c                D    ||                      |d           dS || |<   dS r$   N)pop)r!   r   values      r   r   z ContentSecurityPolicy._set_valueG   s.    =HHS$DIIIr   c                    || v r| |= dS dS r(   r   r&   s     r   r   z ContentSecurityPolicy._del_valueN   s    $;;S			 ;r   c                $    ddl m}  ||           S )z6Convert the stored values into a cache control header.   )dump_csp_header)httpr.   )r!   r.   s     r   	to_headerzContentSecurityPolicy.to_headerS   s$    ******t$$$r   c                *    |                                  S r   )r0   )r!   s    r   __str__zContentSecurityPolicy.__str__Y   s    ~~r   c                    d                     d t          |                                           D                       }dt          |           j         d| dS )N c              3  *   K   | ]\  }}| d |V  dS )=Nr   ).0kr   s      r   	<genexpr>z1ContentSecurityPolicy.__repr__.<locals>.<genexpr>]   s0      HH41aQ,,,,HHHHHHr   <>)joinsorteditemstype__name__)r!   kv_strs     r   __repr__zContentSecurityPolicy.__repr__\   sT    HH6$**,,3G3GHHHHH24::&222222r   )r   N)%r@   
__module____qualname____doc__r   base_uri	child_srcconnect_srcdefault_srcfont_srcform_actionframe_ancestors	frame_srcimg_srcmanifest_src	media_srcnavigate_to
object_srcprefetch_srcplugin_types	report_to
report_urir   
script_srcscript_src_attrscript_src_elem	style_srcstyle_src_attrstyle_src_elem
worker_srcr   r	   r   r   r0   r2   rB   r   r   r   r   r      s
          |J''H[))I,}--K,}--K|J''H,}--K"l#455O[))Il9%%G<//L[))I,}--Kl++J<//L<//L[))Il++Jl9%%Gl++J"l#455O"l#455O[))I!\"233N!\"233Nl++J+ + + +
      
% % %     3 3 3 3 3r   r   N)
__future__r   mixinsr   r   r   r   r   r   r   <module>r`      sx    " " " " " " # # # # # #
 
 
K3 K3 K3 K3 K3OT K3 K3 K3 K3 K3r   