
    hu                     p   d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZmZmZ d dlmZ d d	lmZ d d
lmZmZmZmZmZmZ d dlmZ d dlmZ d dl m!Z!m"Z" d dl#m$Z$ d dl%m&Z& d dl'm(Z(m)Z) d dl*m+Z+ d dl,m-Z- d dl.m/Z/m0Z0 d dl1m2Z2 ddl3m4Z4 	 d dl.m5Z5 dZ6d dl9m:Z: d dl;m<Z< d dl=m>Z> d dl?m@Z@ ddlAm3Z3 dd lBmCZC dd!lDmEZEmFZFmGZG dd"lHmIZI dd#lJmKZKmLZL dd$lMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZV dd%lWmXZX  eC       ZYd& ZZd' Z[ G d( d)e:      Z\ e<j                  e\       y# e7$ r d dl.m8Z5 dZ6Y w xY w)*    N)	lru_cache)apps)unquote)get_messages)signing)
FieldErrorPermissionDeniedValidationError)transaction)	CharField)Http404HttpResponseHttpResponseBadRequestHttpResponseForbiddenHttpResponseRedirectJsonResponse)get_object_or_404)RequestContext)re_pathreverse)method_decorator)	force_str)gettextoverride)xframe_options_sameorigin)require_POST)	CMSPluginPage)get_language_from_request   )TEXT_CHILDREN_ENABLED)PageContent   )Title   )CMSPluginBase)plugin_pool)get_placeholder_conf)admin_reverse)settings)get_editor_config)ActionTokenValidationFormRenderPluginFormTextForm)render_dynamic_attributes)Text_MAX_RTE_LENGTH)	!OBJ_ADMIN_WITH_CONTENT_RE_PATTERN_plugin_tags_to_htmlcms_placeholder_add_pluginplugin_tags_to_admin_htmlplugin_tags_to_id_listplugin_tags_to_user_htmlplugin_to_tagrandom_comment_exemptreplace_plugin_tags)TextEditorWidgetc                   
 ddl m} ddlm}m
 ddlm} |d   }t        |j                               }|sy t        j                  j                  |      } ||      }| j                  j                  d      j                  |d	      }t        j                   |j"                        }	|	d
   j%                  
fd|D                ||	      |_        |j'                  dg       y )Nr   )
ADD_PLUGINget_bound_pluginsget_plugin_data)	dump_jsonpluginpk__inpost_action_datar    )actionorderpluginsc              3   .   K   | ]  } |        y wN ).0rB   r@   s     J/home/dcms/DCMS/lib/python3.12/site-packages/djangocms_text/cms_plugins.py	<genexpr>z"post_add_plugin.<locals>.<genexpr>Z   s     RF 7R   )update_fields)djangocms_history.actionsr=   djangocms_history.helpersr?   r@   djangocms_history.modelsrA   set_get_inline_plugin_idsr   objectsfilteractionsonlygetjsonloadsrE   extendsave)	operationkwargsr=   r?   rA   text_pluginnew_plugin_idsnew_pluginsrF   	post_datar@   s             @rM   post_add_pluginre   H   s    4L2"K;;=>N##**.*AK#K0K ##$67;;:UV;WF

6223IiRkRR'	2F
KK12K3    c                    ddl m}m} ddlm}m} |d   }t        |j                               }|d   }t        |j                               }	|	j                  |      }
|j                  |	      }|
|z  }|
|k(  ry d}|j                  j                  |      j                  d      j                  d	d
      }t        |      }|j                  j                  |	      j                  d      j                  d	d
      }t        |      }t        j                  j                  |      }t         ||            }|
rl|dz  }||j                   d}|D cg c]  }|j                   |
v s ||       }}||j                   |d}| j#                  ||j$                  |d   |||       |r|dz  }|D cg c]  }|j                   |v s| }}|D cg c]
  } ||       }}||j                   |d}|D cg c]  } ||d
       }}||j                   |d}| j#                  ||j$                  |d   |||       y y c c}w c c}w c c}w c c}w )Nr   )r=   DELETE_PLUGINr>   
old_plugin
new_pluginr    rC   positionpkT)flat)rG   	parent_id)rG   rn   rH   placeholder)rF   languagero   pre_datard   rG   )	only_meta)rQ   r=   rh   rR   r?   r@   rT   rU   
differencecmsplugin_setrW   order_byvalues_listlistr   rV   rl   create_actionrp   )r_   r`   r=   rh   r?   r@   old_text_pluginold_plugin_idsnew_text_pluginrb   added_plugin_idsdeleted_plugin_ids
plugin_idsrG   old_treenew_treerH   bound_pluginspre_action_datarB   post_plugin_datarE   deleted_pluginspre_plugin_datas                           rM   pre_change_pluginr   _   s   CL\*O??ABN\*O??ABN%00@'22>B!$66J--E 	%%,,N,CLLZXddeiptdu  H~H 	%%,,N,CLLZXddeiptdu  H~H&&j&9G*734M
 (++

 CPqSYS\S\`pSpOF3qq(++'
 	$--}-$& 	  	
 
0=afN`A`6aaAPQv?62QQ(++&
 SbbOFdCbb(++'
 	 $--}-$& 	  	
# ! r$ bQ cs$   I )
I 4III
7Ic                       e Zd ZeZej                  Zej                  Z	e
ZdZdZej                  ZdZdddiffZ G d d      Zeed	Zed
        Zed        Zed        Zd Z	 d'dededefdZd Zed        Z e!d( fd	       Z"d Z#d Z$d Z%e&e!d               Z' e(e)      e!e*jV                  d                      Z,d Z-d Z.ee/d               Z0ede1fd       Z2d)dZ3d) fd 	Z4d! Z5ed"        Z6d# Z7 fd$Z8ed%        Z9d& Z: xZ;S )*
TextPluginzcms/plugins/text.htmlzcms/plugins/inline.htmlTNfields)bodyr[   c                       e Zd ZddiZy)TextPlugin.Mediaall)z$djangocms_text/css/cms.normalize.cssN)__name__
__module____qualname__cssrK   rf   rM   Mediar      s    ?@rf   r   )re   r   c                 (   t        |j                        }|D ci c]  }||v s|||   j                   }}t        |j                  |      }| j                  j
                  j                  |j                        j                  |       y c c}w )Nrl   )r   )r6   r   rl   r:   modelrV   rW   update)clsinstance
source_mapidsrl   ids_mapnew_texts          rM   do_post_copyzTextPlugin.do_post_copy   s|    $X]]336KR"
:J2z"~(((KK&x}}g>		  HKK 077X7F Ls
   	BBc                 F    d }t        ||    |      }t        |      }||fS )Nc                 j    ddl m}  || j                        }|rt        | |      nd}t	        | |      S )Nr   )get_text_field_child_label )djangocms_translations.utilsr   plugin_typegetattrr8   )objmatchr   fieldcontents        rM   _render_plugin_with_contentzNTextPlugin.get_translation_export_content.<locals>._render_plugin_with_content   s0    O.s?E-2gc5)G g..rf   )output_func)r3   r6   )r   plugin_datar   r   subplugins_within_this_contents        rM   get_translation_export_contentz)TextPlugin.get_translation_export_content   s2    	/ '{5'9Gbc)?)H&666rf   c                    t        j                  t        |       D cg c]  }|j                          }}|D ci c]  \  }}t	        |      | }}}t        |       D ci c]  }|||   
 c}S c c}w c c}}w c c}w rJ   )refinditerr2   groupsintr6   )r   rB   xdatarl   valuesubplugin_ids          rM   set_translation_import_contentz)TextPlugin.set_translation_import_content   st    $&KK0QSZ$[\q
\\04592uB55E[\cEde\d<00ee ]5es   A1A6!A<c                    | j                  d      }t        d|       }| j                  d      }t        d|       }| j                  ||      }|rzt        ||j                  |j
                  |j                  |j                  | j                  |||t        j                  xr t        j                  | j                  |      d      }	|	S |j                  j                  d      r|j                  j                  d      rd|j                  j                  d      rIt        |d	|j                  d   |j                  d   |j                  d   | j                  |||d
d      }	|	S ddlm}
  |
       }	|	S )zU
        Returns the Django form Widget to be used for
        the text area
        revert_on_cancelzadmin:render_pluginT)installed_pluginsrl   ro   plugin_languageplugin_positionconfigurationrender_plugin_url
cancel_urlaction_tokenr   body_css_classesadd_admin_cssplaceholder_idr   r   NFr   )r   rl   ro   r   r   r   r   r   r   r   r   r   )Textarea)get_admin_url_namer   get_action_tokenr;   rl   ro   rp   rk   editor_configurationr*   r!   
rte_configchild_plugin_support)_get_body_css_classes_from_parent_pluginsGETrZ   django.forms.widgetsr   )selfrequestrH   rB   cancel_url_namer   render_plugin_url_namer   r   widgetr   s              rM   get_editor_widgetzTextPlugin.get_editor_widget   sh   
 112DEvo%678
!%!8!8!I#f-C,D$EF,,Wf=%")99".. & &"77"3%)!)!?!?!cJDcDc!%!O!OPV!W"FH + KKOO,- 12 12%")#KK(89 ',= > ',= >"77"3%)!&!#F"  6ZFrf   plugin_instancecss_classesreturnc                 Z   |j                   }|rt        j                  j                         D ]`  \  }}||j                  k(  }|sd}t        |dd      r|j                  }t        |dd      r|j                  |      }|sT||vsY|d|z   z  }b | j                  ||      }||vr||z  }|S )z
        Recursion that collects CMSPluginBase.child_ckeditor_body_css_class attribute values,
        it allows to style content within WYSIWYG iframe <body> based on its parent plugins.
        r   child_ckeditor_body_css_classF!get_child_ckeditor_body_css_class )	parentr'   rH   itemsr   r   r   r   r   )	r   r   r   parent_currentplugin_nameplugin_classis_current_parent_foundbody_css_classcss_classes_collecteds	            rM   r   z4TextPlugin._get_body_css_classes_from_parent_plugins  s     )//-8-@-@-F-F-H 
<)\*59S9S*S'*%'N|-LeT)5)S)S|-PRWX)5)W)WXf)g%>+L#s^';;
< %)$R$R%! %K744rf   c                     | j                  |||      |r|j                         d   nd}|r3t        |      }||d<   t        |j                  ||j
                        nd G fdd| j                        }|S )zF
        Returns a subclass of Form to be used by this plugin
        r   rH   rB   r   Nr   )textcontextchild_plugin_instancesc                   8     e Zd Z eW d      Z fdZ xZS )1TextPlugin.get_form_class.<locals>.TextPluginFormF)r   requiredc                 Z    |j                  di       }r|d<   t        |   |d|i| y )Ninitialr   )popsuper__init__)r   argsr`   r   	__class__rendered_texts       rM   r   z:TextPlugin.get_form_class.<locals>.TextPluginForm.__init__U  s6     **Y3 &3GFO $BB6Brf   )r   r   r   r   r   r   __classcell__)r   r   r   s   @rM   TextPluginFormr   R  s    FU;DC Crf   r   )r   get_plugin_instancer   r5   r   r   form)	r   r   rH   rB   r   r   r   r   r   s	          @@rM   get_form_classzTextPlugin.get_form_class:  s     '' ( 
 7=6--/2$$W-G!(GI5]]'/'F'FM !M	CTYY 	C rf   c                 `    t        | d      r| j                  |       y|j                          y)z:CMS version-save function to add a plugin to a placeholder
add_pluginN)hasattrr   r^   )ro   rB   s     rM   _create_ghost_pluginzTextPlugin._create_ghost_plugin^  s%     ;-""6*KKMrf   c           	         d|j                   v r#| j                  |j                   d         | _        t        j                  rt
        j                  rt        | dd       rt        
| %  |||      S | j                  |      st        d      }t        t        |            S | j                  }|d   |d   |d   |d   |d   |d   d	}t        |d
   |d   |d   |d   |j!                  d            }| j#                  |d   |       |j                   j%                         }t'        |j(                        |d<   t+        t,              }	|	d|j/                         z   z  }	t1        |	      S )NrB   cms_plugin_instancez+You do not have permission to add a plugin.rp   ro   r   rk   r   )r   r   r   rk   r   plugin_parentr   r   r   )rp   r   ro   rk   r   z?revert-on-cancel&)r   _get_plugin_or_404r   r*   r!   r   r   r   r   add_viewhas_add_permissionr   r   r   _cms_initial_attributesr   rZ   r   copystrrl   r)   r4   	urlencoder   )r   r   form_urlextra_contextmessage_datar   rB   querysuccess_urlr   s             rM   r   zTextPlugin.add_viewf  sz   w{{"'+'>'>w{{8?T'UD$ ..22t2D9 7#  &&w/ KLG(7);<<,,$Z0#M2Hoj) /"8_
 +,]+-.*%88O,
 	!!$'7"8&A  "fii.h#$>? 	+eoo.???#K00rf   c                       fd} |d j                          |d j                         |d j                         |d j                        g}|S )Nc                 V    j                  |j                        }t        | ||      S )N)name)r   r   r   )regexfuncr  r   s      rM   patternz+TextPlugin.get_plugin_urls.<locals>.pattern  s&    **4==9D5$T22rf   z^render-plugin/$z^revert-on-cancel/$z^urls/$z^messages/$)r   r   get_available_urlsr   )r   r  url_patternss   `  rM   get_plugin_urlszTextPlugin.get_plugin_urls  s[    	3
 '););<*D,A,ABJ 7 78ND$5$56	
 rf   c                     | j                   j                  j                         }| j                  j                  j
                   d| d| }|S )N_)r   r   lowerr   _meta	app_label)r   r  r   url_names       rM   r   zTextPlugin.get_admin_url_name  sF    nn--335jj&&001;-qGrf   c                 P   |j                   j                  r|j                   j                  st        t	        |      }|j                         r:|j                  j                  }|j                  |      }|r| j                  |      S t        d      }t        t        |            )Nz.Unable to process your request. Invalid token.)r  )user	is_activeis_staffr	   r,   is_validsessionsession_keyget_id_from_tokenr   r   r
   r   )r   r   r   r   r!  text_plugin_idr  s          rM   _get_text_plugin_from_requestz(TextPlugin._get_text_plugin_from_request  s    &&7<<+@+@""(.==?!//55K!33K@N..~>>JKi&899rf   c                     	 | j                  ||j                        }t        |j                  |      }|j                         st        d      S |j                         }|j                  j                  |_        |j                  ||      r%|j                  j                  |j                        st        t        |j!                  |            S # t        $ r}t        |j                        cY d }~S d }~ww xY w)Nr   )ra      status)r   )r$  r   r
   r   r  r-   r  r   get_plugin_class_instancer   r  optshas_change_permissionro   r  r	   r   )r   r   ra   errorr   r   s         rM   r   zTextPlugin.render_plugin  s    	9<<W7;;<WK  E}}s++"<<>(..44 ..wK.H''==gllK""D..w788#  	9)%--88	9s   C 	C=C82C=8C=c                 &   	 | j                  ||j                        }|j                         }|j                  j                  |_        |j                  |      r%|j                  j                  |j                        st        |j                         \  }}|r|j                          n:|j                  }t!        |d      r|j#                  |       n|j%                          t	        d      S # t        t        f$ r t	        d      cY S w xY w)Nr&  r'  r(  delete_plugin)r$  POSTr
   r   r   r*  r   r  r+  r  ro   r,  r  r	   r   clean_pluginsr   r/  delete)r   r   ra   r   downcasted_pluginr  ro   s          rM   r   zTextPlugin.revert_on_cancel  s    	,<<W7<<<XK
 #<<>(..44++G49P9P9f9fgngsgs9t""*>>@1 ++- &11K{O4))+6""$ 3''9  ) 	,s++	,s   C2 2DDc           
        
 |j                   j                  r|j                   j                  st        |j                  j                  d      r	 |j                  j                  d      j                  d      \  }}|j                  d      \  }}t        j                  ||      }|j                  j                  |      }t        |t              r]t        dk\  rT|j                  d      j                         j                         }t!        |j"                  |j%                         d      S t!        t'        |      |j%                         d      S |j                  j                  d
d      j+                  d      j-                         }t/        |      }t        dk\  rI	 t1        t2        j4                  j7                  ||      j                         j9                  d            }	nJt1        t2        j                  j7                  ||      j9                  d            }	|	D ]  

fd
_         dt=        t        j>                  j@                        jC                         |	D 
cg c]y  }
d|rdn.tE        |
jF                  jH                  jJ                        dz  dz
  z  |
j"                  z   |
j%                         d|
jF                  jL                   |
j"                  d{ c}
dgi}t!        |      S # t(        $ r }t!        d	t'        |      i      cY d }~S d }~ww xY w# t:        $ rK t1        t2        j4                  j7                  ||      j                         j9                  d            }	Y Dw xY wc c}
w )Ng:.r   r#   admin_manager)manager)r   urlr-  qr   u     )rp   title__icontains
page__pathpage__node__pathc                  8     j                   j                         S rJ   )pageget_absolute_url)page_contents   rM   <lambda>z/TextPlugin.get_available_urls.<locals>.<lambda>,  s    8I8I8Z8Z8\ rf   resultsu    r   r    z	cms.page:)r   r:  idverbose)r   children)'r  r  r  r	   r   rZ   splitr   	get_modelrV   
isinstancer   _versionpagecontent_setcurrent_contentfirstr   titlerA  r  	Exceptionstripr  r   rw   r"   r8  rW   ru   r   r   r  verbose_name_plural
capitalizelenr@  nodepathrl   )r   r   r   rl   appr   esearchrp   qsrB  urlss             ` rM   r  zTextPlugin.get_available_urls  s   &&7<<+@+@"";;??3
7#KKOOC066s;	r"[[-
UsE2mm''2'.c4(X]--o-FVVX^^`C'3CWCWCY(Z[[#SXc>R>R>T$UVV b)//7==?,W5q=--44hY_4`$_&Xl+ ##**Hv*V__`rsB !# ]0\-] %djj&D&DEPPR -/	! ) %*&Qc,BSBSBXBXB]B]>^bc>cfg>g$h*00%1#/#@#@#B$-l.?.?.B.B-C"D'3'9'9	!
" D!![  7#Wc!f$5667  --44hY_4`$_&X01&	!s@   CK; 1$K; $AL' +A>M>;	L$LL$L$'AM;:M;c           
          t        |      }t        d|D cg c]&  }|j                  |j                  |j                  d( c}i      S c c}w )z;Serve the messages that the admin might have started pilingmessages)r  level	level_tag)r   r   r  r^  r_  )r   r   r]  r  s       rM   r   zTextPlugin.get_messages@  sY    ( $,  	 $+??!(%,%6%6	
 	
s   +A	
c                 4   t        j                  |i |}t        j                  ,|D cg c]!  }|j                  t        j                  v s |# }}t        j
                  r,|D cg c]!  }|j                  t        j
                  vs |# }}|S c c}w c c}w )a  
        This method is a class method that returns a list of child plugin candidates for a given slot and page.

        Parameters:
        - slot: The placeholder where the child plugins will be rendered.
        - page: The page object where the child plugins will be rendered.

        Returns:
        - A list of text-enabled plugins that can be used as child plugins for the given slot and page.
        )r'   get_text_enabled_pluginsr*   TEXT_CHILDREN_WHITELISTr   TEXT_CHILDREN_BLACKLIST)r   r   r`   text_enabled_pluginsrB   s        rM   get_child_plugin_candidatesz&TextPlugin.get_child_plugin_candidatesP  s      +CCTTVT++7%9$!V__PXPpPp=p$  $ ++%9$!V__T\TtTt=t$  $ $#$
$s   !BB&!BBrB   c                 :    t        | dd       }|y d|v rd| dS |S )N	text_iconzcms-iconz<span class="z	"></span>)r   )rB   icons     rM   render_plugin_iconzTextPlugin.render_plugin_iconj  s4    v{D1<"4&	22rf   c           
         
 t        | dd       xs |}|rt        rt        j                  sg S t        j
                  
t        | j                  d      r| j                  j                  nd }| j                  |j                  j                  |      }
fd|D        }t        |dd       }t        d|j                  j                  |i       }t        d|j                  j                  |i       }g }	|D ]y  }|	j                  |j                  |j                  |j                  |j                        | j!                  |      |j                  |j                  |j"                        d	       { t%        |	t'        j(                  d
            S )Nr   r@  )slotr@  c              3   .   K   | ]  } |        y wrJ   rK   )rL   r  
get_plugins     rM   rN   z)TextPlugin.get_plugins.<locals>.<genexpr>}  s     IdD)IrO   templateplugin_modules)defaultplugin_labels)r   r  rh  modulerr  )key)r   r!   r   r   r'   rm  r   ro   r@  get_child_classesrk  r(   appendr   rZ   r  ri  rr  sortedoperator
itemgetter)r   r   rB   r@  child_plugin_typeschild_pluginsrn  modulesnames	main_listrm  s             @rM   get_pluginszTextPlugin.get_pluginss  s[   4d;Bs2*:Y:YI ++
(/0@0@&(It$$t!33##(( 4 
 J6HI4T2&'79K9K9P9PRZdfg$_f6H6H6M6Mxacd	 $ 	F#\\!IIfllFKK@ 33F;%kk&,,F		 iX%8%8%BCCrf   c                     t        | dd       xs |}| j                  |      }| j                  |||      }||d<   t        |   ||fi |S )Nr   r   r   )r   r~  r   r   get_form)r   r   r   r`   rB   rH   r   r   s          rM   r  zTextPlugin.get_form  sg    4d;Bs""3'"" # 

 vw777rf   c                 r    | j                  |j                  d            r| j                  S | j                  S )Nr   )inline_editing_activerZ   inline_editing_templaterender_template)r   r   r   ro   s       rM   get_render_templatezTextPlugin.get_render_template  s1    %%gkk)&<=///'''rf   c                     t         j                  xrT t        j                  xrB t	        | d      xr4 | j
                  j                  xr | j                  j                  dd      S )Ntoolbarinline_editingT)	r*   TEXT_INLINE_EDITINGr   r  r   r  edit_mode_activer   rZ   )r   s    rM   r  z TextPlugin.inline_editing_active  s_     (( <))<+< 00< ##$4d;	
rf   c           
         |j                  d      }| j                  |      rt        |j                  j                        5  | j                  |d   | j                  |      |      }|j                  |j                  j                  j                  d      d         }|j                  |j                  j                  j                  d      d         }d d d        t        |j                  dd      }|j                  t        |||j                        ||j                  |j                   d       |S t        |j                  dd      }|j                  t#        |||j                        ||d	       |S # 1 sw Y   xY w)
Nr   -r   TF)admin_objectsremove_attr)r   )r   ro   objecteditor_settingseditor_settings_idglobal_settingsglobal_settings_id)r   ro   r  )rZ   r  r   r  toolbar_languager   r~  get_editor_settingsrH  get_global_settingsr/   r   r   r5   r   r  r  r7   )	r   r   r   ro   r   r   r  r  r   s	            rM   renderzTextPlugin.render  ss   ++i(%%g.'//::; m//	0BDDTDTU]D^`hi"("<"<W__=]=]=c=cdg=hij=k"l"("<"<W__=]=]=c=cdg=hij=k"lm
 -X]]$\abDNN5gh>]>] $/&'6*0*C*C'6*0*C*C
0  -X]]%]abDNN4gh>]>] $/& ?m ms   BFF
c                 x   t        | dd       r^| j                  j                  j                  }|D ]9  }t        | j                  |j                        }t        ||j                  |       ; t        j                  d t         |_        t        | )  ||||       |j                          |j                          y )Nr   )r   r   r  r   r  setattrr   r1   rter   
save_modelr1  copy_referenced_plugins)	r   r   r   r   changer   r   r   r   s	           rM   r  zTextPlugin.save_model  s    4.5
 --33::F 0   8 8%**EUZZ/	0
 //"2?37Cv6
 	##%rf   c                     |syt        |j                        }t        j                  | j                  j
                        }|j                  |      S )Nr   )salt)r   rl   r   Signerr   r!  sign)r   r   	plugin_idsigners       rM   r   zTextPlugin.get_action_token  s=    cff%	W__%@%@A{{9%%rf   c                 Z   | j                   j                  }t        j                  j	                  dd      j                  |      }| j                  j                  j                  }	 |j                  t        |            }t        ||      S # t        t        f$ r t        d      w xY w)Nro   r   )r   zInvalid plugin idr   )r   r   r   rV   select_relatedrW   r   r  rl   	to_pythonr   r
   
ValueErrorr   r   )r   rl   r   rH   r   	object_ids         rM   r   zTextPlugin._get_plugin_or_404  s    nn--##22=(KRR_jRk

  ##	/4I !Y77  , 	/-..	/s   (B B*)r   )r   NrJ   )<r   r   r   r0   r   r*   TEXT_PLUGIN_NAMEr  TEXT_PLUGIN_MODULE_NAMErr  r.   r   r  r  TEXT_CONFIGURATIONr   disable_child_plugins	fieldsetsr   re   r   operation_handler_callbacksclassmethodr   staticmethodr   r   r   r   r  r   r   r   r   r   r  r   r$  r9   r   r   r   r   atomicr   r  r   r   re  r&   ri  r~  r  r  r  r  r  r   r   r   )r   s   @rM   r   r      s   E$$D--FD-O7#66 #3457IA A +.#
 G G 
7 
7 f f2n "  
	>"H   :1 :1x
: 9  9, l#!(   $!(F<"|
  $  $0 =  D<	8( 
 
"H&, & &
8rf   r   )^r[   rw  r   	functoolsr   django.appsr   django.contrib.admin.utilsr   django.contrib.messagesr   django.corer   django.core.exceptionsr   r	   r
   	django.dbr   django.forms.fieldsr   django.httpr   r   r   r   r   r   django.shortcutsr   django.templater   django.urlsr   r   django.utils.decoratorsr   django.utils.encodingr   django.utils.translationr   r   $django.views.decorators.clickjackingr   django.views.decorators.httpr   
cms.modelsr   r   	cms.utilsr   r*   r!   r"   rK  ImportErrorr$   cms.plugin_baser&   cms.plugin_poolr'   cms.utils.placeholderr(   cms.utils.urlutilsr)   r   editorsr+   formsr,   r-   r.   htmlr/   modelsr0   r1   utilsr2   r3   r4   r5   r6   r7   r8   r9   r:   widgetsr;   r   re   r   r   register_pluginrK   rf   rM   <module>r     s      	   . 0  P P ! )  / * ( 4 + 6 J 5 & / +&H * ' 6 ,  & H H + )
 
 
 &  
4.U
pB	8 B	8J   J 'i  /Hs   D% %D54D5